/* ==========================================================================
   CD Training Portal — stylesheet
   Brand colours below are placeholders inspired by each brand; replace the
   hex values with the official ones from each brand guide if needed.
   ========================================================================== */
:root {
  --brand-crazy-domains: #f26b21;
  --brand-vodien: #0098d8;
  --brand-resellerclub: #2c4fbf;
  --brand-dreamscape: #7a3fc6;

  --primary: #2f5bea;
  --primary-600: #2349c9;
  --primary-50: #eef2ff;
  --accent: #10b5a3;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e8f0;
  --bg: #f4f6fb;
  --card: #ffffff;
  --side: #0e1733;
  --side-2: #17224a;
  --side-ink: #c7cfe6;
  --green: #0f9d58; --green-50: #e7f7ee;
  --red: #d93025; --red-50: #fdecea;
  --amber: #b45309; --amber-50: #fff4e0;
  --blue: #1d4ed8; --blue-50: #e8efff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --side-w: 264px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 1em; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid #7aa2ff; outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); background: linear-gradient(180deg, var(--side), #0b1229); color: var(--side-ink); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .25s ease; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; letter-spacing: .5px; color: #fff;
  background: conic-gradient(from 210deg, var(--brand-crazy-domains), var(--brand-dreamscape), var(--brand-resellerclub), var(--brand-vodien), var(--brand-crazy-domains)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.15); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: .98rem; }
