/* ============================================================
   Premium design system (white-label)
   Light (default, Shopify-clean) + refined dark.
   Single emerald accent, neutral slate base, hairline borders.
   ============================================================ */
:root {
  /* ---- light (default) ---- */
  --bg: #f6f7f9;
  --bg-2: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e4e7ec;
  --border-soft: #eef0f3;
  --text: #14181f;
  --text-dim: #5b636e;
  --text-faint: #99a1ad;

  /* Coca-Cola red, deep and rich (not pink). --brand is the classic Coke red used
     for accents/active; the hero gradient goes brand -> --brand-2 (deep maroon) for
     that premium, dimensional Coke feel. --brand-ink is the pressed/hover deep red. */
  --brand: #d0021b;
  --brand-2: #8e0e1c;
  --brand-ink: #a80217;
  --brand-soft: rgba(208, 2, 27, .09);
  --brand-glow: rgba(208, 2, 27, .26);

  /* Secondary accents are kept muted and used sparingly, so the UI reads as one
     red brand, not a rainbow. Money in = green, owed = red, everything else neutral. */
  --green: #1a9c6e;
  --green-soft: rgba(26, 156, 110, .11);
  --red: #d0021b;
  --red-soft: rgba(208, 2, 27, .10);
  --amber: #b9791a;
  --amber-soft: rgba(185, 121, 26, .12);
  --cyan: #4b5563;
  --cyan-soft: rgba(75, 85, 99, .10);
  --violet: #4b5563;
  --violet-soft: rgba(75, 85, 99, .10);
  --pink: #b0121f;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .14);
  --ring-track: #eaecef;
  --sidebar-w: 256px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-2: #0d0f12;
  --surface: #141619;
  --surface-2: #1a1d21;
  --surface-3: #22262c;
  --border: #262a31;
  --border-soft: #1d2025;
  --text: #eceef1;
  --text-dim: #99a0aa;
  --text-faint: #61676f;

  /* Coca-Cola red, brightened for dark surfaces (text on near-black ~5.9:1).
     --brand-ink stays only a touch deeper so it darkens on hover yet remains
     legible where it tints the KPI numeral gradient. */
  --brand: #ee2a38;
  --brand-2: #9e0e1c;
  --brand-ink: #ff5560;
  --brand-soft: rgba(238, 42, 56, .16);
  --brand-glow: rgba(238, 42, 56, .24);

  --green: #1cc08a;
  --green-soft: rgba(28, 192, 138, .15);
  --red: #ee2a38;
  --red-soft: rgba(238, 42, 56, .15);
  --amber: #b98a3a;
  --amber-soft: rgba(185, 138, 58, .15);
  --cyan: #8a929c;
  --cyan-soft: rgba(138, 146, 156, .14);
  --violet: #8a929c;
  --violet-soft: rgba(138, 146, 156, .14);

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --ring-track: #262a31;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
[data-theme="dark"] body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(800px 460px at 82% -12%, var(--brand-glow), transparent 62%);
  opacity: .5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { letter-spacing: -0.02em; }
.hide { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border); background-clip: padding-box; }

/* ---------- Login ---------- */
.login-screen { height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--bg); }
.login-aside {
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden; color: #fff5f5;
  background:
    radial-gradient(620px 380px at 88% 6%, rgba(255, 96, 108, .22), transparent 62%),
    radial-gradient(720px 460px at 10% 6%, rgba(255, 74, 88, .24), transparent 60%),
    linear-gradient(155deg, #e4002b 0%, #a80020 47%, #59060f 100%);
}
.login-aside .brand.big { position: absolute; top: 48px; left: 60px; margin: 0; z-index: 2; }
.login-aside-glow { position: absolute; right: -120px; bottom: -140px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); pointer-events: none; z-index: 0; }
.login-aside .brand-name, .login-aside .brand-sub { color: #fff5f5; }
.login-aside .brand-sub { color: rgba(255, 236, 236, .62); }
.login-aside .brand-logo { box-shadow: 0 8px 26px rgba(0, 0, 0, .35); }
.login-aside-mid { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; }
.login-eyebrow { display: inline-block; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .30); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }
.login-hero { font-size: 40px; line-height: 1.05; margin: 0 0 13px; font-weight: 760; letter-spacing: -0.035em; }
.login-hero-sub { color: rgba(234, 250, 243, .74); font-size: 14.5px; max-width: 450px; line-height: 1.6; margin: 0; }
.login-feats { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.login-feats li { display: flex; align-items: flex-start; gap: 12px; color: rgba(234, 250, 243, .58); font-weight: 450; font-size: 14px; line-height: 1.45; max-width: 470px; }
.login-feats li b { color: #fff; font-weight: 600; }
.feat-ic { flex: 0 0 auto; margin-top: 1px; width: 31px; height: 31px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); color: #fff; }
.feat-ic svg { width: 16px; height: 16px; }
.login-foot { font-size: 12px; letter-spacing: .04em; color: rgba(234, 250, 243, .45); font-weight: 500; }
.login-right { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 40px 36px; box-shadow: var(--shadow-lg); }
.login-card .brand { padding: 0 0 20px; }
.login-card h2 { margin: 12px 0 4px; font-size: 25px; font-weight: 760; letter-spacing: -0.02em; }
.login-card .lead { color: var(--text-dim); margin: 0 0 22px; font-size: 14.5px; }
.login-card .field label { font-weight: 600; }
.login-card .input { padding: 12px 14px; }
.login-card .btn.primary { padding: 13px; font-size: 15px; font-weight: 650; margin-top: 4px; }
.login-err { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0; font-weight: 600; }

/* ===== Premium login (marketing-grade polish) ===== */
.login-aside::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px 320px at 80% 84%, rgba(255,255,255,.12), transparent 60%); }
.login-aside-glow { background: radial-gradient(circle, rgba(255,255,255,.20), transparent 66%); }
.login-hero { background: linear-gradient(178deg, #ffffff 4%, #ffd6cf 118%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feat-ic { background: linear-gradient(150deg, #ff6670, #e4002b) !important; border-color: transparent !important; color: #fff !important;
  box-shadow: 0 9px 18px -8px rgba(180,0,25,.55), inset 0 1px 0 rgba(255,255,255,.38); }
.login-card { position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #ff6670, #e4002b 55%, #b00020); }
.login-card .btn.primary { background: linear-gradient(150deg, #f5333f, #e4002b); box-shadow: 0 12px 26px -10px rgba(180,0,25,.45); }
.login-hint { color: var(--text-faint); font-size: 12px; margin-top: 18px; text-align: center; line-height: 1.7; }
/* enhanced login */
.login-watermark { position: absolute; right: -90px; bottom: -80px; width: 540px; max-width: 62%; opacity: .10; z-index: 0; pointer-events: none; filter: brightness(0) invert(1); }
.login-feats li .lf-ic { width: 22px; height: 22px; flex: none; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; margin-top: 1px; }
.login-feats li .lf-ic svg { width: 13px; height: 13px; color: #fff; }
.login-card .input { padding: 13px 15px; font-size: 15px; border-radius: 12px; }
.login-card .field label { margin-bottom: 7px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--text-faint); display: grid; place-items: center; cursor: pointer; border-radius: 9px; }
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }
.pw-toggle.on { color: var(--brand); }
.pw-toggle svg { width: 19px; height: 19px; }
/* clean, premium login — remove the funky ribbon / dots / watermark / blob */
.login-aside { background: radial-gradient(700px 440px at 86% -8%, rgba(255,120,132,.16), transparent 60%), linear-gradient(155deg, #d21120 0%, #9e0f1c 52%, #5e0a14 100%); }
.login-aside::after { display: none !important; }
.login-aside::before { display: none !important; }
.login-aside-glow { display: none !important; }
.login-watermark { display: none !important; }
.login-aside .fizz { display: none !important; }
.login-hero { background: transparent; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: #fff; color: #fff; }
.login-hero-sub { color: rgba(255,236,236,.82); }
.login-feats li { color: rgba(255,236,236,.74); }
.login-eyebrow { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.24); }
@media (max-width: 880px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-right { min-height: 100vh; }
}

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns .28s ease; }
.app.hidden { display: none; }

/* Desktop sidebar collapse: full-screen work mode. The toggle in the topbar (or the
   [ key) slides the sidebar away and the content takes the whole width; the choice
   is remembered per device. Mobile keeps its own drawer pattern below 880px. */
.only-desktop { display: grid; }
.sb-toggle { display: none; }   /* base: hidden (mobile). Desktop rule below turns it on. */
@media (min-width: 881px) {
  .sidebar { transition: transform .34s var(--ease, cubic-bezier(.22,.61,.36,1)), opacity .24s ease, box-shadow .3s; width: var(--sidebar-w); }
  .app.sb-collapsed { grid-template-columns: 0 1fr; }
  /* Collapsed = full-screen work mode. The sidebar STAYS a grid child (so the content
     keeps the full 1fr and never reflows), just slid off-screen with a high z-index so
     the hover-peek can float it back OVER the content. Only its transform animates. */
  .app.sb-collapsed .sidebar {
    transform: translateX(-100%); opacity: 0; pointer-events: none; z-index: 70;
  }
  /* A thin live strip on the far-left edge (only when collapsed) with a hairline
     brand hint, so you know where to flick the mouse to bring the nav back. */
  .sb-edge, .sb-peek-scrim { display: none; }
  .app.sb-collapsed .sb-edge { display: block; position: fixed; left: 0; top: 0; width: 18px; height: 100vh; z-index: 60; }
  .app.sb-collapsed .sb-edge::after {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 52px; border-radius: 0 4px 4px 0; background: var(--brand);
    opacity: .6; transition: opacity .22s, height .22s, box-shadow .22s;
  }
  .app.sb-collapsed .sb-edge:hover::after { opacity: 1; height: 108px; box-shadow: 0 0 16px var(--brand-glow); }
  /* Peek: the sidebar floats in and the rest dims a touch for focus. */
  .app.sb-collapsed .sb-peek-scrim {
    display: block; position: fixed; inset: 0; z-index: 65; pointer-events: none;
    background: rgba(6, 10, 14, .32); opacity: 0; transition: opacity .3s;
  }
  .app.sb-collapsed.sb-peek .sb-peek-scrim { opacity: 1; }
  .app.sb-collapsed.sb-peek .sidebar {
    transform: translateX(0); opacity: 1; pointer-events: auto;
    box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .55), 0 0 0 1px var(--border);
  }
  /* Collapse / pin chevron: lives inside the sidebar (topbar hamburger removed).
     Fades in when you hover the sidebar, or whenever it is peeked open. */
  .sidebar { position: relative; }
  .sb-toggle {
    display: grid; place-items: center; position: absolute; top: 20px; right: 12px;
    width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text-faint); cursor: pointer;
    opacity: 0; transform: scale(.9); z-index: 3;
    transition: opacity .18s, transform .18s, color .18s, border-color .18s, background .18s;
  }
  .sidebar:hover .sb-toggle, .app.sb-collapsed.sb-peek .sb-toggle { opacity: 1; transform: none; }
  .sb-toggle:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
}
/* !important so this beats element base display (e.g. .icon-btn { display: grid }
   is declared later in the source, so without it the desktop-only sidebar toggle
   leaked onto mobile as a second hamburger next to the mobile menu button). */
@media (max-width: 880px) { .only-desktop { display: none !important; } }

.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--bg-2);
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; padding: 22px 16px; gap: 3px; z-index: 60;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand.big { padding: 0; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: #fff; flex: none; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.brand-logo img, .brand-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-aside .brand.big .brand-logo { width: 84px; height: 84px; border-radius: 20px; }
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; color: var(--text-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .18em; }

/* The module list grew past one screen: the NAV scrolls on its own (brand stays
   put on top, the user box stays pinned at the bottom). Smooth wheel scrolling,
   a whisper-thin scrollbar that only shows itself on hover, and overscroll
   contained so hitting the end never scrolls the page behind it. The negative
   margin + matching padding keep the hover accent bars (drawn 16px into the
   sidebar gutter) inside the scroll area instead of getting clipped. */
#nav {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  margin: 0 -16px; padding: 0 16px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
#nav:hover { scrollbar-color: color-mix(in srgb, var(--text-faint) 55%, transparent) transparent; }
#nav::-webkit-scrollbar { width: 5px; }
#nav::-webkit-scrollbar-track { background: transparent; }
#nav::-webkit-scrollbar-thumb { background: transparent; border-radius: 8px; }
#nav:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-faint) 45%, transparent); }
#nav::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--brand) 55%, transparent); }

.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-faint); padding: 16px 12px 8px; font-weight: 650; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin: 1px 0;
  border-radius: 10px; color: var(--text-dim); font-weight: 550; font-size: 13.5px;
  transition: background .15s, color .15s; position: relative; cursor: pointer;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .78; transition: opacity .18s, transform .2s var(--ease, ease), color .18s; }
/* the accent bar lives on EVERY item: hidden by default, previews on hover, full when
   active. One element, three states, animated - so hover is a taste of being active. */
.nav-item::before {
  content: ""; position: absolute; left: -16px; top: 50%;
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--brand);
  transform: translateY(-50%) scaleY(0); transform-origin: center;
  transition: transform .22s var(--ease, ease), box-shadow .2s, background .2s;
}
/* premium hover: the row eases inward + brand-tints, the icon brightens, tints emerald
   and nudges, and the accent bar grows in from the edge. */
