/* ═══════════════════════════════════════════════════════════════
   DIGITAL WHOLESALE OFFICE — design tokens + shell/component styles
   Augments Tailwind (loaded via CDN in index.html, matching /office/index.html's own token config).

   OWNER DECISION (2026-08-26, overriding the prior dark "warm-espresso" compromise): spec §55
   rules out overly dark interfaces and calls for warm, calm, welcoming, premium — cream/warm-
   neutral, soft elevation, large readable type per §94. This file is a genuinely LIGHT palette,
   not a reskinned dark one. Token names are renamed from /client/v2's convention to make the
   semantics correct rather than confusing: --paper/--paper-2/--paper-3 are the light SURFACES
   (the role --ink/--ink-2/--ink-3 played in v2 — a dark background), and --ink is now the single
   DARK TEXT color (the role text-white opacity utilities like text-white/40 played in v2). ui-kit.js is FORKED
   (not verbatim) specifically so its own hardcoded Tailwind classes point at these — see that
   file's header for the exact class-by-class change list.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ═══ DWO LIQUID GLASS THEMES (this task) ═══════════════════════════════════════════════════
     Semantic tokens defined once here; Tailwind's own ink/gold/paper/paper2/paper3/danger
     utilities point at the *-rgb triples below too (index.html's tailwind.config uses the
     rgb(var(..)/<alpha-value>) form), so an opacity-suffixed utility like text-ink/70 tracks the
     active theme, not just a bare `ink` class.

     POLARITY: cream (the literal values right below, :root's default) is LIGHT — dark ink on a
     light paper surface, glass read as a near-opaque warm-white gradient because a light
     background gives translucent white nothing to glow against ("on cream, shadow and border do
     the work"). Burgundy/Executive Blue/Emerald (the .app-shell[data-dwo-theme="..."] blocks near
     the end of this file) are DARK — white ink on a near-black paper, glass read via translucent-
     white-over-glow. --card-bg-solid/--glass-bg etc. (declared per theme, further down) are the
     two different SURFACE RECIPES this implies, not one recipe re-hued four times.

     SCOPE (DWO Themes Pass 2 — widened): the dark overrides apply under .app-shell[data-dwo-theme]
     — app.js's Shell now stamps that attribute for every route, not just My Office ("#/"). Pass 1
     scoped this to My Office only because the rest of /office (Deal Lab, Company, Contract Room,
     ...) still carried ~40+ hardcoded rgba(43,33,24,...) rules it hadn't touched or verified, and a
     global flip would have silently inverted their contrast. Pass 2's job was exactly that
     conversion — every page-class rule in this file (and the inline styles in each page's own .js)
     now resolves through the same tokens My Office already used — so the shell-wide stamp is safe.
     See the task report (DWO Themes Pass 2) for the full hardcoded-color inventory and reasoning. */
  --paper-rgb: 250 243 231;   /* #FAF3E7 */
  --paper2-rgb: 244 234 217;  /* #F4EAD9 */
  --paper3-rgb: 236 220 195;  /* #ECDCC3 */
  --ink-rgb: 43 33 24;        /* #2B2118 */
  --gold-rgb: 185 129 46;     /* #B9812E — deepened vs. the dark-theme gold so it holds contrast on cream */
  --danger-rgb: 163 68 40;    /* #A34428 */
  /* Fixed across all 4 themes, NOT theme-varying: text/icons on a SOLID --gold fill (.bg-gold).
     Both gold values (#B9812E cream, #D6A83E dark) are mid-to-bright, so only a fixed dark
     neutral reads on all of them — measured 5.45:1 (cream gold) / 8.33:1 (dark gold), both AA.
     .bg-gold previously used var(--paper) as its text color, which happened to work on cream
     (3.05:1 — actually below AA-normal, a pre-existing gap this fixes) only because paper was
     coincidentally light; the same rule would have put WHITE text on gold once paper flips to
     near-black for a dark theme (2.20:1 — the exact "gold on near-black is a glowing accent, gold
     on cream is a mid-tone" polarity trap the task brief warned about). */
  --on-gold: #1A1310;
  --paper: rgb(var(--paper-rgb));
  --paper-2: rgb(var(--paper2-rgb));
  --paper-3: rgb(var(--paper3-rgb));
  --ink: rgb(var(--ink-rgb));
  --gold: rgb(var(--gold-rgb));
  --gold-soft: rgb(var(--gold-rgb) / 0.12);
  --gold-edge: rgb(var(--gold-rgb) / 0.34);
  --danger: rgb(var(--danger-rgb));
  --line: rgb(var(--ink-rgb) / 0.10);
  --line-2: rgb(var(--ink-rgb) / 0.16);
  /* Muted text, measured not assumed (see the task report's contrast table): the alpha a class
     multiplies onto --ink-rgb has to clear AA on ITS OWN, in both polarities, since a single
     Tailwind utility like text-ink/70 can't carry two different numbers for two themes. 0.70
     clears cream's 4.5:1 floor (needs >=0.64 of dark ink on #FAF3E7) AND dark's (needs >=0.49 of
     white on the darkest theme base) with margin for the glow-tinted areas contrast can't be
     hand-verified against. 0.55 is the same story for the 3:1 (large text / UI component) floor.
     Was: scattered hardcoded rgba(43,33,24, 0.40-0.50) per class — measured 2.70:1 on cream,
     below AA. Fixed here for every class this task's scope touches (My Office, header, bottom
     nav, and the shared EmptyState/Badge/Skeleton/Tag primitives they render) — NOT retrofitted
     across the rest of /office's own hardcoded instances, out of this pass's scope. */
  --text-secondary-alpha: 0.70;
  --text-tertiary-alpha: 0.55;
  --text-secondary: rgb(var(--ink-rgb) / var(--text-secondary-alpha));
  --text-tertiary: rgb(var(--ink-rgb) / var(--text-tertiary-alpha));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* DWO PAGE TOKENIZATION (this task) — -rgb triples for the three status colors, mirroring the
     --gold-rgb/--danger-rgb pattern above, so a border/background tint anywhere in /office can
     compose rgb(var(--x-rgb) / alpha) instead of re-typing the literal RGB numbers (badge-success/
     warning/info/danger and the status-dot glow, below, were doing exactly that before this task).
     These three are NOT theme-varying (no override in the .app-shell[data-dwo-theme] blocks) —
     only --danger-rgb is, per the existing per-theme blocks — so this is a DRY fix, not a polarity
     fix, for success/warning/info; it IS a real polarity fix for anything already keying off
     --danger-rgb's literal cream numbers (badge-danger, closing.js's risk border), since dark themes
     override --danger-rgb and a hardcoded rgba(163,68,40,...) never saw that override. */
  --success-rgb: 76 139 91;   /* #4C8B5B */
  --warning-rgb: 181 121 31;  /* #B5791F */
  --info-rgb: 62 111 160;     /* #3E6FA0 */
  --success: rgb(var(--success-rgb));
  --warning: rgb(var(--warning-rgb));
  --info: rgb(var(--info-rgb));
  /* PREMIUM FACELIFT PHASE A (owner brief, dwo-facelift-reference.png) — two agent-accent hues
     added alongside the existing --info (Sophia) / --success (Aurelia): the reference gives each
     of the 4 agent cards its own icon color, and only 2 of the 4 already had a token to reuse. */
  --accent-violet: #7C6FD9;  /* Rubi */
  --accent-indigo: #5B6FD0;  /* Lex */

  --text-2xs: 9px;  --text-xs: 10px; --text-sm: 11px; --text-base: 12px;
  --text-md: 13px;  --text-lg: 15px; --text-xl: 18px; --text-2xl: 22px;
  --text-3xl: 27px; --text-4xl: 30px;

  --space-1: 4px; --space-2: 6px; --space-3: 8px; --space-4: 10px;
  --space-5: 12px; --space-6: 14px; --space-7: 16px; --space-8: 18px;
  --space-9: 20px; --space-10: 24px;

  --radius-sm: 8px; --radius-md: 10px; --radius-lg: 14px;
  --radius-xl: 16px; --radius-2xl: 20px; --radius-pill: 999px;

  /* soft, low-contrast elevation — dark theme's glow-style shadows are gone; a warm, faint drop */
  --elevation-1: 0 1px 2px rgba(43,33,24,0.04), 0 10px 26px rgba(43,33,24,0.07);
  --elevation-modal: 0 24px 56px -16px rgba(43,33,24,0.22), 0 0 0 1px var(--line-2);

  --duration-fast: 150ms; --duration-base: 220ms; --duration-slow: 380ms;
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* LIQUID GLASS (Phase B task) — warm glass tokens layered over the textured body background below.
     Kept deliberately high-alpha (0.42-0.66, not the 0.1-0.2 typical of cold glassmorphism) so text
     contrast over the blur stays close to the opaque card it replaces; see the CSS block near the
     bottom of this file for where these apply and why the list of surfaces is bounded. */
  /* PERF-TUNED (Phase B task, measured): started at 20px blur + saturate(150%), which
     cost ~8.5ms of extra frame time and 6x the dropped-frame count during a scripted scroll of
     Closing's ClosingWorkspace (15 stacked .card regions, the real worst case) at 390x844.
     saturate() turned out to be the expensive part, not the blur radius — dropping it and cutting
     blur to 10px brought scroll cost to within ~2.5ms of the no-glass baseline while still reading
     as glass (see the two comparison screenshots in the report). */
  --glass-blur: 10px;
  /* No --glass-saturate token: a custom property can't cleanly toggle "no saturate() at all" vs.
     "saturate(130%)" inside one shared backdrop-filter declaration (an empty/initial substitution
     invalidates the whole filter list). The dark theme blocks instead override the
     backdrop-filter/-webkit-backdrop-filter declarations directly for the same selectors — see the
     task report's perf table for why dark keeps saturate() (measured acceptable there) while
     cream still doesn't (measured too expensive here, Phase B). */
  --glass-tint-1: rgba(255,255,255,0.66);
  --glass-tint-2: rgba(250,240,222,0.46);
  --glass-tint-3: rgba(236,220,195,0.38);
  --glass-border: rgba(255,255,255,0.55);
  --glass-highlight: rgba(255,255,255,0.8);

  /* DWO LIQUID GLASS THEMES (this task) — the two surface RECIPES the polarity split needs.
     --card-* is the non-blur / prefers-reduced-transparency fallback every surface already falls
     back to; --glass-* (further built on top of these where backdrop-filter is supported) is
     unchanged cream (identical values to --glass-tint-1/2/3/border/highlight above, just renamed
     to the surface-recipe vocabulary the theme blocks below also use, so LiquidSurface has ONE set
     of variable names across all 4 themes). Cream's numbers are literally the ones already shipped
     (Phase B, measured) — this task only re-homes them under theme-aware names, it does not
     re-tune cream. */
  --card-bg-solid: linear-gradient(180deg, #FFFFFF, var(--paper-2));
  --card-border: var(--line);
  --card-shadow: var(--elevation-1);
  --glass-bg: linear-gradient(160deg, var(--glass-tint-1), var(--glass-tint-2) 55%, var(--glass-tint-3));
  --glass-border-color: var(--glass-border);
  --glass-inset-shadow: inset 0 1px 0 var(--glass-highlight), inset 0 0 0 1px rgba(185,129,46,0.05);
}