.brand-text small { color: #8d9bc4; font-size: .75rem; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-ink); font-weight: 500; font-size: .92rem; text-decoration: none; }
.side-nav a:hover, .side-foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: linear-gradient(90deg, rgba(47,91,234,.35), rgba(47,91,234,.12)); color: #fff; box-shadow: inset 3px 0 0 #6d8dff; }
.side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.brand-dots { display: flex; gap: 6px; padding: 10px 12px 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #999; }
.main-wrap { flex: 1; margin-left: var(--side-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(244,246,251,.85); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; color: var(--muted); }
.top-search input { flex: 1; border: 0; outline: none; background: none; padding: 10px 0; font: inherit; color: var(--ink); min-width: 0; }
.top-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,91,234,.15); }
.top-title { flex: 1; font-weight: 700; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; text-decoration: none !important; padding: 4px 10px 4px 4px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.icon-btn.nav-toggle { display: none; }
.scrim { display: none; }
.content { padding: 28px; flex: 1; width: 100%; max-width: 1320px; outline: none; }
.site-footer { padding: 20px 28px; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.footer-brands { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Brand helpers ---------- */
.brand-crazy-domains { --b: var(--brand-crazy-domains); }
.brand-vodien { --b: var(--brand-vodien); }
.brand-resellerclub { --b: var(--brand-resellerclub); }
.brand-dreamscape { --b: var(--brand-dreamscape); }
.dot[class*="brand-"] { background: var(--b, #94a3b8); }
.brand-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; color: var(--b, #475569); background: color-mix(in srgb, var(--b, #94a3b8) 12%, #fff); border: 1px solid color-mix(in srgb, var(--b, #94a3b8) 30%, #fff); }
.brand-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--b, #94a3b8); }

/* ---------- Buttons, badges, chips ---------- */
.btn { --bg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 11px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important; transition: background .15s, transform .05s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #f8fafc; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(47,91,234,.3); }
.btn-primary:hover { background: var(--primary-600); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #0c9a8b; }
.btn-danger { background: #fff; color: var(--red); border-color: #f3c7c3; }
.btn-danger:hover { background: var(--red-50); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(15,23,42,.05); }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 9px; }
.btn-xs { padding: 4px 9px; font-size: .78rem; border-radius: 8px; gap: 5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge-muted { background: #eef1f6; color: #475569; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-blue { background: var(--blue-50); color: var(--blue); }
.badge-purple { background: #f3ecff; color: #6d28d9; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink-2); text-decoration: none !important; }
.chip:hover { border-color: #c7d0e0; }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-soft { background: var(--primary-50); border-color: transparent; color: var(--primary-600); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); flex: none; overflow: hidden; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.5rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head a { font-size: .85rem; font-weight: 600; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.layout-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack > * + * { margin-top: 20px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head-text { display: flex; gap: 14px; align-items: center; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.page-icon .icon { width: 24px; height: 24px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 36px; color: #fff; background:
  radial-gradient(800px 300px at 100% 0%, rgba(122,63,198,.55), transparent 60%),
  radial-gradient(600px 300px at 0% 100%, rgba(16,181,163,.35), transparent 60%),
  linear-gradient(120deg, #13204d, #1f3aa6); box-shadow: var(--shadow-lg); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.06); }
.hero h1 { font-size: 2rem; margin-bottom: 8px; color: #fff; }
.hero p { color: #d6defa; max-width: 640px; font-size: 1.02rem; }
.hero-eyebrow { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 99px; font-size: .8rem; font-weight: 600; margin-bottom: 14px; }
.hero-search { display: flex; gap: 8px; margin-top: 20px; max-width: 620px; background: #fff; padding: 6px; border-radius: 14px; position: relative; z-index: 1; }
.hero-search .icon { color: var(--muted); margin: 0 4px 0 10px; align-self: center; }
.hero-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1rem; padding: 10px 4px; min-width: 0; color: var(--ink); }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; }
.hero-stats span { color: #b9c5ef; font-size: .82rem; }
.hero-brands { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; position: relative; z-index: 1; }
.hero-brands .brand-pill { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }

/* ---------- Quick access tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.tile { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: transparent; }
.tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.tile-ic .icon { width: 22px; height: 22px; }
.tile strong { display: block; font-size: .95rem; }
.tile small { color: var(--muted); font-size: .8rem; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.list-body { flex: 1; min-width: 0; }
.list-body strong, .list-body a.title { display: block; font-weight: 600; color: var(--ink); }
.list-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .8rem; margin-top: 3px; align-items: center; }

/* ---------- Resource cards ---------- */
.res-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.res-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.res-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.res-type { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); }
.res-type.t-video { background: #fdecef; color: #c2185b; }
.res-type.t-presentation { background: #fff1e6; color: #d9480f; }
.res-type.t-file { background: #fdecea; color: #c62828; }
.res-type.t-award { background: #f3ecff; color: #6d28d9; }
.res-type.t-clipboard { background: var(--green-50); color: var(--green); }
.res-type.t-external, .res-type.t-link { background: #e6f7f5; color: #0f766e; }
.res-card h3 { margin: 0; }
.res-card p { color: var(--ink-2); font-size: .9rem; margin: 0; flex: 1; }
.res-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.res-meta span { display: inline-flex; gap: 5px; align-items: center; }
.res-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); padding: 12px; border-radius: 14px; }
.filters .search-inline { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); }
.filters .search-inline input { border: 0; outline: 0; flex: 1; padding: 9px 0; font: inherit; min-width: 0; }
.filters select { flex: 0 1 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
.field .req { color: var(--red); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.field .err { font-size: .8rem; color: var(--red); margin-top: 5px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=url], input[type=number], input[type=search], input[type=datetime-local], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d5dbe6; border-radius: 10px; padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,91,234,.15); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; border: 1px solid; }
.alert .icon { margin-top: 2px; }
.alert-success { background: var(--green-50); border-color: #bfe8d0; color: #0b6b3c; }
.alert-error { background: var(--red-50); border-color: #f5c2bd; color: #a32019; }
.alert-info { background: var(--blue-50); border-color: #c9d8ff; color: #1e3a8a; }
.alert-warn { background: var(--amber-50); border-color: #f8dcae; color: #8a4508; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: #f8fafc; font-weight: 700; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafbff; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; text-align: center; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; text-decoration: none; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Stats ---------- */
.stat { display: flex; gap: 14px; align-items: center; }
.stat-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--c, var(--primary)); background: color-mix(in srgb, var(--c, var(--primary)) 12%, #fff); }
.stat-ic .icon { width: 24px; height: 24px; }
.stat strong { display: block; font-size: 1.6rem; line-height: 1.1; font-weight: 800; }
.stat span { color: var(--muted); font-size: .84rem; }
.progress { height: 10px; border-radius: 99px; background: #e9edf5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s ease; }
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #e9edf5 0); flex: none; }
.ring::before { content: attr(data-label); width: calc(var(--size) - 22px); height: calc(var(--size) - 22px); border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; }
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) 48px; gap: 10px; align-items: center; font-size: .86rem; }
.bar-row .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { text-align: right; font-weight: 700; color: var(--ink-2); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.spark div { flex: 1; background: linear-gradient(180deg, var(--primary), #8aa4ff); border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; }
.spark-labels { display: flex; gap: 4px; font-size: .68rem; color: var(--muted); margin-top: 6px; }
.spark-labels span { flex: 1; text-align: center; overflow: hidden; }

/* ---------- Roadmap timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--primary), var(--accent)); opacity: .25; }
.tl-week { position: relative; margin-bottom: 22px; }
.tl-node { position: absolute; left: -34px; top: 18px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: var(--primary); box-shadow: 0 0 0 5px var(--bg); }
.tl-week.done .tl-node { background: var(--green); }
.tl-week.current .tl-node { background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px rgba(16,181,163,.35); } 50% { box-shadow: 0 0 0 5px var(--bg), 0 0 0 12px rgba(16,181,163,0); } }
.tl-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.tl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tl-head h3 { margin: 0; }
.tl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; }
.tl-item.done { background: var(--green-50); }
.tl-item.done .tl-title { text-decoration: line-through; text-decoration-color: rgba(15,157,88,.5); color: #2d6a4a; }
.tl-item form { margin: 0; }
.tl-check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid #c3cbd9; background: #fff; display: grid; place-items: center; cursor: pointer; color: transparent; padding: 0; }
.tl-item.done .tl-check { background: var(--green); border-color: var(--green); color: #fff; }
.tl-check .icon { width: 15px; height: 15px; }
.tl-title { flex: 1; font-weight: 600; font-size: .92rem; }
.tl-title small { display: block; color: var(--muted); font-weight: 400; }
.week-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.week-strip a { display: block; text-align: center; padding: 10px 6px; border-radius: 12px; background: #f1f4fa; color: var(--ink-2); font-size: .78rem; font-weight: 600; text-decoration: none; }
.week-strip a strong { display: block; font-size: 1.05rem; color: var(--ink); }
.week-strip a.done { background: var(--green-50); color: var(--green); }
.week-strip a.current { background: var(--primary); color: #fff; }
.week-strip a.current strong { color: #fff; }

/* ---------- Announcements ---------- */
.ann { position: relative; }
.ann.pinned { border-color: #ffd28a; background: linear-gradient(180deg, #fffaf0, #fff 60%); }
.ann-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: .82rem; margin-bottom: 10px; }
.prose { color: var(--ink-2); }
.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 0 0 1em; padding: 8px 14px; border-left: 4px solid var(--primary); background: var(--primary-50); border-radius: 0 8px 8px 0; }
.prose table { border-collapse: collapse; } .prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.attachment { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #f1f4fa; color: var(--ink); font-weight: 600; font-size: .85rem; margin-top: 12px; }

/* ---------- Team ---------- */
.trainer { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trainer .avatar { margin-bottom: 6px; }
.trainer h3 { margin: 0; }
.trainer .role { color: var(--primary); font-weight: 600; font-size: .88rem; }
.trainer .spec { color: var(--muted); font-size: .85rem; }
.trainer .links { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.spotlight { display: flex; gap: 16px; align-items: center; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform .2s; color: var(--muted); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .prose { padding: 0 18px 16px; }

/* ---------- Passcode gate ---------- */
.gate { max-width: 520px; margin: 20px auto; text-align: center; }
.gate .lock { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--dreamscape, #7a3fc6)); color: #fff; box-shadow: var(--shadow-lg); }
.gate .lock .icon { width: 32px; height: 32px; }
.passcode-input { text-align: center; font-size: 1.4rem !important; letter-spacing: .3em; font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace !important; }
.code-reveal { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: #f1f4fa; padding: 3px 8px; border-radius: 6px; letter-spacing: .05em; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .icon { width: 34px; height: 34px; margin: 0 auto 8px; display: block; opacity: .6; }
.empty p { margin: 0; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(800px 400px at 80% 0%, rgba(122,63,198,.25), transparent), linear-gradient(140deg, #0e1733, #1f3aa6); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card .brand { padding: 0 0 18px; color: var(--ink); }
.auth-card .brand-text small { color: var(--muted); }

/* ---------- Rich text editor ---------- */
.rte { border: 1px solid #d5dbe6; border-radius: 10px; background: #fff; overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.rte-bar button { border: 0; background: none; padding: 6px 9px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.rte-bar button:hover { background: #e9edf5; }
.rte-area { min-height: 180px; padding: 12px 14px; outline: none; }
.rte-area:focus { box-shadow: inset 0 0 0 2px rgba(47,91,234,.2); }

/* ---------- Certificate ---------- */
.cert { max-width: 980px; margin: 0 auto; background: #fff; border-radius: 6px; padding: 56px; text-align: center; position: relative; border: 14px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--brand-crazy-domains), var(--brand-dreamscape), var(--brand-resellerclub), var(--brand-vodien)) border-box; }
.cert h1 { font-size: 2.4rem; letter-spacing: .02em; }
.cert .name { font-size: 2.2rem; font-weight: 800; margin: 16px 0; color: var(--primary-600); border-bottom: 2px solid var(--line); display: inline-block; padding: 0 30px 8px; }
.cert-foot { display: flex; justify-content: space-between; margin-top: 48px; gap: 20px; font-size: .9rem; color: var(--muted); }
.cert-foot div { flex: 1; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.active { color: var(--primary); border-color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .layout-main { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,12,30,.45); z-index: 35; }
  .main-wrap { margin-left: 0; }
  .icon-btn.nav-toggle { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px; }
  .site-footer { padding: 16px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.4rem; }
  .hero { padding: 24px 20px; border-radius: 18px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-search .btn span { display: none; }
  .tiles, .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .tile small { display: none; }
  .hide-sm { display: none; }
  .card { padding: 18px; }
  .week-strip { grid-template-columns: repeat(3, 1fr); }
  .filters select { flex: 1 1 140px; }
  .cert { padding: 28px 18px; } .cert h1 { font-size: 1.6rem; } .cert .name { font-size: 1.5rem; }
  .bar-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .site-footer, .no-print, .alert { display: none !important; }
  .main-wrap { margin: 0; } .content { padding: 0; max-width: none; } body { background: #fff; }
  .cert { border-width: 10px; }
  @page { size: landscape; margin: 10mm; }
}

/* Inline search inputs sit inside a styled wrapper */
.top-search input[type=search], .hero-search input[type=search], .filters .search-inline input[type=search] { border: 0; box-shadow: none; background: transparent; border-radius: 0; padding-left: 0; padding-right: 0; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