.nav-item:hover {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface-3));
  color: var(--text); transform: translateX(4px);
}
.nav-item:hover svg { opacity: 1; color: var(--brand); transform: translateX(1px) scale(1.1); }
.nav-item:hover::before { transform: translateY(-50%) scaleY(.62); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; transform: none; }
.nav-item.active svg { opacity: 1; color: var(--brand); }
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-item .pill { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: grid; place-items: center; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.userbox { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 11px; cursor: pointer; transition: background .15s; }
.userbox:hover { background: var(--surface-3); }
.userbox .meta { overflow: hidden; flex: 1; }
.userbox .meta .n { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .meta .r { font-size: 11.5px; color: var(--text-faint); }
.userbox svg { color: var(--text-faint); }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  padding: 18px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-soft);
}
.page-title h1 { margin: 0; font-size: 22px; font-weight: 700; }
.page-title p { margin: 3px 0 0; color: var(--text-faint); font-size: 13px; font-weight: 450; }
.spacer { flex: 1; }
.range-pills { display: flex; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.range-pills button { border: 0; background: transparent; color: var(--text-dim); font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 8px; transition: .15s; }
.range-pills button:hover { color: var(--text); }
.range-pills button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); display: grid; place-items: center; transition: .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--brand); background: var(--surface-2); }
.only-mobile { display: none; }
.mnav { display: none; }
.content { padding: 26px 32px 64px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 13.5px; transition: .15s;
}
.btn:hover { border-color: var(--text-faint); background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border: 1px solid var(--brand); color: #fff; box-shadow: 0 1px 2px var(--brand-glow); }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.btn-upwork { margin-left: auto; background: #2563eb; border: 1px solid #2563eb; color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn.btn-upwork:hover { background: #1d4fd0; border-color: #1d4fd0; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: var(--red); border-color: var(--border); }
.btn.danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn.ok { background: var(--green); border: 0; color: #fff; }
.btn.lg { padding: 12px 22px; font-size: 14.5px; border-radius: 12px; }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.pad-lg { padding: 24px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head .sub { color: var(--text-faint); font-size: 12px; font-weight: 450; }
.card-head .spacer { flex: 1; }
.section-gap { margin-top: 18px; }

/* ---------- Stat cards ---------- */
.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; }
.stat .ic svg { width: 19px; height: 19px; }
.stat .ic.brand { background: var(--brand-soft); color: var(--brand); }
.stat .ic.green { background: var(--green-soft); color: var(--green); }
.stat .ic.red { background: var(--red-soft); color: var(--red); }
.stat .ic.amber { background: var(--amber-soft); color: var(--amber); }
.stat .ic.cyan { background: var(--cyan-soft); color: var(--cyan); }
.stat .label { color: var(--text-faint); font-size: 12.5px; font-weight: 550; }
.stat .value { font-size: 30px; font-weight: 760; letter-spacing: -0.03em; margin-top: 3px; line-height: 1.1; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--text-faint); }
.stat .foot { margin-top: 9px; font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.delta svg { width: 11px; height: 11px; }
.delta.up { color: var(--green); background: var(--green-soft); }
.delta.down { color: var(--red); background: var(--red-soft); }
.delta.flat { color: var(--text-faint); background: var(--surface-3); }

/* ---------- Avatar ---------- */
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 650; font-size: 12.5px; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 10.5px; border-radius: 8px; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; border-radius: 13px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; border-radius: 18px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .pn { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .pr { font-size: 11.5px; color: var(--text-faint); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px 3px 8px; border-radius: 7px; white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.present { color: var(--green); background: var(--green-soft); }
.badge.late { color: var(--amber); background: var(--amber-soft); }
.badge.half_day { color: var(--cyan); background: var(--cyan-soft); }
.badge.remote { color: var(--violet); background: var(--violet-soft); }
.badge.absent { color: var(--red); background: var(--red-soft); }
.badge.on_leave { color: var(--brand); background: var(--brand-soft); }
.badge.holiday { color: var(--text-dim); background: var(--surface-3); }
.badge.pending { color: var(--amber); background: var(--amber-soft); }
.badge.approved { color: var(--green); background: var(--green-soft); }
.badge.rejected { color: var(--red); background: var(--red-soft); }
.badge.cancelled { color: var(--text-faint); background: var(--surface-3); }
.role-chip { font-size: 10.5px; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-dim); text-transform: capitalize; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; color: var(--text-faint); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mini-btn { min-width: 30px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; font: 600 12.5px var(--font); transition: .12s; }
.mini-btn:has(> svg:only-child) { width: 30px; padding: 0; }  /* icon-only stays square */
.mini-btn:hover { color: var(--text); border-color: var(--brand); background: var(--surface-2); }
.mini-btn.danger:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.mini-btn svg { width: 15px; height: 15px; }
.mini-select { height: 30px; padding: 0 26px 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .12s; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; }
.mini-select:hover { border-color: var(--brand); }

/* ---------- Progress / meters ---------- */
.meter { height: 7px; border-radius: 6px; background: var(--ring-track); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 6px; background: var(--brand); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.meter.green > span { background: var(--green); }
.meter.amber > span { background: var(--amber); }
.meter.red > span { background: var(--red); }
.ring-txt { fill: var(--text); font-weight: 760; letter-spacing: -0.02em; }

/* ---------- Check-in hero ---------- */
.clock-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.clock-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.clock-card::before { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, var(--brand-glow), transparent 70%); opacity: .7; }
.clock-now { font-size: 58px; font-weight: 780; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-now .sec { font-size: 26px; color: var(--text-faint); font-weight: 650; }
.clock-date { color: var(--text-dim); font-size: 14px; font-weight: 550; margin-top: 6px; }
.clock-status { margin: 20px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.clock-actions { display: flex; gap: 12px; margin-top: 6px; }
.clock-actions .btn { flex: 1; }
.punch-times { display: flex; gap: 28px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.punch-times .pt-label { color: var(--text-faint); font-size: 11.5px; font-weight: 550; }
.punch-times .pt-val { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- Empty / loading ---------- */
.empty { text-align: center; color: var(--text-faint); padding: 48px 20px; }
.empty .ic { width: 54px; height: 54px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--border-soft); display: grid; place-items: center; margin: 0 auto 14px; color: var(--text-dim); }
.empty .ic svg { width: 25px; height: 25px; }
.empty h4 { margin: 0 0 4px; color: var(--text-dim); font-size: 15px; font-weight: 650; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin:empty { display: inline-block; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; }

/* Disabled buttons must read as disabled (was invisible before). */
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover { background: inherit; }

/* Live "working now" indicator. */
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--green); background: rgba(18,165,116,.12); padding: 3px 9px; border-radius: 999px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livepulse 1.7s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(18,165,116,.5); } 70% { box-shadow: 0 0 0 7px rgba(18,165,116,0); } 100% { box-shadow: 0 0 0 0 rgba(18,165,116,0); } }

/* Check-in "already done" pills. */
.clock-actions .punch-done { flex: 1; }
.punch-done { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 14px; padding: 13px 18px; border-radius: 12px; }
.punch-done.ok { color: var(--green); background: rgba(18,165,116,.10); border: 1px solid rgba(18,165,116,.26); }
.clock-done-note { margin-top: 14px; font-size: 13px; color: var(--text-dim); font-weight: 550; display: flex; align-items: center; gap: 7px; }

/* "Active now" panel on the Attendly overview. */
.active-card { overflow: hidden; }
/* Live presence meter under the header: working / done / not-in proportions. */
.presence-meter { display: flex; gap: 3px; height: 6px; margin: 4px 0 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.presence-meter .pm-seg { min-width: 0; border-radius: 999px; transition: flex .6s ease; }
.presence-meter .pm-seg.working { position: relative; background: var(--green); overflow: hidden; }
.presence-meter .pm-seg.working::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-120%); animation: sheen 2.6s ease-in-out infinite; }
.presence-meter .pm-seg.done { background: var(--brand); opacity: .8; }
.presence-meter .pm-seg.notin { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }

.active-row { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-bottom: 1px solid var(--border-soft); border-radius: 10px; transition: background .15s ease; opacity: 0; animation: activeRowIn .45s ease both; }
.active-row:last-child { border-bottom: none; }
.active-row:hover { background: var(--surface-2); }
@keyframes activeRowIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
/* Live presence ring on each active person's avatar (they are working right now). */
.active-row .person .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(18,165,116,.55); animation: presenceRing 2.4s ease-in-out infinite; }
.active-row.is-remote .person .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(99,102,241,.5); animation: none; }
@keyframes presenceRing { 0%, 100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(18,165,116,.5); } 50% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 6px rgba(18,165,116,.12); } }

.active-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.active-since { font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; min-width: 86px; text-align: right; }
.active-since .sec { font-weight: 600; font-size: .82em; color: var(--text-dim); margin-left: 1px; }
/* Tiny "working" equalizer to convey live activity. */
.live-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.live-eq i { width: 2.5px; border-radius: 2px; background: var(--green); height: 40%; animation: eqbar 1s ease-in-out infinite; }
.live-eq i:nth-child(2) { animation-delay: .2s; }
.live-eq i:nth-child(3) { animation-delay: .4s; }
.live-eq i:nth-child(4) { animation-delay: .15s; }
.active-row.is-remote .live-eq i { background: #8b8df5; }
@keyframes eqbar { 0%, 100% { height: 30%; } 50% { height: 100%; } }

.notin-wrap { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--border); }
.notin-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); font-weight: 650; margin-bottom: 9px; }
.notin-list { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.notin-list .notin-chip { opacity: .6; transition: opacity .15s ease, transform .15s ease; }
.notin-list .notin-chip:hover { opacity: 1; transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  .active-row, .active-row .person .avatar, .live-eq i, .presence-meter .pm-seg.working::after { animation: none !important; }
  .active-row { opacity: 1; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; transition: .15s; }
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input:hover:not(:focus) { border-color: var(--text-faint); }
textarea.input { resize: vertical; min-height: 72px; }
select.input { -webkit-appearance: none; appearance: none; padding-right: 34px;
  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='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; cursor: pointer; }
.field-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.4; }
.input-adorn { position: relative; }
.input-adorn .adorn { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 14px; font-weight: 600; pointer-events: none; }
.input-adorn .input { padding-left: 25px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 9px; cursor: pointer; border: 2px solid transparent; transition: .12s; }
.swatch.active { border-color: var(--text); transform: scale(1.08); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .input, .toolbar select.input { width: auto; min-width: 150px; }
.toolbar .spacer { flex: 1; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); color: var(--text); padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 550; font-size: 13.5px; min-width: 220px; max-width: 340px; animation: toastin .3s cubic-bezier(.2,.8,.2,1); }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }
@keyframes toastin { from { opacity: 0; transform: translateX(20px); } }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(16, 24, 40, .42); backdrop-filter: blur(5px); display: grid; place-items: center; z-index: 900; padding: 20px; animation: fade .2s; }
[data-theme="dark"] .modal-back { background: rgba(3, 5, 8, .62); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 96vw); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop .24s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal-head { display: flex; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 650; flex: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border-soft); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- Misc ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend .li { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); font-weight: 500; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--text-faint); }
.kv .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.scrim { position: fixed; inset: 0; background: rgba(16, 24, 40, .4); z-index: 55; opacity: 0; pointer-events: none; transition: .2s; }
.scrim.show { opacity: 1; pointer-events: auto; }
.tag-off { color: var(--text-faint); }
.muted { color: var(--text-faint); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- Monthly matrix ---------- */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
table.matrix th, table.matrix td { text-align: center; min-width: 26px; height: 30px; padding: 0; }
table.matrix th { color: var(--text-faint); font-weight: 600; font-size: 11px; }
table.matrix th.name, table.matrix td.name { text-align: left; padding: 6px 12px; min-width: 180px; position: sticky; left: 0; background: var(--surface); z-index: 2; }
table.matrix td .cell { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 700; font-size: 11px; border-radius: 6px; }
.cell.P { color: var(--green); background: var(--green-soft); }
.cell.L { color: var(--amber); background: var(--amber-soft); }
.cell.H { color: var(--cyan); background: var(--cyan-soft); }
.cell.R { color: var(--violet); background: var(--violet-soft); }
.cell.A { color: var(--red); background: var(--red-soft); }
.cell.V { color: var(--brand); background: var(--brand-soft); }
.cell.O { color: var(--text-faint); background: var(--surface-3); }
table.matrix th.off { color: var(--text-faint); }
table.matrix td.off .cell, table.matrix td.off { background: var(--surface-2); border-radius: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: 1fr; }
  .clock-hero { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .only-mobile { display: grid; }
  .content { padding: 18px 16px 60px; }
  .topbar { padding: 14px 16px; }
  .range-pills { display: none; }
  .cols-4, .cols-2 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .job-grid { grid-template-columns: 1fr !important; }
  .jmeta { grid-template-columns: 1fr !important; }
}

/* ---------- Module sub-nav (tabs) ---------- */
.subnav { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.subnav button { border: 0; background: transparent; color: var(--text-dim); font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 9px; display: inline-flex; align-items: center; gap: 7px; transition: .15s; }
.subnav button svg { width: 15px; height: 15px; }
.subnav button:hover { color: var(--text); }
.subnav button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.sub-badge { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.sub-badge[hidden] { display: none; }

/* ---------- Module cards (home) ---------- */
.module-card { display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.module-card.clickable { cursor: pointer; }
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.module-card .m-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.module-card .m-ic svg { width: 23px; height: 23px; }
.module-card h3 { margin: 0; font-size: 16px; }
.module-card .m-desc { color: var(--text-dim); font-size: 13px; line-height: 1.5; flex: 1; }
.module-card .m-foot { display: flex; align-items: center; gap: 8px; }
.tag { font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .4px; }
.tag.live { color: var(--green); background: var(--green-soft); }
.tag.soon { color: var(--text-faint); background: var(--surface-3); }

/* ---------- Job cards (Upwork Radar) ---------- */
/* Single-column feed: one job per row, newest on top, so the latest is unmistakable. */
.job-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* "Which jobs do you want to see?" first-visit feed chooser */
.rf-chooser { display: flex; justify-content: center; padding: 40px 16px; }
.rf-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-md); padding: 28px 26px 26px; text-align: center; animation: pop .2s; }
.rf-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.rf-card h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: -.01em; }
.rf-card p { font-size: 13px; color: var(--text-dim); margin: 0 0 20px; line-height: 1.5; }
.rf-opts { display: flex; flex-direction: column; gap: 10px; }
.rf-opt { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 14.5px; font-weight: 650; cursor: pointer; transition: .15s; }
.rf-opt:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.rf-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.rf-alldot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); color: var(--text-dim); }
.rf-name { flex: 1; }
.rf-count { font-size: 11.5px; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 2px 9px; border-radius: 999px; }
.rf-all { border-style: dashed; }
.job-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-top: 3px solid var(--jc, var(--brand)); display: flex; flex-direction: column; gap: 12px; transition: box-shadow .18s; }
.job-card:hover { box-shadow: var(--shadow-md); }
.job-card.hidden-job { opacity: .55; }
.job-top { display: flex; align-items: flex-start; gap: 10px; }
.job-title { font-weight: 700; font-size: 16.5px; line-height: 1.4; letter-spacing: -.005em; color: var(--text); flex: 1; }
.job-title a { color: inherit; }
.job-title a:hover { color: var(--brand); }
.job-when { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-faint); font-weight: 550; margin-top: 6px; }
.job-when svg { flex: none; }
.profile-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; padding: 4px 11px; border-radius: 20px; background: var(--surface-3); color: var(--text-dim); letter-spacing: .01em; }
.profile-chip .pdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.score-badge { flex: none; width: 54px; height: 54px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; line-height: 1; text-align: center; }
.score-badge small { display: block; font-size: 8px; font-weight: 700; opacity: .85; letter-spacing: .5px; }
.score-strong { background: linear-gradient(150deg, #f5333f, #e4002b); }
.score-good { background: linear-gradient(150deg, #f0b429, #d98a0b); }
.score-fair { background: linear-gradient(150deg, #f08a3c, #e5662b); }
.jmeta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.jmeta .col { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; }
.jmeta .col .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin-bottom: 8px; }
.jmeta .col .line { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; margin-top: 6px; line-height: 1.35; }
.jmeta .col .line:first-of-type { margin-top: 0; }
.jmeta .col .line svg { width: 13px; height: 13px; flex: none; color: var(--text-faint); }
.jmeta .col .big { font-size: 16px; font-weight: 750; color: var(--text); }
.job-ai { background: var(--brand-soft); color: var(--brand-ink); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; font-weight: 550; display: flex; gap: 7px; }
[data-theme="dark"] .job-ai { color: var(--brand-2); }
.job-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.job-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }

/* ---------- Run banner + toggle ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 550; border: 1px solid var(--border); }
.banner svg { flex: none; }
.banner.mock { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.banner.live { background: var(--green-soft); color: var(--green); border-color: transparent; }
.banner.info { background: var(--cyan-soft); color: var(--cyan); border-color: transparent; }
.toggle { position: relative; width: 44px; height: 25px; border-radius: 20px; background: var(--surface-3); border: 1px solid var(--border); cursor: pointer; transition: .2s; flex: none; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: .2s; }
.toggle.on { background: var(--brand); border-color: var(--brand); }
.toggle.on::after { transform: translateX(19px); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .tt { flex: 1; }
.toggle-row .tt .t1 { font-weight: 650; font-size: 13.5px; }
.toggle-row .tt .t2 { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.notif-prefs .np-head { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }
.notif-prefs .np-foot { margin-top: 16px; font-size: 12px; color: var(--text-faint); }
.np-device { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.np-device:last-child { border-bottom: 0; }
.npd-name { font-weight: 650; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.npd-cur { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: var(--brand-glow); padding: 2px 7px; border-radius: 20px; }
.npd-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.npd-x { background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 5px; border-radius: 8px; display: inline-flex; transition: .15s; }
.npd-x:hover { color: var(--red); background: var(--red-soft); }
.np-none { font-size: 12.5px; color: var(--text-faint); line-height: 1.5; padding: 4px 0; }
.np-sub2 { font-size: 12px; color: var(--text-faint); line-height: 1.5; margin-bottom: 12px; }

/* F1: device-count pill in the admin Team table */
.dev-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 12px;
  font-weight: 650; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.dev-pill:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.dev-pill.full { border-color: var(--amber); color: var(--amber); }

/* ---------- Native-style launch screen ---------- */
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(125% 95% at 50% 28%, #f5333f 0%, #c30024 45%, #6a0512 100%);
  transition: opacity .5s ease, transform .5s ease; }
.splash.gone { opacity: 0; transform: scale(1.05); pointer-events: none; }   /* zoom-fade into the app */
.splash::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;   /* vignette */
  background: radial-gradient(120% 120% at 50% 34%, transparent 42%, rgba(0,0,0,.40) 100%); }
.splash-glow { position: absolute; z-index: 0; width: 72vmax; height: 72vmax; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%); filter: blur(10px);
  animation: splashGlow 7s ease-in-out infinite; }
.splash-glow-2 { width: 56vmax; height: 56vmax;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 62%);
  animation: splashGlow2 9s ease-in-out infinite; }
.splash-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center;
  animation: splashRise .6s cubic-bezier(.2,.8,.2,1) both; }
