/* OurHQ V4 — "Aurora Glass + V3 menu" (round 04 design)
   ==========================================================================
   Loaded LAST on every page (hub: partials/head.php, Finance: layout.php), so
   it wins over the V2 skin without touching it.

   1. Tokens. The round-04 palette is written once (--g-*), then mapped onto
      BOTH V2 token sets: the hub's (--surface, --violet, ...) and Finance's
      (--panel, --accent, ...). Every V2 page re-skins itself through them.
   2. The shell (app/glass.php): colour field, glass sidebar with the grouped
      menu, glass top bar, phone tab bar and sheets. All classes are g-*, so
      nothing collides with V2's own .menu / .sheet / .btn.
   3. Component polish shared by hub and Finance: cards, panels, buttons,
      fields, tables, modals, alerts.

   Light is the default; Dark and Auto come from the theme control (cookie +
   localStorage, same keys as V2). No inline styles anywhere (hub CSP).
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root, [data-theme="light"] {
  --g-bg: #e8edf7;
  --g-ink: #0e1220; --g-ink2: #394052; --g-ink3: #515a6e;
  --g-glass: rgba(255, 255, 255, .64); --g-glass-hi: rgba(255, 255, 255, .86); --g-glass-solid: rgba(250, 251, 255, .97);
  --g-card-solid: #f7f9fe;
  --g-stroke: rgba(255, 255, 255, .8); --g-hair: rgba(15, 25, 60, .11); --g-hair2: rgba(15, 25, 60, .07); --g-line-strong: rgba(15, 25, 60, .17);
  --g-track: rgba(15, 25, 60, .16);
  --g-shadow: 0 14px 44px rgba(40, 60, 120, .14), 0 1px 0 rgba(255, 255, 255, .7) inset;
  --g-shadow-sm: 0 4px 14px rgba(40, 60, 120, .10);
  --g-accent: #0862e8; --g-accent-hi: #0a55c9; --g-on-accent: #fff; --g-accent-ink: #0750bf;
  --g-accent-soft: rgba(8, 98, 232, .11); --g-accent-mid: rgba(8, 98, 232, .28); --g-accent-glow: rgba(8, 98, 232, .30);
  --g-pos: #0b7a52; --g-pos-bg: rgba(11, 122, 82, .13); --g-pos-solid: #12a06c;
  --g-neg: #b42318; --g-neg-bg: rgba(180, 35, 24, .11);
  --g-warn: #8a5200; --g-warn-fill: #c77a06; --g-warn-bg: rgba(200, 125, 0, .16);
  --g-info: #0b5cad; --g-info-bg: rgba(11, 92, 173, .12);
  --g-mute-bg: rgba(15, 25, 60, .08);
  --g-blob1: #7cc4ff; --g-blob2: #c9a8ff; --g-blob3: #ffc4a6; --g-blob4: #9af0d2; --g-blob-o: .85;
  --g-veil: rgba(14, 18, 40, .30);
  color-scheme: light;
}
[data-theme="dark"] {
  --g-bg: #080a11;
  --g-ink: #f3f5fb; --g-ink2: #cbd0dd; --g-ink3: #a4abbd;
  --g-glass: rgba(30, 34, 50, .58); --g-glass-hi: rgba(52, 58, 80, .62); --g-glass-solid: rgba(24, 27, 40, .97);
  --g-card-solid: #171a27;
  --g-stroke: rgba(255, 255, 255, .13); --g-hair: rgba(255, 255, 255, .12); --g-hair2: rgba(255, 255, 255, .07); --g-line-strong: rgba(255, 255, 255, .2);
  --g-track: rgba(255, 255, 255, .18);
  --g-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .08) inset;
  --g-shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
  --g-accent: #6cb0ff; --g-accent-hi: #8fc4ff; --g-on-accent: #04101f; --g-accent-ink: #a9d1ff;
  --g-accent-soft: rgba(108, 176, 255, .14); --g-accent-mid: rgba(108, 176, 255, .34); --g-accent-glow: rgba(60, 140, 255, .35);
  --g-pos: #62d9a4; --g-pos-bg: rgba(98, 217, 164, .15); --g-pos-solid: #34c489;
  --g-neg: #ff938a; --g-neg-bg: rgba(255, 120, 110, .16);
  --g-warn: #f3c071; --g-warn-fill: #f3c071; --g-warn-bg: rgba(243, 192, 113, .15);
  --g-info: #8fc4ff; --g-info-bg: rgba(143, 196, 255, .14);
  --g-mute-bg: rgba(255, 255, 255, .09);
  --g-blob1: #1d5fd8; --g-blob2: #7a3ff0; --g-blob3: #c2416b; --g-blob4: #0e9f86; --g-blob-o: .55;
  --g-veil: rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --g-bg: #080a11;
    --g-ink: #f3f5fb; --g-ink2: #cbd0dd; --g-ink3: #a4abbd;
    --g-glass: rgba(30, 34, 50, .58); --g-glass-hi: rgba(52, 58, 80, .62); --g-glass-solid: rgba(24, 27, 40, .97);
    --g-card-solid: #171a27;
    --g-stroke: rgba(255, 255, 255, .13); --g-hair: rgba(255, 255, 255, .12); --g-hair2: rgba(255, 255, 255, .07); --g-line-strong: rgba(255, 255, 255, .2);
    --g-track: rgba(255, 255, 255, .18);
    --g-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 1px 0 rgba(255, 255, 255, .08) inset;
    --g-shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
    --g-accent: #6cb0ff; --g-accent-hi: #8fc4ff; --g-on-accent: #04101f; --g-accent-ink: #a9d1ff;
    --g-accent-soft: rgba(108, 176, 255, .14); --g-accent-mid: rgba(108, 176, 255, .34); --g-accent-glow: rgba(60, 140, 255, .35);
    --g-pos: #62d9a4; --g-pos-bg: rgba(98, 217, 164, .15); --g-pos-solid: #34c489;
    --g-neg: #ff938a; --g-neg-bg: rgba(255, 120, 110, .16);
    --g-warn: #f3c071; --g-warn-fill: #f3c071; --g-warn-bg: rgba(243, 192, 113, .15);
    --g-info: #8fc4ff; --g-info-bg: rgba(143, 196, 255, .14);
    --g-mute-bg: rgba(255, 255, 255, .09);
    --g-blob1: #1d5fd8; --g-blob2: #7a3ff0; --g-blob3: #c2416b; --g-blob4: #0e9f86; --g-blob-o: .55;
    --g-veil: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

/* The V2 token sets, pointed at the palette above. Hub names first, then
   Finance's (finance/style.css). Same selectors V2 uses, so these win. */