html { overflow-x: hidden; max-width: 100vw; }
html, body {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
#root { overflow-x: hidden; max-width: 100vw; }
body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  overscroll-behavior-y: none;
  /* faint warm glow instead of a literal property photo — spec §55 forbids cartoon office
     imagery / gimmicky visuals; this is texture, not imagery.
     LIQUID GLASS (this task) — a glass card needs something behind it to blur; on flat --paper the
     backdrop-filter below is a no-op. Extended from Phase A's original two top-corner blobs to four,
     spread across the viewport (fixed, so they read the same regardless of scroll position or which
     page is mounted) so every card on every page — not just the ones near the top of My Office —
     sits over real texture. Overwhelmingly gold/amber (the brief: "warm glass, not cold blue-grey");
     one small --accent-violet blob (already the Rubi agent-accent token, not a new hue) at the
     bottom edge gives the blur some color variety without tipping the palette cold. */
  background:
    radial-gradient(120% 60% at 15% -10%, rgba(185,129,46,0.09), transparent 60%),
    radial-gradient(90% 50% at 100% 0%, rgba(185,129,46,0.06), transparent 55%),
    radial-gradient(70% 50% at 6% 68%, rgba(185,129,46,0.07), transparent 62%),
    radial-gradient(55% 45% at 96% 92%, rgba(124,111,217,0.05), transparent 60%),
    var(--paper);
  background-attachment: fixed;
}

h1, h2, h3, .font-heading { font-family: 'Fraunces', 'Georgia', serif; letter-spacing: -0.01em; font-optical-sizing: auto; }
h1 { font-weight: 600; } h2 { font-weight: 600; } h3 { font-weight: 500; }

/* ─── Cards / panels ───────────────────────────────────────────── */
/* This is also the LIQUID GLASS fallback: a browser with no backdrop-filter support, and a viewer
   with prefers-reduced-transparency, both render exactly this — the solid gradient card Phase A/B
   already shipped and the owner approved. The glass enhancement is layered on top of it further
   down this file, never a replacement for it. */
.card, .panel {
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  transition: border-color var(--duration-base), background var(--duration-base);
}
.card:hover, .panel:hover { border-color: var(--line-2); }

.text-gold { color: var(--gold); }
.bg-gold { background: var(--gold); color: var(--on-gold); }
.border-gold { border-color: var(--gold); }

/* DWO LIQUID GLASS THEMES (this task) — see the :root comment on --text-secondary-alpha for why
   these exist instead of relying on Tailwind's text-ink/NN opacity utilities for muted text. */
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.gold-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid var(--gold-edge);
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
}

/* ─── App shell ────────────────────────────────────────────────── */
/* DWO LIQUID GLASS THEMES (this task) — the shell owns the page-level "deep near-black foundation"
   itself (not <body>, which sits outside React's tree and can't be scoped to the My-Office-only
   attribute below without a :has() ancestor selector this task chose not to depend on). On cream
   this is a same-color no-op layered over body's own background. transition here is what makes a
   theme switch crossfade per spec (180-250ms) instead of snapping; prefers-reduced-motion turns it
   off in the media query at the bottom of this file, matching every other themed surface. */
