/* =========================================================================
   Turney Insurance Advisors — Onboarding app styles
   ========================================================================= */
:root {
  --brand:        #1e3a5f;
  --brand-light:  #2f5a8f;
  --accent:       #2563eb;
  --bg:           #f1f5f9;
  --card:         #ffffff;
  --line:         #e2e8f0;
  --text:         #0f172a;
  --muted:        #64748b;
  --good:         #16a34a;
  --good-bg:      #dcfce7;
  --bad:          #dc2626;
  --bad-bg:       #fee2e2;
  --shadow:       0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  /* one motion easing for the whole site (see "MOTION SYSTEM" below) */
  --ease:         cubic-bezier(.22,.61,.36,1);

  /* Shared "header band" height: every page reserves this much for its heading
     area so the gap from the menu bar to the headline is identical site-wide.
     It's sized to the home page's "Road" widget so that widget can sit inline
     with the greeting WITHOUT pushing it down — and so the home heading doesn't
     jump when the widget finishes loading (the space is reserved up front). */
  --head-min:     118px;

  /* --- refined "liquid glass" for cards/tiles/modals --------------------------
     A quieter, flatter cousin of the menu bar: frosted translucent white, a
     hairline light edge, one faint top sheen (not the bar's double-inset 3D),
     and a soft shadow. The bar stays the centerpiece; everything else matches. */
  --glass-bg:        rgba(255,255,255,.60);   /* cards resting on the light page */
  --glass-bg-solid:  rgba(255,255,255,.88);   /* modals, which sit over a dark scrim */
  --glass-border:    rgba(255,255,255,.65);
  --glass-blur:      saturate(150%) blur(14px);
  --glass-shadow:    0 1px 2px rgba(15,23,42,.05),
                     0 10px 30px -18px rgba(15,23,42,.22),
                     inset 0 1px 0 rgba(255,255,255,.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* iOS fills the safe-area zones (notch / home-indicator) with the ROOT
   background. Because body uses background-attachment:fixed (for the ambient
   wash), its background doesn't reach those zones — so we paint the base colour
   on <html> to keep the top/bottom edges seamless (no hard line). */
html { background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* A whisper of ambient tint so the frosted cards have something to refract.
     Two very faint, fixed color washes over the flat base — barely perceptible. */
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(37,99,235,.05), transparent 60%),
    radial-gradient(820px 520px at 100% 0%, rgba(30,58,95,.045), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); }

/* ---- top bar ---- */
/* Floating, rounded "island" menu bar */
.topbar {
  color: #fff;
  position: sticky; top: 14px; z-index: 20;
  margin-top: 14px;
  padding: 0 16px;
  background: transparent;
  transition: top .26s var(--ease);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  /* liquid glass: a soft top sheen over a translucent navy fill */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 46%),
    rgba(30, 58, 95, .66);
  -webkit-backdrop-filter: blur(26px) saturate(195%);
          backdrop-filter: blur(26px) saturate(195%);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  /* outer lift + a thin specular edge up top and a hint of depth below */
  box-shadow:
    0 8px 28px -10px rgba(8, 20, 38, .40),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(8, 20, 38, .16);
  transition: padding .26s var(--ease),
              background .26s ease, box-shadow .26s ease,
              border-radius .26s ease, transform .26s var(--ease);
}
/* Fallback for browsers without backdrop-filter support */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar-inner { background: var(--brand); }
  /* Without frosting, fall back to solid surfaces so text stays crisp. */
  .tile, .mgr-card, .overall, .section, .proc-card, .statement-row { background: #fff; }
  .modal, .profile-menu, .nav-drawer, .login-card { background: #fff; }
}
/* condensed state once the page scrolls: tighter, a touch more solid, lifted */
.topbar.scrolled { top: 8px; }
.topbar.scrolled .topbar-inner {
  padding-top: 11px; padding-bottom: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 46%),
    rgba(24, 47, 79, .80);
  border-radius: 16px;
  box-shadow:
    0 12px 34px -12px rgba(8, 20, 38, .55),
    inset 0 1px 0 rgba(255, 255, 255, .20),
    inset 0 -1px 0 rgba(8, 20, 38, .18);
}
@media (prefers-reduced-motion: reduce) {
  .topbar, .topbar-inner, .topbar .brand .logo { transition: none; }
}
.topbar .brand { display:flex; align-items:center; }
.topbar .brand .logo { height:48px; width:auto; display:block; transition: height .19s ease; }
.topbar.scrolled .brand .logo { height:38px; }

/* main page title (entrance handled by the unified MOTION SYSTEM cascade) */
/* page titles match the home greeting (.hub-greeting/.hub-sub) so every
   screen shares one heading treatment. */
.page-head {
  margin:0 0 30px;
  min-height:var(--head-min);
  display:flex; flex-direction:column; justify-content:center;
}
.page-title {
  font-size:32px; font-weight:800; letter-spacing:-.02em; line-height:1.14;
  margin:0; color:var(--brand);
}
.page-subtitle { margin:9px 0 0; font-size:15.5px; color:var(--muted); }

/* breadcrumb injected under the topbar on every page but Home (js/nav.js).
   Flat hub, so it's always: Home › <current page>. Quiet and Apple-style —
   the Home crumb is a soft link, the current page is the bold trailing crumb. */
.page-crumbs {
  display:flex; flex-wrap:wrap; align-items:center; gap:5px;
  margin:0 0 20px; font-size:13.5px; line-height:1;
}
.page-crumb {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 9px; border-radius:8px;
  font-weight:500; color:var(--muted); text-decoration:none;
  transition:color .14s var(--ease), background .14s var(--ease);
}
.page-crumb-home { opacity:.85; }
a.page-crumb:hover { color:var(--brand); background:#fff; }
a.page-crumb:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.page-crumb.is-current { color:var(--text); font-weight:600; }
.page-crumb-sep { display:inline-flex; align-items:center; color:var(--muted); opacity:.55; }

/* ===========================================================================
   SITE FOOTER — quiet, minimal, Apple-style. Injected by js/nav.js on every
   signed-in page. In-flow (never sticky), centered, with a hairline divider.
   =========================================================================== */
.site-footer {
  margin-top: 64px;
  padding: 30px 20px 40px;
  border-top: 1px solid var(--line);
}
.foot-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 16px;
}
.foot-meta {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--muted);
}
.foot-brand { font-weight: 600; color: var(--text); }
.foot-dot { color: var(--line); }
.foot-help {
  color: var(--accent); text-decoration: none; font-weight: 500;
  transition: color .14s var(--ease);
}
.foot-help:hover { color: var(--brand); }
.foot-fine {
  margin: 0; font-size: 11.5px; color: var(--muted); opacity: .85;
  letter-spacing: .01em;
}
@media (max-width: 560px) {
  .site-footer { margin-top: 44px; padding: 24px 16px 32px; }

  /* Phone: pull the floating bar up and let it use more width, so it reads as
     a proper header instead of a small island with wasted space around it.
     Tighter inner padding nudges the logo left and the profile right. */
  .topbar { top: 7px; margin-top: 7px; padding: 0 9px; }
  .topbar-inner { padding: 13px 14px; border-radius: 16px; }
  .topbar.scrolled { top: 6px; }
  .topbar.scrolled .topbar-inner { border-radius: 14px; }
  .topbar .brand .logo { height: 40px; }
  .topbar.scrolled .brand .logo { height: 34px; }
  .topbar .right { gap: 10px; }

  /* Trim the big top/bottom gaps so content sits closer to the bar and the
     page fills the screen better. */
  .wrap { padding: 24px 18px 56px; }
}