.splash-logo { position: relative; width: 90px; height: 90px; border-radius: 25px;
  background: linear-gradient(150deg, rgba(255,255,255,.22), rgba(255,255,255,.06)); display: grid; place-items: center;
  box-shadow: 0 22px 60px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.10);
  animation: splashPop .6s cubic-bezier(.2,.8,.2,1) both, splashBreathe 3.4s ease-in-out .6s infinite; }
.splash-logo::before { content: ""; position: absolute; inset: -18px; border-radius: 40px; z-index: -1;
  background: radial-gradient(circle, rgba(255,255,255,.26), transparent 70%);
  animation: splashRing 2.6s ease-in-out infinite; }
.splash-logo img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 2px 9px rgba(0,0,0,.28)); }
.splash-title { margin-top: 20px; color: #fff; font-weight: 800; font-size: 29px; letter-spacing: -.03em;
  text-shadow: 0 2px 26px rgba(255,255,255,.22); }
.splash-sub { margin-top: 11px; color: rgba(255,255,255,.5); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .34em; padding-left: .34em; }
.splash-bar { margin-top: 26px; width: 130px; height: 3px; border-radius: 4px; background: rgba(255,255,255,.16); overflow: hidden; }
.splash-bar span { display: block; height: 100%; width: 42%; border-radius: 4px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); animation: splashSlide 1.15s ease-in-out infinite; }
@keyframes splashPop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splashBreathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes splashRing { 0%, 100% { opacity: .4; transform: scale(.95); } 50% { opacity: .85; transform: scale(1.1); } }
@keyframes splashGlow { 0%, 100% { transform: translate(-14%, -12%) scale(1); opacity: .7; } 50% { transform: translate(8%, 6%) scale(1.18); opacity: 1; } }
@keyframes splashGlow2 { 0%, 100% { transform: translate(16%, 14%) scale(1.05); opacity: .5; } 50% { transform: translate(-10%, -8%) scale(1.2); opacity: .9; } }
@keyframes splashSlide { 0% { transform: translateX(-170%); } 100% { transform: translateX(420%); } }
@media (prefers-reduced-motion: reduce) {
  .splash-glow, .splash-logo, .splash-logo::before, .splash-bar span, .splash-inner { animation: none; }
}
#app.app-in { animation: appIn .3s ease; }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Command bar (Cmd/Ctrl + K) ---------- */
.cmdk-trigger { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 11px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-faint); border-radius: 10px;
  cursor: pointer; font-size: 13px; transition: .15s; }
.cmdk-trigger:hover { color: var(--text); border-color: var(--text-faint); background: var(--surface-2); }
.cmdk-trigger svg { width: 15px; height: 15px; }
.cmdk-hint { display: inline-flex; gap: 2px; }
.cmdk-hint kbd, .cmdk-foot kbd { font: inherit; font-size: 10.5px; line-height: 1; padding: 3px 5px; border-radius: 5px;
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text-dim); min-width: 16px; text-align: center; }
@media (max-width: 720px) { .cmdk-hint { display: none; } .cmdk-trigger { padding: 0; width: 38px; justify-content: center; } }

.cmdk { position: fixed; inset: 0; z-index: 4000; background: rgba(10, 14, 18, .55); backdrop-filter: blur(4px);
  display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: cmdkFade .14s ease; }
.cmdk-box { width: min(620px, 92vw); max-height: 66vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: cmdkPop .18s cubic-bezier(.2, .8, .2, 1); }
.cmdk-input-row { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--border-soft); }
.cmdk-input-row svg { color: var(--text-faint); flex: none; }
.cmdk-input-row input { flex: 1; border: 0; background: none; outline: none; color: var(--text); font-size: 16px; font-weight: 500; }
.cmdk-input-row input::placeholder { color: var(--text-faint); }
.cmdk-list { overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); padding: 10px 10px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 11px; border-radius: 10px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 550; }
.cmdk-item svg { width: 16px; height: 16px; color: var(--text-faint); flex: none; }
.cmdk-item.sel { background: var(--brand-soft); color: var(--brand); }
.cmdk-item.sel svg { color: var(--brand); }
.cmdk-empty { padding: 26px; text-align: center; color: var(--text-faint); font-size: 13.5px; }
.cmdk-foot { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border-soft);
  font-size: 11.5px; color: var(--text-faint); }
.cmdk-foot .cmdk-foot-end { margin-left: auto; font-weight: 600; }
.cmdk-item .cmdk-text { display: flex; flex-direction: column; min-width: 0; }
.cmdk-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-sub { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item.sel .cmdk-sub { color: var(--brand); opacity: .85; }
.cmdk-item > .av, .cmdk-item > .avatar { flex: none; }
.cmdk-spin { width: 15px; height: 15px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: cmdkspin .6s linear infinite; flex: none; }
@keyframes cmdkspin { to { transform: rotate(360deg); } }
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdkPop { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Per-member module access (member form) ---------- */
.uf-modules { margin-top: 16px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.uf-modules-head { font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.uf-modules-head span { font-weight: 400; color: var(--text-faint); font-size: 12px; }
.uf-modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.uf-mod { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 550; cursor: pointer; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--border-soft); }
.uf-mod:hover { background: var(--surface-2); }
.uf-mod input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; flex: none; }
.uf-mod-bulk { display: flex; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) { .uf-modules-grid { grid-template-columns: 1fr; } }
.new-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
  color: var(--brand-ink, #0a5740); background: var(--brand-glow); border: 1px solid var(--brand); }
.new-banner .btn { margin-left: auto; }
.cred-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 0; }
.cred-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cred-dot.set { background: var(--green); } .cred-dot.unset { background: var(--text-faint); }

/* ---------- Ultron (AI platform) ---------- */
.ultron-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(228,0,43,.14), rgba(109,94,240,.10)); border: 1px solid var(--border); }
[data-theme="dark"] .ultron-head { background: linear-gradient(135deg, rgba(255,59,71,.16), rgba(139,125,245,.12)); }
.ultron-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 6px 18px var(--brand-glow); }
.ultron-head h2 { margin: 0; font-size: 18px; } .ultron-head .sub { color: var(--text-dim); font-size: 12.5px; }
.model-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--surface-3); color: var(--text-dim); text-transform: uppercase; letter-spacing: .4px; }
.model-badge.flash { color: var(--cyan); background: var(--cyan-soft); }
.model-badge.pro { color: var(--violet); background: var(--violet-soft); }
.studio { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .studio { grid-template-columns: 1fr; } }
.studio textarea.job { min-height: 230px; font-size: 13.5px; line-height: 1.55; }
.studio .actions { display: flex; gap: 10px; margin-top: 12px; }
.studio .actions .btn { flex: 1; }
.ai-output { min-height: 280px; }

/* ---- Grok-style studio ---- */
.studio.grok { position: relative; }
.studio.grok::before { content: ''; position: absolute; left: 0; right: 0; top: -50px; height: 280px; pointer-events: none; z-index: 0;
  background: radial-gradient(45% 70% at 18% 0%, rgba(255,59,71,.12), transparent 70%), radial-gradient(45% 70% at 88% 8%, rgba(139,125,245,.11), transparent 70%); filter: blur(8px); }
[data-theme="light"] .studio.grok::before { opacity: .55; }
.studio.grok > * { position: relative; z-index: 1; }

/* Focused result screen: after a cover letter is written, hand the letter + scope/timeline
   the full width so nothing gets lost in the narrow side panel. "Editor" restores the composer. */
.studio.result-mode { grid-template-columns: 1fr; }
.studio.result-mode .composer { display: none; }
.studio.result-mode .ai-output.grok-out { max-width: 920px; margin: 0 auto; width: 100%; }
.studio.result-mode #u-back { display: inline-flex; }

.composer { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-md); }
.composer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 13px; }
.composer-top .cmp-field label { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.composer-top .cmp-field label span { color: var(--text-faint); font-weight: 500; }
.composer-box { position: relative; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-2); overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.composer-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 14px 40px -16px var(--brand-glow); }
.composer-box textarea { width: 100%; border: none; background: transparent; color: var(--text); resize: none; min-height: 230px; padding: 16px 16px 8px; font-size: 14px; line-height: 1.62; font-family: inherit; outline: none; display: block; }
.composer-box textarea::placeholder { color: var(--text-faint); }
.composer-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; row-gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border-soft); background: var(--surface); }
.composer-bar .cmp-hint { font-size: 11.5px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; font-weight: 550; white-space: nowrap; }
.composer-bar .cmp-hint svg { color: var(--brand); }
/* Keep the length segment from being squeezed (its overflow:hidden was clipping the
   "Long" button); group the actions so they wrap to their own line together. The buttons
   keep their labels on one line (nowrap) and stack cleanly when the column is too narrow
   for both, instead of reflowing to two lines at unequal heights. */
.composer-bar .cmp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.composer-bar .cmp-actions .btn { white-space: nowrap; flex: 1 1 auto; }
.cmp-send { background: linear-gradient(135deg, var(--brand-2), var(--brand)); border: none; box-shadow: 0 6px 18px -6px var(--brand-glow); }
.cmp-send:hover { filter: brightness(1.06); }
@media (max-width: 560px) {
  .composer-top { grid-template-columns: 1fr; }
  .composer-bar .cmp-hint { width: 100%; }
  .composer-bar .cmp-actions { width: 100%; margin-left: 0; }
}

.grok-out { min-height: 430px; border-radius: 18px; padding: 22px; background:
  radial-gradient(120% 70% at 50% -10%, rgba(255,59,71,.05), transparent 60%), var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.grok-ready { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 380px; gap: 6px; }
.grok-orb { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; color: #fff; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 0 0 8px var(--brand-soft), 0 18px 48px -10px var(--brand-glow); animation: orbpulse 3.2s ease-in-out infinite; }
@keyframes orbpulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 8px var(--brand-soft), 0 18px 48px -10px var(--brand-glow); }
  50% { transform: translateY(-5px); box-shadow: 0 0 0 13px var(--brand-soft), 0 26px 60px -8px var(--brand-glow); }
}
.grok-ready h3 { font-size: 19px; margin: 4px 0 0; }
.grok-ready p { color: var(--text-dim); font-size: 13.5px; max-width: 330px; margin: 0; line-height: 1.6; }
.think { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 50px 20px; color: var(--text-dim); }
.think .dots { display: flex; gap: 6px; }
.think .dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); animation: bounce 1.2s infinite; }
.think .dots span:nth-child(2) { animation-delay: .15s; } .think .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-7px); opacity: 1; } }
.cover-text { white-space: pre-wrap; font-size: 14px; line-height: 1.7; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 18px; max-height: 460px; overflow: auto; }
.score-ring-wrap { display: flex; align-items: center; gap: 18px; }
.fit-tag { font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: capitalize; }
.fit-strong { color: var(--green); background: var(--green-soft); } .fit-good { color: var(--brand); background: var(--brand-soft); }
.fit-partial { color: var(--amber); background: var(--amber-soft); } .fit-weak { color: var(--red); background: var(--red-soft); }
.pills-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.pills-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-dim); }
.pills-list li svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.uprofile-card { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.uprofile-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Kanban (leads) ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kanban { grid-template-columns: 1fr; } }
.kan-col { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px; }
.kan-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); display: flex; align-items: center; gap: 7px; padding: 2px 4px 10px; }
.kan-count { background: var(--surface-3); color: var(--text-dim); border-radius: 20px; font-size: 11px; padding: 1px 7px; }
.kan-body { min-height: 60px; display: flex; flex-direction: column; gap: 8px; border-radius: 8px; transition: background .15s; padding: 2px; }
.kan-body.drop-on { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.kan-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px; box-shadow: var(--shadow); cursor: grab; }
.kan-card:active { cursor: grabbing; }
.kan-card.dragging { opacity: .5; }
.spark { display: inline-flex; align-items: center; }


/* ============================================================
   KPI module (ported from the original KPI Tracker, same theme)
   ============================================================ */