:root, [data-theme="light"], [data-theme="dark"], [data-theme="auto"] {
  --bg: var(--g-bg);
  --surface: var(--g-glass); --surface-2: var(--g-glass-hi); --surface-3: var(--g-glass-hi);
  --line: var(--g-hair); --line-strong: var(--g-line-strong);
  --text: var(--g-ink); --text-muted: var(--g-ink2); --text-dim: var(--g-ink3);
  --violet: var(--g-accent); --violet-hi: var(--g-accent-hi); --violet-dim: var(--g-accent-soft); --violet-ink: var(--g-accent-ink);
  --green: var(--g-pos-solid); --green-dim: var(--g-pos-bg); --green-ink: var(--g-pos);
  --amber: var(--g-warn-fill); --amber-dim: var(--g-warn-bg); --amber-ink: var(--g-warn);
  --red: var(--g-neg); --red-dim: var(--g-neg-bg); --red-ink: var(--g-neg);
  --cyan: var(--g-info); --cyan-dim: var(--g-info-bg); --cyan-ink: var(--g-info);
  --radius: 22px; --radius-sm: 12px; --radius-xs: 9px;
  --shadow: var(--g-shadow); --shadow-sm: var(--g-shadow-sm);
  --ring: 0 0 0 3px var(--g-accent-soft);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, sans-serif;

  /* Finance (V9 names) */
  --bg-2: var(--g-glass-hi); --panel: var(--g-glass); --panel-2: var(--g-glass-hi);
  --border: var(--g-line-strong); --border-soft: var(--g-hair);
  --muted: var(--g-ink2); --muted-2: var(--g-ink3);
  --accent: var(--g-accent); --accent-2: var(--g-accent-hi); --accent-soft: var(--g-accent-soft); --accent-ink: var(--g-accent-ink);
  --green-soft: var(--g-pos-bg); --red-soft: var(--g-neg-bg); --amber-soft: var(--g-warn-bg); --cyan-soft: var(--g-info-bg);
  --grid: var(--g-hair2);
}

/* ------------------------------------------------------------------- base */
html { -webkit-text-size-adjust: 100%; }
body.page-app, body.g-fin {
  margin: 0;
  padding: 0 22px 70px 298px;
  min-height: 100vh;
  background: var(--g-bg);
  color: var(--g-ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
html[data-nav="collapsed"] body.page-app, html[data-nav="collapsed"] body.g-fin { padding-left: 120px; }
::selection { background: var(--g-accent-mid); }
:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }

/* the colour field behind the glass */
.g-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--g-bg); pointer-events: none; }
.g-aurora i { position: absolute; border-radius: 50%; opacity: var(--g-blob-o); }
.g-b1 { width: 900px; height: 900px; left: -300px; top: -340px; background: radial-gradient(closest-side, var(--g-blob1), transparent); }
.g-b2 { width: 860px; height: 860px; right: -320px; top: -20px; background: radial-gradient(closest-side, var(--g-blob2), transparent); }
.g-b3 { width: 1000px; height: 1000px; left: 18%; top: 46%; background: radial-gradient(closest-side, var(--g-blob3), transparent); }
.g-b4 { width: 760px; height: 760px; right: 6%; top: 104%; background: radial-gradient(closest-side, var(--g-blob4), transparent); }

.g-glass {
  background: var(--g-glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--g-stroke);
  box-shadow: var(--g-shadow);
}
.g-ic { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- sidebar */
.g-side {
  position: fixed; left: 16px; top: 16px; bottom: 16px; width: 258px; z-index: 30;
  padding: 14px 10px 10px; display: flex; flex-direction: column; border-radius: 24px;
}
.g-brand { display: flex; align-items: center; gap: 6px; padding: 0 2px 12px 6px; }
.g-brand-a { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--g-ink); text-decoration: none; }
.g-brand-a:hover { text-decoration: none; }
.g-brand-a b { display: block; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; }
.g-brand-a small { display: block; font-size: 12px; line-height: 1.2; color: var(--g-ink3); }
.g-logo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 30px; height: 30px; padding: 6px;
  border-radius: 10px; background: linear-gradient(135deg, var(--g-accent), #8a5cff); flex: none;
}
.g-logo i { background: #fff; border-radius: 2.5px; }
.g-logo i:nth-child(2) { opacity: .55; }
.g-icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; color: var(--g-ink2); cursor: pointer; position: relative; font: inherit;
}
.g-icon-btn:hover { background: var(--g-hair2); color: var(--g-ink); }
.g-fold { width: 34px; height: 34px; color: var(--g-ink3); }
.g-fold .g-ic { width: 18px; height: 18px; }