/* DWO PAGE TOKENIZATION (this task) — `color: var(--ink)` added here, discovered by rendering (not
   grep): `body { color: var(--ink) }` resolves ONCE at body, using :root's cream --ink, since the
   dark-theme --ink override lives on .app-shell — a DESCENDANT of body, not an ancestor. Any element
   inside .app-shell that never sets its own `color` (plain inheritance, not an explicit `color:
   var(--ink)` or a Tailwind text-ink/NN class re-declaring it per-element) was inheriting that
   frozen cream-dark value straight through a dark theme — e.g. .dwo-repair-item, which sets no
   color of its own. Redeclaring color here means the nearest ancestor with an explicit color
   declaration for anything inside .app-shell is THIS element, which re-resolves --ink correctly per
   theme — same "redeclare on .app-shell" fix already used for --paper/--gold/etc., applied to the
   inherited `color` property itself rather than a custom property. */
.app-shell { min-height: 100dvh; background: var(--paper); color: var(--ink); transition: background var(--duration-base) var(--ease-standard); }

.office-sidebar { height: calc(100vh - 64px); height: calc(100dvh - 64px); }

/* PREMIUM FACELIFT PHASE A — sidebar wordmark (reference's top-left logo lockup). Icon-in-a-badge
   + a stacked serif wordmark, matching the reference's proportions without a generated image. */
.office-sidebar-logo { display: flex; align-items: flex-start; gap: 10px; padding: 2px 12px 22px; }
.office-sidebar-logo-badge {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold-soft), transparent 70%);
  border: 1px solid var(--gold-edge); color: var(--gold);
}
.office-sidebar-logo-text {
  font-family: 'Fraunces', 'Georgia', serif; font-weight: 600; font-size: 14.5px;
  line-height: 1.22; color: var(--ink); letter-spacing: -0.01em; padding-top: 2px;
}

.office-nav-link {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: var(--radius-lg);
  color: var(--text-secondary); font-weight: 500; font-size: 13.5px;
  letter-spacing: 0.01em; cursor: pointer; user-select: none;
  transition: background var(--duration-fast), color var(--duration-fast);
}
.office-nav-link svg { flex: 0 0 auto; opacity: 0.75; transition: opacity var(--duration-fast); }
.office-nav-link:hover { background: rgb(var(--ink-rgb) / 0.04); color: var(--ink); }
.office-nav-link:hover svg { opacity: 1; }
.office-nav-link.active {
  background: var(--card-bg-solid);
  color: var(--gold); box-shadow: var(--card-shadow);
}
.office-nav-link.active svg { opacity: 1; }
/* Gold active marker — an absolutely-positioned bar rather than a border+padding swap, so the row
   never reflows when the active state moves (spec's "gold active-marker," reference's left rail). */
.office-nav-link.active::before {
  content: ''; position: absolute; left: -9px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 3px; background: var(--gold);
}

.office-topbar {
  height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border-bottom: 1px solid var(--line);
  background: rgb(var(--paper-rgb) / 0.88); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40;
  transition: background var(--duration-base) var(--ease-standard);
}

/* Rendered ONLY in `mobile` mode (useNavMode() in ui-kit.js — same 1000/1048 hysteresis /client/v2
   uses), so a fixed 5-column grid is correct here: there is no in-between width where more than 5
   items need to fit. See app.js's BottomNav/MOBILE_TAB_IDS. */
.office-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgb(var(--paper-rgb) / 0.96); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + var(--safe-bottom));
  transition: background var(--duration-base) var(--ease-standard);
}
/* Minimum 44px touch target (spec's interaction rules) — the visible pill is smaller, but the
   tappable row (grid column x this min-height) always clears 44px regardless of icon/label size. */
.office-bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 6px; border: none; background: none; font-family: inherit;
  color: var(--text-secondary); font-size: 10px; font-weight: 500;
  border-radius: 8px; cursor: pointer; user-select: none; white-space: nowrap;
  text-decoration: none; min-height: 44px;
}
.office-bottom-nav-item.active { color: var(--gold); }
.office-bottom-nav-item:focus-visible, .office-nav-link:focus-visible, .office-signout-btn:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Sign out (Settings — Account). Semantic --danger tokens, not a hardcoded color, so this reads
   correctly across all 4 themes/2 polarities instead of the cream-only literal that would be
   invisible on cream or dark-on-dark on burgundy/executive_blue/emerald. 44px min-height for the
   same touch-target reason as .office-bottom-nav-item above. */
.office-signout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: var(--danger); background: rgb(var(--danger-rgb) / 0.08);
  border: 1px solid rgb(var(--danger-rgb) / 0.24);
  cursor: pointer; transition: background var(--duration-base) var(--ease-standard);
}
.office-signout-btn:hover:not(:disabled) { background: rgb(var(--danger-rgb) / 0.16); }
.office-signout-btn:disabled { opacity: 0.6; cursor: default; }

/* Collateral gated on the latched mode class (Shell stamps office-mobile/office-desktop on the
   shell root from the SAME useNavMode() value the nav swap uses) so main's bottom padding moves in
   lockstep with the bottom-nav appearing, instead of a raw width breakpoint drifting out of sync. */
.office-mobile main { padding-bottom: calc(84px + var(--safe-bottom)); }

.status-dot {
  position: relative;
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px rgb(var(--success-rgb) / 0.4); margin-right: 6px;
}
.status-dot.offline { background: rgb(var(--ink-rgb) / 0.24); box-shadow: none; }

/* Presence pulse (PREMIUM FACELIFT PHASE A "add active, live effects if you must" — restrained: a
   slow, soft ring expanding off the existing Active dot, nothing that spins or bounces). Off for
   an offline agent (no live process to represent) and for prefers-reduced-motion. */
.status-dot.pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--success); opacity: 0.4; animation: dot-pulse 2.4s ease-out infinite;
}
@keyframes dot-pulse { 0% { transform: scale(0.6); opacity: 0.45; } 100% { transform: scale(2.4); opacity: 0; } }

/* ─── Animations ───────────────────────────────────────────────── */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fade-up 0.5s var(--ease-standard) both; }

@keyframes skeleton-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .office-activity-row { animation: none !important; opacity: 1 !important; transform: none !important; }
  .office-progress-fill { transition: none !important; }
  .status-dot.pulse::after { animation: none !important; display: none !important; }
}

/* ─── Scrollbar ────────────────────────────────────────────────── */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgb(var(--ink-rgb) / 0.12); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: rgb(var(--ink-rgb) / 0.20); }