/* ===== KPI module: base helpers Nexus lacks ===== */
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .nm { font-weight: 600; }
.cell-user .tt { font-size: 11px; color: var(--text-faint); }
.badge.new { color: var(--text-dim); background: var(--surface-3); }
.badge.lead { color: var(--cyan); background: var(--cyan-soft); }
.badge.responded { color: var(--cyan); background: var(--cyan-soft); }
.badge.interview { color: var(--brand); background: var(--brand-soft); }
.badge.call_booked { color: var(--brand); background: var(--brand-soft); }
.badge.won { color: var(--green); background: var(--green-soft); }
.badge.lost { color: var(--red); background: var(--red-soft); }
.badge.no_response { color: var(--amber); background: var(--amber-soft); }
.rank { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); color: var(--text-dim); }
.rank.r1 { background: linear-gradient(135deg,#f59e0b,#fbbf24); color:#000; }
.rank.r2 { background: linear-gradient(135deg,#94a3b8,#cbd5e1); color:#000; }
.rank.r3 { background: linear-gradient(135deg,#b45309,#d97706); color:#fff; }
.pill-tag { display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600; color:var(--text-dim); background:var(--surface-3); padding:3px 9px; border-radius:8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .field { margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }
.crown { font-size: 13px; } .top-tag { font-size: 10.5px; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 1px 7px; border-radius: 6px; }

.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 550; animation: pop .2s; min-width: 220px; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.flex { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap-gap { display:flex; flex-wrap:wrap; gap:10px; }
.hide { display: none !important; }
.big-num { font-variant-numeric: tabular-nums; }
.mt16 { margin-top: 16px; }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); }

/* ---------- KPI submit board ---------- */
.badge.pending { color: var(--amber); background: var(--amber-soft); }
.badge.approved { color: var(--green); background: var(--green-soft); }
.badge.rejected { color: var(--red); background: var(--red-soft); }

.freq-pill { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.freq-pill.daily { color: var(--cyan); background: rgba(6,182,212,.14); }
.freq-pill.weekly { color: var(--brand-2); background: rgba(139,92,246,.16); }
.freq-pill.monthly { color: var(--green); background: var(--green-soft); }
.freq-pill.range { color: var(--text-dim); background: var(--surface-3); text-transform: none; letter-spacing: .2px; }

.ring-txt { fill: var(--text); font-weight: 800; font-family: var(--font); }

.kboard { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 1100px) { .kboard { grid-template-columns: 1fr; } }

.kcard { display: flex; gap: 16px; align-items: flex-start; }
.kcard .ringwrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kcard .body { flex: 1; min-width: 0; }
.kcard .ktop { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.kcard .kic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kcard .kname { font-weight: 700; font-size: 15px; }
.kcard .kmeta { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; flex-wrap: wrap; }
.kcard .weight-chip { font-size: 11px; font-weight: 650; color: var(--text-faint); background: var(--surface-3); padding: 2px 8px; border-radius: 6px; }
.kcard .ktarget { font-size: 12.5px; color: var(--text-dim); }
.kcard .ktarget b { color: var(--text); font-size: 14px; }

.submit-row { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.submit-row input.num { width: 92px; flex: none; text-align: center; font-weight: 700; font-size: 15px; }
.submit-row input.rmk { flex: 1; min-width: 0; }
.submit-row .btn { flex: none; }
.kcard.locked { opacity: .92; }
.locked-note { font-size: 12px; color: var(--green); display: flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 600; }
.auto-stat { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.auto-stat .auto-val { font-size: 22px; font-weight: 800; color: var(--text); }
.auto-stat .auto-pct { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--brand); }
/* Radar job approvals */
.ap-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 6px 11px; border-radius: 9px; margin: 4px 0 2px; }
.ap-badge.pending { color: var(--amber); background: rgba(245, 158, 11, .12); }
.ap-badge.ok { color: var(--green); background: rgba(18, 165, 116, .12); }
.ap-badge.no { color: var(--red); background: var(--red-soft); }
.appr-card { margin-bottom: 12px; }
.appr-desc { white-space: pre-wrap; font-size: 13px; line-height: 1.55; color: var(--text-dim); margin-top: 10px; max-height: 220px; overflow: auto; }
.appr-actions { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; flex-wrap: wrap; }
.appr-actions .input { flex: 1; min-width: 180px; }
/* Job detail modal (in-app Upwork-style view) */
.jd-head { display: flex; align-items: center; gap: 10px; }
.jd-title { font-size: 19px; font-weight: 750; margin: 10px 0 4px; line-height: 1.3; }
.jd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 8px; }
.jd-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; }
.jd-stat .jd-lbl { font-size: 11px; color: var(--text-faint); font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.jd-stat .jd-val { font-size: 14px; font-weight: 700; margin-top: 4px; }
.jd-section { margin-top: 16px; }
.jd-section h3 { font-size: 13px; font-weight: 700; margin: 0 0 8px; color: var(--text-dim); }
.jd-client { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text-dim); }
.jd-client span { display: inline-flex; align-items: center; gap: 6px; }
.jd-desc { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--text); max-height: 320px; overflow: auto; padding-right: 6px; }
@media (max-width: 720px) { .jd-grid { grid-template-columns: 1fr 1fr; } }
.kcount { width: 96px; height: 96px; display: grid; place-items: center; font-size: 30px; font-weight: 800; border-radius: 50%; border: 3px solid var(--border); }
.ksparks { height: 26px; margin-top: 10px; }

/* ---------- Hero / gauge ---------- */
.hero { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; } }
.gauge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gauge-card .glabel { font-size: 13px; color: var(--text-dim); font-weight: 600; margin-top: 2px; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat-tile { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; }
.stat-tile .st-top { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 12.5px; font-weight: 600; }
.stat-tile .st-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.stat-tile .st-val { font-size: 26px; font-weight: 800; margin-top: 8px; letter-spacing: -.5px; }
.stat-tile .st-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--amber); }

/* ---------- KPI breakdown bars ---------- */
.kpibar { margin-bottom: 14px; }
.kpibar:last-child { margin-bottom: 0; }
.kpibar .kh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 7px; }
.kpibar .kh .kl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kpibar .kh .kr { color: var(--text-dim); font-weight: 600; font-variant-numeric: tabular-nums; }
.kpibar .kh .kr b { color: var(--text); }
.kpibar .track { height: 10px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.kpibar .track > i { display: block; height: 100%; border-radius: 20px; transition: width .7s cubic-bezier(.2,.8,.2,1); }

/* ---------- Review queue ---------- */
.review-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; }
.review-card .rinfo { min-width: 0; }
.review-card .rname { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.review-card .rmeta { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }
.review-card .rremark { font-size: 13px; color: var(--text-dim); margin-top: 8px; background: var(--surface-2); border-radius: 9px; padding: 8px 11px; border: 1px solid var(--border-soft); }
.review-card .rnums { text-align: center; }
.review-card .rnums .big { font-size: 22px; font-weight: 800; }
.review-card .rnums .small { font-size: 11.5px; color: var(--text-faint); }
.review-card .ract { display: flex; gap: 8px; }
.review-empty { text-align: center; padding: 56px 20px; }
.review-empty .big { font-size: 44px; }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { background: none; border: none; color: var(--text-dim); padding: 7px 15px; border-radius: 8px; font-weight: 650; font-size: 13px; }
.seg button.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px var(--brand-glow); }

/* ---------- Leaderboard (dashboard) ---------- */
.lb-row { padding: 11px 12px; border-radius: 12px; transition: background .15s; cursor: pointer; }
.lb-row + .lb-row { margin-top: 2px; }
.lb-row:hover { background: var(--surface-2); }
/* spotlight #1 with a slow aurora glow */
.lb-hero { position: relative; padding: 15px 15px 13px; margin-bottom: 8px; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brand-soft); cursor: pointer; }
.lb-hero::before {
  content: ""; position: absolute; inset: -55%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0%, var(--brand-glow) 12%, transparent 28%, var(--cyan-soft) 50%, transparent 68%, var(--brand-glow) 86%, transparent 100%);
  filter: blur(26px); opacity: .65; animation: aurora 9s linear infinite;
}
@keyframes aurora { to { transform: rotate(360deg); } }
.lb-hero > * { position: relative; z-index: 1; }
.lb-hero .lb-name { font-size: 15px; }
.top-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 3px 7px; border-radius: 6px; vertical-align: middle; white-space: nowrap; }