.g-side-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--g-track) transparent; }
.g-nav-group + .g-nav-group { margin-top: 6px; }
.g-nav-label {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 30px; padding: 0 10px;
  border: 0; border-radius: 9px; background: transparent; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--g-ink3);
}
.g-nav-label:hover { color: var(--g-ink); background: var(--g-hair2); }
.g-nav-label .g-ic { width: 15px; height: 15px; transition: transform .2s; }
.g-nav-group.is-closed .g-nav-label .g-ic { transform: rotate(-90deg); }
.g-nav-group.is-closed .g-nav-items { display: none; }
.g-nav-items { display: flex; flex-direction: column; gap: 1px; }
.g-side-scroll a {
  position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px;
  border-radius: 12px; color: var(--g-ink2); font-weight: 550; font-size: 14px; white-space: nowrap; text-decoration: none;
}
.g-side-scroll a .g-ic { width: 19px; height: 19px; }
.g-side-scroll a .g-nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-side-scroll a:hover { background: var(--g-hair2); color: var(--g-ink); text-decoration: none; }
.g-side-scroll a.is-on { background: var(--g-glass-hi); color: var(--g-ink); box-shadow: 0 2px 10px rgba(20, 40, 100, .10); font-weight: 650; }
.g-side-scroll a.is-on .g-ic { color: var(--g-accent); }
.g-count {
  min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--g-mute-bg); color: var(--g-ink2); font-variant-numeric: tabular-nums;
}
.g-count.is-hot { background: var(--g-accent); color: var(--g-on-accent); }
.g-side-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--g-hair); }
.g-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; width: 100%; border: 0; background: transparent; border-radius: 14px; text-align: left; color: var(--g-ink); font: inherit; cursor: pointer; }
button.g-me:hover { background: var(--g-hair2); }
.g-me .g-nl, .g-me > span:not(.g-ava) { flex: 1; min-width: 0; }
.g-me b { display: block; font-size: 14px; line-height: 1.25; }
.g-me small { display: block; font-size: 12px; color: var(--g-ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-me > .g-ic { color: var(--g-ink3); }
.g-ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, #8a5cff, var(--g-accent)); flex: none; }

/* folded sidebar: an icon rail */
html[data-nav="collapsed"] .g-side { width: 80px; padding-left: 8px; padding-right: 8px; }
html[data-nav="collapsed"] .g-side .g-nl,
html[data-nav="collapsed"] .g-side .g-count,
html[data-nav="collapsed"] .g-me > .g-ic { display: none; }
html[data-nav="collapsed"] .g-brand { flex-direction: column; padding: 0 0 10px; gap: 8px; }
html[data-nav="collapsed"] .g-brand-a { flex: none; }
html[data-nav="collapsed"] .g-nav-label { height: 13px; padding: 0; margin: 4px 0; font-size: 0; pointer-events: none; }
html[data-nav="collapsed"] .g-nav-label::before { content: ""; flex: 1; height: 1px; margin: 0 12px; background: var(--g-hair); }
html[data-nav="collapsed"] .g-nav-label .g-ic { display: none; }
html[data-nav="collapsed"] .g-nav-group.is-closed .g-nav-items { display: flex; }
html[data-nav="collapsed"] .g-side-scroll a { justify-content: center; padding: 0; height: 42px; }
html[data-nav="collapsed"] .g-side-scroll a .g-ic { width: 20px; height: 20px; }
html[data-nav="collapsed"] .g-side-scroll a .g-count.is-hot { display: block; position: absolute; top: 6px; right: 10px; min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
html[data-nav="collapsed"] .g-me { justify-content: center; padding: 6px 0; }
html[data-nav="collapsed"] .g-fold .g-ic { transform: scaleX(-1); }
html[data-nav="collapsed"] .g-side-scroll { overflow: visible; }
html[data-nav="collapsed"] [data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 9px; background: var(--g-ink); color: var(--g-bg); font-size: 13px; font-weight: 600;
  white-space: nowrap; z-index: 50; pointer-events: none;
}
html[data-nav="collapsed"] .g-up .g-menu { left: 0; }

/* ---------------------------------------------------------------- top bar */
.g-top {
  position: sticky; top: 16px; margin-top: 16px; height: 60px; z-index: 25;
  display: flex; align-items: center; gap: 10px; padding: 0 10px 0 20px; border-radius: 20px;
}
.g-logo-sm { display: none; text-decoration: none; }
.g-top-title {
  font-size: 17px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
html.g-scrolled .g-top-title { opacity: 1; transform: none; }
.g-search {
  margin-left: auto; display: flex; align-items: center; gap: 10px; height: 40px; width: min(340px, 34vw); padding: 0 10px 0 12px;
  border-radius: 12px; border: 1px solid var(--g-hair); background: var(--g-glass-hi); color: var(--g-ink3); font: inherit; font-size: 14px; cursor: pointer;
}
.g-search span { flex: 1; text-align: left; }
.g-search kbd, .g-menu kbd { font: 600 12px var(--font); padding: 2px 6px; border-radius: 6px; background: var(--g-mute-bg); color: var(--g-ink3); white-space: nowrap; }
.g-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--g-hair); background: var(--g-glass-hi); color: var(--g-ink); font: inherit; font-weight: 600; font-size: 14px;
  white-space: nowrap; cursor: pointer; text-decoration: none;
}
.g-btn:hover { border-color: var(--g-accent-mid); text-decoration: none; }
.g-btn.g-primary { background: var(--g-accent); color: var(--g-on-accent); border-color: transparent; box-shadow: 0 8px 20px var(--g-accent-glow); }
.g-btn.g-ghost { background: transparent; border-color: transparent; }
.g-btn.g-ghost:hover { background: var(--g-hair2); }
.g-btn .g-chev { width: 16px; height: 16px; margin-left: -2px; opacity: .8; }
.g-bell .g-dot {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--g-neg); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--g-glass-solid);
}