/* ─── ui-kit.js primitives (class names it references verbatim) ──────────────── */
.topnav-search {
  background: var(--card-bg-solid); border: 1px solid var(--line); border-radius: var(--radius-md);
  color: var(--ink); padding: 8px 14px; font-size: 13px; width: 100%; outline: none;
  transition: border-color var(--duration-fast);
}
.topnav-search:focus { border-color: var(--gold-edge); }
.topnav-search::placeholder { color: var(--text-tertiary); }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-9) var(--space-5); }
.empty-state-icon { width: 48px; height: 48px; border-radius: var(--radius-2xl); display: flex; align-items: center; justify-content: center; background: var(--gold-soft); border: 1px solid var(--gold-edge); color: var(--gold); margin-bottom: var(--space-2); font-size: 20px; }
.empty-state-title { font-family: 'Outfit', sans-serif; font-size: var(--text-lg); font-weight: 600; color: var(--ink); }
.empty-state-body { font-size: var(--text-md); color: var(--text-secondary); max-width: 42ch; line-height: 1.6; margin-top: 4px; }
.empty-state-action { margin-top: var(--space-5); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500; letter-spacing: 0.02em; border: 1px solid var(--line-2); background: rgb(var(--ink-rgb) / 0.04); color: var(--text-secondary); white-space: nowrap; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-gold { border-color: var(--gold-edge); background: var(--gold-soft); color: var(--gold); }
.badge-success { border-color: rgb(var(--success-rgb) / 0.30); background: rgb(var(--success-rgb) / 0.10); color: var(--success); }
.badge-warning { border-color: rgb(var(--warning-rgb) / 0.30); background: rgb(var(--warning-rgb) / 0.10); color: var(--warning); }
.badge-danger { border-color: rgb(var(--danger-rgb) / 0.30); background: rgb(var(--danger-rgb) / 0.10); color: var(--danger); }
.badge-info { border-color: rgb(var(--info-rgb) / 0.30); background: rgb(var(--info-rgb) / 0.10); color: var(--info); }

.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: var(--text-sm); background: rgb(var(--ink-rgb) / 0.04); border: 1px solid var(--line-2); color: var(--text-secondary); }

.skeleton-line { height: 12px; border-radius: var(--radius-sm); margin-bottom: 8px; position: relative; overflow: hidden; background: var(--paper-3); }
.skeleton-line:last-child { margin-bottom: 0; width: 60%; }
.skeleton-line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent); animation: skeleton-sweep 1.6s ease-in-out infinite; }

.overlay-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(20,15,10,0.45); backdrop-filter: blur(2px); display: flex; animation: fade-up var(--duration-slow) var(--ease-standard) both; }
.modal-surface { margin: auto; max-width: 480px; width: calc(100% - 32px); max-height: 85vh; overflow-y: auto; padding: var(--space-6); border-radius: var(--radius-2xl); border: 1px solid var(--line-2); background: var(--card-bg-solid); box-shadow: var(--elevation-modal); }
.drawer-surface { margin-left: auto; height: 100%; width: min(420px, 100%); overflow-y: auto; padding: var(--space-6); border-left: 1px solid var(--line-2); background: var(--card-bg-solid); box-shadow: -8px 0 32px rgba(43,33,24,0.14); }

.record-sheet-footer { position: sticky; bottom: -24px; background: linear-gradient(180deg, transparent, var(--paper-2) 30%); padding-top: 12px; margin-top: 12px !important; }

.timeline-row { display: flex; gap: var(--space-3); position: relative; padding-bottom: var(--space-5); }
.timeline-row:last-child { padding-bottom: 0; }
.timeline-row::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline-row:last-child::before { display: none; }
.timeline-icon { width: 26px; height: 26px; flex: 0 0 auto; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; background: var(--gold-soft); border: 1px solid var(--gold-edge); color: var(--gold); }
.timeline-title { font-size: var(--text-md); color: var(--ink); }
.timeline-meta { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 2px; }

.toolbar-filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.filter-chip { padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--card-bg-solid); font-size: var(--text-sm); color: var(--text-tertiary); cursor: pointer; transition: border-color var(--duration-fast), color var(--duration-fast), background var(--duration-fast); }
.filter-chip:hover { color: var(--ink); border-color: var(--gold-edge); }
.filter-chip.active { color: var(--gold); border-color: var(--gold-edge); background: var(--gold-soft); }

/* Sophia/Lex office tab strip (nine and ten tabs) — desktop keeps .toolbar-filters' own wrap
   untouched; below the mobile breakpoint it becomes one horizontally-scrolling row instead of
   wrapping onto two or three rows and eating a third of the viewport before any content. The
   mask-image fade on both edges is the same "there's more" affordance already used for horizontal
   overflow elsewhere in this office (see .office-agent-scroll above) — it reads as scrollable
   rather than visually cut off, with no JS required to track scroll position. */
@media (max-width: 640px) {
  .office-tab-strip {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin: 0 -16px; padding: 0 16px;
    mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  }
  .office-tab-strip::-webkit-scrollbar { display: none; }
  .office-tab-strip .filter-chip { flex: 0 0 auto; white-space: nowrap; }
}

.usage-meter { }

.coming-soon-card { padding: var(--space-10) var(--space-6); border-radius: var(--radius-2xl); border: 1px dashed var(--line-2); background: var(--paper-2); text-align: center; }

/* ─── Office-specific home-screen layout (not from ui-kit.js) ─────────────────── */

/* PREMIUM FACELIFT PHASE A — greeting hero card (reference's cream panel with a decorative
   line-art skyline). The SVG itself is rendered by the component (a real inline <svg>, per the
   CLAUDE.md brief — "never a stock image"); this just clips/positions it. */
.office-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-2xl); border: 1px solid var(--hero-border, var(--line));
  background: var(--hero-bg, linear-gradient(120deg, #FFFFFF 0%, var(--paper-2) 62%, var(--paper-3) 100%));
  padding: 26px 26px 22px;
  transition: background var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard);
}
.office-hero-decor { position: absolute; top: 0; right: 0; height: 100%; width: 46%; max-width: 340px; opacity: 0.55; pointer-events: none; }
.office-hero-content { position: relative; max-width: 62%; }

