:root {
  --navy: #1c2f52;
  --navy-2: #283f68;
  --gold: #c3c9d2;
  --bg: #f3f5f8;
  --card: #ffffff;
  --ink: #18212b;
  --muted: #5d6b7a;
  --line: #e1e6ec;
  --blue: #2563eb;
  --green: #15803d;
  --red: #b91c1c;
  --sidebar: var(--navy);
  --heading: var(--navy);
  --chart: var(--navy);
  --surface: #ffffff;
  --input-line: #cdd5df;
  --soft: #f8fafc;
  --soft-2: #eef2f7;
  --faint: #c3cbd5;
  --highlight: #fffbeb;
  --highlight-ink: #78350f;
  --champ: #fdf3d7;
  --info-bg: #eff6ff;
  --info-ink: #1e3a8a;
  --danger-bg: #fef2f2;
  --radius: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; font-weight: 700; line-height: 1.15; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: var(--sidebar); display: grid; place-items: center; font-weight: 800; }
.brand small { display: block; font-weight: 400; opacity: .7; font-size: 12px; }
.nav a { display: block; color: #d5deea; padding: 10px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.nav a.active { background: var(--gold); color: var(--sidebar); }
.sidebar .me { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid #ffffff22; font-size: 13px; }
.sidebar .me button { margin-top: 8px; }
.main { padding: 28px 32px 60px; max-width: 1200px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; }
  .brand { padding: 0; flex: 1 1 100%; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .sidebar .me { margin: 0; border: 0; padding: 0; }
  .main { padding: 20px 16px 48px; }
}

/* ---------- components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.stat .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

button, .btn {
  font: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { border-color: #b9c3cf; text-decoration: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--sidebar); }
.btn-danger { color: var(--red); }
.btn-ghost { background: transparent; border-color: #ffffff44; color: #fff; padding: 6px 12px; font-size: 13px; }
button:disabled { opacity: .55; cursor: wait; }

input, select, textarea {
  font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--input-line); border-radius: 7px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid #2563eb55; border-color: var(--blue); }
label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }
.form-grid .wide { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid .wide { grid-column: auto; } }
.field.extracted input, .field.extracted select { background: var(--highlight); border-color: #e7c66d; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--heading); font-weight: 700; margin: 6px 0 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 160px; }
.toolbar input[type="search"] { flex: 1 1 220px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--soft); }
tr.clickable { cursor: pointer; }
.table-wrap { overflow-x: auto; }
td.right, th.right { text-align: right; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-App { background: #e0ecff; color: #1d4ed8; }
.pill-Submitted { background: #ede9fe; color: #6d28d9; }
.pill-Approved { background: #fef3c7; color: #92400e; }
.pill-CTC { background: #dcfce7; color: #166534; }
.pill-Funded { background: #166534; color: #fff; }
.pill-Withdrawn, .pill-Denied { background: #f1f5f9; color: #64748b; }

/* ---------- upload ---------- */
.dropzone {
  border: 2px dashed #b6c2d1; border-radius: 12px; padding: 44px 20px; text-align: center; background: var(--surface); cursor: pointer; transition: .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--highlight); }
.dropzone strong { font-size: 17px; display: block; margin-bottom: 6px; }
.preview { max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--line); margin-top: 14px; }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--info-bg); color: var(--info-ink); font-size: 14px; margin-bottom: 16px; }
.notice.warn { background: var(--highlight); color: var(--highlight-ink); }
.notice.err { background: var(--danger-bg); color: var(--red); }
.spinner { width: 18px; height: 18px; border: 3px solid #fff6; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--soft-2); border-top-color: var(--heading); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- profile ---------- */
.profile-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 20px; }
.kv div > span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kv div b { font-weight: 600; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.stepper button { font-size: 13px; padding: 7px 12px; }
.stepper button.done { background: #dcfce7; border-color: #86efac; color: #166534; }
.stepper button.current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- leaderboard ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 8px 14px; font-weight: 600; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--navy); color: #fff; }
.rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--soft-2); color: var(--muted); }
.rank.r1 { background: #f5d77a; color: #6b4e00; }
.rank.r2 { background: #dfe4ea; color: #3c4652; }
.rank.r3 { background: #ecc39b; color: #6b3b10; }
.bar { height: 8px; background: var(--soft-2); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
tr.me-row { background: var(--highlight); }
.lender-row { display: grid; grid-template-columns: 180px 1fr 110px; gap: 12px; align-items: center; padding: 7px 0; }
@media (max-width: 520px) { .lender-row { grid-template-columns: 110px 1fr 70px; font-size: 13px; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--sidebar) 0%, #000000 160%); }
.login { width: 100%; max-width: 380px; background: var(--card); border-radius: 14px; padding: 32px 28px; box-shadow: 0 20px 50px #0005; }
.login .brand { color: var(--heading); padding: 0 0 22px; }
.login form { display: grid; gap: 14px; }

/* ---------- upgrade: dashboard, alerts, notes, admin ---------- */
.dash-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .dash-2 { grid-template-columns: 1fr; } }
.top5-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); border-radius: 6px; }
.top5-row:last-child { border-bottom: 0; }
.alert-list { display: grid; gap: 8px; }
.alert-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--ink); border-left: 4px solid var(--faint); background: var(--soft); }
.alert-row:hover { text-decoration: none; background: var(--soft-2); }
.alert-row.sev-2 { border-left-color: #f59e0b; background: var(--highlight); }
.alert-row.sev-3 { border-left-color: var(--red); background: var(--danger-bg); }
.note { padding: 10px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.month-grid td, .month-grid th { padding: 8px 8px; text-align: right; }
.month-grid td:first-child, .month-grid th:first-child { text-align: left; position: sticky; left: 0; background: var(--card); }
.month-grid td.champ { background: var(--champ); font-weight: 800; color: var(--highlight-ink); }
.month-grid tfoot td { font-size: 12px; color: var(--muted); border-bottom: 0; }
.month-grid td.zero { color: var(--faint); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.chart .col i { display: block; width: 100%; max-width: 38px; background: var(--chart); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col.now i { background: var(--gold); }
.chart .col span { font-size: 11px; color: var(--muted); }
.chart .col b { font-size: 11px; font-weight: 600; }
.inline-input { width: 90px; padding: 6px 8px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }
.tag.superadmin { background: #0f2c4c; color: #fff; }
.tag.director { background: #fdf3d7; color: #6b4e00; }
tr.inactive td { opacity: .5; }

.announce { background: var(--navy); color: #fff; border-left: 5px solid var(--gold); padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; white-space: pre-wrap; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 8px; transition: .25s; opacity: 0; z-index: 50; max-width: calc(100% - 32px); }
#toast.show { transform: translateX(-50%); opacity: 1; }
#toast.err { background: var(--red); }
#toast:not(.show) { pointer-events: none; } /* a hidden toast must not block clicks on whatever is under it (the dock) */
.empty { text-align: center; padding: 36px 12px; color: var(--muted); }

/* ---------- phones & small tablets: sidebar folds into a sticky top bar with a ☰ Menu button ---------- */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .sidebar { position: sticky; top: 0; z-index: 40; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; }
  .sidebar .me-card { margin: 0; flex: 1 1 0; min-width: 0; padding: 6px 8px; }
  .sidebar .brand-logo img { max-width: 96px; }
  /* filter bars become a tidy 2-column grid instead of uneven stacked boxes */
  .toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
  .toolbar input, .toolbar select { min-width: 0; width: 100% !important; } /* beats the inline width:auto on a few filters */
  .toolbar input[type="search"], .toolbar .wide-filter { grid-column: 1 / -1; }
  .sidebar .me-card > span:last-child { min-width: 0; overflow: hidden; }
  .sidebar .me-card b, .sidebar .me-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; background: #ffffff1f; color: #fff; border: 1px solid #ffffff33; font-weight: 700; }
  .nav-toggle:hover { background: #ffffff2e; }
  .sidebar:not(.open) .nav, .sidebar:not(.open) .me { display: none; }
  .sidebar.open .nav { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 4px;
    max-height: calc(100vh - 150px); overflow-y: auto; overscroll-behavior: contain; padding-top: 6px; border-top: 1px solid #ffffff22; }
  .sidebar.open .nav .subnav { grid-column: 1 / -1; }
  .sidebar.open .me { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .sidebar.open .me .layout-label { flex: 1 1 100%; }
  .sidebar.open .me button { margin-top: 0; }
}

/* ---------- layout fixes (phone width, wrapping) ---------- */
.main, .card, .stat, .dash-2 > *, .grid > * { min-width: 0; }
@media (max-width: 820px) { .shell { grid-template-columns: minmax(0, 1fr); } }
td.num, th { white-space: nowrap; }
.tag { white-space: nowrap; display: inline-block; }
td .tag.below { display: table; margin-top: 3px; }
.month-grid tfoot td { white-space: nowrap; font-size: 11px; }
.month-grid th, .month-grid td { min-width: 44px; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr 1fr; gap: 12px 14px; } .kv div b { word-break: break-word; } }
.tag.source { background: #e0ecff; color: #1d4ed8; }

/* ---------- color schemes (html[data-theme]) ---------- */
html[data-theme="emerald"] { --navy: #0f3d2e; --navy-2: #175440; --gold: #d4b062; --bg: #f3f7f5; --line: #dfe8e3; }
html[data-theme="royal"] { --navy: #27306b; --navy-2: #343f87; --gold: #8fb3ff; --bg: #f4f5fb; --line: #e1e4f0; --blue: #3b4fd8; }
html[data-theme="burgundy"] { --navy: #5a1a2c; --navy-2: #72263b; --gold: #d9a85b; --bg: #f8f4f5; --line: #ece2e4; }
html[data-theme="charcoal"] { --navy: #1f2937; --navy-2: #374151; --gold: #f59e0b; --bg: #f5f5f4; --line: #e5e5e3; }
html[data-theme="midnight"] {
  color-scheme: dark;
  --navy: #2f5d9a; --navy-2: #3b6db0; --gold: #d6a645; --sidebar: #0a0f16; --heading: #9cc2f2; --chart: #5b8fd4;
  --bg: #0f141b; --card: #161d27; --surface: #1c2430; --ink: #e6ebf1; --muted: #98a6b6; --line: #2a3442;
  --input-line: #364152; --soft: #1c2430; --soft-2: #253041; --faint: #4a5668; --blue: #7fb0ff; --green: #4ade80; --red: #f87171;
  --highlight: #33290f; --highlight-ink: #fcd34d; --champ: #4a3a10; --info-bg: #142640; --info-ink: #bcd6ff; --danger-bg: #3a1618;
}
html[data-theme="midnight"] .stepper button.done { background: #14361f; border-color: #1f6b3a; color: #86efac; }
html[data-theme="midnight"] .rank.r1 { background: #6b5310; color: #fde68a; }
html[data-theme="midnight"] .rank.r2 { background: #3a4452; color: #e5e7eb; }
html[data-theme="midnight"] .rank.r3 { background: #5c3a1c; color: #fed7aa; }
html[data-theme="midnight"] .pill-Withdrawn, html[data-theme="midnight"] .pill-Denied { background: #2a3442; color: #b6c2d1; }

/* theme picker */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.swatch { display: block; text-align: left; padding: 0; overflow: hidden; border: 2px solid var(--line); border-radius: 10px; background: var(--card); width: 100%; }
.swatch:hover { border-color: var(--faint); }
.swatch.on { border-color: var(--blue); box-shadow: 0 0 0 3px #3b82f633; }
.swatch .chips { display: flex; height: 46px; }
.swatch .chips i { flex: 1; }
.swatch span { display: block; padding: 8px 10px; font-size: 13px; }

/* new-client choice cards */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
@media (max-width: 700px) { .choice-grid { grid-template-columns: 1fr; } }
.choice { display: block; text-align: left; width: 100%; padding: 18px 20px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.choice:hover { border-color: var(--gold); }
.choice.on { border-color: var(--gold); background: var(--highlight); }
.choice b { display: block; font-size: 17px; margin-bottom: 4px; }
.choice small { color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---------- team draft ---------- */
.draft-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.draft-col { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px; min-height: 120px; }
.draft-col.mine { border-color: var(--gold); }
.draft-col.over { border-style: dashed; border-color: var(--blue); background: var(--info-bg); }
.draft-col[data-droppable="false"] { opacity: .85; }
.draft-col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.draft-card { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 6px; cursor: grab; }
.draft-card input { width: auto; }
.draft-card.locked { cursor: not-allowed; opacity: .6; }
.draft-card.dragging { opacity: .4; }

/* notification badge + tab links */
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-align: center; margin-left: 4px; }
.seg a.btn { border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 8px 14px; background: transparent; }
.seg a.btn:last-child { border-right: 0; }
.seg a.btn.on { background: var(--navy); color: #fff; }
.badge[hidden] { display: none; }
.draft-board { grid-template-columns: minmax(230px, 280px) 1fr; }
.draft-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 700px) { .draft-board { grid-template-columns: 1fr; } }

/* ---------- logo ---------- */
html[data-theme="navygold"] { --navy: #0f2c4c; --navy-2: #173b63; --gold: #d6a645; --bg: #f4f6f9; }
.brand-logo { display: block; background: #fff; border-radius: 12px; padding: 10px 14px; margin: 0 2px 18px; box-shadow: 0 2px 10px #0003; }
.brand-logo img { display: block; width: 100%; max-width: 170px; height: auto; margin: 0 auto; }
.brand-logo:hover { text-decoration: none; box-shadow: 0 2px 14px #0005; }
.login-logo { display: block; width: 230px; max-width: 80%; height: auto; margin: 0 auto 6px; }
.login-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.login { border-top: 5px solid var(--navy); }
@media (max-width: 820px) {
  .brand-logo { margin: 0; padding: 6px 10px; flex: 0 0 auto; }
  .brand-logo img { max-width: 110px; }
}
/* Default (logo) scheme: brushed-silver accent buttons so they don't read as disabled */
html:not([data-theme]) .btn-gold, html[data-theme="classic"] .btn-gold {
  background: linear-gradient(180deg, #f1f3f6 0%, #c9cfd8 100%); border-color: #9aa3b0; color: var(--navy); box-shadow: 0 1px 0 #fff inset, 0 1px 2px #0002;
}
html:not([data-theme]) .btn-gold:hover, html[data-theme="classic"] .btn-gold:hover { background: linear-gradient(180deg, #ffffff 0%, #d5dae1 100%); }

/* ---------- sidebar sub-menus ---------- */
.subnav { display: grid; gap: 1px; margin: 4px 0 8px 10px; padding-left: 8px; border-left: 2px solid #ffffff2a; }
.nav a.sub { padding: 6px 10px; font-size: 13.5px; font-weight: 500; color: #c6d0dd; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.nav a.sub.active { background: #ffffff1f; color: #fff; }
.sub-count { font-size: 11px; opacity: .75; font-weight: 600; }
.sub-count.due { color: #fecaca; opacity: 1; }
@media (max-width: 820px) { .subnav { display: flex; flex-wrap: wrap; flex-basis: 100%; border: 0; margin: 2px 0 6px; padding: 0; } }

/* ---------- client categories ---------- */
.tag.cat-Hotlist { background: #fee2e2; color: #b91c1c; }
.tag.cat-FollowUp { background: #e0f2fe; color: #0369a1; }
.tag.cat-Nurture { background: #dcfce7; color: #166534; }
.tag.due { background: #fee2e2; color: #b91c1c; }
html[data-theme="midnight"] .tag.cat-Hotlist, html[data-theme="midnight"] .tag.due { background: #3a1618; color: #fca5a5; }
html[data-theme="midnight"] .tag.cat-FollowUp { background: #0c2a3d; color: #7dd3fc; }
html[data-theme="midnight"] .tag.cat-Nurture { background: #14361f; color: #86efac; }
.draft-col-head .rename { padding: 2px 6px; font-size: 12px; margin-left: 4px; }

/* ---------- company chart: org tree ---------- */
.org-scroll { overflow-x: auto; padding-bottom: 8px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org-tree ul { padding-top: 22px; position: relative; }
.org-tree li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org-tree > li { padding-top: 0; }
.org-tree li::before, .org-tree li::after { content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--faint); }
.org-tree li::before { right: 50%; }
.org-tree li::after { left: 50%; border-left: 2px solid var(--faint); }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:only-child { padding-top: 0; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0; }
.org-tree li:last-child::before { border-right: 2px solid var(--faint); border-radius: 0 6px 0 0; }
.org-tree li:first-child::after { border-radius: 6px 0 0 0; }
.org-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--faint); }
.org-tree > li > .org-node::after { display: none; }
.org-node { background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: 9px 14px; text-align: center; min-width: 150px; box-shadow: 0 1px 3px #0001; }
.org-node.role-superadmin { border-color: var(--navy); background: var(--navy); color: #fff; }
.org-node.role-superadmin .org-role { color: #dbe3ee; }
.org-node.role-owner { border-color: var(--gold); }
.org-node.role-director { border-color: var(--chart); }
.org-node.me { box-shadow: 0 0 0 3px #3b82f655; }
.org-name { font-weight: 700; white-space: nowrap; }
.org-role { font-size: 12px; color: var(--muted); white-space: nowrap; }
.org-team { display: flex; flex-direction: column; gap: 4px; background: var(--soft); border: 1px dashed var(--faint); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
.org-team.loose { flex-direction: row; flex-wrap: wrap; white-space: normal; }
.org-team .me { font-weight: 800; color: var(--blue); }

/* ---------- company chart: spiderweb ---------- */
.org-web { width: 100%; max-width: 860px; display: block; margin: 0 auto; }
.org-web .ring { fill: none; stroke: var(--line); stroke-dasharray: 4 6; }
.org-web line { stroke: var(--faint); stroke-width: 2; }
.org-web line.thin { stroke-width: 1; opacity: .7; }
.org-web .dot circle { fill: var(--surface); stroke: var(--chart); stroke-width: 2.5; }
.org-web .dot.role-superadmin circle { fill: var(--navy); stroke: var(--navy); }
.org-web .dot.role-owner circle { fill: var(--gold); stroke: var(--navy); }
.org-web .dot.role-director circle { fill: var(--chart); }
.org-web .dot.role-banker circle { fill: var(--surface); stroke: var(--faint); stroke-width: 1.5; }
.org-web .dot.me circle { stroke: var(--blue); stroke-width: 4; }
.org-web text { font-size: 11px; fill: var(--muted); font-family: inherit; }
.org-web text.big { font-size: 13px; font-weight: 700; fill: var(--ink); }
.org-web text.sub { font-size: 11px; fill: var(--muted); font-style: italic; }

/* ---------- funded celebration pop-up ---------- */
.celebrate { position: fixed; inset: 0; background: #0b1424aa; display: grid; place-items: center; z-index: 90; padding: 16px; animation: cel-fade .2s ease-out; }
.cel-card { position: relative; width: 100%; max-width: 420px; background: var(--card); color: var(--ink); border-radius: 18px; padding: 26px 24px 20px; text-align: center;
  box-shadow: 0 30px 80px #0007; border-top: 6px solid var(--navy); animation: cel-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.cel-x { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; font-size: 16px; padding: 4px 8px; color: var(--muted); }
.cel-top { font-size: 26px; font-weight: 900; letter-spacing: .04em; color: var(--heading); }
.cel-who { color: var(--muted); margin: 4px 0 16px; }
.cel-label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.cel-amount { font-size: 46px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.1; margin: 2px 0; }
.cel-math { font-size: 13px; color: var(--muted); }
.cel-cut { margin-top: 8px; font-size: 14px; }
.cel-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 16px 0 4px; }
.cel-chip { background: var(--soft-2); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; }
.cel-chip.gold { background: #fde68a; color: #6b4e00; }
.cel-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
@keyframes cel-pop { from { transform: scale(.6) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cel-fade { from { opacity: 0; } }
#toast { z-index: 120; }
/* collapsible sub-menus */
.nav-row { display: flex; align-items: center; gap: 2px; }
.nav-row > a { flex: 1; }
.nav-caret { background: transparent; border: 0; color: #c6d0dd; padding: 6px 9px; font-size: 13px; border-radius: 6px; }
.nav-caret:hover { background: #ffffff1a; color: #fff; }
.subnav[hidden] { display: none; }
@media (max-width: 820px) { .nav-row { display: inline-flex; } }
/* chart fixes: org tree scrolls instead of clipping; spiderweb pool line */
.org-tree { width: max-content; min-width: 100%; }
.org-web line.dashed { stroke-dasharray: 5 5; }
.org-web .dot.role-pool circle { fill: var(--soft-2); stroke: var(--faint); }

/* ---------- personalization ---------- */
.me-card { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: -6px 0 14px; border-radius: 10px; background: #ffffff14; color: #fff; }
.me-card:hover { background: #ffffff24; text-decoration: none; }
.me-card b { display: block; font-size: 14px; line-height: 1.2; }
.me-card small { display: block; font-size: 11.5px; opacity: .75; }
.avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, #f1f3f6, #b9c0ca); color: var(--navy); box-shadow: 0 0 0 2px #ffffff55; }
@media (max-width: 820px) { .me-card { margin: 0; padding: 6px 8px; } .me-card small { display: none; } }
.login-hello { text-align: center; font-size: 20px; font-weight: 800; color: var(--heading); margin-top: 4px; }

.plan { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 1000px) { .plan { grid-template-columns: 1fr; } }
.plan-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.plan-col.side { border-top: 4px solid var(--navy); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan-box { min-width: 0; }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.plan-head a { font-size: 13px; }
.plan-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; color: var(--ink); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.plan-row:hover { background: var(--soft); text-decoration: none; }
.plan-row > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row .right { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.plan-empty { font-size: 13px; padding: 6px 2px; }
.goal { margin-bottom: 12px; }
.goal-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.bar.big { height: 12px; }
.bar.big i { background: linear-gradient(90deg, var(--green), #4ade80); }
.goal-pct { font-size: 12px; margin-top: 3px; }
.tips { display: grid; gap: 8px; }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border-radius: 9px; background: var(--info-bg); color: var(--info-ink); font-size: 13px; line-height: 1.4; }
.tip.good { background: #dcfce7; color: #166534; }
html[data-theme="midnight"] .tip.good { background: #14361f; color: #86efac; }
a.tip:hover { text-decoration: none; filter: brightness(.97); }
.tip > span:first-child { font-size: 16px; line-height: 1.2; }
.plan { align-items: start; }
.cel-streak { margin: 14px auto 0; padding: 8px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 14px; max-width: 340px; }
html[data-theme="midnight"] .cel-streak { background: #3a2410; color: #fdba74; }
.cel-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.cel-totals > div { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.cel-totals span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.cel-totals b { display: block; font-size: 19px; color: var(--green); font-variant-numeric: tabular-nums; }
.cel-totals small { color: var(--muted); font-size: 12px; }
.setup-note { color: #dbe3ee; font-size: 13px; padding: 10px 12px; background: #ffffff14; border-radius: 8px; }

/* incentive commission slider */
.comp-slider { margin: 12px auto 0; max-width: 340px; text-align: left; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px 6px; }
.comp-slider-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.comp-slider-top b { color: var(--green); font-size: 15px; }
.comp-slider input[type="range"] { width: 100%; padding: 0; border: 0; background: transparent; accent-color: var(--green); margin: 6px 0 0; cursor: pointer; }
.comp-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

/* ---------- company chart: banker cards ---------- */
.roster { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 230px; box-shadow: 0 4px 14px #0f2c4c12; }
.roster-head { display: flex; flex-direction: column; align-items: center; padding: 2px 6px 9px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.roster-head b { font-size: 13.5px; color: var(--heading); }
.roster-head span { font-size: 11.5px; color: var(--muted); }
.roster-list { display: flex; flex-direction: column; gap: 6px; }
.roster-list.loose { flex-direction: row; flex-wrap: wrap; }
.roster-list.loose .bk-card { width: 230px; }
.bk-card { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform .12s, box-shadow .12s, border-color .12s; text-align: left; }
a.bk-card[href]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #0f2c4c22; border-color: var(--faint); text-decoration: none; }
.bk-card.me { border-color: var(--blue); box-shadow: 0 0 0 2px #3b82f633; }
.bk-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 62% 52%), hsl(calc(var(--h) + 40) 58% 38%)); box-shadow: 0 2px 6px #0003, inset 0 0 0 2px #ffffff40; }
.bk-body { display: flex; flex-direction: column; min-width: 0; }
.bk-name { font-weight: 700; font-size: 13px; white-space: nowrap; }
.bk-name em { font-style: normal; font-weight: 500; color: var(--blue); }
.bk-stats { display: flex; gap: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- leads + payroll ---------- */
.pill-Lead { background: #f3e8ff; color: #7e22ce; }
html[data-theme="midnight"] .pill-Lead { background: #2e1a47; color: #d8b4fe; }
.pay-run { border-left: 5px solid var(--line); }
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pay-total { font-size: 24px; font-weight: 900; color: var(--green); font-variant-numeric: tabular-nums; }
.pay-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-steps span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }
.pay-steps .done { background: #dcfce7; color: #166534; }
.pay-steps .now { background: #fef3c7; color: #92400e; font-weight: 700; }
.pay-steps .no { background: var(--danger-bg); color: var(--red); }
.pay-steps .skip { opacity: .5; text-decoration: line-through; }
html[data-theme="midnight"] .pay-steps .done { background: #14361f; color: #86efac; }
html[data-theme="midnight"] .pay-steps .now { background: #3a2f12; color: #fcd34d; }
.pay-note { font-size: 13px; background: var(--soft); border-radius: 8px; padding: 7px 10px; margin-bottom: 8px; }
.pay-line { margin-bottom: 8px; }
/* lender portal links */
.lender-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin: -4px 0 16px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
.portal-link { text-decoration: none; font-size: 13px; padding: 1px 4px; border-radius: 5px; }
.portal-link:hover { background: var(--soft-2); text-decoration: none; }

/* =================== layouts: page transition =================== */
.page-enter { animation: page-in .38s cubic-bezier(.2, .8, .2, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(14px) scale(.995); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
html.calm .page-enter { animation: none; }

/* layout switcher (sidebar footer + top/dock header) */
.layout-switch { display: inline-flex; background: #ffffff14; border-radius: 9px; padding: 3px; gap: 2px; margin-bottom: 10px; }
.layout-switch button { border: 0; background: transparent; color: #c6d0dd; padding: 5px 8px; font-size: 13px; border-radius: 7px; gap: 4px; }
.layout-switch button span { display: none; }
.layout-switch button:hover { background: #ffffff1f; color: #fff; }
.layout-switch button.on { background: var(--gold); color: var(--sidebar); }

/* =================== top bar =================== */
.shell.layout-top, .shell.layout-dock { display: block; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 8px 18px; background: var(--sidebar);
  box-shadow: 0 6px 24px #0b142433; }
.tb-logo { flex: 0 0 auto; background: #fff; border-radius: 9px; padding: 4px 8px; display: block; }
.tb-logo img { display: block; height: 38px; width: auto; }
.tb-nav { position: relative; display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; }
.tb-cursor { position: absolute; bottom: -8px; height: 4px; border-radius: 4px 4px 0 0; background: var(--gold); box-shadow: 0 0 14px var(--gold);
  transition: left .32s cubic-bezier(.3, 1.4, .5, 1), width .32s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; opacity: 0; pointer-events: none; }
.tb-item { position: relative; }
.tb-item > a { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-radius: 9px; color: #d5deea; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .2s, color .2s; }
.tb-item > a:hover, .tb-item:focus-within > a { background: #ffffff1a; color: #fff; text-decoration: none; }
.tb-item.active > a { color: #fff; background: #ffffff24; }
.tb-icon { font-size: 16px; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tb-item > a:hover .tb-icon { transform: scale(1.25) rotate(-6deg); }
/* labels: always shown for the current page; others slide open on hover */
.tb-label { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .3s ease, opacity .25s ease; }
.tb-item.active .tb-label, .tb-item:hover .tb-label, .tb-item:focus-within .tb-label { max-width: 170px; opacity: 1; }
.tb-caret { font-size: 10px; opacity: .6; }
.tb-drop { position: absolute; top: calc(100% + 10px); left: 0; min-width: 230px; padding: 8px; border-radius: 12px; background: var(--sidebar);
  box-shadow: 0 18px 40px #0b142455; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .18s, transform .18s; z-index: 50; }
.tb-drop::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; } /* hover bridge */
.tb-item:hover .tb-drop, .tb-item:focus-within .tb-drop { opacity: 1; transform: none; pointer-events: auto; }
.tb-drop a.sub { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d5deea; font-size: 13.5px; }
.tb-drop a.sub:hover { background: #ffffff1a; color: #fff; text-decoration: none; }
.tb-drop a.sub.active { background: var(--gold); color: var(--sidebar); }
.tb-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; }
.tb-right .layout-switch { margin: 0; }
.tb-right .me-card { margin: 0; padding: 4px 10px 4px 4px; }
.tb-right .me-card small { display: none; }
.tb-out { background: transparent; border: 1px solid #ffffff33; color: #fff; padding: 7px 10px; }
.tb-out:hover { background: #ffffff1a; }
.layout-top .main, .layout-dock .main { max-width: 1280px; margin: 0 auto; }
@media (max-width: 1250px) { .tb-right .me-card b { display: none; } }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  .tb-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tb-nav::-webkit-scrollbar { display: none; }
  .tb-cursor { display: none; }
  .tb-drop, .tb-caret { display: none; } /* no hover on touch screens: the icons just open the page */
}
/* phones: one compact header row, swipeable icon row underneath */
@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 6px 10px; }
  .tb-logo { padding: 3px 6px; }
  .tb-logo img { height: 28px; }
  .tb-right { gap: 6px; }
  .tb-right .layout-switch button { padding: 4px 6px; }
  .tb-out { padding: 6px 8px; font-size: 13px; }
  .tb-item > a { padding: 10px 11px; }
  .tb-icon { font-size: 18px; }
}

/* =================== dock =================== */
.dockhead { justify-content: space-between; }
.dh-where { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .02em; flex: 1; text-align: center; }
.layout-dock .main { padding-bottom: 140px; }
/* Every button always shows its name. Sections with sub-pages open a list on hover; the list sits flush on the
   button (its transparent bottom padding is the bridge) and lingers briefly so a wobbly mouse doesn't lose it. */
.dock-bar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 45; display: flex; align-items: stretch; gap: 2px;
  padding: 6px; border-radius: 18px; background: var(--sidebar); box-shadow: 0 14px 40px #0b142455, inset 0 0 0 1px #ffffff1a;
  max-width: calc(100vw - 24px); }
.dk-item { position: relative; flex: 0 0 auto; display: flex; }
.dk-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 64px; padding: 7px 6px 6px;
  border-radius: 13px; color: #c6d0dd; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.dk-item:hover .dk-link, .dk-link:focus-visible { background: #ffffff1a; color: #fff; text-decoration: none; transform: translateY(-2px); }
.dk-link:active { transform: translateY(0) scale(.97); }
.dk-item.active .dk-link { background: var(--gold); color: var(--sidebar); }
.dk-icon { position: relative; font-size: 21px; line-height: 1; }
.dk-icon .badge { position: absolute; top: -6px; right: -12px; margin: 0; }
.dk-label { font-size: 11.5px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.dk-pop { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 12px; z-index: 2;
  visibility: hidden; opacity: 0; transition: opacity .15s .25s, visibility 0s .4s; }
.dk-item:hover .dk-pop, .dk-item:focus-within .dk-pop { visibility: visible; opacity: 1; transition: opacity .15s, visibility 0s; z-index: 3; }
.dk-pop-inner { min-width: 230px; padding: 8px; border-radius: 14px; background: var(--sidebar); box-shadow: 0 18px 40px #0b142466, inset 0 0 0 1px #ffffff1a; }
.dk-pop-title { padding: 4px 10px 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.dk-pop a.sub { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d5deea; font-size: 13.5px; text-decoration: none; }
.dk-pop a.sub:hover { background: #ffffff1a; color: #fff; }
.dk-pop a.sub.active { background: var(--gold); color: var(--sidebar); }
/* mid-size screens: slimmer buttons so every item (Coaching is the last one) still fits */
@media (max-width: 1100px) {
  .dk-link { min-width: 48px; padding: 7px 3px 6px; }
  .dk-label { font-size: 10px; }
}
@media (max-width: 820px) {
  .dock-bar { left: 8px; right: 8px; transform: none; bottom: 8px; max-width: none; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .dk-pop { display: none; } /* phones: no hover, so the buttons just open the page (its own filters are on the page) */
  .dk-link { min-width: 58px; }
  .dh-where { display: none; }
}
/* keep toasts above the dock */
body:has(.layout-dock) #toast { bottom: 112px; }
.tb-out { font-size: 13px; font-weight: 600; }
/* clearer layout picker in the sidebar, dashboard tip, update bar */
.sidebar .layout-switch { display: flex; width: 100%; }
.sidebar .layout-switch button { flex: 1; justify-content: center; font-size: 12px; padding: 6px 4px; }
.sidebar .layout-switch button span { display: inline; }
.layout-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #c6d0dd; opacity: .8; margin-bottom: 4px; }
.layout-tip { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border-radius: 12px;
  background: linear-gradient(120deg, var(--info-bg), var(--card)); border: 1px solid var(--line); border-left: 5px solid var(--blue); }
#update-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; gap: 12px; align-items: center;
  background: var(--navy); color: #fff; padding: 10px 14px 10px 18px; border-radius: 12px; box-shadow: 0 12px 30px #0006; font-weight: 600; }
#update-bar button { background: var(--gold); color: var(--sidebar); border: 0; }

/* =================== games =================== */
.game-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.game-tabs button { border-radius: 999px; }
.game-tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.game-area { display: flex; flex-direction: column; align-items: center; }
.game-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.game-status { font-weight: 700; margin-bottom: 12px; min-height: 22px; text-align: center; }
.game-status.big { font-size: 20px; color: var(--heading); }

.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(480px, 92vw); aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px #0f2c4c33; }
.chess-board .sq { border: 0; border-radius: 0; padding: 0; display: grid; place-items: center; position: relative; aspect-ratio: 1; }
.chess-board .sq.light { background: #eef1f5; }
.chess-board .sq.dark { background: #8796ab; }
.chess-board .sq.last { box-shadow: inset 0 0 0 100px #f5d77a66; }
.chess-board .sq.sel { box-shadow: inset 0 0 0 4px var(--gold); }
.chess-board .sq.check { box-shadow: inset 0 0 0 100px #ef444466; }
.chess-board .sq.dot::after { content: ''; width: 26%; height: 26%; border-radius: 50%; background: #0f2c4c55; }
.chess-board .sq.hit { box-shadow: inset 0 0 0 4px #ef4444aa; }
.chess-board .pc { font-size: min(46px, 9vw); line-height: 1; transition: transform .12s; }
.chess-board .pc.w { color: #fff; text-shadow: 0 0 2px #000, 0 1px 3px #0009; }
.chess-board .pc.b { color: #111827; text-shadow: 0 1px 2px #fff6; }
.chess-board .sq:hover .pc { transform: scale(1.1); }

.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(320px, 86vw); }
.ttt-cell { aspect-ratio: 1; font-size: 46px; justify-content: center; border-radius: 14px; }
.ttt-cell.win { background: #dcfce7; border-color: #86efac; }

.four-board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px; background: var(--navy); border-radius: 14px; width: min(460px, 92vw); }
.four-cell { aspect-ratio: 1; border-radius: 50%; padding: 0; background: var(--bg); border: 0; transition: transform .15s; }
.four-cell:hover { transform: scale(1.06); }
.four-cell.red { background: radial-gradient(circle at 35% 35%, #fb7185, #dc2626); }
.four-cell.yellow { background: radial-gradient(circle at 35% 35%, #fde68a, #eab308); }
.four-cell.win { box-shadow: 0 0 0 4px #fff, 0 0 18px #fff; }

.snake-wrap { position: relative; width: min(400px, 92vw); }
.snake-wrap canvas { width: 100%; height: auto; border-radius: 12px; border: 2px solid var(--line); display: block; touch-action: none; }
.snake-msg { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--heading); background: #ffffffaa; border-radius: 12px; text-align: center; padding: 20px; }
.snake-msg[hidden] { display: none; }

.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(420px, 92vw); perspective: 800px; }
.mem-card { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: transparent; transform-style: preserve-3d; transition: transform .35s; }
.mem-card.up { transform: rotateY(180deg); }
.mem-card span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; }
.mem-card .back { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: var(--gold); font-size: 26px; font-weight: 900; }
.mem-card .front { background: var(--surface); border: 2px solid var(--line); font-size: 38px; transform: rotateY(180deg); }
.mem-card.got .front { border-color: #86efac; background: #f0fdf4; }

/* =================== sign-in scene =================== */
.login-wrap.scene { position: relative; overflow: hidden; background: #0b1a38; grid-template-rows: auto auto; align-content: center; gap: 22px; }
#login-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.login-hero { position: relative; text-align: center; color: #fff; text-shadow: 0 4px 24px #0009; pointer-events: none; }
.hero-title { font-size: clamp(30px, 5vw, 58px); font-weight: 900; letter-spacing: .04em; line-height: 1.05; }
.hero-title span { display: inline; font-size: 1em; letter-spacing: .02em; font-weight: 900; color: #f3d27a; margin: 0; }
.hero-tag { margin-top: 12px; font-size: 16px; color: #f5d77a; transition: opacity .4s, transform .4s; }
.hero-tag.out { opacity: 0; transform: translateY(6px); }
.login.glass { position: relative; background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid #ffffff99;
  box-shadow: 0 30px 80px #0008; transition: transform .25s ease-out; justify-self: center; }
html[data-theme="midnight"] .login.glass { background: rgba(22, 29, 39, .85); border-color: #ffffff22; }
.scene-hint { position: absolute; bottom: 12px; right: 16px; color: #ffffffcc; font-size: 12px; pointer-events: none; text-shadow: 0 1px 6px #000a; }
@media (max-width: 600px) { .login-hero { margin-top: 10px; } .hero-tag { font-size: 14px; } .scene-hint { display: none; } }

/* =================== signature =================== */
.credit { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 0; padding: 4px 6px; font-size: 11.5px; font-weight: 500;
  letter-spacing: .03em; color: inherit; opacity: .55; cursor: pointer; transition: opacity .2s; }
.credit:hover { opacity: 1; }
.credit b { font-weight: 800; letter-spacing: .06em; }
.credit-mark { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font-size: 10px; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #f5d77a); color: var(--sidebar); transition: transform .3s; }
.credit:hover .credit-mark { transform: rotate(-8deg) scale(1.12); }
.sidebar .credit { color: #c6d0dd; margin-top: 10px; padding-left: 0; }
.credit-row { display: flex; justify-content: center; margin-top: 28px; color: var(--muted); }
.login-wrap.scene > .credit { position: absolute; left: 14px; bottom: 10px; color: #fff; opacity: .85; text-shadow: 0 1px 6px #000a; z-index: 2; }
.login-wrap.scene > .credit:hover { opacity: 1; }

/* ---- Games: groups, puzzles, play-money casino ---- */
.game-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.game-group-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); min-width: 150px; }
.game-group .game-tabs { margin: 0; }
.pay-note-small { font-size: 12px; text-align: center; margin-top: 8px; }

.bucks { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 10px; background: var(--soft-2, #eef2f6); }
.bucks b { font-size: 17px; }
.chips-row { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { width: 46px; height: 46px; border-radius: 50%; padding: 0; font-weight: 800; font-size: 13px; color: #fff; background: #2f6fd1; border: 3px dashed #ffffffaa; box-shadow: 0 2px 0 #0003; transition: transform .12s; }
.chip:nth-child(2) { background: #c0262d; } .chip:nth-child(3) { background: #15803d; } .chip:nth-child(4) { background: #14181f; } .chip:nth-child(5) { background: #7c3aed; }
.chip:hover { transform: translateY(-2px); }
.chip.on { outline: 3px solid var(--gold, #d4b062); outline-offset: 2px; transform: translateY(-3px); }

.felt { background: radial-gradient(ellipse at center, #1b7a4a 0%, #0f5132 75%); border-radius: 16px; padding: 18px 14px; color: #fff; text-align: center; box-shadow: inset 0 0 40px #0006; margin-bottom: 12px; }
.hand { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 98px; margin: 6px 0; }
.hand-label { font-weight: 700; opacity: .9; font-size: 14px; }
.pcard { width: 66px; height: 94px; border-radius: 8px; background: #fff; color: #14181f; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 8px; font-weight: 800; font-size: 18px; box-shadow: 0 3px 8px #0005; text-align: left; }
.pcard .suit { font-size: 30px; text-align: right; line-height: 1; }
.pcard.red { color: #c0262d; }
.pcard.back { background: repeating-linear-gradient(45deg, #0f3d6e 0 6px, #1d5596 6px 12px); border: 3px solid #fff; }
.pcard.ghost { background: transparent; border: 2px dashed #ffffff55; box-shadow: none; }
.pcard.deal { animation: deal .3s ease-out; }
.pcard.faded { opacity: .45; transform: scale(.85); }
@keyframes deal { from { transform: translateY(-24px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bj-msg { font-weight: 700; font-size: 16px; min-height: 26px; margin: 8px 0; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.bj-msg.dark { color: var(--ink); }

.roulette { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.wheel-wrap { position: relative; width: 280px; height: 280px; flex: none; }
.wheel { width: 100%; height: 100%; border-radius: 50%; border: 10px solid #6b3f1d; box-shadow: 0 6px 20px #0005, inset 0 0 0 2px #d4b062; position: relative; }
.wn { position: absolute; left: 50%; top: 50%; width: 20px; margin-left: -10px; margin-top: -8px; text-align: center; color: #fff; font-size: 10px; font-weight: 800; }
.wheel-hub { position: absolute; inset: 32%; border-radius: 50%; background: radial-gradient(circle, #e8c77a, #8a5a22); box-shadow: 0 0 10px #0007; }
.wheel-pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); color: var(--gold, #d4b062); font-size: 24px; text-shadow: 0 2px 3px #0008; }
.rl-table { flex: 1; min-width: 300px; max-width: 620px; }
.rl-board { display: grid; grid-template-columns: repeat(13, 1fr); grid-auto-flow: column; grid-template-rows: repeat(3, 1fr); gap: 3px; }
.rl-cell { position: relative; padding: 10px 0; border: 0; border-radius: 4px; color: #fff; font-weight: 800; font-size: 13px; min-width: 0; }
.rl-cell.red { background: #c0262d; } .rl-cell.black { background: #14181f; } .rl-cell.green { background: #15803d; }
.rl-cell.zero { grid-row: 1 / span 3; }
.rl-cell.out { background: #0f5132; }
.rl-cell.out.red { background: #c0262d; } .rl-cell.out.black { background: #14181f; }
.rl-cell:hover { filter: brightness(1.25); }
.rl-cell i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--gold, #d4b062); color: #14181f; border-radius: 50%; min-width: 22px; height: 22px; line-height: 22px; font-style: normal; font-size: 10px; box-shadow: 0 1px 3px #0008; padding: 0 2px; }
.rl-outside { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-top: 3px; }
.rl-outside .rl-cell:nth-child(n+7) { grid-column: span 2; }
.rl-last { text-align: center; min-height: 28px; display: flex; gap: 4px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.rl-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; }
.rl-dot.red { background: #c0262d; } .rl-dot.black { background: #14181f; } .rl-dot.green { background: #15803d; }
.rl-dot.big { width: 40px; height: 40px; font-size: 18px; }

.slot-machine { max-width: 420px; margin: 0 auto 12px; padding: 16px; border-radius: 22px; background: linear-gradient(180deg, #8a1c24, #4c0d12); border: 4px solid var(--gold, #d4b062); box-shadow: 0 10px 30px #0005; color: #fff; text-align: center; }
.slot-top { font-weight: 900; letter-spacing: .2em; color: var(--gold, #d4b062); margin-bottom: 10px; }
.reels { display: flex; gap: 8px; justify-content: center; background: #0a0a0a; padding: 10px; border-radius: 12px; }
.reel { width: 92px; height: 100px; display: grid; place-items: center; font-size: 52px; background: linear-gradient(180deg, #ddd, #fff 40%, #fff 60%, #ccc); border-radius: 8px; }
.reel.blur { filter: blur(2px); }
.reel.stop { animation: stop .25s ease-out; }
@keyframes stop { 0% { transform: translateY(-8px); } 60% { transform: translateY(4px); } 100% { transform: none; } }
.pay-table { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 14px; margin-top: 10px; }

.vp-pays { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 3px 16px; max-width: 640px; margin: 0 auto 12px; font-size: 13px; }
.vp-pays div { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 6px; }
.vp-pays div.hit { background: var(--gold, #d4b062); color: #14181f; font-weight: 800; }
.vp-slot { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.vp-slot:disabled { cursor: default; opacity: 1; }
.held { font-size: 11px; font-weight: 900; letter-spacing: .1em; color: var(--gold, #d4b062); visibility: hidden; }
.held.on { visibility: visible; }

.sudoku { display: grid; grid-template-columns: repeat(9, 1fr); width: min(100%, 432px); margin: 0 auto; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.su { aspect-ratio: 1; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; font-size: 20px; font-weight: 600; color: var(--blue, #2f6fd1); background: var(--card); }
.su.given { color: var(--ink); font-weight: 800; }
.su.br { border-right: 2px solid var(--ink); }
.su.bb { border-bottom: 2px solid var(--ink); }
.su.same { background: var(--soft-2, #eef2f6); }
.su.sel { background: #fff3c4; color: #14181f; }
.su.wrong { color: #c0262d; }
.su-pad { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.su-pad button { width: 42px; height: 42px; font-weight: 800; font-size: 17px; padding: 0; }
@media (max-width: 600px) {
  .wheel-wrap { width: 230px; height: 230px; }
  .wn { display: none; }
  .pcard { width: 52px; height: 76px; font-size: 15px; }
  .pcard .suit { font-size: 22px; }
  .reel { width: 72px; height: 80px; font-size: 40px; }
  .game-group-label { min-width: 0; width: 100%; }
}

/* ---------- org chart: clickable leaders, goal progress on banker cards ---------- */
a.org-node { display: inline-block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.org-node:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #0f2c4c22; text-decoration: none; }
.roster-head a { color: inherit; }
.roster-head a:hover { text-decoration: underline; }
.bk-goal { display: block; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; margin-top: 5px; }
.bk-goal i { display: block; height: 100%; background: var(--green, #1f9d55); }
.bk-goal-n { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pay-edited { font-size: 11.5px; font-weight: 700; color: var(--red); white-space: nowrap; }

/* ---------- change history ---------- */
.hist-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border-bottom: 0; }
.hist-row .meta { font-size: 12px; color: var(--muted); }
.hist-diff { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.hist-diff s { color: var(--muted); }
.hist-meta { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.history-card summary { list-style: none; }
.history-card summary::-webkit-details-marker { display: none; }
.history-card[open] summary { margin-bottom: 8px; }

/* ---------- commission statement ---------- */
.stmt-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.stmt-step { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.stmt-step .lbl { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stmt-step .val { font-size: 20px; font-weight: 800; color: var(--heading); font-variant-numeric: tabular-nums; margin: 2px 0; }
.stmt-step .hint { font-size: 12px; color: var(--muted); }
.stmt-step.s-projected { border-top-color: #8aa0bd; } .stmt-step.s-earned { border-top-color: #d99a12; }
.stmt-step.s-submitted { border-top-color: var(--blue); } .stmt-step.s-approved { border-top-color: #7c5cd6; } .stmt-step.s-paid { border-top-color: var(--green, #1f9d55); }
@media (max-width: 900px) { .stmt-flow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); } }

/* =================== hover menus (dock + flow) =================== */
/* Every dock button has a menu now. Sliding along the dock swaps menus instantly; leaving the dock lets the last
   one linger a moment so a wobbly mouse doesn't lose it. A small arrow points back at the button. */
.qm-title { padding: 4px 10px 0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.qm-hint { padding: 2px 10px 8px; font-size: 12.5px; color: #aab6c6; }
.qm a.sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d5deea; font-size: 13.5px; text-decoration: none; transition: background .12s, color .12s, padding-left .15s; }
.qm a.sub:hover, .qm a.sub:focus-visible { background: #ffffff1a; color: #fff; padding-left: 14px; text-decoration: none; }
.qm a.sub.active { background: var(--gold); color: var(--sidebar); }
.qm .sub-count { font-size: 11.5px; opacity: .75; }
.dk-pop { transform: translateX(-50%) translateY(6px); transition: opacity .15s .25s, transform .15s .25s, visibility 0s .4s; }
.dk-item:hover .dk-pop, .dk-item:focus-within .dk-pop { transform: translateX(-50%); transition: opacity .14s .06s, transform .18s .06s, visibility 0s; }
.dock-bar:hover .dk-item:not(:hover):not(:focus-within) .dk-pop { transition: none; visibility: hidden; opacity: 0; }
.dk-pop-inner { position: relative; min-width: 210px; max-width: 260px; }
.dk-pop-inner::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg);
  background: var(--sidebar); box-shadow: 1px 1px 0 #ffffff1a; }
/* keep the end buttons' menus on screen */
.dk-item:nth-child(-n+2) .dk-pop { left: 0; transform: translateY(6px); }
.dk-item:nth-child(-n+2):hover .dk-pop, .dk-item:nth-child(-n+2):focus-within .dk-pop { transform: none; }
.dk-item:nth-child(-n+2) .dk-pop-inner::after { left: 32px; }
.dk-item:nth-last-child(-n+2) .dk-pop { left: auto; right: 0; transform: translateY(6px); }
.dk-item:nth-last-child(-n+2):hover .dk-pop, .dk-item:nth-last-child(-n+2):focus-within .dk-pop { transform: none; }
.dk-item:nth-last-child(-n+2) .dk-pop-inner::after { left: auto; right: 26px; }

/* =================== flow (concept layout) =================== */
.shell.layout-flow { display: block; position: relative; min-height: 100vh; }
.fl-spot { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(520px circle at var(--mx, -999px) var(--my, -999px), color-mix(in srgb, var(--gold) 16%, transparent), transparent 70%); }
.layout-flow .main { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding-left: 104px; }
.fl-head { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 8px 18px;
  background: color-mix(in srgb, var(--sidebar) 88%, transparent); backdrop-filter: blur(10px); box-shadow: 0 6px 24px #0b142426; }
.fl-where { flex: 1; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.fl-where span { font-size: 22px; }
.fl-rail { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 2px;
  padding: 8px; border-radius: 22px; background: color-mix(in srgb, var(--sidebar) 92%, transparent); backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px #0b142455, inset 0 0 0 1px #ffffff1a; max-height: calc(100vh - 96px); margin-top: 30px; }
.fl-blob { position: absolute; left: 6px; right: 6px; top: 0; height: 40px; border-radius: 14px; pointer-events: none; opacity: 0;
  background: #ffffff1f; box-shadow: 0 0 22px color-mix(in srgb, var(--gold) 45%, transparent); transition: opacity .2s; }
.fl-item { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; text-decoration: none;
  transform-origin: left center; transition: transform .12s ease-out, background .15s; }
.fl-item:hover, .fl-item:focus-visible { text-decoration: none; }
.fl-item.active { background: var(--gold); box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 40%, transparent); }
.fl-icon { font-size: 20px; line-height: 1; }
.fl-item .badge { position: absolute; top: 0; right: -2px; margin: 0; }
.fl-fly { position: fixed; left: 92px; z-index: 46; min-width: 220px; max-width: 270px; padding: 8px; border-radius: 16px;
  background: var(--sidebar); box-shadow: 0 22px 50px #0b142466, inset 0 0 0 1px #ffffff1a;
  transition: top .28s cubic-bezier(.3, 1.3, .5, 1); animation: fl-in .18s ease-out; }
.fl-fly.instant { transition: none; }
.fl-fly::before { content: ''; position: absolute; left: -6px; top: var(--ay, 50%); width: 12px; height: 12px; margin-top: -6px; transform: rotate(45deg);
  background: var(--sidebar); box-shadow: -1px 1px 0 #ffffff1a; transition: top .28s cubic-bezier(.3, 1.3, .5, 1); }
.fl-fly::after { content: ''; position: absolute; left: -24px; top: 0; bottom: 0; width: 24px; } /* hover bridge back to the rail */
@keyframes fl-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
/* cards and tiles catch the cursor light */
.layout-flow .main .card, .layout-flow .main .stat { position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.layout-flow .main .card::before, .layout-flow .main .stat::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .25s;
  background: radial-gradient(360px circle at var(--cx, 50%) var(--cy, 50%), color-mix(in srgb, var(--gold) 14%, transparent), transparent 65%); }
.layout-flow .main .card:hover::before, .layout-flow .main .stat:hover::before { opacity: 1; }
.layout-flow .main .stat:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #0b14241f; border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
@media (max-height: 860px) { .fl-item { width: 36px; height: 34px; } .fl-icon { font-size: 18px; } .fl-blob { height: 34px; } }
html.calm .fl-fly, html.calm .fl-fly::before { transition: none; animation: none; }
html.calm .layout-flow .main .stat:hover { transform: none; }
/* phones: the rail becomes a swipeable bar along the bottom; no hover panel */
@media (max-width: 820px) {
  .fl-rail { top: auto; bottom: 8px; left: 8px; right: 8px; transform: none; margin: 0; flex-direction: row; overflow-x: auto; max-height: none; scrollbar-width: none; box-sizing: border-box; }
  .fl-head { gap: 8px; padding: 6px 10px; }
  .fl-head .tb-logo img { height: 28px; }
  .fl-head .tb-right { gap: 6px; min-width: 0; }
  .fl-head .me-card b { display: none; }
  .fl-head .layout-switch button { padding: 4px 5px; }
  .fl-head .tb-out { padding: 6px 8px; font-size: 13px; }
  .fl-blob, .fl-fly, .fl-spot { display: none; }
  .fl-item { flex: 0 0 auto; }
  .layout-flow .main { padding-left: 16px; padding-bottom: 90px; }
  .fl-where { display: none; }
}

/* =================== client page: notes log + lender comparison =================== */
.note-write textarea { width: 100%; resize: vertical; min-height: 70px; }
.note-write-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.notes-log { max-height: 420px; overflow-y: auto; padding-left: 22px; background: linear-gradient(var(--line), var(--line)) 4px 0 / 2px 100% no-repeat; }
.notes-log .note { position: relative; }
.notes-log .note::before { content: ''; position: absolute; left: -22px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--heading); box-shadow: 0 0 0 3px var(--card); }
.notes-log .note:first-child .meta::after { content: 'Latest'; margin-left: 8px; padding: 1px 7px; border-radius: 99px; background: var(--info-bg); color: var(--info-ink); font-size: 11px; font-weight: 700; }

.quotes { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.q-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.q-chip { border: 1px solid var(--input-line); background: var(--surface); color: var(--ink); border-radius: 99px; padding: 6px 13px; font-size: 13.5px; font-weight: 600; transition: background .15s, border-color .15s, transform .12s; }
.q-chip:hover:not(:disabled) { border-color: var(--heading); transform: translateY(-1px); }
.q-chip.on { background: var(--heading); border-color: var(--heading); color: #fff; }
.q-chip small { font-size: 10.5px; opacity: .75; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.q-chip:disabled { opacity: .55; cursor: default; }
.q-empty { padding: 6px 0 2px; font-size: 13.5px; }
.q-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.q-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.q-table th, .q-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.q-table tbody th { font-weight: 600; color: var(--muted); font-size: 12.5px; white-space: nowrap; position: sticky; left: 0; background: var(--card); z-index: 1; }
.q-table thead th { background: var(--soft); vertical-align: top; min-width: 170px; }
.q-table thead th:first-child { min-width: 0; position: sticky; left: 0; z-index: 2; }
.q-lender { font-weight: 800; color: var(--heading); font-size: 14.5px; margin-bottom: 6px; }
.q-acts { display: flex; gap: 6px; }
.q-acts .q-use { padding: 5px 10px; font-size: 12.5px; }
.q-x { padding: 4px 9px; font-size: 12px; background: transparent; }
.q-table input, .q-table select { width: 100%; min-width: 120px; padding: 6px 8px; font-size: 13.5px; }
.q-table tr.q-out td { font-weight: 700; font-variant-numeric: tabular-nums; }
.q-table tr.q-out:first-of-type td, .q-table tr.q-in + tr.q-out td, .q-table tr.q-in + tr.q-out th { border-top: 2px solid var(--line); }
.q-table td.q-best { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.q-table td.q-best::after { content: ' ★'; font-size: 11px; }
.q-table tr.q-status td { font-size: 11.5px; color: var(--muted); border-bottom: 0; }
/* flow: a short name beside every icon so the rail reads at a glance */
.fl-item { width: 136px; height: 34px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 10px; box-sizing: border-box; }
.fl-label { font-size: 13px; font-weight: 600; color: #d5deea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
.fl-item:hover .fl-label, .fl-item:focus-visible .fl-label { color: #fff; }
.fl-item.active .fl-label { color: var(--sidebar); font-weight: 800; }
.fl-icon { font-size: 18px; width: 22px; text-align: center; flex: 0 0 auto; }
.fl-blob { height: 34px; }
.fl-item .badge { position: static; margin-left: auto; }
.fl-fly { left: 182px; }
.layout-flow .main { padding-left: 190px; }
@media (max-height: 860px) { .fl-item { height: 30px; } .fl-blob { height: 30px; } .fl-icon { font-size: 16px; } .fl-label { font-size: 12.5px; } }
@media (max-width: 820px) {
  .fl-item { width: auto; height: auto; flex-direction: column; gap: 2px; padding: 6px 8px; min-width: 54px; justify-content: center; }
  .fl-label { font-size: 10px; }
  .fl-item .badge { position: absolute; top: 2px; right: 2px; }
  .layout-flow .main { padding-left: 16px; }
}
/* dock magnify: --mag (0..1) is set per button from the cursor's distance; the icon grows up out of the bar and the
   button widens a little so its neighbors slide aside. Menus sit a little higher to clear the bigger icon. */
.dk-link { --mag: 0; padding-left: calc(6px + var(--mag) * 7px); padding-right: calc(6px + var(--mag) * 7px);
  transition: background .15s, color .15s, padding .12s ease-out, transform .15s; }
.dk-icon { display: inline-block; transform-origin: 50% 100%; transform: translateY(calc(var(--mag) * -6px)) scale(calc(1 + var(--mag) * .6)); transition: transform .12s ease-out; }
.dk-item:hover .dk-link { transform: none; }
.dk-pop { padding-bottom: 24px; }
@media (max-width: 820px) { .dk-link { --mag: 0 !important; } }
@media (max-width: 1100px) { .dk-link { padding-left: calc(3px + var(--mag) * 5px); padding-right: calc(3px + var(--mag) * 5px); } }

/* ---------- command bar (search pages, clients, people) ---------- */
.cmdk-bar { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; margin: 0 0 16px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: text; }
.cmdk-bar:hover { border-color: var(--navy); }
.cmdk-bar .cmdk-ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-bar kbd, .cmdk-foot kbd { font: 600 11px/1 system-ui, sans-serif; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); }
.cmdk { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 20, 40, .45); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.cmdk-box { width: 100%; max-width: 620px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); overflow: hidden; display: flex; flex-direction: column; max-height: 75vh; }
.cmdk-in { border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; font-size: 18px !important; padding: 16px 18px !important; outline: none; box-shadow: none !important; }
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 10px 4px; }
.cmdk-item { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; color: inherit; text-decoration: none !important; }
.cmdk-item small { display: block; color: var(--muted); font-size: 12px; }
.cmdk-item.on { background: var(--soft-2); }
.cmdk-ic { width: 24px; text-align: center; flex: 0 0 auto; }
.cmdk-empty { padding: 14px; color: var(--muted); }
.cmdk-foot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .cmdk-bar kbd, .cmdk-foot span { display: none; } }

/* ---------- clickable stat tiles, call prep ---------- */
a.stat-link { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.stat-link:hover { border-color: var(--navy); transform: translateY(-1px); text-decoration: none; }
.ai-card .ai-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ai-out ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.ai-out li { margin: 3px 0; }
.ai-next { background: var(--soft-2); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.ai-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 12px 0; }
.ai-draft { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }
.ai-draft-head { display: flex; gap: 8px; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 6px; }
.ai-draft-head button { font-size: 12.5px; padding: 4px 9px; }
.ai-draft-body { white-space: pre-wrap; font-size: 14px; }

/* ---------- client contact bar, menu separators ---------- */
.contact-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.contact-bar button, .contact-bar .btn { font-size: 14px; }
.contact-bar .cb-call:not(:disabled) { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.contact-bar button:disabled { opacity: .45; cursor: not-allowed; }
.sub-sep { height: 1px; background: currentColor; opacity: .15; margin: 6px 8px; }

/* ---------- company chart: interactive ---------- */
.org-tools, .web-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.org-tools input { width: 220px; }
.org-tools button, .web-tools button { min-width: 38px; }
.org-stage { position: relative; cursor: grab; user-select: none; --mx: -999px; --my: -999px; border-radius: 12px;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(214, 166, 69, .16), transparent 70%); max-height: 78vh; overflow: auto; }
.org-stage.grabbing { cursor: grabbing; }
.org-stage .org-node, .org-stage .bk-card { transition: transform .14s ease-out, opacity .2s, box-shadow .2s, border-color .2s; position: relative; will-change: transform; }
html:not(.calm) .org-stage .org-node, html:not(.calm) .org-stage .bk-card { animation: orgIn .5s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: calc(var(--i, 0) * 25ms); }
@keyframes orgIn { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.org-dim .org-node:not(.org-hot), .org-dim .bk-card:not(.org-hot) { opacity: .42; }
.org-stage .org-hot { border-color: var(--gold) !important; box-shadow: 0 0 0 3px rgba(214, 166, 69, .35), 0 10px 24px rgba(15, 44, 76, .14); }
.org-stage .roster.org-hot { box-shadow: none; }
.org-found { outline: 3px solid #2563eb; outline-offset: 2px; animation: orgFound 1s ease-in-out 3; }
@keyframes orgFound { 50% { outline-color: transparent; } }
.web-wrap { position: relative; }
.org-web { cursor: grab; touch-action: none; user-select: none; }
.org-web.grabbing { cursor: grabbing; }
.org-web .dot { transition: opacity .2s; }
.org-web .dot circle { transition: r .2s, stroke-width .2s; }
.org-web .dot.hot circle { stroke: var(--gold); stroke-width: 4; }
.org-web .web-dim .dot:not(.hot) { opacity: .35; }
.org-web .web-dim line:not(.hot) { opacity: .25; }
.org-web line.hot { stroke: var(--gold); stroke-width: 3; opacity: 1; }
.org-web .dot.me circle { animation: webMe 2s ease-in-out infinite; }
@keyframes webMe { 50% { stroke-width: 7; } }
html:not(.calm) .org-web line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: webDraw .8s ease forwards; animation-delay: var(--d, 0s); }
html:not(.calm) .org-web line.dashed { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
html:not(.calm) .org-web .dot { animation: webPop .45s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: var(--d, 0s); transform-box: fill-box; }
@keyframes webDraw { to { stroke-dashoffset: 0; } }
@keyframes webPop { from { opacity: 0; } }
.web-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--navy); color: #fff; border-radius: 12px; padding: 9px 12px; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); display: grid; gap: 2px; max-width: 280px; }
.web-tip b { font-size: 14.5px; }
.web-tip span { opacity: .9; }

.hero-sub { margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: #e3e8ef; opacity: .85; }

/* ---------- owner's leadership plan ---------- */
.lead-list { display: grid; gap: 8px; }
.lead-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--sev); border-radius: 10px; background: var(--card); color: inherit; text-decoration: none !important; transition: transform .15s, border-color .15s; }
.lead-item:hover { transform: translateX(3px); border-color: var(--navy); border-left-color: var(--sev); }
.lead-item b { display: block; font-size: 14px; }
.lead-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.lead-ic { font-size: 20px; text-align: center; }
.lead-go { color: var(--muted); }
.lead-teams { display: grid; gap: 6px; }
.lead-team { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none !important; }
.lead-team:hover { background: var(--soft-2); }
.lead-team small { display: block; color: var(--muted); font-size: 12px; }
.lt-bar { height: 10px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
.lt-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 999px; }
.lt-num { text-align: right; font-size: 13px; }
@media (max-width: 640px) { .lead-team { grid-template-columns: 1fr; } .lt-num { text-align: left; } }

/* ---------- Simple layout: light and airy (clean white header, soft cards), dock kept at the bottom ---------- */
body:has(.layout-simple) { background: color-mix(in srgb, var(--navy) 3%, var(--bg)); }
.layout-simple .simplehead { background: linear-gradient(90deg, color-mix(in srgb, var(--navy) 7%, var(--card)), var(--card) 45%); color: var(--ink); border-top: 3px solid var(--navy); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(15, 44, 76, .03); gap: 16px; }
.layout-simple .simplehead .tb-logo { background: transparent; box-shadow: none; padding: 0; }
.layout-simple .simplehead .tb-logo img { height: 40px; }
.sh-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); font: inherit; font-size: 14px; cursor: text; text-align: left; }
.sh-search:hover { border-color: var(--navy); background: var(--card); }
.sh-search .sh-ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-search kbd { font: 600 11px/1 system-ui, sans-serif; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.sh-date { font-size: 13px; color: var(--muted); padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; background: var(--card); }
.sh-icon { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); text-decoration: none !important; font-size: 17px; }
.sh-icon:hover { border-color: var(--navy); }
.sh-icon .badge { position: absolute; top: -6px; right: -6px; }
.layout-simple .simplehead .me-card { background: transparent; color: inherit; }
.layout-simple .simplehead .me-card small { color: var(--muted); }
.layout-simple .simplehead .me-card .avatar { background: var(--navy); color: #fff; }
.layout-simple .simplehead .tb-out { background: var(--card); color: var(--heading); border: 1px solid var(--line); }
.layout-simple .simplehead .layout-switch { background: var(--soft); border: 1px solid var(--line); }
.layout-simple .simplehead .layout-switch button { color: var(--muted); }
.layout-simple .main .card, .layout-simple .main .stat { border: 1px solid var(--line); border-top: 3px solid color-mix(in srgb, var(--navy) 55%, var(--line)); border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 44, 76, .04), 0 6px 18px rgba(15, 44, 76, .04); }
.layout-simple .main .stat .label { color: var(--muted); }
.layout-simple .main .stat .value { font-size: 30px; letter-spacing: -.01em; }
.layout-simple .main h1 { letter-spacing: -.01em; }
@media (max-width: 900px) { .sh-date, .sh-search kbd { display: none; } }
@media (max-width: 640px) { .layout-simple .simplehead { flex-wrap: wrap; } .sh-search { order: 3; flex-basis: 100%; max-width: none; } }

.metric-banner { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 4px 0 6px; padding: 7px 12px; border-radius: 10px; background: var(--soft-2); font-size: 14px; }

/* ---------- stage moments + the client's journey ---------- */
.stage-card { border-left: 5px solid var(--c); transition: border-color .4s; background-image: linear-gradient(90deg, color-mix(in srgb, var(--c) 7%, transparent), transparent 40%); }
.journey { margin: 14px 0 4px; }
.jr-track { height: 10px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
.jr-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); transition: width .9s cubic-bezier(.2, .9, .3, 1.1); }
.jr-steps { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.jr-steps span.done { color: var(--c); font-weight: 700; }
.jr-steps span.now { color: #fff; background: var(--c); padding: 1px 9px; border-radius: 999px; font-weight: 800; }
.jr-next { margin-top: 8px; font-size: 13.5px; }
.jr-lost .jr-track i { background: #cbd5e1; }
.journey.jr-pulse .jr-track i { animation: jrGlow 1.2s ease 2; }
.journey.jr-pulse .jr-steps span.now { animation: jrPop .6s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes jrGlow { 50% { box-shadow: 0 0 14px var(--c); } }
@keyframes jrPop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.stage-pop { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 1250; display: flex; gap: 12px; align-items: center; background: var(--card); border: 2px solid var(--c); border-radius: 16px; padding: 12px 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); animation: spIn .45s cubic-bezier(.2, .9, .3, 1.4); transition: opacity .4s, transform .4s; }
.stage-pop.out { opacity: 0; transform: translate(-50%, -14px); }
.stage-pop .sp-icon { font-size: 34px; }
.stage-pop b { display: block; font-size: 18px; color: var(--c); }
.stage-pop small { color: var(--muted); font-size: 13px; }
@keyframes spIn { from { opacity: 0; transform: translate(-50%, -24px) scale(.9); } }
.stage-bit { position: fixed; left: 50%; top: 40%; z-index: 1240; pointer-events: none; font-size: 22px; animation: sbOut 1s ease-out forwards; }
@keyframes sbOut { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); opacity: 0; } }
.stage-plane { position: fixed; left: -80px; top: 55%; z-index: 1240; pointer-events: none; font-size: 54px; animation: spFly 2.1s cubic-bezier(.4, 0, .3, 1) forwards; }
@keyframes spFly { 0% { transform: translate(0, 0) rotate(8deg); } 60% { transform: translate(60vw, -30vh) rotate(-12deg); } 100% { transform: translate(115vw, -50vh) rotate(-20deg); opacity: .6; } }
.stage-stamp { position: fixed; left: 50%; top: 45%; z-index: 1240; pointer-events: none; font: 900 clamp(46px, 9vw, 96px)/1 system-ui, sans-serif; letter-spacing: .08em; color: #0d9488; border: 8px solid #0d9488; border-radius: 16px; padding: 6px 24px; background: rgba(255, 255, 255, .85);
  transform: translate(-50%, -50%) rotate(-12deg); animation: stamp 2.3s cubic-bezier(.2, .9, .3, 1) forwards; mix-blend-mode: multiply; }
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-12deg) scale(3); opacity: 0; } 18% { transform: translate(-50%, -50%) rotate(-12deg) scale(.95); opacity: 1; } 24% { transform: translate(-50%, -50%) rotate(-12deg) scale(1.03); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
html.calm .jr-track i, html.calm .stage-pop { animation: none; transition: none; }

#view-as-bar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1300; display: flex; gap: 12px; align-items: center; background: #7c3aed; color: #fff; padding: 8px 10px 8px 16px; border-radius: 999px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); font-size: 14px; }
#view-as-bar button { background: #fff; color: #5b21b6; border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 700; }

.sel-bar { position: sticky; top: 8px; z-index: 40; display: flex; gap: 10px; align-items: center; background: var(--navy); color: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .15); }
.sel-bar button { font-size: 13px; }
td.sel-cell { width: 30px; }

.value-card .vc-addr { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.value-card .vc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.value-card .vc-links .btn { font-size: 13.5px; }
.value-card .vc-in { width: 100%; max-width: 160px; padding: 6px 8px; font-weight: 700; }

/* ---------- liabilities ---------- */
.debt-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.debt-sum div { background: var(--soft); border-radius: 10px; padding: 8px 10px; }
.debt-sum span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.debt-sum b { font-size: 18px; }
.debt-sum small { display: block; color: var(--muted); font-size: 12px; }
.debt-table input.dv { width: 110px; padding: 4px 6px; text-align: right; }
.debt-table tr.payoff td { background: #effaf3; }
.debt-table tr.payoff td:first-child b::after { content: ' · paying off'; color: var(--green); font-weight: 600; font-size: 12px; }
.debt-add { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr auto auto; gap: 6px; margin-top: 10px; align-items: center; }
@media (max-width: 900px) { .debt-add { grid-template-columns: 1fr 1fr; } }

/* ---------- loan snapshot (top of the client page) ---------- */
.ph-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .ph-grid { grid-template-columns: 1fr; } }
.snap { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: color-mix(in srgb, var(--card) 92%, var(--soft-2)); }
.snap-head { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.snap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 560px) { .snap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.snap-t { all: unset; box-sizing: border-box; cursor: pointer; display: block; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 7px 9px; min-width: 0; transition: transform .12s, border-color .15s, box-shadow .15s; }
.snap-t:hover, .snap-t:focus-visible { transform: translateY(-1px); border-color: var(--navy); box-shadow: 0 6px 16px rgba(15, 44, 76, .1); }
.snap-t span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.snap-t b { display: block; font-size: 16px; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.snap-t small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snap-t.good { border-left-color: var(--green); } .snap-t.good b { color: var(--green); }
.snap-t.warn { border-left-color: #d99a12; } .snap-t.warn b { color: #b7791f; }
.snap-t.bad { border-left-color: var(--red); } .snap-t.bad b { color: var(--red); }
.flash-target { animation: flashT 1.4s ease; }
@keyframes flashT { 0%, 60% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: none; } }

/* ---------- "On this page" navigator (client page) ---------- */
#page-nav { position: fixed; z-index: 35; width: 196px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 8px 14px; box-shadow: 0 10px 28px rgba(15, 44, 76, .08); }
#page-nav.docked { top: 130px; max-height: calc(100vh - 260px); overflow: auto; }
#page-nav.floating { left: 12px; bottom: 112px; max-height: 70vh; overflow: auto; display: none; }
#page-nav.floating.open { display: block; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.pn-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.pn-close { display: none; padding: 0 6px; font-size: 12px; }
#page-nav.floating .pn-close { display: inline-block; }
.pn-track { position: absolute; left: 6px; top: 34px; bottom: 44px; width: 3px; border-radius: 3px; background: var(--soft-2); }
.pn-track i { display: block; width: 100%; height: 0; border-radius: 3px; background: linear-gradient(var(--navy), var(--gold)); transition: height .15s; }
.pn-list { display: grid; gap: 1px; }
.pn-list a { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: center; padding: 5px 7px; border-radius: 8px; color: var(--muted); font-size: 13px; text-decoration: none !important; transition: background .15s, color .15s, transform .15s; }
.pn-list a:hover { background: var(--soft); color: var(--heading); transform: translateX(2px); }
.pn-list a.on { background: var(--soft-2); color: var(--heading); font-weight: 800; box-shadow: inset 3px 0 0 var(--gold); }
.pn-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-n { font-size: 11px; min-width: 18px; text-align: center; border-radius: 999px; background: var(--soft-2); color: var(--heading); padding: 0 5px; }
.pn-n:empty { display: none; }
.pn-top { width: 100%; margin-top: 8px; font-size: 12.5px; padding: 5px; }
#page-nav-fab { position: fixed; left: 12px; bottom: 112px; z-index: 36; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; background: var(--card); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
body:not(:has(.layout-dock)) #page-nav-fab, body:not(:has(.layout-dock)) #page-nav.floating { bottom: 16px; }
@media print { #page-nav, #page-nav-fab { display: none !important; } }
#page-nav-fab[hidden] { display: none !important; }
#page-nav.floating { bottom: 160px; }
body:not(:has(.layout-dock)) #page-nav.floating { bottom: 64px; }

/* ---------- shared page upgrades: summary strips, clickable tiles ---------- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 0 0 16px; }
.strip-t { all: unset; box-sizing: border-box; display: block; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: default; min-width: 0; color: inherit; text-decoration: none !important; }
button.strip-t, a.strip-t { cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s; }
button.strip-t:hover, a.strip-t:hover, button.strip-t:focus-visible, a.strip-t:focus-visible { transform: translateY(-2px); border-color: var(--navy); box-shadow: 0 8px 20px rgba(15, 44, 76, .1); }
.strip-t b { display: block; font-size: 22px; line-height: 1.15; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-t span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.strip-t small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-t.on { border-color: var(--navy); border-left-color: var(--gold); background: var(--soft-2); }
.strip-t.good { border-left-color: var(--green); } .strip-t.warn { border-left-color: #d99a12; } .strip-t.bad { border-left-color: var(--red); }
.strip-t.warn b { color: #b7791f; } .strip-t.bad b { color: var(--red); }
button.stat.stat-link { all: unset; box-sizing: border-box; display: block; cursor: pointer; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; transition: border-color .15s, transform .15s; }
button.stat.stat-link:hover { border-color: var(--navy); transform: translateY(-1px); }
.stat-link .sub { color: var(--muted); }
.stat-link:hover .sub { color: var(--navy); }
button.tile-btn { all: unset; box-sizing: border-box; cursor: pointer; }
.stmt-step.tile-btn:hover { outline: 2px solid var(--navy); outline-offset: -2px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--soft); }
.alert-row[hidden] { display: none !important; }
.sel-bar[hidden] { display: none !important; }

.fun-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.fun-pick button { border-radius: 999px; font-size: 13.5px; padding: 6px 12px; }
.fun-pick button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.bday select { width: auto; }

/* ---------- documents ---------- */
.doc-progress { margin: 6px 0 10px; }
.doc-bar { height: 10px; border-radius: 999px; background: var(--soft-2); overflow: hidden; }
.doc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, var(--green)); transition: width .6s; }
.doc-counts { font-size: 13.5px; margin-top: 6px; }
.doc-group { margin-top: 12px; }
.doc-gh { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid #cbd5e1; border-radius: 10px; margin-bottom: 6px; background: var(--card); }
.doc-row.s-requested { border-left-color: #3b82f6; } .doc-row.s-received { border-left-color: #22c55e; } .doc-row.s-cleared { border-left-color: var(--green); background: #f3fbf6; } .doc-row.s-waived { opacity: .55; }
.doc-row.late { border-left-color: var(--red); background: #fff7f7; }
.doc-name b { display: block; font-size: 14px; }
.doc-name small { display: block; color: var(--muted); font-size: 12px; }
.doc-file { font-size: 12.5px; }
.doc-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.doc-ctl select, .doc-ctl input[type=date] { width: auto; padding: 4px 6px; font-size: 13px; }
.doc-late { color: var(--red); font-weight: 800; font-size: 12px; }
.doc-up { cursor: pointer; font-size: 18px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 8px; }
.doc-up:hover { border-color: var(--navy); }
.doc-del { padding: 2px 8px; font-size: 12px; }
.doc-add { display: grid; grid-template-columns: 2fr 1fr auto auto; gap: 6px; margin-top: 10px; }
@media (max-width: 760px) { .doc-row { grid-template-columns: 1fr; } .doc-ctl { justify-content: flex-start; } .doc-add { grid-template-columns: 1fr 1fr; } }

/* ---------- loan benefits + AI solution ---------- */
.ben-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 8px; }
.ben { background: var(--soft); border-radius: 10px; padding: 8px 10px; border-left: 4px solid var(--line); }
.ben span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ben b { display: block; font-size: 17px; color: var(--heading); }
.ben small { display: block; font-size: 12px; color: var(--muted); }
.ben.good { border-left-color: var(--green); background: #f0faf4; } .ben.good b { color: var(--green); }
.ben.bad { border-left-color: var(--red); background: #fff5f5; } .ben.bad b { color: var(--red); }
.ben.warn { border-left-color: #d99a12; background: #fffaf0; } .ben.warn b { color: #b7791f; }
.ben-say { margin-top: 10px; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.ben-say-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.ben-say p { margin: 6px 0; font-size: 14px; }
.sol-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sol-pick { font-size: 18px; font-weight: 900; color: var(--heading); background: linear-gradient(90deg, #fff6e0, transparent); padding: 4px 10px; border-radius: 8px; }
.sol-alts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.sol-alts > div { background: var(--soft); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.sol-alts small { display: block; color: var(--muted); }

/* client page: 🗒 Notes button highlights the notes card */
@keyframes card-flash { 0% { box-shadow: 0 0 0 0 rgba(212,160,23,.0); } 25% { box-shadow: 0 0 0 4px rgba(212,160,23,.55); } 100% { box-shadow: 0 0 0 0 rgba(212,160,23,0); } }
.card.flash { animation: card-flash 1.6s ease-out; }

/* search bar in the top bar on every layout */
.sh-search.on-dark { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.8); margin: 0 auto; min-width: 0; }
.sh-search.on-dark:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.4); }
.sh-search.on-dark kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: rgba(255,255,255,.85); }
.sh-search.compact { flex: 0 1 230px; margin: 0; padding: 7px 12px; }
.fl-head .fl-where { flex: 0 1 auto; }
.fl-head .sh-search { flex: 1; }
.sb-top { position: sticky; top: 0; z-index: 30; display: flex; margin: -28px -32px 18px; padding: 12px 32px; background: color-mix(in srgb, var(--bg, #f5f7fb) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.sb-top .sh-search { max-width: 560px; }
@media (max-width: 1100px) { .sh-search.compact .sh-ph, .sh-search.compact kbd { display: none; } .sh-search.compact { flex: 0 0 auto; } }
@media (max-width: 820px) { .sb-top { margin: -20px -16px 14px; padding: 10px 16px; } }
@media (max-width: 900px) { .fl-head .fl-where { display: none; } }
@media (max-width: 640px) { .dockhead:not(.simplehead) .sh-search.on-dark .sh-ph { display: none; } .dockhead:not(.simplehead) .sh-search.on-dark { flex: 0 0 auto; } }

/* hover menu on your name */
.me-wrap { position: relative; display: flex; }
.sidebar .me-wrap { display: block; }
.me-menu { position: absolute; top: 100%; right: 0; z-index: 200; width: 280px; padding-top: 8px; display: none; color: var(--ink); filter: drop-shadow(0 12px 28px rgba(16,24,40,.18)); }
.sidebar .me-menu { left: 0; right: auto; }
.me-wrap:hover .me-menu, .me-wrap:focus-within .me-menu, .me-wrap.open .me-menu { display: block; animation: mm-in .16s ease-out; }
.me-wrap.shut .me-menu { display: none !important; }
@keyframes mm-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.me-menu .mm-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--navy) 10%, var(--card)), var(--card)); border: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.me-menu .mm-head .avatar { flex: none; background: var(--navy); color: #fff; }
.me-menu .mm-head b { display: block; font-size: 14.5px; color: var(--heading); }
.me-menu .mm-head small { display: block; font-size: 12px; color: var(--muted); }
.me-menu .mm-sec { display: grid; padding: 6px; background: var(--card); border: 1px solid var(--line); border-top: 0; }
.me-menu .mm-sec:last-child { border-radius: 0 0 14px 14px; }
.me-menu a, .me-menu label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none !important; cursor: pointer; margin: 0; }
.me-menu a:hover, .me-menu label:hover { background: var(--soft-2); }
.me-menu a > span:first-child, .me-menu label > span:first-child { width: 20px; text-align: center; }
.me-menu i[data-goto] { display: none; }
.me-menu .mm-n { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 800; background: var(--red); color: #fff; border-radius: 999px; padding: 1px 7px; }
.me-menu .mm-n:empty { display: none; }
.me-menu kbd { margin-left: auto; font: 600 11px/1 system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.me-menu select { margin-left: auto; width: 128px; padding: 3px 6px; font-size: 13px; border-radius: 8px; }
.mm-toggle { margin-left: auto; width: 38px; height: 22px; padding: 0; border-radius: 999px; background: var(--soft-2); border: 1px solid var(--line); position: relative; }
.mm-toggle i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .18s; }
.mm-toggle.on { background: var(--green); border-color: var(--green); }
.mm-toggle.on i { left: 18px; }
html[data-theme="midnight"] .layout-simple .simplehead .tb-logo { background: #fff; border-radius: 10px; padding: 3px 8px; }

/* ---------- client page: friendly touches ---------- */
.ti { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 9px; border-radius: 10px; vertical-align: middle; font-size: 16px; letter-spacing: 0;
  background: hsl(var(--h) 85% 94%); box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 85%); transition: transform .2s; }
.card:hover .ti { transform: rotate(-6deg) scale(1.08); }
html[data-theme="midnight"] .ti { background: hsl(var(--h) 35% 20%); box-shadow: inset 0 0 0 1px hsl(var(--h) 35% 30%); }
.ph-who { display: flex; gap: 14px; align-items: center; min-width: 0; }
.cl-avatar { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; font-size: 21px; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 62% 55%), hsl(calc(var(--h) + 35) 62% 45%)); box-shadow: 0 6px 16px hsl(var(--h) 50% 40% / .25); }
@media (max-width: 520px) { .cl-avatar { width: 46px; height: 46px; font-size: 17px; border-radius: 14px; } }
.vc-art { position: relative; margin: 0 0 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.vc-art svg { display: block; }
.vc-tag { position: absolute; left: 12px; top: 10px; line-height: 1.2; background: rgba(255,255,255,.92); border-radius: 10px; padding: 6px 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); color: #1c2533; }
.vc-tag small { display: block; font-size: 11px; color: #5d6b7a; }
.vc-tag b { display: block; font-size: 18px; }
.vc-tag small.up { color: #15803d; font-weight: 700; } .vc-tag small.down { color: #b91c1c; font-weight: 700; }

/* ---------- friendly visuals on every page ---------- */
.card h2 > .ti, .card h2 .ti { width: 34px; height: 34px; font-size: 18px; border-radius: 11px; }
.ph-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-right: 12px; border-radius: 15px; vertical-align: middle; font-size: 24px; letter-spacing: 0;
  background: linear-gradient(135deg, hsl(var(--h) 90% 95%), hsl(var(--h) 75% 88%)); box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 84%), 0 4px 12px hsl(var(--h) 50% 50% / .14);
  transform: translateY(-2px); transition: transform .25s; }
.page-head:hover .ph-icon { transform: translateY(-2px) rotate(-8deg) scale(1.06); }
html[data-theme="midnight"] .ph-icon { background: hsl(var(--h) 35% 20%); box-shadow: inset 0 0 0 1px hsl(var(--h) 35% 32%); }
@media (max-width: 520px) { .ph-icon { width: 38px; height: 38px; font-size: 20px; border-radius: 12px; margin-right: 9px; } }
.stat { position: relative; }
.st-ic { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 16px;
  background: hsl(var(--h) 85% 95%); box-shadow: inset 0 0 0 1px hsl(var(--h) 60% 87%); transition: transform .2s; pointer-events: none; }
.stat:hover .st-ic { transform: rotate(-8deg) scale(1.1); }
html[data-theme="midnight"] .st-ic { background: hsl(var(--h) 35% 20%); box-shadow: inset 0 0 0 1px hsl(var(--h) 35% 30%); }
.stat .label { padding-right: 36px; }
.mini-av { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 8px; vertical-align: middle; font-size: 10.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 62% 56%), hsl(calc(var(--h) + 35) 60% 46%)); text-decoration: none; letter-spacing: 0; }
a:hover > .mini-av { text-decoration: none; }
.empty:not(:has(.spinner))::before { content: ""; display: block; width: 92px; height: 72px; margin: 0 auto 10px; opacity: .95;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 72'%3E%3Cellipse cx='46' cy='66' rx='34' ry='5' fill='%23e3e9f2'/%3E%3Crect x='24' y='10' width='44' height='52' rx='7' fill='%23ffffff' stroke='%23c9d4e3' stroke-width='2'/%3E%3Crect x='36' y='5' width='20' height='10' rx='4' fill='%23dbe6f5' stroke='%23c9d4e3' stroke-width='2'/%3E%3Cg stroke='%23d6dfeb' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='33' y1='27' x2='59' y2='27'/%3E%3Cline x1='33' y1='36' x2='55' y2='36'/%3E%3Cline x1='33' y1='45' x2='50' y2='45'/%3E%3C/g%3E%3Ccircle cx='68' cy='18' r='9' fill='%23ffe08a'/%3E%3Cpath d='M64 18l3 3 5-6' fill='none' stroke='%23b7791f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14 22l2 5 5 2-5 2-2 5-2-5-5-2 5-2z' fill='%23c4b5fd'/%3E%3Cpath d='M80 44l1.5 3.5 3.5 1.5-3.5 1.5-1.5 3.5-1.5-3.5-3.5-1.5 3.5-1.5z' fill='%2393c5fd'/%3E%3C/svg%3E"); }

/* ---------- Living themes (🌆 Skyline, 🌌 Galaxy, 🌊 Deep sea, 🍂 Seasons): animated worlds behind frosted glass ---------- */
html[data-theme="skyline"] { --navy: #24306b; --navy-2: #2f3d85; --gold: #ffb547; --heading: #1f2a63; --chart: #3a4aa0; --sidebar: #141a45;
  --bg: #eef2fb; --card: rgba(255, 255, 255, .74); --surface: rgba(255, 255, 255, .8); --soft: rgba(244, 247, 255, .7); --soft-2: rgba(226, 232, 250, .75);
  --line: rgba(160, 175, 220, .38); background: #0b1026; }
html[data-theme="galaxy"] { --navy: #3b2a7a; --navy-2: #4c3a96; --gold: #c4a7ff; --heading: #2e1f66; --chart: #6d4fd1; --sidebar: #120c2c;
  --bg: #efeefb; --card: rgba(255, 255, 255, .76); --surface: rgba(255, 255, 255, .8); --soft: rgba(246, 244, 255, .7); --soft-2: rgba(232, 228, 252, .75);
  --line: rgba(170, 160, 230, .38); background: #05030f; }
html[data-theme="ocean"] { --navy: #0b4a6f; --navy-2: #0e5f8c; --gold: #2bd4c5; --heading: #08405f; --chart: #0e7aa8; --sidebar: #04243d;
  --bg: #eaf6fb; --card: rgba(255, 255, 255, .76); --surface: rgba(255, 255, 255, .8); --soft: rgba(240, 250, 255, .7); --soft-2: rgba(222, 242, 250, .75);
  --line: rgba(140, 200, 225, .4); background: #031a33; }
html[data-theme="hills"] { --navy: #3d5a2f; --navy-2: #4b6e3a; --gold: #e8913a; --heading: #34502a; --chart: #5c8a45; --sidebar: #22351b;
  --bg: #f4f2ea; --card: rgba(255, 255, 255, .76); --surface: rgba(255, 255, 255, .8); --soft: rgba(250, 248, 240, .7); --soft-2: rgba(238, 234, 220, .75);
  --line: rgba(190, 175, 140, .4); background: #1d2a17; }

html.living body, html.living body:has(.layout-simple) { background: transparent; }
#sky-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; display: block; }
html.living .card, html.living .stat, html.living .strip-t, html.living .table-wrap,
html.living .me-menu .mm-sec, html.living .me-menu .mm-head {
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-color: rgba(255, 255, 255, .55);
  box-shadow: 0 10px 30px rgba(10, 16, 50, .18), inset 0 1px 0 rgba(255, 255, 255, .7); }
/* light sheen that follows the cursor */
html.living .card, html.living .stat { position: relative; background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 255, 255, .55), transparent 45%); }
html.living .stat { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .15s ease-out; will-change: transform; }
html.living .topbar, html.living .simplehead { background: rgba(255, 255, 255, .62) !important; backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); border-top-color: var(--gold) !important; }
html.living .dock-bar { background: rgba(14, 20, 60, .62); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .18); }
html.living .sb-top { background: rgba(255, 255, 255, .35); }
/* at night (and always in Galaxy and Deep sea) the page sits on one frosted sheet, so every word stays dark and readable */
html.living.sky-night main.main { background: rgba(232, 237, 255, .62); backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border-radius: 26px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 30px 80px rgba(0, 0, 0, .35); }
html.living.sky-night .layout-dock main.main, html.living.sky-night .layout-top main.main { margin-top: 14px; margin-bottom: 110px; }
/* the dashboard's window onto the city */
.city-card { position: relative; height: 300px; padding: 0 !important; overflow: hidden; border-radius: 20px !important; background: #0b1026 !important; }
.city-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.city-over { position: absolute; left: 16px; top: 14px; right: 16px; pointer-events: none; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.city-title { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.city-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; }
.city-stats span { background: rgba(10, 16, 50, .38); backdrop-filter: blur(6px); padding: 3px 10px; border-radius: 999px; }
.city-hint { position: absolute; right: 14px; bottom: 44px; font-size: 12px; color: rgba(255, 255, 255, .85); background: rgba(10, 16, 50, .4); padding: 3px 10px; border-radius: 999px; pointer-events: none; }
.city-card.empty-city .city-hint::before { content: attr(data-empty); }
.city-tip { position: absolute; transform: translate(-50%, -100%); pointer-events: none; background: rgba(255, 255, 255, .96); color: #18212b; border-radius: 12px; padding: 7px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); text-align: center; white-space: nowrap; text-shadow: none; z-index: 2; }
.city-tip b { display: block; font-size: 14px; } .city-tip span { display: block; font-size: 12.5px; } .city-tip small { display: block; color: #5d6b7a; font-size: 11.5px; }
@media (max-width: 640px) { .city-card { height: 230px; } .city-hint { display: none; } .city-title { font-size: 16px; } }

.sky-tip { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 14px 16px; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #141a45 0%, #3a3f88 45%, #f6a57c 100%); box-shadow: 0 10px 30px rgba(20, 26, 69, .25); }
.sky-tip > div { flex: 1; min-width: 0; font-size: 13.5px; } .sky-tip b { font-size: 15.5px; }
.sky-tip-art { font-size: 34px; }
.sky-tip .sky-x { background: transparent; border: 0; color: #fff; opacity: .8; font-size: 16px; padding: 4px 8px; }
@media (max-width: 640px) { .sky-tip { flex-wrap: wrap; } }

/* ---------- 📊 Market outlook ---------- */
.mk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-bottom: 16px; }
.mk-tile { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 14px; padding: 12px 14px; transition: transform .15s, box-shadow .15s; }
.mk-tile.clickable { cursor: pointer; } .mk-tile.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 44, 76, .1); }
.mk-l { font-size: 13px; font-weight: 700; color: var(--muted); }
.mk-v { font-size: 28px; font-weight: 900; color: var(--heading); letter-spacing: -.01em; }
.mk-s { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.mk-src { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.mk-spark { width: 100%; height: 34px; display: block; margin-top: 6px; }
.mk-chg { font-weight: 800; } .mk-chg.up { color: #c92a2a; } .mk-chg.dn { color: #2b8a3e; }
.mk-ai { border: 2px solid #d0bfff; background-image: linear-gradient(135deg, rgba(243, 240, 255, .9), rgba(255, 255, 255, 0) 60%); }
.mk-ai-head, .mk-chart-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
.mk-headline { font-size: 18px; font-weight: 800; color: var(--heading); margin: 12px 0; }
.mk-gauges { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-bottom: 12px; }
.mk-g { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--soft); }
.mk-g small { display: block; font-size: 12px; color: var(--muted); } .mk-g b { font-size: 18px; }
.mk-arrow { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; font-size: 26px; font-weight: 900; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.mk-g.up .mk-arrow { color: #c92a2a; background: #fff0f0; } .mk-g.dn .mk-arrow { color: #2b8a3e; background: #ebfbee; } .mk-g.flat .mk-arrow { color: #e67700; background: #fff9db; }
.mk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.mk-driver { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.mk-push { flex: none; font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.mk-push.up { background: #fff0f0; color: #c92a2a; } .mk-push.down { background: #ebfbee; color: #2b8a3e; } .mk-push.mixed { background: #fff9db; color: #e67700; }
.mk-say { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; background: var(--soft); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 14px; font-style: italic; }
.mk-say button { font-size: 12px; padding: 2px 7px; font-style: normal; }
.mk-watch { margin: 4px 0 0 18px; padding: 0; font-size: 14px; }
.mk-range, .mk-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-range button { padding: 4px 10px; font-size: 13px; border-radius: 999px; } .mk-range button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.mk-toggles { margin: 10px 0 6px; } .mk-toggles button { font-size: 13px; padding: 4px 10px; border-radius: 999px; opacity: .55; }
.mk-toggles button.on { opacity: 1; border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.mk-toggles i, .mk-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; }
.mk-plot { position: relative; min-height: 220px; }
.mk-plot svg { display: block; touch-action: pan-y; cursor: crosshair; }
.mk-grid { stroke: var(--line); stroke-width: 1; } .mk-ax { font-size: 11px; fill: var(--muted); }
.mk-ref { stroke: #2b8a3e; stroke-dasharray: 4 4; } .mk-cross { stroke: var(--muted); stroke-dasharray: 3 3; }
.mk-line { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .08)); } .mk-bar { opacity: .85; } .mk-bar:hover { opacity: 1; }
.mk-tip { position: absolute; top: 6px; transform: translateX(-50%); background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); pointer-events: none; white-space: nowrap; color: #18212b; }
.mk-tip small { display: block; color: #5d6b7a; }
.mk-pipe { border-left: 5px solid #e8590c; } .mk-pipe-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.mk-pbig { font-size: 44px; font-weight: 900; color: #e8590c; min-width: 70px; text-align: center; }
.mk-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.mk-srcl { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none !important; color: var(--ink); transition: transform .15s, border-color .15s; }
.mk-srcl:hover { transform: translateY(-2px); border-color: var(--navy); } .mk-srcl > span { font-size: 24px; }
.mk-srcl b { display: block; color: var(--heading); } .mk-srcl small { display: block; color: var(--muted); font-size: 12.5px; }

/* ---------- 🎯 Coaching hub ---------- */
.ch-tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.ch-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none !important; font-weight: 700; font-size: 14px; }
.ch-tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ch-period button { font-size: 13px; }
.ch-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin-bottom: 16px; }
.ch-kpi { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ch-kpi > span { font-size: 26px; } .ch-kpi b { display: block; font-size: 22px; color: var(--heading); } .ch-kpi small { display: block; color: var(--muted); font-size: 12.5px; } .ch-kpi em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.ch-att { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 10px; text-decoration: none !important; color: var(--ink); }
.ch-att:hover { background: var(--soft); } .ch-att small { display: block; color: var(--muted); font-size: 12.5px; }
.ch-av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, hsl(var(--h) 62% 56%), hsl(calc(var(--h) + 35) 60% 44%)); }
.ch-av.sm { width: 26px; height: 26px; font-size: 10.5px; border-radius: 8px; margin-right: 8px; vertical-align: middle; } .ch-av.xl { width: 74px; height: 74px; font-size: 26px; border-radius: 22px; }
.ch-medal { font-size: 28px; text-align: center; }
.ch-score { display: inline-block; min-width: 38px; text-align: center; font-weight: 900; border-radius: 999px; padding: 3px 8px; }
.ch-heat-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ch-cats { display: flex; gap: 4px; flex-wrap: wrap; } .ch-cats button { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; } .ch-cats button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ch-heat th { cursor: pointer; white-space: nowrap; font-size: 12px; } .ch-heat th.c, .ch-heat td.c { text-align: center; }
.ch-heat tbody tr { cursor: pointer; } .ch-heat tbody tr:hover td { filter: brightness(.96); }
.ch-cell { font-weight: 700; font-variant-numeric: tabular-nums; border-left: 2px solid var(--card); }
.ch-flagn { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 12px; }
.ch-flagn.sev3 { background: #e03131; } .ch-flagn.sev2 { background: #f08c00; } .ch-flagn.sev1 { background: #74c0fc; }
.ch-back { display: inline-block; margin-bottom: 10px; font-weight: 700; }
.ch-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background-image: linear-gradient(120deg, color-mix(in srgb, var(--navy) 8%, transparent), transparent 60%); }
.ch-hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ch-wins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ch-wins span { background: #fff6e0; color: #8a5a00; font-weight: 700; font-size: 12.5px; border-radius: 999px; padding: 3px 10px; }
.ch-score-box { text-align: center; } .ch-score-box small { display: block; font-size: 12px; color: var(--muted); max-width: 140px; }
.ch-ring-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.2, .9, .3, 1); }
.ch-flags { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-bottom: 16px; }
.ch-flag { border-radius: 14px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--line); border-left: 5px solid; background: var(--card); }
.ch-flag.sev3 { border-left-color: #e03131; } .ch-flag.sev2 { border-left-color: #f08c00; } .ch-flag.sev1 { border-left-color: #74c0fc; }
.ch-flag b { display: block; margin-bottom: 2px; } .ch-fix { margin-top: 6px; font-size: 13.5px; color: #2b8a3e; font-weight: 600; }
.ch-catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-bottom: 16px; }
.ch-cat h3 { margin: 0 0 10px; font-size: 15px; } .ch-cat { margin: 0 !important; }
.ch-metric { margin-bottom: 12px; } .ch-mh { display: flex; justify-content: space-between; font-size: 13.5px; } .ch-mh b { font-size: 16px; }
.ch-bar { position: relative; height: 10px; border-radius: 999px; background: var(--soft-2); margin: 4px 0 2px; }
.ch-bar i { display: block; height: 100%; border-radius: 999px; border-right: 3px solid; transition: width .8s; }
.ch-bar em { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--muted); opacity: .6; }
.ch-metric small { font-size: 11.5px; }
.ch-trend { position: relative; } .ch-trend svg { display: block; }
.ch-file { display: block; padding: 6px 8px; border-radius: 8px; text-decoration: none !important; color: var(--ink); font-size: 14px; } .ch-file:hover { background: var(--soft); } .ch-file small { display: block; color: var(--muted); font-size: 12px; }
.ch-call { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); }
.ch-call-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ch-call-btns { margin-left: auto; display: flex; gap: 6px; } .ch-call-btns button { font-size: 13px; padding: 4px 10px; }
.ch-why { font-size: 13.5px; margin-top: 4px; }
.ch-draft { background: var(--soft); border-radius: 10px; padding: 8px 10px; margin-top: 6px; } .ch-draft-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .ch-draft-h button { font-size: 12px; padding: 2px 8px; }
.ch-draft-b { white-space: pre-wrap; font-size: 14px; margin-top: 4px; }
.ch-ag { border: 2px solid #d0bfff; background-image: linear-gradient(135deg, rgba(243, 240, 255, .9), transparent 55%); }
.ch-ag-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ch-ag-sum { font-size: 16px; font-weight: 700; color: var(--heading); margin: 10px 0; }
.ch-ag-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.ch-ag ul { margin: 4px 0 10px 18px; padding: 0; font-size: 14px; }
.ch-focus { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; } .ch-focus small { display: block; margin-top: 4px; color: var(--muted); }
.ch-rev { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-bottom: 10px; }
.ch-rev a { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-decoration: none !important; color: var(--ink); background: var(--card); } .ch-rev small { display: block; color: var(--muted); font-size: 12.5px; }
.ch-scripts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 10px; margin-bottom: 10px; }
.ch-script { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.ch-sline { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: start; margin-top: 8px; } .ch-sline button { font-size: 12px; padding: 2px 7px; }
.ch-commit { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; font-size: 14px; cursor: pointer; margin: 0; } .ch-commit input { width: auto; margin-top: 3px; }
.ch-commit small { display: block; color: var(--muted); font-size: 12px; } .ch-commit.done span { text-decoration: line-through; opacity: .6; }
.ch-timeline { border-left: 3px solid var(--line); padding-left: 14px; } .ch-tl { margin-bottom: 12px; font-size: 14px; position: relative; }
.ch-tl::before { content: ""; position: absolute; left: -21px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--navy); }
.ch-cl-row { display: grid; grid-template-columns: 1fr 150px 36px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 700px) { .ch-hero { grid-template-columns: auto 1fr; } .ch-score-box { grid-column: 1 / -1; } }

/* ---------- client page sections + "In process" ---------- */
.cl-sec { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--heading); }
.cl-sec > span { font-size: 18px; } .cl-sec small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: 13px; }
.cl-sec::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); align-self: center; }
.pill-InProcess { background: #fff4e0; color: #9a5b00; border: 1px solid #f5c26b; white-space: nowrap; }
.pill-InProcess small { font-weight: 600; opacity: .8; margin-left: 2px; }
.inproc-note { display: block; margin: 10px 0 4px; padding: 9px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f5c26b; color: #7a4a00 !important; text-decoration: none !important; cursor: pointer; font-size: 14px; }
.inproc-note:hover { background: #ffefcc; }

/* ---------- 🌈 Aurora layout (replaces Top bar) ---------- */
@property --au-h { syntax: '<number>'; inherits: true; initial-value: 215; }
html.au-on { transition: --au-h 1.4s ease; background: hsl(var(--au-h) 40% 96%); }
html.au-on body { background: transparent; }
.au-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 700px at 20% 0%, hsl(var(--au-h) 75% 95%), transparent 60%), radial-gradient(1000px 800px at 100% 100%, hsl(calc(var(--au-h) + 40) 60% 93%), transparent 60%), hsl(var(--au-h) 35% 97%); }
html.living .au-bg { display: none; }
.au-bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.au-b1 { width: 480px; height: 480px; left: 0; top: 0; background: hsl(var(--au-h) 90% 72%); transform: translate(calc(var(--mx, 50vw) - 240px), calc(var(--my, 30vh) - 240px)); }
.au-b2 { width: 620px; height: 620px; right: -180px; top: -160px; background: hsl(calc(var(--au-h) + 55) 85% 74%); animation: au-drift 19s ease-in-out infinite alternate; }
.au-b3 { width: 560px; height: 560px; left: -160px; bottom: -220px; background: hsl(calc(var(--au-h) - 45) 85% 75%); animation: au-drift 23s ease-in-out infinite alternate-reverse; }
@keyframes au-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-90px, 70px) scale(1.12); } 100% { transform: translate(60px, -50px) scale(.94); } }
.au-net { position: absolute; inset: 0; width: 100%; height: 100%; }
html.calm .au-bg i { animation: none; }
.layout-aurora .topbar.au-island { position: sticky; top: 12px; margin: 12px auto 4px; width: calc(100% - 24px); max-width: 1380px; border-radius: 22px; padding: 8px 14px;
  background: rgba(255, 255, 255, .64); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 12px 40px hsl(var(--au-h) 60% 35% / .16), 0 1px 0 rgba(255, 255, 255, .9) inset; }
.layout-aurora .tb-logo { background: transparent; padding: 0; }
.layout-aurora .tb-item > a { color: var(--ink); }
.layout-aurora .tb-item > a:hover, .layout-aurora .tb-item:focus-within > a { background: hsl(var(--au-h) 80% 60% / .14); color: hsl(var(--au-h) 70% 28%); }
.layout-aurora .tb-item.active > a { background: hsl(var(--au-h) 80% 55% / .18); color: hsl(var(--au-h) 75% 26%); }
.layout-aurora .tb-cursor { bottom: -6px; background: hsl(var(--au-h) 85% 52%); box-shadow: 0 0 16px hsl(var(--au-h) 85% 55%); }
.layout-aurora .tb-icon { display: inline-block; transform: translateY(calc(var(--mag, 0) * -3px)) scale(calc(1 + var(--mag, 0) * .5)); transition: transform .12s ease-out; }
.layout-aurora .tb-item > a:hover .tb-icon { transform: translateY(-3px) scale(1.5) rotate(-6deg); }
.layout-aurora .tb-drop { background: rgba(255, 255, 255, .9); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 16px 40px hsl(var(--au-h) 50% 30% / .2); }
.layout-aurora .tb-drop a.sub { color: var(--ink); } .layout-aurora .tb-drop a.sub:hover { background: hsl(var(--au-h) 80% 60% / .14); color: var(--ink); }
.layout-aurora .tb-drop a.sub.active { background: hsl(var(--au-h) 80% 50%); color: #fff; }
.layout-aurora .tb-right .me-card { background: transparent; color: var(--ink); }
.layout-aurora .tb-out { background: rgba(255, 255, 255, .7); color: var(--ink); border: 1px solid var(--line); }
.layout-aurora .sh-search.on-dark { background: rgba(255, 255, 255, .7); border-color: var(--line); color: var(--muted); }
.layout-aurora .sh-search.on-dark kbd { background: #fff; border-color: var(--line); color: var(--muted); }
.layout-aurora .layout-switch { background: rgba(255, 255, 255, .6); border: 1px solid var(--line); } .layout-aurora .layout-switch button { color: var(--muted); }
.layout-aurora .main .card, .layout-aurora .main .stat { background-color: rgba(255, 255, 255, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, .9); box-shadow: 0 6px 24px hsl(var(--au-h) 50% 30% / .08); transition: transform .2s, box-shadow .2s; }
.layout-aurora .main .card:hover, .layout-aurora .main .stat:hover { box-shadow: 0 12px 34px hsl(var(--au-h) 50% 30% / .14); }
.layout-aurora .main .stat:hover { transform: translateY(-2px); }
.layout-aurora .main.page-enter { animation: au-in .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes au-in { from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
html[data-theme="midnight"].au-on, html[data-theme="midnight"] .au-bg { background: hsl(var(--au-h) 30% 8%); }
html[data-theme="midnight"] .layout-aurora .topbar.au-island, html[data-theme="midnight"] .layout-aurora .main .card, html[data-theme="midnight"] .layout-aurora .main .stat { background-color: rgba(22, 29, 39, .78); border-color: rgba(255, 255, 255, .08); }
.layout-aurora .sh-search.compact { flex: 0 0 auto; padding: 8px 11px; margin: 0; }
.layout-aurora .sh-search.compact .sh-ph, .layout-aurora .sh-search.compact kbd { display: none; }
.layout-aurora .tb-nav { flex-wrap: nowrap; }
.layout-aurora .tb-item > a { padding: 9px 8px; }
@media (max-width: 1350px) { .layout-aurora .tb-item.active .tb-label { max-width: 0; opacity: 0; } .layout-aurora .tb-item:hover .tb-label { max-width: 170px; opacity: 1; } .layout-aurora .tb-right .me-card b { display: none; } }

/* ---------- owner tools ---------- */
.ow-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin-bottom: 16px; }
.ow-tile { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ow-tile > span { font-size: 26px; } .ow-tile b { display: block; font-size: 22px; color: var(--heading); } .ow-tile small { display: block; color: var(--muted); font-size: 12.5px; } .ow-tile em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.ow-tile.good { border-left-color: #2b8a3e; } .ow-tile.warn { border-left-color: #f08c00; } .ow-tile.bad { border-left-color: #e03131; }
.ow-tile.big b { font-size: 34px; } .ow-tile.big.good b { color: #2b8a3e; } .ow-tile.big.warn b { color: #e67700; } .ow-tile.big.bad b { color: #c92a2a; }
.ow-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.ow-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .ow-form input, .ow-form select { width: auto; } .ow-form label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; margin: 0; }
.ow-state { display: inline-block; font-weight: 900; background: var(--soft-2); border-radius: 6px; padding: 1px 7px; }
.ow-late { color: #c92a2a; font-weight: 700; }
.ow-report { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; } .ow-report > small { display: block; color: var(--muted); margin-bottom: 8px; }
.ow-check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-radius: 8px; font-size: 14px; margin: 0; cursor: pointer; } .ow-check input { width: auto; margin-top: 3px; }
.ow-check.on span { color: #2b8a3e; } .ow-check small { display: block; color: var(--muted); font-size: 12px; }
.ow-progress { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; } .ow-bar { flex: 1; height: 12px; border-radius: 999px; background: var(--soft-2); overflow: hidden; } .ow-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2b8a3e, #69db7c); border-radius: 999px; }
.ow-road { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; } .ow-road .card { margin: 0; }
.ow-ri { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); } .ow-ri small { display: block; color: var(--muted); font-size: 13px; } .ow-ri.next b { color: var(--muted); }
.ow-table td, .ow-table th { white-space: nowrap; } .ow-pos { color: #2b8a3e; } .ow-neg { color: #c92a2a; }
.ow-revbar { position: relative; min-width: 140px; height: 22px; background: var(--soft-2); border-radius: 6px; overflow: hidden; } .ow-revbar i { display: block; height: 100%; background: linear-gradient(90deg, #74c0fc, #1c7ed6); } .ow-revbar span { position: absolute; left: 8px; top: 2px; font-size: 12.5px; font-weight: 800; }
.ow-cost { width: 80px !important; text-align: right; padding: 3px 6px; }
.ow-roi { font-weight: 900; border-radius: 999px; padding: 2px 8px; } .ow-roi.good { background: #e3f6e8; color: #1f7a3f; } .ow-roi.warn { background: #fff4e0; color: #9a5b00; } .ow-roi.bad { background: #ffe3e3; color: #c92a2a; }
.ow-team { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); } .ow-team small { display: block; color: var(--muted); font-size: 12.5px; } .ow-team.low { opacity: .85; }
.ow-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-top: 10px; }
.ow-pcard { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: transform .15s, box-shadow .15s; } .ow-pcard:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 44, 76, .1); }
.ow-plink { display: block; padding: 12px 14px; color: var(--ink); text-decoration: none !important; } .ow-pick { position: absolute; right: 10px; top: 10px; margin: 0; } .ow-pick input { width: auto; }
.ow-ph { display: flex; gap: 10px; align-items: center; } .ow-ph small { display: block; color: var(--muted); font-size: 12.5px; } .ow-int { padding: 12px 14px; } .ow-int .tag { margin-top: 8px; display: inline-block; } .ow-big { font-size: 28px; }
.ow-pav { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; color: #fff; font-weight: 800; background: linear-gradient(135deg, hsl(var(--h) 62% 56%), hsl(calc(var(--h) + 35) 60% 44%)); } .ow-pav.xl { width: 70px; height: 70px; font-size: 24px; border-radius: 20px; }
.ow-pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 6px; text-align: center; } .ow-pstats b { display: block; font-size: 17px; color: var(--heading); } .ow-pstats small { font-size: 11px; color: var(--muted); }
.ow-pstats.big b { font-size: 24px; } .ow-quiet { color: #b45309; font-size: 12.5px; }
.ow-phero { display: grid; grid-template-columns: auto 1fr minmax(260px, auto); gap: 16px; align-items: center; } @media (max-width: 800px) { .ow-phero { grid-template-columns: auto 1fr; } .ow-phero .ow-pstats { grid-column: 1 / -1; } }
.cp-queue { border: 2px solid #c5f6fa; } .cp-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: var(--card); }
.cp-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .cp-subj { font-size: 13.5px; margin: 6px 0 4px; } .cp-body { width: 100%; margin-top: 6px; }
.cp-ch { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: var(--soft-2); } .cp-ch.text { background: #e7f5ff; color: #1864ab; } .cp-ch.email { background: #f3f0ff; color: #5f3dc4; } .cp-ch.call { background: #ebfbee; color: #2b8a3e; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 12px; } .cp-grid .card { margin: 0; } .cp-camp.off { opacity: .6; }
.cp-steps { border-left: 3px solid var(--line); padding-left: 12px; } .cp-step { display: grid; grid-template-columns: 56px 30px 1fr; gap: 6px; align-items: start; padding: 5px 0; font-size: 13.5px; } .cp-day { font-weight: 800; color: var(--heading); font-size: 12.5px; } .cp-txt { color: var(--muted); }
.cp-erow { display: grid; grid-template-columns: 70px 90px 200px 1fr 36px; gap: 6px; margin-top: 6px; } @media (max-width: 800px) { .cp-erow { grid-template-columns: 70px 90px 1fr 36px; } .cp-erow textarea { grid-column: 1 / -1; } }
.cl-consent { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.cl-consent label { display: flex; gap: 6px; align-items: center; margin: 0; cursor: pointer; } .cl-consent input { width: auto; } .cl-consent small { flex-basis: 100%; }
.cp-trid { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--soft); margin-bottom: 6px; border-left: 4px solid var(--line); }
.cp-trid small { display: block; color: var(--muted); font-size: 12.5px; } .cp-trid.ok { border-left-color: #2b8a3e; } .cp-trid.late { border-left-color: #e03131; background: #fff5f5; }
.pt-link { display: flex; gap: 6px; flex-wrap: wrap; } .pt-link input { flex: 1; min-width: 220px; font-size: 13px; }
.pt-msgs { margin-top: 10px; max-height: 260px; overflow: auto; } .pt-msg { max-width: 80%; padding: 7px 10px; border-radius: 12px; margin: 5px 0; font-size: 14px; } .pt-msg small { display: block; font-size: 11px; opacity: .7; }
.pt-msg.them { background: var(--soft-2); } .pt-msg.me { margin-left: auto; background: var(--navy); color: #fff; }
.pt-reply { display: flex; gap: 6px; margin-top: 8px; } .pt-reply input { flex: 1; }
.ch-cs-form { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; align-items: start; } @media (max-width: 800px) { .ch-cs-form { grid-template-columns: 1fr; } }
.ch-cs { border: 1px solid #d0bfff; border-radius: 14px; padding: 12px 14px; margin-top: 10px; background: linear-gradient(135deg, rgba(243, 240, 255, .8), transparent 60%); }
.ch-cs-h { display: flex; gap: 10px; align-items: center; font-size: 15px; } .ch-cs-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; margin: 10px 0; }
.ch-cs-cats > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; } .ch-cs-cats small { display: block; font-weight: 700; font-size: 12.5px; } .ch-cs-cats em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.ch-stars { color: #f59f00; letter-spacing: 1px; } .ch-cs-past { margin-top: 6px; } .ch-cs-past summary { cursor: pointer; font-size: 14px; }

.ow-lics { display: grid; gap: 4px; max-height: 520px; overflow: auto; }
.ow-lic-row { display: grid; grid-template-columns: 220px 1fr; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.ow-lic-who small { display: block; color: var(--muted); font-size: 12px; }
.ow-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ow-chip { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 12.5px; border-radius: 7px; padding: 2px 8px; cursor: default; }
.ow-chip.good { background: #e3f6e8; color: #1f7a3f; } .ow-chip.warn { background: #fff4e0; color: #9a5b00; box-shadow: inset 0 0 0 1px #f5c26b; } .ow-chip.bad { background: #ffe3e3; color: #c92a2a; box-shadow: inset 0 0 0 1px #ffa8a8; }
.ow-chip button { border: 0; background: transparent; padding: 0 0 0 2px; font-size: 13px; line-height: 1; color: inherit; opacity: .45; cursor: pointer; } .ow-chip button:hover { opacity: 1; }
@media (max-width: 700px) { .ow-lic-row { grid-template-columns: 1fr; } }

.ow-form[hidden], form[hidden] { display: none !important; }

/* ---------- public demo ---------- */
.demo-browse { margin-top: 16px; display: grid; gap: 8px; }
.demo-or { text-align: center; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.demo-or::before, .demo-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-as { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; text-align: left; align-items: center; column-gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.demo-as:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 44, 76, .12); border-color: var(--navy); }
.demo-as span { grid-row: 1 / 3; font-size: 24px; } .demo-as small { color: var(--muted); font-size: 12px; }
.demo-note { font-size: 12px; color: var(--muted); text-align: center; }
.demo-ribbon { margin: -6px 0 14px; padding: 7px 12px; border-radius: 10px; background: linear-gradient(90deg, #fff4e0, #f3f0ff); border: 1px solid #f5d9a8; font-size: 13px; color: #6b4a00; text-align: center; }

/* ---------- 👑 Owner HQ ---------- */
.oh-hero { display: grid; grid-template-columns: minmax(240px, auto) 1fr; gap: 20px; align-items: center; padding: 22px 24px; margin-bottom: 18px; border-radius: 22px; color: #fff;
  background: radial-gradient(800px 300px at 0% 0%, rgba(255, 210, 120, .35), transparent 60%), linear-gradient(135deg, #1c2f52, #2c1f5c 60%, #4a2a6e); box-shadow: 0 16px 40px rgba(28, 47, 82, .25); }
.oh-hero h1 { color: #fff; margin: 2px 0 4px; font-size: 30px; } .oh-kicker { font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: #f3d27a; }
.oh-sub { color: #d9def0; font-size: 14.5px; }
.oh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.oh-kpi { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; padding: 10px 12px; backdrop-filter: blur(6px); }
.oh-kpi span { font-size: 18px; } .oh-kpi b { display: block; font-size: 22px; color: #fff; } .oh-kpi small { color: #d9def0; font-size: 12px; }
.oh-section { font-size: 18px; font-weight: 900; color: var(--heading); margin: 6px 0 12px; } .oh-section small { font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 8px; }
.oh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.oh-tool { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none !important; box-shadow: 0 4px 14px rgba(15, 44, 76, .06); transition: transform .2s, box-shadow .2s, border-color .2s; animation: oh-in .45s both; animation-delay: var(--d); overflow: hidden; }
.oh-tool::after { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.oh-tool:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 44, 76, .14); border-color: color-mix(in srgb, var(--navy) 40%, var(--line)); } .oh-tool:hover::after { opacity: 1; }
.oh-ic { width: 48px; height: 48px; display: grid; place-items: center; font-size: 26px; border-radius: 15px; background: var(--soft-2); margin-bottom: 4px; transition: transform .25s; }
.oh-tool:hover .oh-ic { transform: rotate(-8deg) scale(1.08); }
.oh-tool b { font-size: 16.5px; color: var(--heading); } .oh-tool small { color: var(--muted); font-size: 13px; min-height: 34px; }
.oh-stat { margin-top: 6px; align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft-2); color: var(--muted); }
.oh-stat i { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--soft-2), var(--line), var(--soft-2)); background-size: 200% 100%; animation: oh-shim 1.2s infinite; vertical-align: middle; }
.oh-stat.good { background: #e3f6e8; color: #1f7a3f; } .oh-stat.warn { background: #fff4e0; color: #9a5b00; } .oh-stat.bad { background: #ffe3e3; color: #c92a2a; }
@keyframes oh-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes oh-shim { to { background-position: -200% 0; } }
@media (max-width: 760px) { .oh-hero { grid-template-columns: 1fr; } }

/* Create an account (private workspace) + the link to it from the public demo */
.su-link { text-align: center; margin-top: 14px; font-size: 14px; color: var(--muted); }
.su-link a { font-weight: 700; }
.su-form { display: grid; gap: 12px; }
.su-form small { font-weight: 400; }
.demo-own { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 12px; text-align: center; font-size: 14px; text-decoration: none;
  background: linear-gradient(135deg, rgba(245, 159, 0, .14), rgba(28, 47, 82, .08)); border: 1px solid rgba(245, 159, 0, .45); color: inherit; }
.demo-own:hover { border-color: rgba(245, 159, 0, .9); }

/* ---------- 📚 Guidelines ---------- */
.gl-hero { margin-bottom: 14px; }
.gl-hero h1 { margin: 0 0 4px; }
.gl-client { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft, rgba(28, 47, 82, .05)); }
.gl-ask textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); resize: vertical; background: var(--card, #fff); color: inherit; }
.gl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.gl-row label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); flex: 1 1 160px; }
.gl-row select { font: inherit; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card, #fff); color: inherit; }
.gl-go { flex: 0 0 auto; padding: 11px 18px; }
.gl-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.gl-chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.gl-chip:hover { border-color: var(--gold, #f59f00); background: rgba(245, 159, 0, .08); }
.gl-wait { display: flex; gap: 14px; align-items: center; }
.gl-result { border-left: 4px solid var(--gold, #f59f00); }
.gl-q { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.gl-qi { font-size: 22px; line-height: 1; }
.gl-meta { font-size: 13px; margin-top: 2px; }
.gl-answer { line-height: 1.6; }
.gl-answer ul { margin: 4px 0 10px; padding-left: 20px; }
.gl-answer li { margin: 3px 0; }
.gl-answer p { margin: 4px 0 10px; }
.gl-h { font-size: 15px; margin: 14px 0 4px; }
.gl-h.lead + p, .gl-h.lead + ul { font-size: 16.5px; }
.gl-cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin-left: 2px; border-radius: 6px; font-size: 11px; font-weight: 800;
  vertical-align: super; text-decoration: none; background: rgba(28, 126, 214, .14); color: #1c7ed6; }
.gl-sources { margin-top: 14px; display: grid; gap: 6px; }
.gl-sh { font-weight: 800; font-size: 14px; }
.gl-src { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.gl-src:hover { border-color: #1c7ed6; }
.gl-src small { display: block; color: var(--muted); font-size: 12px; word-break: break-all; }
.gl-n { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #1c7ed6; color: #fff; font-size: 12px; font-weight: 800; }
.gl-also { margin-top: 8px; font-size: 13px; }
.gl-also a { display: block; margin: 4px 0 0 14px; }
.gl-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }
.gl-actions { display: flex; gap: 6px; }
.gl-st { margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.gl-st .muted { font-weight: 400; font-size: 13px; }
.gl-scope { margin-left: auto; display: flex; gap: 4px; }
.gl-scope .on { background: var(--navy, #1c2f52); color: #fff; }
.gl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.gl-card { display: flex; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card, #fff); }
.gl-ci { font-size: 24px; line-height: 1; }
.gl-cb .muted { font-size: 13px; margin: 2px 0 6px; }
.gl-cl { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.gl-link { border: 0; background: none; padding: 0; font: inherit; color: var(--gold-dark, #b86e00); cursor: pointer; }
.gl-hist { padding: 4px 0; }
.gl-hrow { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.gl-hrow:last-child { border-bottom: 0; }
.gl-hrow:hover { background: rgba(245, 159, 0, .06); }
.gl-hrow .muted { font-size: 12.5px; }
.gl-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px; }
.gl-del:hover { background: rgba(224, 49, 49, .1); color: #e03131; }
@media (max-width: 640px) { .gl-go { width: 100%; } .gl-foot { flex-direction: column; align-items: flex-start; } }

/* ---------- 🛡 Compliance center (tabs, program, deadlines, logs) ---------- */
.cc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 16px; }
.cc-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 700; font-size: 14px; background: var(--card, #fff); }
.cc-tabs a.on { background: var(--navy, #1c2f52); color: #fff; border-color: transparent; }
.cc-prog { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cc-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--card, #fff) 76%, transparent 77% 100%), conic-gradient(#2f9e44 calc(var(--p) * 1%), var(--line) 0); }
.cc-ring b { font-size: 22px; line-height: 1; } .cc-ring small { font-size: 11px; color: var(--muted); }
.cc-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cc-filter .on { background: var(--navy, #1c2f52); color: #fff; }
.cc-area { padding-bottom: 6px; }
.cc-ah { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cc-ah h2 { margin: 0; font-size: 17px; }
.cc-count { font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: rgba(245, 159, 0, .15); }
.cc-count.ok { background: rgba(47, 158, 68, .15); color: #2b8a3e; }
.cc-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.cc-item.attn .cc-title b::before { content: '⚠️ '; }
.cc-item.st-in_place:not(.attn) .cc-title b { color: #2b8a3e; }
.cc-item.st-na { opacity: .6; }
.cc-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cc-freq { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--soft, rgba(28, 47, 82, .06)); color: var(--muted); }
.cc-what { font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.cc-what a { white-space: nowrap; font-weight: 700; }
.cc-meta { font-size: 12.5px; margin-top: 4px; color: var(--muted); }
.cc-ctl { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.cc-seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cc-seg button { border: 0; background: transparent; color: inherit; padding: 6px 9px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.cc-seg button + button { border-left: 1px solid var(--line); }
.cc-seg button.on { background: var(--navy, #1c2f52); color: #fff; }
.cc-more { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; align-items: end; padding: 10px; border-radius: 12px; background: var(--soft, rgba(28, 47, 82, .05)); }
.cc-more[hidden], .cc-form[hidden] { display: none; }
.cc-more label, .cc-form label { display: grid; gap: 3px; font-size: 12.5px; color: var(--muted); }
.cc-more .wide, .cc-form .wide { grid-column: 1 / -1; }
.cc-more input, .cc-more select, .cc-form input, .cc-form select, .cc-form textarea { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card, #fff); color: inherit; }
.cc-cal h2 { margin: 0 0 8px; font-size: 17px; }
.cc-cal summary { cursor: pointer; }
.cc-ev { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.cc-ev small { display: block; color: var(--muted); font-size: 12.5px; }
.cc-date { text-align: center; border-radius: 10px; background: var(--soft, rgba(28, 47, 82, .06)); padding: 4px 0; line-height: 1.1; }
.cc-date b { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.cc-date span { font-size: 19px; font-weight: 800; }
.cc-ev.late .cc-date { background: rgba(224, 49, 49, .14); } .cc-ev.late .cc-when { color: #e03131; font-weight: 800; }
.cc-ev.soon .cc-date { background: rgba(245, 159, 0, .18); } .cc-ev.soon .cc-when { color: #b86e00; font-weight: 700; }
.cc-when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cc-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.cc-kinds button { border: 1px solid var(--line); background: var(--card, #fff); color: inherit; border-radius: 14px; padding: 10px 12px; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.cc-kinds button small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.cc-kinds button.on { border-color: var(--gold, #f59f00); box-shadow: 0 0 0 2px rgba(245, 159, 0, .25); }
.cc-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--soft, rgba(28, 47, 82, .05)); }
.cc-fbtn { grid-column: 1 / -1; display: flex; gap: 8px; }
.cc-det { max-width: 340px; font-size: 13px; }
@media (max-width: 700px) { .cc-item { grid-template-columns: 1fr; } .cc-ctl { align-items: flex-start; } .cc-seg span { display: none; } }

/* Public demo sign-in card: a button to the private site instead of a password box */
.demo-signin { display: block; text-align: center; text-decoration: none; padding: 13px 16px; border-radius: 12px; font-weight: 800; font-size: 16px; margin-top: 6px; }
.demo-signin-sub { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