/* menus (New, bell, account) */
.g-menu-wrap { position: relative; }
.g-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px; padding: 8px; border-radius: 18px; z-index: 40;
  background: var(--g-glass-solid); border: 1px solid var(--g-stroke); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.g-menu[hidden] { display: none; }
.g-menu.g-wide { width: 380px; }
.g-up .g-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: 250px; }
.g-menu a, .g-sheet-list a, .g-signout button {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--g-ink); min-height: 46px;
  text-decoration: none; width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.g-menu a:hover, .g-sheet-list a:hover, .g-signout button:hover { background: var(--g-accent-soft); text-decoration: none; }
.g-menu a .g-ic, .g-sheet-list a .g-ic, .g-signout .g-ic { color: var(--g-accent); }
.g-menu b, .g-sheet-list b, .g-signout b { font-weight: 600; font-size: 15px; display: block; line-height: 1.25; }
.g-menu small, .g-sheet-list small { display: block; font-size: 13px; color: var(--g-ink3); line-height: 1.3; }
.g-menu hr { border: 0; border-top: 1px solid var(--g-hair); margin: 6px 4px; }
.g-m-lbl { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--g-ink3); padding: 10px 10px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-m-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 10px; }
.g-m-head a { width: auto; min-height: 0; padding: 4px 8px; font-size: 13px; font-weight: 600; color: var(--g-accent); }
.g-m-empty { padding: 14px 10px; color: var(--g-ink3); font-size: 14px; margin: 0; }
.g-menu a.g-nt { align-items: flex-start; font-size: 14px; line-height: 1.4; position: relative; padding-right: 26px; }
.g-menu a.g-nt > span:last-child > span { display: block; color: var(--g-ink2); }
.g-menu a.g-nt b { display: inline; font-size: inherit; }
.g-menu a.g-nt.is-unread::after { content: ""; position: absolute; right: 10px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--g-accent); }
.g-fi { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--g-mute-bg); }
.g-fi .g-ic { width: 17px; height: 17px; }
.g-menu .g-fi .g-ic { color: var(--g-ink2); }
.g-fi.is-warn { background: var(--g-warn-bg); } .g-menu .g-fi.is-warn .g-ic { color: var(--g-warn); }
.g-fi.is-pos { background: var(--g-pos-bg); } .g-menu .g-fi.is-pos .g-ic { color: var(--g-pos); }
.g-signout { margin: 0; }
.g-theme { display: flex; gap: 2px; padding: 3px; border-radius: 13px; background: var(--g-mute-bg); margin: 4px; }
.g-theme button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 8px; border: 0;
  border-radius: 10px; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--g-ink2); cursor: pointer;
}
.g-theme button .g-ic { width: 15px; height: 15px; }
.g-theme button.is-on { background: var(--g-glass-solid); color: var(--g-ink); box-shadow: 0 1px 5px rgba(10, 20, 60, .16); }

/* ------------------------------------------------------------- page area */
.g-main { min-width: 0; }
.page-app .shell { padding-top: 30px; }
.page-head h1, .greeting h1, .g-page-title {
  font-size: 32px; line-height: 1.15; letter-spacing: -.025em; font-weight: 700; margin: 0; color: var(--g-ink);
}
.g-fin .main { padding: 30px 0 40px; margin: 0 auto; max-width: 1240px; }
.g-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.g-lede { color: var(--g-ink2); margin: 6px 0 0; max-width: 64ch; }

/* ------------------------------------------------------------ components */
/* Cards and panels, hub and Finance alike: frosted glass. */
.card, .card-wide, .panel, .g-fin .card, .tile, .kpi, .attn-card {
  background: var(--g-glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--g-stroke);
  box-shadow: var(--g-shadow);
  border-radius: 22px;
}
.card-highlight { border-color: var(--g-accent-mid); background: color-mix(in srgb, var(--g-glass) 85%, var(--g-accent)); }

/* Buttons. Hub: secondary by default, .btn-primary for the one main action.
   Finance (V9 markup): .btn IS the primary, .btn-ghost the secondary. */