/* ===========================================================================
   MOTION SYSTEM — one easing, one entrance, applied site-wide.
   ---------------------------------------------------------------------------
   Easing      : var(--ease)  — used by every transition & animation.
   Entrance    : riseIn = fade + 14px rise, .5s.
   Cascade     : a page's content reveals top-to-bottom, ~80ms between steps.
                 Hero grids / section cards fan their cards in on the same beat.
   Connective  : <body> fades in on load; on an internal navigation shell.js
                 fades the page out and lifts the tapped tile, then loads the
                 next page — so tile -> tool reads as one continuous motion.
   Opacity-only on <body> keeps the sticky topbar / fixed rail intact.
   =========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  body { animation: pageIn .26s var(--ease) backwards; }
  @keyframes pageIn { from { opacity:0; } }
  @keyframes riseIn { from { opacity:0; transform:translateY(14px); } }

  /* page-level cascade: top-level blocks rise in, in document order.
     list/grid containers are excluded — their cards cascade instead (below).
     (.home-wrap also carries .wrap, so excluding .tiles here covers home too.) */
  .wrap > *:not(#sections):not(#content):not(.tiles) {
    animation: riseIn .38s var(--ease) backwards;
  }
  .wrap > *:nth-child(1) { animation-delay:.03s; }
  .wrap > *:nth-child(2) { animation-delay:.09s; }
  .wrap > *:nth-child(3) { animation-delay:.15s; }
  .wrap > *:nth-child(4) { animation-delay:.21s; }
  .wrap > *:nth-child(n+5) { animation-delay:.27s; }

  /* card cascades: hero tiles, onboarding sections, admin panels — same beat */
  .tiles > *,
  #sections > .section:not(.just-opened),
  #content > *:not(.tiles) {
    animation: riseIn .38s var(--ease) backwards;
  }
  .tiles > *:nth-child(1) { animation-delay:.12s; }
  .tiles > *:nth-child(2) { animation-delay:.18s; }
  .tiles > *:nth-child(3) { animation-delay:.24s; }
  .tiles > *:nth-child(n+4) { animation-delay:.3s; }

  #content > *:not(.tiles):nth-child(1) { animation-delay:.09s; }
  #content > *:not(.tiles):nth-child(2) { animation-delay:.15s; }
  #content > *:not(.tiles):nth-child(3) { animation-delay:.21s; }
  #content > *:not(.tiles):nth-child(n+4) { animation-delay:.27s; }

  #sections > .section:nth-child(1) { animation-delay:.21s; }
  #sections > .section:nth-child(2) { animation-delay:.27s; }
  #sections > .section:nth-child(3) { animation-delay:.33s; }
  #sections > .section:nth-child(4) { animation-delay:.39s; }
  #sections > .section:nth-child(n+5) { animation-delay:.43s; }

  /* data-driven text (e.g. the onboarding subtitle) settles in with the same
     entrance whenever it's populated, instead of hard-popping after load */
  .sub-reveal { animation: riseIn .34s var(--ease) both; }

  /* the Agent Arsenal loads async from Google Drive, so it misses the page
     cascade. Let the populated card rise in on arrival, congruent with tiles. */
  .arsenal-section.collapsed { animation: riseIn .38s var(--ease) backwards; }

  /* standalone Agent Arsenal page: the cards are injected after load, so give
     them the same staggered rise as the home tiles instead of snapping in. */
  .arsenal-grid > * { animation: riseIn .38s var(--ease) backwards; }
  .arsenal-grid > *:nth-child(1) { animation-delay:.04s; }
  .arsenal-grid > *:nth-child(2) { animation-delay:.09s; }
  .arsenal-grid > *:nth-child(3) { animation-delay:.14s; }
  .arsenal-grid > *:nth-child(4) { animation-delay:.18s; }
  .arsenal-grid > *:nth-child(5) { animation-delay:.22s; }
  .arsenal-grid > *:nth-child(6) { animation-delay:.27s; }
  .arsenal-grid > *:nth-child(7) { animation-delay:.32s; }
  .arsenal-grid > *:nth-child(8) { animation-delay:.36s; }
  .arsenal-grid > *:nth-child(n+9) { animation-delay:.41s; }

  /* Processes page: the table is fetched async from Google Sheets, so its rows
     would otherwise snap in. Give the freshly-loaded rows the same staggered
     rise. Gated by .proc-animate (added only on a fresh load, not on search)
     so filtering as you type doesn't re-animate the whole table. */
  .proc-table.proc-animate tbody tr { animation: riseIn .38s var(--ease) backwards; }
  .proc-table.proc-animate tbody tr:nth-child(1) { animation-delay:.04s; }
  .proc-table.proc-animate tbody tr:nth-child(2) { animation-delay:.08s; }
  .proc-table.proc-animate tbody tr:nth-child(3) { animation-delay:.11s; }
  .proc-table.proc-animate tbody tr:nth-child(4) { animation-delay:.14s; }
  .proc-table.proc-animate tbody tr:nth-child(5) { animation-delay:.17s; }
  .proc-table.proc-animate tbody tr:nth-child(6) { animation-delay:.2s; }
  .proc-table.proc-animate tbody tr:nth-child(7) { animation-delay:.22s; }
  .proc-table.proc-animate tbody tr:nth-child(8) { animation-delay:.26s; }
  .proc-table.proc-animate tbody tr:nth-child(9) { animation-delay:.29s; }
  .proc-table.proc-animate tbody tr:nth-child(10) { animation-delay:.32s; }
  .proc-table.proc-animate tbody tr:nth-child(n+11) { animation-delay:.35s; }

  /* Async lists rise in once, gated by a per-container class so filtering /
     searching (which re-renders the list) doesn't re-fire the cascade.
       Commissions statement rows — #statements-list.stmt-animate
       Manager hub user list    — .mgr-user-list.mgr-animate
       Manager hub progress     — .admin-table.mgr-animate
       Manager hub statements   — .mgr-stmt-list.mgr-animate
     Statement rows use :nth-of-type because an empty-state <p> precedes them. */
  #statements-list.stmt-animate > .statement-row,
  .mgr-user-list.mgr-animate > .mgr-user-row,
  .admin-table.mgr-animate tbody tr,
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row { animation: riseIn .38s var(--ease) backwards; }

  #statements-list.stmt-animate > .statement-row:nth-of-type(1),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(1),
  .admin-table.mgr-animate tbody tr:nth-child(1),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(1) { animation-delay:.04s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(2),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(2),
  .admin-table.mgr-animate tbody tr:nth-child(2),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(2) { animation-delay:.08s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(3),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(3),
  .admin-table.mgr-animate tbody tr:nth-child(3),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(3) { animation-delay:.11s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(4),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(4),
  .admin-table.mgr-animate tbody tr:nth-child(4),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(4) { animation-delay:.14s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(5),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(5),
  .admin-table.mgr-animate tbody tr:nth-child(5),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(5) { animation-delay:.17s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(6),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(6),
  .admin-table.mgr-animate tbody tr:nth-child(6),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(6) { animation-delay:.2s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(7),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(7),
  .admin-table.mgr-animate tbody tr:nth-child(7),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(7) { animation-delay:.22s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(8),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(8),
  .admin-table.mgr-animate tbody tr:nth-child(8),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(8) { animation-delay:.26s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(9),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(9),
  .admin-table.mgr-animate tbody tr:nth-child(9),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(9) { animation-delay:.29s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(10),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(10),
  .admin-table.mgr-animate tbody tr:nth-child(10),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(10) { animation-delay:.32s; }
  #statements-list.stmt-animate > .statement-row:nth-of-type(n+11),
  .mgr-user-list.mgr-animate > .mgr-user-row:nth-child(n+11),
  .admin-table.mgr-animate tbody tr:nth-child(n+11),
  .mgr-stmt-list.mgr-animate > .mgr-stmt-row:nth-child(n+11) { animation-delay:.35s; }

  /* Commission-statements tool: the "Post a statement" card is revealed the
     instant an agent is picked. Give it the site's standard rise instead of an
     abrupt display toggle. (Re-triggered in admin.js on each selection.) */
  .mgr-cards.mgr-reveal { animation: riseIn .38s var(--ease) backwards; }

  /* connective tissue: page exit + tapped-tile lift (driven by shell.js) */
  body.is-leaving { opacity:0; transition: opacity .14s ease; }
  .tile.is-activating {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 20px 40px -14px rgba(15,23,42,.34);
    transition: transform .14s ease, box-shadow .14s ease;
  }
}

.topbar .right { display:flex; align-items:center; gap:14px; font-size:13px; }
.topbar a, .topbar button.linkbtn {
  color:#cfe0f5; background:none; border:none; cursor:pointer; font-size:13px;
}
.topbar a:hover, .topbar button.linkbtn:hover { color:#fff; }

/* back-to-home — a clean capsule that mirrors the profile pill on the right,
   with a chevron that eases left on hover (Apple-style back affordance) */
.topbar-back {
  display:inline-flex; align-items:center; gap:5px; line-height:1;
  padding:6px 13px 6px 9px; border-radius:999px; font-weight:500;
  color:#dbe8f8; background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  transition: background .14s var(--ease), border-color .14s var(--ease),
              color .14s var(--ease), transform .09s ease;
}
.topbar-back svg { transition: transform .17s var(--ease); }
.topbar-back:hover {
  color:#fff; background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.34);
}
.topbar-back:hover svg { transform: translateX(-3px); }
.topbar-back:active { transform: scale(.97); }
.topbar-back:focus-visible { outline:2px solid #fff; outline-offset:2px; }

/* ===========================================================================
   Hamburger navigation drawer (js/nav.js) — Apple-like slide-in with search
   =========================================================================== */

/* The hamburger sits at the left of the topbar's right-hand control cluster. */
.nav-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background .14s var(--ease), border-color .14s var(--ease),
              transform .09s ease;
}
.nav-toggle:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); }
.nav-toggle:active { transform: scale(.94); }
.nav-toggle:focus-visible { outline:2px solid #fff; outline-offset:2px; }

.nav-toggle-bars { position: relative; width: 18px; height: 13px; }
.nav-toggle-bars span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: #dbe8f8;
  transition: transform .22s var(--ease), opacity .15s var(--ease), background .14s var(--ease);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle-bars span:nth-child(3) { bottom: 0; }
.nav-toggle:hover .nav-toggle-bars span { background: #fff; }
/* morph to an X when open */
.nav-toggle.open .nav-toggle-bars span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle.open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bars span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Dimmed, blurred backdrop behind the drawer. */
.nav-scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,23,42,.34);
  opacity: 0; visibility: hidden;
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: opacity .24s var(--ease), visibility .24s var(--ease),
              backdrop-filter .24s var(--ease), -webkit-backdrop-filter .24s var(--ease);
}
.nav-scrim.open {
  opacity: 1; visibility: visible;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* The drawer itself — slides in from the right. */
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 81;
  width: 332px; max-width: 86vw;
  background: var(--glass-bg-solid);
  -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border-left: 1px solid var(--glass-border);
  box-shadow: -24px 0 60px -24px rgba(15,23,42,.5), inset 1px 0 0 rgba(255,255,255,.5);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  transform: translateX(102%);
  transition: transform .3s var(--ease);
  overflow: hidden;
}
.nav-drawer.open { transform: translateX(0); }

/* Search field at the top of the drawer. */
.nav-search-wrap { position: relative; flex: 0 0 auto; }
.nav-search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
.nav-search {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px 12px 40px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font-size: 14.5px; font-family: inherit;
  -webkit-appearance: none; appearance: none;
  transition: border-color .14s var(--ease), background .14s var(--ease),
              box-shadow .14s var(--ease);
}
.nav-search::placeholder { color: var(--muted); }
.nav-search:focus {
  outline: none; background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.nav-search::-webkit-search-cancel-button { -webkit-appearance: none; }

/* The list of destinations. */
.nav-list {
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto; margin: 0 -6px; padding: 2px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 13px;
  padding: 11px 12px; border-radius: 13px;
  color: var(--text); text-decoration: none;
  border: 1px solid transparent;
  transition: background .12s var(--ease), border-color .12s var(--ease),
              transform .09s ease;
}
/* subtle, congruent hover: the row gets a soft brand wash + faint border, and
   the icon deepens its tint and lifts a touch — same language as the tiles,
   minus any movement of the row itself. */
.nav-item:hover { background: rgba(30,58,95,.05); border-color: rgba(30,58,95,.10); }
.nav-item:hover .nav-item-icon { background: rgba(30,58,95,.13); transform: scale(1.08); }
.nav-item:active { transform: scale(.985); }
.nav-item.is-current { background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.16); }

.nav-item-icon {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--brand);
  transition: background .12s var(--ease), transform .12s var(--ease);
}
.nav-item.is-current .nav-item-icon { background: rgba(37,99,235,.13); color: var(--accent); }
.nav-item.is-current:hover .nav-item-icon { background: rgba(37,99,235,.20); }
.nav-item-icon svg { width: 19px; height: 19px; }

.nav-item-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-item-label { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.nav-item-desc {
  font-size: 12px; color: var(--muted); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item-dot {
  flex: 0 0 auto; margin-left: auto;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* Onboarding completed: green check chip next to the label, muted desc. */
.nav-item-done {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; border-radius: 50%;
  background: var(--good-bg); color: var(--good); vertical-align: -3px;
}
.nav-item-done svg { width: 10px; height: 10px; stroke-width: 3; }
.nav-item.is-done .nav-item-desc { color: var(--good); }

.nav-empty {
  margin: 6px 4px 0; font-size: 13px; color: var(--muted); text-align: center;
}

/* Lock background scroll while the drawer is open. */
body.nav-open { overflow: hidden; }

/* Subtle staggered entrance for the nav items when the drawer opens. */
@media (prefers-reduced-motion: no-preference) {
  .nav-drawer.open .nav-search-wrap { animation: riseIn .32s var(--ease) backwards; }
  .nav-drawer.open .nav-item { animation: riseIn .35s var(--ease) backwards; }
  .nav-drawer.open .nav-item:nth-child(1) { animation-delay: .04s; }
  .nav-drawer.open .nav-item:nth-child(2) { animation-delay: .08s; }
  .nav-drawer.open .nav-item:nth-child(3) { animation-delay: .11s; }
  .nav-drawer.open .nav-item:nth-child(4) { animation-delay: .15s; }
  .nav-drawer.open .nav-item:nth-child(5) { animation-delay: .19s; }
  .nav-drawer.open .nav-item:nth-child(6) { animation-delay: .22s; }
  .nav-drawer.open .nav-item:nth-child(7) { animation-delay: .26s; }
  .nav-drawer.open .nav-item:nth-child(8) { animation-delay: .3s; }
  .nav-drawer.open .nav-item:nth-child(9) { animation-delay: .34s; }
}

/* ---- profile dropdown ---- */
.profile { position: relative; }
.profile-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  padding: 4px 8px 4px 4px; cursor: pointer;
  display: flex; align-items: center; gap: 6px; border-radius: 999px;
  transition: background .11s ease, border-color .11s ease, transform .09s ease;
}
.profile-btn:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.32); }
.profile-btn:active { transform: scale(.97); }
.profile-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: .3px;
  text-transform: uppercase; user-select: none; flex: none;
}
.profile-caret {
  color: rgba(255,255,255,.75); flex: none;
  transition: transform .15s ease, color .11s ease;
}
.profile-btn:hover .profile-caret { color: #fff; }
.profile-btn[aria-expanded="true"] .profile-caret { transform: rotate(180deg); }
.avatar.avatar-lg { width: 44px; height: 44px; font-size: 16px; border: none; }

.profile-menu {
  position: absolute; top: calc(100% + 12px); right: 0;
  min-width: 248px; background: var(--glass-bg-solid); color: var(--text);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border: 1px solid var(--glass-border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15,23,42,.18), inset 0 1px 0 rgba(255,255,255,.5);
  padding: 8px; z-index: 40;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
}
.profile-menu.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.profile-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.profile-head .avatar-lg { background: var(--brand); color: #fff; flex: none; }
.profile-id { min-width: 0; }
.profile-name { font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.2; }
.profile-email { font-size: 12px; color: var(--muted); margin-top: 2px; word-break: break-all; }

.profile-divider { height: 1px; background: var(--line); margin: 4px 6px; }

.profile-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text); text-decoration: none;
  font-family: inherit; line-height: 1.2;
}
.profile-item:hover { background: #f1f5f9; }
.profile-item.danger { color: var(--bad); }
.profile-item.danger:hover { background: #fef2f2; }
/* Link items (Manager view, Get help) sit inside .topbar, so its pale-blue
   link colour bleeds in. Reclaim them as a readable muted slate — quieter than
   the near-black action items, but no longer washed out. Darken on hover. */
.profile-menu a.profile-item { color: var(--muted); }
.profile-menu a.profile-item:hover { color: var(--text); }

/* ---- layout ---- */
/* The content column matches the floating menu bar (.topbar-inner, 1240px) so
   pages no longer look inset/narrow under the bar. Text-heavy / form pages add
   .wrap-narrow to keep a comfortable reading measure (line length + lone form
   fields don't stretch on big monitors). */
.wrap { max-width: 1240px; margin: 0 auto; padding: 44px 22px 80px; position: relative; }
/* Reading/form pages keep the familiar 880px measure (also what the onboarding
   progress rail's fixed offset is tuned to). */
.wrap.wrap-narrow { max-width: 880px; }

/* ---- left-gutter section progress rail ---- */
.rail { display: none; }
@media (min-width: 1260px) {
  .rail {
    display: block;
    position: fixed;
    top: 132px;
    left: calc(50% - 632px);
    width: 172px;
    z-index: 5;
  }
  .rail-list { list-style: none; margin: 0; padding: 0; position: relative; }
  /* vertical connector line behind the dots */
  .rail-list::before {
    content: "";
    position: absolute;
    left: 8px; top: 10px; bottom: 10px;
    width: 2px;
    background: var(--line);
    border-radius: 2px;
  }
  .rail-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    cursor: pointer;
    color: var(--muted);
  }
  .rail-dot {
    position: relative;
    z-index: 1;
    flex: 0 0 18px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    transition: background .19s ease, border-color .19s ease, transform .15s ease;
  }
  .rail-dot svg { width: 11px; height: 11px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
  .rail-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    transition: color .19s ease;
  }
  .rail-item:hover .rail-label { color: var(--text); }
  /* completed (submitted & locked) */
  .rail-item.done .rail-dot { background: var(--brand); border-color: var(--brand); }
  .rail-item.done .rail-dot svg { opacity: 1; transform: scale(1); }
  .rail-item.done .rail-label { color: var(--text); }
  /* currently-viewed section */
  .rail-item.active .rail-dot { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30,58,95,.12); }
  .rail-item.active .rail-label { color: var(--brand); font-weight: 600; }
  .rail-item.active.done .rail-dot { box-shadow: 0 0 0 4px rgba(30,58,95,.12); }
  /* gated / not yet available */
  .rail-item.gated { cursor: default; opacity: .5; }
  .rail-item.gated:hover .rail-label { color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) {
  .rail-dot, .rail-dot svg, .rail-label { transition: none; }
}

/* ---- overall progress ---- */
.overall {
  background: var(--glass-bg); border:1px solid var(--glass-border); border-radius:14px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  padding:18px 22px; box-shadow:var(--glass-shadow); margin-bottom:22px;
}
.overall-head {
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
}
.overall h2 {
  margin:0; font-size:12px; font-weight:600; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted);
}
.overall .pct {
  font-size:15px; font-weight:600; color:var(--brand);
  font-variant-numeric:tabular-nums;
}
.bar { height:6px; background:#eef2f7; border-radius:999px; overflow:hidden; margin-top:12px; }
.bar > span {
  display:block; height:100%; width:0; border-radius:999px;
  background:linear-gradient(90deg,var(--accent),var(--brand-light));
  transition:width .38s var(--ease);
}
.overall-count { font-size:12px; color:var(--muted); margin-top:10px; }

/* ---- section card ---- */
.section {
  background: var(--glass-bg); border:1px solid var(--glass-border); border-radius:14px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  margin-bottom:18px; box-shadow:var(--glass-shadow); overflow:hidden;
}
.section > header {
  padding:16px 20px; cursor:pointer; display:flex; align-items:flex-start; gap:12px;
  background: linear-gradient(0deg, #fbfdff, #fff);
}
.section > header:hover { background:#f7fafe; }
.section h3 { margin:0; font-size:16px; color:var(--brand); }
.section .sub { margin:4px 0 0; font-size:13px; color:var(--muted); }
.section .seccount {
  margin-left:auto; font-size:12px; font-weight:700; color:var(--brand-light);
  background:#eef4fb; padding:3px 10px; border-radius:999px; white-space:nowrap;
}
.section .chev { color:var(--muted); transition:transform .15s; margin-top:2px; }
.section.collapsed .chev { transform:rotate(-90deg); }
.section .body {
  padding:6px 20px 14px; overflow:hidden; max-height:4000px;
  transition:max-height .3s var(--ease), opacity .22s ease, padding .3s ease;
}
.section.collapsed .body {
  max-height:0; opacity:0; padding-top:0; padding-bottom:0;
}
@media (prefers-reduced-motion: reduce) {
  .section .body { transition:none; }
}

/* completed section — "frosted over" / finished look */
.section.done {
  background:#f8fafc;
  box-shadow:none;
  opacity:.7;
  transition:opacity .22s ease;
}
.section.done > header { background:linear-gradient(0deg, #f8fafc, #fbfdff); }
.section.done > header:hover { background:#f2f6fb; }
.section.done:hover { opacity:.82; }               /* lift slightly, but stay frosted */
.section.done .seccount { color:var(--good); background:var(--good-bg); }

/* active section — the one to work on now: accent stripe + gentle lift */
.section:not(.done):not(.gated) {
  box-shadow: inset 4px 0 0 var(--brand-light), 0 6px 18px rgba(30,58,95,.10);
  border-color: #d3deec;
}
.section:not(.done):not(.gated) > header { background:linear-gradient(0deg, #f4f8ff, #fff); }
.section:not(.done):not(.gated) > header:hover { background:#eef4fc; }
.section:not(.done):not(.gated) .seccount { color:#fff; background:var(--brand-light); }

/* entrance animation when a section unlocks */
@keyframes sectionReveal {
  0%   { opacity:0; transform:translateY(14px); box-shadow:0 0 0 0 rgba(37,99,235,.0); }
  60%  { box-shadow:0 0 0 4px rgba(37,99,235,.18); }
  100% { opacity:1; transform:translateY(0); box-shadow:var(--shadow); }
}
.section.just-opened { animation: sectionReveal .52s var(--ease) both; }

/* ---- gated (locked-until-prior-submitted) section — quietly "waiting" ---- */
.section.gated { box-shadow:none; border-style:dashed; border-color:#dde5ef; opacity:.78; }
.section.gated > header h3 { color:var(--muted); }
.section.gated > header { background:#fafbfd; }
.section.gated > header:hover { background:#f4f6fa; }
.section.gated .seccount { color:var(--muted); background:#eef1f5; }
.gated-note {
  display:flex; align-items:center; gap:8px;
  color:var(--muted); font-size:14px; padding:14px 4px;
}
.gated-note .gated-lock { width:18px; height:18px; flex:none; }
/* gated sections show a read-only preview of their schedule */
.section.gated .item, .section.gated .group-head { opacity:.6; }

/* ---- items ---- */
.item { border-top:1px solid var(--line); padding:14px 0; }
.item:first-child { border-top:none; }
.item .row { display:flex; gap:12px; align-items:flex-start; }
.item input[type=checkbox] { width:20px; height:20px; margin-top:1px; flex:none; cursor:pointer; accent-color:var(--accent); }
.item .label { font-weight:600; }
.item .detail { font-size:13px; color:var(--muted); margin-top:2px; }

/* clean animated strikethrough when an item is checked off */
.item .label-text {
  text-decoration:line-through;
  text-decoration-color:transparent;
  text-decoration-thickness:1.5px;
  transition:text-decoration-color .22s ease, color .19s ease;
}
.item .row.done .label-text { color:var(--muted); text-decoration-color:currentColor; }
.item .row.done .detail { color:var(--muted); opacity:.7; }
@media (prefers-reduced-motion: reduce) {
  .item .label-text { transition:none; }
}
.item .tag {
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px;
  padding:2px 7px; border-radius:6px; margin-left:8px; vertical-align:middle;
}
/* optional scheduled-time chip, rendered ahead of the label */
.item .time {
  font-size:11px; font-weight:700; letter-spacing:.3px; white-space:nowrap;
  font-variant-numeric:tabular-nums;
  padding:2px 7px; border-radius:6px; margin-right:8px; vertical-align:middle;
  background:#eef4fb; color:var(--brand-light);
}
.item .row.done .time { opacity:.55; }
.tag.video { background:#eef4fb; color:var(--brand-light); }
.tag.audio { background:#f3eefb; color:#6d28d9; }
.tag.reading { background:#fef9c3; color:#854d0e; }
.tag.quiz { background:#dcfce7; color:#15803d; }
.tag.locked { background:#e2e8f0; color:#475569; }
.lock-badge {
  display:inline-flex; align-items:center; justify-content:center;
  margin-left:9px; vertical-align:middle; color:var(--muted);
}
.lock-badge svg { width:15px; height:15px; }

/* ---- in-section groups (Morning / Afternoon / Training to Complete) ---- */
.group-head {
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.7px;
  color:var(--brand-light); margin:16px 0 0; padding-top:14px;
  border-top:1px solid var(--line);
}
.group-head:first-child { border-top:none; padding-top:4px; margin-top:2px; }
/* the first item under a group header shouldn't draw its own divider on top */
.group-head + .item { border-top:none; }
.submit-foot { border-top:2px solid var(--line); margin-top:6px; padding-top:16px; text-align:right; }
.submit-foot .btn { font-size:14px; }
.submit-hint { font-size:12px; color:var(--muted); margin-top:6px; }
.locked-banner {
  background:var(--good-bg); color:#166534; border:1px solid #86efac;
  border-radius:10px; padding:12px 14px; font-size:13px; font-weight:600; text-align:left;
}
.section .item input[type=checkbox]:disabled { cursor:not-allowed; }
.media { margin:12px 0 2px 32px; }
.media iframe { width:100%; max-width:640px; border:0; border-radius:10px; background:#000; }
.media iframe.video { aspect-ratio:16/9; }
.linklike { display:inline-block; margin-left:32px; font-size:14px; }
.pending-note { margin-left:32px; font-size:12px; color:#b45309; background:#fef3c7; display:inline-block; padding:2px 8px; border-radius:6px; }

/* ---- agent arsenal (distinct resource panel, not a module) ---- */
.arsenal-section {
  border:1px solid #cdddf2;
  background:linear-gradient(180deg, #eef5ff, #f7fbff);
  box-shadow:0 1px 3px rgba(30,58,95,.10);
  position:relative;
}
.arsenal-section::before {
  content:""; position:absolute; left:0; top:0; bottom:0; width:5px;
  background:linear-gradient(180deg, var(--accent), var(--brand)); border-radius:14px 0 0 14px;
}
.arsenal-section > header { background:transparent; align-items:center; padding-left:24px; cursor:pointer; }
.arsenal-section > header:hover { background:rgba(30,58,95,.04); }
.arsenal-chev { color:var(--brand-light); margin-left:4px; }
.arsenal-section.collapsed .arsenal-chev { transform:rotate(-90deg); }
.arsenal-section .body { padding-left:24px; }
.arsenal-badge {
  flex:none; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:var(--brand); color:#fff;
}
.arsenal-badge svg { width:20px; height:20px; }
.arsenal-tag {
  font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.6px;
  color:var(--accent); background:#dbe9fc; padding:2px 7px;
  border-radius:6px; margin-left:8px; vertical-align:middle;
}
.arsenal-count { background:#dbe9fc; color:var(--brand); }

.arsenal-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; padding:6px 0 8px; }
.arsenal-card {
  display:flex; align-items:center; gap:12px; padding:13px 14px;
  border:1px solid #d4e2f3; border-radius:12px; background:#fff;
  text-decoration:none; color:inherit; cursor:pointer;
  transition:border-color .11s ease, box-shadow .11s ease, transform .09s ease;
}
.arsenal-card:hover {
  border-color:var(--accent); box-shadow:0 6px 18px -8px rgba(37,99,235,.4);
  transform:translateY(-1px);
}
.arsenal-card:active { transform:translateY(0); }
.arsenal-icon { flex:none; width:34px; height:34px; border-radius:8px; background:#eef4fb;
  color:var(--brand-light); display:flex; align-items:center; justify-content:center; }
.arsenal-icon svg { width:20px; height:20px; }
.arsenal-info { flex:1; min-width:0; }
.arsenal-name { font-weight:600; font-size:14px; word-break:break-word; }
.arsenal-card:hover .arsenal-name { color:var(--accent); }
.arsenal-meta { font-size:12px; color:var(--muted); margin-top:2px; }
.arsenal-go {
  flex:none; width:30px; height:30px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  color:#9fb4d0; background:transparent;
  transition:color .11s ease, background .11s ease, transform .11s ease;
}
.arsenal-card:hover .arsenal-go {
  color:var(--accent); background:#eef4fb; transform:translate(2px,-2px);
}

/* folder & file cards are <button>s — reset native button look */
.arsenal-card-folder, .arsenal-card-file {
  width:100%; font:inherit; text-align:left;
}
/* folders drill IN to the portal — amber icon, chevron nudges sideways */
.arsenal-card-folder .arsenal-icon { background:#fef4e6; color:#c2811f; }
.arsenal-card-folder:hover .arsenal-go { transform:translateX(3px); }
/* files open an in-portal preview — the eye icon just brightens, no slide */
.arsenal-card-file:hover .arsenal-go { color:var(--accent); background:#eef4fb; transform:none; }

/* ---- in-portal file preview (centered popup) ----
   A centered card over the dimmed .overlay backdrop. Styled like a portal card;
   the preview itself is page-shaped (portrait) so Google's viewer shows the
   document edge-to-edge with minimal letterboxing. */
.arsenal-preview-modal {
  margin:auto;
  background:var(--card); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.3); overflow:hidden;
  max-width:calc(100vw - 32px);
  opacity:0; transform:translateY(14px);
  transition:opacity .22s ease, transform .22s var(--ease);
}
.overlay.open .arsenal-preview-modal { opacity:1; transform:none; }
.api-head {
  display:flex; align-items:center; gap:12px;
  padding:13px 16px; border-bottom:1px solid var(--line);
}
.api-title {
  flex:1; min-width:0; font-weight:700; font-size:15px; color:var(--brand);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.api-actions { flex:none; display:flex; align-items:center; gap:8px; }
.api-actions .btn { display:inline-flex; align-items:center; gap:7px; width:auto; }
.api-close {
  flex:none; width:34px; height:34px; border-radius:9px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line); background:#fff; color:var(--muted); cursor:pointer;
  transition:background .11s ease, color .11s ease, border-color .11s ease;
}
.api-close:hover { background:#f1f5f9; color:var(--text); border-color:#cbd5e1; }
.api-stage {
  display:flex; justify-content:center;
  padding:18px; background:var(--bg);
}
/* height-driven on desktop: width follows the page aspect ratio, so the frame
   is a portrait "sheet" rather than a wide letterboxed strip */
.api-frame {
  height:min(78vh, 880px); width:auto; max-width:100%;
  aspect-ratio:17 / 22;
  border:none; border-radius:10px; background:#fff;
  box-shadow:0 8px 26px -12px rgba(15,23,42,.4);
}
@media (max-width:560px) {
  .api-head { flex-wrap:wrap; }
  .api-actions { width:100%; }
  .api-actions .btn { flex:1; justify-content:center; }
  .api-stage { padding:10px; }
  /* width-driven on small screens so it never overflows the column */
  .api-frame { height:auto; width:100%; }
}

/* ---- arsenal breadcrumb (in-portal folder navigation) ---- */
.arsenal-crumbs {
  display:flex; flex-wrap:wrap; align-items:center; gap:4px;
  margin:0 0 14px; font-size:13px;
}
.arsenal-crumb {
  border:none; background:transparent; padding:3px 6px; border-radius:6px;
  font:inherit; color:var(--accent); cursor:pointer;
  transition:background .11s ease, color .11s ease;
}
.arsenal-crumb[data-crumb]:hover { background:#eef4fb; }
.arsenal-crumb.is-current { color:var(--text); font-weight:600; cursor:default; }
.arsenal-crumb-sep { color:var(--muted); }

/* ---- training page sections ---- */
.training-section { margin:0 0 34px; }
.training-section:last-child { margin-bottom:0; }
.training-head { display:flex; align-items:center; gap:14px; margin:0 0 14px; }
.training-num {
  flex:none; width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:700; letter-spacing:-.01em;
  background:rgba(124,58,237,.12); color:#7c3aed;
}
.training-head-text { min-width:0; }
.training-title { margin:0; font-size:18px; font-weight:650; letter-spacing:-.01em; }
.training-desc { margin:2px 0 0; font-size:13.5px; color:var(--muted); }
.training-body { padding-left:48px; }
@media (max-width:560px) { .training-body { padding-left:0; } }

/* ---- training: section image tiles (landing) ---- */
.tr-tiles {
  display:grid; gap:22px;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
}
.tr-tile {
  display:flex; flex-direction:column; text-decoration:none; color:inherit;
  border-radius:16px; overflow:hidden;
  border:1px solid var(--line); background:var(--card);
  box-shadow:0 10px 26px -18px rgba(15,23,42,.5);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.tr-tile:hover { transform:translateY(-3px); box-shadow:0 16px 34px -16px rgba(15,23,42,.5); border-color:#cfe0f7; }
.tr-tile-img {
  display:block; width:100%; aspect-ratio:4/2.55; overflow:hidden; background:var(--bg);
}
.tr-tile-photo { width:100%; height:100%; object-fit:cover; display:block; }
.tr-tile-panel {
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  color:#fff;
}
.tr-tile-cap { padding:13px 15px 15px; }
.tr-tile-title { display:block; font-size:15px; font-weight:650; letter-spacing:-.01em; }
.tr-tile-sub { display:block; margin-top:2px; font-size:12.5px; color:var(--muted); }

/* ---- training: grid/list view toggle on the landing page ---- */
.tr-viewbar { display:flex; justify-content:flex-end; margin:0 0 18px; }
.tr-viewtoggle {
  display:inline-flex; gap:2px; padding:3px; border-radius:11px;
  border:1px solid var(--line); background:var(--card);
}
.tr-viewbtn {
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px;
  border:none; border-radius:8px; background:transparent; cursor:pointer;
  font:inherit; font-size:13px; font-weight:600; color:var(--muted);
  transition:background .11s var(--ease), color .11s var(--ease);
}
.tr-viewbtn:hover { color:var(--text); }
.tr-viewbtn.is-active { background:var(--accent); color:#fff; }
.tr-viewbtn svg { display:block; }

/* ---- training: list view rows ---- */
.tr-rows { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.tr-row {
  display:flex; align-items:center; gap:15px; padding:12px 16px;
  border-radius:14px; border:1px solid var(--line); background:var(--card);
  text-decoration:none; color:inherit;
  box-shadow:0 10px 26px -20px rgba(15,23,42,.5);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease);
}
.tr-row:hover { transform:translateY(-2px); box-shadow:0 16px 30px -18px rgba(15,23,42,.5); border-color:#cfe0f7; }
.tr-row-ico {
  flex:0 0 auto; width:52px; height:52px; border-radius:11px;
  display:flex; align-items:center; justify-content:center; color:#fff;
  background-size:cover; background-position:center;
}
.tr-row-info { min-width:0; flex:1 1 auto; display:flex; flex-direction:column; }
.tr-row-title { font-size:15px; font-weight:650; letter-spacing:-.01em; }
.tr-row-sub { margin-top:2px; font-size:12.5px; color:var(--muted); }
.tr-row-go { flex:0 0 auto; color:var(--muted); transition:transform .15s var(--ease); }
.tr-row:hover .tr-row-go { transform:translateX(2px); color:var(--accent); }

/* ---- training: live recorded trainings — expandable session files ---- */
.tr-live-files .muted-note { font-size:13px; }
.tr-file-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.tr-file-link {
  display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:9px;
  text-decoration:none; color:var(--text); font-size:14px;
  transition:background .11s var(--ease), color .11s var(--ease);
}
.tr-file-link:hover { background:var(--bg); color:var(--accent); }
.tr-file-ico { display:inline-flex; flex:0 0 auto; color:var(--muted); }
.tr-file-link:hover .tr-file-ico { color:var(--accent); }
.tr-file-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- training: lesson player — full-course side-nav + content ---- */
.tr-layout {
  display:grid;
  grid-template-columns:288px 1fr;
  gap:34px;
  align-items:start;
}
.tr-sidenav {
  position:sticky; top:96px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px 12px;
  max-height:calc(100vh - 120px);
  overflow:auto;
}
.tr-sidenav-head {
  display:block;
  padding:4px 10px 6px;
  font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--muted);
}
/* a section grouping inside the nav */
.tr-nav-group { margin-top:8px; }
.tr-nav-group-head {
  padding:6px 10px 4px;
  font-size:12px; font-weight:700; letter-spacing:-.01em;
  color:var(--text);
}
.tr-nav-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:2px; }
.tr-nav-item { margin:0; }
.tr-nav-link {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:10px;
  text-decoration:none; color:var(--text);
  transition:background .11s var(--ease);
}
.tr-nav-link:hover { background:var(--bg); }
.tr-nav-item.locked .tr-nav-link { cursor:default; color:var(--muted); }
.tr-nav-item.locked .tr-nav-link:hover { background:none; }
.tr-nav-item.active .tr-nav-link { background:rgba(37,99,235,.08); }
.tr-nav-mark {
  flex:0 0 22px; width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:#fff; border:1.5px solid var(--line); color:var(--muted);
}
.tr-nav-item.done .tr-nav-mark { background:var(--accent); border-color:var(--accent); color:#fff; }
.tr-nav-item.open .tr-nav-mark { border-color:var(--accent); color:var(--accent); }
.tr-nav-item.active .tr-nav-mark { box-shadow:0 0 0 3px rgba(37,99,235,.15); }
.tr-nav-text { display:flex; flex-direction:column; gap:1px; min-width:0; }
.tr-nav-title { font-size:13px; font-weight:550; letter-spacing:-.01em; line-height:1.3; }
.tr-nav-item.active .tr-nav-title { color:var(--accent); font-weight:650; }

@media (max-width: 900px) {
  .tr-layout { grid-template-columns:1fr; gap:22px; }
  .tr-sidenav { position:static; max-height:none; }
}

/* ---- training: numbered lesson rows ---- */
.lesson-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.lesson-row { margin:0; }
.lesson-link, .lesson-row.is-locked {
  display:flex; align-items:center; gap:14px;
  padding:13px 14px; border:1px solid var(--line); border-radius:12px;
  background:var(--card); color:inherit; text-decoration:none;
  transition:border-color .11s ease, box-shadow .11s ease, background .11s ease;
}
.lesson-link:hover {
  border-color:#cfe0f7; box-shadow:0 6px 18px -12px rgba(15,23,42,.35);
}
.lesson-num {
  flex:none; width:28px; height:28px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-size:13.5px; font-weight:700; color:var(--muted);
  background:var(--bg); border:1px solid var(--line);
}
.lesson-info { min-width:0; flex:1; display:flex; flex-direction:column; gap:1px; }
.lesson-title { font-size:14.5px; font-weight:650; letter-spacing:-.01em; }
.lesson-desc { font-size:12.5px; color:var(--muted); line-height:1.35; }
.lesson-status {
  flex:none; display:inline-flex; align-items:center; gap:5px;
  font-size:12px; font-weight:700; padding:4px 10px; border-radius:999px; white-space:nowrap;
}
.lesson-status svg { display:block; }
.status-open   { background:#eef4fb; color:var(--accent); }
.status-done   { background:var(--good-bg); color:var(--good); }
.status-locked { background:var(--bg); color:var(--muted); }
.lesson-go { flex:none; color:var(--muted); display:inline-flex; }
.lesson-link:hover .lesson-go { color:var(--accent); transform:translateX(2px); }
.lesson-row.is-locked { background:var(--bg); opacity:.72; cursor:not-allowed; }
.lesson-row.is-locked .lesson-num { opacity:.7; }

/* the row header is a button when the lesson plays inline */
.lesson-toggle { width:100%; font:inherit; text-align:left; cursor:pointer; -webkit-appearance:none; appearance:none; }
.lesson-chev { transition:transform .15s var(--ease); }
.lesson-chev.is-open { transform:rotate(90deg); color:var(--accent); }
.lesson-row:not(.is-open) .lesson-link:hover .lesson-go { transform:translateX(2px); }

/* inline expander: video + quiz, joined to the row header */
.lesson-row.is-open .lesson-link {
  border-color:#cfe0f7; box-shadow:0 6px 18px -12px rgba(15,23,42,.35);
  border-bottom-left-radius:0; border-bottom-right-radius:0;
}
.lesson-expand {
  border:1px solid #cfe0f7; border-top:none; border-radius:0 0 12px 12px;
  background:var(--card); padding:18px 16px;
}
.lesson-expand .lesson-video { margin:0 0 16px; }
.lesson-expand .lesson-panel { border:none; background:transparent; padding:0; }

/* ---- lesson page (video + quiz) ---- */
.lesson-video { margin:0 0 22px; }
.lesson-video .video { width:100%; aspect-ratio:16/9; border:none; border-radius:14px; background:#000; box-shadow:0 12px 34px -16px rgba(15,23,42,.45); }
.lesson-video-empty {
  aspect-ratio:16/9; border:1px dashed var(--line); border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  color:var(--muted); font-size:14px; background:var(--bg);
}
.lesson-panel { border:1px solid var(--line); border-radius:14px; background:var(--card); padding:20px 22px; }
.lesson-quiz-title { margin:0 0 6px; font-size:17px; font-weight:650; letter-spacing:-.01em; }
.lesson-panel-lead { margin:0 0 16px; font-size:14px; color:var(--muted); }
.lesson-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; align-items:center; }
.lesson-locked-card {
  border:1px solid var(--line); border-radius:14px; background:var(--card);
  padding:36px 24px; text-align:center; color:var(--muted);
}
.lesson-locked-icon { display:inline-flex; color:var(--muted); margin-bottom:6px; }
.lesson-locked-card h2 { margin:6px 0 4px; font-size:18px; color:var(--text); }
.lesson-locked-card p { margin:0 0 18px; font-size:14px; }

/* ---- buttons ---- */
.btn {
  background:var(--accent); color:#fff; border:none; border-radius:9px;
  padding:9px 16px; font-size:14px; font-weight:600; cursor:pointer;
  text-decoration:none;
}
.btn:hover { background:#1d4ed8; }
.btn.secondary { background:#fff; color:var(--brand); border:1px solid var(--line); }
.btn.secondary:hover { background:#f7fafe; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* ---- quiz pill ---- */
.quiz-status { margin-left:32px; margin-top:8px; }
.pill { font-size:12px; font-weight:700; padding:3px 10px; border-radius:999px; white-space:nowrap; }
.pill.pass { background:var(--good-bg); color:var(--good); }
.pill.fail { background:var(--bad-bg); color:var(--bad); }

/* ---- modal (quiz) ---- */
.overlay {
  position:fixed; inset:0; background:rgba(15,23,42,.55); display:flex;
  justify-content:center; z-index:50; padding:30px 16px; overflow:auto;
  opacity:0; visibility:hidden;
  transition:opacity .17s ease, visibility .17s ease;
}
.overlay.open { opacity:1; visibility:visible; }
.modal {
  margin:auto;
  background:var(--glass-bg-solid); border:1px solid var(--glass-border);
  -webkit-backdrop-filter:saturate(150%) blur(20px); backdrop-filter:saturate(150%) blur(20px);
  border-radius:16px; max-width:620px; width:100%;
  padding:26px 28px;
  box-shadow:0 20px 50px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5);
  /* Match the site's riseIn entrance: pure fade + 14px rise, no scale. Scaling
     a backdrop-filtered element re-rasterizes its blur every frame, which made
     the wide modals (e.g. Commission statements) animate choppily. */
  opacity:0; transform:translateY(14px);
  transition:opacity .22s ease, transform .22s var(--ease);
  will-change:opacity, transform;
}
.overlay.open .modal { opacity:1; transform:translateY(0); }
/* When swapping content while the overlay stays open, snap to the pre-entrance
   state (with no transition) so removing .modal-swap animates the new content in. */
.overlay.open .modal.modal-swap { opacity:0; transform:translateY(14px); transition:none; }
.modal h2 { margin:0 0 4px; color:var(--brand); }
.modal.modal-sm { max-width:440px; }
.modal { position:relative; }
.modal.modal-wide { max-width:980px; }
.modal-sub { margin:0 0 18px; font-size:14px; color:var(--muted); line-height:1.45; }

/* close affordance, top-right of any modal */
.modal-x {
  position:absolute; top:14px; right:14px; width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  border:none; background:transparent; color:var(--muted); cursor:pointer;
  border-radius:8px; transition:background .11s ease, color .11s ease;
}
.modal-x:hover { background:var(--bg); color:var(--text); }

/* "user created" confirmation window */
.created-check {
  width:56px; height:56px; margin:4px auto 14px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--good-bg); color:var(--good);
}
.created-list {
  margin:18px 0 0; display:grid; grid-template-columns:auto 1fr;
  gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden;
}
.created-list dt {
  padding:11px 16px; font-size:13px; font-weight:600; color:var(--muted);
  background:#f8fafc; border-bottom:1px solid var(--line);
}
.created-list dd {
  margin:0; padding:11px 16px; font-size:14px; color:var(--text);
  border-bottom:1px solid var(--line); word-break:break-word;
}
.created-list dt:last-of-type, .created-list dd:last-of-type { border-bottom:none; }
.created-list code {
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13.5px;
  background:var(--bg); padding:2px 7px; border-radius:6px;
}
.created-dim { color:var(--muted); }

.confirm-body { color:var(--text); font-size:14px; }
.confirm-body p { margin:10px 0; }
.confirm-warn { color:var(--bad); font-weight:700; }
.reason-lab { display:block; font-size:13px; font-weight:700; color:var(--text); margin:14px 0 6px; }
.reason-input {
  font:inherit; font-size:14px; width:100%; resize:vertical; min-height:78px;
  background:#fff; color:var(--text); border:1px solid var(--line);
  border-radius:10px; padding:10px 12px;
}
.reason-input:focus { outline:none; border-color:var(--accent); }
.reason-err { margin:8px 0 0; font-size:12.5px; font-weight:600; color:var(--bad); }
.modal-input {
  width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px;
  font-size:15px; margin:8px 0;
}

/* ---- first-login welcome / orientation flow ---- */
.modal.modal-onb { max-width:480px; }
.onb { text-align:center; }
.onb-viewport { overflow:hidden; }
.onb-track { display:flex; transition:transform .32s var(--ease); }
.onb-slide { flex:0 0 100%; padding:6px 4px 2px; }
.onb-slide h2 { color:var(--brand); font-size:22px; margin:0 0 8px; }
.onb-text { color:var(--muted); font-size:15px; margin:0 auto; max-width:38ch; }
.onb-badge {
  width:60px; height:60px; border-radius:16px; margin:2px auto 16px;
  display:flex; align-items:center; justify-content:center;
  background:var(--brand); color:#fff;
}
.onb-badge svg { width:30px; height:30px; }
.onb-list { text-align:left; max-width:34ch; margin:18px auto 2px; padding:0; list-style:none; }
.onb-list li { position:relative; padding:7px 0 7px 26px; font-size:14px; color:var(--text); }
.onb-list li::before {
  content:""; position:absolute; left:3px; top:13px; width:7px; height:7px;
  border-radius:50%; background:var(--accent);
}
.onb-fields { text-align:left; margin-top:16px; }
.onb-fields .onb-label { font-size:12px; font-weight:600; color:var(--muted);
  letter-spacing:.04em; text-transform:uppercase; margin:10px 0 2px; }
.onb-fields .modal-input { margin:0 0 4px; }

/* animated success check */
.onb-check-wrap {
  width:94px; height:94px; border-radius:50%; background:var(--good-bg);
  display:flex; align-items:center; justify-content:center; margin:4px auto 18px;
  animation:onbPop .34s var(--ease) both;
}
.onb-check { width:52px; height:52px; }
.onb-check-circle {
  fill:none; stroke:var(--good); stroke-width:3;
  stroke-dasharray:151; stroke-dashoffset:151;
  animation:onbDraw .38s ease .08s forwards;
}
.onb-check-mark {
  fill:none; stroke:var(--good); stroke-width:4; stroke-linecap:round; stroke-linejoin:round;
  stroke-dasharray:40; stroke-dashoffset:40;
  animation:onbDraw .26s cubic-bezier(.65,0,.45,1) .41s forwards;
}
@keyframes onbPop { from{transform:scale(.5);opacity:0;} to{transform:scale(1);opacity:1;} }
@keyframes onbDraw { to{stroke-dashoffset:0;} }

/* footer: back / dots / next */
.onb-foot { display:flex; align-items:center; justify-content:space-between; margin-top:24px; }
.onb-dots { display:flex; gap:8px; }
.onb-dot {
  width:8px; height:8px; border-radius:50%; background:var(--line);
  transition:background .15s ease, transform .15s ease, width .15s ease;
}
.onb-dot.active { background:var(--brand); width:20px; border-radius:999px; }
@media (prefers-reduced-motion: reduce) {
  .onb-track { transition:none; }
  .onb-check-wrap, .onb-check-circle, .onb-check-mark { animation:none; }
  .onb-check-circle, .onb-check-mark { stroke-dashoffset:0; }
}
.qblock { padding:16px 0; border-top:1px solid var(--line); }
.qblock:first-of-type { border-top:none; }
.qblock .qtext { font-weight:600; margin-bottom:10px; }
.opt { display:flex; gap:10px; align-items:flex-start; padding:9px 12px; border:1px solid var(--line);
  border-radius:9px; margin-bottom:8px; cursor:pointer; }
.opt:hover { background:#f7fafe; }
.opt.correct { background:var(--good-bg); border-color:#86efac; }
.opt.wrong { background:var(--bad-bg); border-color:#fca5a5; }
.opt input { margin-top:3px; accent-color:var(--accent); }
.modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:18px; }
.result-banner { padding:14px 16px; border-radius:10px; font-weight:700; margin:10px 0; text-align:center; }
.result-banner.pass { background:var(--good-bg); color:var(--good); }
.result-banner.fail { background:var(--bad-bg); color:var(--bad); }

/* ---- login ---- */
/* Full-bleed branded backdrop: deep navy with soft radial glows + a faint
   grid texture, all pure CSS so no image assets are needed. */
#login-view {
  min-height:100vh;
  min-height:100dvh;   /* fills the real iPhone viewport (avoids the URL-bar gap) */
  width:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:32px 20px;
  padding-top:max(32px, env(safe-area-inset-top));
  padding-bottom:max(32px, env(safe-area-inset-bottom));
  /* Light, airy backdrop with a few soft colour blooms — gives the frosted
     card something subtle to refract without the page feeling heavy or blue. */
  background:
    radial-gradient(640px 540px at 16% 10%, rgba(37,99,235,.20), transparent 60%),
    radial-gradient(720px 600px at 88% 92%, rgba(47,90,143,.18), transparent 62%),
    radial-gradient(520px 460px at 82% 6%, rgba(125,185,255,.18), transparent 60%),
    linear-gradient(180deg, #f4f7fb 0%, #e7edf5 100%);
}
#login-view::before {
  content:""; position:fixed; inset:0; pointer-events:none; opacity:.5;
  background-image:
    linear-gradient(rgba(15,23,42,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.028) 1px, transparent 1px);
  background-size:48px 48px;
  -webkit-mask-image:radial-gradient(circle at 50% 40%, #000 0%, transparent 70%);
          mask-image:radial-gradient(circle at 50% 40%, #000 0%, transparent 70%);
}

.login-shell {
  position:relative; z-index:1; width:100%; max-width:408px;
  display:flex; flex-direction:column; align-items:center;
  animation:loginIn .41s var(--ease) both;
}
@keyframes loginIn {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}
/* On a successful sign-in the card eases up and away before the hub loads,
   so the handoff reads as one continuous motion rather than a hard reload. */
.login-shell.is-leaving {
  opacity:0; transform:translateY(-8px) scale(.985);
  transition:opacity .24s var(--ease), transform .24s var(--ease);
  pointer-events:none;
}

.login-card {
  width:100%; border-radius:22px; padding:40px 36px 34px; text-align:center;
  background:rgba(255,255,255,.66);
  border:1px solid var(--glass-border);
  -webkit-backdrop-filter:saturate(180%) blur(26px);
          backdrop-filter:saturate(180%) blur(26px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    0 1px 2px rgba(15,23,42,.04),
    0 28px 60px -30px rgba(15,23,42,.34);
}
.login-card .login-logo {
  width:auto; max-width:158px; height:auto; margin:0 auto 18px; display:block;
}
.login-card h1 { color:var(--brand); font-size:22px; margin:0 0 6px; }
/* "Agent Hub" reads as a small, tracked caps label tied to the brand: a navy
   tag flanked by hairlines so it sits clearly *under* the lockup as context,
   not as a second competing wordmark. Tracking echoes the logo's lower line. */
.login-card .login-tag {
  display:flex; align-items:center; gap:13px;
  margin:0 0 26px;
}
.login-card .login-tag::before,
.login-card .login-tag::after {
  content:""; flex:1 1 auto; height:1px;
  background:linear-gradient(90deg, transparent, var(--line) 35%, var(--line) 65%, transparent);
}
.login-card .login-tag span {
  font-family:"Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size:12px; font-weight:700; color:var(--brand-light);
  text-transform:uppercase; letter-spacing:.18em;
  white-space:nowrap;
}

.login-card input[type=email],
.login-card input[type=password] {
  width:100%; padding:13px 15px; border:1px solid var(--line); border-radius:11px;
  font-size:15px; color:var(--text); background:#fff;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.login-card input::placeholder { color:#94a3b8; }
.login-card input[type=email]:hover,
.login-card input[type=password]:hover { border-color:#cbd5e1; }
.login-card input[type=email]:focus,
.login-card input[type=password]:focus {
  outline:none; border-color:rgba(47,90,143,.55);
  background:rgba(255,255,255,.9);
  box-shadow:0 0 0 3px rgba(47,90,143,.10);
}
.login-field { margin:0 0 12px; }

.login-card .btn { width:100%; }

/* email field + continue arrow */
.email-wrap { position:relative; }
.email-wrap input[type=email] { padding-right:50px; }
/* email arrow + sign-in button share the topbar's liquid-glass recipe:
   a soft white sheen over a translucent navy fill, frosted backdrop, a thin
   specular top edge and a hint of depth below — so the login mirrors the bar. */
.email-arrow {
  position:absolute; top:6px; right:6px; bottom:6px;
  width:38px; border-radius:9px; cursor:pointer; padding:0;
  display:flex; align-items:center; justify-content:center;
  color:#fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 46%),
    rgba(30, 58, 95, .66);
  -webkit-backdrop-filter: blur(26px) saturate(195%);
          backdrop-filter: blur(26px) saturate(195%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow:
    0 8px 28px -12px rgba(8, 20, 38, .40),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(8, 20, 38, .16);
  transition:background .14s ease, transform .14s ease, box-shadow .14s ease;
}
.email-arrow:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 46%),
    rgba(24, 47, 79, .80);
}
.email-arrow:active { transform:scale(.94); }
.email-arrow:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(47,90,143,.35); }
.email-arrow svg { transition:transform .14s ease; }
.email-arrow:hover svg { transform:translateX(2px); }
.email-arrow.done { background:#eef2f7; color:var(--brand-light); border-color:transparent; box-shadow:none; }
.email-arrow.done:hover { background:#e6ecf4; }

/* sliding password reveal. The 5px inset (offset by negative margins) gives
   the password field's focus ring room inside the overflow:hidden clip, so it
   isn't cropped the way it would be flush against the container edge. */
.reveal {
  max-height:0; opacity:0; overflow:hidden;
  padding:5px 5px 0; margin-left:-5px; margin-right:-5px;
  transition:max-height .3s var(--ease), opacity .22s ease, margin .3s ease;
}
.reveal.open { max-height:260px; opacity:1; margin-top:-3px; }

/* sign-in button — same liquid-glass recipe as the topbar + email arrow */
#sign-in {
  margin-top:4px; width:100%;
  color:#fff; border:1px solid rgba(255, 255, 255, .12);
  padding:14px 16px; border-radius:11px;
  font-size:15px; font-weight:600; letter-spacing:.01em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 46%),
    rgba(30, 58, 95, .66);
  -webkit-backdrop-filter: blur(26px) saturate(195%);
          backdrop-filter: blur(26px) saturate(195%);
  box-shadow:
    0 8px 28px -12px rgba(8, 20, 38, .40),
    inset 0 1px 0 rgba(255, 255, 255, .22),
    inset 0 -1px 0 rgba(8, 20, 38, .16);
  transition:background .14s ease, transform .09s ease, box-shadow .14s ease;
}
#sign-in:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 46%),
    rgba(24, 47, 79, .80);
}
#sign-in:active { transform:scale(.985); }
#sign-in:focus-visible { outline:none; box-shadow:0 0 0 3px rgba(47,90,143,.28); }

/* forgot password link */
.reset-line { margin:14px 0 0; text-align:center; }
.linklike-btn {
  background:none; border:none; color:var(--muted); font-size:13px; cursor:pointer;
  padding:2px 4px; border-radius:6px; transition:color .11s ease;
}
.linklike-btn:hover { color:var(--brand-light); text-decoration:underline; }

/* footer under the card */
.login-foot {
  display:flex; align-items:center; justify-content:center; gap:6px;
  margin:20px 0 0; font-size:12px; letter-spacing:.02em;
  color:var(--muted);
}
.login-foot svg { opacity:.7; }
.notice { margin-top:14px; font-size:14px; padding:12px; border-radius:10px; }
.notice.ok { background:var(--good-bg); color:var(--good); }
.notice.err { background:var(--bad-bg); color:var(--bad); }
.muted-foot { text-align:center; color:var(--muted); font-size:12px; margin-top:26px; }

/* ---- admin table ---- */
.admin-table { width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line);
  border-radius:14px; overflow:hidden; box-shadow:var(--shadow); }
.admin-table th, .admin-table td { text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); font-size:14px; }
.admin-table th { background:#f7fafe; color:var(--brand); font-size:12px; text-transform:uppercase; letter-spacing:.4px; }
.admin-table tr:last-child td { border-bottom:none; }
.mini-bar { height:8px; width:120px; background:#e8edf3; border-radius:999px; overflow:hidden; display:inline-block; vertical-align:middle; }
.mini-bar > span { display:block; height:100%; background:var(--accent); }
.score-good { color:var(--good); font-weight:700; }
.score-bad { color:var(--bad); font-weight:700; }
.empty { text-align:center; color:var(--muted); padding:40px; }

/* ===========================================================================
   HOME HUB (index.html) — greeting + tile grid
   =========================================================================== */
#home-view { position:relative; }
/* topbar stays sticky above page content */
#home-view .topbar { z-index:20; }
#home-view .home-wrap { position:relative; z-index:1; }

.home-wrap { padding-top:44px; }
.hub-head {
  margin:0 0 30px;
  min-height:var(--head-min);   /* reserve the widget's height so the greeting
                                   sits at its final spot before it loads */
  display:flex; align-items:center; justify-content:space-between; gap:22px;
  flex-wrap:wrap;
}
.hub-head-text { min-width:0; }
.hub-greeting {
  font-size:32px; font-weight:800; letter-spacing:-.02em; color:var(--brand);
  margin:0; line-height:1.14;
}
/* The ", Name" tail stays hidden until shell.js sets the name + .has-name. */
.hub-greeting .greet-rest { display:none; }
.hub-greeting.has-name .greet-rest { display:inline-block; }
.hub-greeting .greet-name { color:var(--brand-light); }
.hub-sub { margin:9px 0 0; font-size:15.5px; color:var(--muted); }

.tiles {
  display:grid; gap:18px;
  grid-template-columns:repeat(auto-fill, minmax(290px, 1fr));
}

/* Hub layout toggle bar (Grid / List), right-aligned above the tile grids. */
.hub-toolbar { display:flex; justify-content:flex-end; margin:0 0 18px; }

/* List view: stack tiles as full-width compact rows. The class lives on the
   grid container(s); tiles keep their existing flex layout but drop the
   description and pull the meta inline beside the title. */
.tiles.is-list {
  display:flex; flex-direction:column; gap:10px; grid-template-columns:none;
}
.tiles.is-list .tile { padding:13px 18px; border-radius:14px; align-items:center; gap:15px; }
.tiles.is-list .tile:hover { transform:translateY(-2px); }
.tiles.is-list .tile-icon { width:42px; height:42px; }
.tiles.is-list .tile-icon svg { width:20px; height:20px; }
.tiles.is-list .tile-body {
  flex-direction:row; align-items:center; justify-content:space-between; gap:8px 18px;
}
.tiles.is-list .tile-body h2 { margin:0; font-size:15.5px; }
.tiles.is-list .tile-desc { display:none; }
.tiles.is-list .tile-meta { margin:0; padding:0; flex:0 0 auto; }
/* In list view, lay the pin star and arrow out as real row items (not absolute)
   so the star reserves its own slot — that keeps the grey meta text clear of the
   star and lines every arrow up on the same right edge. Arrow sits outermost. */
.tiles.is-list .tile-pin { position:static; transform:none; flex:0 0 auto; }
.tiles.is-list .tile-pin:hover { transform:scale(1.08); }
.tiles.is-list .tile-go { order:1; margin-left:2px; }
.tile {
  position:relative; display:flex; align-items:flex-start; gap:16px;
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:18px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  padding:22px; text-decoration:none; color:inherit;
  box-shadow:var(--glass-shadow);
  transition:transform .15s var(--ease), box-shadow .15s ease, border-color .15s ease;
}
.tile:hover {
  transform:translateY(-4px);
  box-shadow:0 18px 36px -14px rgba(15,23,42,.3);
  border-color:#d3deec;
}
/* Minimal, airy line icons in soft tinted circles. */
.tile-icon {
  flex:0 0 auto; width:48px; height:48px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:transform .15s var(--ease), background .15s ease;
}
.tile-icon svg { width:23px; height:23px; stroke-width:1.6; }
.tile-icon.onboarding  { background:rgba(30,58,95,.09);   color:var(--brand); }
.tile-icon.commissions { background:rgba(37,99,235,.10);  color:var(--accent); }
.tile-icon.reporting   { background:rgba(100,116,139,.13); color:#64748b; }
.tile-icon.process     { background:rgba(22,163,74,.11);  color:var(--good); }
.tile:hover .tile-icon.process { background:rgba(22,163,74,.18); }
.tile-icon.arsenal     { background:rgba(245,158,11,.13); color:#d97706; }
.tile:hover .tile-icon.arsenal { background:rgba(245,158,11,.20); }
.tile-icon.training    { background:rgba(124,58,237,.12); color:#7c3aed; }
.tile:hover .tile-icon.training { background:rgba(124,58,237,.19); }
.tile-icon.appointments { background:rgba(8,145,178,.12); color:#0891b2; }
.tile:hover .tile-icon.appointments { background:rgba(8,145,178,.20); }
.tile-icon.service { background:rgba(99,102,241,.12); color:#6366f1; }
.tile:hover .tile-icon.service { background:rgba(99,102,241,.20); }
.tile-icon.users    { background:rgba(37,99,235,.10);  color:var(--accent); }
.tile-icon.manage   { background:rgba(30,58,95,.09);   color:var(--brand); }
.tile-icon.progress { background:rgba(22,163,74,.11);  color:var(--good); }
.tile:hover .tile-icon { transform:scale(1.09); }
.tile:hover .tile-icon.onboarding  { background:rgba(30,58,95,.15); }
.tile:hover .tile-icon.commissions { background:rgba(37,99,235,.17); }
.tile:hover .tile-icon.users    { background:rgba(37,99,235,.17); }
.tile:hover .tile-icon.manage   { background:rgba(30,58,95,.15); }
.tile:hover .tile-icon.progress { background:rgba(22,163,74,.18); }

/* manager hub tiles are interactive (div[role=button]) */
.tile[role="button"] { cursor:pointer; }
.tile[role="button"]:focus-visible {
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,.25);
}
/* Column layout so the footer can pin to the bottom of the (equal-height)
   tile — keeps every tile's meta row on a shared baseline no matter how many
   lines the description runs. */
.tile-body { flex:1 1 auto; min-width:0; align-self:stretch; display:flex; flex-direction:column; }
.tile-body h2 { margin:2px 0 0; font-size:17px; font-weight:700; color:var(--text); }
/* Clamp descriptions to two lines so an unusually long one can't blow out a
   whole row's height. */
.tile-desc {
  margin:4px 0 0; font-size:13.5px; color:var(--muted); line-height:1.4;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
/* margin-top:auto pushes the footer to the bottom; the min keeps a sensible
   gap on single-line tiles where there's room to spare. */
.tile-meta { display:flex; align-items:center; gap:10px; margin-top:auto; padding-top:14px; }
.tile-mini-bar {
  flex:0 0 auto; width:78px; height:7px; background:#e8edf3;
  border-radius:999px; overflow:hidden;
}
.tile-mini-bar > span {
  display:block; height:100%; background:var(--accent);
  transition:width .38s ease;
}
.tile-stat { font-size:12.5px; color:var(--muted); font-weight:600; }
.tile-stat.muted { font-weight:500; }
.tile-go {
  flex:0 0 auto; align-self:center; color:var(--muted);
  transition:color .14s ease, transform .14s ease;
}
.tile:hover .tile-go { color:var(--accent); transform:translateX(3px); }

/* coming-soon tile */
.tile-soon { cursor:default; opacity:.78; }
.tile-soon:hover { transform:none; box-shadow:var(--glass-shadow); border-color:var(--glass-border); }
.tile-soon-tag {
  position:absolute; top:16px; right:16px;
  font-size:11px; font-weight:700; letter-spacing:.4px; text-transform:uppercase;
  color:var(--muted); background:#eef2f7; padding:3px 9px; border-radius:999px;
}

/* ---------------------------------------------------------------------------
   Pin-to-top: a quiet star in each tile's top-right corner. It rests almost
   invisible, warms up when you hover the tile, and locks to the accent colour
   once pinned. Sits above the link so a click pins instead of navigating.
   --------------------------------------------------------------------------- */
.tile-pin {
  position:absolute; top:13px; right:13px; z-index:2;
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px; padding:0; border-radius:50%;
  background:transparent; border:none; cursor:pointer;
  color:var(--muted); opacity:0;
  transition:opacity .14s ease, background .12s ease, color .12s ease, transform .12s var(--ease);
}
.tile-pin svg { display:block; }
.tile:hover .tile-pin { opacity:.55; }
.tile-pin:hover { opacity:1; background:rgba(30,58,95,.08); color:var(--brand); transform:scale(1.08); }
.tile-pin:focus-visible {
  opacity:1; outline:none;
  box-shadow:0 0 0 3px rgba(37,99,235,.25);
}
/* Pinned: always visible and filled in the accent colour. */
.tile-pin.is-pinned { opacity:1; color:var(--accent); }
.tile-pin.is-pinned svg { fill:currentColor; }
.tile:hover .tile-pin.is-pinned { opacity:1; }
@media (hover:none) { .tile-pin { opacity:.5; } }   /* always show on touch */

/* Once the hub has settled, suppress the riseIn entrance so re-ordering tiles
   between the Pinned / All grids doesn't replay (and "flash") their fade-in.
   Movement is handled by a FLIP transform in home.js instead. */
.tiles.tiles-static > * { animation:none; }

/* Small section labels above the Pinned / All-tools grids. */
.tiles-label {
  margin:2px 2px 12px; font-size:13px; font-weight:700; letter-spacing:.3px;
  text-transform:uppercase; color:var(--muted);
}
.pinned-section { margin-bottom:26px; }

/* ===========================================================================
   APPOINTMENTS PAGE — two choice cards + the GHL calendar popup
   ======================================================================== */
.appt-grid {
  display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
  gap:18px;
}
.appt-card {
  position:relative; display:flex; align-items:flex-start; gap:16px;
  text-align:left; cursor:pointer; width:100%;
  font-family:inherit; font-size:inherit;   /* buttons don't inherit these by default */
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:18px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  padding:24px; color:inherit;
  box-shadow:var(--glass-shadow);
  transition:transform .15s var(--ease), box-shadow .15s ease, border-color .15s ease;
}
.appt-card:hover {
  transform:translateY(-4px);
  box-shadow:0 18px 36px -14px rgba(15,23,42,.3);
  border-color:#d3deec;
}
.appt-card:active { transform:translateY(-1px); }
.appt-card:focus-visible {
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,.25);
}
.appt-icon {
  flex:0 0 auto; width:48px; height:48px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:transform .15s var(--ease), background .15s ease;
}
.appt-icon svg { width:23px; height:23px; }
.appt-icon.new    { background:rgba(8,145,178,.12); color:#0891b2; }
.appt-icon.client { background:rgba(30,58,95,.09);  color:var(--brand); }
.appt-card:hover .appt-icon { transform:scale(1.09); }
.appt-card:hover .appt-icon.new    { background:rgba(8,145,178,.20); }
.appt-card:hover .appt-icon.client { background:rgba(30,58,95,.15); }
.appt-text { display:flex; flex-direction:column; min-width:0; }
.appt-title { font-size:17px; font-weight:700; color:var(--text); }
.appt-desc {
  margin-top:5px; font-size:13.5px; color:var(--muted); line-height:1.45;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
}
.appt-go {
  flex:0 0 auto; align-self:center; margin-left:auto; color:var(--muted);
  transition:color .14s ease, transform .14s ease;
}
.appt-card:hover .appt-go { color:var(--accent); transform:translateX(3px); }

/* GHL calendar embed inside the wide modal */
#cal-modal { max-width:1180px; }
/* The GHL widget renders with empty padding at its top, which shows as a grey
   band under the title. We can't style inside a cross-origin iframe, so we clip
   that strip: hide the wrapper's overflow and pull the iframe up by --cal-crop,
   adding the same amount back to its height so nothing is lost at the bottom.
   Kept moderate so it's tidy without feeling cramped — tweak --cal-crop to taste. */
#cal-modal { --cal-crop:34px; }
.cal-frame-wrap { margin-top:2px; min-height:60px; overflow:hidden; border-radius:12px; }
.cal-frame {
  width:100%; height:calc(74vh + var(--cal-crop)); min-height:520px;
  margin-top:calc(-1 * var(--cal-crop));
  border:none; background:transparent; display:block;
}
.cal-empty {
  margin:8px 0 4px; padding:22px; text-align:center;
  font-size:14px; color:var(--muted); line-height:1.55;
  background:#f8fafc; border:1px solid var(--line); border-radius:12px;
}
.cal-empty code {
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:13px;
  background:#eef2f7; padding:1px 6px; border-radius:5px; color:var(--brand);
}

/* ---- Service Requests page: embedded GHL form ----
   No wrapper chrome — just the iframe on the page background. It stays hidden
   until its content loads, then enters with the site's standard riseIn — the
   exact same entrance (fade + 14px rise, .5s, --ease) every other element uses. */
.service-embed iframe {
  display:block; width:100%; min-height:763px; border:none;
  opacity:0;
}
.service-embed iframe.loaded { opacity:1; }
@media (prefers-reduced-motion: no-preference) {
  .service-embed iframe.loaded { animation: riseIn .38s var(--ease) backwards; }
}

/* ---- Reporting & Analytics page: embedded Looker Studio dashboard ----
   Same treatment as the service form: the iframe sits on the page background
   (rounded + bordered to match cards) and enters with the standard riseIn
   once its content loads. The report is 1223×687, so the iframe is locked to
   that aspect ratio and scales with the column — no scrollbars. A little inner
   padding keeps the report content clear of the rounded corners. */
.report-embed {
  border-radius:18px; border:1px solid var(--line);
  background:var(--card); box-shadow:var(--glass-shadow, 0 10px 30px rgba(15,23,42,.08));
  padding:14px;
}
.report-embed iframe {
  display:block; width:100%;
  aspect-ratio:1223 / 687; border:none; border-radius:8px;
  opacity:0;
}
.report-embed iframe.loaded { opacity:1; }
@media (prefers-reduced-motion: no-preference) {
  .report-embed iframe.loaded { animation: riseIn .38s var(--ease) backwards; }
}

/* ---- "Road to target" — shared ring colours ----
   The ring is colour-coded by pace: green = on/ahead of pace, amber = a little
   behind, red = well behind. Track is neutral; fill animates on load. */
.road-ring { display:block; }
.road-ring-track { stroke:var(--line); }
.road-ring-fill { stroke:var(--accent); transition:stroke-dashoffset .75s var(--ease); }
.road-ring-fill.is-ahead  { stroke:var(--good); }
.road-ring-fill.is-near   { stroke:#f59e0b; }
.road-ring-fill.is-behind { stroke:#ef4444; }
.road-ring-pct { font-weight:700; fill:var(--text); }

/* ---- Compact home widget ----
   A small side card that sits up by the greeting (top-right). Just a ring,
   one strong revenue figure, and a quiet apps line — nothing more. */
.road-widget {
  flex:0 0 auto;
  display:flex; align-items:center; gap:14px;
  background:linear-gradient(150deg, #f5f9ff, #e9f0fb);
  border:1px solid rgba(30,58,95,.18);   /* navy outline, matched to the topbar */
  border-radius:16px;
  box-shadow:0 10px 26px -16px rgba(30,58,95,.45);
  padding:12px 16px 12px 12px;
  text-decoration:none;            /* it's an <a> to the reporting page */
  cursor:pointer;
  transition:transform .14s var(--ease), box-shadow .14s var(--ease), border-color .14s var(--ease);
}
a.road-widget:hover {           /* a… raises specificity above the .is-in entrance rule */
  transform:translateY(-2px);
  box-shadow:0 16px 32px -16px rgba(30,58,95,.55);
  border-color:rgba(30,58,95,.30);
}
/* Entrance: stays invisible until renderRoadCard injects content and adds
   .is-in (via requestAnimationFrame), so it eases in WHEN the data lands
   instead of snapping at page load while still empty. */
@media (prefers-reduced-motion: no-preference) {
  .road-widget {
    opacity:0; transform:translateY(8px);
    transition:opacity .34s var(--ease), transform .34s var(--ease);
  }
  .road-widget.is-in { opacity:1; transform:none; }
}
.road-widget .road-ring-pct { font-size:27px; }
.road-widget .rw-info { display:flex; flex-direction:column; line-height:1.15; }
.rw-eyebrow {
  font-size:11px; font-weight:700; letter-spacing:.02em; color:var(--muted);
  margin-bottom:2px;
}
.rw-rev { font-size:23px; font-weight:800; color:var(--text); letter-spacing:-.01em; }
.rw-meta {
  align-self:flex-start;        /* pill hugs its text, doesn't stretch full width */
  margin-top:5px;
  padding:3px 9px;
  font-size:11.5px; font-weight:600; letter-spacing:.01em;
  color:var(--muted);
  background:rgba(255,255,255,.45);
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
/* A subtle status tint on the revenue figure, echoing the ring colour. */
.road-widget.is-ahead  .rw-rev { color:var(--good); }
.road-widget.is-behind .rw-rev { color:#dc2626; }
/* The apps pill mirrors the same pacing status as the revenue figure. */
.road-widget.is-ahead  .rw-meta { color:var(--good); }
.road-widget.is-near   .rw-meta { color:#b45309; }
.road-widget.is-behind .rw-meta { color:#dc2626; }
/* Condensed pace pill — same shape as .rw-meta, tinted by tone. Replaces the
   apps line when we have a meaningful pace read; the full sentence is on
   Reporting. */
.rw-pace {
  align-self:flex-start;
  margin-top:5px;
  padding:3px 9px;
  font-size:11.5px; font-weight:700; letter-spacing:.01em;
  border:1px solid transparent;
  border-radius:999px;
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.rw-pace.is-good { color:#14532d; background:rgba(22,163,74,.10);  border-color:rgba(22,163,74,.22); }
.rw-pace.is-warn { color:#7c2d12; background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.28); }
.rw-pace.is-done { color:#14532d; background:rgba(22,163,74,.12);  border-color:rgba(22,163,74,.25); }
.road-widget.road-widget-msg { padding:14px 16px; }
.road-empty { font-size:12.5px; color:var(--muted); margin:0; }

@media (max-width:680px) {
  /* The widget wraps to its own full-width line below the greeting here, so the
     reserved header band no longer applies — drop it so Home and the other
     pages keep an identical (natural) gap under the menu bar. */
  :root { --head-min:auto; }
  .hub-head { gap:16px; }
  .road-widget { width:100%; }   /* drop to full width under the greeting */
}

/* ---- Fuller version on the Reporting page ----
   Roomier than the widget but still tight: ring beside a small set of figures.
   Uses .road-card-full as its container (set in reporting.html). */
.road-card-full {
  display:flex; align-items:center; gap:28px; flex-wrap:wrap;
  background:var(--card, #fff);          /* match the white chart cards below */
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--glass-shadow);
  padding:22px 26px; margin-bottom:22px;
}
@media (prefers-reduced-motion: no-preference) {
  .road-card-full {
    opacity:0; transform:translateY(8px);
    transition:opacity .34s var(--ease), transform .34s var(--ease);
  }
  .road-card-full.is-in { opacity:1; transform:none; }
}
.road-card-full .road-ring-wrap { flex:0 0 auto; line-height:0; }
.road-card-full .road-ring-pct { font-size:30px; }
.road-card-full .road-stats { flex:1 1 240px; display:flex; flex-direction:column; gap:12px; }
.road-card-full .road-eyebrow {
  font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  color:var(--muted);
}
.road-card-full .road-figs { display:flex; gap:34px; flex-wrap:wrap; }
.road-card-full .road-fig { display:flex; flex-direction:column; gap:2px; }
.road-card-full .road-fig-lab { font-size:12px; font-weight:600; color:var(--muted); }
.road-card-full .road-fig-val { font-size:26px; font-weight:700; color:var(--text); letter-spacing:-.01em; }

@media (max-width:560px) {
  .road-body { gap:18px; }
  .road-figs { gap:22px; }
}

/* ---- Reporting-page snapshot: date-range filter + pacing note ----
   The date controls sit above the road card; the pacing note sits below it.
   The card's own bottom margin is dropped here so spacing stays even. */
.report-snapshot { margin-bottom:22px; }
.report-snapshot .road-card-full { margin-bottom:0; }
.snap-controls {
  display:flex; align-items:flex-end; justify-content:flex-end;
  gap:14px; flex-wrap:wrap; margin-bottom:14px;
}
.snap-dates { display:flex; gap:12px; flex-wrap:wrap; }
.snap-field {
  display:flex; flex-direction:column; gap:4px;
  font-size:11.5px; font-weight:700; letter-spacing:.02em; color:var(--muted);
}
.snap-field input {
  font:inherit; font-size:13px; font-weight:600; color:var(--text);
  padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff;
}
.snap-field input:focus {
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.snap-reset {
  font:inherit; font-size:12.5px; font-weight:700; color:var(--brand);
  padding:9px 14px; border:1px solid var(--line); border-radius:10px;
  background:#fff; cursor:pointer;
  transition:background .11s var(--ease), border-color .11s var(--ease);
}
.snap-reset:hover { background:#f8fafc; border-color:rgba(30,58,95,.3); }
.snap-apply {
  font:inherit; font-size:12.5px; font-weight:700; color:#fff;
  padding:9px 18px; border:1px solid var(--accent); border-radius:10px;
  background:var(--accent); cursor:pointer;
  transition:background .11s var(--ease), border-color .11s var(--ease), box-shadow .11s var(--ease);
}
.snap-apply:hover { background:#1d4ed8; border-color:#1d4ed8; }
/* gentle nudge when dates have changed but not yet applied */
.snap-apply.is-pending { box-shadow:0 0 0 3px rgba(37,99,235,.22); }

/* ---- date-RANGE picker (daterange.js) ---------------------------------- */
.dr { position:relative; display:inline-block; }
.dr-trigger {
  display:inline-flex; align-items:center; gap:10px;
  font:inherit; font-size:14px; font-weight:700; color:var(--text);
  padding:10px 14px; border:1px solid var(--line); border-radius:12px;
  background:#fff; cursor:pointer;
  transition:background .11s var(--ease), border-color .11s var(--ease);
}
.dr-trigger:hover { background:#f8fafc; border-color:rgba(30,58,95,.3); }
.dr-trig-ico { width:17px; height:17px; color:var(--muted); flex:0 0 auto; }
.dr-caret { width:15px; height:15px; color:var(--muted); margin-left:2px; flex:0 0 auto; }

.dr-panel {
  position:absolute; z-index:1200; display:flex; overflow:hidden;
  background:#fff; border:1px solid var(--line); border-radius:16px;
  box-shadow:0 26px 60px -22px rgba(15,23,42,.4), 0 10px 26px -14px rgba(15,23,42,.22);
}
@media (prefers-reduced-motion: no-preference) {
  .dr-panel { opacity:0; transform:translateY(-6px);
    transition:opacity .12s var(--ease), transform .12s var(--ease); }
  .dr-panel.dr-in { opacity:1; transform:none; }
}

/* quick-select column */
.dr-quick { width:188px; flex:0 0 auto; padding:16px 14px; background:#f8fafc; border-right:1px solid var(--line); }
.dr-quick-head, .dr-custom-head {
  margin:0 0 10px; font-size:11px; font-weight:700; letter-spacing:.05em;
  text-transform:uppercase; color:var(--muted);
}
.dr-quick-item {
  display:block; width:100%; text-align:left; font:inherit; font-size:13.5px;
  font-weight:600; color:var(--text); padding:8px 10px; margin:1px 0;
  border:0; border-radius:9px; background:none; cursor:pointer;
  transition:background .09s var(--ease), color .09s var(--ease);
}
.dr-quick-item:hover { background:#eef2f7; }
.dr-quick-item.is-active { background:var(--accent); color:#fff; }

/* custom range area */
.dr-custom { padding:16px 18px 16px; display:flex; flex-direction:column; }
.dr-cals { display:flex; gap:26px; }
.dr-cal { width:230px; }
.dr-cal-head { display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.dr-title { flex:1 1 auto; text-align:center; font-size:14px; font-weight:700; color:var(--text); }
.dr-nav {
  width:28px; height:28px; flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--text); cursor:pointer;
  transition:background .09s var(--ease);
}
.dr-nav:hover:not(:disabled) { background:#f1f5f9; }
.dr-nav:disabled { opacity:.35; cursor:default; }
.dr-nav svg { width:15px; height:15px; }
.dr-nav-spacer { width:28px; height:28px; flex:0 0 auto; }

.dr-dow { display:grid; grid-template-columns:repeat(7, 1fr); margin-bottom:4px; }
.dr-dow span { text-align:center; font-size:11px; font-weight:600; color:var(--muted); padding:4px 0; }
.dr-days { display:grid; grid-template-columns:repeat(7, 1fr); row-gap:2px; }
.dr-pad { height:36px; }
.dr-day {
  position:relative; height:36px; padding:0; border:0; background:none; cursor:pointer;
  font:inherit; font-size:13px; color:var(--text);
  display:flex; align-items:center; justify-content:center;
}
.dr-day-n {
  width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:background .09s var(--ease);
}
/* hover only the plain (non-selected) days, so the accent endpoints never get
   overpainted with grey (which made white text unreadable + looked like a flash) */
.dr-day:not(.is-start):not(.is-end):not(.is-single):hover:not(.is-disabled) .dr-day-n { background:#eef2f7; }
/* range band (cells touch horizontally, so the tint reads as one bar) */
.dr-day.is-range,
.dr-day.is-start,
.dr-day.is-end { background:rgba(37,99,235,.10); }
.dr-day.is-single { background:none; }
/* rounded ends on each band segment (true start/end + week-row & month edges) */
.dr-day.rl { border-top-left-radius:14px; border-bottom-left-radius:14px; }
.dr-day.rr { border-top-right-radius:14px; border-bottom-right-radius:14px; }
.dr-day.is-start .dr-day-n,
.dr-day.is-end .dr-day-n,
.dr-day.is-single .dr-day-n { background:var(--accent); color:#fff; font-weight:700; }
.dr-day.is-start:hover .dr-day-n,
.dr-day.is-end:hover .dr-day-n,
.dr-day.is-single:hover .dr-day-n { background:#1d4ed8; }
.dr-day.is-today:not(.is-start):not(.is-end):not(.is-single) .dr-day-n {
  box-shadow:inset 0 0 0 1.5px var(--accent);
}
.dr-day.is-disabled { color:#cbd5e1; cursor:default; }
.dr-day.is-disabled:hover .dr-day-n { background:none; }

.dr-foot {
  display:flex; align-items:center; gap:14px;
  margin-top:16px; padding-top:14px; border-top:1px solid var(--line);
}
.dr-range-lab { margin-right:auto; font-size:12.5px; font-weight:600; color:var(--muted); }
.dr-apply {
  font:inherit; font-size:13px; font-weight:700; color:#fff;
  padding:9px 20px; border:1px solid var(--accent); border-radius:10px;
  background:var(--accent); cursor:pointer;
  transition:background .11s var(--ease), border-color .11s var(--ease);
}
.dr-apply:hover { background:#1d4ed8; border-color:#1d4ed8; }
.dr-apply.is-disabled { opacity:.45; cursor:default; }
.dr-apply.is-disabled:hover { background:var(--accent); border-color:var(--accent); }

@media (max-width:760px) {
  .dr-panel { flex-direction:column; max-width:calc(100vw - 24px); }
  .dr-quick { width:auto; border-right:0; border-bottom:1px solid var(--line);
    display:grid; grid-template-columns:1fr 1fr; gap:2px 8px; }
  .dr-quick-head { grid-column:1 / -1; }
  .dr-cals { flex-direction:column; gap:16px; }
  .dr-cal { width:auto; }
}

.pace-note {
  margin:14px 0 0; padding:12px 16px;
  font-size:13.5px; font-weight:600; line-height:1.45;
  border-radius:12px; border:1px solid var(--line); color:var(--text);
}
.pace-note.is-good { color:#14532d; background:rgba(22,163,74,.08);  border-color:rgba(22,163,74,.22); }
.pace-note.is-warn { color:#7c2d12; background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.28); }
.pace-note.is-done { color:#14532d; background:rgba(22,163,74,.10);  border-color:rgba(22,163,74,.25); }

/* ---- Reporting-page charts ---- */
.charts {
  display:grid; grid-template-columns:1.6fr 1fr; gap:18px; margin-top:18px;
  align-items:stretch;
}
.chart-card {
  min-width:0; /* let the grid cell shrink instead of being pushed wide */
  background:var(--card, #fff); border:1px solid var(--line);
  border-radius:16px; padding:18px 20px; box-shadow:var(--glass-shadow);
  display:flex; flex-direction:column;
}
.chart-title { font-size:15px; font-weight:700; color:var(--brand); margin:0 0 16px; }
.chart-empty { font-size:13px; color:var(--muted); margin:auto 0; text-align:center; }

/* bar chart: rendered as a SINGLE SVG (see renderBarChart in reporting.js).
   Bars, value labels and slanted category labels all share one coordinate
   space, so nothing clips, collides, or drifts. The SVG scales to the card
   width while preserving its internal proportions. */
.bar-chart {
  flex:1 1 auto; display:flex; align-items:center; justify-content:center;
}
.bc-svg { width:100%; height:auto; display:block; overflow:visible; }
.bc-axis { stroke:var(--brand); stroke-width:2; }
.bc-bar {
  fill:url(#bcGrad);
  transform:scaleY(0); transform-box:fill-box; transform-origin:bottom;
  transition:transform .45s var(--ease);
}
.bar-chart.in .bc-bar { transform:scaleY(1); }
.bc-col:hover .bc-bar { fill:#1d4ed8; }
.bc-val { font-size:12px; font-weight:700; fill:var(--text); }
.bc-lab { font-size:12px; font-weight:600; fill:var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .bc-bar { transform:scaleY(1); transition:none; }
}

/* Medicare vs Ancillary donut + legend */
.split-chart {
  flex:1 1 auto; display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:18px;
}
.donut { width:128px; height:128px; flex:0 0 auto; }
.donut-track { stroke:var(--line); }
.donut-arc {
  stroke:var(--accent); stroke-linecap:round;
  transition:stroke-dashoffset .75s var(--ease);
}
.donut-pct { font-size:24px; font-weight:800; fill:var(--text); }
.donut-cap { font-size:11px; font-weight:600; fill:var(--muted); letter-spacing:.02em; }
/* 70% target notch on the ring + its caption */
.donut-goal { stroke:var(--brand); stroke-width:2.5; stroke-linecap:round; }
.donut-note {
  display:flex; align-items:center; gap:7px; margin:0;
  font-size:12px; font-weight:600; color:var(--muted);
}
.donut-note-tick {
  width:14px; height:0; flex:0 0 auto;
  border-top:2.5px solid var(--brand); border-radius:2px;
}
.donut-note.is-hit { color:var(--good); }
.donut-note.is-hit .donut-note-tick { border-top-color:var(--good); }
.split-legend { list-style:none; margin:0; padding:0; width:100%; max-width:260px; }
.split-legend li {
  display:flex; align-items:center; gap:8px;
  font-size:13px; color:var(--muted); padding:6px 0;
}
.split-legend li + li { border-top:1px solid var(--line); }
.split-legend .leg-lab { flex:1 1 auto; font-weight:600; color:var(--text); }
.split-legend b { font-weight:700; color:var(--text); }
.split-legend .leg-pct { width:42px; text-align:right; }
.split-legend .dot { width:10px; height:10px; border-radius:3px; flex:0 0 auto; }
.split-legend .dot-anc { background:var(--accent); }
.split-legend .dot-med { background:#94a3b8; }

@media (prefers-reduced-motion: reduce) {
  .donut-arc { transition:none; }
}
@media (max-width:720px) {
  .charts { grid-template-columns:1fr; }
}

@media (max-width:560px) {
  .snap-controls { justify-content:stretch; }
  .snap-dates { flex:1 1 auto; }
  .snap-field { flex:1 1 0; }
}

/* ---- hub flourishes layered on top of the unified cascade ----
   The greeting block + tiles already ride the MOTION SYSTEM cascade; this adds
   the home-only touch: the name sliding in once it loads. */
@media (prefers-reduced-motion: no-preference) {
  /* the ", Joshua" tail slides in once the name loads */
  .hub-greeting.has-name .greet-rest { animation: nameIn .45s var(--ease) both; }
  @keyframes nameIn { from { opacity:0; transform:translateX(-10px); } }
}

/* ===========================================================================
   COMMISSIONS (commissions.html)
   =========================================================================== */
/* tab bar — a light segmented control toggling the page's two panels */
.tabs {
  display:inline-flex; gap:4px; margin:0 0 24px; padding:4px;
  background:#eef2f7; border:1px solid var(--line); border-radius:13px;
}
.tab {
  appearance:none; border:none; cursor:pointer;
  padding:9px 20px; border-radius:9px;
  font-size:14px; font-weight:600; color:var(--muted);
  background:transparent; transition:color .12s ease, background .12s ease, box-shadow .12s ease;
}
.tab:hover { color:var(--text); }
.tab.is-active {
  color:var(--brand); background:var(--card, #fff);
  box-shadow:0 1px 3px rgba(15,23,42,.12);
}
.tab:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

/* panels fade/slide in when their tab is selected */
.tab-panel[hidden] { display:none; }
.tab-panel {
  animation:tabPanelIn .24s var(--ease) both;
}
@keyframes tabPanelIn {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tab-panel { animation:none; }
}

/* Standing board: one navy summary card — header (tier + next level) over a
   pay|pace split, with a slim production-targets strip along the bottom. */
.comp-board { margin:0 0 16px; }
.cb-hero {
  background:linear-gradient(135deg, #2f5a8f, #1e3a5f); color:#fff;
  border-radius:18px; padding:22px 26px;
  box-shadow:0 12px 28px -14px rgba(30,58,95,.55);
}
.cb-head {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin:0 0 16px;
}
.cb-head-tier { display:flex; flex-direction:column; gap:1px; }
.cb-tier-eyebrow {
  font-size:11.5px; font-weight:600; letter-spacing:.5px; text-transform:uppercase;
  color:rgba(255,255,255,.65);
}
.cb-tier { font-size:24px; font-weight:800; letter-spacing:-.01em; color:#fff; }

/* Inner split row: "Your pay" | divider | "Your pace". */
.cb-split { display:flex; align-items:stretch; gap:28px; padding:4px 0 18px; }
.cb-pay, .cb-pace { flex:1 1 0; min-width:0; display:flex; flex-direction:column; }
/* Centre each half's content within its own half so the empty space sits
   symmetrically around the (centred) divider, rather than pooling on the left. */
.cb-pay { align-items:center; text-align:center; }
.cb-pace { align-items:center; }
.cb-divider { width:1px; align-self:stretch; background:rgba(255,255,255,.16); flex:0 0 auto; }
.cb-half-label {
  font-size:11.5px; font-weight:600; letter-spacing:.5px; text-transform:uppercase;
  color:rgba(255,255,255,.65); margin:0 0 16px;
}
.cb-pay-figs { display:flex; gap:40px; margin:auto 0; }
.cb-fig { display:flex; flex-direction:column; gap:3px; }
.cb-fig-lab { font-size:12px; font-weight:600; color:rgba(255,255,255,.7); }
.cb-fig-val { font-size:24px; font-weight:800; letter-spacing:-.01em; }

/* Footer strip: inline production targets + the full-chart link. The explicit
   [hidden] rules are load-bearing — display:flex would beat the UA's. */
.cb-foot {
  display:flex; align-items:center; flex-wrap:wrap; gap:10px 22px;
  padding-top:14px; border-top:1px solid rgba(255,255,255,.16);
}
.cb-foot[hidden], .cb-targets[hidden] { display:none; }
.cb-targets { display:flex; flex-wrap:wrap; gap:8px 22px; flex:1 1 auto; min-width:0; }
.cb-targets-item {
  display:inline-flex; align-items:baseline; gap:7px;
  font-size:12.5px; font-weight:600; color:rgba(255,255,255,.6);
}
.cb-targets-item b { font-size:15px; font-weight:800; letter-spacing:-.01em; color:#fff; }
.cb-sheet-link { margin-left:auto; padding:7px 13px; font-size:12.5px; border-radius:999px; }

/* pace half: gauge ring + the average / verdict beside it (centred as a group;
   the meta text itself stays left-aligned for readability) */
.cb-pace-body { display:flex; align-items:center; justify-content:center; gap:18px; }
.cb-pace-placeholder {
  margin:auto 0; font-size:13px; line-height:1.45; color:rgba(255,255,255,.7);
}
.cb-gauge { flex:0 0 auto; }
.cb-ring { width:92px; height:92px; display:block; }
.cb-ring-track { stroke:rgba(255,255,255,.18); }
.cb-ring-fill { transition:stroke-dashoffset .75s var(--ease); }
.cb-ring-fill.is-good { stroke:#34d399; }
.cb-ring-fill.is-warn { stroke:#fbbf24; }
.cb-ring-fill.is-bad  { stroke:#f87171; }
.cb-ring-fill.is-none { stroke:rgba(255,255,255,.4); }
.cb-ring-pct { font-size:26px; font-weight:800; fill:#fff; }
.cb-ring-cap { font-size:11px; font-weight:600; fill:rgba(255,255,255,.6); }
.cb-pace-meta { display:flex; flex-direction:column; gap:2px; min-width:0; }
.cb-pace-avg { font-size:24px; font-weight:800; letter-spacing:-.01em; }
.cb-pace-sub { font-size:12px; font-weight:500; color:rgba(255,255,255,.6); }
.cb-pace-status {
  display:inline-flex; align-items:center; gap:7px; margin-top:8px;
  font-size:13px; font-weight:700;
}
.cb-pace-dot { width:9px; height:9px; border-radius:50%; flex:0 0 auto; }
.cb-pace-status.is-good { color:#6ee7b7; }
.cb-pace-status.is-good .cb-pace-dot { background:#34d399; }
.cb-pace-status.is-warn { color:#fcd34d; }
.cb-pace-status.is-warn .cb-pace-dot { background:#fbbf24; }
.cb-pace-status.is-bad  { color:#fca5a5; }
.cb-pace-status.is-bad  .cb-pace-dot { background:#f87171; }

@media (prefers-reduced-motion: reduce) {
  .cb-ring-fill { transition:none; }
}
@media (max-width:560px) {
  .cb-split { flex-direction:column; gap:18px; }
  .cb-divider { width:auto; height:1px; }
  .cb-pay-figs { gap:28px; justify-content:center; }
  .cb-sheet-link { margin-left:0; flex:1 1 100%; justify-content:center; }
}

/* shown when an agent has no tier/rate/base set yet (renderTier adds it) */
.tier-unset { font-size:18px !important; font-weight:600; opacity:.72; }
.btn-ghost {
  display:inline-flex; align-items:center; gap:7px;
  background:rgba(255,255,255,.12); color:#fff;
  border:1px solid rgba(255,255,255,.28); border-radius:11px;
  padding:10px 16px; font-size:14px; font-weight:600; cursor:pointer;
  text-decoration:none; transition:background .12s ease;
}
.btn-ghost:hover { background:rgba(255,255,255,.22); }

/* next-tier — a compact incentive pill in the hero's header row, beside the
   current tier name (so "where I am" and "where I'm headed" read together).
   White-translucent, since it now sits ON the navy card. */
.next-tier {
  position:relative;
  display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 13px;
  background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.24);
  border-radius:999px; font-size:13px; color:#fff; line-height:1.2;
  cursor:default;
}
.next-tier[tabindex] { cursor:pointer; }
.next-tier:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.next-tier-icon { display:inline-flex; color:#9ecbff; }

/* hover/focus popover: next-tier requirements + the live monthly gap */
.next-tier-pop {
  position:absolute; top:calc(100% + 10px); right:0; z-index:40;
  width:300px; max-width:86vw; text-align:left; cursor:default;
  background:var(--card, #fff); color:var(--text);
  border:1px solid var(--line); border-radius:14px;
  box-shadow:0 18px 44px -16px rgba(15,23,42,.42);
  padding:14px 16px;
  opacity:0; transform:translateY(-6px); pointer-events:none;
  transition:opacity .12s var(--ease), transform .12s var(--ease);
}
/* little arrow pointing up at the pill */
.next-tier-pop::before {
  content:""; position:absolute; bottom:100%; right:22px;
  border:7px solid transparent; border-bottom-color:var(--card, #fff);
  filter:drop-shadow(0 -1px 0 var(--line));
}
.next-tier:hover .next-tier-pop,
.next-tier:focus-within .next-tier-pop {
  opacity:1; transform:translateY(0); pointer-events:auto;
}
.ntp-title {
  font-size:13px; font-weight:700; color:var(--brand); margin:0 0 10px;
}
.ntp-reqs { display:flex; flex-direction:column; gap:0; }
.ntp-req {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:7px 0; border-top:1px solid var(--line);
  font-size:13px; color:var(--muted);
}
.ntp-req:first-child { border-top:none; }
.ntp-req b { font-weight:700; color:var(--text); }
.ntp-gap {
  margin-top:11px; padding-top:11px; border-top:1px solid var(--line);
  font-size:12.5px; line-height:1.5; color:var(--text);
}
.ntp-gap b { font-weight:800; color:var(--accent); }
.ntp-gap.is-muted { color:var(--muted); }
.ntp-gap.is-hit { color:#14532d; }
.ntp-gap.is-hit b { color:var(--good); }
.next-tier-text {
  display:inline-flex; align-items:center; flex-wrap:wrap; font-weight:500;
}
.next-tier-text strong { font-weight:700; color:#fff; margin-left:5px; }
.next-tier-perk { color:#9ecbff; font-weight:700; }
.next-tier-perk::before {
  content:"·"; margin:0 8px; color:rgba(255,255,255,.35); font-weight:700;
}

/* incentive schedule — the bonus table beneath the tier card */
.incentive-card {
  background:var(--card, #fff); border:1px solid var(--line);
  border-radius:16px; padding:20px 22px; margin:0 0 28px;
  box-shadow:var(--glass-shadow);
}
.incentive-head { margin:0 0 14px; }
.incentive-head .section-heading { margin:0 0 4px; }
.incentive-note { margin:0; font-size:13px; color:var(--muted); line-height:1.45; }
.incentive-table { display:flex; flex-direction:column; }
.incentive-row {
  display:grid; grid-template-columns:1.3fr 1.4fr 1fr 1fr; gap:12px;
  align-items:center; padding:13px 4px; border-top:1px solid var(--line);
}
.incentive-row-head {
  border-top:none; padding-bottom:9px;
  font-size:11.5px; font-weight:700; letter-spacing:.4px; text-transform:uppercase;
  color:var(--muted);
}
.incentive-row-head span:nth-child(n+3),
.incentive-row .inc-money { text-align:right; }
.incentive-row-head span:nth-child(2),
.incentive-row .inc-prod { text-align:left; }
.inc-level { font-size:14px; font-weight:700; color:var(--brand); }
.inc-prod { font-size:14px; font-weight:600; color:var(--text); }
.inc-prod-cap { font-size:11.5px; font-weight:500; color:var(--muted); margin-left:2px; }
.inc-money { font-size:14px; font-weight:700; color:var(--text); }
.incentive-row:hover { background:rgba(37,99,235,.03); }

@media (max-width:560px) {
  .incentive-row { grid-template-columns:1fr 1fr; row-gap:4px; padding:14px 4px; }
  .incentive-row-head { display:none; }
  .incentive-row .inc-level { grid-column:1 / -1; }
  .incentive-row .inc-prod { grid-column:1 / -1; color:var(--muted); }
  .incentive-row .inc-money::before {
    display:block; font-size:11px; font-weight:600; color:var(--muted);
    text-transform:uppercase; letter-spacing:.3px;
  }
  .incentive-row span:nth-child(3)::before { content:"Monthly"; }
  .incentive-row span:nth-child(4)::before { content:"Quarterly"; }
  .incentive-row .inc-money { text-align:left; }
}

.statements-head {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin:0 0 14px;
}
.statements-head .section-heading { margin:0; }
.statement-filters { display:flex; gap:8px; }
.select-wrap { position:relative; display:inline-flex; align-items:center; }
.filter-select {
  appearance:none; -webkit-appearance:none;
  border:1px solid var(--line); border-radius:10px;
  background:var(--card, #fff); color:var(--text);
  font:inherit; font-size:13px; font-weight:500;
  padding:8px 32px 8px 13px; cursor:pointer;
  transition:border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.filter-select:hover { border-color:#cfdcec; }
.filter-select:focus-visible {
  outline:none; border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.select-chev { position:absolute; right:11px; pointer-events:none; color:var(--muted); }

/* ===========================================================================
   CUSTOM SELECT (js/select.js) — replaces the un-styleable native popup
   platform-wide with a trigger + floating panel that matches the site.
   =========================================================================== */
/* The real <select> stays in the DOM as the source of truth, just hidden. */
.cs { position:relative; display:block; width:100%; }
.cs-native {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  border:0; clip:rect(0 0 0 0); overflow:hidden; pointer-events:none;
}
.cs-trigger {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; font:inherit; font-size:14px; font-weight:500; text-align:left;
  color:var(--text); cursor:pointer;
  background:var(--card, #fff); border:1px solid var(--line); border-radius:10px;
  padding:10px 12px;
  transition:border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.cs-trigger:hover { border-color:#cfdcec; }
.cs-trigger:focus-visible,
.cs.is-open .cs-trigger {
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.cs-value { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cs-value.is-placeholder { color:var(--muted); font-weight:500; }
.cs-chev { flex:0 0 auto; color:var(--muted); transition:transform .14s var(--ease); }
.cs.is-open .cs-chev { transform:rotate(180deg); }
.cs.is-disabled .cs-trigger { cursor:default; opacity:.6; }
.cs.is-disabled .cs-trigger:hover { border-color:var(--line); }

/* The floating panel is appended to <body>, positioned by JS. */
.cs-panel {
  position:fixed; z-index:1200; max-height:300px; overflow-y:auto;
  padding:6px; border-radius:12px;
  background:var(--card, #fff); border:1px solid var(--line);
  box-shadow:0 18px 44px -12px rgba(15,23,42,.28), 0 4px 12px -6px rgba(15,23,42,.16);
  opacity:0; transform:translateY(-6px) scale(.985); transform-origin:top center;
  transition:opacity .11s var(--ease), transform .11s var(--ease);
  -webkit-overflow-scrolling:touch;
}
.cs-panel.cs-panel-in { opacity:1; transform:none; }
.cs-option {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:9px 11px; border-radius:8px; cursor:pointer;
  font-size:14px; font-weight:500; color:var(--text); line-height:1.3;
}
.cs-option .cs-opt-label { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cs-option .cs-check { flex:0 0 auto; color:var(--accent); opacity:0; }
.cs-option.is-active { background:rgba(37,99,235,.10); color:var(--accent); }
.cs-option.is-selected { font-weight:600; }
.cs-option.is-selected .cs-check { opacity:1; }
.cs-option.is-disabled { color:var(--muted); cursor:default; opacity:.55; }
.cs-option.is-disabled.is-active { background:transparent; color:var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .cs-panel { transition:none; }
  .cs-chev { transition:none; }
}

/* ---- custom date picker (datepicker.js) ----
   The trigger keeps the look of the field it replaces; the calendar popup
   borrows the dropdown panel's surface + entrance so dates and selects feel
   like one family. */
.cd { position:relative; display:block; width:100%; }
.cd-native {
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  border:0; clip:rect(0 0 0 0); overflow:hidden; pointer-events:none;
}
.cd-trigger {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  width:100%; font:inherit; font-size:13px; font-weight:600; text-align:left;
  color:var(--text); cursor:pointer;
  background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:8px 10px;
  transition:border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.cd-trigger:hover { border-color:#cfdcec; }
.cd-trigger:focus-visible,
.cd.is-open .cd-trigger {
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.15);
}
.cd-value { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cd-value.is-placeholder { color:var(--muted); font-weight:500; }
.cd-ico { flex:0 0 auto; color:var(--muted); }

.cd-panel {
  position:fixed; z-index:1200; width:268px; padding:12px;
  border-radius:12px; background:var(--card, #fff); border:1px solid var(--line);
  box-shadow:0 18px 44px -12px rgba(15,23,42,.28), 0 4px 12px -6px rgba(15,23,42,.16);
  opacity:0; transform:translateY(-6px) scale(.985); transform-origin:top center;
  transition:opacity .11s var(--ease), transform .11s var(--ease);
}
.cd-panel.cd-panel-in { opacity:1; transform:none; }
.cd-panel:focus { outline:none; }

.cd-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.cd-title { font-size:14px; font-weight:700; color:var(--brand); }
.cd-nav {
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px; padding:0; border-radius:8px;
  border:1px solid transparent; background:transparent; color:var(--muted); cursor:pointer;
  transition:background .11s var(--ease), color .11s var(--ease);
}
.cd-nav:hover { background:rgba(37,99,235,.10); color:var(--accent); }
.cd-nav:disabled { opacity:.3; cursor:default; background:transparent; color:var(--muted); }

.cd-dow, .cd-days { display:grid; grid-template-columns:repeat(7, 1fr); }
.cd-dow { margin-bottom:4px; }
.cd-dow span {
  text-align:center; font-size:11px; font-weight:700; color:var(--muted);
  padding:4px 0; letter-spacing:.02em;
}
.cd-days { gap:2px; }
.cd-pad { aspect-ratio:1; }
.cd-day {
  aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  font:inherit; font-size:13px; font-weight:600; color:var(--text);
  border:0; border-radius:8px; background:transparent; cursor:pointer;
  transition:background .09s var(--ease), color .09s var(--ease);
}
.cd-day:hover, .cd-day.is-focus { background:rgba(37,99,235,.10); color:var(--accent); }
.cd-day.is-today { box-shadow:inset 0 0 0 1px var(--line); }
.cd-day.is-selected {
  background:var(--accent); color:#fff; font-weight:700; box-shadow:none;
}
.cd-day.is-selected:hover { background:var(--accent); color:#fff; }
.cd-day.is-disabled { color:var(--muted); opacity:.35; cursor:default; }
.cd-day.is-disabled:hover { background:transparent; color:var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .cd-panel { transition:none; }
}

/* The statement filters sit in a tidy row — give each a comfortable width. */
.statement-filters .cs { width:160px; }

.section-heading {
  font-size:16px; font-weight:700; color:var(--brand);
  margin:0 0 14px;
}
.muted-note { color:var(--muted); font-size:14px; padding:18px 0; }

/* ---- processes page (live Google Sheet table) ---- */
.proc-toolbar {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; margin:0 0 16px; flex-wrap:wrap;
}
.proc-toolbar-right { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.proc-search-wrap { flex:1 1 240px; max-width:340px; }
.proc-search {
  width:100%; border:1px solid var(--line); border-radius:10px;
  padding:10px 12px 10px 36px; font:inherit; font-size:14px;
  background:#fff; color:var(--text);
}
.proc-search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.proc-search-icon { position:absolute; left:12px; pointer-events:none; color:var(--muted); }
.proc-updated { font-size:12.5px; color:var(--muted); }
.proc-refresh, .proc-open { display:inline-flex; align-items:center; gap:7px; }

.proc-card {
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:14px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:var(--glass-shadow); overflow:hidden;
}
.proc-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.proc-table { width:100%; border-collapse:collapse; font-size:14px; }
.proc-table th, .proc-table td {
  text-align:left; padding:12px 16px; border-bottom:1px solid var(--line);
  white-space:nowrap; vertical-align:top;
}
.proc-table th {
  position:sticky; top:0; background:#f7fafe; color:var(--brand);
  font-size:12px; text-transform:uppercase; letter-spacing:.4px; font-weight:700;
}
.proc-table tbody tr:last-child td { border-bottom:none; }
.proc-table tbody tr:hover { background:#f8fafc; }
.proc-link { color:var(--accent); text-decoration:none; font-weight:600; }
.proc-link:hover { text-decoration:underline; }
.proc-note { color:var(--muted); font-size:14px; padding:26px 18px; text-align:center; }
.proc-note-err { color:var(--bad); }

.statement-row {
  display:flex; align-items:center; gap:14px; width:100%; text-align:left;
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:13px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:var(--glass-shadow);
  padding:14px 16px; margin-bottom:10px; cursor:pointer;
  transition:border-color .12s ease, box-shadow .12s ease, transform .12s ease;
  font:inherit; color:inherit;
}
.statement-row:hover { border-color:#d3deec; box-shadow:0 12px 26px -14px rgba(15,23,42,.26); transform:translateY(-2px); }
.statement-row.loading { opacity:.6; cursor:wait; }
.statement-icon {
  flex:0 0 auto; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:#eef4fb; color:var(--brand);
}
.statement-body { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; gap:2px; }
.statement-label { font-size:15px; font-weight:600; color:var(--text); }
.statement-date { font-size:12.5px; color:var(--muted); }
.statement-go { flex:0 0 auto; color:var(--muted); transition:color .12s ease, transform .12s ease; }
.statement-row:hover .statement-go { color:var(--accent); transform:translateX(3px); }

/* ===========================================================================
   MANAGER — manage-agent panel (admin.html)
   =========================================================================== */
.mgr-panel { margin-top:32px; }
.mgr-pick { margin:16px 0 18px; }
.mgr-field { display:flex; flex-direction:column; gap:6px; flex:1 1 220px; }
.mgr-field-sm { flex:0 0 130px; }
.mgr-label { font-size:12px; font-weight:600; color:var(--muted); }
.mgr-field select, .mgr-field input[type="text"], .mgr-field input[type="number"],
.mgr-field input[type="email"], .mgr-field input[type="password"] {
  border:1px solid var(--line); border-radius:10px; padding:10px 12px;
  font-size:14px; font:inherit; background:#fff; color:var(--text);
}
/* Replace the native dropdown arrow with a clean, consistently-placed chevron. */
.mgr-field select {
  appearance:none; -webkit-appearance:none;
  padding-right:38px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center;
}
.mgr-field select:disabled { cursor:default; opacity:.65; }
.mgr-field input[type="file"] { font-size:13px; }
.mgr-hint { margin:10px 0 0; font-size:12.5px; color:var(--muted); line-height:1.45; }
.mgr-field select:focus, .mgr-field input:focus {
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.mgr-cards { display:grid; gap:18px; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); }
.mgr-card {
  background:var(--glass-bg); border:1px solid var(--glass-border); border-radius:16px;
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  padding:20px; box-shadow:var(--glass-shadow);
}
.mgr-card h3 { margin:0 0 14px; font-size:15px; font-weight:700; color:var(--brand); }
.mgr-row { display:flex; gap:14px; flex-wrap:wrap; }
.mgr-actions { display:flex; align-items:center; gap:12px; margin-top:16px; }
.mgr-notice { font-size:13px; }
.mgr-notice.ok { color:var(--good); }
.mgr-notice.err { color:var(--bad); }
.mgr-statements { margin-top:18px; }
.mgr-stmt-head {
  font-size:12px; font-weight:600; letter-spacing:.4px; text-transform:uppercase;
  color:var(--muted); margin-bottom:8px;
}
.mgr-empty { color:var(--muted); font-size:13.5px; margin:8px 0; }
.mgr-stmt-row {
  display:flex; align-items:center; gap:12px;
  padding:10px 0; border-bottom:1px solid var(--line);
}
.mgr-stmt-row:last-child { border-bottom:none; }
.mgr-stmt-label { flex:1 1 auto; font-size:14px; font-weight:600; color:var(--text); }
.mgr-stmt-date { font-size:12.5px; color:var(--muted); }
.mgr-stmt-del {
  background:none; border:none; color:var(--bad); font-size:13px; font-weight:600;
  cursor:pointer; padding:4px 6px; border-radius:7px;
}
.mgr-stmt-del:hover { background:var(--bad-bg); }

/* ----- manage users: list, search, badges, danger ----- */
.mgr-users-head {
  margin-bottom:4px;
  padding-right:44px;   /* clear the absolutely-positioned close (X) button */
}
/* subtitle + "New user" share one row so the button sits in line with the text */
.mgr-users-subrow {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap;
}
.mgr-users-subrow .modal-sub { margin:0; }
.mgr-users-head .btn { flex:0 0 auto; }

.mgr-search-wrap { position:relative; margin:14px 0 16px; }
.mgr-search-icon { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.mgr-search {
  width:100%; box-sizing:border-box; padding:11px 14px 11px 38px;
  border:1px solid var(--line); border-radius:11px; background:#fff;
  font:inherit; font-size:14px; color:var(--text);
}
.mgr-search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(37,99,235,.12); }
.mgr-search::-webkit-search-cancel-button { -webkit-appearance:none; }

.mgr-user-list { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.mgr-user-row {
  display:flex; align-items:center; gap:12px; padding:13px 16px;
  border-bottom:1px solid var(--line); background:#fff;
  transition:background .11s ease;
}
.mgr-user-row:last-child { border-bottom:none; }
.mgr-user-row:hover { background:#f7fafe; }
.mgr-user-main { flex:1 1 auto; min-width:0; }
.mgr-user-name { font-size:14.5px; font-weight:650; color:var(--text); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mgr-user-sub { font-size:12.5px; color:var(--muted); margin-top:2px; }
.mgr-user-edit { flex:0 0 auto; padding:7px 14px; font-size:13px; }

.role-badge {
  font-size:11px; font-weight:700; letter-spacing:.02em;
  padding:2px 8px; border-radius:999px;
  background:#eef4fb; color:var(--brand);
}
.role-badge.admin { background:rgba(37,99,235,.12); color:var(--accent); }
.role-badge.you { background:var(--good-bg); color:var(--good); }

.btn-danger { background:var(--bad); color:#fff; border:1px solid var(--bad); }
.btn-danger:hover { background:#b91c1c; border-color:#b91c1c; }
.mgr-danger { border-color:rgba(220,38,38,.30); }
.mgr-danger h3 { color:var(--bad); }

/* ===========================================================================
   SLIM SCROLLBARS — inner scroll areas keep the default chunky browser bar
   otherwise (nav drawer list, training side-nav, select dropdowns, tall
   modal overlays). Thin rounded thumb, no track.
   =========================================================================== */
.nav-list, .tr-sidenav, .cs-panel, .overlay {
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,.22) transparent;
}
.nav-list::-webkit-scrollbar, .tr-sidenav::-webkit-scrollbar,
.cs-panel::-webkit-scrollbar, .overlay::-webkit-scrollbar { width: 8px; }
.nav-list::-webkit-scrollbar-track, .tr-sidenav::-webkit-scrollbar-track,
.cs-panel::-webkit-scrollbar-track, .overlay::-webkit-scrollbar-track { background: transparent; }
.nav-list::-webkit-scrollbar-thumb, .tr-sidenav::-webkit-scrollbar-thumb,
.cs-panel::-webkit-scrollbar-thumb, .overlay::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,.20); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box;
}
.nav-list::-webkit-scrollbar-thumb:hover, .tr-sidenav::-webkit-scrollbar-thumb:hover,
.cs-panel::-webkit-scrollbar-thumb:hover, .overlay::-webkit-scrollbar-thumb:hover {
  background-color: rgba(15,23,42,.36);
}
/* the overlay's backdrop is dark, so its thumb needs to be light to show */
.overlay { scrollbar-color: rgba(148,163,184,.4) transparent; }
.overlay::-webkit-scrollbar-thumb { background: rgba(148,163,184,.38); }
.overlay::-webkit-scrollbar-thumb:hover { background-color: rgba(148,163,184,.55); }

/* ===========================================================================
   LOADING SKELETONS — shared kit
   ---------------------------------------------------------------------------
   Pulsing gray placeholder bars shown while a data area loads (Today widgets,
   Business Analytics, Med Supp tracker). Pages with their own theme override
   --skel-bar in their token block (index.html #home-view, analytics.html
   .wrap); this slate default reads on the light theme's white cards.
   =========================================================================== */
:root { --skel-bar: rgba(100,116,139,.18); }
@keyframes skelPulse { 0%, 100% { opacity:1; } 50% { opacity:.35; } }
.skel {
  display:inline-block; height:12px; border-radius:6px;
  background:var(--skel-bar); animation:skelPulse 1.3s ease-in-out infinite;
}
.skel-pill { border-radius:999px; }
/* dashboard fetch in flight: a pulsing block fills every (empty) chart box */
.ba-loading .an-chart::after {
  content:""; position:absolute; inset:0; border-radius:12px;
  background:var(--skel-bar); animation:skelPulse 1.3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skel, .ba-loading .an-chart::after { animation:none; opacity:.55; }
}