/* subtle shimmer sweep across filled bars */
.lb-track > i, .kpa-track > i { position: relative; overflow: hidden; }
.lb-track > i::after, .kpa-track > i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: translateX(-120%); animation: sheen 5s ease-in-out 1.1s infinite;
}
@keyframes sheen { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .lb-hero::before, .lb-track > i::after, .kpa-track > i::after { animation: none; } }
.lb-top { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.lb-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lb-name { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.lb-name .crown { font-size: 13px; filter: saturate(1.2); }
.lb-title { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pct { margin-left: auto; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.lb-pct .sgn { font-size: 12px; color: var(--text-faint); font-weight: 700; margin-left: 1px; }
.lb-track { height: 7px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.lb-track > i { display: block; height: 100%; border-radius: 20px; transition: width .9s cubic-bezier(.2,.8,.2,1); }

/* ---------- KPI achievement rows ---------- */
.kpa-row { padding: 12px 2px; border-bottom: 1px solid var(--border-soft); }
.kpa-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.kpa-row:first-child { padding-top: 2px; }
.kpa-top { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.kpa-ic { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.kpa-name { font-weight: 600; font-size: 13.5px; }
.kpa-nums { margin-left: auto; font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpa-nums b { color: var(--text); font-weight: 700; }
.kpa-pct { font-weight: 800; font-size: 13.5px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.kpa-pct.good { color: var(--green); } .kpa-pct.ok { color: var(--amber); } .kpa-pct.bad { color: var(--red); }
.kpa-track { height: 8px; border-radius: 20px; background: var(--surface-3); overflow: hidden; }
.kpa-track > i { display: block; height: 100%; border-radius: 20px; transition: width .9s cubic-bezier(.2,.8,.2,1); }

/* ---------- Attendance ---------- */
.badge.present { color: var(--green); background: var(--green-soft); }
.badge.late { color: var(--amber); background: var(--amber-soft); }
.badge.half_day { color: var(--cyan); background: var(--cyan-soft); }
.badge.remote { color: var(--violet); background: var(--violet-soft); }
.badge.absent { color: var(--red); background: var(--red-soft); }
.badge.on_leave { color: var(--text-dim); background: var(--surface-3); }
.badge.holiday { color: var(--text-dim); background: var(--surface-3); }
.badge.cancelled { color: var(--text-faint); background: var(--surface-3); }

.checkin-card { text-align: center; padding: 34px 24px; }
.checkin-clock { font-size: 56px; font-weight: 800; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1; }
.checkin-date { color: var(--text-faint); font-size: 14px; margin-top: 6px; }
.checkin-state { margin: 22px auto 4px; font-size: 15px; color: var(--text-dim); max-width: 460px; }
.checkin-state b { color: var(--text); }
.checkin-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.btn.xl { padding: 15px 32px; font-size: 15px; border-radius: 13px; }
.btn.green { background: linear-gradient(135deg, var(--green), #34d399); border-color: transparent; color: #fff; box-shadow: 0 8px 20px var(--green-soft); }
.checkin-meta { display: flex; gap: 30px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.checkin-meta .m { text-align: center; }
.checkin-meta .m .v { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.checkin-meta .m .l { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.remote-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin-top: 16px; cursor: pointer; user-select: none; }
.remote-toggle input { width: 16px; height: 16px; }

.presence-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 1100px) { .presence-grid { grid-template-columns: repeat(2, 1fr); } }
.presence-tile { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 16px; }
.presence-tile .pv { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.presence-tile .pl { font-size: 12px; color: var(--text-dim); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.presence-tile .pl .dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------- Confetti ---------- */
.confetti-host { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti-host i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { transform: translate(var(--drift, 0), 106vh) rotate(var(--rot, 360deg)); opacity: .8; } }

/* ---------- Attendance heatmap ---------- */
.heatmap-wrap { overflow-x: auto; padding-bottom: 4px; }
.heatmap-months { display: flex; gap: 0; margin-bottom: 6px; font-size: 10.5px; color: var(--text-faint); width: max-content; }
.heatmap { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; width: max-content; }
.hm-cell { width: 13px; height: 13px; border-radius: 3px; background: var(--surface-3); transition: transform .1s; }
.hm-cell:hover { transform: scale(1.3); outline: 1.5px solid var(--border); position: relative; z-index: 2; }
.hm-cell.empty { opacity: .45; }
.heatmap-legend { display: flex; align-items: center; gap: 13px; margin-top: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim); }
.heatmap-legend .lk { display: inline-flex; align-items: center; gap: 5px; }
.heatmap-legend .sw { width: 11px; height: 11px; border-radius: 3px; }

/* ---------- Presence board ---------- */
.presence-board { display: grid; gap: 18px; }
.pb-title { font-size: 11.5px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 11px; }
.pb-title .c { color: var(--text-faint); font-weight: 600; }
.pb-avatars { display: flex; flex-wrap: wrap; gap: 10px; }
.pb-person { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 30px; padding: 5px 14px 5px 5px; }
.pb-person .nm { font-weight: 600; font-size: 13px; line-height: 1.1; }
.pb-person .tm { font-size: 11px; color: var(--text-faint); }
.pb-person.live .avatar { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--green); animation: livePulse 2.2s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--green); } 50% { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 5px rgba(18, 165, 116, .25); } }

/* ---------- Command palette ---------- */
.cmdk-back { position: fixed; inset: 0; background: rgba(8, 11, 16, .55); backdrop-filter: blur(6px); z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .12s; }
.cmdk { width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s; }
.cmdk-input { width: 100%; border: 0; border-bottom: 1px solid var(--border-soft); background: transparent; color: var(--text); font-size: 16px; padding: 16px 18px; font-family: inherit; }
.cmdk-input:focus { outline: none; }
.cmdk-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.cmdk-item .ci { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--text-dim); display: grid; place-items: center; flex: none; }
.cmdk-item .lbl { font-weight: 600; color: var(--text); font-size: 13.5px; }
.cmdk-item .sub { font-size: 11.5px; color: var(--text-faint); }
.cmdk-item.active { background: var(--brand-soft); }
.cmdk-item.active .ci { background: var(--brand); color: #fff; }
.cmdk-empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: 13px; }
.cmdk-foot { padding: 9px 16px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--text-faint); display: flex; gap: 16px; }
.kbd { font-family: ui-monospace, monospace; font-size: 10.5px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.cmdk-trigger { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; color: var(--text-faint); font-size: 12.5px; font-weight: 500; }
.cmdk-trigger:hover { border-color: var(--brand); color: var(--text-dim); }

/* ---------- View transition ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.content.anim { animation: viewIn .32s cubic-bezier(.2, .8, .2, 1); }

/* ---------- Native-feel smoothness polish ---------- */
* { -webkit-tap-highlight-color: transparent; }            /* no grey flash on tap */
body { overscroll-behavior-y: contain; }                   /* no rubber-band bounce in the installed app */
.nav-item { transition: background .15s, color .15s, transform .12s ease; }
.subnav button { transition: background .15s, color .15s, box-shadow .15s, transform .12s ease; }
/* Subtle press feedback so taps feel responsive */
.btn:active, .icon-btn:active, .mini-btn:active, .feed-chip .fd-pick:active { transform: scale(.95); }
.nav-item:active { transform: scale(.985); }
.subnav button:active, .job-card .btn:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .content.anim { animation: none; }
  .btn:active, .icon-btn:active, .mini-btn:active, .nav-item:active,
  .subnav button:active, .feed-chip .fd-pick:active { transform: none; }
}

/* ---------- Sortable tables ---------- */
.th-sort { cursor: pointer; user-select: none; transition: color .12s; }
.th-sort:hover { color: var(--text); }
th.sorted-asc::after { content: " ↑"; color: var(--brand); }
th.sorted-desc::after { content: " ↓"; color: var(--brand); }

/* ---------- Notification bell ---------- */
.bell-btn { position: relative; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: none; place-items: center; line-height: 1; box-shadow: 0 0 0 2px var(--bg); }
.bell-panel { position: absolute; top: 64px; right: 24px; width: 320px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; animation: pop .16s; }
.bell-head { padding: 12px 16px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.bell-item { display: flex; gap: 11px; align-items: center; padding: 12px 16px; font-size: 13px; color: var(--text-dim); cursor: pointer; border-bottom: 1px solid var(--border-soft); transition: background .12s; }
.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--surface-2); color: var(--text); }
.bell-item .bi { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; flex: none; color: var(--text-dim); }
.bell-empty { padding: 30px 20px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* ---------- Member profile modal ---------- */
.pm-head { display: flex; align-items: center; gap: 16px; }
.pm-id { flex: 1; min-width: 0; }
.pm-name { font-size: 21px; font-weight: 760; letter-spacing: -.3px; }
.pm-sub { color: var(--text-faint); font-size: 13px; margin-top: 2px; }
.pm-overall { text-align: right; }
.pm-ov { font-size: 31px; font-weight: 820; letter-spacing: -1px; }
.pm-ov span { font-size: 16px; color: var(--text-faint); font-weight: 700; }
.pm-l { font-size: 11px; color: var(--text-faint); }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 680px) { .pm-grid { grid-template-columns: 1fr; } }
.pm-card { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 15px; }
.pm-cap { font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.pm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pm-stat { text-align: center; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px 8px; }
.pm-v { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pm-streak { margin-top: 13px; display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--amber); font-size: 14px; }
.pm-counts { margin-top: 11px; display: flex; gap: 14px; font-size: 11.5px; color: var(--text-faint); }

/* ---------- Achievements / badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 9px; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px 6px 6px; border-radius: 30px; border: 1px solid var(--border-soft); background: var(--surface-2); font-size: 12.5px; font-weight: 650; color: var(--text); }
.badge-pill.locked { opacity: .45; }
.badge-pill .bi { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.badge-pill.locked .bi { color: var(--text-faint); }
.pm-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Insights ---------- */
.insight { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.insight:last-child { border-bottom: 0; }
.insight .ii { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3); display: grid; place-items: center; flex: none; }

/* ---------- Activity feed ---------- */
.feed-item { display: flex; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .fi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.feed-item .ft { flex: 1; min-width: 0; }
.feed-item .fx { font-size: 13px; color: var(--text); }
.feed-item .fa { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.kpa-spark { width: 72px; height: 22px; margin-left: 6px; flex: none; }

/* ---------- Expandable table rows ---------- */
tr.expanded { background: var(--surface-2); }
tr[data-exp]:hover { background: var(--surface-2); }
.exp-row > td { padding: 0 14px 14px; background: var(--surface-2); border-top: 0; }
.exp-detail { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; padding: 13px 15px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; font-size: 12.5px; color: var(--text-dim); animation: viewIn .2s; }
.exp-detail .exfull { grid-column: 1 / -1; }
.exp-detail .exl { color: var(--text-faint); font-weight: 600; margin-right: 6px; }
@media (max-width: 700px) { .exp-detail { grid-template-columns: 1fr; } }

/* ---------- Compare ---------- */
.cmp-head { display: flex; align-items: center; justify-content: center; gap: 16px; }
.cmp-vs { font-weight: 800; color: var(--text-faint); font-size: 13px; }
.cmp-card { text-align: center; }
.cmp-card .avatar { margin: 0 auto 10px; }
.cmp-name { font-weight: 700; font-size: 16px; }
.cmp-big { font-size: 38px; font-weight: 820; letter-spacing: -1px; margin: 8px 0 4px; }
.cmp-big span { font-size: 18px; color: var(--text-faint); }
.cmp-mini { display: flex; justify-content: center; gap: 26px; margin-top: 16px; }
.cmp-mi { text-align: center; }
.cmp-mi .v { font-size: 18px; font-weight: 750; }
.cmp-mi .l { font-size: 11px; color: var(--text-faint); }
.cmp-win { color: var(--green); font-weight: 800; }
.cmp-arrow { color: var(--green); font-size: 9px; }

/* ---------- Lead kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .kanban { display: flex; overflow-x: auto; padding-bottom: 6px; } .kanban-col { min-width: 240px; flex: none; } }
.kanban-col { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 10px; }
.kc-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13px; padding: 4px 6px 10px; }
.kc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kc-count { background: var(--surface-3); color: var(--text-dim); border-radius: 20px; font-size: 11px; padding: 1px 8px; font-weight: 700; }
.kc-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; border-radius: 10px; transition: background .12s; }
.kc-list.drop-over { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.kanban-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 11px; padding: 11px; cursor: grab; box-shadow: var(--shadow); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .4; }
.kc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.kc-client { font-weight: 650; font-size: 13px; }
.kc-meta { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.kc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; min-height: 16px; }
.kc-val { font-weight: 700; font-size: 12.5px; color: var(--green); }
.kc-resp { font-size: 11px; color: var(--text-faint); }
.kc-empty { text-align: center; color: var(--text-faint); font-size: 12px; padding: 14px 0; }
.kc-total { text-align: center; font-size: 11.5px; color: var(--text-dim); font-weight: 700; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border-soft); }

/* ---------- Coaching ---------- */
.coach-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0; font-size: 13px; color: var(--text-dim); }
.coach-item .ci { width: 22px; height: 22px; border-radius: 6px; background: var(--surface); display: grid; place-items: center; flex: none; }
.coach-tp { display: flex; gap: 11px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.coach-tp:last-child { border-bottom: 0; }
.coach-tp .tpn { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; }

/* ---------- Mobile nav (replaces the hidden sidebar) ---------- */
.mnav { display: none; }
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  /* Sidebar becomes a slide-in drawer (opened by the hamburger). */
  .sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); z-index: 60; }
  .sidebar.open { transform: translateX(0); }
  .only-mobile { display: grid; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; gap: 10px; }
  .page-title p { display: none; }
  .range-pills button { padding: 6px 9px; }
  .content { padding: 18px 16px 60px; }
  .mnav {
    display: flex; gap: 7px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 11px 16px; position: sticky; top: 65px; z-index: 15;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-soft);
  }
  .mnav::-webkit-scrollbar { display: none; }
  .mnav a {
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 8px 13px; border-radius: 10px; background: var(--surface);
    border: 1px solid var(--border-soft); color: var(--text-dim);
    font-weight: 600; font-size: 12.5px;
  }
  .mnav a svg { width: 15px; height: 15px; }
  .mnav a.active { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 4px 12px var(--brand-glow); }
}
@media (max-width: 460px) { .kpi-grid { grid-template-columns: 1fr; } }


/* ============================================================
   Pulse: premium leaderboard + KPI achievement
   ============================================================ */
@keyframes lbxIn { from { opacity: 0; transform: translateY(8px); } }

.lbx { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 14px; cursor: pointer; transition: background .15s, transform .15s; animation: lbxIn .5s cubic-bezier(.2,.8,.2,1) both; }
.lbx:hover { background: var(--surface-2); transform: translateX(2px); }
.lbx + .lbx { margin-top: 2px; }
.lbx-hero { background: linear-gradient(100deg, var(--brand-soft), transparent 72%); box-shadow: inset 0 0 0 1px var(--brand-soft); padding: 15px 14px; margin-bottom: 6px; }
.lbx-rank { width: 26px; height: 26px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--surface-3); color: var(--text-faint); }
.lbx-rank.gold { background: linear-gradient(135deg,#fcd34d,#f59e0b); color: #3a2a00; box-shadow: 0 3px 10px rgba(245,158,11,.3); }
.lbx-rank.silver { background: linear-gradient(135deg,#eaeef4,#9aa6b6); color: #1e293b; }
.lbx-rank.bronze { background: linear-gradient(135deg,#e0a36b,#a55b1e); color: #fff; }
.lbx-id { flex: 1; min-width: 0; }
.lbx-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbx-hero .lbx-name { font-size: 16px; }
.lbx-crown { font-size: 13px; }
.lbx-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; }
.lbx-title { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.lbx-bar { height: 5px; border-radius: 20px; background: var(--ring-track); overflow: hidden; margin-top: 9px; }
.lbx-bar > i { display: block; height: 100%; border-radius: 20px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.lbx-pct { font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; flex: none; line-height: 1; }
.lbx-pct .sgn { font-size: 12px; color: var(--text-faint); margin-left: 1px; font-weight: 700; }
.lbx-hero .lbx-pct { font-size: 24px; }

.kpx { display: flex; gap: 13px; padding: 14px 4px; border-bottom: 1px solid var(--border-soft); animation: lbxIn .5s cubic-bezier(.2,.8,.2,1) both; }
.kpx:last-child { border-bottom: 0; }
.kpx-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.kpx-main { flex: 1; min-width: 0; }
.kpx-top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.kpx-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.kpx-spark { width: 80px; height: 24px; margin-left: 2px; display: inline-flex; align-items: center; }
.kpx-nums { margin-left: auto; font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpx-nums b { color: var(--text); font-weight: 700; }
.kpx-nums .sl { margin-left: 3px; }
.kpx-pct { font-weight: 800; font-size: 14px; min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
.kpx-pct.good { color: var(--green); } .kpx-pct.ok { color: var(--amber); } .kpx-pct.bad { color: var(--red); }
.kpx-track { height: 7px; border-radius: 20px; background: var(--ring-track); overflow: hidden; position: relative; }
.kpx-track > i { display: block; height: 100%; border-radius: 20px; transition: width 1s cubic-bezier(.2,.8,.2,1); position: relative; }
.kpx-track > i::after { content: ""; position: absolute; inset: 0; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 55%); }

/* ---------- Funnel (Applied -> Lead -> Call -> Conversion) ---------- */
.fn-row { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.fn-stage { position: relative; flex: 1 1 130px; min-width: 120px; background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 16px; }
.fn-stage.clickable { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.fn-stage.clickable:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.fn-stage.clickable:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.fn-peek { position: absolute; top: 12px; right: 12px; color: var(--text-faint); opacity: 0; transition: opacity .15s; }
.fn-stage.clickable:hover .fn-peek { opacity: 1; }
.fn-stage-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.fn-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.fn-stage-val { display: flex; align-items: baseline; gap: 8px; font-size: 30px; font-weight: 780; margin-top: 8px; font-variant-numeric: tabular-nums; }
.fn-stage-sub { font-size: 12px; color: var(--green); font-weight: 650; margin-top: 2px; }
.fn-delta { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.fn-delta.up { color: var(--green); background: var(--green-soft); }
.fn-delta.down { color: var(--red); background: var(--red-soft); }
.fn-delta.flat { color: var(--text-faint); background: var(--surface-3); }
.fn-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; align-self: center; }
.fn-arrow-g { font-size: 18px; color: var(--text-faint); line-height: 1; }
.fn-rate { font-size: 11px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 760px) {
  .fn-row { flex-direction: column; }
  .fn-arrow { flex-direction: row; gap: 6px; }
  .fn-arrow-g { transform: rotate(90deg); }
}

/* ---------- Loop (team chat) ---------- */
.loop { display: flex; gap: 14px; height: calc(100vh - 215px); min-height: 460px; }
.loop-side { width: 264px; flex: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; overflow-y: auto; }
.loop-side-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); font-weight: 700; padding: 0 6px 8px; }
.loop-add { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 2px; border-radius: 6px; display: grid; place-items: center; }
.loop-add:hover { color: var(--brand); background: var(--surface-3); }
.loop-list { display: flex; flex-direction: column; gap: 2px; }
.loop-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-dim); font-weight: 550; }
.loop-item:hover { background: var(--surface-2); }
.loop-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.loop-hash { color: var(--text-faint); font-weight: 700; width: 14px; text-align: center; }
.loop-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loop-unread { background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; border-radius: 20px; padding: 1px 7px; min-width: 18px; text-align: center; }
.loop-empty-side { color: var(--text-faint); font-size: 12px; padding: 6px 9px; }
/* F9: private groups + Saved */
.loop-lock { color: var(--text-faint); width: 14px; display: inline-flex; align-items: center; justify-content: center; }
.loop-item.active .loop-lock { color: var(--brand); }
.loop-mcount { font-size: 10.5px; font-weight: 700; color: var(--text-faint); background: var(--surface-2); border-radius: 20px; padding: 1px 7px; }
.loop-saved-ic { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--brand-soft); color: var(--brand); }
.loop-you { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); margin-left: 6px; }
.loop-head-main { min-width: 0; }
.loop-manage { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.loop-manage:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.loop-title .icon, .loop-title svg { vertical-align: -2px; }
.lc-priv-row { display: flex; align-items: center; gap: 11px; padding: 10px 0 2px; cursor: pointer; }
.lc-priv-row .t1 { font-weight: 650; font-size: 13.5px; }
.lc-priv-row .t2 { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.lc-members { margin-top: 6px; }
.lc-people { display: flex; flex-direction: column; gap: 2px; max-height: 240px; overflow: auto; }
.lc-person { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 550; }
.lc-person:hover { background: var(--surface-2); }
.lc-person input { width: 16px; height: 16px; accent-color: var(--brand); }
.loop-person-self { border: 1px dashed var(--border) !important; margin-bottom: 4px; }
/* F10: prospect/project rooms + system messages */
.loop-deal-ic { width: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-faint); }
.loop-item.active .loop-deal-ic { color: var(--brand); }
.loop-deal-ic.won { color: var(--green); }
.loop-won-chip { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--green); background: var(--brand-soft); border-radius: 20px; padding: 1px 7px; }
.loop-sys { display: flex; align-items: center; gap: 8px; margin: 10px auto; padding: 7px 14px; max-width: 92%;
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 999px;
  font-size: 12.5px; color: var(--text-dim); font-weight: 550; }
.loop-sys svg { color: var(--brand); flex: none; }
.loop-sys-body { flex: 1; min-width: 0; }
.loop-sys-time { color: var(--text-faint); font-size: 11px; flex: none; }

/* F13: Vault Splits */
.vault-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.vault-seg button { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--surface); color: var(--text-dim); font-size: 13px; font-weight: 600; padding: 8px 16px; cursor: pointer; border-right: 1px solid var(--border); }
.vault-seg button:last-child { border-right: none; }
.vault-seg button.on { background: var(--brand); color: #fff; }
.split-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.split-tile { border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.split-tile .st-l { font-size: 11.5px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .03em; }
.split-tile .st-v { font-size: 20px; font-weight: 750; margin-top: 4px; }
.split-tile.owed .st-v { color: var(--green); }
.split-tile.owe .st-v { color: var(--red, #e5484d); }
.split-tile .st-v.pos { color: var(--green); }
.split-tile .st-v.neg { color: var(--red, #e5484d); }
.split-sec-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.split-sec-head h3 { margin: 0; }
.split-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.split-group-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px; cursor: pointer; transition: border-color .12s, transform .12s; }
.split-group-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.sg-ic { font-size: 26px; flex: none; }
.sg-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sg-name { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-sub { font-size: 12px; color: var(--text-faint); }
.sg-bal { font-size: 12px; font-weight: 700; flex: none; text-align: right; }
.sg-bal.pos { color: var(--green); } .sg-bal.neg { color: var(--red, #e5484d); } .sg-bal.zero { color: var(--text-faint); }
.split-friends { display: flex; flex-direction: column; gap: 4px; }
.split-friend { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.sf-name { font-weight: 600; flex: 1; }
.sf-bals { display: flex; gap: 12px; font-size: 12.5px; font-weight: 650; }
.sf-bals .pos { color: var(--green); } .sf-bals .neg { color: var(--red, #e5484d); }
.split-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sd-ic { font-size: 34px; }
.split-cols { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.split-mbal { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.split-mbal .pos { color: var(--green); font-weight: 700; } .split-mbal .neg { color: var(--red, #e5484d); font-weight: 700; } .split-mbal .zero { color: var(--text-faint); }
.split-settle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13px; }
.split-feed { display: flex; flex-direction: column; }
.split-feed-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.split-feed-row .sf-ic { font-size: 18px; width: 26px; text-align: center; flex: none; }
.split-feed-row.settle .sf-ic { color: var(--green); }
.split-feed-row .sf-body { flex: 1; min-width: 0; font-size: 13.5px; }
.split-feed-row .sf-amt { font-size: 12.5px; font-weight: 700; flex: none; }
.split-feed-row .sf-amt.pos { color: var(--green); } .split-feed-row .sf-amt.neg { color: var(--red, #e5484d); }
.split-people { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.split-person { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.split-person:hover { background: var(--surface-2); }
.split-person input { width: 16px; height: 16px; accent-color: var(--brand); }
.ng-icons { display: flex; flex-wrap: wrap; gap: 5px; }
.ng-ic { width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; font-size: 17px; cursor: pointer; }
.ng-ic.on { border-color: var(--brand); background: var(--brand-soft); }
.ex-split-tabs { display: flex; gap: 6px; margin: 14px 0 12px; }
.ex-split-tabs button { flex: 1; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); border-radius: 9px; padding: 7px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.ex-split-tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.ex-val-row { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.ex-val-row .evr-name { flex: 1; font-size: 13.5px; font-weight: 550; }
.ex-val-row .ex-val { width: 110px; }
.ex-valid { font-size: 12.5px; font-weight: 650; color: var(--text-faint); margin-top: 8px; min-height: 18px; }
.ex-valid.ok { color: var(--green); } .ex-valid.bad { color: var(--amber); }
@media (max-width: 760px) { .split-cols { grid-template-columns: 1fr; } .split-tiles { grid-template-columns: 1fr; } }

/* F17: Ledger (finance) */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fin-card { text-align: left; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 15px; cursor: pointer; transition: border-color .12s, transform .12s; }
.fin-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fc-client { font-weight: 750; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-title { font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-bar { height: 6px; border-radius: 6px; background: var(--surface-3, var(--surface-2)); overflow: hidden; margin: 10px 0 8px; }
.fc-fill { height: 100%; background: var(--green); border-radius: 6px; }
.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.fin-alert { display: flex; align-items: center; gap: 8px; background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.fin-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.fin-row:last-child { border-bottom: 0; }
.fin-row.over { background: var(--red-soft); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.fin-row .fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.fin-row .fr-main .muted { font-size: 11.5px; }
.fin-row .fr-amt { font-weight: 700; font-size: 13px; flex: none; }
.loop-main { flex: 1; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; min-width: 0; }
.loop-head { padding: 14px 18px; border-bottom: 1px solid var(--border-soft); flex: none; display: flex; align-items: center; gap: 10px; }
.loop-back { display: none; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 9px; cursor: pointer; }
.loop-back:hover { background: var(--surface-3); }
.loop-title { font-size: 16px; font-weight: 700; }
.loop-topic { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.loop-msgs { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; }
.loop-day { text-align: center; margin: 14px 0 10px; position: relative; }
.loop-day span { background: var(--surface); position: relative; z-index: 1; padding: 0 12px; font-size: 11.5px; color: var(--text-faint); font-weight: 600; }
.loop-day::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border-soft); }
.loop-msg { position: relative; display: flex; gap: 10px; padding: 3px 14px 3px 6px; border-radius: 8px; }
.loop-msg:hover { background: var(--surface-2); }
.loop-msg.cont { padding-left: 56px; }
.loop-mc { min-width: 0; flex: 1; }
.loop-meta { display: flex; align-items: baseline; gap: 8px; }
.loop-name { font-weight: 700; font-size: 13.5px; }
.loop-time { font-size: 11px; color: var(--text-faint); }
.loop-gtime { position: absolute; left: 12px; top: 6px; width: 40px; text-align: right; font-size: 10px; color: var(--text-faint); opacity: 0; }
.loop-msg.cont:hover .loop-gtime { opacity: 1; }
.loop-body { font-size: 14px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.loop-link { color: var(--brand); text-decoration: none; }
.loop-link:hover { text-decoration: underline; }
.loop-mention { color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.loop-edited { font-size: 10.5px; color: var(--text-faint); }
/* hover action bar */
.loop-actions { position: absolute; top: -13px; right: 12px; display: none; gap: 1px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 9px; box-shadow: var(--shadow); padding: 2px; z-index: 3; }
.loop-msg:hover .loop-actions { display: flex; }
.loop-actions button { border: 0; background: none; cursor: pointer; color: var(--text-dim); padding: 5px; border-radius: 6px; display: inline-flex; }
.loop-actions button:hover { background: var(--surface-3); color: var(--text); }
.loop-actions svg { width: 15px; height: 15px; }
.loop-actions .loop-react-btn { font-size: 15px; line-height: 1; }
/* Touch devices: no hover, so tap a message to reveal its actions (and they must
   not sit on top of the text). Bigger tap targets, no sticky-hover artifacts. */
@media (hover: none), (max-width: 760px) {
  .loop-msg:hover .loop-actions { display: none; }
  .loop-msg:hover { background: transparent; }
  .loop-msg.acts-open { background: var(--surface-2); }
  .loop-msg.acts-open .loop-actions { display: flex; top: -18px; right: 6px;
    background: var(--surface-2); box-shadow: var(--shadow-md); }
  .loop-actions button { padding: 9px; }
  .loop-actions svg { width: 17px; height: 17px; }
  .loop-actions .loop-react-btn { font-size: 17px; }
  .loop-gtime { display: none; }   /* the per-line time wraps on narrow screens; hide on touch */
}
/* quoted reply inside a message */
.loop-reply-ctx { display: flex; align-items: center; gap: 5px; max-width: 100%; margin-bottom: 3px; padding: 1px 6px;
  border: 0; border-left: 2px solid var(--brand); background: none; cursor: pointer; color: var(--text-dim); font-size: 12px; text-align: left; overflow: hidden; }
.loop-reply-ctx b { color: var(--text); font-weight: 600; flex: none; }
.loop-reply-ctx span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.loop-reply-ctx svg { width: 11px; height: 11px; flex: none; }
/* reactions */
.loop-reacts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.loop-react { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer; font-size: 13px; line-height: 1.7; }
.loop-react span { font-size: 11.5px; font-weight: 600; color: var(--text-dim); }
.loop-react.mine { border-color: var(--brand); background: var(--brand-soft); }
.loop-react.mine span { color: var(--brand); }
.loop-react:hover { border-color: var(--text-faint); }
/* emoji picker popover */
.loop-emoji-pop { position: fixed; z-index: 4100; display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s; }
.loop-emoji-pop button { border: 0; background: none; cursor: pointer; font-size: 20px; padding: 3px 6px; border-radius: 8px; transition: transform .1s; }
.loop-emoji-pop button:hover { background: var(--surface-3); transform: scale(1.18); }
/* reply bar above composer */
.loop-replybar { display: none; }
.loop-replybar.show { display: block; margin-bottom: 8px; }
.loop-replybar-in { display: flex; align-items: center; gap: 7px; background: var(--surface-2); border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0; padding: 7px 10px; font-size: 12.5px; color: var(--text-dim); }
.loop-replybar-in > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loop-replybar-in b { color: var(--text); }
.loop-replybar-in button { border: 0; background: none; cursor: pointer; color: var(--text-faint); display: inline-flex; padding: 3px; border-radius: 6px; }
.loop-replybar-in button:hover { background: var(--surface-3); color: var(--text); }
/* inline edit */
.loop-edit-ta { width: 100%; resize: none; border: 1px solid var(--brand); border-radius: 10px; background: var(--surface-2);
  color: var(--text); padding: 8px 10px; font: inherit; font-size: 14px; outline: none; }
.loop-edit-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.loop-edit-row .muted { margin-right: auto; font-size: 11px; }
/* jump-to-original highlight */
.loop-msg.flash { animation: loopFlash 1.2s ease; }
@keyframes loopFlash { 0%, 30% { background: var(--brand-soft); } 100% { background: transparent; } }
.loop-zero { color: var(--text-faint); text-align: center; margin: auto; font-size: 13px; }
.loop-composer { flex: none; padding: 12px 16px; border-top: 1px solid var(--border-soft); }
.loop-comp-row { display: flex; gap: 10px; align-items: flex-end; }
.loop-attach { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor: pointer; display: grid; place-items: center; }
.loop-attach:hover { color: var(--brand); border-color: var(--brand); }
.loop-pending { display: none; }
.loop-pending.show { display: block; margin-bottom: 8px; }
.loop-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.loop-chip img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; }
.loop-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.loop-chip-x { background: none; border: none; color: var(--text-faint); cursor: pointer; display: grid; place-items: center; padding: 2px; }
.loop-chip-x:hover { color: var(--red); }
.loop-att-img { display: inline-block; margin-top: 4px; }
.loop-att-img img { max-width: 320px; max-height: 280px; border-radius: 10px; border: 1px solid var(--border-soft); display: block; }
.loop-att-file { display: inline-flex; align-items: center; gap: 8px; margin-top: 5px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 550; text-decoration: none; }
.loop-att-file:hover { border-color: var(--brand); color: var(--brand); }
.loop-att-file svg { color: var(--brand); }
.loop-composer textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); padding: 10px 12px; font-family: inherit; font-size: 14px; line-height: 1.4; max-height: 140px; outline: none; }
.loop-composer textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.loop-people { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; }
.loop-person { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 550; }
.loop-person:hover { background: var(--surface-2); }
@media (max-width: 760px) {
  /* Phone: show EITHER the chat list OR the open chat (full screen), like a normal
     messaging app. Tapping a chat shows it; the back button returns to the list. */
  .loop { flex-direction: column; gap: 0; height: calc(100dvh - 120px); min-height: 0; }
  .loop-side { width: auto; flex: 1; min-height: 0; }
  .loop-main { display: none; }
  .loop.show-chat .loop-side { display: none; }
  .loop.show-chat .loop-main { display: flex; flex: 1; min-height: 0; }
  .loop-back { display: flex; }
}

/* Ultron: refine an existing cover letter */
.refine-row { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.refine-input-row { display: flex; gap: 8px; }
.refine-input-row .input { flex: 1; }
.refine-input-row .btn { flex: none; }
.refine-presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.refine-lbl { font-size: 11.5px; font-weight: 600; color: var(--text-faint); margin-right: 2px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.chip-btn:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Cover-letter length segmented control in the composer bar */
.len-seg { display: inline-flex; flex-shrink: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; height: 30px; }
.len-seg button { border: none; background: var(--surface); color: var(--text-dim); font-size: 12px; font-weight: 600;
  padding: 0 11px; cursor: pointer; border-right: 1px solid var(--border); transition: background .12s, color .12s; }
.len-seg button:last-child { border-right: none; }
.len-seg button:hover { background: var(--brand-soft); color: var(--brand); }
.len-seg button.on { background: var(--brand); color: #fff; }

/* F5: project scope + timeline card (under alignment and cover letter) */
.scope-card { margin-top: 14px; border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px;
  background: var(--surface-2); }
.scope-head { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); }
.scope-head svg { color: var(--brand); }
.scope-note { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--text-faint);
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px; padding: 2px 9px; }
.scope-list { list-style: none; margin: 11px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.scope-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.scope-list li svg { color: var(--green); flex: none; margin-top: 3px; }
.scope-timeline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--border-soft); }
.scope-est { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--text);
  background: var(--brand-soft); border-radius: 8px; padding: 4px 10px; }
.scope-est svg { color: var(--brand); }
.scope-phase { font-size: 11.5px; font-weight: 600; color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.scope-loading { opacity: .85; }
.scope-loading .scope-head { color: var(--text-faint); }
.scope-loading .scope-head svg { animation: scopePulse 1.1s ease-in-out infinite; }
@keyframes scopePulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

/* ---------- Notifications ---------- */
.notif-btn { position: relative; }
.notif-dot { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav-badge[hidden] { display: none; }
.notif-panel { position: fixed; top: 62px; right: 18px; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 1000; overflow: hidden; animation: pop .18s; }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.notif-readall { background: none; border: none; cursor: pointer; color: var(--brand); font-size: 12px; font-weight: 650; padding: 3px 7px; border-radius: 6px; transition: .15s; }
.notif-readall:hover { background: var(--brand-soft); }
.notif-gear { background: none; border: none; cursor: pointer; color: var(--text-faint); padding: 2px; border-radius: 7px; display: inline-flex; transition: .15s; }
.notif-gear:hover { color: var(--brand); background: var(--surface-2); }
.notif-gear svg { width: 15px; height: 15px; }
.notif-list { max-height: min(440px, 70vh); overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left; background: none; border: none; padding: 11px 14px; cursor: pointer; color: var(--text); border-bottom: 1px solid var(--border-soft); position: relative; transition: background .12s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--brand-soft); }
.notif-item.unread:hover { background: color-mix(in srgb, var(--brand-soft) 75%, var(--surface-2)); }
.notif-item .ni-ic { flex: none; display: inline-flex; margin-top: 1px; }
.notif-item .ni-ic svg { color: var(--brand); width: 16px; height: 16px; }
.ni-main { min-width: 0; flex: 1; }
.ni-title { font-size: 13px; font-weight: 650; line-height: 1.35; }
.ni-body { font-size: 12px; color: var(--text-dim); margin-top: 2px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ni-time { font-size: 11px; color: var(--text-faint); margin-top: 4px; font-weight: 500; }
.ni-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 5px; }
.notif-empty { padding: 28px 14px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Attendly: break state */
.break-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--amber); background: var(--amber-soft); padding: 3px 9px; border-radius: 999px; }
.break-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.punch-done.warn { color: var(--amber); background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.28); }

/* Account menu */
.acct-menu { display: flex; flex-direction: column; gap: 6px; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 600; }
.acct-item:hover { background: var(--surface-2); border-color: var(--brand); }
.acct-item.danger { color: var(--red); }
.acct-item.danger:hover { border-color: var(--red); }

/* ---------- BlackMind (LLM workspace) ---------- */
.bm-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; height: calc(100vh - 150px); min-height: 460px; }
.bm-wrap.with-side { grid-template-columns: 260px 1fr; }
.bm-bar { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--border); }
.bm-icon-btn { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); display: grid; place-items: center; cursor: pointer; transition: .12s; }
.bm-icon-btn:hover { color: var(--text); border-color: var(--brand); }
.bm-bar-title { font-weight: 650; font-size: 13.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-webtag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650; color: var(--brand); background: var(--brand-glow); border-radius: 7px; padding: 3px 8px; margin-bottom: 8px; }
.bm-searching { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 13px; font-weight: 600; }
.bm-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.bm-newchat { width: 100%; justify-content: center; }
.bm-conv-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.bm-conv { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; color: var(--text-dim); }
.bm-conv:hover { background: var(--surface-2); color: var(--text); }
.bm-conv.active { background: var(--brand-glow); border-color: var(--brand); color: var(--text); }
.bm-conv-title { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-conv-del { opacity: 0; border: none; background: none; color: var(--text-faint); cursor: pointer; display: grid; place-items: center; transition: .12s; }
.bm-conv:hover .bm-conv-del { opacity: 1; }
.bm-conv-del:hover { color: var(--red); }
.bm-side-empty { color: var(--text-faint); font-size: 12.5px; padding: 8px 4px; }

.bm-main { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.bm-thread { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.bm-row { display: flex; gap: 11px; max-width: 820px; }
.bm-row.user { justify-content: flex-end; align-self: flex-end; }
.bm-row.assistant { align-self: flex-start; }
.bm-ava { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--brand-glow); color: var(--brand); display: grid; place-items: center; }
.bubble { padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.6; }
.bubble.user { background: var(--brand); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; word-break: break-word; }
.bubble.assistant { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bm-md > :first-child { margin-top: 0; }
.bm-md > :last-child { margin-bottom: 0; }
.bm-md p { margin: 0 0 10px; }
.bm-md .bm-h { margin: 14px 0 8px; font-size: 14.5px; font-weight: 700; }
.bm-md .bm-ul, .bm-md .bm-ol { margin: 6px 0 10px; padding-left: 20px; }
.bm-md li { margin: 3px 0; }
.bm-md .bm-ic { background: var(--surface-3); padding: 1px 6px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.bm-md .bm-pre { background: #0b1220; color: #e5e9f0; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 8px 0 12px; }
.bm-md .bm-pre code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; }
.bm-md a { color: var(--brand); text-decoration: underline; }
.bm-think { display: flex; gap: 5px; padding: 3px 2px; }
.bm-think span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); animation: bmpulse 1.2s infinite ease-in-out; }
.bm-think span:nth-child(2) { animation-delay: .2s; }
.bm-think span:nth-child(3) { animation-delay: .4s; }
@keyframes bmpulse { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.bm-cursor { display: inline-block; width: 8px; height: 16px; margin-left: 1px; vertical-align: text-bottom; background: var(--brand); border-radius: 2px; animation: bmblink 1s steps(2, start) infinite; }
@keyframes bmblink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
/* attachments */
.bm-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: 100%; }
.bm-att-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bm-att-img { max-width: 240px; max-height: 240px; border-radius: 12px; border: 1px solid var(--border); object-fit: cover; }
.bm-att { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); font-size: 12.5px; font-weight: 600; max-width: 240px; }
.bm-att svg { flex: 0 0 auto; color: var(--brand); }
.bm-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.bm-att.pend { background: var(--brand-glow); border-color: var(--brand); color: var(--text); }
.bm-att-x { border: none; background: none; color: var(--text-faint); cursor: pointer; display: grid; place-items: center; padding: 0; margin-left: 2px; }
.bm-att-x:hover { color: var(--red); }
.bm-clip { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; display: grid; place-items: center; transition: .12s; }
.bm-clip:hover { color: var(--brand); border-color: var(--brand); }
/* per-reply actions */
.bm-actions { display: flex; gap: 4px; margin-top: 10px; opacity: 0; transition: opacity .15s; }
.bm-row.assistant:hover .bm-actions { opacity: 1; }
.bm-actions button { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; cursor: pointer; }
.bm-actions button:hover { color: var(--text); border-color: var(--brand); }

.bm-welcome { margin: auto; text-align: center; max-width: 560px; padding: 20px; }
.bm-orb { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; background: linear-gradient(160deg, var(--brand), var(--brand-2, var(--brand))); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.bm-welcome h2 { font-size: 22px; margin: 0 0 6px; }
.bm-welcome p { color: var(--text-dim); font-size: 13.5px; line-height: 1.6; margin: 0 0 18px; }
.bm-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bm-chip { text-align: left; padding: 10px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--text-dim); font-size: 12.5px; cursor: pointer; transition: .12s; }
.bm-chip:hover { border-color: var(--brand); color: var(--text); }

.bm-composer { display: flex; align-items: flex-end; gap: 10px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); transition: box-shadow .12s, background .12s; }
.bm-composer.drag { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.bm-seg { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.bm-seg button { display: flex; align-items: center; gap: 5px; border: none; background: none; color: var(--text-dim); font-size: 12.5px; font-weight: 650; padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.bm-seg button.active { background: var(--brand); color: #fff; }
#bm-input { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; max-height: 180px; }
#bm-input:focus { outline: none; border-color: var(--brand); }
.bm-send { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.bm-send:disabled { opacity: .5; cursor: default; }
.bm-foot { padding: 0 14px 10px; color: var(--text-faint); font-size: 11.5px; }

@media (max-width: 820px) {
  .bm-wrap { grid-template-columns: 1fr; height: auto; }
  .bm-side { flex-direction: column; }
  .bm-conv-list { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .bm-conv { flex: 0 0 auto; max-width: 200px; }
  .bm-main { height: 70vh; }
  .bm-suggest { grid-template-columns: 1fr; }
}
/* Narrow phones: model buttons take their own row so the text box keeps full width. */
@media (max-width: 600px) {
  .bm-composer { flex-wrap: wrap; }
  .bm-seg { order: 1; flex: 1 1 100%; justify-content: space-between; }
  .bm-clip { order: 2; }
  #bm-input { order: 3; flex: 1 1 auto; min-width: 0; }
  .bm-send { order: 4; }
}

/* ============================ CELEBRATIONS (Home) ============================ */
.celeb-card { overflow: hidden; }

/* Spotlight hero for the next celebration */
.celeb-hero { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: 16px; margin: 6px 0 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--rgb), .24), rgba(var(--rgb), .10));
  border: 1px solid rgba(var(--rgb), .44);
  box-shadow: 0 14px 32px -20px rgba(var(--rgb), .6);
  animation: celeb-pop .55s cubic-bezier(.2,.9,.25,1.2) both; }
.celeb-hero-av { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 800;
  position: relative; z-index: 2;
  box-shadow: 0 0 0 4px rgba(var(--rgb), .22), 0 8px 20px -6px rgba(var(--rgb), .85);
  animation: celeb-bob 3.6s ease-in-out infinite; }
.celeb-hero-body { flex: 1; min-width: 0; position: relative; z-index: 2; }
.celeb-hero-kicker { font-size: 11.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase;
  color: rgb(var(--rgb)); filter: saturate(1.2) brightness(.82); margin-bottom: 3px; }
.celeb-hero-name { font-size: 19px; font-weight: 760; color: var(--text); line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb-hero-date { font-size: 13px; color: var(--text-dim); margin-top: 3px; }
.celeb-hero-count { flex: 0 0 auto; text-align: center; position: relative; z-index: 2; padding-left: 12px; }
.celeb-hero-count .n { display: block; font-size: 30px; font-weight: 820; line-height: 1; color: var(--text); }
.celeb-hero-count .u { display: block; font-size: 11px; font-weight: 650; color: var(--text-dim); margin-top: 4px; }
.celeb-hero-count .big { display: block; font-size: 23px; font-weight: 820;
  background: linear-gradient(90deg, #ffd34e, #ff7b9c); -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: celeb-pulse 1.3s ease-in-out infinite; }
.celeb-hero.is-today { animation: celeb-pop .55s cubic-bezier(.2,.9,.25,1.2) both, celeb-glow 2.2s ease-in-out infinite .6s; }

/* confetti */
.celeb-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.celeb-confetti i { position: absolute; top: -14%; opacity: .88;
  animation-name: celeb-fall; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes celeb-fall { 0% { transform: translateY(-14px) rotate(0); opacity: 0; }
  12% { opacity: .9; } 100% { transform: translateY(230px) rotate(var(--r)); opacity: 0; } }
@keyframes celeb-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes celeb-pop { 0% { opacity: 0; transform: translateY(8px) scale(.985); } 100% { opacity: 1; transform: none; } }
@keyframes celeb-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes celeb-glow { 0%,100% { box-shadow: 0 0 0 1px rgba(var(--rgb), .5), 0 14px 40px -16px rgba(var(--rgb), .9); }
  50% { box-shadow: 0 0 0 1px rgba(var(--rgb), .85), 0 18px 50px -10px rgba(var(--rgb), 1); } }

.celeb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .celeb-grid { grid-template-columns: 1fr; gap: 18px; }
  .celeb-hero { gap: 12px; padding: 16px; }
  .celeb-hero-av { width: 46px; height: 46px; font-size: 17px; }
  .celeb-hero-name { white-space: normal; font-size: 17px; }
  .celeb-hero-count { padding-left: 6px; }
  .celeb-hero-count .n { font-size: 25px; } .celeb-hero-count .big { font-size: 20px; } }
.celeb-col { display: flex; flex-direction: column; gap: 9px; }
.celeb-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650;
  letter-spacing: .02em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.celeb-head svg { color: var(--brand); }
.celeb-ticket { position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border-radius: 13px; overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--rgb), .17), rgba(var(--rgb), .06));
  border: 1px solid rgba(var(--rgb), .36);
  box-shadow: 0 8px 22px -16px rgba(var(--rgb), .55);
  animation: celeb-pop .5s ease both; animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .18s ease, box-shadow .18s ease; }
.celeb-ticket:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(var(--rgb), .7); }
.celeb-av { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 0 0 3px rgba(var(--rgb), .20), 0 4px 14px -4px rgba(var(--rgb), .85); }
.celeb-meta { min-width: 0; flex: 1; }
.celeb-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb-note { font-size: 12px; font-weight: 550; color: var(--text-dim); }
.celeb-when { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.celeb-pill { flex: 0 0 auto; font-size: 11.5px; font-weight: 650; padding: 4px 10px; border-radius: 999px;
  color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); }
.celeb-pill.soon { color: #fff; border-color: transparent;
  background: linear-gradient(135deg, rgb(var(--rgb)), rgba(var(--rgb), .7));
  box-shadow: 0 4px 12px -4px rgba(var(--rgb), .9); }
.celeb-empty { font-size: 13px; color: var(--text-dim); padding: 10px 4px; }

/* Dark theme: richer radial glow + brighter accents (light is the default above) */
[data-theme="dark"] .celeb-hero {
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(var(--rgb), .30), transparent 58%),
    linear-gradient(135deg, rgba(var(--rgb), .20), rgba(var(--rgb), .04));
  border-color: rgba(var(--rgb), .38);
  box-shadow: 0 12px 36px -18px rgba(var(--rgb), .70); }
[data-theme="dark"] .celeb-hero-kicker { filter: brightness(1.4) saturate(1.1); }
[data-theme="dark"] .celeb-ticket {
  background: linear-gradient(135deg, rgba(var(--rgb), .15), rgba(var(--rgb), .03));
  border-color: rgba(var(--rgb), .30);
  box-shadow: 0 9px 26px -16px rgba(var(--rgb), .85); }
[data-theme="dark"] .celeb-ticket:hover { box-shadow: 0 14px 30px -12px rgba(var(--rgb), .95); }

@media (prefers-reduced-motion: reduce) {
  .celeb-hero, .celeb-hero-av, .celeb-ticket, .celeb-hero-count .big { animation: none !important; }
  .celeb-confetti { display: none; } }

/* ============================ VAULT ============================ */
.vault-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.vault-bar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.btn.block { width: 100%; justify-content: center; }
/* lock screen */
.vault-lock { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
.vault-lock-card { width: min(420px, 94%); text-align: center; padding: 34px 30px; }
.vault-lock-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: flex;
  align-items: center; justify-content: center; color: var(--brand); background: var(--brand-soft); }
.vault-lock-card h2 { margin: 0 0 8px; font-size: 21px; }
.vault-lock-card p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.5; }
.vault-lock-card .input { margin-bottom: 12px; text-align: center; }
.vault-err { margin-top: 12px; color: var(--red, #e5484d); font-size: 13px; font-weight: 550; }
/* salary card */
.vault-salary { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; }
.vault-salary.compact { flex-direction: row; align-items: center; gap: 14px; }
.vs-label { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
.vs-amount { font-size: 34px; font-weight: 780; line-height: 1.1; color: var(--text); }
.vs-amount.sm { font-size: 24px; }
.vs-meta { font-size: 13px; color: var(--text-dim); }
/* lists */
.vault-list { padding: 6px; display: flex; flex-direction: column; }
.vault-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 11px; cursor: pointer; transition: .12s; }
.vault-row:hover { background: var(--surface-2); }
.vault-row:not(:last-child) { border-bottom: 1px solid var(--border-soft); border-radius: 0; }
.vault-row:not(:last-child):hover { border-radius: 0; }
.vr-period { font-weight: 600; font-size: 14.5px; min-width: 120px; }
.vr-net { font-weight: 700; font-size: 15px; }
.vr-net small, .vr-net small { font-size: 11px; color: var(--text-dim); font-weight: 500; margin-left: 5px; }
.vr-tag { margin-left: auto; }
.vr-go { color: var(--text-dim); display: inline-flex; }
.vr-person { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.vr-name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.vr-name small { display: block; font-size: 12px; color: var(--text-dim); font-weight: 500; }
.vr-sal { font-weight: 650; font-size: 14px; }
.vr-count { font-size: 12.5px; }
.vault-row.person .vr-tag { margin-left: 0; }
/* payslip detail */
.ps-sec { margin-bottom: 16px; }
.ps-h { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; }
.ps-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.ps-line.total { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; font-weight: 650; }
.ps-net { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px;
  background: var(--brand-soft); font-weight: 750; font-size: 18px; color: var(--brand-ink); }
.ps-net.small { font-size: 15px; padding: 11px 14px; margin: 6px 0 4px; }
.ps-note { margin-top: 12px; font-size: 13px; color: var(--text-dim); font-style: italic; }
/* payslip form */
.pf-sec { margin: 14px 0; }
.pf-h { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 8px; }
.pf-line { display: grid; grid-template-columns: 1fr 130px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.pf-draft { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); font-weight: 550; }
.pf-draft input { width: auto; }

/* ============================ FLOW (task board) ============================ */
.flow-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.flow-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .flow-board { grid-template-columns: 1fr; } }
.flow-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.flow-col-head { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 13.5px; padding: 4px 6px 10px; }
.fch-dot { width: 9px; height: 9px; border-radius: 50%; }
.fch-dot.todo { background: #8a929e; } .fch-dot.doing { background: #d98a0b; } .fch-dot.done { background: var(--green); }
.fch-count { margin-left: auto; font-size: 12px; color: var(--text-dim); background: var(--surface-3); border-radius: 20px; padding: 1px 9px; font-weight: 600; }
.flow-col-body { min-height: 60px; display: flex; flex-direction: column; gap: 9px; border-radius: 10px; transition: .12s; }
.flow-col-body.drop-on { background: var(--brand-soft); outline: 2px dashed var(--brand); outline-offset: -2px; }
.flow-empty { font-size: 12.5px; color: var(--text-dim); text-align: center; padding: 18px 8px; opacity: .7; }
.flow-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--pc, var(--brand));
  border-radius: 11px; padding: 11px 12px; cursor: pointer; transition: .12s; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.04)); }
.flow-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.flow-card.dragging { opacity: .45; }
.fc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fc-prio { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.fc-cmt { font-size: 11.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 3px; }
.fc-title { font-size: 14px; font-weight: 560; line-height: 1.35; color: var(--text); }
.fc-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.flow-av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff;
  font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.flow-av.none { background: var(--surface-3); color: var(--text-dim); }
.flow-due { font-size: 11.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 2px 8px; }
.flow-due.over { color: #e5484d; border-color: #e5484d55; background: #e5484d12; font-weight: 600; }
/* detail modal */
.flow-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.fm-chip { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border: 1px solid; border-radius: 20px; padding: 3px 10px; }
.fm-pills { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; margin-left: auto; }
.flow-spill { border: 0; background: transparent; color: var(--text-dim); font-weight: 600; font-size: 12.5px; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.flow-spill.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.flow-spill:disabled { cursor: default; opacity: .6; }
.flow-detrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.fd-label { font-size: 10.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px; }
.fd-val { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.flow-desc { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.55; color: var(--text); margin-bottom: 16px; white-space: pre-wrap; }
.flow-cmt-head { font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.flow-cmts { display: flex; flex-direction: column; gap: 12px; max-height: 260px; overflow-y: auto; margin-bottom: 12px; }
.flow-cmt { display: flex; gap: 10px; }
.fcm-body { flex: 1; min-width: 0; }
.fcm-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.fcm-head .muted { font-size: 11.5px; }
.fcm-text { font-size: 13.5px; line-height: 1.5; color: var(--text); margin-top: 2px; }
.flow-cmt-add { display: flex; gap: 8px; align-items: flex-end; }
.flow-cmt-add textarea { resize: none; min-height: 38px; }
.btn.ghost.danger { color: #e5484d; }

/* Flow: multi-assign picker (owner) */
.tf-people { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--surface-2); }
.tf-person { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.tf-person:hover { background: var(--surface-3); }
.tf-person input { width: auto; flex: 0 0 auto; }
.tf-person.all { border-bottom: 1px solid var(--border-soft); border-radius: 0; margin-bottom: 2px; }

/* Vault: payroll summary tiles + owner settings */
.vault-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0; }
@media (max-width: 720px) { .vault-tiles { grid-template-columns: 1fr; } }
.vault-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 15px 16px; }
.vault-tile.green { border-left: 3px solid var(--green); }
.vault-tile.red { border-left: 3px solid #e5484d; }
.vt-label { font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-dim); }
.vt-value { font-size: 22px; font-weight: 760; line-height: 1.15; margin: 5px 0 3px; }
.vt-value small { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.vt-sub { font-size: 12px; color: var(--text-dim); }
.vault-settings { display: flex; align-items: center; gap: 22px; padding: 14px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.vsx-item { display: flex; flex-direction: column; gap: 2px; }
.vsx-label { font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--text-dim); }
.vsx-val { font-size: 16px; font-weight: 700; }
.vault-settings .btn { margin-left: auto; }

/* Leave request: paid-leave hint / unpaid-only banner */
.lv-note { background: #e5484d12; border: 1px solid #e5484d40; color: var(--text); border-radius: 10px;
  padding: 11px 13px; font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.lv-hint { font-size: 12.5px; color: var(--text-dim); margin-bottom: 12px; }

/* Radar: one-time "New" badge */
.new-pill { display: inline-block; margin-left: 8px; vertical-align: middle; font-size: 10.5px;
  font-weight: 750; letter-spacing: .02em; color: #fff; background: #e5484d; border-radius: 999px;
  padding: 2px 8px; box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); animation: newpulse 1.8s ease-out infinite; }
@keyframes newpulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); }
  70% { box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}
.new-pill.seen-fade { animation: none; opacity: 0; transform: scale(.7);
  transition: opacity .26s ease, transform .26s ease; }

/* Radar card: tag row, Latest marker, copy-title, prominent freshness */
.job-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.job-tags .new-pill { margin-left: 0; }
.latest-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 750;
  letter-spacing: .02em; color: #fff; background: linear-gradient(135deg, #f5333f, #e4002b);
  border-radius: 999px; padding: 2px 9px 2px 6px; }
.latest-pill svg { width: 11px; height: 11px; }
.jc-copy { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  margin-left: 6px; width: 24px; height: 24px; border: none; background: transparent; color: var(--text-faint);
  border-radius: 6px; cursor: pointer; opacity: .5; transition: opacity .15s, background .15s, color .15s; }
.job-card:hover .jc-copy { opacity: .85; }
.jc-copy:hover { background: var(--surface-3); color: var(--brand); opacity: 1; }
.jc-copy.copied { color: var(--green); opacity: 1; }
.job-when { gap: 8px; flex-wrap: wrap; }
.job-fresh { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  color: var(--text-dim); background: var(--surface-3); padding: 2px 9px; border-radius: 999px; }
.job-fresh svg { width: 12px; height: 12px; }
.job-fresh.warm { color: #d98a0b; background: rgba(240, 180, 41, .15); }
.job-fresh.hot { color: var(--green); background: rgba(18, 165, 116, .16); animation: freshpulse 2s ease-out infinite; }
@keyframes freshpulse { 0% { box-shadow: 0 0 0 0 rgba(18,165,116,.35); } 70% { box-shadow: 0 0 0 6px rgba(18,165,116,0); } 100% { box-shadow: 0 0 0 0 rgba(18,165,116,0); } }
.job-when-sub { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .job-fresh.hot { animation: none; } }

/* Live feed: a job sliding in at the top + the floating "new jobs" pill. */
@keyframes jobArrive { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.job-card.job-arrive { animation: jobArrive .5s ease both; box-shadow: 0 0 0 2px var(--brand-soft), 0 0 26px rgba(18, 165, 116, .28); }
.radar-newpill { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 900;
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border: none;
  border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 650; cursor: pointer;
  box-shadow: 0 6px 22px rgba(18, 165, 116, .42); animation: pop .2s; }
.radar-newpill:hover { filter: brightness(1.06); }
.radar-newpill svg { width: 14px; height: 14px; }

/* "Which profile did you apply from?" picker for Log as applied */
.jd-prof-menu { position: fixed; z-index: 2200; min-width: 240px; max-width: 320px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s; }
.jpm-head { font-size: 11.5px; font-weight: 700; color: var(--text-faint); padding: 7px 9px 8px; text-transform: uppercase; letter-spacing: .4px; }
.jpm-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.jpm-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none;
  border: 1px solid transparent; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text);
  font-size: 14px; font-weight: 600; transition: background .12s, border-color .12s, color .12s; }
.jpm-opt:hover { background: var(--brand-soft); color: var(--brand); }
.jpm-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.jpm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jpm-check { flex: none; display: flex; opacity: 0; color: var(--brand); transition: opacity .12s; }
.jpm-opt.selected { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.jpm-opt.selected .jpm-check { opacity: 1; }
.jpm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--border); }
.jpm-foot .btn.sm { padding: 7px 12px; }
.jpm-foot #jpm-confirm:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .job-card.job-arrive { animation: none; } }

/* Attendance: check-in device chip (phone / laptop) */
.dev-row { margin-top: 4px; }
.dev-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 550;
  color: var(--text-dim); background: var(--surface-3); border-radius: 20px; padding: 2px 8px; white-space: nowrap; }
.dev-chip svg { width: 12px; height: 12px; opacity: .85; }

/* Attendance: shift value, missing-punch flags + admin resolve buttons */
.att-shift { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.att-shift.low { color: #d98a0b; background: rgba(240, 180, 41, .15); border-radius: 6px; padding: 1px 7px; }
.att-auto { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #d98a0b; background: rgba(240, 180, 41, .15); border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.att-miss { color: var(--red); font-style: italic; font-size: 12px; }
.att-overnight { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #6d5ef0; background: rgba(109, 94, 240, .15); border-radius: 5px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.att-flagged { background: rgba(240, 180, 41, .05); }
.att-resolve { font-size: 11px; font-weight: 650; border-radius: 7px; padding: 4px 9px; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); transition: .12s; }
.att-resolve.miss { color: #d98a0b; border-color: rgba(240, 180, 41, .4); }
.att-resolve.miss:hover { background: rgba(240, 180, 41, .15); }
.att-resolve.count { color: var(--green); border-color: rgba(18, 165, 116, .4); }
.att-resolve.count:hover { background: rgba(18, 165, 116, .14); }

/* ============================ PULSE INSIGHTS ============================ */
.ins-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ins-ranges { flex-wrap: wrap; }
.ins-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .ins-tiles { grid-template-columns: repeat(2, 1fr); } }
.ins-tile { text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--c, var(--brand)); border-radius: 13px; padding: 13px 15px; transition: .14s; }
.ins-tile:hover { transform: translateY(-1px); border-color: var(--c, var(--brand)); }
.ins-tile.on { box-shadow: 0 0 0 1px var(--c), 0 6px 18px -8px var(--c); background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
.it-l { font-size: 11px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--text-dim); }
.it-v { font-size: 24px; font-weight: 770; line-height: 1.1; margin-top: 4px; color: var(--text); }
.ins-hero { text-align: center; padding: 8px 0 4px; }
.ins-big { font-size: 46px; font-weight: 800; line-height: 1; }
.ins-hero .muted { font-size: 13px; margin-top: 6px; }

/* Radar: per-user feed chips with mute toggle */
.feed-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.feed-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 600; transition: .14s; }
.feed-chip.muted { opacity: .5; }
.feed-chip.active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.fd-pick { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent;
  cursor: pointer; padding: 2px 4px 2px 6px; border-radius: 999px; font: inherit; color: inherit; }
.fd-pick:disabled { cursor: default; }
.fd-pick:not(:disabled):hover { color: var(--brand); }
.fd-clear { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--border);
  background: transparent; color: var(--text-dim); font-size: 12.5px; font-weight: 600; padding: 8px 13px;
  border-radius: 999px; cursor: pointer; }
.fd-clear:hover { color: var(--text); border-color: var(--text-dim); }
.fd-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.feed-chip.muted .fd-dot { background: var(--text-dim) !important; }
.fd-name { color: var(--text); }
.fd-count { font-size: 11px; font-weight: 700; color: #fff; background: var(--red); border-radius: 999px; padding: 1px 7px; }
.fd-mute { border: 0; background: var(--surface-3); color: var(--text-dim); width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .14s; }
.fd-mute:hover { color: var(--text); background: var(--border); }
.feed-chip.muted .fd-mute { color: var(--amber); }

/* Funnel: clickable per-person cells (drill-down) */
.fn-cell { cursor: pointer; border-radius: 6px; transition: .12s; }
.fn-cell:hover { background: var(--brand-soft); color: var(--brand) !important; }

/* Ultron: profile portfolio documents */
.up-doclist { display: flex; flex-direction: column; gap: 8px; }
.up-doc { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.up-doc-ic { color: var(--brand); display: flex; flex: 0 0 auto; }
.up-doc-meta { min-width: 0; flex: 1; }
.up-doc-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-doc-sub { font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
.up-doc-btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: none; background: transparent; color: var(--text-dim); border-radius: 7px; cursor: pointer; transition: .12s; }
.up-doc-btn:hover { background: var(--surface-3); color: var(--text); }
.up-doc-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.up-doc-add { margin-top: 10px; cursor: pointer; }

/* Ultron studio: small scope-of-work attach button + chip */
.cmp-attach { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); border-radius: 8px; cursor: pointer; transition: .12s; flex: 0 0 auto; }
.cmp-attach:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.cmp-attach.busy { opacity: .55; pointer-events: none; }
.cmp-sow { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 3px 6px 3px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; }
.cmp-sow-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-sow-x { display: inline-flex; align-items: center; border: none; background: transparent; color: var(--brand); cursor: pointer; padding: 0; opacity: .7; }
.cmp-sow-x:hover { opacity: 1; }

/* =====================================================================
   PREMIUM REFRESH  -  marketing-grade polish layered on shared
   components. Additive + scoped to existing classes, nothing structural
   changes, so every screen levels up at once and stays consistent.
   ===================================================================== */

/* Cards + tiles: richer depth, come alive on hover */
.card, .stat-tile { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s cubic-bezier(.2,.8,.2,1), border-color .35s; }
.card { box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 26px -16px rgba(16,24,40,.16); }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 22%, var(--border)); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 24px 46px -24px var(--brand-glow), 0 12px 26px -20px rgba(16,24,40,.22); }
.stat-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 26%, var(--border-soft)); box-shadow: 0 20px 40px -24px var(--brand-glow); }

/* Icon chips: depth + a subtle lift with their card (colour-matched glow) */
.st-ic, .kpx-ic { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 15px -9px currentColor; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.card:hover .st-ic, .card:hover .kpx-ic, .stat-tile:hover .st-ic { transform: scale(1.09) rotate(-4deg); }

/* Stat numbers: a touch bigger and tighter for impact */
.stat-tile .st-val { font-size: 27px; letter-spacing: -.6px; }

/* Page header: a faint brand aurora for a premium feel */
.topbar { overflow: hidden; background: radial-gradient(360px 110px at 7% -34%, var(--brand-glow), transparent 72%), color-mix(in srgb, var(--bg) 82%, transparent); }

/* Signature aurora behind the whole workspace (the marketing-site look) */
.main { background:
  radial-gradient(820px 400px at 14% -4%, color-mix(in srgb, var(--brand) 17%, transparent), transparent 56%),
  radial-gradient(700px 380px at 99% 0%, color-mix(in srgb, var(--brand-2, var(--brand)) 13%, transparent), transparent 55%),
  var(--bg);
  background-repeat: no-repeat; background-attachment: fixed; }

/* ---- Finer touches (second pass) ---- */

/* Sidebar active item: gradient wash + a glowing accent bar */
.nav-item.active { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 16%, transparent), color-mix(in srgb, var(--brand) 4%, transparent) 82%); }
.nav-item.active::before { height: 22px; background: linear-gradient(180deg, var(--brand-2, var(--brand)), var(--brand)); box-shadow: 0 0 10px var(--brand-glow); }

/* Leaderboard: premium top-performer, gradient TOP-PERFORMER badge, glossier bars */
.lbx-hero { background: linear-gradient(100deg, color-mix(in srgb, var(--brand) 14%, transparent), color-mix(in srgb, var(--brand) 3%, transparent) 74%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent), 0 14px 30px -20px var(--brand-glow); }
.lbx-tag { background: linear-gradient(135deg, var(--brand-2, var(--brand)), var(--brand)); color: #fff; box-shadow: 0 4px 10px -4px var(--brand-glow); }
.lbx-bar { height: 6px; }
.lbx-bar > i { position: relative; box-shadow: 0 1px 6px -1px rgba(0,0,0,.14); }
.lbx-bar > i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.42), transparent 55%); }

/* Gradient on the headline metrics only (inline semantic colours still win) */
.stat .value, .stat-tile .st-val, .lbx-hero .lbx-pct { background: linear-gradient(120deg, var(--brand-ink, var(--brand)), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Oracle module (Uma shortlist simulator) ---------- */
.oracle-head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(109,94,240,.14), rgba(228,0,43,.08)); border: 1px solid var(--border); }
[data-theme="dark"] .oracle-head { background: linear-gradient(135deg, rgba(139,125,245,.18), rgba(255,59,71,.10)); }
.oracle-head .sub { font-size: 13px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }
.oracle-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, #8b7df5, #6d5ef0); box-shadow: 0 6px 18px rgba(109,94,240,.28); }

.or-card { transition: .15s; }
.or-card:hover { border-color: var(--text-faint); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.or-scorepill { font-weight: 700; font-size: 20px; padding: 6px 12px; border-radius: 12px; line-height: 1; display: flex; align-items: baseline; gap: 1px; flex: none; }
.or-scorepill span { font-size: 11px; font-weight: 600; opacity: .7; }
.or-scorepill.muted { color: var(--text-faint); }

.or-siggroup { margin-top: 14px; }
.or-siglabel { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.or-siglabel .muted { font-weight: 400; }
.or-sig { display: grid; grid-template-columns: 180px 1fr 34px; gap: 10px; align-items: center; margin-bottom: 9px; }
.or-signame { font-size: 12.5px; color: var(--text-dim); }
.or-signame .muted { font-size: 11px; }
.or-sigscore { text-align: right; font-weight: 600; font-size: 13px; }
.or-signote { grid-column: 1 / -1; font-size: 11.5px; margin-top: -3px; line-height: 1.45; }
@media (max-width: 640px) { .or-sig { grid-template-columns: 1fr 34px; } .or-signame { grid-column: 1 / -1; } .or-sigbar { grid-column: 1 / 2; } }

.or-section { margin-top: 18px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.or-section h4 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.or-rw { margin-bottom: 12px; }
.or-rwlabel { font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.or-rwbody { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.or-rwlist { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }
/* Sectioned proposal: readable heading + body blocks (override pre-wrap so inter-block whitespace collapses). */
.or-proposal { white-space: normal; }
.or-psec { margin-bottom: 12px; }
.or-psec:last-child { margin-bottom: 0; }
.or-pshead { font-weight: 700; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.or-psec > div:last-child { white-space: pre-wrap; }

.or-factors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.or-factor { background: var(--surface-2); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.or-factor .muted { font-size: 11px; }
.or-factor b { font-size: 15px; }
@media (max-width: 640px) { .or-factors { grid-template-columns: repeat(2, 1fr); } }
.or-details { margin: 8px 0 4px; }
.or-details summary { cursor: pointer; font-size: 12.5px; color: var(--text-dim); font-weight: 600; }

.or-chip { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: capitalize; background: var(--surface-3); color: var(--text-dim); }
.or-chip.hi { background: var(--red-soft); color: var(--red); }
.or-chip.mid { background: var(--amber-soft); color: var(--amber); }
.or-chip.lo { background: var(--surface-3); color: var(--text-dim); }
.or-chip.ok { background: var(--green-soft); color: var(--green); }

/* Style bare form controls inside the Oracle body (scorer form) like .input */
#oracle-body input, #oracle-body select, #oracle-body textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; font-family: inherit; transition: .15s; }
#oracle-body textarea { resize: vertical; min-height: 64px; }
#oracle-body input::placeholder, #oracle-body textarea::placeholder { color: var(--text-faint); }
#oracle-body input:focus, #oracle-body select:focus, #oracle-body textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ===== Muhammad Traders overrides ===== */
/* Left menu stays collapsed and peeks open on hover (the sb-edge strip + wirePeek in
   app.js drive it). Every row also shows an unmistakable hover ring. */
.nav-item:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 24%, transparent); }

/* Product thumbnails in office tables */
.pthumb { width: 40px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.pthumb svg { height: 44px; width: auto; }
.pthumb .prodimg { height: 44px; width: auto; max-width: 40px; object-fit: contain; }


/* ============================================================
   COCA-COLA THEME LAYER
   The red --brand tokens above re-skin the whole system. This
   layer adds Coca-Cola's signature graphics, the white "wave"
   ribbon and rising effervescence, on the brand moments only
   (splash, login, Counter top bar + New Sale hero). Inter (the
   house font) and the green=paid / red=owed money colours are
   untouched. All motion is reduced-motion safe.
   ============================================================ */
:root{
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,92 C210,148 430,34 720,74 C1010,114 1236,40 1440,88 L1440,150 L0,150 Z'/%3E%3C/svg%3E");
  --wave-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='7' d='M0,70 C210,128 430,18 720,58 C1010,98 1236,22 1440,66'/%3E%3C/svg%3E");
}

/* ---- Login aside: flowing ribbon under the marketing copy ---- */
.login-aside::after{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:210px; z-index:0; pointer-events:none;
  background-image: var(--wave-line), var(--wave);
  background-repeat:no-repeat,no-repeat; background-position:bottom,bottom; background-size:100% 150px,100% 128px;
  opacity:.16; }
.login-aside-mid, .login-aside .login-foot{ position:relative; z-index:1; }
.login-aside .brand.big{ z-index:2; }  /* already position:absolute; just lift above the ribbon */

/* ---- Effervescence (shared by login + splash) ---- */
.fizz{ position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.fizz i{ position:absolute; bottom:-26px; border-radius:50%;
  background:radial-gradient(circle at 32% 28%, rgba(255,255,255,.95), rgba(255,255,255,.28) 58%, transparent 72%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.30); opacity:0;
  animation:fizzUp var(--d,11s) linear var(--dl,0s) infinite; }
.fizz i:nth-child(1){ left:8%;  width:10px; height:10px; --d:12s; --dl:0s;   }
.fizz i:nth-child(2){ left:20%; width:6px;  height:6px;  --d:9s;  --dl:2.4s; }
.fizz i:nth-child(3){ left:33%; width:14px; height:14px; --d:15s; --dl:1.1s; }
.fizz i:nth-child(4){ left:46%; width:8px;  height:8px;  --d:10s; --dl:3.6s; }
.fizz i:nth-child(5){ left:59%; width:5px;  height:5px;  --d:8s;  --dl:.6s;  }
.fizz i:nth-child(6){ left:70%; width:12px; height:12px; --d:13s; --dl:2s;   }
.fizz i:nth-child(7){ left:82%; width:7px;  height:7px;  --d:10.5s; --dl:4.2s; }
.fizz i:nth-child(8){ left:91%; width:9px;  height:9px;  --d:12.5s; --dl:1.7s; }
@keyframes fizzUp{
  0%{ transform:translateY(0) scale(.6); opacity:0; }
  12%{ opacity:.7; }
  88%{ opacity:.45; }
  100%{ transform:translateY(-100vh) scale(1); opacity:0; }
}

/* ---- Splash: a red field, a white wave, a whisper of fizz ---- */
.splash-wave{ position:absolute; left:0; right:0; bottom:0; height:34vh; min-height:220px; z-index:0; pointer-events:none;
  background-image: var(--wave-line), var(--wave);
  background-repeat:no-repeat,no-repeat; background-position:bottom,bottom; background-size:118% 150px,132% 128px;
  opacity:.15; }
.splash .fizz{ z-index:0; }
.splash-inner{ z-index:2; }

/* ---- Counter top bar: a subtle ribbon hugs the lower edge ---- */
.ctr-top{ overflow:hidden; }
.ctr-top > *{ position:relative; z-index:1; }
.ctr-top::after{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:24px; z-index:0; pointer-events:none;
  background:var(--wave) bottom/100% 24px no-repeat; opacity:.18; }

/* ---- Counter New Sale hero: a faint wave watermark ---- */
.ctr-hero{ position:relative; overflow:hidden; }
.ctr-hero > *{ position:relative; z-index:1; }
.ctr-hero::before{ content:""; position:absolute; left:0; right:0; bottom:-1px; height:82px; z-index:0; pointer-events:none;
  background:var(--wave) bottom/150% 82px no-repeat; opacity:.13; }

/* ---- Brand mark tile: a hairline Coca-Cola ring on the white chip ---- */
.brand-logo{ box-shadow: inset 0 0 0 1px rgba(228,0,43,.16), 0 2px 8px rgba(0,0,0,.12); }
.ctr-mark{ box-shadow: 0 2px 8px rgba(0,0,0,.16); }

@media (prefers-reduced-motion: reduce){
  .fizz i{ animation:none; opacity:.28; }
}