.office-greeting-eyebrow { font-size: var(--text-sm); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.office-greeting-title { font-family: 'Fraunces', 'Georgia', serif; font-size: 32px; font-weight: 600; letter-spacing: -0.015em; margin-top: 6px; color: var(--ink); }
.office-snapshot-line { font-size: 13.5px; color: var(--text-secondary); margin-top: 10px; }
.office-snapshot-line b { color: var(--ink); font-weight: 600; }

/* Summary strip — a row of stat pills, ONE style now shared by mobile and desktop (Phase 2 had a
   mobile-only carousel + a desktop sentence; the reference uses the pill treatment at every width,
   so this consolidates the two). Wraps rather than scrolls — at most 4 short pills (see
   components.js), so a second line reads better than a hero card that implies horizontal scroll. */
.office-summary-strip {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.office-summary-pill {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto; scroll-snap-align: start;
  padding: 8px 14px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--pill-bg, rgba(255,255,255,0.72)); border: 1px solid var(--line); font-size: 12.5px; color: var(--text-secondary);
}
.office-summary-pill b { color: var(--ink); font-weight: 600; font-family: 'Space Grotesk', sans-serif; }

.office-section-title { font-family: 'Fraunces', 'Georgia', serif; font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.office-section-sub { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }

/* Two-column home layout (reference's main column + right-hand "Your Office Team" rail). Collapses
   to one column below 1180px viewport width — independent of the sidebar<->bottom-nav swap
   (useNavMode's 1000/1048 latch), which happens later, so there's a stretch of desktop-sidebar
   widths where the team rail sensibly drops below the main column instead of being squeezed. */
.office-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .office-home-grid { grid-template-columns: minmax(0, 1fr); } }

.office-ai-row { display: flex; gap: 12px; flex-wrap: wrap; }
.office-ai-tile {
  flex: 1 1 200px; min-width: 200px; padding: 16px 18px;
  border-radius: var(--radius-lg); border: 1px solid var(--card-border);
  background: var(--card-bg-solid);
  text-decoration: none; display: block; transition: border-color var(--duration-base), transform var(--duration-base);
}
.office-ai-tile:hover { border-color: var(--gold-edge); transform: translateY(-1px); }
.office-ai-tile-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 6px; }
.office-ai-tile-value { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink); }
.office-ai-tile-caption { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Mobile "Your Office Team" carousel (DWO mobile facelift, kept) — a horizontal snap-scroll of
   wider cards (each ~78% of the viewport). Unchanged by this task except border/shadow polish. */
.office-agent-scroll {
  display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x mandatory;
}
.office-agent-card {
  display: flex; align-items: center; gap: 12px; flex: 0 0 78%; scroll-snap-align: start;
  padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid var(--card-border);
  background: var(--card-bg-solid);
  text-decoration: none; transition: border-color var(--duration-base);
}
.office-agent-card:active { border-color: var(--gold-edge); }
.office-agent-avatar {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  border: 2px solid var(--gold-edge);
}
/* Honest-failure monogram — same box as .office-agent-avatar, shown instead of the <img> the
   moment it 404s/errors, never a blank gap or the browser's broken-image icon (see AgentAvatar,
   ui-kit.js). Token-only (--gold-soft/--gold-edge/--gold) so it reads correctly in all 4 themes. */
.office-agent-avatar-fallback {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--gold-edge); background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px;
}

/* Desktop right-rail agent panel (PREMIUM FACELIFT PHASE A — reference's "Your Office Team" column).
   Each card: a small accent-colored icon badge, the agent's real portrait, name, up to two real
   stat lines, and a live "Active" indicator (pulse defined below, under Animations). */
.office-agent-panel { display: flex; flex-direction: column; gap: 10px; }
.office-agent-panel-title { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.office-agent-panel-card {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px; text-decoration: none;
  border-radius: var(--radius-lg); border: 1px solid var(--card-border);
  background: var(--card-bg-solid);
  transition: border-color var(--duration-base), transform var(--duration-base), box-shadow var(--duration-base);
}
.office-agent-panel-card:hover { border-color: var(--gold-edge); transform: translateY(-1px); box-shadow: var(--card-shadow); }
.office-agent-panel-icon { width: 28px; height: 28px; border-radius: 8px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.office-agent-panel-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 2px solid var(--gold-edge); }
/* Same honest-failure monogram as .office-agent-avatar-fallback above, sized to match this card's
   44px portrait instead of the mobile carousel's 48px. */
.office-agent-panel-avatar-fallback {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--gold-edge); background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 16px;
}
.office-agent-panel-body { min-width: 0; flex: 1; }
.office-agent-panel-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.office-agent-panel-stat { font-size: 12px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }
.office-agent-panel-stat b { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--ink); margin-right: 4px; }
.office-agent-panel-status {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary);
}

.office-work-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.office-work-row:last-child { border-bottom: none; }
.office-work-title { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.office-work-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.office-row-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); border: 1px solid var(--gold-edge); color: var(--gold);
}
.office-row-icon.is-neutral { background: var(--paper-3); border-color: var(--line-2); color: var(--text-secondary); }

/* Deal Flow pipeline strip (PREMIUM FACELIFT PHASE A) — real acquisitions stage counts, same
   vocabulary as Acquisitions' own STAGES (acquisitions.js), just condensed to the 6 pre-close
   stages so it reads as a funnel rather than a wall of numbers (spec §17). */
.office-pipeline { display: flex; border-radius: var(--radius-lg); border: 1px solid var(--card-border); background: var(--card-bg-solid); overflow-x: auto; }
.office-pipeline-stage { flex: 1 1 0; min-width: 108px; padding: 14px 16px; border-right: 1px solid var(--line); }
.office-pipeline-stage:last-child { border-right: none; }
.office-pipeline-stage-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); margin-bottom: 6px; display: flex; align-items: center; white-space: nowrap; }
.office-pipeline-stage-label::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-edge); margin-right: 6px; flex: 0 0 auto; }
.office-pipeline-stage-value { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; color: var(--ink); }

/* Closing Desk progress bar — animates to its real value on mount (see Animations below);
   readiness % is derived from actual per-category risk facts (dwo-closing.js's computeClosingRisk),
   never invented — see components.js's closingReadinessPct for the exact derivation. */
.office-progress-track { height: 6px; border-radius: 4px; background: var(--paper-3); overflow: hidden; margin-top: 8px; max-width: 260px; }
/* #D9A452 (DWO PAGE TOKENIZATION review, this task): a second, lighter gold gradient stop with no
   per-theme equivalent token. Decorative only (a progress-bar shimmer, not text/border), reads as
   warm amber-gold on all 4 paper colors — left literal rather than inventing a single-use
   --gold-bright token; flagged here if the owner wants it tuned per theme later. */
.office-progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), #D9A452); width: 0%; transition: width 900ms var(--ease-standard); }

/* Office Activity feed rows fade in with a slight stagger on mount (live-effect, restrained). */
.office-activity-row { animation: fade-up 0.45s var(--ease-standard) both; }
.office-activity-row:nth-child(1) { animation-delay: 0ms; }
.office-activity-row:nth-child(2) { animation-delay: 45ms; }
.office-activity-row:nth-child(3) { animation-delay: 90ms; }
.office-activity-row:nth-child(4) { animation-delay: 135ms; }
.office-activity-row:nth-child(5) { animation-delay: 180ms; }

/* ─── Nav-shell "coming later" section pages ───────────────────────────────── */
.office-page-header { margin-bottom: 20px; }
.office-page-title { font-family: 'Fraunces', serif; font-size: 23px; font-weight: 600; color: var(--ink); }
.office-page-sub { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
/* Agent-office header variant (Sophia/Lex) — a portrait next to the name/role so the page reads as
   a person, not a bare screen. Modifier only: plain .office-page-header (every non-agent page —
   Buyers, Closing, Settings, etc.) is untouched. Smaller on phones — see media query below — so we
   never ship the same box a full-resolution portrait would need on desktop into a cramped mobile
   header. */
.office-page-header--with-avatar { display: flex; align-items: center; gap: 14px; }
.office-page-avatar, .office-page-avatar-fallback {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--gold-edge);
}
.office-page-avatar { object-fit: cover; }
.office-page-avatar-fallback {
  background: var(--gold-soft); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-weight: 600; font-size: 22px;
}
@media (max-width: 640px) {
  .office-page-avatar, .office-page-avatar-fallback { width: 44px; height: 44px; }
  .office-page-avatar-fallback { font-size: 18px; }
}

/* ─── Not-entitled / boot states ────────────────────────────────────────────── */
.office-boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }

@media (max-width: 640px) {
  .office-hero-content { max-width: 100%; }
  .office-hero-decor { opacity: 0.28; width: 58%; }
  .office-greeting-title { font-size: 25px; }
}

/* ─── DWO Phase 3 — Acquisitions list rows (Seller CRM, Lead Inbox, Follow-Ups, Appointments) ── */
.dwo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px; border-radius: var(--radius-md); cursor: pointer; transition: background var(--duration-fast); }
.dwo-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.dwo-row:hover { background: rgb(var(--ink-rgb) / 0.03); }
.dwo-row-title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.dwo-row-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ─── DWO Phase 4 — Deal Lab (Rehab Estimator, Deal Formula Builder, Scenario Comparison, Files) ─ */
.dwo-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.dwo-quick-tile {
  padding: 14px 12px; border-radius: var(--radius-lg); border: 1px solid var(--line-2);
  background: var(--card-bg-solid); text-align: left; cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}
.dwo-quick-tile:hover { border-color: var(--gold-edge); }
.dwo-quick-tile.active { border-color: var(--gold-edge); background: var(--gold-soft); }
.dwo-quick-tile-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.dwo-quick-tile-value { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.dwo-repair-category { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin: 16px 0 6px; }
.dwo-repair-category:first-child { margin-top: 0; }
.dwo-repair-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.dwo-repair-item:last-child { border-bottom: none; }

.dwo-result-panel { border-radius: var(--radius-lg); border: 1px solid var(--gold-edge); background: var(--gold-soft); padding: 16px; }
.dwo-result-value { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 700; color: var(--ink); }
.dwo-result-breakdown { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; font-family: Menlo, 'SFMono-Regular', monospace; }

.dwo-scenario-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dwo-scenario-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary); padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.dwo-scenario-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink); }

.dwo-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.dwo-file-tile { border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--card-bg-solid); overflow: hidden; cursor: pointer; }
.dwo-file-tile img { width: 100%; height: 90px; object-fit: cover; display: block; }
.dwo-file-tile-icon { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: var(--paper-2); }
.dwo-file-tile-name { font-size: 10.5px; color: var(--text-secondary); padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── PREMIUM FACELIFT PHASE B — every tab but My Office ──────────────────────────────────────── */

/* Data tables (Performance's SimpleTable, Company's team/vendor tables, Growth's funnel tables) —
   the same warm-cream/gold vocabulary as .dwo-scenario-table (Deal Lab, Phase A-adjacent), just
   named generically since it's now reused well beyond Deal Lab's scenario comparison. Numerals in
   Space Grotesk with tabular-nums so a column of dollar amounts / counts lines up vertically —
   "legible density, not sparse whitespace" per the brief. Deliberately NOT collapsed into stacked
   cards at mobile widths: these are genuinely tabular (multi-column comparisons), so the chosen
   mobile shape is horizontal scroll inside the existing .card wrapper's overflow-x — never a
   squeezed fixed-width table — same call already made for .dwo-scenario-table above.  */
.dwo-data-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.dwo-data-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.dwo-data-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink);
  font-family: 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums;
}
.dwo-data-table tbody tr { transition: background var(--duration-fast); }
.dwo-data-table tbody tr:hover { background: rgb(var(--ink-rgb) / 0.025); }
.dwo-data-table tbody tr:last-child td { border-bottom: none; }

/* A list of .dwo-row items fades in with the same restrained stagger as My Office's activity feed
   (.office-activity-row) — reused verbatim, not a new motion rule, applied via one wrapper class so
   every tab's list (Seller CRM, Buyer CRM, Inbox, Deadlines, Closings, Comms threads, ...) gets the
   live-feel touch Phase A already established, without inventing a second animation. */
.dwo-row-list .dwo-row,
.dwo-row-list > a.dwo-row,
.dwo-row-list > .dwo-row { animation: fade-up 0.4s var(--ease-standard) both; }
.dwo-row-list > *:nth-child(1) { animation-delay: 0ms; }
.dwo-row-list > *:nth-child(2) { animation-delay: 35ms; }
.dwo-row-list > *:nth-child(3) { animation-delay: 70ms; }
.dwo-row-list > *:nth-child(4) { animation-delay: 105ms; }
.dwo-row-list > *:nth-child(5) { animation-delay: 140ms; }
.dwo-row-list > *:nth-child(n+6) { animation-delay: 165ms; }
@media (prefers-reduced-motion: reduce) {
  .dwo-row-list .dwo-row, .dwo-row-list > a.dwo-row, .dwo-row-list > .dwo-row { animation: none !important; opacity: 1 !important; }
}

/* Sub-section label inside a form/detail sheet — Field's own read-mode label style (ui-kit.js),
   reused for edit-mode grouping ("PROPERTY DETAILS", "BUYER INFO") rather than a new caps-label
   rule invented for this phase. */
.dwo-form-section-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600;
  color: var(--text-tertiary); margin: 18px 0 8px;
}
.dwo-form-section-label:first-child { margin-top: 0; }

/* Mobile-only stacked shape for a genuinely wide operational table that a horizontal-scroll table
   would render as tiny, hard-to-tap text (Dispositions' buyer-match grid, Contract Room's deadline/
   earnest-money ledgers) — each row becomes a small card of label/value pairs instead of a squeezed
   desktop table. Opt-in via .dwo-stack-table so SimpleTable/.dwo-data-table's genuinely-scrollable
   comparison tables (Performance, Deal Lab scenarios) are unaffected. */
@media (max-width: 640px) {
  .dwo-stack-table thead { display: none; }
  .dwo-stack-table, .dwo-stack-table tbody, .dwo-stack-table tr, .dwo-stack-table td { display: block; width: 100%; }
  .dwo-stack-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .dwo-stack-table td { padding: 3px 0; border: none; }
  .dwo-stack-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: 1px;
  }
}

/* Promoted Products (DWO Polish task) — a plain bordered card (reuses .card), never a bright/gold-
   flooded banner: spec §60 wants "useful context," not an ad. */
.promo-card { position: relative; }
.promo-card-icon { width: 32px; height: 32px; border-radius: var(--radius-md); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--gold-soft); border: 1px solid var(--gold-edge); }
.promo-dismiss { position: absolute; top: 10px; right: 12px; width: 20px; height: 20px; border-radius: 50%; border: none; background: transparent; color: var(--text-tertiary); font-size: 14px; line-height: 1; cursor: pointer; }
.promo-dismiss:hover { background: rgb(var(--ink-rgb) / 0.06); color: var(--text-secondary); }

