:root {
  --navy: #0a2350;
  --navy-2: #13306a;
  --teal: #12c4a6;
  --teal-ink: #0b8f79;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #111a2b;
  --muted: #5d6b82;
  --line: #e3e8ef;
  --red: #d64545;
  --red-bg: #fdecec;
  --amber: #b7791f;
  --amber-bg: #fdf4e3;
  --green: #1f8a5b;
  --green-bg: #e7f6ee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(10, 35, 80, 0.06), 0 1px 1px rgba(10, 35, 80, 0.03);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 14px; line-height: 1.5; }
a { color: var(--navy-2); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* ---------- buttons + inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c7d0dd; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.teal { background: var(--teal); border-color: var(--teal); color: #04241f; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
input, select, textarea { font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); width: 100%; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field + .field { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h2 { margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -0.02em; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols.w21 { grid-template-columns: 2fr 1fr; }

/* ---------- tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f8fafc; }
.table-wrap { overflow-x: auto; }

/* ---------- pills */
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef2f7; color: var(--muted); white-space: nowrap; }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.navy { background: #e6ecf7; color: var(--navy); }
.pill.teal { background: #dff7f2; color: var(--teal-ink); }

/* ---------- app shell */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand img { width: 34px; height: 34px; }
.brand b { display: block; font-size: 15px; color: var(--navy); }
.brand span { font-size: 11px; color: var(--muted); }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: #f1f4f8; }
.nav a.on { background: var(--navy); color: #fff; }
.nav a .badge { font-size: 11px; background: var(--red); color: #fff; border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.nav .sep { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 14px 10px 4px; }
.me { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 8px 0; font-size: 12px; }
.me b { font-size: 13px; display: block; }
.main { padding: 26px 32px 60px; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.dev-banner { background: #fff7e0; border-bottom: 1px solid #f0dca8; color: #7a5a00; font-size: 12px; padding: 6px 16px; text-align: center; }

/* ---------- attention + goals */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.alert + .alert { margin-top: 8px; }
.alert .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.alert.red .dot { background: var(--red); }
.alert.amber .dot { background: var(--amber); }
.alert.green .dot { background: var(--green); }
.alert .count { font-weight: 700; font-size: 15px; }
.alert .names { font-size: 12px; color: var(--muted); margin-top: 2px; }
.alert .names a { color: var(--muted); }
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goal { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.goal .n { font-size: 22px; font-weight: 700; }
.bar { height: 6px; border-radius: 999px; background: #edf1f6; overflow: hidden; margin: 8px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--teal); border-radius: 999px; }
.goal .row .btn { padding: 2px 9px; }

/* ---------- pipeline strip + funnel */
.strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.strip a { text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.strip a:hover { border-color: #c7d0dd; }
.strip .n { font-size: 20px; font-weight: 700; }
.strip .l { font-size: 12px; color: var(--muted); }
.funnel .step { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; padding: 5px 0; }
.funnel .track { height: 22px; background: #f0f3f8; border-radius: 6px; overflow: hidden; }
.funnel .track > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--navy-2)); border-radius: 6px; min-width: 2px; }
.funnel .num { text-align: right; font-weight: 700; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; max-width: 38px; background: var(--teal); border-radius: 5px 5px 0 0; min-height: 2px; }
.chart .col span { font-size: 11px; color: var(--muted); }
.chart .col b { font-size: 10px; color: var(--muted); font-weight: 500; }

/* ---------- lead page */
.lead-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 13px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- training + docs */
.modules { display: grid; gap: 10px; }
.module { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; text-decoration: none; color: inherit; }
.module:hover { border-color: #c7d0dd; }
.module .num { width: 30px; height: 30px; border-radius: 8px; background: #eef2f7; display: grid; place-items: center; font-weight: 700; color: var(--navy); font-size: 12px; flex: none; }
.module.done .num { background: var(--green-bg); color: var(--green); }
.module.locked { opacity: 0.55; pointer-events: none; }
.video { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: 10px; background: #0b1426; }
.video-empty { aspect-ratio: 16 / 9; border-radius: 10px; background: linear-gradient(135deg, #0a2350, #13306a); color: #cfe0ff; display: grid; place-items: center; text-align: center; padding: 20px; }
.prose { font-size: 14px; line-height: 1.65; }
.prose h1 { font-size: 22px; margin-bottom: 8px; }
.prose h2 { font-size: 16px; margin: 20px 0 6px; }
.prose ul { padding-left: 20px; }
.prose p { margin: 8px 0; white-space: pre-wrap; }
.quiz .q { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 10px; background: #fff; }
.quiz .opt { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink); font-size: 14px; margin: 6px 0 0; cursor: pointer; }
.quiz .opt input { width: auto; }
.quiz .why { font-size: 12px; margin-top: 6px; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.level { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.level.got { border-color: var(--teal); background: #f2fcfa; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }

/* ---------- suggestions, board */
.msg { white-space: pre-wrap; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; font-size: 13px; line-height: 1.55; }
.suggest { border-left: 4px solid var(--teal); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.board .col { background: #eef2f7; border-radius: 12px; padding: 10px; min-height: 200px; }
.board .col-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; text-decoration: none; color: inherit; font-size: 13px; }
.kcard:hover { border-color: #c7d0dd; }
.kcard .bad { color: var(--red); }
details.card summary { cursor: pointer; }

/* ---------- requirements, exceptions */
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 12px; }
.req { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; font-size: 13px; }
.req .tick { width: 20px; height: 20px; border-radius: 6px; border: 2px solid #c7d0dd; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.req.done { background: #f2fcfa; border-color: #b7e8dc; }
.req.done .tick { background: var(--green); border-color: var(--green); }
.exc { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.exc-rep { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.exc-rep ul { margin: 6px 0 8px; padding-left: 18px; font-size: 13px; }
.clock.brk { border-color: #c9d6ef; background: #f3f6fc; }
.clock.brk .dot { background: var(--navy-2); }

/* ---------- command centers, messaging, academy */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg a { padding: 6px 11px; font-size: 12px; font-weight: 500; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); white-space: nowrap; }
.seg a:last-child { border-right: 0; }
.seg a.on { background: var(--navy); color: #fff; }
.bell { position: relative; text-decoration: none; font-size: 18px; }
.bell .badge, .mrow .badge { font-size: 10px; background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; }
.bell .badge { position: absolute; top: -6px; right: -10px; }
.mrow { display: block; padding: 9px 10px; border-radius: 9px; color: inherit; text-decoration: none; border: 1px solid transparent; }
.mrow + .mrow { border-top-color: var(--line); border-radius: 0; }
.mrow:hover { background: #f8fafc; }
.mrow.unread { background: #f2f7ff; }
.mrow.on { background: #e6ecf7; }
.msgs { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.thread-list { padding: 8px; max-height: 70vh; overflow: auto; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow: auto; padding: 4px; }
.bubble { background: #f3f5f9; border-radius: 12px; padding: 9px 12px; max-width: 80%; font-size: 13px; }
.bubble + .bubble { margin-top: 6px; }
.bubble.me { background: #e6f7f3; align-self: flex-end; }
.bubble.urgent { border: 2px solid var(--red); }
.bubble.important { border: 2px solid var(--amber); }
.ann { border-left: 4px solid var(--navy); }
.ann.urgent { border-left-color: var(--red); background: var(--red-bg); }
.obj { font-size: 13px; padding: 6px 10px; border-radius: 8px; margin-top: 8px; }
.obj.bad { background: var(--red-bg); color: #8b2c2c; }
.obj.next { background: #eef2f7; }
.msg.obj.good { background: var(--green-bg); border-color: #b9e3cc; }
.academy > * + * { margin-top: 14px; }
.module.next { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(18, 196, 166, 0.15); }
.module.next .num { background: var(--teal); color: #04241f; }
.module.wait .num { background: var(--amber-bg); color: var(--amber); }
.cand { max-height: 45vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
@media (max-width: 900px) { .msgs { grid-template-columns: 1fr; } .strip { grid-template-columns: repeat(4, 1fr); } .kpis[style] { grid-template-columns: 1fr 1fr !important; } }

/* ---------- onboarding + finance */
.wiz { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.wiz-steps { position: sticky; top: 16px; }
.wstep { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 9px; color: inherit; text-decoration: none; margin-top: 4px; }
.wstep.on { background: #e6ecf7; }
.wstep .num { width: 28px; height: 28px; border-radius: 8px; background: #eef2f7; display: grid; place-items: center; font-weight: 700; color: var(--navy); font-size: 12px; flex: none; }
.steps-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
details.stmt { border-top: 1px solid var(--line); padding: 10px 0; }
details.stmt summary { cursor: pointer; }
@media (max-width: 900px) { .wiz { grid-template-columns: 1fr; } .wiz-steps { position: static; } }

/* ---------- reels calendar */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.cal-day { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; min-height: 78px; font-size: 13px; }
.cal-day.today { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(18, 196, 166, 0.2); }
.cal-day.done { background: #f2fcfa; }
.cal-day.held { background: var(--red-bg); }
video.reel { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; background: #0b1426; border-radius: 12px; display: block; margin: 8px 0; }
video.reel.sm { max-width: 180px; }

/* ---------- clock */
.clock { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; font-size: 13px; }
.clock .dot { width: 9px; height: 9px; border-radius: 50%; background: #b6c0cf; flex: none; }
.clock.on { border-color: #b7e8dc; background: #f2fcfa; }
.clock.on .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(31, 138, 91, 0.15); }

/* ---------- gate + toast + modal */
.gate { max-width: 720px; margin: 40px auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 50; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
.toast.err { background: var(--red); }
.modal-bg { position: fixed; inset: 0; background: rgba(10, 20, 40, 0.4); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 460px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.modal h2 { margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* ---------- public site */
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head .in, .site-main, .site-foot .in { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.site-head .in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-head nav a { margin-left: 18px; color: var(--ink); text-decoration: none; font-weight: 500; }
.hero { background: linear-gradient(135deg, var(--navy) 0%, #13306a 100%); color: #fff; padding: 72px 20px; }
.hero .in { max-width: 1000px; margin: 0 auto; }
.hero h1 { font-size: 42px; line-height: 1.1; max-width: 640px; }
.hero p { color: #cfdcf3; font-size: 17px; max-width: 580px; margin: 14px 0 26px; }
.site-main { padding: 48px 20px; }
.site-main .prose { max-width: 760px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 40px; }
.site-foot { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: 12px; color: var(--muted); }
.site-foot .in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); margin-right: 14px; }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
.notice.ok { background: var(--green-bg); color: var(--green); }
.notice.bad { background: var(--red-bg); color: var(--red); }
.login-box { max-width: 400px; margin: 70px auto; }
.google-btn { width: 100%; justify-content: center; padding: 11px; font-size: 15px; }
.hp { position: absolute; left: -5000px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .nav a { white-space: nowrap; flex: none; }
  .nav > .row { flex: none; margin: 0 6px 0 0 !important; }
  .nav .sep, .me { display: none; }
  .main { padding: 18px 16px 50px; }
  .kpis, .goals, .levels, .features { grid-template-columns: 1fr 1fr; }
  .cols, .cols.w21, .lead-grid, .grid2 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 30px; }
}