.page-app .btn, .page-auth .btn {
  border-radius: 12px; min-height: 40px; border: 1px solid var(--g-hair); background: var(--g-glass-hi); color: var(--g-ink); font-weight: 600;
}
.page-app .btn:hover, .page-auth .btn:hover { background: var(--g-glass-solid); border-color: var(--g-accent-mid); }
.page-app .btn-primary, .page-auth .btn-primary {
  background: var(--g-accent); border-color: transparent; color: var(--g-on-accent); box-shadow: 0 8px 20px var(--g-accent-glow);
}
.page-app .btn-primary:hover, .page-auth .btn-primary:hover { background: var(--g-accent-hi); border-color: transparent; color: var(--g-on-accent); }
.page-app .btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.page-app .btn-ghost:hover { background: var(--g-hair2); }
.page-app .btn-danger { color: var(--g-neg); }

.g-fin .btn { border-radius: 12px; background: var(--g-accent); border-color: transparent; color: var(--g-on-accent); box-shadow: 0 6px 16px var(--g-accent-glow); }
.g-fin .btn:hover { background: var(--g-accent-hi); border-color: transparent; color: var(--g-on-accent); }
.g-fin .btn-sm { border-radius: 9px; box-shadow: none; }
.g-fin .btn-ghost { background: var(--g-glass-hi); border: 1px solid var(--g-hair); color: var(--g-ink); box-shadow: none; }
.g-fin .btn-ghost:hover { background: var(--g-glass-solid); border-color: var(--g-accent-mid); color: var(--g-ink); }
.g-fin .btn-danger { background: transparent; border: 1px solid var(--g-neg-bg); color: var(--g-neg); box-shadow: none; }
.g-fin .btn-danger:hover { background: var(--g-neg-bg); border-color: var(--g-neg); color: var(--g-neg); }

/* Fields */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="date"], input[type="tel"], input[type="url"], input[type="month"], select, textarea {
  border-radius: 12px; border: 1px solid var(--g-hair); background-color: var(--g-glass-hi); color: var(--g-ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--g-accent); outline-offset: 1px; box-shadow: none; }
select option { color: #111; background: #fff; }

/* Tables: header on its own quiet ground, rows with hairlines */
table th { color: var(--g-ink3); }
.table-wrap, .table-scroll { border-radius: 16px; }

/* Menus, popups and overlays must be readable: solid glass, not see-through */
.menu-list, .modal, .search-drop, .palette, .palette-card, .lira-panel, .sheet {
  background: var(--g-glass-solid);
  border: 1px solid var(--g-stroke);
  box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.modal { border-radius: 24px; }
.modal-overlay { background: var(--g-veil); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* Alerts / flashes */
.alert, .flash { border-radius: 14px; }

/* Lira lives in the top bar ("Ask Lira"); the floating button is not shown. */
.lira-fab { display: none !important; }

/* Sign-in, second factor: the colour field behind one glass card */
body.page-auth {
  background:
    radial-gradient(900px 700px at 0% 0%, color-mix(in srgb, var(--g-blob1) 70%, transparent), transparent 70%),
    radial-gradient(900px 700px at 100% 20%, color-mix(in srgb, var(--g-blob2) 70%, transparent), transparent 70%),
    radial-gradient(1000px 800px at 40% 110%, color-mix(in srgb, var(--g-blob3) 60%, transparent), transparent 70%),
    var(--g-bg);
  color: var(--g-ink);
}
.card-auth { border-radius: 26px; }

/* ------------------------------------------------------------ phone sheets */
.g-tabbar { display: none; }
.g-sheet { position: fixed; inset: 0; background: var(--g-veil); display: flex; align-items: flex-end; justify-content: center; z-index: 60; }
.g-sheet[hidden] { display: none; }
.g-sheet-card {
  width: 100%; max-width: 520px; margin: 10px; padding: 8px 16px 18px; border-radius: 28px; display: grid; gap: 10px;
  background: var(--g-glass-solid); border: 1px solid var(--g-stroke); box-shadow: var(--g-shadow);
}
.g-sheet-card.g-tall { max-height: 86vh; overflow-y: auto; align-content: start; }
.g-sheet-card h2 { font-size: 17px; padding: 0 6px; margin: 0; }
.g-grab { width: 40px; height: 5px; border-radius: 5px; background: var(--g-track); justify-self: center; margin: 4px 0 6px; }
.g-sh-h { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--g-ink3); padding: 6px 6px 0; margin: 0; }
.g-sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g-sheet-grid a, .g-sheet-grid button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 10px 6px;
  border-radius: 16px; background: var(--g-glass-hi); border: 1px solid var(--g-hair2); color: var(--g-ink); font: inherit; font-size: 13px; font-weight: 600;
  text-align: center; line-height: 1.25; text-decoration: none; cursor: pointer;
}
.g-sheet-grid .g-ic { width: 22px; height: 22px; color: var(--g-accent); }
.g-sheet-grid .is-on { border-color: var(--g-accent-mid); background: var(--g-accent-soft); }
.g-sh-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 6px; color: var(--g-ink3); }
.g-sh-row .g-theme { flex: 0 1 260px; }
.g-sheet .g-me { padding: 6px; }
.g-sheet-list .g-m-lbl { padding: 8px 10px 0; }
.g-block { display: block; }
.g-block .g-btn { width: 100%; justify-content: center; }