/* ═══ LIQUID GLASS (this task) ═══════════════════════════════════════════════════════════════════
   One shared block governs every glass surface in the office — not a per-page override. The
   selector list below is deliberately bounded to TOP-LEVEL container surfaces: the main content
   card, overlays, the greeting hero, and the small set of standalone tiles that render in single
   digits per screen (My Office's 4 AI tiles, 4 agent cards/rail cards, the one pipeline strip).

   Left OUT on purpose, for real frame-budget reasons, not an oversight: .dwo-row / .dwo-row-list
   items, .dwo-quick-tile, .dwo-file-tile, .badge/.tag/.filter-chip, .office-summary-pill, and table
   cells. Those render in the dozens on the heavier pages (Deal Lab's repair-item grid, Files'
   tile grid, any long row-list) — stacking that many independent backdrop-filter regions is the
   actual jank risk on mid-range Android, not the technique itself. Each already sits inside (or
   beside) a glass .card, so the depth reads without needing its own blur layer.

   Layering: --glass-tint-1/2/3 (near-white -> warm cream -> --paper-3, all high-alpha) glazed over
   whatever the fixed, textured body background (above) shows through, blurred and saturated so the
   warm gold/violet blobs bleed through as soft color rather than sharp shapes. inset highlight on
   the top edge + the existing --elevation-1 drop shadow supply the "light-catching edge / depth
   beneath" the brief asks for, without an extra pseudo-element per card (cheap: one box-shadow list,
   not a second painted layer). */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  /* NOTE: no :root alias here for --glass-inset-shadow (there used to be one, --glass-inset) —
     a custom property whose value is itself `var(--other-property)` resolves ONCE, at the element
     where it's declared, and INHERITS that already-resolved value down the tree like any other
     inherited value. Since the dark theme blocks near the end of this file override
     --glass-inset-shadow on .app-shell (a DESCENDANT of :root), a :root-only alias pointing at it
     would have kept resolving to cream's value forever — measured, not assumed: an early build of
     this task's dark themes shipped exactly that bug (verified via computed-style inspection, see
     the task report). Every custom property below that needs to react to a theme is either
     consumed directly (rgb(var(--x-rgb)/...)) or, where a composed alias is genuinely convenient
     (--paper, --ink, --gold, --text-secondary, etc.), REDECLARED on the same .app-shell element
     that overrides its ingredients — see the .app-shell[data-dwo-theme] blocks below. */
  .card, .panel,
  .office-hero,
  .office-ai-tile, .office-agent-card, .office-agent-panel-card,
  .office-pipeline,
  .dwo-result-panel,
  .coming-soon-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-color: var(--glass-border-color);
    box-shadow: var(--glass-inset-shadow), var(--card-shadow);
  }
  .modal-surface, .drawer-surface {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border-color: var(--glass-border-color);
  }
  .modal-surface { box-shadow: var(--glass-inset-shadow), var(--elevation-modal); }
  .drawer-surface { box-shadow: var(--glass-inset-shadow), -8px 0 32px rgba(43,33,24,0.14); }
  .card:hover, .panel:hover,
  .office-ai-tile:hover, .office-agent-panel-card:hover { border-color: var(--gold-edge); }

  /* Sidebar/nav active-tab pill is a smaller, cheaper wash (one instance on screen) — included
     because it's a card-style surface per the design system's own comment above it, kept at the
     same tuned blur (no saturate) rather than a separate cost, since it's a single small region. */
  .office-nav-link.active {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
  }

  /* prefers-reduced-transparency: reduce — nested inside the @supports block (not a separate rule)
     so it only ever fires where glass would otherwise apply; browsers with no backdrop-filter
     support already get the plain solid-gradient fallback above and never enter this block at all. */
  @media (prefers-reduced-transparency: reduce) {
    .card, .panel,
    .modal-surface, .drawer-surface,
    .office-hero,
    .office-ai-tile, .office-agent-card, .office-agent-panel-card,
    .office-pipeline,
    .dwo-result-panel,
    .coming-soon-card,
    .office-nav-link.active {
      background: var(--card-bg-solid);
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
    .card, .panel, .office-hero, .office-ai-tile, .office-agent-card,
    .office-agent-panel-card, .office-pipeline, .dwo-result-panel, .coming-soon-card {
      box-shadow: var(--card-shadow);
    }
    .modal-surface { box-shadow: var(--elevation-modal); }
    .drawer-surface { box-shadow: -8px 0 32px rgba(43,33,24,0.14); }
  }
}

/* ═══ DWO LIQUID GLASS THEMES (Pass 1 + Pass 2) — Burgundy / Executive Blue / Emerald ═══════════
   Three complete dark-polarity token sets, scoped to .app-shell[data-dwo-theme="..."] — stamped by
   app.js's Shell on every route since Pass 2 widened it (see the :root comment above for the full
   scoping rationale). Pass 1's audit covered My Office, its header, its bottom nav, and the shared
   primitives (EmptyState/Badge/Skeleton/Tag) those render; Pass 2 extended the same surface list to
   every other /office page's own rules (this file's page-class section above, plus each page's own
   inline styles) — restated here with dark values rather than duplicated markup or a forked page.

   Each block sets:
     - the *-rgb triples Tailwind's ink/gold/paper/paper2/paper3/danger utilities read (so every
       text-ink/NN, bg-paper2 etc. class already in components.js/ui-kit.js/app.js flips for free)
     - --line/--line-2 (spec: white border 0.14-0.24, not ink-based)
     - --card-* (non-blur/prefers-reduced-transparency fallback: "a slightly more opaque dark
       surface", spec §Glass construction) and --glass-* (the translucent-white-over-glow recipe:
       spec's 0.14 leading edge fading to 0.045, thin white border, inset top highlight)
     - --glass-blur: 18px, not spec's literal 24-30px — MEASURED deviation, see the task report's
       perf table. saturate() is dropped entirely for the same reason cream already dropped it
       (Phase B's own perf note above): a scripted-scroll comparison over 15 stacked glass regions,
       4x-CPU-throttled, showed blur(26px)+saturate(130%) costing ~+4.5ms avg frame time and
       2-3x the dropped-frame count of blur(18px) alone, which measured within noise of the
       no-glass baseline. Same finding, same fix, same tool cream already used.
     - --hero-bg/--hero-border/--pill-bg — the "restrained theme-colored radial glow" the light
       theme doesn't need (cream reads atmosphere via texture; dark reads it via an actual glow,
       per spec's approved visual hierarchy) */

.app-shell[data-dwo-theme="burgundy"] {
  --paper-rgb: 23 10 16;      /* #170A10 — Base */
  --paper2-rgb: 43 11 24;     /* #2B0B18 — Depth */
  --paper3-rgb: 58 18 32;     /* #3A1220 — a third, lighter elevation step (hover/skeleton/track) */
  --ink-rgb: 255 255 255;
  --gold-rgb: 214 168 62;     /* #D6A83E */
  --danger-rgb: 229 100 74;   /* #E5644A — measured 5.4-5.8:1 on Base/Depth; cream's #A34428 measured 2.9-3.1:1 here, below AA */
  --line: rgb(255 255 255 / 0.16);
  --line-2: rgb(255 255 255 / 0.24);
  /* Redeclare the composed aliases HERE TOO, on this same element — a custom property whose value
     is itself var(--other-property) resolves ONCE at the element that declares it and inherits
     that frozen value down the tree; only overriding the *-rgb triplets above would leave every
     var(--paper)/var(--ink)/var(--gold)/var(--text-secondary) consumer still seeing cream's :root
     values. Measured, not assumed — see the @supports block's comment for how this was caught. */
  --paper: rgb(var(--paper-rgb));
  --paper-2: rgb(var(--paper2-rgb));
  --paper-3: rgb(var(--paper3-rgb));
  --ink: rgb(var(--ink-rgb));
  --gold: rgb(var(--gold-rgb));
  --gold-soft: rgb(var(--gold-rgb) / 0.12);
  --gold-edge: rgb(var(--gold-rgb) / 0.34);
  --danger: rgb(var(--danger-rgb));
  --text-secondary: rgb(var(--ink-rgb) / var(--text-secondary-alpha));
  --text-tertiary: rgb(var(--ink-rgb) / var(--text-tertiary-alpha));

  --card-bg-solid: linear-gradient(180deg, rgb(var(--paper3-rgb)), rgb(var(--paper2-rgb)));
  --card-border: rgb(255 255 255 / 0.14);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.24), 0 10px 28px rgba(0,0,0,0.32);
  --glass-blur: 18px;
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045));
  --glass-border-color: rgb(255 255 255 / 0.20);
  --glass-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.03);

  --hero-bg: radial-gradient(90% 130% at 100% -15%, rgba(165,46,83,0.38), transparent 62%), linear-gradient(135deg, rgb(var(--paper2-rgb)) 0%, rgb(var(--paper-rgb)) 100%);
  --hero-border: rgb(255 255 255 / 0.14);
  --pill-bg: rgba(255,255,255,0.10);
}

