@layer tv-subroutes, tv-nova;

@layer tv-nova {
  /* =========================================================================
     TRAVEL VOID NOVA — FUTURISTIC OBSIDIAN & STUDIO DESIGN SYSTEM (2026.12)
     Ground-up simplistic dark-first ledger cockpit + 1-click Studio Light mode.
     ========================================================================= */

  @font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/accounts-clean/login-editorial-20260924-r1/inter-latin.woff2") format("woff2");
  }

  :root,
  [data-tv-theme="dark"] {
    color-scheme: dark;
    --nova-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --nova-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Canvas & Depth Hierarchy */
    --nova-bg: #05080f;
    --nova-bg-radial: radial-gradient(70% 420px at 50% -120px, rgba(56, 189, 248, 0.085), transparent 72%);
    --nova-rail-bg: #070b14;
    --nova-rail-hover: rgba(255, 255, 255, 0.05);
    --nova-rail-active: rgba(56, 189, 248, 0.11);
    --nova-topbar-bg: rgba(7, 11, 20, 0.82);

    --nova-surface: #0b111d;
    --nova-surface-subtle: #0e1626;
    --nova-surface-hover: #121c2f;
    --nova-surface-glass: rgba(11, 17, 29, 0.86);
    --nova-input-bg: #080d17;
    --nova-popover-bg: #0f1727;

    /* Hairlines */
    --nova-border: rgba(148, 163, 184, 0.14);
    --nova-border-subtle: rgba(148, 163, 184, 0.08);
    --nova-border-strong: rgba(148, 163, 184, 0.26);
    --nova-border-accent: rgba(56, 189, 248, 0.36);

    /* Typography */
    --nova-ink: #f1f5f9;
    --nova-ink-2: #cbd5e1;
    --nova-muted: #7c8ca3;
    --nova-dim: #526177;

    /* Precision Accents */
    --nova-accent: #38bdf8;
    --nova-accent-ink: #031525;
    --nova-accent-soft: rgba(56, 189, 248, 0.12);
    --nova-teal: #2dd4bf;
    --nova-teal-soft: rgba(45, 212, 191, 0.12);
    --nova-green: #34d399;
    --nova-green-soft: rgba(52, 211, 153, 0.12);
    --nova-amber: #fbbf24;
    --nova-amber-soft: rgba(251, 191, 36, 0.12);
    --nova-red: #fb7185;
    --nova-red-soft: rgba(251, 113, 133, 0.13);

    /* Elevation & Radii */
    --nova-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --nova-shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.65);
    --nova-shadow-lg: 0 28px 64px -16px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --nova-r-xs: 6px;
    --nova-r-sm: 8px;
    --nova-r-md: 12px;
    --nova-r-lg: 16px;
    --nova-r-pill: 9999px;
  }

  [data-tv-theme="light"] {
    color-scheme: light;
    --nova-bg: #f6f8fb;
    --nova-bg-radial: radial-gradient(70% 380px at 50% -120px, rgba(14, 116, 144, 0.05), transparent 72%);
    --nova-rail-bg: #f1f5f9;
    --nova-rail-hover: rgba(15, 23, 42, 0.06);
    --nova-rail-active: rgba(2, 132, 199, 0.12);
    --nova-topbar-bg: rgba(255, 255, 255, 0.88);

    --nova-surface: #ffffff;
    --nova-surface-subtle: #f1f5f9;
    --nova-surface-hover: #f8fafc;
    --nova-surface-glass: rgba(255, 255, 255, 0.92);
    --nova-input-bg: #ffffff;
    --nova-popover-bg: #ffffff;

    --nova-border: rgba(15, 23, 42, 0.10);
    --nova-border-subtle: rgba(15, 23, 42, 0.06);
    --nova-border-strong: rgba(15, 23, 42, 0.18);
    --nova-border-accent: rgba(14, 116, 144, 0.36);

    --nova-ink: #0f172a;
    --nova-ink-2: #334155;
    --nova-muted: #64748b;
    --nova-dim: #94a3b8;

    --nova-accent: #0284c7;
    --nova-accent-ink: #ffffff;
    --nova-accent-soft: rgba(2, 132, 199, 0.09);
    --nova-teal: #0d9488;
    --nova-teal-soft: rgba(13, 148, 136, 0.09);
    --nova-green: #059669;
    --nova-green-soft: rgba(5, 150, 105, 0.10);
    --nova-amber: #d97706;
    --nova-amber-soft: rgba(217, 119, 6, 0.10);
    --nova-red: #dc2626;
    --nova-red-soft: rgba(220, 38, 38, 0.09);

    --nova-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --nova-shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
    --nova-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.06);
  }

  /* ---- Base & Reset ----------------------------------------------------- */
  *, *::before, *::after { box-sizing: border-box; }

  html {
    font-family: var(--nova-font);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--nova-bg);
    color: var(--nova-ink);
    font-size: 14px;
    line-height: 1.5;
  }

  body {
    margin: 0;
    min-height: 100dvh;
    background-color: var(--nova-bg);
    background-image: var(--nova-bg-radial);
    background-attachment: fixed;
    color: var(--nova-ink);
    overflow-x: clip;
  }

  [hidden] { display: none !important; }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  svg { display: block; max-width: 100%; }
  .icon {
    width: 16px;
    height: 16px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  a { color: var(--nova-accent); text-decoration: none; }
  a:hover { text-decoration: underline; }

  :focus-visible {
    outline: 2px solid var(--nova-accent);
    outline-offset: 2px;
  }

  /* Tabular numerals across all accounting figures */
  .tv-money-cell,
  .numeric-cell,
  .number-cell,
  .money-card strong,
  .kpi strong,
  .workspace-stat strong,
  .consolidation-stat strong,
  .home-cockpit-money,
  .home-cockpit-overdue-money,
  .home-cockpit-aging-money,
  .home-cockpit-task-money,
  .home-cockpit-period-money,
  .home-cockpit-support-overdue,
  td[data-tv-cell-kind="money"] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "cv02" 1;
  }

  .mono, .mono-wrap {
    font-family: var(--nova-mono);
    font-size: 0.9em;
  }

  /* ---- Startup Gate ----------------------------------------------------- */
  .tv-boot-gate {
    min-height: 100dvh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    text-align: center;
    padding: 24px;
    background: var(--nova-bg);
    color: var(--nova-ink);
  }
  .tv-boot-gate img { border-radius: 12px; }
  .tv-boot-gate strong { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
  .tv-boot-gate p { margin: 0; color: var(--nova-muted); font-size: 13px; }

  /* ---- App Shell Layout (Sidebar Rail + Sticky Glass Topbar) ----------- */
  #tv-app > .ps-app {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: 54px minmax(0, 1fr);
    min-height: 100dvh;
    width: 100%;
  }
  #tv-app > .ps-app[data-sidebar-collapsed="true"] {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .ps-skip {
    position: fixed;
    left: -9999px;
    top: 8px;
    z-index: 9999;
    padding: 8px 14px;
    border-radius: var(--nova-r-sm);
    background: var(--nova-accent);
    color: var(--nova-accent-ink);
    font-weight: 600;
  }
  .ps-skip:focus { left: 12px; }

  /* Fixed Obsidian Rail */
  .ps-app .ps-sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    position: sticky;
    top: 0;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--nova-rail-bg);
    color: #e2e8f0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 60;
    overflow: hidden;
  }

  .ps-sidebar-top {
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    flex: none;
  }

  .ps-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 6px;
    border: 0;
    border-radius: var(--nova-r-sm);
    background: transparent;
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
  }
  .ps-brand:hover { background: var(--nova-rail-hover); }
  .ps-brand img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; flex: none; }
  .ps-brand > span { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
  .ps-brand strong { font-size: 13px; font-weight: 650; letter-spacing: -0.02em; color: #f8fafc; white-space: nowrap; }
  .ps-brand small { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #38bdf8; font-weight: 700; }

  .ps-scope {
    padding: 4px 6px 2px 44px;
    font-size: 11px;
    color: #94a3b8;
  }
  .ps-scope-copy { display: flex; flex-direction: column; gap: 1px; }
  .ps-scope-copy strong { font-size: 11px; font-weight: 550; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ps-scope-copy span { font-size: 10.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ps-scope-select {
    margin-top: 6px;
    width: 100%;
    min-height: 30px;
    padding: 4px 8px;
    border-radius: var(--nova-r-xs);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    font-size: 11.5px;
  }

  .ps-create-host {
    padding: 10px 10px 6px;
    flex: none;
  }

  .ps-create {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: var(--nova-r-sm);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0.07));
    color: #f8fafc;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.15s ease;
  }
  .ps-create:hover {
    border-color: rgba(56, 189, 248, 0.6);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.24), rgba(56, 189, 248, 0.12));
  }
  .ps-create > .icon {
    width: 15px;
    height: 15px;
    color: #38bdf8;
    flex: none;
  }
  .ps-create-shortcut {
    margin-left: auto;
    font-size: 10px;
    color: #7dd3fc;
    opacity: 0.8;
    font-family: var(--nova-mono);
  }

  .ps-jump-wrap {
    padding: 4px 10px 8px;
    flex: none;
  }
  .ps-jump-input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--nova-r-xs);
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    font-size: 12px;
    font-family: var(--nova-font);
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }
  .ps-jump-input::placeholder { color: #64748b; }
  .ps-jump-input:focus {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(255, 255, 255, 0.06);
  }

  .ps-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: none;
  }
  .ps-nav::-webkit-scrollbar { display: none; }

  .ps-nav-group { display: flex; flex-direction: column; gap: 2px; flex: none; }
  .ps-nav-caption {
    margin: 0 8px 4px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #64748b;
  }

  .ps-route {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--nova-r-xs);
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.14s ease, color 0.14s ease;
  }
  .ps-route:hover {
    background: var(--nova-rail-hover);
    color: #f1f5f9;
  }
  .ps-route > .icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: color 0.14s ease;
  }
  .ps-route:hover > .icon { color: #cbd5e1; }
  .ps-route.is-active {
    background: var(--nova-rail-active);
    color: #f8fafc;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.22);
  }
  .ps-route.is-active > .icon { color: #38bdf8; }
  .ps-route.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 2.5px;
    border-radius: 0 2px 2px 0;
    background: #38bdf8;
  }
  .ps-route > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ps-all-features {
    flex: none;
    color: #94a3b8;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 9px;
    margin-top: 2px;
    border-radius: 0;
  }

  .ps-sidebar-footer {
    flex: none;
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--nova-rail-bg);
  }

  /* Collapsed Rail State */
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-sidebar-top { padding: 12px 8px 10px; }
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-brand {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
    margin-inline: auto;
  }
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-brand > span,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-scope,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-jump-wrap,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-nav-caption,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-create-shortcut,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-create > span,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-route > span {
    display: none;
  }
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-create,
  #tv-app > .ps-app[data-sidebar-collapsed="true"] .ps-route {
    justify-content: center;
    padding: 0;
    width: 40px;
    margin-inline: auto;
  }

  /* Mobile Sidebar Slide-Over (strictly hidden on desktop above 1023px) */
  #tv-app .ps-sidebar .ps-mobile-close {
    display: none !important;
    position: absolute;
    right: 10px;
    top: 10px;
    color: #cbd5e1;
  }
  .ps-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(2, 6, 14, 0.72);
    backdrop-filter: blur(4px);
  }
  .ps-sidebar-backdrop > span { display: none; }

  /* Top Header Bar (Glassmorphic 54px) */
  .ps-app .ps-header {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 0;
    z-index: 45;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    background: var(--nova-topbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--nova-border);
  }

  .ps-header-left,
  .ps-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .ps-header-left { flex: 1 1 auto; }
  .ps-header-actions { flex: none; }

  .ps-icon-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    cursor: pointer;
    transition: all 0.14s ease;
    flex: none;
  }
  .ps-icon-button:hover {
    border-color: var(--nova-border-strong);
    color: var(--nova-ink);
    background: var(--nova-surface-hover);
  }
  .ps-icon-button > span { display: none; }

  /* Floating Omnibar Trigger */
  .ps-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 34px;
    min-width: 160px;
    max-width: 380px;
    flex: 1 1 240px;
    padding: 0 10px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-sm);
    background: var(--nova-input-bg);
    color: var(--nova-muted);
    font-size: 12.5px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .ps-search:hover {
    border-color: var(--nova-border-strong);
    color: var(--nova-ink-2);
  }
  .ps-search > .icon { width: 14px; height: 14px; color: var(--nova-muted); }
  .ps-search > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ps-search kbd {
    margin-left: auto;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-muted);
    font-family: var(--nova-mono);
    font-size: 10.5px;
  }

  /* Mode Switch + Theme Toggle + Period + Profile */
  .ps-compact-scope {
    font-size: 11.5px;
    color: var(--nova-muted);
    white-space: nowrap;
  }

  .ps-period {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    height: 32px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border-subtle);
    background: var(--nova-surface-subtle);
    font-size: 12px;
    color: var(--nova-ink-2);
    white-space: nowrap;
  }
  .ps-period .icon { width: 14px; height: 14px; color: var(--nova-accent); }
  .ps-period strong { font-weight: 600; color: var(--nova-ink); }
  .ps-period small { color: var(--nova-muted); font-size: 11px; }

  .ps-mode-switch {
    display: inline-flex;
    align-items: center;
    padding: 2px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-input-bg);
    gap: 2px;
  }
  .ps-mode-option {
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--nova-muted);
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
    transition: all 0.14s ease;
    white-space: nowrap;
  }
  .ps-mode-option:hover { color: var(--nova-ink); }
  .ps-mode-option.is-selected {
    background: var(--nova-surface-subtle);
    color: var(--nova-ink);
    box-shadow: inset 0 0 0 1px var(--nova-border);
  }

  .ps-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
    transition: all 0.14s ease;
    white-space: nowrap;
  }
  .ps-theme-toggle:hover {
    border-color: var(--nova-border-accent);
    color: var(--nova-ink);
  }
  .ps-theme-toggle .icon { width: 14px; height: 14px; color: var(--nova-accent); }

  .ps-profile { position: relative; }
  .ps-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 2px 10px 2px 4px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    cursor: pointer;
    transition: border-color 0.14s ease;
  }
  .ps-profile-trigger:hover { border-color: var(--nova-border-strong); }
  .ps-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--nova-accent-soft);
    color: var(--nova-accent);
    font-size: 10.5px;
    font-weight: 700;
    border: 1px solid var(--nova-border-accent);
  }
  .ps-profile-copy { display: flex; align-items: baseline; gap: 6px; }
  .ps-profile-copy strong { font-size: 12px; font-weight: 600; color: var(--nova-ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ps-profile-copy small { font-size: 10.5px; color: var(--nova-muted); display: none; }
  .ps-profile-trigger .icon { width: 13px; height: 13px; color: var(--nova-muted); }

  /* Floating Context Menus (Create / Profile) */
  .ps-menu {
    position: fixed;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-popover-bg);
    box-shadow: var(--nova-shadow-lg);
    overflow-y: auto;
  }
  .ps-menu-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 9px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .ps-menu-head > strong {
    font-size: 13px;
    font-weight: 650;
    color: var(--nova-ink);
    line-height: 1.3;
  }
  .ps-menu-head > small {
    font-size: 11.5px;
    color: var(--nova-muted);
    overflow-wrap: anywhere;
  }
  .ps-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    border-radius: var(--nova-r-xs);
    background: transparent;
    color: var(--nova-ink-2);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }
  .ps-menu-item:hover,
  .ps-menu-item:focus-visible {
    background: var(--nova-accent-soft);
    color: var(--nova-ink);
  }
  .ps-menu-item .icon { width: 15px; height: 15px; color: var(--nova-accent); }

  /* Connection Status + Mobile Mode Bar + Main Workspace Frame */
  .ps-connection {
    padding: 8px 24px;
    background: var(--nova-amber-soft);
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
    color: var(--nova-amber);
    font-size: 12.5px;
    font-weight: 550;
  }
  .ps-mobile-mode {
    display: none;
    padding: 8px 16px;
    border-bottom: 1px solid var(--nova-border);
    background: var(--nova-surface);
  }

  .ps-app > .ps-main {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    width: 100%;
  }

  .ps-workspace-head {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 20px 0;
  }
  .ps-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--nova-muted);
  }
  .ps-breadcrumbs .icon { width: 12px; height: 12px; opacity: 0.6; }
  .ps-breadcrumbs strong { color: var(--nova-ink-2); font-weight: 600; }
  .ps-breadcrumb-parent {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--nova-muted);
    font: inherit;
    cursor: pointer;
  }
  .ps-breadcrumb-parent:hover { color: var(--nova-accent); }

  .ps-workspace {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 6px 20px 24px;
    min-width: 0;
  }
  .ps-workspace:focus { outline: none; }

  /* ---- Borderless Futuristic Route Masthead (routeHeader + routeFrame) --- */
  .tv-route-frame {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 0;
    min-width: 0;
  }

  .page-head,
  .workspace-hero {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between !important;
    gap: 10px 16px;
    width: 100%;
    min-width: 0;
    padding: 2px 0 10px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--nova-border-subtle) !important;
    border-radius: 0 !important;
    text-align: left !important;
  }
  .page-head-copy,
  .workspace-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    text-align: left !important;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: auto;
  }
  @media (max-width: 900px) {
    .page-head-copy,
    .workspace-hero-copy {
      flex: 0 0 auto !important;
      width: 100%;
    }
  }
  .page-head-context {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .page-head-context .context-label {
    color: var(--nova-muted);
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 500;
  }
  .page-head h1,
  .workspace-hero h1 {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 27px);
    font-weight: 680;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--nova-ink);
  }
  .page-head .helper-copy,
  .workspace-hero p {
    margin: 0;
    font-size: 13px;
    color: var(--nova-muted);
    max-width: min(100%, 110ch);
  }

  .page-head-actions,
  .workspace-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .tv-route-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  /* ---- Buttons ---------------------------------------------------------- */
  .btn,
  .nova-btn,
  .home-cockpit-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    min-height: 0;
    padding: 0 13px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-family: var(--nova-font);
    font-size: 12.5px;
    font-weight: 550;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.14s ease;
  }
  .btn:hover:not(:disabled),
  .nova-btn:hover:not(:disabled),
  .home-cockpit-refresh:hover:not(:disabled) {
    border-color: var(--nova-border-strong);
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
  }
  .btn-primary:disabled {
    background: var(--nova-surface-subtle) !important;
    border: 1px solid var(--nova-border) !important;
    color: var(--nova-muted) !important;
    opacity: 1 !important;
    box-shadow: none !important;
  }

  .btn-primary {
    background: var(--nova-accent);
    border-color: transparent;
    color: var(--nova-accent-ink);
    font-weight: 620;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
  .btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    background: var(--nova-accent);
    border-color: transparent;
    color: var(--nova-accent-ink);
  }

  .btn-ghost {
    background: transparent;
    border-color: var(--nova-border);
    color: var(--nova-ink-2);
  }
  .btn-ghost:hover:not(:disabled) {
    background: var(--nova-surface-subtle);
    color: var(--nova-ink);
  }

  .btn-quiet {
    background: transparent;
    border-color: transparent;
    color: var(--nova-muted);
  }
  .btn-quiet:hover:not(:disabled) {
    background: var(--nova-surface-subtle);
    color: var(--nova-ink);
  }

  .btn-danger {
    background: var(--nova-red-soft);
    border-color: rgba(251, 113, 133, 0.35);
    color: var(--nova-red);
  }
  .btn-danger:hover:not(:disabled) {
    background: var(--nova-red);
    color: #fff;
  }

  .btn-sm,
  .btn-small {
    height: 29px;
    padding: 0 10px;
    font-size: 12px;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nova-r-xs);
    border: 1px solid var(--nova-border);
    background: transparent;
    color: var(--nova-muted);
    cursor: pointer;
  }
  .icon-btn:hover { background: var(--nova-surface-subtle); color: var(--nova-ink); }

  /* ---- Sleek Telemetry Alert Strip (attentionList) ---------------------- */
  .tv-attention-list {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
    overflow: hidden;
  }
  .tv-attention-list--compact .tv-attention-list-head {
    padding: 8px 14px;
  }
  .tv-attention-list-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--nova-surface-subtle);
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .tv-attention-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--nova-amber);
  }
  .tv-attention-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nova-amber);
    box-shadow: 0 0 8px var(--nova-amber);
  }
  .tv-attention-list-head h3 {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--nova-ink);
  }
  .tv-attention-list-rows { display: flex; flex-direction: column; }
  .tv-attention-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-top: 1px solid var(--nova-border-subtle);
  }
  .tv-attention-row:first-child { border-top: 0; }
  .tv-attention-copy {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
  }
  .tv-attention-copy strong { font-size: 13px; font-weight: 600; color: var(--nova-ink); }
  .tv-attention-copy span { font-size: 12.5px; color: var(--nova-muted); }
  .tv-attention-value { font-size: 13px; font-weight: 650; color: var(--nova-ink); font-variant-numeric: tabular-nums; }
  .tv-attention-overflow summary {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 550;
    color: var(--nova-muted);
    cursor: pointer;
    border-top: 1px solid var(--nova-border-subtle);
  }
  .tv-attention-overflow summary:hover { color: var(--nova-ink); }

  /* ---- Metrics, KPIs & Money Cards -------------------------------------- */
  .summary-grid,
  .workspace-stats,
  .consolidation-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 10px;
    margin: 0;
  }

  .kpi,
  .money-card,
  .workspace-stat,
  .consolidation-stat,
  .tv-invoice-summary-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    padding: 11px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    text-align: left;
    transition: border-color 0.14s ease, background-color 0.14s ease;
    overflow: hidden;
  }
  .money-card { cursor: pointer; }
  .money-card:hover { border-color: var(--nova-border-strong); background: var(--nova-surface-hover); }
  .money-card.active {
    border-color: var(--nova-accent);
    background: var(--nova-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
  }
  .kpi-top,
  .summary-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .kpi-top > span:first-child,
  .summary-card-head > span,
  .money-card > span:first-child,
  .workspace-stat > span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .kpi strong,
  .money-card strong,
  .workspace-stat strong,
  .consolidation-stat strong {
    font-size: clamp(19px, 1.9vw, 24px);
    font-weight: 680;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--nova-ink);
  }
  .kpi small,
  .money-card small,
  .workspace-stat small {
    font-size: 11.5px;
    color: var(--nova-muted);
    line-height: 1.35;
  }

  /* Micro dot accents replacing legacy thick stripes */
  .kpi-icon { color: var(--nova-muted); opacity: 0.7; }
  .kpi .spark { display: none; }
  .kpi.tone-green strong, .money-card.tone-green strong { color: var(--nova-green); }
  .kpi.tone-red strong, .money-card.tone-red strong { color: var(--nova-red); }
  .kpi.tone-amber strong, .money-card.tone-amber strong { color: var(--nova-amber); }

  /* ---- Tables & Non-Clipping Scroll Container --------------------------- */
  .table-card,
  .tv-table-card,
  .panel,
  .editor-card,
  .tv-coa-register,
  .tv-ledger-read-error-layout > :is(article, aside),
  .tv-pending-managed .tv-pending-overview {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
    color: var(--nova-ink);
  }

  .table-scroll,
  .tv-managed-ledger-table-wrap,
  [data-tv-scroll-table="true"] {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
  }
  .table-card > .table-scroll,
  .panel > .table-scroll {
    border: 0;
    border-radius: 0;
  }

  .data-table,
  table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    color: var(--nova-ink);
  }
  .data-table thead,
  table thead {
    background: var(--nova-surface-subtle);
    border-bottom: 1px solid var(--nova-border);
  }
  .data-table th,
  table th {
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nova-muted);
    white-space: nowrap;
  }
  .th-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
  }
  .th-button:hover { color: var(--nova-ink); }
  .sort-mark { opacity: 0.45; font-size: 11px; }
  .th-button[data-tv-state="active"] { color: var(--nova-accent); }
  .th-button[data-tv-state="active"] .sort-mark { opacity: 1; color: var(--nova-accent); }

  .data-table td,
  table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--nova-border-subtle);
    color: var(--nova-ink-2);
    vertical-align: middle;
  }
  .data-table tbody tr:last-child td { border-bottom: 0; }
  .data-table tbody tr.is-clickable { cursor: pointer; transition: background-color 0.1s ease; }
  .data-table tbody tr.is-clickable:hover td {
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .data-table .empty-row td {
    padding: 32px 16px;
    text-align: center;
    color: var(--nova-muted);
  }
  .data-table td.row-actions {
    white-space: nowrap;
    text-align: right;
  }
  .data-table td[data-tv-cell-kind="money"],
  .data-table .numeric-cell {
    font-weight: 600;
    color: var(--nova-ink);
    white-space: nowrap;
  }

  /* Status Micro-Dot Badges */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink-2);
    font-size: 11.5px;
    font-weight: 550;
    white-space: nowrap;
    line-height: 1;
  }
  .badge::before {
    content: "";
    width: 5.5px;
    height: 5.5px;
    border-radius: 50%;
    background: var(--nova-muted);
    flex: none;
  }
  .badge-success {
    background: var(--nova-green-soft);
    border-color: rgba(52, 211, 153, 0.25);
    color: var(--nova-green);
  }
  .badge-success::before { background: var(--nova-green); }
  .badge-danger {
    background: var(--nova-red-soft);
    border-color: rgba(251, 113, 133, 0.28);
    color: var(--nova-red);
  }
  .badge-danger::before { background: var(--nova-red); }
  .badge-warning {
    background: var(--nova-amber-soft);
    border-color: rgba(251, 191, 36, 0.28);
    color: var(--nova-amber);
  }
  .badge-warning::before { background: var(--nova-amber); }
  .badge-info {
    background: var(--nova-accent-soft);
    border-color: rgba(56, 189, 248, 0.26);
    color: var(--nova-accent);
  }
  .badge-info::before { background: var(--nova-accent); }

  /* ---- Inputs, Selects, Filter Bars ------------------------------------- */
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    font-family: var(--nova-font);
    font-size: 13px;
    color: var(--nova-ink);
    background: var(--nova-input-bg);
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-sm);
    padding: 7px 10px;
    min-height: 38px;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select {
    height: 38px;
    line-height: 1.3;
  }
  select {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  textarea {
    min-height: 76px;
    height: auto;
    resize: vertical;
  }
  input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px dashed var(--nova-border-strong);
    border-radius: var(--nova-r-sm);
    background: var(--nova-input-bg);
    color: var(--nova-ink-2);
    font-size: 12.5px;
    cursor: pointer;
  }
  input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 6px 12px;
    border-radius: var(--nova-r-xs);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
    font-family: var(--nova-font);
    font-size: 12px;
    font-weight: 560;
    cursor: pointer;
  }
  input[type="file"]::file-selector-button:hover {
    border-color: var(--nova-accent);
  }
  input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }
  input:not([type="checkbox"]):not([type="radio"]):focus,
  select:focus,
  textarea:focus {
    border-color: var(--nova-accent);
    box-shadow: 0 0 0 3px var(--nova-accent-soft);
  }
  input::placeholder, textarea::placeholder { color: var(--nova-dim); }
  label { color: var(--nova-ink-2); font-size: 12px; font-weight: 550; }

  .filters,
  .filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
  }
  .filters .field,
  .filter-row .field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 140px;
    flex: 1 1 160px;
  }
  .filters .field > span,
  .filter-row .field > span {
    font-size: 11px;
    font-weight: 600;
    color: var(--nova-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  /* ---- Tabs & Linear Pill Bars ------------------------------------------ */
  .tabs,
  .invoice-views,
  .tv-managed-ledger-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .tab,
  .saved-view,
  .home-cockpit-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: transparent;
    color: var(--nova-muted);
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.14s ease;
  }
  .tab:hover,
  .saved-view:hover,
  .home-cockpit-filter:hover {
    color: var(--nova-ink);
    border-color: var(--nova-border-strong);
    background: var(--nova-surface-subtle);
  }
  .tab.active,
  .saved-view.active,
  .home-cockpit-filter.is-selected {
    background: var(--nova-surface-subtle);
    border-color: var(--nova-border-accent);
    color: var(--nova-ink);
    font-weight: 620;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.16);
  }
  .saved-view-count {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: var(--nova-r-pill);
    background: var(--nova-surface);
    border: 1px solid var(--nova-border-subtle);
    color: var(--nova-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .saved-view.active .saved-view-count {
    background: var(--nova-accent-soft);
    border-color: transparent;
    color: var(--nova-accent);
  }

  /* ---- FUTURISTIC BENTO HOME COCKPIT (.tv-home-premium) ----------------- */
  .tv-home-premium {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  .home-cockpit-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .home-cockpit-context {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--nova-muted);
  }
  .home-cockpit-scope {
    padding: 2px 8px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink-2);
    font-size: 11px;
    font-weight: 600;
  }

  .home-cockpit-instruments {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
    gap: 12px;
    align-items: stretch;
  }

  .home-cockpit-collections,
  .home-cockpit-support-reading,
  .home-cockpit-panel {
    position: relative;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-lg);
    background: var(--nova-surface);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
  }
  .home-cockpit-collections {
    background:
      radial-gradient(320px 180px at 0% 0%, rgba(56, 189, 248, 0.08), transparent 70%),
      var(--nova-surface);
  }
  .home-cockpit-collections-head,
  .home-cockpit-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .home-cockpit-collections-head h3,
  .home-cockpit-panel-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 620;
    letter-spacing: -0.01em;
    color: var(--nova-ink);
    white-space: nowrap;
  }

  .home-cockpit-collections-values {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .home-cockpit-reading,
  .home-cockpit-overdue {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }
  .home-cockpit-overdue {
    padding-left: 20px;
    border-left: 1px solid var(--nova-border-subtle);
  }
  .home-cockpit-eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .home-cockpit-money,
  .home-cockpit-overdue-money {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: clamp(24px, 2.3vw, 34px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--nova-ink);
  }
  .home-cockpit-money.is-long,
  .home-cockpit-overdue-money.is-long {
    font-size: clamp(20px, 1.8vw, 26px);
  }
  .home-cockpit-money-currency {
    font-size: 0.54em;
    font-weight: 600;
    color: var(--nova-muted);
    letter-spacing: 0.04em;
  }
  .home-cockpit-overdue-money { color: var(--nova-red); }
  .home-cockpit-overdue-count,
  .home-cockpit-muted,
  .home-cockpit-count {
    font-size: 12px;
    color: var(--nova-muted);
  }

  .home-cockpit-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-sm);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink-2);
    font-family: var(--nova-font);
    font-size: 12.5px;
    font-weight: 550;
    padding: 7px 11px;
    cursor: pointer;
    transition: all 0.14s ease;
  }
  .home-cockpit-action:hover:not(:disabled) {
    border-color: var(--nova-border-accent);
    color: var(--nova-ink);
    background: var(--nova-surface-hover);
  }
  .home-cockpit-action.is-text {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nova-accent);
    font-size: 12.5px;
  }
  .home-cockpit-action.is-text:hover:not(:disabled) { text-decoration: underline; }
  .home-cockpit-action.is-primary {
    background: var(--nova-accent);
    color: var(--nova-accent-ink);
    border-color: transparent;
    font-weight: 620;
  }
  .home-cockpit-arrow { font-size: 12px; opacity: 0.75; }

  /* Embedded Aging Spectrum inside Hero */
  .home-cockpit-aging {
    padding: 0;
    border: 0;
    background: transparent;
    gap: 10px;
  }
  .home-cockpit-aging-track {
    display: flex;
    gap: 3px;
    height: 6px;
    width: 100%;
    border-radius: var(--nova-r-pill);
    overflow: hidden;
    background: var(--nova-surface-subtle);
  }
  .home-cockpit-aging-segment { display: block; height: 100%; border-radius: 2px; }
  .home-cockpit-aging-segment.tone-0, .home-cockpit-aging-dot.tone-0 { background: var(--nova-accent); }
  .home-cockpit-aging-segment.tone-1, .home-cockpit-aging-dot.tone-1 { background: var(--nova-amber); }
  .home-cockpit-aging-segment.tone-2, .home-cockpit-aging-dot.tone-2 { background: #f97316; }
  .home-cockpit-aging-segment.tone-3, .home-cockpit-aging-dot.tone-3 { background: var(--nova-red); }
  .home-cockpit-aging-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px 12px;
  }
  .home-cockpit-aging-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
  }
  .home-cockpit-aging-label { display: inline-flex; align-items: center; gap: 7px; color: var(--nova-muted); }
  .home-cockpit-aging-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
  .home-cockpit-aging-money { font-size: 12px; font-weight: 620; color: var(--nova-ink); font-variant-numeric: tabular-nums; }

  /* Right Stacked Support Bento Cards */
  .home-cockpit-support {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
  }
  .home-cockpit-support-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--nova-border-subtle);
  }
  .home-cockpit-support-detail { display: flex; flex-direction: column; gap: 2px; }
  .home-cockpit-support-overdue { font-size: 12.5px; font-weight: 620; color: var(--nova-amber); }

  /* Lower Bento Row (Queue + Shortcuts + Period) */
  .home-cockpit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
    gap: 12px;
  }
  .home-cockpit-task-list { display: flex; flex-direction: column; }
  .home-cockpit-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--nova-border-subtle);
  }
  .home-cockpit-task:first-child { border-top: 0; }
  .home-cockpit-task-mark {
    width: 24px;
    height: 24px;
    border-radius: var(--nova-r-xs);
    display: grid;
    place-items: center;
    background: var(--nova-red-soft);
    color: var(--nova-red);
    font-size: 11px;
    font-weight: 700;
    flex: none;
  }
  .home-cockpit-task-mark.is-check {
    background: var(--nova-amber-soft);
    color: var(--nova-amber);
  }
  .home-cockpit-task-copy { flex: 1 1 auto; min-width: 0; }
  .home-cockpit-task-copy strong { display: block; font-size: 13px; font-weight: 600; color: var(--nova-ink); }
  .home-cockpit-task-copy p { margin: 2px 0 0; font-size: 12px; color: var(--nova-muted); }
  .home-cockpit-task-money { font-size: 13px; font-weight: 650; color: var(--nova-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

  .home-cockpit-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .home-cockpit-shortcut-grid .home-cockpit-action { justify-content: space-between; width: 100%; }
  .home-cockpit-period-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .home-cockpit-period-money { font-size: 20px; font-weight: 680; color: var(--nova-ink); }
  .home-cockpit-source { margin: 0; font-size: 11.5px; color: var(--nova-dim); }

  /* ---- STREAMLINED INVOICE REGISTER ------------------------------------- */
  .invoice-exposure-stack { display: flex; flex-direction: column; gap: 12px; }
  .invoice-exposure-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .invoice-exposure-head .eyebrow {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .invoice-exposure-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--nova-muted); }
  .invoice-currency-scope {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--nova-muted);
  }
  .invoice-currency-scope select { min-height: 30px; padding: 3px 8px; font-size: 12px; }

  .invoice-money-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .invoice-money-more { display: contents; }
  .invoice-money-more-toggle { display: none; }
  .invoice-money-secondary { display: contents; }

  .invoice-view-group { display: flex; flex-direction: column; gap: 10px; }
  .invoice-view-scope { display: none; }
  .nova-invoice-scope-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--nova-muted);
    margin-left: auto;
  }

  .invoice-filters-bar {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 12px 14px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
  }

  /* ---- CLEAN FINANCIAL REPORTS ------------------------------------------ */
  .financial-statement-main { display: flex; flex-direction: column; gap: 14px; }
  .financial-report-guide,
  .nova-report-methodology {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-sm);
    background: var(--nova-surface);
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--nova-muted);
  }
  .financial-report-guide summary,
  .nova-report-methodology summary {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 550;
    color: var(--nova-ink-2);
  }
  .financial-report-guide summary strong { color: var(--nova-ink); }
  .financial-report-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
    margin-top: 10px;
  }
  .financial-report-guide-option {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink);
    text-align: left;
    cursor: pointer;
  }
  .financial-report-guide-option.is-current { border-color: var(--nova-accent); background: var(--nova-accent-soft); }
  .financial-report-guide-option span { font-size: 11.5px; color: var(--nova-muted); }

  /* ---- EMPTY, LOADING, STATE SURFACES ----------------------------------- */
  .tv-empty-state,
  .tv-loading-state,
  .tv-state-surface,
  .route-state,
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
    border-radius: var(--nova-r-md);
    border: 1px dashed var(--nova-border-strong);
    background: var(--nova-surface);
  }
  .tv-empty-state h3, .tv-state-surface h3, .route-state h2, .tv-loading-state h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 620;
    color: var(--nova-ink);
  }
  .tv-empty-state p, .tv-state-surface p, .route-state p, .tv-loading-state p {
    margin: 0;
    font-size: 13px;
    color: var(--nova-muted);
  }
  .tv-state-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }

  /* ---- GLASSMORPHIC DRAWERS, MODALS & CMD-K PALETTE --------------------- */
  .drawer-host,
  .modal-host,
  [data-tv-drawer-host],
  [data-tv-modal-host] {
    position: fixed;
    inset: 0;
    z-index: 500;
    pointer-events: none;
    display: none;
  }
  .drawer-host.is-open,
  .modal-host.is-open,
  [data-tv-drawer-host].is-open,
  [data-tv-modal-host].is-open {
    display: flex;
    pointer-events: auto;
    background: rgba(2, 6, 14, 0.68);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  [data-tv-drawer-host].is-open { justify-content: flex-end; }
  [data-tv-modal-host].is-open { align-items: center; justify-content: center; padding: 16px; }

  .drawer {
    width: min(680px, 100vw);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--nova-surface);
    color: var(--nova-ink);
    border-left: 1px solid var(--nova-border-strong);
    box-shadow: var(--nova-shadow-lg);
  }
  .drawer.drawer-lg,
  .drawer.drawer-invoice-detail--cockpit,
  .drawer.tv-receipt-drawer,
  .drawer.tv-stitch-composer-shell {
    width: min(860px, 100vw);
  }
  .drawer.drawer-sm {
    width: min(460px, 100vw);
  }
  .modal-backdrop { position: fixed; inset: 0; background: transparent; }
  .modal {
    position: relative;
    z-index: 2;
    width: min(640px, 100%);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    border-radius: var(--nova-r-lg);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-surface);
    color: var(--nova-ink);
    box-shadow: var(--nova-shadow-lg);
    overflow: hidden;
  }
  .modal.modal-lg { width: min(860px, 100%); }
  .modal.modal-sm { width: min(440px, 100%); }

  .drawer-header, .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .drawer-header h2, .modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--nova-ink);
  }
  .drawer-header p, .modal-header p { margin: 3px 0 0; font-size: 12.5px; color: var(--nova-muted); }

  .drawer-body, .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 20px;
  }
  .drawer-footer, .modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }

  .modal-grid { display: grid; gap: 12px; }
  .modal-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .drawer-stack { display: flex; flex-direction: column; gap: 16px; }
  .form-errors {
    padding: 10px 12px;
    border-radius: var(--nova-r-sm);
    border: 1px solid rgba(251, 113, 133, 0.35);
    background: var(--nova-red-soft);
    color: var(--nova-red);
    font-size: 12.5px;
  }

  /* Toast Host */
  [data-tv-toast], .toast-host {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(380px, calc(100vw - 32px));
  }
  .toast {
    padding: 11px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-popover-bg);
    color: var(--nova-ink);
    font-size: 13px;
    font-weight: 550;
    box-shadow: var(--nova-shadow-lg);
  }
  .toast-success { border-color: rgba(52, 211, 153, 0.45); color: var(--nova-green); }
  .toast-error { border-color: rgba(251, 113, 133, 0.5); color: var(--nova-red); }

  /* Sub-Route Surfaces Uniform Normalization */
  .tv-coa-register-head, .section-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .tv-coa-account-row {
    border-bottom: 1px solid var(--nova-border-subtle);
    padding: 10px 16px;
  }
  .tv-coa-account-row:hover { background: var(--nova-surface-hover); }
  .pagination, .ledger-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--nova-border-subtle);
    font-size: 12.5px;
    color: var(--nova-muted);
  }
  .detail-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
  }

  /* ---- Responsive Breakpoints ------------------------------------------ */
  @media (max-width: 1120px) {
    .invoice-money-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-filters-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-cockpit-instruments,
    .home-cockpit-grid { grid-template-columns: minmax(0, 1fr); }
    .home-cockpit-support { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  }

  @media (max-width: 1023px) {
    #tv-app > .ps-app,
    #tv-app > .ps-app[data-sidebar-collapsed="true"] {
      grid-template-columns: minmax(0, 1fr);
    }
    .ps-app .ps-sidebar {
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: min(280px, 86vw);
      z-index: 120;
    }
    #tv-app .ps-sidebar .ps-mobile-close {
      display: inline-flex !important;
      position: relative;
      right: auto;
      top: auto;
    }
    .ps-sidebar-top {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
    }
    .ps-mobile-mode { display: block; }
    .ps-app .ps-header { grid-column: 1; padding: 0 14px; }
    .ps-app > .ps-main { grid-column: 1; }
    .ps-workspace-head { padding: 10px 16px 0; }
    .ps-workspace { padding: 6px 16px 24px; }
    .ps-period small, .ps-profile-copy { display: none; }
  }

  @media (max-width: 760px) {
    .btn, .nova-btn { min-height: 40px; }
    .btn-sm, .btn-small { min-height: 32px; }
    .home-cockpit-collections-values,
    .home-cockpit-support,
    .home-cockpit-shortcut-grid,
    .invoice-money-bar,
    .invoice-filters-bar,
    .modal-grid-2 {
      grid-template-columns: minmax(0, 1fr);
    }
    .home-cockpit-overdue { padding-left: 0; padding-top: 12px; border-left: 0; border-top: 1px solid var(--nova-border-subtle); }
    .ps-header { padding: 0 10px; gap: 6px; }
    .ps-header-left, .ps-header-actions { gap: 6px; }
    .ps-compact-scope { display: none !important; }
    .ps-period { display: none; }
    .ps-search { min-width: 0; flex: 1 1 0; padding: 0 8px; gap: 6px; }
    .ps-search kbd { display: none; }
    .page-head-copy, .workspace-hero-copy { flex: 0 0 auto !important; width: 100%; }
    .page-head-actions, .workspace-hero-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
    .page-head-actions > .btn, .workspace-hero-actions > .btn { flex: 1 1 auto; min-width: 0; }
    .tv-route-frame,
    .workspace-main,
    .tv-stitch-surface { max-width: 100%; min-width: 0; overflow-x: clip; }
    .table-scroll,
    .table-card,
    .tv-payment-grid-scroll,
    .financial-statement-register,
    .sales-register-table,
    .sales-analysis-register,
    .commercial-analysis-register {
      max-width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .invoice-money-more { display: block; grid-column: 1 / -1; }
    .invoice-money-more-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--nova-accent);
      cursor: pointer;
      padding: 4px 0;
    }
    .invoice-money-more[open] .invoice-money-more-closed { display: none; }
    .invoice-money-more:not([open]) .invoice-money-more-open { display: none; }
    .invoice-money-secondary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
  }

  /* ---- Additional Sub-Route, Daily Work, Reports & Popover Rules -------- */
  .tv-action-menu { position: relative; }
  .tv-action-menu > summary { list-style: none; cursor: pointer; }
  .tv-action-menu > summary::-webkit-details-marker { display: none; }
  .tv-action-menu-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 210px;
    padding: 6px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-popover-bg);
    box-shadow: var(--nova-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 180;
  }
  .tv-action-menu-popover > button,
  .tv-action-menu-popover > a {
    width: 100%;
    justify-content: flex-start;
    border: 0;
    background: transparent;
  }
  .tv-action-menu-popover > button:hover {
    background: var(--nova-surface-hover);
  }

  .invoice-filter-shell { display: flex; flex-direction: column; gap: 10px; }
  .invoice-search {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 220px;
  }
  .invoice-search > span,
  .invoice-sort-field > span {
    font-size: 11px;
    font-weight: 600;
    color: var(--nova-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .invoice-advanced-filters {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
    padding: 8px 14px;
  }
  .invoice-advanced-filters > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--nova-ink-2);
  }
  .invoice-advanced-filters > summary small {
    color: var(--nova-muted);
    font-weight: 450;
  }
  .invoice-filters-advanced {
    margin-top: 10px;
    border: 0;
    padding: 10px 0 4px;
    border-top: 1px solid var(--nova-border-subtle);
  }

  /* Reports tabs & filters */
  .financial-report-family-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .financial-report-family-nav > button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    cursor: pointer;
    text-align: left;
    transition: all 0.14s ease;
  }
  .financial-report-family-nav > button:hover {
    border-color: var(--nova-border-strong);
    background: var(--nova-surface-hover);
  }
  .financial-report-family-nav > button[aria-selected="true"] {
    border-color: var(--nova-accent);
    background: var(--nova-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.18);
  }
  .financial-report-family-nav > button strong { font-size: 13px; font-weight: 620; }
  .financial-report-family-nav > button span { font-size: 11.5px; color: var(--nova-muted); }

  /* Daily Work & Business Cockpit Fallback Home Surfaces */
  .tv-daily-work {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .tv-daily-work__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
  }
  .tv-business-cockpit-kicker {
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .tv-daily-work__tasks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
  }
  .tv-daily-task {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 16px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
  }
  .tv-daily-task:hover {
    border-color: var(--nova-border-accent);
    background: var(--nova-surface-hover);
    transform: translateY(-1px);
  }
  .tv-home-task-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: var(--nova-r-xs);
    background: var(--nova-accent-soft);
    color: var(--nova-accent);
  }
  .tv-daily-task strong { font-size: 14px; font-weight: 620; color: var(--nova-ink); }
  .tv-daily-task span { font-size: 12px; color: var(--nova-muted); line-height: 1.45; }

  .tv-business-cockpit-panel {
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-lg);
    background: var(--nova-surface);
    padding: 18px 20px;
  }

  /* All Features Dialog & Evidence Inspector Nav */
  .ps-features { display: flex; flex-direction: column; gap: 14px; }
  .ps-feature-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
  }
  .ps-feature-results section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .ps-feature-results h3 {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .ps-feature-results .ps-route { color: var(--nova-ink-2); }
  .ps-feature-results .ps-route:hover { background: var(--nova-surface-hover); color: var(--nova-ink); }

  .tvs-filter-empty {
    margin: 8px;
    font-size: 12px;
    color: #64748b;
  }

  .tv-inspector-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .tv-inspector-nav-link {
    padding: 5px 10px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink-2);
    font-size: 12px;
    cursor: pointer;
  }
  .tv-inspector-nav-link:hover { border-color: var(--nova-accent); color: var(--nova-ink); }
  .tv-inspector-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .tv-inspector-section:last-child { border-bottom: 0; }
  .tv-inspector-eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .tv-inspector-section h3 {
    margin: 2px 0 8px;
    font-size: 14px;
    font-weight: 620;
    color: var(--nova-ink);
  }

  /* ---- Sidebar Light-Mode Isolation & Icon Button Contrast ------------- */
  .ps-sidebar .ps-jump-input,
  .ps-sidebar input.tvs-filter-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
  }
  .ps-sidebar .ps-jump-input:focus,
  .ps-sidebar input.tvs-filter-input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(56, 189, 248, 0.5);
  }
  .ps-sidebar .ps-icon-button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
  }
  .ps-sidebar .ps-icon-button:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
  }
  .ps-sidebar .ps-scope-select {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
  }

  /* ---- Table Inline Link Buttons & Row Controls ------------------------ */
  .data-table td button:not(.btn):not(.tv-table-row-opener),
  table td button:not(.btn):not(.tv-table-row-opener) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 5px;
    color: var(--nova-accent);
    font-weight: 560;
    text-align: left;
    transition: background-color 0.12s ease;
  }
  .data-table td button:not(.btn):not(.tv-table-row-opener):hover,
  table td button:not(.btn):not(.tv-table-row-opener):hover {
    background: var(--nova-accent-soft);
    text-decoration: underline;
  }
  .tv-table-row-opener-cell { position: relative; }
  .tv-table-row-opener {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
  }

  /* ---- Customer Account Nested Main Reset ------------------------------ */
  .workspace-main main,
  .tv-pending-managed main {
    display: block;
    min-width: 0;
    padding: 0;
    background: transparent;
  }

  /* ---- Banking Layout & Filter Alignment Fix --------------------------- */
  [data-stitch-screen] .bank-transaction-main,
  .bank-transaction-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .bank-transaction-filters,
  .bank-reconciliation-filters {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)) !important;
    gap: 10px !important;
    align-items: end !important;
  }
  .bank-transaction-filters select,
  .bank-reconciliation-filters select {
    width: 100%;
    min-width: 0;
  }
  [data-stitch-screen] .tv-stitch-book-inspection,
  .tv-stitch-book-inspection {
    position: static !important;
    padding: 18px 20px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
  }

  /* ---- Reports Main Statement Tabs & Filter Polish --------------------- */
  .financial-statement-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
  }
  .financial-statement-tabs > button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    text-align: left;
    transition: all 0.14s ease;
  }
  .financial-statement-tabs > button:hover {
    border-color: var(--nova-border-strong);
    background: var(--nova-surface-hover);
  }
  .financial-statement-tabs > button.active,
  .financial-statement-tabs > button[aria-selected="true"] {
    border-color: var(--nova-accent);
    background: var(--nova-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.22);
  }
  .financial-statement-tabs > button strong { font-size: 13.5px; font-weight: 640; color: var(--nova-ink); }
  .financial-statement-tabs > button.active strong { color: var(--nova-accent); }
  .financial-statement-tabs > button span { font-size: 11.5px; color: var(--nova-muted); line-height: 1.4; }

  .statement-filters,
  .financial-report-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-md);
    background: var(--nova-surface);
  }

  /* ---- Accounts Health / Accounting Command Center (#tv/accounting-dashboard) */
  .tv-accounting-command-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }
  .tv-accounting-context-bar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--nova-r-lg);
    border: 1px solid var(--nova-border);
    background:
      radial-gradient(320px 160px at 0% 0%, rgba(56, 189, 248, 0.08), transparent 70%),
      var(--nova-surface);
  }
  .tv-accounting-command-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .tv-accounting-command-copy > span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .tv-accounting-command-copy > strong {
    font-size: 16px;
    font-weight: 650;
    color: var(--nova-ink);
  }
  .tv-accounting-command-copy > small {
    font-size: 12.5px;
    color: var(--nova-muted);
  }
  .tv-accounting-context-facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--nova-border-subtle);
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .tv-accounting-context-facts > div,
  .tv-accounting-exposure-quality > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .tv-accounting-context-facts dt,
  .tv-accounting-exposure-quality dt {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .tv-accounting-context-facts dd,
  .tv-accounting-exposure-quality dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--nova-ink);
    overflow-wrap: anywhere;
  }
  .tv-accounting-context-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .tv-accounting-trust-band {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }
  .tv-accounting-trust-cell {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 16px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
  }
  .tv-accounting-trust-cell > span {
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .tv-accounting-trust-cell > strong {
    font-size: 17px;
    font-weight: 680;
    color: var(--nova-ink);
  }
  .tv-accounting-trust-cell > small { font-size: 12px; color: var(--nova-muted); }
  .tv-accounting-trust-cell[data-tone="success"] > strong { color: var(--nova-green); }
  .tv-accounting-trust-cell[data-tone="warning"] > strong { color: var(--nova-amber); }
  .tv-accounting-trust-cell[data-tone="danger"] > strong { color: var(--nova-red); }

  .tv-accounting-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
    align-items: start;
  }
  .tv-accounting-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--nova-r-lg);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    min-width: 0;
  }
  .tv-accounting-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .tv-accounting-section-head h2 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 650;
    color: var(--nova-ink);
  }
  .tv-accounting-section-head p,
  .tv-accounting-section-copy {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--nova-muted);
    line-height: 1.45;
  }
  .tv-accounting-state {
    flex: none;
    padding: 2px 9px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    font-size: 11px;
    font-weight: 600;
    color: var(--nova-ink-2);
    text-transform: capitalize;
  }
  .tv-accounting-state[data-state="available"] {
    background: var(--nova-green-soft);
    border-color: rgba(52, 211, 153, 0.25);
    color: var(--nova-green);
  }
  .tv-accounting-state[data-state="partial"],
  .tv-accounting-state[data-state="not_configured"] {
    background: var(--nova-amber-soft);
    border-color: rgba(251, 191, 36, 0.28);
    color: var(--nova-amber);
  }
  .tv-accounting-state[data-state="unavailable"],
  .tv-accounting-state[data-state="not_authorized"] {
    background: var(--nova-red-soft);
    border-color: rgba(251, 113, 133, 0.28);
    color: var(--nova-red);
  }

  .tv-accounting-attention-list,
  .tv-accounting-currency-grid,
  .tv-accounting-exposure-list,
  .tv-accounting-coverage-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .tv-accounting-attention-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    text-align: left;
    transition: border-color 0.14s ease, background-color 0.14s ease;
  }
  .tv-accounting-attention-row:hover {
    border-color: var(--nova-border-accent);
    background: var(--nova-surface-hover);
  }
  .tv-accounting-attention-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: var(--nova-r-xs);
    background: var(--nova-amber-soft);
    color: var(--nova-amber);
    font-family: var(--nova-mono);
    font-size: 11px;
    font-weight: 700;
  }
  .tv-accounting-attention-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }
  .tv-accounting-attention-copy > span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-amber);
  }
  .tv-accounting-attention-copy > strong {
    font-size: 13px;
    font-weight: 620;
    color: var(--nova-ink);
  }
  .tv-accounting-attention-copy > small {
    font-size: 11.5px;
    color: var(--nova-muted);
    line-height: 1.4;
  }
  .tv-accounting-attention-measure {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--nova-ink);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .tv-accounting-currency-card,
  .tv-accounting-exposure-row,
  .tv-accounting-coverage-row {
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .tv-accounting-coverage-progress {
    height: 6px;
    width: 100%;
    border-radius: var(--nova-r-pill);
    background: var(--nova-surface-subtle);
    overflow: hidden;
  }
  .tv-accounting-coverage-progress > span {
    display: block;
    height: 100%;
    border-radius: var(--nova-r-pill);
    background: linear-gradient(90deg, var(--nova-accent), var(--nova-teal));
  }
  .tv-accounting-exposure-quality {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--nova-border-subtle);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  .tv-accounting-empty {
    padding: 14px;
    border-radius: var(--nova-r-md);
    border: 1px dashed var(--nova-border);
    color: var(--nova-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .tv-accounting-empty strong { font-size: 13px; color: var(--nova-ink); }
  .tv-accounting-limitations {
    margin: 0;
    padding-left: 16px;
    font-size: 11.5px;
    color: var(--nova-muted);
  }

  /* ---- Additional Utility Button Variants (.tv-text-link, .btn-secondary, .btn-block) */
  .btn-block { width: 100%; }
  .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 13px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink-2);
    font-size: 12.5px;
    font-weight: 550;
    cursor: pointer;
    white-space: nowrap;
  }
  .btn-secondary:hover:not(:disabled) {
    border-color: var(--nova-border-strong);
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .tv-text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--nova-accent);
    font-weight: 560;
    padding: 2px 4px;
    cursor: pointer;
  }
  .tv-text-link:hover { text-decoration: underline; }

  /* =========================================================================
     NOVA R3 BRUTAL AUDIT FIXES (Search, Light Rail, Drawers, Views, Mobile)
     ========================================================================= */

  /* 1. Studio Light Theme Sidebar & Control Coherence (#15) */
  [data-tv-theme="light"] .ps-app .ps-sidebar {
    background: var(--nova-rail-bg);
    border-right: 1px solid var(--nova-border);
    color: #334155;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-sidebar-top { border-bottom-color: rgba(15, 23, 42, 0.08); }
  [data-tv-theme="light"] .ps-sidebar .ps-brand strong { color: #0f172a; }
  [data-tv-theme="light"] .ps-sidebar .ps-brand small { color: #0284c7; }
  [data-tv-theme="light"] .ps-sidebar .ps-scope { color: #64748b; }
  [data-tv-theme="light"] .ps-sidebar .ps-scope-copy strong { color: #0f172a; }
  [data-tv-theme="light"] .ps-sidebar .ps-scope-copy small,
  [data-tv-theme="light"] .ps-sidebar .ps-scope-copy span { color: #64748b; }
  [data-tv-theme="light"] .ps-sidebar .ps-icon-button,
  [data-tv-theme="light"] #tv-app .ps-sidebar .ps-mobile-close {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    color: #334155;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-icon-button:hover {
    background: #e2e8f0;
    color: #0f172a;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-scope-select,
  [data-tv-theme="light"] .ps-sidebar .ps-jump-input,
  [data-tv-theme="light"] .ps-sidebar input.tvs-filter-input {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
    color: #0f172a;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-jump-input::placeholder { color: #64748b; }
  [data-tv-theme="light"] .ps-sidebar .ps-nav-caption { color: #64748b; }
  [data-tv-theme="light"] .ps-sidebar .ps-route { color: #334155; }
  [data-tv-theme="light"] .ps-sidebar .ps-route > .icon { color: #64748b; }
  [data-tv-theme="light"] .ps-sidebar .ps-route:hover {
    background: var(--nova-rail-hover);
    color: #0f172a;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-route:hover > .icon { color: #0f172a; }
  [data-tv-theme="light"] .ps-sidebar .ps-route.is-active {
    background: var(--nova-rail-active);
    color: #0284c7;
    box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.18);
  }
  [data-tv-theme="light"] .ps-sidebar .ps-route.is-active > .icon { color: #0284c7; }
  [data-tv-theme="light"] .ps-sidebar .ps-all-features {
    border-top-color: rgba(15, 23, 42, 0.09);
    color: #475569;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-create-shortcut { color: #0284c7; }
  .ps-feature-results .ps-route { color: var(--nova-ink-2); }
  .ps-feature-results .ps-route:hover {
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .tv-stitch-purchasing table,
  .tv-stitch-ledger table {
    min-width: 780px;
  }
  .tv-stitch-purchasing :is(th, td),
  .tv-stitch-ledger :is(th, td) {
    padding: 9px 11px;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-sidebar-footer {
    border-top-color: rgba(15, 23, 42, 0.08);
  }
  [data-tv-theme="light"] .ps-sidebar .ps-create {
    background: rgba(2, 132, 199, 0.10);
    border-color: rgba(2, 132, 199, 0.25);
    color: #0369a1;
  }
  [data-tv-theme="light"] .ps-sidebar .ps-create:hover {
    background: rgba(2, 132, 199, 0.16);
    color: #0f172a;
  }
  [data-tv-theme="light"] .ps-mode-option.is-selected {
    background: #ffffff;
    color: #0f172a;
    box-shadow: var(--nova-shadow-sm);
  }

  /* 2. Global Search Command Palette (Cmd+K) (#1) */
  .modal.global-search-modal-v2 { width: min(780px, 100%); }
  .global-search-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
  }
  .global-search-query {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 44px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-input-bg);
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
  }
  .global-search-query:focus-within {
    border-color: var(--nova-accent);
    box-shadow: 0 0 0 3px var(--nova-accent-soft);
  }
  .global-search-query-icon {
    display: inline-flex;
    color: var(--nova-muted);
    flex: none;
  }
  .global-search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 14px !important;
  }
  .global-search-clear-query {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--nova-r-xs);
    color: var(--nova-muted);
    flex: none;
  }
  .global-search-clear-query:hover {
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .global-search-feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--nova-muted);
  }
  .global-search-status { margin: 0; }
  .global-search-keyboard-help {
    font-family: var(--nova-mono);
    font-size: 11px;
    color: var(--nova-dim);
  }
  .global-search-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .global-search-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 300px;
  }
  .global-search-type-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 11px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-size: 12px;
    font-weight: 550;
  }
  .global-search-type-filter strong {
    font-size: 11px;
    color: var(--nova-muted);
    font-variant-numeric: tabular-nums;
  }
  .global-search-type-filter:hover {
    border-color: var(--nova-border-strong);
    color: var(--nova-ink);
  }
  .global-search-type-filter.is-active {
    background: var(--nova-accent-soft);
    border-color: var(--nova-accent);
    color: var(--nova-accent);
  }
  .global-search-type-filter.is-active strong { color: var(--nova-accent); }
  .global-search-type-select { display: none; }
  .global-search-refinements { position: relative; }
  .global-search-refinements > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-size: 12px;
    cursor: pointer;
    list-style: none;
  }
  .global-search-refinements > summary::-webkit-details-marker { display: none; }
  .global-search-refinements > summary small { color: var(--nova-muted); }
  .global-search-refinement-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 240px;
    padding: 12px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-popover-bg);
    box-shadow: var(--nova-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 25;
  }
  .global-search-status-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .global-search-test-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
  }
  .global-search-test-option strong { display: block; color: var(--nova-ink); }
  .global-search-test-option small { display: block; color: var(--nova-muted); font-size: 11px; }
  .global-search-results {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: min(56dvh, 460px);
    overflow-y: auto;
    padding-right: 2px;
  }
  .global-search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .global-search-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px;
  }
  .global-search-group > header > div {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
  }
  .global-search-group h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .global-search-group > header > div > span {
    font-size: 11.5px;
    color: var(--nova-dim);
  }
  .global-search-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nova-accent);
  }
  .global-search-group-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .global-search-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    color: var(--nova-ink);
    text-align: left;
    transition: border-color 0.14s ease, background-color 0.14s ease;
  }
  .global-search-result:hover,
  .global-search-result:focus-visible {
    border-color: var(--nova-border-accent);
    background: var(--nova-surface-hover);
  }
  .global-search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--nova-r-sm);
    display: grid;
    place-items: center;
    background: var(--nova-accent-soft);
    color: var(--nova-accent);
  }
  .global-search-result-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }
  .global-search-result-title {
    font-size: 13.5px;
    font-weight: 620;
    color: var(--nova-ink);
    overflow-wrap: anywhere;
  }
  .global-search-result-description {
    font-size: 12px;
    color: var(--nova-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .global-search-result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--nova-dim);
  }
  .global-search-result-kind {
    padding: 1px 7px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-weight: 550;
  }
  .global-search-result-status {
    padding: 1px 7px;
    border-radius: var(--nova-r-pill);
    font-weight: 600;
  }
  .global-search-result-status.is-success { background: var(--nova-green-soft); color: var(--nova-green); }
  .global-search-result-status.is-warning { background: var(--nova-amber-soft); color: var(--nova-amber); }
  .global-search-result-status.is-danger { background: var(--nova-red-soft); color: var(--nova-red); }
  .global-search-result-trailing {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
  }
  .global-search-result-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-variant-numeric: tabular-nums;
  }
  .global-search-result-amount small {
    font-size: 10.5px;
    color: var(--nova-muted);
    font-weight: 450;
  }
  .global-search-result-amount strong {
    font-size: 13px;
    font-weight: 650;
    color: var(--nova-ink);
    white-space: nowrap;
  }
  .global-search-result-open {
    font-size: 12px;
    font-weight: 600;
    color: var(--nova-accent);
    white-space: nowrap;
  }
  .global-search-empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: var(--nova-r-md);
    border: 1px dashed var(--nova-border-strong);
    background: var(--nova-surface-subtle);
  }
  .global-search-empty-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--nova-r-sm);
    display: grid;
    place-items: center;
    background: var(--nova-accent-soft);
    color: var(--nova-accent);
    flex: none;
  }
  .global-search-empty-state h3 { margin: 0 0 3px; font-size: 14px; color: var(--nova-ink); }
  .global-search-empty-state p { margin: 0; font-size: 12.5px; color: var(--nova-muted); }

  /* 3. Global Key-Value Description Lists (<dl>) (#3) */
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> dt) {
    display: grid;
    grid-template-columns: minmax(130px, 38%) minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> dt) > dt {
    color: var(--nova-muted);
    font-size: 12px;
    font-weight: 560;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> dt) > dd {
    margin: 0;
    color: var(--nova-ink);
    font-size: 13px;
    font-weight: 580;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> div) {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 4px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> div) > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:not(.ps-help-shortcuts):not(.tv-accounting-context-facts):not(.tv-accounting-exposure-quality):has(> div) > div:last-child {
    border-bottom: 0;
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:has(> div) dt {
    color: var(--nova-muted);
    font-size: 12px;
    font-weight: 560;
  }
  :is(.drawer-body, .modal-body, .ps-workspace, .tv-stitch-surface) dl:has(> div) dd {
    margin: 0;
    color: var(--nova-ink);
    font-size: 13px;
    font-weight: 580;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }

  /* 4. Invoice Drawer Action Popover & Table Fit (#4) */
  .drawer-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    position: relative;
  }
  .invoice-drawer-more,
  .supplier-bill-more-actions,
  .tv-receipt-more-actions {
    position: relative;
  }
  .invoice-drawer-more > summary,
  .supplier-bill-more-actions > summary,
  .tv-receipt-more-actions > summary {
    list-style: none;
    cursor: pointer;
  }
  .invoice-drawer-more > summary::-webkit-details-marker,
  .supplier-bill-more-actions > summary::-webkit-details-marker,
  .tv-receipt-more-actions > summary::-webkit-details-marker {
    display: none;
  }
  .invoice-drawer-menu,
  .tv-receipt-more-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 224px;
    max-width: min(300px, calc(100vw - 32px));
    padding: 6px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-popover-bg);
    box-shadow: var(--nova-shadow-lg);
    display: flex !important;
    flex-direction: column;
    gap: 3px;
    z-index: 260;
  }
  .invoice-drawer-menu > button,
  .tv-receipt-more-menu > button {
    width: 100%;
    justify-content: flex-start;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--nova-r-xs);
    background: transparent;
    color: var(--nova-ink-2);
    font-size: 12.5px;
    font-weight: 520;
    text-align: left;
  }
  .invoice-drawer-menu > button:hover:not(:disabled),
  .tv-receipt-more-menu > button:hover:not(:disabled) {
    background: var(--nova-surface-hover);
    color: var(--nova-ink);
  }
  .invoice-drawer-menu-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--nova-border-subtle);
  }
  .invoice-drawer-menu-heading strong {
    font-size: 12.5px;
    font-weight: 650;
    color: var(--nova-ink);
  }
  .invoice-drawer-menu-heading span {
    font-size: 11px;
    line-height: 1.4;
    color: var(--nova-muted);
  }
  .invoice-drawer-menu-separator {
    height: 1px;
    margin: 4px 0;
    background: var(--nova-border);
  }
  .drawer .table-scroll,
  .drawer .table-card {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--nova-border);
    border-radius: var(--nova-r-sm);
  }

  /* 5. Payment Detail Drawer Tabs, Metrics, History, Popover & Customer Advances (#5, #3) */
  .tv-receipt-drawer .drawer-body .tv-receipt-more-menu {
    top: auto;
    bottom: calc(100% + 6px);
    left: 0;
    right: auto;
  }
  .tv-stitch-payment-money,
  .tv-receipt-detail-command {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }
  .tv-receipt-decision-metric,
  .tv-receipt-detail-amount {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .tv-receipt-decision-metric > span,
  .tv-receipt-detail-amount > span {
    position: static;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .tv-receipt-decision-metric > strong,
  .tv-receipt-detail-amount > strong {
    position: static;
    font-size: 16px;
    font-weight: 680;
    color: var(--nova-ink);
    font-variant-numeric: tabular-nums;
  }
  .tv-receipt-decision-metric > small,
  .tv-receipt-detail-amount > small {
    position: static;
    font-size: 11.5px;
    color: var(--nova-muted);
    line-height: 1.4;
  }
  .tv-receipt-info,
  .info-line,
  .health-line:not(.inventory-tax-command-center-host .health-line):not(.tv-invoice-detail-grid .health-line):not(.supplier-bill-detail .health-line) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--nova-border-subtle);
    font-size: 13px;
  }
  .tv-receipt-info:last-child,
  .info-line:last-child,
  .health-line:not(.inventory-tax-command-center-host .health-line):not(.tv-invoice-detail-grid .health-line):not(.supplier-bill-detail .health-line):last-child {
    border-bottom: 0;
  }
  .tv-receipt-info > span,
  .info-line > span,
  .health-line:not(.inventory-tax-command-center-host .health-line):not(.tv-invoice-detail-grid .health-line):not(.supplier-bill-detail .health-line) > span:first-child {
    color: var(--nova-muted);
    font-size: 12px;
    font-weight: 560;
    flex: none;
  }
  .tv-receipt-info > strong,
  .info-line > strong,
  .health-line:not(.inventory-tax-command-center-host .health-line):not(.tv-invoice-detail-grid .health-line):not(.supplier-bill-detail .health-line) > :is(strong, .health-line-value, .value-pill, .btn) {
    color: var(--nova-ink);
    font-weight: 600;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }
  .tv-payment-history-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .tv-payment-history-list > li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .tv-payment-history-list > li > strong {
    font-size: 13px;
    font-weight: 640;
    color: var(--nova-ink);
  }
  .tv-payment-history-list > li > time,
  .tv-payment-history-list > li > small {
    font-size: 11.5px;
    color: var(--nova-muted);
    font-family: var(--nova-mono);
    overflow-wrap: anywhere;
  }
  .tv-payment-history-list > li > p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--nova-ink-2);
  }
  ol.tv-allocation-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    counter-reset: tv-step;
  }
  ol.tv-allocation-steps > li {
    counter-increment: tv-step;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink);
    font-size: 13px;
    font-weight: 560;
  }
  ol.tv-allocation-steps > li::before {
    content: counter(tv-step);
    width: 24px;
    height: 24px;
    border-radius: var(--nova-r-pill);
    display: grid;
    place-items: center;
    background: var(--nova-accent-soft);
    border: 1px solid var(--nova-border-accent);
    color: var(--nova-accent);
    font-size: 11.5px;
    font-weight: 700;
    flex: none;
  }
  .tv-payment-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .tv-payment-detail-tabs [role="tab"],
  .tv-payment-detail-tabs button {
    flex: 1 1 auto;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: var(--nova-muted);
    font-size: 12.5px;
    font-weight: 560;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
  }
  .tv-payment-detail-tabs [role="tab"][aria-selected="true"],
  .tv-payment-detail-tabs button[aria-selected="true"] {
    background: var(--nova-surface);
    color: var(--nova-ink);
    box-shadow: inset 0 0 0 1px var(--nova-border-strong);
  }
  .tv-receipt-attachment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .tv-receipt-attachment,
  .tv-receipt-attachment-card,
  .tv-receipt-attachment-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .tv-receipt-attachment-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .tv-receipt-attachment-copy strong { font-size: 13px; color: var(--nova-ink); overflow-wrap: anywhere; }
  .tv-receipt-attachment-copy span,
  .tv-receipt-attachment-copy small { font-size: 11.5px; color: var(--nova-muted); }
  .tv-receipt-attachment img,
  .tv-receipt-attachment-card img,
  .tv-receipt-attachment-item img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: var(--nova-r-sm);
    border: 1px solid var(--nova-border);
    background: var(--nova-bg);
  }
  .tv-receipt-attachment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .tv-receipt-detail ol,
  .customer-advances-server-host ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .customer-advances-server-host ol > li {
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
  }

  /* 6. AR Aging Buckets & Filter Controls (#6, #11, #12) */
  .tv-stitch-aging :is(.ar-aging-segment, .ap-aging-bucket) {
    background: var(--nova-surface) !important;
    border: 1px solid var(--nova-border) !important;
    border-radius: var(--nova-r-md) !important;
    padding: 14px 16px !important;
    margin-bottom: 4px;
    color: var(--nova-ink);
    transition: border-color 0.14s ease, background-color 0.14s ease;
  }
  .tv-stitch-aging :is(.ar-aging-segment, .ap-aging-bucket):hover,
  .tv-stitch-aging :is(.ar-aging-segment, .ap-aging-bucket)[aria-pressed="true"] {
    border-color: var(--nova-border-accent) !important;
    background: var(--nova-surface-hover) !important;
  }
  .ar-aging-customer-register-unavailable {
    padding: 18px 20px;
    border-radius: var(--nova-r-md);
    border: 1px dashed var(--nova-border-strong);
    background: var(--nova-surface);
  }
  .financial-statement-filters {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
  }
  .financial-statement-filters > label {
    display: grid;
    gap: 6px;
    min-width: 0;
    flex: 1 1 155px;
  }
  .financial-statement-filters > label:has(input[type="search"]) {
    flex: 2 1 240px;
    min-width: 220px;
  }
  .financial-statement-filters > label :is(input, select),
  .ar-aging-filters input[type="search"] {
    width: 100%;
    min-width: 0;
  }
  .financial-statement-filters > button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* 7. Invoice Editor Toolbar & Meta Alignment (#10) */
  .tv-invoice-editor-primary .section-head {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    justify-content: space-between;
    gap: 12px;
  }
  .tv-invoice-editor-primary .invoice-line-toolbar-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
  }
  .tv-stitch-invoice-editor .invoice-meta-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)) !important;
    align-items: end;
    gap: 14px;
  }

  /* 8. Accounting Attention Measures & General Ledger Badges (#13, #14) */
  .tv-accounting-attention-measure {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
  }
  .tv-accounting-attention-measure > strong {
    font-size: 13px;
    font-weight: 660;
    color: var(--nova-ink);
  }
  .tv-accounting-attention-measure > small {
    padding: 2px 8px;
    border-radius: var(--nova-r-pill);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface);
    color: var(--nova-ink-2);
    font-size: 11px;
    font-weight: 550;
  }
  .tv-accounting-attention-measure > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--nova-accent);
  }
  .tv-gl-entry-account,
  .tv-gl-entry-voucher {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .tv-gl-entity,
  .tv-gl-currency-row,
  .tv-gl-register td > div,
  .entity-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }
  .tv-gl-register td button {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .tv-gl-entity > small,
  .tv-gl-register td > div > small,
  .entity-cell > small {
    font-size: 11.5px;
    color: var(--nova-muted);
    line-height: 1.35;
  }
  .tv-payment-grid td .btn,
  .tv-payment-grid td button {
    white-space: nowrap;
  }

  /* 9. Invoice Loading Header, Scope Counter, CoA Badges & Modals (#18-#25) */
  .invoice-register-loading-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
  }
  .invoice-register-loading-head strong {
    font-size: 14px;
    font-weight: 620;
    color: var(--nova-ink);
  }
  .invoice-register-loading-head span {
    font-size: 12.5px;
    color: var(--nova-muted);
  }
  .nova-invoice-scope-inline {
    white-space: nowrap;
    flex: none;
  }
  .tv-route-summary-toggle {
    order: 99;
    grid-column: 1 / -1;
    justify-self: start;
  }
  .badge,
  .tv-coa-status {
    text-transform: capitalize;
  }
  .ps-feature-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    align-items: stretch;
  }
  .ps-feature-results > section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .ps-feature-results > section > h3 {
    margin: 0 0 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nova-accent);
  }
  .ps-help {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .ps-help-shortcuts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 16px;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .ps-help-shortcut-row { display: contents; }
  .ps-help-shortcut-row dt { display: flex; align-items: center; }
  .ps-help-shortcut-row kbd {
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid var(--nova-border-strong);
    background: var(--nova-surface);
    color: var(--nova-ink);
    font-family: var(--nova-mono);
    font-size: 11px;
    white-space: nowrap;
  }
  .ps-help-shortcut-row dd {
    margin: 0;
    font-size: 12.5px;
    color: var(--nova-ink-2);
    align-self: center;
  }
  .ps-help-tips p {
    margin: 0 0 6px;
    font-size: 12.5px;
    color: var(--nova-muted);
  }
  .ps-help-tips p:last-child { margin-bottom: 0; }

  /* 10. Modal Forms & Write-Off Controls */
  .modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .modal-form label,
  .modal-form .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    font-weight: 560;
    color: var(--nova-ink-2);
  }
  .modal-form :is(input, select, textarea) {
    width: 100%;
    min-width: 0;
  }
  .writeoff-ledger-preview {
    display: flex;
    flex-direction: column;
    padding: 4px 14px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
  }
  .drawer.writeoff-drawer {
    width: min(760px, 100vw);
  }
  .drawer-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  /* 11. Global Entity & Money Table Cell Stacking & Invoice Drawer Containment (r5) */
  .tv-entity-cell,
  .tv-money-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
  }
  .tv-entity-cell > strong,
  .tv-money-cell > strong {
    font-weight: 620;
    color: var(--nova-ink);
    line-height: 1.35;
  }
  .tv-entity-cell > span,
  .tv-money-cell > span {
    font-size: 12px;
    color: var(--nova-ink-2);
    line-height: 1.35;
  }
  .tv-entity-cell > small,
  .tv-money-cell > small {
    font-size: 11px;
    color: var(--nova-muted);
    line-height: 1.35;
  }

  .drawer.drawer-invoice-detail--cockpit .drawer-body {
    overflow-x: hidden;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    max-width: 100%;
    padding: 0;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .tv-invoice-drawer-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] :is(.tv-invoice-summary-card, .tv-invoice-record-layout, .tv-invoice-record-content, .tv-invoice-record-governance, .editor-card) {
    min-width: 0;
    max-width: 100%;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .tv-invoice-record-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .tv-invoice-record-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .tv-invoice-record-governance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .editor-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: var(--nova-r-md);
    border: 1px solid var(--nova-border);
    background: var(--nova-surface-subtle);
    overflow: hidden;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .editor-card h2 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--nova-border);
    font-size: 12px;
    font-weight: 680;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nova-muted);
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--nova-border-subtle);
    font-size: 13px;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field:last-child {
    border-bottom: 0;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field > dt {
    color: var(--nova-muted);
    font-size: 12px;
    font-weight: 560;
    flex: none;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field > dd {
    margin: 0;
    min-width: 0;
    color: var(--nova-ink);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] :is(.invoice-record-eligibility, .invoice-record-account) {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--nova-border-subtle);
    font-size: 12.5px;
  }
  .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-lines {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  @media (max-width: 600px) {
    .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field,
    .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] :is(.invoice-record-eligibility, .invoice-record-account) {
      flex-direction: column;
      gap: 3px;
    }
    .drawer-invoice-detail.drawer-invoice-detail--cockpit .tv-invoice-drawer[data-stitch-screen="3368c740353a4eceac13a45ed3b8c7d3"] .invoice-record-profile-field > dd {
      text-align: left;
    }
  }

  /* 12. Full-Fluid Workspace Canvas & Vertical/Horizontal De-Bloating (r7) */
  .ps-workspace :is([data-tv-rendered-route-id], .tv-stitch-surface, .tv-route-frame, .tv-home-premium, .consolidation-workspace, .tv-stitch-pending-ledger, .tv-stitch-account) {
    width: 100%;
    max-width: none !important;
    margin-inline: 0 !important;
  }

  /* Remove redundant 20-24px outer padding on subroute hosts already padded by .ps-workspace */
  .ps-workspace > :is([data-tv-rendered-route-id], .tv-stitch-surface, .tv-route-host, .tv-customer-route-host, .purchase-orders-host, .purchase-requisitions-host, .supplier-bills-server-host, .budgets-server-host, .payment-runs-server-host, .recurring-server-host, .opening-balance-server-host, .inventory-tax-command-center-host, .consolidation-route-host, .users-roles-route-host, .customer-advances-server-host, .tv-route-frame, .tv-home-premium):not(.tv-state-surface):not(.empty-state):not(.panel):not(.tv-empty-state):not(.route-state),
  .ps-workspace > * > :is(.tv-route-frame, .tv-stitch-surface):not(.tv-state-surface):not(.empty-state):not(.panel) {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  /* Unified vertical rhythm across subroutes, heroes, KPI strips, filters, tables & empty states */
  .ps-workspace .tv-route-frame,
  .ps-workspace :is(.workspace-body, .workspace-main, .route-stack, .financial-statement-main, .tv-accounting-command-shell, .tv-stitch-customers, .tv-stitch-pending-ledger, .tv-stitch-account, .consolidation-workspace) {
    gap: 12px !important;
  }
  .ps-workspace :is(.page-head, .workspace-hero) {
    padding: 2px 0 10px !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--nova-border-subtle) !important;
    border-radius: 0 !important;
  }
  .ps-workspace :is(.page-head, .workspace-hero) :is(h1, h2) {
    margin: 0 !important;
    font-size: clamp(22px, 2.1vw, 26px);
    line-height: 1.15;
    letter-spacing: -0.03em;
  }
  .ps-workspace :is(.page-head, .workspace-hero) p {
    max-width: min(100%, 110ch) !important;
    margin: 0 !important;
  }
  .ps-workspace :is(.summary-grid, .workspace-stats, .consolidation-summary, .invoice-money-bar, .tv-accounting-trust-band, .tv-stitch-account-metrics) {
    margin-block: 0 !important;
    gap: 10px !important;
  }
  .ps-workspace :is(.kpi, .money-card, .workspace-stat, .consolidation-stat, .tv-route-summary-cell, .tv-accounting-trust-cell, .tv-stitch-account-metric) {
    min-height: 0 !important;
    padding: 11px 14px !important;
    gap: 3px !important;
  }
  .ps-workspace :is(.kpi strong, .money-card strong, .workspace-stat strong, .consolidation-stat strong) {
    font-size: clamp(18px, 1.55vw, 22px);
    line-height: 1.15;
  }
  .ps-workspace :is(.filters, .filter-bar, .filter-row, .invoice-filters-bar, .purchase-order-filters, .adjustment-note-filters, .customer-credit-filters, .statement-filters, .financial-report-controls) {
    margin-block: 0 !important;
    padding: 10px 12px !important;
    gap: 8px 10px !important;
  }
  .ps-workspace :is(.tv-attention-list, .tv-customer-register-summary-disclosure, .bank-account-filter-disclosure, .bank-reconciliation-refresh-alert, .tv-managed-ledger-tabs, .tv-managed-ledger-group, .tv-managed-ledger-total-grid) {
    margin-block: 0 !important;
  }
  .ps-workspace :is(.tv-empty-state, .tv-loading-state, .tv-state-surface, .empty-state, .tv-register-empty-state, .invoice-empty-state, .tv-operational-empty) {
    padding: 18px 20px !important;
    min-height: 0 !important;
  }
  .ps-workspace .data-table .empty-row td {
    padding: 20px 16px;
  }
  .ps-workspace .tv-stitch-read-error {
    padding: 4px 0 !important;
    min-height: 0 !important;
  }
  .ps-workspace .tv-stitch-surface :is(button, .btn):not(.tv-table-row-opener) {
    min-height: 0;
  }
  .ps-workspace .tv-stitch-settings :is(.settings-section-nav, .settings-setup-hub, .settings-business-grid > *, .settings-current-details > header) {
    padding: 14px 16px;
  }
  .ps-workspace .tv-stitch-settings :is(.settings-guided-main, .settings-business-grid, .settings-current-details) {
    gap: 12px;
  }
  @media (min-width: 761px) {
    .ps-workspace :is(.filters, .filter-bar, .filter-row, .purchase-order-filters, .adjustment-note-filters, .customer-credit-filters) :is(input:not([type="checkbox"]):not([type="radio"]), select) {
      min-height: 36px;
      height: 36px;
      padding: 6px 10px;
    }
    .ps-workspace .tv-stitch-customers :is(button, input:not([type="checkbox"]):not([type="radio"]), select) {
      min-height: 36px;
    }
  }
  @media (max-width: 760px) {
    .ps-workspace .tv-stitch-surface :is(button, .btn):not(.tv-table-row-opener):not(td button):not(.invoice-ledger-link) {
      min-height: 40px;
    }
  }
}