/* ------------------------------------------------------------------ phone */
@media (max-width: 820px) {
  body.page-app, body.g-fin, html[data-nav="collapsed"] body.page-app, html[data-nav="collapsed"] body.g-fin {
    padding: 0 12px calc(100px + env(safe-area-inset-bottom, 0px));
  }
  .g-side, .g-new-wrap, .g-search span, .g-search kbd, .g-lira span { display: none; }
  .g-top { top: 8px; margin-top: 8px; height: 54px; padding: 0 4px 0 10px; border-radius: 18px; gap: 4px; }
  .g-logo-sm { display: grid; width: 28px; height: 28px; padding: 6px; border-radius: 9px; }
  .g-top-title { opacity: 1; transform: none; font-size: 16px; margin-left: 4px; }
  .g-search { width: 44px; height: 44px; justify-content: center; padding: 0; border-color: transparent; background: transparent; color: var(--g-ink2); margin-left: auto; }
  .g-lira { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .g-bell { width: 44px; height: 44px; }
  .g-menu.g-wide { position: fixed; left: 8px; right: 8px; top: 70px; width: auto; }
  .page-app .shell, .g-fin .main { padding-top: 18px; }
  .page-head h1, .greeting h1, .g-page-title { font-size: 28px; }

  /* Speed on phones: solid surfaces instead of live blur behind every card. */
  .card, .card-wide, .panel, .g-fin .card, .tile, .kpi, .attn-card {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--g-card-solid); border-color: var(--g-hair);
    box-shadow: var(--g-shadow-sm); border-radius: 18px;
  }

  .g-tabbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: 68px; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px; border-radius: 26px;
  }
  .g-tabbar a, .g-tabbar button:not(.g-fab) {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px;
    border: 0; background: transparent; color: var(--g-ink3); font: inherit; font-size: 12px; font-weight: 600; border-radius: 16px; text-decoration: none; cursor: pointer;
  }
  .g-tabbar .is-on { color: var(--g-accent); }
  .g-tabbar .g-ic { width: 22px; height: 22px; }
  .g-badge {
    position: absolute; top: 4px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
    background: var(--g-accent); color: var(--g-on-accent); font: 700 11px/18px var(--font); font-style: normal; text-align: center;
  }
  .g-fab {
    width: 52px; height: 52px; border-radius: 18px; border: 0; justify-self: center; display: grid; place-items: center; cursor: pointer;
    color: var(--g-on-accent); background: var(--g-accent); box-shadow: 0 8px 20px var(--g-accent-glow);
  }
  .g-fab .g-ic { width: 24px; height: 24px; }
  html.g-sheet-open .g-tabbar { display: none; }
}

/* ===================================================== Phase 2: one system */

/* Jumping to a section (#receipt, #tab-x) lands below the sticky top bar. */
html { scroll-padding-top: 100px; }

/* Same page width everywhere: lists 1240, forms 860. */
.page-app .shell, .page-app .shell-wide { max-width: 1240px; padding-left: 0; padding-right: 0; }
.page-app .shell-narrow { max-width: 860px; }
.g-fin .main { max-width: 1240px; }

/* Same page header everywhere: small section label, big title, quiet line. */
.page-head, .g-hero { margin-bottom: 22px; }
.page-head .muted, .g-lede { color: var(--g-ink2); font-size: 15px; margin-top: 6px; }
.g-grp-work .page-head h1::before, .g-grp-work .g-hero h1::before { content: "Clients & documents"; }
.g-grp-shop .page-head h1::before, .g-grp-shop .g-hero h1::before { content: "SHOPratik"; }
.g-grp-money .page-head h1::before, .g-grp-money .g-hero h1::before { content: "Money"; }
.g-grp-acct .page-head h1::before, .g-grp-acct .g-hero h1::before { content: "Account"; }
.page-head h1::before, .g-hero h1::before {
  display: block; margin-bottom: 4px; font: 600 13px/1.3 var(--font); letter-spacing: 0; color: var(--g-ink3);
}

/* One popup style: a centred glass card on desktop, a bottom sheet on phones. */
.g-fin .modal-overlay { background: var(--g-veil); align-items: center; padding: 40px 20px; }
.g-fin .modal { border-radius: 24px; padding: 24px 26px; }
.ohq-confirm { background: var(--g-veil); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ohq-confirm-box {
  background: var(--g-glass-solid); border: 1px solid var(--g-stroke); border-radius: 24px; box-shadow: var(--g-shadow);
}
@media (max-width: 820px) {
  html { scroll-padding-top: 80px; }
  .g-fin .modal-overlay, .ohq-confirm { align-items: flex-end; padding: 0; }
  .g-fin .modal, .ohq-confirm-box {
    max-width: none; width: 100%; margin: 0 8px 8px; border-radius: 28px; max-height: 88vh; overflow-y: auto;
    padding: 10px 18px 20px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25);
  }
  .g-fin .modal::before, .ohq-confirm-box::before {
    content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--g-track); margin: 4px auto 14px;
  }
  .g-fin .modal-actions { position: sticky; bottom: -20px; background: var(--g-glass-solid); padding: 12px 0 6px; margin-bottom: -6px; }
  .page-app .shell, .page-app .shell-wide, .page-app .shell-narrow { padding-left: 0; padding-right: 0; }
}

/* Home: two balanced columns (attention + money | latest invoices) */
.g-home-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
.g-col { display: grid; gap: 16px; min-width: 0; }
.g-col > .card { margin: 0; }
@media (max-width: 1100px) { .g-home-cols { grid-template-columns: 1fr; } }

/* Tables: one frame only. Inside a glass card the table has no box of its own;
   the header row sits on a quiet band, rows on hairlines. */