.app-shell[data-dwo-theme="executive_blue"] {
  --paper-rgb: 7 21 34;       /* #071522 — Base */
  --paper2-rgb: 13 42 66;     /* #0D2A42 — Depth */
  --paper3-rgb: 18 63 95;     /* #123F5F */
  --ink-rgb: 255 255 255;
  --gold-rgb: 214 168 62;
  --danger-rgb: 229 100 74;
  --line: rgb(255 255 255 / 0.16);
  --line-2: rgb(255 255 255 / 0.24);
  /* See the burgundy block above for why these composed aliases are redeclared here too. */
  --paper: rgb(var(--paper-rgb));
  --paper-2: rgb(var(--paper2-rgb));
  --paper-3: rgb(var(--paper3-rgb));
  --ink: rgb(var(--ink-rgb));
  --gold: rgb(var(--gold-rgb));
  --gold-soft: rgb(var(--gold-rgb) / 0.12);
  --gold-edge: rgb(var(--gold-rgb) / 0.34);
  --danger: rgb(var(--danger-rgb));
  --text-secondary: rgb(var(--ink-rgb) / var(--text-secondary-alpha));
  --text-tertiary: rgb(var(--ink-rgb) / var(--text-tertiary-alpha));

  --card-bg-solid: linear-gradient(180deg, rgb(var(--paper3-rgb)), rgb(var(--paper2-rgb)));
  --card-border: rgb(255 255 255 / 0.14);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.24), 0 10px 28px rgba(0,0,0,0.32);
  --glass-blur: 18px;
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045));
  --glass-border-color: rgb(255 255 255 / 0.20);
  --glass-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.03);

  --hero-bg: radial-gradient(90% 130% at 100% -15%, rgba(38,118,182,0.38), transparent 62%), linear-gradient(135deg, rgb(var(--paper2-rgb)) 0%, rgb(var(--paper-rgb)) 100%);
  --hero-border: rgb(255 255 255 / 0.14);
  --pill-bg: rgba(255,255,255,0.10);
}

.app-shell[data-dwo-theme="emerald"] {
  --paper-rgb: 7 23 18;       /* #071712 — Base */
  --paper2-rgb: 13 48 36;     /* #0D3024 — Depth */
  --paper3-rgb: 18 68 52;     /* #124434 */
  --ink-rgb: 255 255 255;
  --gold-rgb: 214 168 62;
  --danger-rgb: 229 100 74;
  --line: rgb(255 255 255 / 0.16);
  --line-2: rgb(255 255 255 / 0.24);
  /* See the burgundy block above for why these composed aliases are redeclared here too. */
  --paper: rgb(var(--paper-rgb));
  --paper-2: rgb(var(--paper2-rgb));
  --paper-3: rgb(var(--paper3-rgb));
  --ink: rgb(var(--ink-rgb));
  --gold: rgb(var(--gold-rgb));
  --gold-soft: rgb(var(--gold-rgb) / 0.12);
  --gold-edge: rgb(var(--gold-rgb) / 0.34);
  --danger: rgb(var(--danger-rgb));
  --text-secondary: rgb(var(--ink-rgb) / var(--text-secondary-alpha));
  --text-tertiary: rgb(var(--ink-rgb) / var(--text-tertiary-alpha));

  --card-bg-solid: linear-gradient(180deg, rgb(var(--paper3-rgb)), rgb(var(--paper2-rgb)));
  --card-border: rgb(255 255 255 / 0.14);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.24), 0 10px 28px rgba(0,0,0,0.32);
  --glass-blur: 18px;
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,0.14), rgba(255,255,255,0.045));
  --glass-border-color: rgb(255 255 255 / 0.20);
  --glass-inset-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.03);

  --hero-bg: radial-gradient(90% 130% at 100% -15%, rgba(36,134,99,0.38), transparent 62%), linear-gradient(135deg, rgb(var(--paper2-rgb)) 0%, rgb(var(--paper-rgb)) 100%);
  --hero-border: rgb(255 255 255 / 0.14);
  --pill-bg: rgba(255,255,255,0.10);
}

/* office-hero-decor (the inline skyline SVG) uses var(--gold-soft)/var(--gold-edge) already, which
   are correctly gold on all 4 themes — no per-theme override needed there. The one adjustment: on
   dark, the sun circle (--gold-soft, 12% alpha) needs to hold up against a genuinely dark backdrop
   rather than cream, so it's nudged up slightly for the same "restrained but visible" read. */
.app-shell[data-dwo-theme="burgundy"] .office-hero-decor,
.app-shell[data-dwo-theme="executive_blue"] .office-hero-decor,
.app-shell[data-dwo-theme="emerald"] .office-hero-decor {
  opacity: 0.8;
}

/* ─── Dialogs rendered inside glass surfaces (Contract Room fix, 2026-10-10) ─────────────────────
   .card/.panel/.drawer-surface carry backdrop-filter in the glass theme. A backdrop-filter makes
   its element the containing block AND a stacking context for every position:fixed descendant, so
   a FormSheet rendered inside one was positioned and clipped against that element instead of the
   viewport: the New Document dialog sat under the next card (Save unclickable, no POST, no error)
   and the nested field placer was cut off at the 420px drawer edge. While such a surface holds an
   open dialog its blur is dropped, which frees the dialog to be viewport-fixed; the backdrop already
   dims the page, so nothing visible is lost.
   The rule keys on what an element HOLDS, not on a class list: an earlier version named only .card,
   .panel and .drawer-surface and left nine other blurred surfaces (.office-hero, .dwo-result-panel,
   .coming-soon-card, .modal-surface, ...) trapping dialogs (test/dwo-dialog-containing-block). Any
   ancestor at any depth matches, so a new wrapper or a new glass class cannot defeat it. !important
   because this is an invariant that must beat any theme or component blur. .overlay-backdrop is
   exempt: it is itself fixed to the viewport and its 2px blur is the intended page dimming. */
:has([role="dialog"]):not(.overlay-backdrop) {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