.table-scroll, .table-wrap { border: 0; border-radius: 0; background: transparent; }
.card .table-scroll, .card .table-wrap, .panel .table-wrap, .card-wide .table-scroll { margin: 0 -6px; }
table.data, .g-fin table { background: transparent; }
table.data th, .g-fin th { background: var(--g-mute-bg); color: var(--g-ink3); font-size: 12px; letter-spacing: .05em; border-bottom: 0; }
table.data th:first-child, .g-fin th:first-child { border-radius: 10px 0 0 10px; }
table.data th:last-child, .g-fin th:last-child { border-radius: 0 10px 10px 0; }
table.data td, .g-fin td { border-bottom-color: var(--g-hair2); }
table.data tbody tr:hover td, .g-fin tbody tr:hover td { background: var(--g-glass-hi); }
table.data .mono, .c-num .mono { white-space: nowrap; }
/* Standalone tables (not inside a card) get the glass card themselves */
.shell > .table-scroll, .main > .table-wrap, #pageview > .table-wrap {
  background: var(--g-glass); border: 1px solid var(--g-stroke); border-radius: 22px; box-shadow: var(--g-shadow); padding: 8px 10px;
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
}

/* Invoices: chips, filters and the list live in one glass card (round 04) */
.page-app .main-col {
  background: var(--g-glass); border: 1px solid var(--g-stroke); border-radius: 22px; box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  padding: 18px 20px 12px;
}
@media (max-width: 820px) {
  .page-app .main-col { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--g-card-solid); border-color: var(--g-hair); box-shadow: var(--g-shadow-sm); border-radius: 18px; padding: 14px 12px 8px; }
}

/* Tiles that start something (new proposal, a generator): glass, lift on hover */
.tool-grid { margin-bottom: 16px; }
.tool-card {
  background: var(--g-glass); border: 1px solid var(--g-stroke); border-radius: 22px; box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); color: var(--g-ink);
}
.tool-card:hover { border-color: var(--g-accent-mid); box-shadow: var(--g-shadow), 0 0 0 3px var(--g-accent-soft); }
.tool-card h2 { font-size: 17px; font-weight: 650; }
.tool-card p { color: var(--g-ink2); font-size: 14px; }
@media (max-width: 820px) {
  .tool-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--g-card-solid); border-color: var(--g-hair); box-shadow: var(--g-shadow-sm); border-radius: 18px; }
}

/* Finance tables: dates on one line; row actions behind ⋯ */
.g-fin td.muted:first-child, .g-fin td[data-th="Date"] { white-space: nowrap; }
.g-fin td.actions { white-space: nowrap; }
.g-row-menu { position: relative; display: inline-block; vertical-align: middle; }
.g-row-menu > summary {
  list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; line-height: 1; color: var(--g-ink2); border: 1px solid var(--g-hair); background: var(--g-glass-hi);
}
.g-row-menu > summary::-webkit-details-marker { display: none; }
.g-row-menu > summary:hover, .g-row-menu[open] > summary { border-color: var(--g-accent-mid); color: var(--g-ink); }
.g-row-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; padding: 6px; display: grid; gap: 2px;
  background: var(--g-glass-solid); border: 1px solid var(--g-stroke); border-radius: 14px; box-shadow: var(--g-shadow);
}
.g-row-pop form { margin: 0; }
.g-row-pop .btn, .g-row-pop a.btn {
  display: flex; width: 100%; justify-content: flex-start; border: 0; background: transparent; box-shadow: none;
  min-height: 38px; padding: 0 10px; border-radius: 9px; font-size: 14px; color: var(--g-ink);
}
.g-row-pop .btn:hover { background: var(--g-accent-soft); }
.g-row-pop .btn-danger { color: var(--g-neg); }
.g-row-pop .btn-danger:hover { background: var(--g-neg-bg); }

/* Section strip on long pages (Settings): sticky under the top bar */
.g-section-nav {
  position: sticky; top: 88px; z-index: 15; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 0 16px; padding: 4px; border-radius: 16px;
  background: var(--g-glass-solid); border: 1px solid var(--g-stroke); box-shadow: var(--g-shadow-sm);
}
.g-section-nav::-webkit-scrollbar { display: none; }
.g-section-nav a {
  flex: none; height: 38px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 600; color: var(--g-ink2); text-decoration: none; white-space: nowrap;
}
.g-section-nav a:hover { background: var(--g-accent-soft); color: var(--g-ink); text-decoration: none; }
html:has(.g-section-nav) { scroll-padding-top: 150px; }

/* The add-to-home-screen offer: solid, so the page does not show through */
.pwa-install { background: var(--g-glass-solid) !important; border: 1px solid var(--g-stroke) !important; border-radius: 20px !important; }
@media (max-width: 820px) {
  .pwa-install { bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important; }
  .g-section-nav { top: 70px; margin-left: -4px; margin-right: -4px; }
  html:has(.g-section-nav) { scroll-padding-top: 130px; }

  /* Finance filter bars fold away behind one "Filters" button on a phone */
  .g-filters > summary {
    list-style: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; margin: 0 0 10px;
    border-radius: 12px; border: 1px solid var(--g-hair); background: var(--g-glass-hi); font-weight: 600; font-size: 14px; cursor: pointer;
  }
  .g-filters > summary::-webkit-details-marker { display: none; }
  .g-filters[open] > summary { border-color: var(--g-accent-mid); }
}
@media (min-width: 821px) {
  .g-filters > summary { display: none; }
}

/* ===================================================== Phase 3: features */

/* WhatsApp reminder button */
.g-wa { color: #128c4b !important; border: 1px solid rgba(18, 140, 75, .28) !important; background: rgba(37, 211, 102, .10) !important; gap: 6px; }
.g-wa:hover { background: rgba(37, 211, 102, .18) !important; }
.g-wa .g-ic { width: 16px; height: 16px; }
[data-theme="dark"] .g-wa { color: #6be3a0 !important; }
.g-wa-last { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--g-ink3); }

/* One client */
.g-client-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -8px 0 18px; }
.g-back { font-weight: 600; font-size: 14px; }
.g-client-contact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--g-ink2); font-size: 14px; }
.g-client-contact > span { display: inline-flex; align-items: center; gap: 6px; }
.g-client-contact svg { width: 16px; height: 16px; }
.g-client-stats { margin-bottom: 16px; }
.g-client-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.g-client-cols > .panel, .g-client-cols .g-col > .panel { margin: 0; }
@media (max-width: 1100px) { .g-client-cols { grid-template-columns: 1fr; } }
.g-timeline { list-style: none; margin: 0; padding: 0; }
.g-tl-month { font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--g-ink3); padding: 14px 0 6px; }
.g-tl-month:first-child { padding-top: 0; }
.g-tl-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--g-hair2); }
.g-tl-month + .g-tl-item { border-top: 0; }
.g-tl-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--g-mute-bg); color: var(--g-ink2); }
.g-tl-ico svg { width: 17px; height: 17px; }
.g-tl-item.is-payment .g-tl-ico, .g-tl-item.is-invoice-paid .g-tl-ico, .g-tl-item.is-incident-ok .g-tl-ico { background: var(--g-pos-bg); color: var(--g-pos); }
.g-tl-item.is-late .g-tl-ico { background: var(--g-neg-bg); color: var(--g-neg); }
.g-tl-item.is-invoice .g-tl-ico, .g-tl-item.is-month .g-tl-ico { background: var(--g-info-bg); color: var(--g-info); }
.g-tl-item.is-proposal .g-tl-ico, .g-tl-item.is-doc .g-tl-ico { background: var(--g-accent-soft); color: var(--g-accent); }
.g-tl-body { min-width: 0; color: var(--g-ink); text-decoration: none; }
.g-tl-body:hover { text-decoration: none; }
.g-tl-body:hover strong { color: var(--g-accent); }
.g-tl-body strong { display: block; font-weight: 600; }
.g-tl-body span { display: block; font-size: 13px; color: var(--g-ink3); }
.g-tl-date { font-size: 12px; color: var(--g-ink3); white-space: nowrap; padding-top: 2px; }
.g-open-inv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--g-hair2); }
.g-open-inv:first-of-type { border-top: 0; }
.g-open-amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; display: flex; gap: 8px; align-items: center; }
.g-open-act { grid-column: 1 / -1; }
.g-proj-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--g-hair2); color: var(--g-ink); text-decoration: none; }
.g-proj-row:first-of-type { border-top: 0; }
.g-proj-row > span:first-child { min-width: 0; }
.g-proj-row strong { display: block; }
.g-proj-row:hover { text-decoration: none; }
.g-proj-row:hover strong { color: var(--g-accent); }
.g-hint { margin: 10px 0 0; color: var(--g-ink3); }
.g-notes { margin: 0; color: var(--g-ink2); }

@media (max-width: 820px) { .g-fin .proj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* Bell: tones for the live rows */
.g-fi.is-neg { background: var(--g-neg-bg); } .g-menu .g-fi.is-neg .g-ic { color: var(--g-neg); }
.g-fi.is-info { background: var(--g-info-bg); } .g-menu .g-fi.is-info .g-ic { color: var(--g-info); }

/* "They said yes": how they pay */
.g-plan { border: 0; padding: 0; margin: 0 0 1.05rem; display: grid; gap: 8px; }
.g-plan legend { font-size: 13px; font-weight: 600; color: var(--g-ink2); margin-bottom: 6px; padding: 0; }
.g-plan-opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--g-hair); background: var(--g-glass-hi); cursor: pointer; }
.g-plan-opt:has(input:checked) { border-color: var(--g-accent); box-shadow: 0 0 0 3px var(--g-accent-soft); }
.g-plan-opt input { margin-top: 3px; accent-color: var(--g-accent); }
.g-plan-opt b { display: block; font-weight: 650; }
.g-plan-opt small { display: block; color: var(--g-ink3); font-size: 13px; }

/* Snap a receipt */
.g-rc { display: grid; gap: 12px; }
.g-rc-drop { position: relative; display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border-radius: 18px; border: 2px dashed var(--g-accent-mid); background: var(--g-accent-soft); text-align: center; cursor: pointer; }
.g-rc-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.g-rc-big { font-size: 28px; line-height: 1; }
.g-rc-preview { max-height: 260px; width: auto; max-width: 100%; justify-self: center; border-radius: 12px; border: 1px solid var(--g-hair); }
.g-rc-status { margin: 0; color: var(--g-ink2); }
.g-rc-status.is-bad { color: var(--g-neg); }
.g-rc-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--g-accent-soft); color: var(--g-ink2); }

/* invoice header: status + WhatsApp side by side */
.g-inv-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------- reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
