/* ============================================================================
 * Kids Premier ERP — Premium Calm Executive override layer
 * ----------------------------------------------------------------------------
 * Phase 1 live-pilot. URL-driven flag: ?design=executive on any ERP page sets
 * data-design="executive" on <html> via inline IIFE in base.html.
 *
 * EVERY rule in this file is strictly scoped under [data-design="executive"].
 * Without the flag this file is INERT — zero impact on production UI.
 *
 * Loaded AFTER theme-tweakcn.css. Direction documented in:
 *   docs/ui/calm_operator_dashboard_prototype.html
 *
 * Visual direction: Premium Calm Executive / Emerald Ledger
 *   light  -> warm ivory / pearl background, deep emerald primary
 *   dark   -> deep graphite, warm-ivory text, emerald lifted
 *   accent -> dosed champagne (used very sparingly)
 *
 * Layer order (top to bottom):
 *   1. Optional premium serif for KPI numerics / headings (Fraunces)
 *   2. Token override layer (light + dark)
 *   3. Legacy variable bridge (--body-bg, --card-bg, --text-primary, ...)
 *   4. Base page surfaces (body, animations, scrollbars)
 *   5. Visual noise neutralizers (gradient-text, btn-3d, glass-card,
 *      neon-border, .kpi-card::before, animated background)
 *   6. Component repaint (sidebar, kpi-card, table-modern, data-table,
 *      form-control-modern, badge-modern, alert-modern, pagination,
 *      buttons, fab, toasts, search modal)
 *   7. Targeted Tailwind utility overrides
 *      (used heavily by AI Assistant page and dashboard)
 *   8. Form control hardcoded-value overrides (style.css uses !important on
 *      input/select/textarea per data-theme; we win with higher specificity
 *      under our scope)
 *
 * Rollback: remove <link> to this file from templates/base.html (one line).
 * ============================================================================ */

/* Premium serif for headings + KPI numerics. Falls back to Inter if blocked. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');

/* ============================================================================
 * 1. TOKEN OVERRIDE LAYER — light
 * ============================================================================ */
[data-design="executive"]:root,
[data-design="executive"][data-theme="light"] {
    --background:           oklch(0.974 0.004 250);
    --background-glow:      oklch(0.992 0.006 250);
    --foreground:           oklch(0.18 0.018 240);
    --foreground-strong:    oklch(0.12 0.020 240);

    --card:                 oklch(1.000 0 0);
    --card-tint:            oklch(0.989 0.004 250);
    --card-foreground:      oklch(0.18 0.018 240);
    --card-highlight:       oklch(1 0 0 / 0.85);

    --popover:              oklch(1.000 0 0);
    --popover-foreground:   oklch(0.18 0.018 240);

    --muted:                oklch(0.960 0.005 250);
    --muted-strong:         oklch(0.934 0.006 250);
    --muted-foreground:     oklch(0.46 0.015 240);

    --border:               oklch(0.906 0.006 255);
    --border-strong:        oklch(0.840 0.008 255);
    --hairline:             oklch(0.938 0.005 255);

    --input:                oklch(1.000 0 0);

    --primary:              oklch(0.42 0.09 162);
    --primary-strong:       oklch(0.36 0.10 162);
    --primary-foreground:   oklch(0.985 0.005 90);
    --primary-soft:         oklch(0.94 0.030 162);
    --primary-soft-fg:      oklch(0.32 0.10 162);
    --primary-edge:         oklch(0.34 0.09 162);
    --ring:                 oklch(0.45 0.10 162);

    --secondary:            oklch(0.42 0.09 162);
    --secondary-foreground: oklch(0.985 0.005 90);
    --accent:               oklch(0.42 0.09 162);
    --accent-foreground:    oklch(0.985 0.005 90);

    --champagne:            oklch(0.74 0.06 75);
    --champagne-soft:       oklch(0.95 0.025 75);
    --champagne-fg:         oklch(0.42 0.06 75);

    --success:              oklch(0.50 0.12 155);
    --success-soft:         oklch(0.95 0.030 155);
    --success-soft-fg:      oklch(0.34 0.12 155);

    --warning:              oklch(0.65 0.13 65);
    --warning-soft:         oklch(0.96 0.040 80);
    --warning-soft-fg:      oklch(0.42 0.13 65);

    --destructive:          oklch(0.50 0.16 25);
    --destructive-foreground: oklch(0.99 0 0);
    --destructive-soft:     oklch(0.96 0.030 25);
    --destructive-soft-fg:  oklch(0.40 0.17 25);

    --neutral-soft:         oklch(0.93 0.008 240);
    --neutral-soft-fg:      oklch(0.36 0.015 240);

    --radius:               0.5rem;
    --radius-card:          0.625rem;
    --radius-button:        0.375rem;

    --shadow-xs:            0 1px 1px 0 oklch(0 0 0 / 0.03);
    --shadow-sm:            0 1px 2px 0 oklch(0 0 0 / 0.04);
    --shadow-card:          0 1px 2px 0 oklch(0 0 0 / 0.06), 0 8px 18px -12px oklch(0.20 0.03 255 / 0.18);
    --shadow-md:            0 8px 20px -8px oklch(0.20 0.03 255 / 0.16), 0 2px 6px -2px oklch(0 0 0 / 0.05);
    --shadow-lg:            0 20px 46px -14px oklch(0.18 0.03 255 / 0.24), 0 6px 16px -6px oklch(0 0 0 / 0.08);
    --shadow-press-light:   inset 0 1px 0 oklch(1 0 0 / 0.85);
    --shadow-press-primary: inset 0 1px 0 oklch(1 0 0 / 0.18);
}

/* ============================================================================
 * 1b. TOKEN OVERRIDE LAYER — dark (deep graphite + warm ivory text + emerald)
 * ============================================================================ */
[data-design="executive"][data-theme="dark"] {
    --background:           oklch(0.145 0.008 240);
    --background-glow:      oklch(0.180 0.014 240);
    --foreground:           oklch(0.96 0.008 85);
    --foreground-strong:    oklch(0.99 0.005 85);

    --card:                 oklch(0.195 0.010 240);
    --card-tint:            oklch(0.180 0.010 240);
    --card-foreground:      oklch(0.96 0.008 85);
    --card-highlight:       oklch(1 0 0 / 0.06);

    --popover:              oklch(0.205 0.010 240);
    --popover-foreground:   oklch(0.96 0.008 85);

    --muted:                oklch(0.230 0.010 240);
    --muted-strong:         oklch(0.265 0.010 240);
    --muted-foreground:     oklch(0.68 0.012 85);

    --border:               oklch(0.275 0.010 240);
    --border-strong:        oklch(0.34 0.012 240);
    --hairline:             oklch(0.245 0.010 240);

    --input:                oklch(0.195 0.010 240);

    --primary:              oklch(0.62 0.09 162);
    --primary-strong:       oklch(0.56 0.10 162);
    --primary-foreground:   oklch(0.13 0.020 162);
    --primary-soft:         oklch(0.30 0.045 162);
    --primary-soft-fg:      oklch(0.86 0.10 162);
    --primary-edge:         oklch(0.46 0.10 162);
    --ring:                 oklch(0.62 0.10 162);

    --secondary:            oklch(0.62 0.09 162);
    --secondary-foreground: oklch(0.13 0.020 162);
    --accent:               oklch(0.62 0.09 162);
    --accent-foreground:    oklch(0.13 0.020 162);

    --champagne:            oklch(0.78 0.06 75);
    --champagne-soft:       oklch(0.30 0.040 75);
    --champagne-fg:         oklch(0.86 0.07 75);

    --success:              oklch(0.66 0.12 155);
    --success-soft:         oklch(0.28 0.045 155);
    --success-soft-fg:      oklch(0.84 0.12 155);

    --warning:              oklch(0.78 0.13 65);
    --warning-soft:         oklch(0.30 0.060 65);
    --warning-soft-fg:      oklch(0.86 0.13 65);

    --destructive:          oklch(0.66 0.15 25);
    --destructive-foreground: oklch(0.99 0 0);
    --destructive-soft:     oklch(0.30 0.065 25);
    --destructive-soft-fg:  oklch(0.85 0.14 25);

    --neutral-soft:         oklch(0.265 0.010 240);
    --neutral-soft-fg:      oklch(0.80 0.012 85);

    --shadow-xs:            0 1px 1px 0 oklch(0 0 0 / 0.40);
    --shadow-sm:            0 1px 2px 0 oklch(0 0 0 / 0.35);
    --shadow-card:          0 1px 2px 0 oklch(0 0 0 / 0.45);
    --shadow-md:            0 8px 24px -8px oklch(0 0 0 / 0.55), 0 2px 6px -2px oklch(0 0 0 / 0.40);
    --shadow-lg:            0 16px 40px -8px oklch(0 0 0 / 0.60), 0 6px 12px -4px oklch(0 0 0 / 0.40);
    --shadow-press-light:   inset 0 1px 0 oklch(1 0 0 / 0.05);
    --shadow-press-primary: inset 0 1px 0 oklch(1 0 0 / 0.10);
}

/* ============================================================================
 * 2. LEGACY VARIABLE BRIDGE
 * Map historical project variables onto executive tokens so unmodified
 * components inherit the new palette without any template changes.
 * ============================================================================ */
[data-design="executive"]:root,
[data-design="executive"][data-theme="light"],
[data-design="executive"][data-theme="dark"] {
    --body-bg:          var(--background);
    --card-bg:          var(--card);
    --card-border:      var(--border);
    --sidebar-bg:       var(--card);
    --sidebar-border:   var(--border);
    --text-primary:     var(--foreground-strong);
    --text-secondary:   var(--muted-foreground);
    --text-muted:       var(--muted-foreground);
    --input-bg:         var(--input);
    --input-border:     var(--border);
    --hover-bg:         var(--muted);
    --active-color:     var(--primary);
    --primary-color:    var(--primary);
    --primary-gradient: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
}

/* ============================================================================
 * 3. BASE PAGE SURFACES
 * ============================================================================ */
[data-design="executive"] body {
    background-color: var(--background);
    background-image: radial-gradient(ellipse 1200px 600px at 50% -200px, var(--background-glow) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--foreground);
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
[data-design="executive"] ::selection {
    background: var(--primary-soft);
    color: var(--primary-soft-fg);
}
[data-design="executive"] h1,
[data-design="executive"] h2,
[data-design="executive"] h3,
[data-design="executive"] h4 {
    letter-spacing: -0.012em;
    color: var(--foreground-strong);
}

/* Tabular numerics where the project already hints monospace intent */
[data-design="executive"] code,
[data-design="executive"] kbd,
[data-design="executive"] pre,
[data-design="executive"] .num-mono {
    font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* Fraunces only where serif premium feel is safe (display headlines + KPI numerics).
 * Fallback to Inter if @import is blocked. */
[data-design="executive"] .gradient-text,
[data-design="executive"] h1.gradient-text,
[data-design="executive"] .kpi-card h3 {
    font-family: 'Fraunces', 'Inter', serif;
    font-optical-sizing: auto;
    letter-spacing: -0.02em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ============================================================================
 * 4. VISUAL NOISE NEUTRALIZERS
 * Disable legacy decorations (animated bg, gradient text, 3D buttons,
 * glassmorphism, neon, KPI gradient strip, table translateX hover).
 * ============================================================================ */

/* Animated background -> static premium surface */
[data-design="executive"] body.bg-animated,
[data-design="executive"] body {
    background-color: var(--background);
    background-image: radial-gradient(ellipse 1200px 600px at 50% -200px, var(--background-glow) 0%, transparent 70%);
    background-size: auto;
    animation: none !important;
}

/* Gradient text -> solid premium foreground */
[data-design="executive"] .gradient-text {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--foreground-strong) !important;
}

/* 3D button -> flat premium primary */
[data-design="executive"] .btn-3d {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
    border: 1px solid var(--primary-edge) !important;
    border-radius: 6px !important;
    color: var(--primary-foreground) !important;
    transform: none !important;
    box-shadow: var(--shadow-press-primary), 0 1px 2px oklch(from var(--primary) calc(l - 0.20) c h / 0.30) !important;
    transition: filter .14s ease, box-shadow .14s ease !important;
}
[data-design="executive"] .btn-3d:hover {
    filter: brightness(1.04);
    transform: none !important;
    box-shadow: var(--shadow-press-primary), 0 2px 6px oklch(from var(--primary) calc(l - 0.20) c h / 0.35) !important;
}
[data-design="executive"] .btn-3d:active {
    transform: none !important;
    background: var(--primary-strong) !important;
    box-shadow: inset 0 1px 2px oklch(0 0 0 / 0.20) !important;
}

/* Glassmorphism -> premium paper card */
[data-design="executive"] .glass-card {
    background: var(--card) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight) !important;
}
[data-design="executive"] .glass-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-md), inset 0 1px 0 var(--card-highlight) !important;
    border-color: var(--border-strong) !important;
}

/* Neon-border -> normal hairline */
[data-design="executive"] .neon-border,
[data-design="executive"] .neon-border-cyan,
[data-design="executive"] .neon-border-pink {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
}

/* KPI gradient strip -> hidden */
[data-design="executive"] .kpi-card::before {
    display: none !important;
}

/* ============================================================================
 * 5. COMPONENT REPAINT
 * ============================================================================ */

/* Sidebar — paper + emerald active state */
[data-design="executive"] .sidebar {
    background: linear-gradient(180deg, var(--card) 0%, var(--card-tint) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: 1px solid var(--border) !important;
    box-shadow: inset -1px 0 0 var(--card-highlight) !important;
}

/* Brand block inside sidebar (first .p-6) — premium calm */
[data-design="executive"] .sidebar .p-6 {
    border-bottom: 1px solid var(--hairline);
}

/* Sidebar nav link */
[data-design="executive"] .sidebar-link {
    color: var(--muted-foreground);
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: color .14s ease, background-color .14s ease;
}
[data-design="executive"] .sidebar-link:hover {
    background: var(--muted);
    color: var(--foreground-strong);
    border-left-color: transparent;
}
[data-design="executive"] .sidebar-link.active {
    background: var(--primary-soft);
    color: var(--primary-soft-fg);
    border-left-color: var(--primary);
    font-weight: 600;
}
[data-design="executive"] .sidebar-link.active i {
    color: var(--primary);
}

/* Sidebar group toggle (defined in base.html inline <style>) */
[data-design="executive"] .sidebar-group-toggle {
    color: var(--muted-foreground);
    font-weight: 500;
}
[data-design="executive"] .sidebar-group-toggle:hover {
    background: var(--muted) !important;
    color: var(--foreground-strong);
}
[data-design="executive"] .sidebar-group-toggle i:first-child {
    color: var(--muted-foreground);
}

/* KPI cards — premium paper surface */
[data-design="executive"] .kpi-card {
    background: linear-gradient(180deg, var(--card) 0%, var(--card-tint) 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    padding: 1.25rem 1.375rem !important;
    box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight) !important;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
[data-design="executive"] .kpi-card:hover {
    transform: none !important;
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-md), inset 0 1px 0 var(--card-highlight) !important;
}
/* Calm down decorative round icons inside KPI cards */
[data-design="executive"] .kpi-card .w-16.h-16,
[data-design="executive"] .kpi-card .rounded-full {
    box-shadow: none !important;
}

/* Generic card / panels often used through utility-only stacks */
[data-design="executive"] .card,
[data-design="executive"] .card-modern {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight);
}

/* Tables — table-modern */
[data-design="executive"] .table-modern {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    overflow: hidden;
}
[data-design="executive"] .table-modern thead th {
    background: var(--card-tint) !important;
    color: var(--muted-foreground) !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    border-bottom: 1px solid var(--border);
    padding: 11px 18px;
}
[data-design="executive"] .table-modern tbody tr {
    background: transparent !important;
    transition: background .12s ease, box-shadow .12s ease;
}
[data-design="executive"] .table-modern tbody tr:hover {
    background: var(--card-tint) !important;
    transform: none !important;
    box-shadow: none !important;
}
[data-design="executive"] .table-modern tbody tr:hover td:first-child {
    box-shadow: inset 2px 0 0 var(--primary);
}
[data-design="executive"] .table-modern tbody td {
    color: var(--foreground);
    border-bottom: 1px solid var(--hairline);
    padding: 12px 18px;
}

/* Tables — data-table variant */
[data-design="executive"] .data-table {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}
[data-design="executive"] .data-table thead th {
    background: var(--card-tint) !important;
    color: var(--muted-foreground) !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    border-bottom: 1px solid var(--border);
}
[data-design="executive"] .data-table tbody tr {
    background: transparent !important;
}
[data-design="executive"] .data-table tbody tr:hover {
    background: var(--card-tint) !important;
}
[data-design="executive"] .data-table tbody td {
    color: var(--foreground);
    border-bottom: 1px solid var(--hairline);
}

/* Accounting statement (used in finance reports) */
[data-design="executive"] .accounting-statement {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    color: var(--foreground);
}
[data-design="executive"] .accounting-statement th,
[data-design="executive"] .accounting-statement td {
    border-color: var(--hairline) !important;
}

/* Form controls — modern */
[data-design="executive"] .form-control-modern {
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--radius-button);
    color: var(--foreground);
    box-shadow: var(--shadow-press-light);
    transition: border-color .14s ease, box-shadow .14s ease;
}
[data-design="executive"] .form-control-modern:focus {
    outline: none;
    border-color: var(--ring) !important;
    box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.14) !important;
    background: var(--card) !important;
}
[data-design="executive"] .form-control-modern::placeholder {
    color: var(--muted-foreground);
}

/* Badges — modern + variants */
[data-design="executive"] .badge-modern {
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0;
    padding: 2px 8px;
}
[data-design="executive"] .badge-success,
[data-design="executive"] .badge-modern.success {
    background: var(--success-soft);
    color: var(--success-soft-fg);
    border-color: oklch(from var(--success) l c h / 0.20);
}
[data-design="executive"] .badge-warning,
[data-design="executive"] .badge-modern.warning {
    background: var(--warning-soft);
    color: var(--warning-soft-fg);
    border-color: oklch(from var(--warning) l c h / 0.22);
}
[data-design="executive"] .badge-danger,
[data-design="executive"] .badge-modern.danger {
    background: var(--destructive-soft);
    color: var(--destructive-soft-fg);
    border-color: oklch(from var(--destructive) l c h / 0.20);
}
[data-design="executive"] .badge-info,
[data-design="executive"] .badge-modern.info {
    background: var(--primary-soft);
    color: var(--primary-soft-fg);
    border-color: oklch(from var(--primary) l c h / 0.22);
}

/* Alerts — modern */
[data-design="executive"] .alert-modern {
    background: var(--card);
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-radius: var(--radius-button);
    color: var(--foreground);
    padding: 12px 14px;
    box-shadow: var(--shadow-card);
}
[data-design="executive"] .alert-modern.success { border-left-color: var(--success); background: var(--success-soft); color: var(--success-soft-fg); }
[data-design="executive"] .alert-modern.warning { border-left-color: var(--warning); background: var(--warning-soft); color: var(--warning-soft-fg); }
[data-design="executive"] .alert-modern.danger  { border-left-color: var(--destructive); background: var(--destructive-soft); color: var(--destructive-soft-fg); }
[data-design="executive"] .alert-modern.info    { border-left-color: var(--primary); background: var(--primary-soft); color: var(--primary-soft-fg); }

/* Pagination */
[data-design="executive"] .pagination a,
[data-design="executive"] .pagination span,
[data-design="executive"] .pagination button {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: var(--radius-button);
}
[data-design="executive"] .pagination .active,
[data-design="executive"] .pagination .current,
[data-design="executive"] .pagination [aria-current="page"] {
    background: var(--primary);
    border-color: var(--primary-edge);
    color: var(--primary-foreground);
}

/* FAB — quick actions */
[data-design="executive"] .fab-main {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
    border: 1px solid var(--primary-edge) !important;
    color: var(--primary-foreground) !important;
    box-shadow: var(--shadow-md), var(--shadow-press-primary) !important;
}
[data-design="executive"] .fab-main:hover {
    transform: none !important;
    filter: brightness(1.04);
}
[data-design="executive"] .fab-item,
[data-design="executive"] .fab-item[class*="bg-gradient"] {
    background: var(--card) !important;
    color: var(--foreground-strong) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-md) !important;
}
[data-design="executive"] .fab-item i { color: var(--primary); }

/* Toasts — solid calm tints */
[data-design="executive"] .toast {
    border: 1px solid transparent;
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-md);
}
[data-design="executive"] .toast-success { background: var(--success) !important; color: white !important; }
[data-design="executive"] .toast-error   { background: var(--destructive) !important; color: white !important; }
[data-design="executive"] .toast-warning { background: var(--warning) !important; color: white !important; }
[data-design="executive"] .toast-info    { background: var(--primary) !important; color: var(--primary-foreground) !important; }

/* Search modal */
[data-design="executive"] .search-container {
    background: var(--card) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
}
[data-design="executive"] .search-modal {
    background: oklch(0 0 0 / 0.55) !important;
}
[data-design="executive"] .tw-kbd,
[data-design="executive"] .kbd {
    background: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'Fira Code', ui-monospace, monospace;
}

/* Notification dropdown */
[data-design="executive"] .notification-dropdown {
    background: var(--card) !important;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-card);
}

/* User avatar circle in sidebar (legacy purple-pink gradient) */
[data-design="executive"] .sidebar [class*="bg-gradient-to-r"] {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.22);
}

/* ============================================================================
 * 6. TARGETED TAILWIND UTILITY OVERRIDES
 * Used heavily by AI Assistant page, dashboard KPI circles, and various
 * legacy templates. We win by selector specificity (data-design attribute
 * adds an extra simple-selector level on top of the utility class).
 * ============================================================================ */

/* Surfaces */
[data-design="executive"] .bg-white {
    background-color: var(--card) !important;
    color: var(--foreground);
}
[data-design="executive"] .bg-gray-50 { background-color: var(--card-tint) !important; }
[data-design="executive"] .bg-gray-100 { background-color: var(--muted) !important; }
[data-design="executive"] .bg-gray-200 { background-color: var(--muted-strong) !important; }
[data-design="executive"] .bg-gray-700,
[data-design="executive"] .bg-gray-800,
[data-design="executive"] .bg-gray-900 {
    background-color: var(--card) !important;
}
[data-design="executive"] .bg-white\/5,
[data-design="executive"] .bg-white\/10 {
    background-color: var(--muted) !important;
}
[data-design="executive"] .bg-red-500\/10,
[data-design="executive"] .bg-red-500\/20 {
    background-color: var(--destructive-soft) !important;
}

/* Borders (white-translucent in dark sidebar) */
[data-design="executive"] .border-white\/10,
[data-design="executive"] .border-white\/20,
[data-design="executive"] .border-gray-200,
[data-design="executive"] .border-gray-300,
[data-design="executive"] .border-gray-700,
[data-design="executive"] .border-gray-800 {
    border-color: var(--border) !important;
}

/* Soft semantic surfaces (used in AI Assistant banners, badges) */
[data-design="executive"] .bg-yellow-50,
[data-design="executive"] .bg-yellow-100 {
    background-color: var(--warning-soft) !important;
    color: var(--warning-soft-fg);
}
[data-design="executive"] .bg-blue-50,
[data-design="executive"] .bg-blue-100 {
    background-color: var(--primary-soft) !important;
    color: var(--primary-soft-fg);
}
[data-design="executive"] .bg-green-50,
[data-design="executive"] .bg-green-100 {
    background-color: var(--success-soft) !important;
    color: var(--success-soft-fg);
}
[data-design="executive"] .bg-red-50,
[data-design="executive"] .bg-red-100 {
    background-color: var(--destructive-soft) !important;
    color: var(--destructive-soft-fg);
}

/* Solid semantic buttons (Tailwind utility-built buttons in AI Assistant) */
[data-design="executive"] .bg-indigo-600,
[data-design="executive"] .bg-blue-600,
[data-design="executive"] .bg-cyan-600,
[data-design="executive"] .bg-purple-600,
[data-design="executive"] .bg-violet-600,
[data-design="executive"] .bg-emerald-600,
[data-design="executive"] .bg-teal-600 {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border: 1px solid var(--primary-edge);
}
[data-design="executive"] .hover\:bg-indigo-700:hover,
[data-design="executive"] .hover\:bg-blue-700:hover,
[data-design="executive"] .hover\:bg-cyan-700:hover,
[data-design="executive"] .hover\:bg-purple-700:hover,
[data-design="executive"] .hover\:bg-violet-700:hover,
[data-design="executive"] .hover\:bg-emerald-700:hover,
[data-design="executive"] .hover\:bg-teal-700:hover {
    background-color: var(--primary-strong) !important;
}

[data-design="executive"] .bg-gray-600 {
    background-color: var(--card) !important;
    color: var(--foreground-strong) !important;
    border: 1px solid var(--border);
}
[data-design="executive"] .hover\:bg-gray-700:hover {
    background-color: var(--muted) !important;
}

[data-design="executive"] .bg-red-600,
[data-design="executive"] .bg-rose-600 {
    background-color: var(--destructive) !important;
    color: white !important;
    border: 1px solid oklch(from var(--destructive) calc(l - 0.10) c h);
}
[data-design="executive"] .hover\:bg-red-700:hover,
[data-design="executive"] .hover\:bg-rose-700:hover {
    filter: brightness(1.04);
}

[data-design="executive"] .bg-green-600 {
    background-color: var(--success) !important;
    color: white !important;
}

/* Decorative gradient utility (bg-gradient-to-r/l/br/...) -> calm primary tint */
[data-design="executive"] [class*="bg-gradient-to-"] {
    background-image: none !important;
    background-color: var(--primary-soft) !important;
    color: var(--primary-soft-fg);
}
/* Decorative big circles in dashboard KPI - tint to soft primary */
[data-design="executive"] .kpi-card [class*="bg-gradient-to-"],
[data-design="executive"] [class*="rounded-full"][class*="bg-gradient-to-"] {
    background-color: var(--primary-soft) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20);
    color: var(--primary-soft-fg);
}
[data-design="executive"] .kpi-card [class*="bg-gradient-to-"] i,
[data-design="executive"] [class*="rounded-full"][class*="bg-gradient-to-"] i {
    color: var(--primary-soft-fg) !important;
}

/* Text colors */
[data-design="executive"] .text-white {
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .sidebar .text-white,
[data-design="executive"] .toast .text-white {
    color: inherit !important;
}
[data-design="executive"] .text-gray-300,
[data-design="executive"] .text-gray-400,
[data-design="executive"] .text-gray-500,
[data-design="executive"] .text-gray-600 {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .text-gray-700,
[data-design="executive"] .text-gray-800,
[data-design="executive"] .text-gray-900 {
    color: var(--foreground-strong) !important;
}

/* Semantic accent text */
[data-design="executive"] .text-cyan-400,
[data-design="executive"] .text-blue-400,
[data-design="executive"] .text-blue-700,
[data-design="executive"] .text-indigo-400,
[data-design="executive"] .text-indigo-600,
[data-design="executive"] .text-purple-400,
[data-design="executive"] .text-purple-600,
[data-design="executive"] .text-pink-400,
[data-design="executive"] .text-violet-400 {
    color: var(--primary-soft-fg) !important;
}
[data-design="executive"] .text-yellow-400,
[data-design="executive"] .text-yellow-600,
[data-design="executive"] .text-yellow-700,
[data-design="executive"] .text-yellow-800,
[data-design="executive"] .text-amber-400,
[data-design="executive"] .text-amber-600 {
    color: var(--warning-soft-fg) !important;
}
[data-design="executive"] .text-green-400,
[data-design="executive"] .text-green-500,
[data-design="executive"] .text-green-600,
[data-design="executive"] .text-emerald-400,
[data-design="executive"] .text-emerald-600,
[data-design="executive"] .text-teal-400 {
    color: var(--success-soft-fg) !important;
}
[data-design="executive"] .text-red-300,
[data-design="executive"] .text-red-400,
[data-design="executive"] .text-red-500,
[data-design="executive"] .text-red-600,
[data-design="executive"] .text-rose-400,
[data-design="executive"] .text-rose-600 {
    color: var(--destructive-soft-fg) !important;
}

/* Borders left-accent (alert banners) */
[data-design="executive"] .border-yellow-400,
[data-design="executive"] .border-yellow-500 {
    border-color: var(--warning) !important;
}
[data-design="executive"] .border-red-400,
[data-design="executive"] .border-red-500 {
    border-color: var(--destructive) !important;
}
[data-design="executive"] .border-green-400,
[data-design="executive"] .border-green-500 {
    border-color: var(--success) !important;
}
[data-design="executive"] .border-blue-400,
[data-design="executive"] .border-blue-500,
[data-design="executive"] .border-indigo-500 {
    border-color: var(--primary) !important;
}

/* Tailwind shadow utility softening */
[data-design="executive"] .shadow,
[data-design="executive"] .shadow-md,
[data-design="executive"] .shadow-lg,
[data-design="executive"] .shadow-xl {
    box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight) !important;
}

/* Rounded utility — keep it premium calm (8/6) */
[data-design="executive"] .rounded-2xl,
[data-design="executive"] .rounded-3xl {
    border-radius: 12px !important;
}

/* ============================================================================
 * 7. FORM CONTROL HARDCODED OVERRIDES
 * style.css contains rules like:
 *   [data-theme="dark"] select { background: rgba(30,41,59,0.5) !important; ... }
 *   [data-theme="light"] input { background: #FFFFFF !important; ... }
 * which use !important. We win with higher specificity inside our scope.
 * ============================================================================ */
[data-design="executive"][data-theme="light"] select,
[data-design="executive"][data-theme="light"] input,
[data-design="executive"][data-theme="light"] textarea,
[data-design="executive"][data-theme="dark"] select,
[data-design="executive"][data-theme="dark"] input,
[data-design="executive"][data-theme="dark"] textarea {
    background: var(--input) !important;
    border-color: var(--border) !important;
    color: var(--foreground) !important;
    border-radius: var(--radius-button);
}
[data-design="executive"] select:focus,
[data-design="executive"] input:focus,
[data-design="executive"] textarea:focus {
    border-color: var(--ring) !important;
    box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.14) !important;
    outline: 0;
}
[data-design="executive"][data-theme="light"] select option,
[data-design="executive"][data-theme="dark"] select option {
    background: var(--card);
    color: var(--foreground);
}
[data-design="executive"][data-theme="light"] input::placeholder,
[data-design="executive"][data-theme="light"] textarea::placeholder,
[data-design="executive"][data-theme="dark"] input::placeholder,
[data-design="executive"][data-theme="dark"] textarea::placeholder {
    color: var(--muted-foreground) !important;
}
[data-design="executive"][data-theme="light"] label,
[data-design="executive"][data-theme="dark"] label {
    color: var(--foreground-strong) !important;
    font-weight: 500;
    letter-spacing: 0;
}
[data-design="executive"][data-theme="dark"] .text-gray-500 {
    color: var(--muted-foreground) !important;
}

/* ============================================================================
 * 8. BUTTONS (generic .btn-primary / .btn-secondary if present)
 * ============================================================================ */
[data-design="executive"] .btn-primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
    border: 1px solid var(--primary-edge) !important;
    color: var(--primary-foreground) !important;
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-press-primary), 0 1px 2px oklch(from var(--primary) calc(l - 0.20) c h / 0.30);
}
[data-design="executive"] .btn-primary:hover { filter: brightness(1.04); }

[data-design="executive"] .btn-secondary {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    color: var(--foreground-strong) !important;
    border-radius: var(--radius-button);
    box-shadow: var(--shadow-press-light), var(--shadow-xs);
}
[data-design="executive"] .btn-secondary:hover {
    background: var(--muted) !important;
    border-color: var(--border-strong) !important;
}

[data-design="executive"] .btn-ghost {
    background: transparent !important;
    color: var(--muted-foreground) !important;
    border: 1px solid transparent !important;
}
[data-design="executive"] .btn-ghost:hover {
    background: var(--muted) !important;
    color: var(--foreground-strong) !important;
}

[data-design="executive"] .btn-danger,
[data-design="executive"] .btn-destructive {
    background: linear-gradient(180deg, var(--destructive) 0%, oklch(from var(--destructive) calc(l - 0.06) c h) 100%) !important;
    border: 1px solid oklch(from var(--destructive) calc(l - 0.10) c h) !important;
    color: white !important;
    border-radius: var(--radius-button);
}

/* ============================================================================
 * 9. AI ASSISTANT page-specific calm-down (scoped under .ai-assistant-v0)
 * The page wraps content in .ai-assistant-v0; we use it just to add a
 * tiny extra polish without touching the template.
 * ============================================================================ */
[data-design="executive"] .ai-assistant-v0 {
    color: var(--foreground);
}
[data-design="executive"] .ai-assistant-v0 h1,
[data-design="executive"] .ai-assistant-v0 h2,
[data-design="executive"] .ai-assistant-v0 h3 {
    color: var(--foreground-strong);
}
[data-design="executive"] .ai-assistant-v0 .rounded-lg,
[data-design="executive"] .ai-assistant-v0 .rounded-xl {
    border-radius: var(--radius-card) !important;
}

/* ============================================================================
 * 10. SCROLLBARS (premium subtle)
 * ============================================================================ */
[data-design="executive"] ::-webkit-scrollbar {
    width: 10px; height: 10px;
}
[data-design="executive"] ::-webkit-scrollbar-track {
    background: transparent;
}
[data-design="executive"] ::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 2px solid var(--background);
}
[data-design="executive"] ::-webkit-scrollbar-thumb:hover {
    background: var(--muted-foreground);
}

/* ============================================================================
 * 11. PHASE 2 — EXECUTIVE COMPONENT CLASSES
 *
 * Used additively in templates (currently AI Assistant page.html). Without
 * the ?design=executive flag every selector here is inert — the underlying
 * Tailwind classes on the same element render as before.
 *
 * Classes:
 *   .executive-page              page wrapper
 *   .executive-header            page header (eyebrow + title + actions)
 *   .executive-eyebrow           hidden by default; flag flips to block
 *   .executive-title             h1
 *   .executive-subtitle          sub-line under title
 *   .executive-action-row        right-side action buttons row
 *   .executive-card              premium paper card
 *   .executive-section-title     h3 inside a card
 *   .executive-form-grid         grid form layout
 *   .executive-label             form labels
 *   .executive-input             unified input/select/textarea look
 *   .executive-textarea          textarea-specific tweaks
 *   .executive-button-primary    emerald primary action
 *   .executive-button-secondary  calm secondary action
 *   .executive-warning           read-only warning banner
 *   .executive-badge             pill-shaped status badge
 *   .executive-badge--info / --warning / --success / --danger / --neutral
 *   .executive-preset-button     quick-question / explain-report tile
 *   .executive-preset-button--info  champagne-tint variant
 *   .executive-preset-tag        small parenthesised tag inside preset
 *   .executive-answer-card       answer wrapper
 *   .executive-answer-card--ok / --refused / --throttled  state modifiers
 *   .executive-answer-text       main answer body text
 *   .executive-meta              small grey meta line
 *   .executive-meta-refused      refused token within meta
 *   .executive-chip-row          flex-wrap chip container
 *   .executive-chip              chip base
 *   .executive-chip--info / --warning / --neutral
 *   .executive-chip-meta         secondary text inside a chip
 *   .executive-kbd               monospaced inline service code
 *   .executive-hint              small hint paragraph
 *   .executive-history-list      history ul
 *   .executive-history-item      history li
 *   .executive-history-question  bold first-line question
 *   .executive-history-answer    answer preview line
 *   .executive-empty             empty-state line
 * ============================================================================ */

/* Page wrapper — calmer max-width feeling without changing existing container */
[data-design="executive"] .executive-page {
    color: var(--foreground);
}

/* Header — vertical rhythm + bottom hairline for premium separation */
[data-design="executive"] .executive-header {
    padding-bottom: 18px;
    margin-bottom: 24px !important;
    border-bottom: 1px solid var(--hairline);
    align-items: flex-end !important;
    gap: 16px;
}

/* Eyebrow — small uppercase label above the title.
 * Default in template: <span style="display:none">. We flip with !important
 * so it appears only under the flag. */
[data-design="executive"] .executive-eyebrow {
    display: block !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 6px;
}

/* Title — premium serif if @import succeeds, otherwise Inter 600 */
[data-design="executive"] .executive-title {
    font-family: 'Fraunces', 'Inter', serif;
    font-optical-sizing: auto;
    font-weight: 600;
    letter-spacing: -0.018em;
    color: var(--foreground-strong) !important;
    font-size: 26px;
    line-height: 1.2;
    margin: 0;
}
[data-design="executive"] .executive-title i {
    color: var(--primary);
    font-size: 22px;
}

/* Subtitle */
[data-design="executive"] .executive-subtitle {
    color: var(--muted-foreground) !important;
    font-size: 13px;
    margin-top: 6px;
}
[data-design="executive"] .executive-subtitle .font-medium {
    color: var(--foreground-strong);
}

/* Actions row */
[data-design="executive"] .executive-action-row {
    align-items: center;
    gap: 8px !important;
    flex-shrink: 0;
}

/* Premium paper card */
[data-design="executive"] .executive-card {
    background: linear-gradient(180deg, var(--card) 0%, var(--card-tint) 100%) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card), inset 0 1px 0 var(--card-highlight) !important;
    color: var(--foreground);
}

/* Section title (h3 inside card) */
[data-design="executive"] .executive-section-title {
    color: var(--foreground-strong) !important;
    font-weight: 600;
    letter-spacing: -0.005em;
}
[data-design="executive"] .executive-section-title i {
    color: var(--primary) !important;
    font-size: 13px;
}

/* Form grid spacing */
[data-design="executive"] .executive-form-grid {
    gap: 16px !important;
}

/* Labels */
[data-design="executive"] .executive-label {
    color: var(--muted-foreground) !important;
    font-size: 11.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

/* Inputs / selects / textareas — refines Section 7 base */
[data-design="executive"] .executive-input {
    background: var(--input) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-button) !important;
    color: var(--foreground) !important;
    padding: 9px 12px !important;
    font-size: 14px;
    box-shadow: var(--shadow-press-light) !important;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
[data-design="executive"] .executive-input:focus {
    border-color: var(--ring) !important;
    box-shadow: 0 0 0 3px oklch(from var(--ring) l c h / 0.16), var(--shadow-press-light) !important;
    background: var(--card) !important;
    outline: 0;
}
[data-design="executive"] .executive-textarea {
    line-height: 1.55;
    min-height: 88px;
    resize: vertical;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* Buttons — primary (emerald) */
[data-design="executive"] .executive-button-primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
    background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
    border: 1px solid var(--primary-edge) !important;
    color: var(--primary-foreground) !important;
    border-radius: var(--radius-button) !important;
    padding: 8px 14px !important;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: var(--shadow-press-primary), 0 1px 2px oklch(from var(--primary) calc(l - 0.20) c h / 0.30) !important;
    transition: filter .14s ease, box-shadow .14s ease;
}
[data-design="executive"] .executive-button-primary:hover {
    filter: brightness(1.04);
    background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%) !important;
}
[data-design="executive"] .executive-button-primary:active {
    background: var(--primary-strong) !important;
    background-image: none !important;
    box-shadow: inset 0 1px 2px oklch(0 0 0 / 0.20) !important;
}
[data-design="executive"] .executive-button-primary i {
    color: inherit !important;
}

/* Buttons — secondary (calm card surface) */
[data-design="executive"] .executive-button-secondary {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--border) !important;
    color: var(--foreground-strong) !important;
    border-radius: var(--radius-button) !important;
    padding: 8px 14px !important;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: var(--shadow-press-light), var(--shadow-xs) !important;
    transition: background .14s ease, border-color .14s ease;
}
[data-design="executive"] .executive-button-secondary:hover {
    background: var(--muted) !important;
    border-color: var(--border-strong) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-button-secondary i {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-button-secondary:hover i {
    color: var(--foreground-strong) !important;
}

/* Warning banner — read-only notice */
[data-design="executive"] .executive-warning {
    background: var(--warning-soft) !important;
    border: 1px solid oklch(from var(--warning) l c h / 0.22) !important;
    border-left: 3px solid var(--warning) !important;
    color: var(--warning-soft-fg) !important;
    border-radius: var(--radius-button) !important;
    padding: 12px 14px !important;
    box-shadow: var(--shadow-card) !important;
    margin-bottom: 22px !important;
}
[data-design="executive"] .executive-warning p {
    color: var(--warning-soft-fg) !important;
    margin: 0;
}
[data-design="executive"] .executive-warning i {
    color: var(--warning) !important;
}

/* Badges — pill */
[data-design="executive"] .executive-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px !important;
    border: 1px solid transparent;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    padding: 2px 9px !important;
    line-height: 1.5;
    vertical-align: middle;
}
[data-design="executive"] .executive-badge--info {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border-color: oklch(from var(--primary) l c h / 0.22) !important;
}
[data-design="executive"] .executive-badge--warning {
    background: var(--warning-soft) !important;
    color: var(--warning-soft-fg) !important;
    border-color: oklch(from var(--warning) l c h / 0.22) !important;
}
[data-design="executive"] .executive-badge--success {
    background: var(--success-soft) !important;
    color: var(--success-soft-fg) !important;
    border-color: oklch(from var(--success) l c h / 0.22) !important;
}
[data-design="executive"] .executive-badge--danger {
    background: var(--destructive-soft) !important;
    color: var(--destructive-soft-fg) !important;
    border-color: oklch(from var(--destructive) l c h / 0.22) !important;
}
[data-design="executive"] .executive-badge--neutral {
    background: var(--neutral-soft) !important;
    color: var(--neutral-soft-fg) !important;
    border-color: var(--border) !important;
}

/* Preset question tiles */
[data-design="executive"] .executive-preset-button {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    color: var(--foreground) !important;
    border-radius: var(--radius-button) !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    line-height: 1.45;
    text-align: left;
    box-shadow: var(--shadow-press-light), var(--shadow-xs) !important;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}
[data-design="executive"] .executive-preset-button:hover {
    background: var(--muted) !important;
    border-color: var(--border-strong) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-preset-button--info {
    background: oklch(from var(--primary) l c h / 0.05) !important;
    border-color: oklch(from var(--primary) l c h / 0.18) !important;
}
[data-design="executive"] .executive-preset-button--info:hover {
    background: var(--primary-soft) !important;
    border-color: oklch(from var(--primary) l c h / 0.28) !important;
    color: var(--primary-soft-fg) !important;
}
[data-design="executive"] .executive-preset-tag {
    color: var(--primary-soft-fg) !important;
    font-variant-numeric: tabular-nums;
    font-family: 'Fira Code', ui-monospace, monospace;
    font-size: 10.5px !important;
    margin-left: 6px;
}

/* Answer card — base + state */
[data-design="executive"] .executive-answer-card {
    border-left: 3px solid var(--border-strong) !important;
    padding-left: 18px;
}
[data-design="executive"] .executive-answer-card--ok        { border-left-color: var(--success) !important; }
[data-design="executive"] .executive-answer-card--throttled { border-left-color: var(--warning) !important; }
[data-design="executive"] .executive-answer-card--refused   { border-left-color: var(--destructive) !important; }

[data-design="executive"] .executive-answer-text {
    color: var(--foreground) !important;
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: 0;
    white-space: pre-wrap;
    margin-top: 8px;
}

/* Meta line (provider / model / latency / timestamp) */
[data-design="executive"] .executive-meta {
    color: var(--muted-foreground) !important;
    font-size: 11.5px;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}
[data-design="executive"] .executive-meta-refused {
    color: var(--destructive-soft-fg) !important;
    font-weight: 500;
}

/* Chips — base */
[data-design="executive"] .executive-chip-row {
    gap: 6px !important;
}
[data-design="executive"] .executive-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px !important;
    padding: 2px 9px !important;
    font-size: 11px !important;
    line-height: 1.55;
    border: 1px solid transparent;
    font-weight: 500;
    letter-spacing: 0;
}
[data-design="executive"] .executive-chip--info {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border-color: oklch(from var(--primary) l c h / 0.22) !important;
}
[data-design="executive"] .executive-chip--warning {
    background: var(--warning-soft) !important;
    color: var(--warning-soft-fg) !important;
    border-color: oklch(from var(--warning) l c h / 0.22) !important;
}
[data-design="executive"] .executive-chip--neutral {
    background: var(--neutral-soft) !important;
    color: var(--neutral-soft-fg) !important;
    border-color: var(--border) !important;
}
[data-design="executive"] .executive-chip i {
    color: inherit !important;
    margin-right: 4px;
    font-size: 10px;
}
[data-design="executive"] .executive-chip-meta {
    color: oklch(from var(--primary-soft-fg) l c h / 0.85) !important;
    margin-left: 4px;
}

/* Inline kbd / service code */
[data-design="executive"] .executive-kbd {
    background: var(--muted) !important;
    color: var(--muted-foreground) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 4px !important;
    padding: 1px 6px !important;
    font-family: 'Fira Code', ui-monospace, monospace !important;
    font-size: 11px !important;
}

/* Hint paragraph */
[data-design="executive"] .executive-hint {
    color: var(--muted-foreground) !important;
    font-size: 11.5px;
    line-height: 1.5;
}
[data-design="executive"] .executive-hint i {
    color: var(--muted-foreground) !important;
    margin-right: 4px;
}

/* History list */
[data-design="executive"] .executive-history-list {
    border-top: 1px solid var(--hairline);
}
[data-design="executive"] .executive-history-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--hairline);
}
[data-design="executive"] .executive-history-list > .executive-history-item:last-child {
    border-bottom: 0;
}
[data-design="executive"] .executive-history-question {
    color: var(--foreground-strong) !important;
    font-weight: 500;
    letter-spacing: 0;
}
[data-design="executive"] .executive-history-answer {
    color: var(--muted-foreground) !important;
    font-size: 13px;
    line-height: 1.55;
    margin-top: 4px;
}
[data-design="executive"] .executive-empty {
    color: var(--muted-foreground) !important;
    font-style: normal;
    padding: 8px 0;
}

/* Vertical rhythm between executive cards on the AI Assistant page */
[data-design="executive"] .ai-assistant-v0 .executive-card {
    margin-bottom: 18px;
}
[data-design="executive"] .ai-assistant-v0 .executive-card:last-child {
    margin-bottom: 0;
}

/* Align the in-title icon with serif */
[data-design="executive"] .ai-assistant-v0 .executive-title .fa-robot {
    color: var(--primary);
}

/* ============================================================================
 * 12. PHASE 3 — DASHBOARD EXECUTIVE POLISH
 * ----------------------------------------------------------------------------
 * Dashboard-specific refinements applied additively to executive-* classes
 * inserted in templates/dashboard/admin_dashboard.html and
 * templates/dashboard/superuser_dashboard.html.
 *
 * All rules are scoped under [data-design="executive"]. Without the URL flag
 * these rules do not apply and the legacy dashboard renders unchanged.
 * ============================================================================ */

/* ---------- Page header: eyebrow + title + subtitle + bottom hairline ---------- */
[data-design="executive"] .executive-page-header {
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--hairline);
}
/* Reveal eyebrow under flag (inline style="display:none" is the off-state) */
[data-design="executive"] .executive-page-header .executive-eyebrow {
    display: inline-block !important;
    margin-bottom: 6px;
}
[data-design="executive"] .executive-page-header .executive-title {
    /* The base executive-title rules from Phase 2 already calm down typography;
       here we just tighten dashboard-specific spacing. */
    margin-bottom: 4px !important;
}
[data-design="executive"] .executive-page-header .executive-title i {
    color: var(--primary);
    margin-right: 12px;
    opacity: 0.85;
}
[data-design="executive"] .executive-page-header .executive-subtitle {
    color: var(--muted-foreground) !important;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}
[data-design="executive"] .executive-page-header .executive-subtitle-meta {
    color: var(--muted-foreground) !important;
    font-size: 13px;
    margin-top: 8px;
}
[data-design="executive"] .executive-page-header .executive-inline-link {
    color: var(--primary) !important;
    text-decoration: none;
    border-bottom: 1px dashed oklch(from var(--primary) l c h / 0.35);
    padding-bottom: 1px;
    transition: color .15s ease, border-color .15s ease;
}
[data-design="executive"] .executive-page-header .executive-inline-link:hover {
    color: var(--primary-strong) !important;
    border-bottom-color: var(--primary);
}
[data-design="executive"] .executive-page-header .executive-inline-hint {
    color: var(--muted-foreground) !important;
    opacity: 0.7;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 4px;
}

/* ---------- KPI grid + cards ---------- */
[data-design="executive"] .executive-kpi-grid {
    gap: 14px !important;
}

[data-design="executive"] .executive-kpi-card {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    padding: 18px 20px !important;
    box-shadow: var(--shadow-card) !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    transform: none !important;
    /* Neutralize legacy fade-in animation transform if any */
    animation: none !important;
}
[data-design="executive"] a.executive-kpi-card:hover,
[data-design="executive"] .executive-kpi-card:hover {
    border-color: oklch(from var(--primary) l c h / 0.35) !important;
    box-shadow: 0 1px 2px 0 oklch(0 0 0 / 0.04), 0 4px 12px -6px oklch(0 0 0 / 0.08) !important;
    transform: none !important;
}

[data-design="executive"] .executive-kpi-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 8px !important;
}

[data-design="executive"] .executive-kpi-value {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.01em;
    line-height: 1.1;
}
[data-design="executive"] .executive-kpi-value--success { color: var(--success-soft-fg) !important; }
[data-design="executive"] .executive-kpi-value--danger  { color: var(--destructive-soft-fg) !important; }
[data-design="executive"] .executive-kpi-value--warning { color: var(--warning-soft-fg) !important; }

[data-design="executive"] .executive-kpi-meta {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 500;
    margin-top: 6px !important;
    letter-spacing: 0.01em;
}
[data-design="executive"] .executive-kpi-meta--success { color: var(--success-soft-fg) !important; }
[data-design="executive"] .executive-kpi-meta--warning { color: var(--warning-soft-fg) !important; }
[data-design="executive"] .executive-kpi-meta--danger  { color: var(--destructive-soft-fg) !important; }

/* KPI icon: refined small rounded-square tile, semantic variants. Wins via
   class-specificity over Tailwind w-12/w-14/w-16 + rounded-full. */
[data-design="executive"] .executive-kpi-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 9px !important;
    background: var(--primary-soft) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20) !important;
    color: var(--primary-soft-fg) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-start;
    /* Drop legacy gradient + force calm fill */
    background-image: none !important;
}
[data-design="executive"] .executive-kpi-icon i {
    font-size: 14px !important;
    color: var(--primary-soft-fg) !important;
    text-shadow: none !important;
}
[data-design="executive"] .executive-kpi-icon--success {
    background: var(--success-soft) !important;
    border-color: oklch(from var(--success) l c h / 0.25) !important;
}
[data-design="executive"] .executive-kpi-icon--success i { color: var(--success-soft-fg) !important; }
[data-design="executive"] .executive-kpi-icon--danger {
    background: var(--destructive-soft) !important;
    border-color: oklch(from var(--destructive) l c h / 0.25) !important;
}
[data-design="executive"] .executive-kpi-icon--danger i { color: var(--destructive-soft-fg) !important; }
[data-design="executive"] .executive-kpi-icon--warning {
    background: var(--warning-soft) !important;
    border-color: oklch(from var(--warning) l c h / 0.30) !important;
}
[data-design="executive"] .executive-kpi-icon--warning i { color: var(--warning-soft-fg) !important; }

/* ---------- Action grid + tiles (Quick Actions) ---------- */
[data-design="executive"] .executive-action-grid {
    gap: 14px !important;
    margin-bottom: 24px !important;
}

[data-design="executive"] .executive-action-tile {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    padding: 16px 18px !important;
    box-shadow: var(--shadow-card) !important;
    transform: none !important;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
    text-decoration: none !important;
}
[data-design="executive"] .executive-action-tile:hover {
    border-color: oklch(from var(--primary) l c h / 0.40) !important;
    background: var(--card-tint) !important;
    transform: none !important;
}
[data-design="executive"] .executive-action-tile--compact {
    padding: 14px 12px !important;
    text-align: center;
}

/* Action icon — large round container repaint (admin dashboard) */
[data-design="executive"] .executive-action-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 11px !important;
    background: var(--primary-soft) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20) !important;
    background-image: none !important;
    color: var(--primary-soft-fg) !important;
    margin: 0 auto 12px !important;
}
[data-design="executive"] .executive-action-icon i {
    font-size: 16px !important;
    color: var(--primary-soft-fg) !important;
    text-shadow: none !important;
}

/* Inline icon variant (superuser quick-actions: <i> directly inside tile) */
[data-design="executive"] .executive-action-icon--inline {
    width: auto !important;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 0 8px !important;
    color: var(--primary) !important;
}
[data-design="executive"] i.executive-action-icon--inline {
    font-size: 18px !important;
    color: var(--primary) !important;
}

[data-design="executive"] .executive-action-title {
    color: var(--foreground-strong) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    margin: 0;
}
[data-design="executive"] .executive-action-meta {
    color: var(--muted-foreground) !important;
    font-size: 12px !important;
    margin-top: 4px !important;
}

/* ---------- Sections (glass-card + executive-section) ---------- */
[data-design="executive"] .executive-section {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
    padding: 22px !important;
    transform: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-design="executive"] .executive-section--clickable {
    cursor: pointer;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
[data-design="executive"] .executive-section--clickable:hover {
    border-color: oklch(from var(--primary) l c h / 0.40) !important;
    transform: none !important;
}

[data-design="executive"] .executive-section-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em !important;
    margin-bottom: 14px !important;
    line-height: 1.3;
}
[data-design="executive"] .executive-section-title i {
    color: var(--primary) !important;
    opacity: 0.85;
    font-size: 14px;
    margin-right: 8px;
}
[data-design="executive"] .executive-section-title i.text-red-400 {
    color: var(--destructive-soft-fg) !important;
}

[data-design="executive"] .executive-section-link {
    color: var(--primary) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px dashed oklch(from var(--primary) l c h / 0.35);
    padding-bottom: 1px;
    transition: color .15s ease, border-color .15s ease;
}
[data-design="executive"] .executive-section-link:hover {
    color: var(--primary-strong) !important;
    border-bottom-color: var(--primary);
}
[data-design="executive"] .executive-section-meta {
    color: var(--muted-foreground) !important;
    font-size: 13px;
}

/* Tables wrap (hairline above table cell area) */
[data-design="executive"] .executive-table-wrap {
    margin-top: 6px;
}
[data-design="executive"] .executive-empty-cell {
    color: var(--muted-foreground) !important;
    font-style: normal;
    padding: 28px 12px !important;
}

/* ---------- Group tiles (dashboard groups overview) ---------- */
[data-design="executive"] .executive-group-grid {
    gap: 12px !important;
}
[data-design="executive"] .executive-group-tile {
    background: var(--card-tint) !important;
    background-image: none !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    padding: 14px 16px !important;
    transition: border-color .15s ease, background .15s ease;
    text-decoration: none !important;
    transform: none !important;
}
[data-design="executive"] .executive-group-tile:hover {
    border-color: oklch(from var(--primary) l c h / 0.40) !important;
    background: var(--card) !important;
}
[data-design="executive"] .executive-group-title {
    color: var(--foreground-strong) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    margin-bottom: 4px !important;
}
[data-design="executive"] .executive-group-meta {
    color: var(--muted-foreground) !important;
    font-size: 12px !important;
    margin-bottom: 8px !important;
}
[data-design="executive"] .executive-group-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
[data-design="executive"] .executive-group-value {
    color: var(--primary) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ---------- Count pill in section titles ---------- */
[data-design="executive"] .executive-count-pill {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20);
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    text-transform: uppercase;
}
[data-design="executive"] .executive-count-pill--danger {
    background: var(--destructive-soft) !important;
    color: var(--destructive-soft-fg) !important;
    border-color: oklch(from var(--destructive) l c h / 0.25);
}

/* ---------- Disable Tailwind hover scale utilities under flag (dashboard) ----
   Phase 1 already neutralizes transform on .kpi-card:hover and .glass-card:hover
   via !important; this rule reaffirms it on the executive markers for any
   future template variant. */
[data-design="executive"] .executive-kpi-card:hover,
[data-design="executive"] .executive-action-tile:hover,
[data-design="executive"] .executive-section--clickable:hover {
    transform: none !important;
}

/* ---------- kp-dashboard-v2 (Quick Expense + Row 3 cards): paper paint ----
   The dashboard ships with an inline <style> namespaced under .kp-dashboard-v2.
   We keep that block untouched and override only its visuals here, scoped to
   the executive flag. Specificity: 0,3,0 vs original 0,2,0 — wins cleanly. */
[data-design="executive"] .kp-dashboard-v2 .kp-card,
[data-design="executive"] .kp-dashboard-v2 .kp-quick-expense {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-card) !important;
}
[data-design="executive"] .kp-dashboard-v2 .kp-card:hover {
    border-color: oklch(from var(--primary) l c h / 0.40) !important;
    transform: none !important;
}
[data-design="executive"] .kp-dashboard-v2 .kp-kpi-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
[data-design="executive"] .kp-dashboard-v2 .kp-kpi-value {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    font-feature-settings: "tnum" 1, "lnum" 1;
    letter-spacing: -0.01em;
}
[data-design="executive"] .kp-dashboard-v2 .kp-kpi-sub {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
}
[data-design="executive"] .kp-dashboard-v2 .kp-kpi-warn { color: var(--destructive-soft-fg) !important; }
[data-design="executive"] .kp-dashboard-v2 .kp-kpi-ok   { color: var(--success-soft-fg) !important; }

[data-design="executive"] .kp-dashboard-v2 .kp-qe-field label {
    color: var(--muted-foreground) !important;
    font-weight: 600;
    letter-spacing: 0.05em;
}
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field input,
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field select,
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field textarea {
    background: var(--input) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-button) !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field input:focus,
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field select:focus,
[data-design="executive"] .kp-dashboard-v2 .kp-qe-field textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.18) !important;
    outline: none !important;
}
[data-design="executive"] .kp-dashboard-v2 .kp-qe-submit {
    background: var(--primary) !important;
    background-image: none !important;
    color: var(--primary-foreground) !important;
    border: 1px solid var(--primary-edge) !important;
    border-radius: var(--radius-button) !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: var(--shadow-press-primary), var(--shadow-sm) !important;
    transition: background .15s ease, border-color .15s ease;
}
[data-design="executive"] .kp-dashboard-v2 .kp-qe-submit:hover {
    background: var(--primary-strong) !important;
    opacity: 1 !important;
}
[data-design="executive"] .kp-dashboard-v2 .kp-qe-errors {
    color: var(--destructive-soft-fg) !important;
    background: var(--destructive-soft);
    border: 1px solid oklch(from var(--destructive) l c h / 0.25);
    border-radius: var(--radius-button);
    padding: 6px 10px;
    font-size: 12px;
}

/* ---------- Cash/Non-cash modals: calm paper headers ---------- */
[data-design="executive"] #cashModal .relative,
[data-design="executive"] #noncashModal .relative {
    background: var(--card) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-lg) !important;
}
[data-design="executive"] #cashModal h3,
[data-design="executive"] #noncashModal h3 {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.005em;
}
[data-design="executive"] #cashModal .border-b,
[data-design="executive"] #noncashModal .border-b,
[data-design="executive"] #cashModal .border-t,
[data-design="executive"] #noncashModal .border-t {
    border-color: var(--border) !important;
}
[data-design="executive"] #cashModal button.text-gray-400:hover,
[data-design="executive"] #noncashModal button.text-gray-400:hover {
    color: var(--foreground-strong) !important;
}

/* ---------- Birthday widget items: calmer left-bordered rows ---------- */
[data-design="executive"] .glass-card.executive-section .border-l-4.border-pink-500 {
    background: var(--card-tint) !important;
    background-image: none !important;
    border-left-color: var(--champagne) !important;
    border-radius: var(--radius-button) !important;
}
[data-design="executive"] .glass-card.executive-section .border-l-4.border-cyan-500 {
    background: var(--card-tint) !important;
    background-image: none !important;
    border-left-color: var(--primary) !important;
    border-radius: var(--radius-button) !important;
}

/* Avatars inside birthday rows: soft tinted circles instead of saturated gradients */
[data-design="executive"] .glass-card.executive-section .border-l-4 .w-10.h-10 {
    background: var(--primary-soft) !important;
    background-image: none !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.18);
}
[data-design="executive"] .glass-card.executive-section .border-l-4 .w-10.h-10 i {
    color: var(--primary-soft-fg) !important;
}

/* ---------- Empty states ---------- */
[data-design="executive"] .executive-empty {
    color: var(--muted-foreground) !important;
    font-style: normal;
}

/* ---------- Vertical rhythm: a touch more breathing room between sections ---- */
[data-design="executive"] .executive-section + .executive-section,
[data-design="executive"] .executive-kpi-grid + .executive-kpi-grid {
    margin-top: 4px;
}

/* ============================================================================
 * 13. PHASE 4 — DASHBOARD EXECUTIVE GAPS POLISH
 * ----------------------------------------------------------------------------
 * Closes mismatch gaps left after Phase 3:
 *   - Method chips (cash / card / online / transfer) repaint
 *   - Group chip + age chip repaint
 *   - Attendance Today rows (success / danger paper rows)
 *   - Group capacity progress bar
 *   - Birthday legend dots (champagne / primary)
 *   - Absent cards (children / staff)
 *   - Card footer hairline
 *
 * All rules scoped under [data-design="executive"]. !important is used only
 * to win against Tailwind utilities present on the same elements (bg-*,
 * border-*, rounded-full, w-*, h-*).
 * ============================================================================ */

/* ---------- Method chips (Cash / Card / Online / Transfer) ---------- */
[data-design="executive"] .executive-method-chip {
    background-image: none !important;
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20);
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px !important;
    border-radius: 999px !important;
}
/* Card payments — champagne / warm warning soft */
[data-design="executive"] .executive-method-chip--card {
    background: var(--warning-soft) !important;
    color: var(--warning-soft-fg) !important;
    border-color: oklch(from var(--warning) l c h / 0.25);
}
/* Online payments — primary soft (emerald) */
[data-design="executive"] .executive-method-chip--online {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border-color: oklch(from var(--primary) l c h / 0.25);
}
/* Transfer / other non-cash — neutral soft */
[data-design="executive"] .executive-method-chip--transfer {
    background: var(--neutral-soft) !important;
    color: var(--neutral-soft-fg) !important;
    border-color: var(--border-strong);
}
/* Cash — success soft */
[data-design="executive"] .executive-method-chip--cash {
    background: var(--success-soft) !important;
    color: var(--success-soft-fg) !important;
    border-color: oklch(from var(--success) l c h / 0.25);
}
/* Generic primary variant (used in cash card non-cash breakdown chips) */
[data-design="executive"] .executive-method-chip--primary {
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border-color: oklch(from var(--primary) l c h / 0.25);
}

/* ---------- Group chip (purple-900/50 → primary-soft) ---------- */
[data-design="executive"] .executive-group-chip {
    background-image: none !important;
    background: var(--primary-soft) !important;
    color: var(--primary-soft-fg) !important;
    border: 1px solid oklch(from var(--primary) l c h / 0.20);
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 2px 8px !important;
    border-radius: 999px !important;
}

/* ---------- Age chip on group tile (cyan-900/50 → champagne soft) ---------- */
[data-design="executive"] .executive-age-chip {
    background-image: none !important;
    background: var(--champagne-soft) !important;
    color: var(--champagne-fg) !important;
    border: 1px solid oklch(from var(--champagne) l c h / 0.30);
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 2px 8px !important;
    border-radius: 999px !important;
}

/* ---------- Attendance Today rows (success / danger paper rows) ---------- */
[data-design="executive"] .executive-attendance-row {
    background-image: none !important;
    border-radius: var(--radius-button) !important;
    border: 1px solid var(--border) !important;
    padding: 14px 16px !important;
    transition: border-color .15s ease;
}
[data-design="executive"] .executive-attendance-row--success {
    background: var(--success-soft) !important;
    border-color: oklch(from var(--success) l c h / 0.25) !important;
}
[data-design="executive"] .executive-attendance-row--danger {
    background: var(--destructive-soft) !important;
    border-color: oklch(from var(--destructive) l c h / 0.25) !important;
}
[data-design="executive"] .executive-attendance-label {
    color: var(--foreground-strong) !important;
    font-weight: 500;
    font-size: 13px;
}
[data-design="executive"] .executive-attendance-row--success .executive-attendance-label i {
    color: var(--success-soft-fg) !important;
}
[data-design="executive"] .executive-attendance-row--danger .executive-attendance-label i {
    color: var(--destructive-soft-fg) !important;
}
[data-design="executive"] .executive-attendance-value {
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-weight: 600;
    letter-spacing: -0.01em;
}
[data-design="executive"] .executive-attendance-value--success { color: var(--success-soft-fg) !important; }
[data-design="executive"] .executive-attendance-value--danger  { color: var(--destructive-soft-fg) !important; }

/* Absent list inside attendance section (small rows under the two big cards) */
[data-design="executive"] .executive-attendance-list-item {
    border-bottom-color: var(--hairline) !important;
}
[data-design="executive"] .executive-attendance-list-item:last-child {
    border-bottom: 0 !important;
}
[data-design="executive"] .executive-attendance-list-item span:first-child {
    color: var(--foreground-strong) !important;
}

/* ---------- Group capacity progress bar ---------- */
[data-design="executive"] .executive-progress-track {
    background-color: var(--muted-strong) !important;
    background-image: none !important;
    height: 6px !important;
    border-radius: 999px !important;
    overflow: hidden;
}
[data-design="executive"] .executive-progress-fill {
    background-color: var(--primary) !important;
    background-image: none !important;
    height: 6px !important;
    border-radius: 999px !important;
    transition: width .35s ease;
}

/* ---------- Birthday legend (bottom row of widget) ---------- */
[data-design="executive"] .executive-legend {
    border-top-color: var(--hairline) !important;
}
[data-design="executive"] .executive-legend-dot {
    width: 8px !important;
    height: 8px !important;
    border: 1px solid oklch(0 0 0 / 0.10);
    background-image: none !important;
}
[data-design="executive"] .executive-legend-dot--staff {
    background: var(--champagne) !important;
    border-color: oklch(from var(--champagne) l c h / 0.40) !important;
}
[data-design="executive"] .executive-legend-dot--children {
    background: var(--primary) !important;
    border-color: oklch(from var(--primary) l c h / 0.40) !important;
}
[data-design="executive"] .executive-legend-label {
    color: var(--muted-foreground) !important;
    font-size: 12px;
}
[data-design="executive"] .executive-legend-value {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', system-ui, sans-serif;
    font-feature-settings: "tnum" 1, "lnum" 1;
    font-weight: 600;
}

/* ---------- Absent cards (children / staff) ---------- */
[data-design="executive"] .executive-absent-card {
    background-image: none !important;
    border-radius: var(--radius-button) !important;
    padding: 14px 16px !important;
    transition: border-color .15s ease;
}
[data-design="executive"] .executive-absent-card--warning {
    background: var(--warning-soft) !important;
    border: 1px solid oklch(from var(--warning) l c h / 0.30) !important;
}
[data-design="executive"] .executive-absent-card--danger {
    background: var(--destructive-soft) !important;
    border: 1px solid oklch(from var(--destructive) l c h / 0.25) !important;
}
[data-design="executive"] .executive-absent-name {
    color: var(--foreground-strong) !important;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.005em;
}
[data-design="executive"] .executive-absent-meta {
    color: var(--muted-foreground) !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

/* ---------- Card footer (Cash/Non-cash card bottom rows) ---------- */
[data-design="executive"] .executive-card-footer {
    border-top-color: var(--hairline) !important;
    color: var(--muted-foreground);
}
[data-design="executive"] .executive-card-footer span,
[data-design="executive"] .executive-card-footer i {
    color: var(--muted-foreground) !important;
}

/* ============================================================
   14. PHASE 5 — PAYMENTS EXECUTIVE POLISH
   Premium financial workspace look for /payments/ pages.
   All rules strictly scoped under [data-design="executive"]; reuses
   classes from Phases 1-4 (executive-page, executive-section,
   executive-button-*, executive-input, executive-status-badge etc.)
   ============================================================ */

/* ---------- Inline page header (title left, actions right) ---------- */
[data-design="executive"] .executive-page-header--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
[data-design="executive"] .executive-page-header--inline .executive-page-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
[data-design="executive"] .executive-page-header--inline .executive-eyebrow {
    display: inline-block !important;
    margin: 0;
}
[data-design="executive"] .executive-page-header--inline .executive-action-row {
    margin: 0;
    flex-shrink: 0;
}

/* ---------- Filter card refinement ---------- */
[data-design="executive"] .executive-filter-card {
    padding: 18px 20px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-filter-card .executive-form-grid {
    align-items: stretch;
}
[data-design="executive"] .executive-filter-card .executive-input,
[data-design="executive"] .executive-filter-card .executive-select {
    width: 100% !important;
}
[data-design="executive"] .executive-filter-card .executive-form-grid .executive-button-primary {
    width: 100%;
    justify-content: center;
}

/* ---------- Payments table — financial premium look ---------- */
[data-design="executive"] .executive-table-section {
    padding: 0 !important;
    overflow: hidden;
}
[data-design="executive"] .executive-table-wrap {
    width: 100%;
    overflow-x: auto;
}
[data-design="executive"] .executive-payment-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent !important;
}
[data-design="executive"] .executive-payment-table thead th {
    background: var(--bg-elev) !important;
    color: var(--muted-foreground) !important;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--hairline) !important;
    border-top: none !important;
    text-align: left;
    white-space: nowrap;
}
[data-design="executive"] .executive-payment-table thead th.executive-amount-th {
    text-align: right;
}
[data-design="executive"] .executive-payment-table thead th.executive-actions-th {
    text-align: right;
}
[data-design="executive"] .executive-payment-table tbody td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: transparent !important;
    color: var(--foreground) !important;
    font-size: 14px;
    vertical-align: middle;
}
[data-design="executive"] .executive-payment-table tbody tr:last-child td {
    border-bottom: none !important;
}
[data-design="executive"] .executive-payment-table tbody tr {
    transition: background-color 0.15s ease;
}
[data-design="executive"] .executive-payment-table tbody tr:hover {
    background: color-mix(in srgb, var(--bg-elev) 60%, transparent) !important;
    transform: none !important;
}
[data-design="executive"] .executive-payment-table tbody tr:hover td {
    background: transparent !important;
}
[data-design="executive"] .executive-payment-table .executive-row-counter {
    color: var(--muted-foreground) !important;
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    width: 48px;
}
[data-design="executive"] .executive-payment-table .executive-row-link {
    color: var(--foreground-strong) !important;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .executive-payment-table .executive-row-link:hover {
    color: var(--primary) !important;
    border-bottom-color: var(--primary);
}
[data-design="executive"] .executive-payment-table .executive-method-text {
    color: var(--muted-foreground);
    font-size: 13px;
}
[data-design="executive"] .executive-payment-table .executive-recorded-by {
    color: var(--muted-foreground);
    font-size: 13px;
}

/* Amount column — Fraunces tabular numbers, right-aligned, premium */
[data-design="executive"] .executive-payment-table td.executive-amount,
[data-design="executive"] .executive-amount {
    font-family: var(--font-display) !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1, "lnum" 1;
    color: var(--foreground-strong) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: right;
    white-space: nowrap;
}
[data-design="executive"] .executive-amount--strong {
    font-size: 28px;
    line-height: 1.1;
    color: var(--foreground-strong) !important;
}

/* Status badges — soft semantic pills */
[data-design="executive"] .executive-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-family: var(--font-sans);
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    border: 1px solid transparent;
    background-image: none !important;
    box-shadow: none !important;
    transform: none !important;
}
[data-design="executive"] .executive-status-badge--lg {
    font-size: 12px !important;
    padding: 6px 14px !important;
}
[data-design="executive"] .executive-status-badge--paid {
    background: var(--success-soft) !important;
    color: var(--success) !important;
    border-color: color-mix(in srgb, var(--success) 30%, transparent) !important;
}
[data-design="executive"] .executive-status-badge--pending {
    background: var(--warning-soft) !important;
    color: var(--warning) !important;
    border-color: color-mix(in srgb, var(--warning) 30%, transparent) !important;
}
[data-design="executive"] .executive-status-badge--overdue {
    background: var(--destructive-soft) !important;
    color: var(--destructive) !important;
    border-color: color-mix(in srgb, var(--destructive) 30%, transparent) !important;
}

/* ---------- Row action icons (View / Edit / Delete) ---------- */
[data-design="executive"] .executive-row-actions {
    text-align: right;
    white-space: nowrap;
}
[data-design="executive"] .executive-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--muted-foreground) !important;
    background: transparent !important;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    margin-right: 4px;
}
[data-design="executive"] .executive-row-action:last-child {
    margin-right: 0;
}
[data-design="executive"] .executive-row-action:hover {
    background: var(--bg-elev) !important;
    border-color: var(--hairline);
}
[data-design="executive"] .executive-row-action--view:hover {
    color: var(--primary) !important;
}
[data-design="executive"] .executive-row-action--edit:hover {
    color: var(--accent, var(--primary)) !important;
}
[data-design="executive"] .executive-row-action--delete:hover {
    color: var(--destructive) !important;
}

/* ---------- Empty state cell ---------- */
[data-design="executive"] .executive-empty-cell {
    color: var(--muted-foreground) !important;
    font-style: italic;
    padding: 48px 16px !important;
    text-align: center;
}

/* ---------- Pagination — calm pager ---------- */
[data-design="executive"] .executive-pager {
    padding: 16px 20px;
    border-top: 1px solid var(--hairline);
    margin-top: 0 !important;
    flex-wrap: wrap;
}
[data-design="executive"] .executive-pager .btn-3d,
[data-design="executive"] .executive-pager button.btn-3d {
    background: transparent !important;
    background-image: none !important;
    color: var(--muted-foreground) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 6px 12px !important;
    min-width: 36px;
    height: 36px;
    border-radius: 8px !important;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
[data-design="executive"] .executive-pager a.btn-3d:hover {
    background: var(--bg-elev) !important;
    color: var(--foreground-strong) !important;
    border-color: var(--border) !important;
    transform: none !important;
}
[data-design="executive"] .executive-pager button.btn-3d[disabled],
[data-design="executive"] .executive-pager button.btn-3d.opacity-50 {
    opacity: 0.4 !important;
}

/* ============================================================
   PAYMENT DETAIL — premium summary card
   ============================================================ */

[data-design="executive"] .executive-payment-detail .executive-detail-card {
    padding: 24px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-payment-detail .executive-section-title {
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-size: 18px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
    margin-bottom: 20px !important;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--hairline);
    background: none !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
}

[data-design="executive"] .executive-detail-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
[data-design="executive"] .executive-detail-list .grid {
    margin: 0 !important;
}
[data-design="executive"] .executive-detail-row {
    min-width: 0;
}
[data-design="executive"] .executive-detail-label {
    font-family: var(--font-sans);
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground) !important;
    margin-bottom: 6px !important;
}
[data-design="executive"] .executive-detail-value {
    color: var(--foreground-strong) !important;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}
[data-design="executive"] .executive-detail-value--mono {
    font-family: var(--font-mono, "Fira Code", ui-monospace, monospace) !important;
    font-size: 13px;
    color: var(--foreground) !important;
    background: var(--bg-elev);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--hairline);
    display: inline-block;
}
[data-design="executive"] .executive-detail-value--link {
    color: var(--primary) !important;
    text-decoration: none;
    border-bottom: 1px dotted color-mix(in srgb, var(--primary) 50%, transparent);
    font-family: var(--font-display);
    font-weight: 600;
}
[data-design="executive"] .executive-detail-value--link:hover {
    color: var(--foreground-strong) !important;
    border-bottom-color: var(--foreground-strong);
}

/* Recording info — avatar */
[data-design="executive"] .executive-recorded-by-row {
    margin-top: 8px !important;
}
[data-design="executive"] .executive-avatar {
    box-shadow: none !important;
    border: 1px solid var(--hairline);
}
[data-design="executive"] .executive-avatar--initial {
    background: var(--bg-elev) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-weight: 600;
}
[data-design="executive"] .executive-recorded-name {
    color: var(--foreground-strong) !important;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}
[data-design="executive"] .executive-recorded-role {
    color: var(--muted-foreground) !important;
    font-size: 12px;
    margin: 2px 0 0 0;
}

/* Receipt card — success-soft paper, no gradient */
[data-design="executive"] .executive-receipt-card {
    margin-top: 24px !important;
    padding: 16px 18px !important;
    background: var(--success-soft) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--success) 25%, transparent) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-receipt-label {
    font-family: var(--font-sans);
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--success) 75%, var(--muted-foreground)) !important;
    margin: 0 0 4px 0 !important;
}
[data-design="executive"] .executive-receipt-name {
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    background: none !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
}

/* Detail page back/print buttons — strip inline gradient */
[data-design="executive"] .executive-button-back,
[data-design="executive"] .executive-button-print,
[data-design="executive"] .executive-button-cancel {
    background: var(--paper) !important;
    background-image: none !important;
}

/* ============================================================
   PAYMENT FORM — calm vertical form
   ============================================================ */

[data-design="executive"] .executive-payment-form .executive-form-card {
    padding: 28px 28px 24px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-form-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
[data-design="executive"] .executive-form-grid-2 {
    gap: 18px !important;
}
[data-design="executive"] .executive-form-row {
    min-width: 0;
}
[data-design="executive"] .executive-form-label {
    font-family: var(--font-sans);
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    color: var(--foreground-strong) !important;
    margin-bottom: 8px !important;
    text-transform: none;
}
[data-design="executive"] .executive-form-hint {
    color: var(--muted-foreground) !important;
    font-size: 12px;
    margin-top: 6px !important;
    line-height: 1.4;
}
[data-design="executive"] .executive-form-actions {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
    gap: 12px !important;
}
[data-design="executive"] .executive-form-actions .executive-button-primary,
[data-design="executive"] .executive-form-actions .executive-button-secondary {
    height: 44px;
}

/* End Phase 5 — Payments Executive Polish */

/* ============================================================
   15. PHASE 6 — CHILDREN & STAFF EXECUTIVE POLISH
   Premium operational workspace look for /children/ and /staff/.
   All rules strictly scoped under [data-design="executive"]; reuses
   classes from Phases 1-5 (executive-page, executive-section,
   executive-table-section, executive-table-wrap, executive-amount,
   executive-status-badge, executive-row-action, executive-pager,
   executive-empty-cell, executive-detail-list, executive-avatar etc.)
   ============================================================ */

/* ---------- People table — alias of payment table (same look) ---------- */
[data-design="executive"] .executive-people-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent !important;
}
[data-design="executive"] .executive-people-table thead th {
    background: var(--bg-elev) !important;
    color: var(--muted-foreground) !important;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--hairline) !important;
    border-top: none !important;
    text-align: left;
    white-space: nowrap;
}
[data-design="executive"] .executive-people-table thead th.executive-amount-th {
    text-align: right;
}
[data-design="executive"] .executive-people-table thead th.executive-actions-th {
    text-align: right;
}
[data-design="executive"] .executive-people-table tbody td {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: transparent !important;
    color: var(--foreground) !important;
    font-size: 14px;
    vertical-align: middle;
}
[data-design="executive"] .executive-people-table tbody tr:last-child td {
    border-bottom: none !important;
}
[data-design="executive"] .executive-people-table tbody tr {
    transition: background-color 0.15s ease;
}
[data-design="executive"] .executive-people-table tbody tr:hover {
    background: color-mix(in srgb, var(--bg-elev) 60%, transparent) !important;
    transform: none !important;
}
[data-design="executive"] .executive-people-table tbody tr:hover td {
    background: transparent !important;
}

/* ---------- Photo / avatar cell ---------- */
[data-design="executive"] .executive-photo-cell {
    width: 56px;
    padding-right: 8px !important;
}
[data-design="executive"] .executive-people-table .executive-avatar {
    box-shadow: none !important;
    border: 1px solid var(--hairline);
}
/* Strip noisy gradient on initial avatars (40px in lists) */
[data-design="executive"] .executive-people-table .executive-avatar--initial,
[data-design="executive"] .executive-people-table .executive-avatar.bg-gradient-to-r {
    background: var(--bg-elev) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-weight: 600;
    text-shadow: none !important;
}

/* ---------- Person name & meta typography ---------- */
[data-design="executive"] .executive-person-name {
    color: var(--foreground-strong) !important;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.005em;
}
[data-design="executive"] .executive-person-meta {
    color: var(--muted-foreground) !important;
    font-size: 13px;
    font-family: var(--font-sans);
}
[data-design="executive"] .executive-empty-dash {
    color: var(--muted-foreground) !important;
    font-family: var(--font-display);
}

/* ---------- Sort link (table header) ---------- */
[data-design="executive"] .executive-sort-link {
    color: var(--muted-foreground) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}
[data-design="executive"] .executive-sort-link:hover {
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-sort-link i {
    font-size: 10px;
    color: inherit;
}

/* ---------- Filter row (flex variant of executive-form-grid) ---------- */
[data-design="executive"] .executive-filter-row {
    align-items: center;
    gap: 12px !important;
}
[data-design="executive"] .executive-filter-row .executive-input,
[data-design="executive"] .executive-filter-row .executive-select {
    width: 100% !important;
}
[data-design="executive"] .executive-filter-row .executive-button-primary {
    flex-shrink: 0;
    min-width: 48px;
    justify-content: center;
}
[data-design="executive"] .executive-filter-row .htmx-indicator {
    opacity: 0;
    transition: opacity 0.15s ease;
}
[data-design="executive"] .executive-filter-row .htmx-request .htmx-indicator,
[data-design="executive"] .executive-filter-row .htmx-indicator.htmx-request {
    opacity: 1;
}

/* ---------- Status badge — info/neutral semantic variants ---------- */
[data-design="executive"] .executive-status-badge--info {
    background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
    color: var(--primary) !important;
    border-color: color-mix(in srgb, var(--primary) 30%, transparent) !important;
}
[data-design="executive"] .executive-status-badge--neutral {
    background: var(--bg-elev) !important;
    color: var(--muted-foreground) !important;
    border-color: var(--hairline) !important;
}

/* ============================================================
   DETAIL PAGES — premium profile card + sidebar info cards
   ============================================================ */

/* Profile card (centered avatar + name) */
[data-design="executive"] .executive-profile-card {
    padding: 24px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-profile-card .text-center {
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 20px;
    margin-bottom: 20px !important;
}

/* Large avatar (128px) — paper, no neon ring */
[data-design="executive"] .executive-avatar--lg {
    width: 112px !important;
    height: 112px !important;
    border: 2px solid var(--hairline) !important;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05)) !important;
}
[data-design="executive"] .executive-avatar--lg.executive-avatar--initial {
    background: var(--bg-elev) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px !important;
    text-shadow: none !important;
}
[data-design="executive"] .executive-avatar--lg.executive-avatar--photo {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline)) !important;
}

[data-design="executive"] .executive-profile-name {
    color: var(--foreground-strong) !important;
    font-family: var(--font-display) !important;
    font-weight: 600;
    font-size: 22px !important;
    letter-spacing: -0.01em;
    margin-top: 4px;
    background: none !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-profile-subtitle {
    color: var(--muted-foreground) !important;
    font-family: var(--font-sans);
    font-size: 13px;
    margin-top: 4px !important;
    letter-spacing: 0.02em;
}

/* Sidebar info cards (parent / contact / hikvision / hr) */
[data-design="executive"] .executive-info-card {
    padding: 20px 22px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-section-head {
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 12px;
    margin-bottom: 16px !important;
}
/* Already styled by Phase 5 .executive-section-title — info card variant */
[data-design="executive"] .executive-info-card .executive-section-title,
[data-design="executive"] .executive-table-section .executive-section-title,
[data-design="executive"] .executive-documents-card .executive-section-title,
[data-design="executive"] .executive-groups-card .executive-section-title,
[data-design="executive"] .executive-empty-state-card .executive-empty-title {
    color: var(--foreground-strong) !important;
    font-family: var(--font-display);
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    margin: 0;
    padding: 0;
    border: 0;
    background: none !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-section-meta {
    color: var(--muted-foreground) !important;
    font-size: 12px;
    font-family: var(--font-sans);
}

/* HR card — warning accent (paper, hairline-warning) */
[data-design="executive"] .executive-hr-card {
    border-color: color-mix(in srgb, var(--warning) 25%, var(--hairline)) !important;
}
[data-design="executive"] .executive-hr-card .executive-hr-icon {
    color: var(--warning) !important;
    text-shadow: none !important;
}

/* Detail value danger variant */
[data-design="executive"] .executive-detail-value--danger {
    color: var(--destructive) !important;
    font-weight: 600;
}

/* Section table card padding (so table touches edges) */
[data-design="executive"] .executive-people-detail .executive-table-section {
    padding: 0 !important;
    overflow: hidden;
}
[data-design="executive"] .executive-people-detail .executive-table-section > .executive-section-head {
    padding: 18px 22px 14px !important;
    margin-bottom: 0 !important;
}

/* ---------- Empty state card (Not linked to Hikvision) ---------- */
[data-design="executive"] .executive-empty-state-card {
    padding: 24px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-empty-state {
    padding: 32px 16px !important;
}
[data-design="executive"] .executive-empty-icon {
    color: var(--muted-foreground) !important;
    opacity: 0.5;
    text-shadow: none !important;
}
[data-design="executive"] .executive-empty-text {
    color: var(--muted-foreground) !important;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================
   ASSIGNED GROUPS TILES — replace gradient with paper-soft
   ============================================================ */
[data-design="executive"] .executive-group-tile {
    background: var(--paper) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    padding: 16px 18px !important;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    box-shadow: none !important;
}
[data-design="executive"] .executive-group-tile:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--hairline)) !important;
    background: var(--bg-elev) !important;
    box-shadow: var(--shadow-paper) !important;
    transform: none !important;
}
[data-design="executive"] .executive-group-tile-name {
    color: var(--foreground-strong) !important;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px !important;
}
[data-design="executive"] .executive-group-tile-meta {
    color: var(--muted-foreground) !important;
    font-size: 12px;
    margin-bottom: 12px !important;
}
[data-design="executive"] .executive-group-tile-footer {
    padding-top: 10px;
    border-top: 1px solid var(--hairline);
}
[data-design="executive"] .executive-group-tile-label {
    color: var(--muted-foreground) !important;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
[data-design="executive"] .executive-group-tile-value {
    color: var(--foreground-strong) !important;
    font-family: var(--font-display) !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================================
   DOCUMENTS — children list-style + staff card-grid neutralizers
   ============================================================ */

/* Children child_detail.html — simple list */
[data-design="executive"] .executive-documents-card {
    padding: 20px 22px !important;
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: var(--shadow-paper) !important;
}
[data-design="executive"] .executive-document-list {
    margin-bottom: 16px !important;
}
[data-design="executive"] .executive-document-row {
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-elev);
    border: 1px solid var(--hairline);
    color: var(--foreground) !important;
    transition: border-color 0.15s ease;
}
[data-design="executive"] .executive-document-row:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--hairline)) !important;
}
[data-design="executive"] .executive-document-title {
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-document-type {
    color: var(--muted-foreground) !important;
    font-size: 12px;
    margin-left: 4px;
}
[data-design="executive"] .executive-document-link {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .executive-document-link--download {
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
}
[data-design="executive"] .executive-document-link--download:hover {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-document-link--delete {
    color: var(--destructive) !important;
    background: color-mix(in srgb, var(--destructive) 10%, transparent);
}
[data-design="executive"] .executive-document-link--delete:hover {
    background: color-mix(in srgb, var(--destructive) 20%, transparent);
}
[data-design="executive"] .executive-document-upload {
    border-top-color: var(--hairline) !important;
    padding-top: 16px;
    margin-top: 16px;
}

/* Staff staff_detail.html — inline-styled .documents-grid / .document-card neutralizer */
[data-design="executive"] .executive-documents-card .documents-grid {
    gap: 12px;
}
[data-design="executive"] .executive-documents-card .document-card {
    background: var(--paper) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    padding: 16px !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
[data-design="executive"] .executive-documents-card .document-card:hover {
    background: var(--paper) !important;
    border-color: color-mix(in srgb, var(--primary) 25%, var(--hairline)) !important;
    box-shadow: var(--shadow-paper) !important;
    transform: none !important;
}
[data-design="executive"] .executive-documents-card .document-info h4 {
    color: var(--foreground-strong) !important;
    font-family: var(--font-sans);
    font-weight: 600;
}
[data-design="executive"] .executive-documents-card .document-info p,
[data-design="executive"] .executive-documents-card .document-info span {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-documents-card .action-btn-download,
[data-design="executive"] .executive-documents-card .action-btn-delete {
    background: var(--bg-elev) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .executive-documents-card .action-btn-download {
    color: var(--primary) !important;
}
[data-design="executive"] .executive-documents-card .action-btn-download:hover {
    background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent) !important;
    transform: none !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-documents-card .action-btn-delete {
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-documents-card .action-btn-delete:hover {
    background: color-mix(in srgb, var(--destructive) 14%, transparent) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   Inline-gradient buttons (Record payment / Back / Re-sync) —
   strip gradient so they match calm primary/secondary palette
   ============================================================ */
[data-design="executive"] .executive-button-record-payment {
    background: var(--success) !important;
    background-image: none !important;
    color: var(--success-foreground, #fff) !important;
}
[data-design="executive"] .executive-button-record-payment:hover {
    background: color-mix(in srgb, var(--success) 90%, var(--foreground-strong)) !important;
}

/* End Phase 6 — Children & Staff Executive Polish */


/* ============================================================
   16. PHASE 7 — FORMS & CONFIRM-DELETE EXECUTIVE POLISH
   All rules strictly scoped under [data-design="executive"].
   Without ?design=executive these rules have zero effect and the
   forms / confirm-delete pages keep their legacy look exactly.
   Reuses Phase 5/6 classes: .executive-form-card, .executive-button-primary,
   .executive-button-secondary, .executive-button-cancel, .executive-form-row,
   .executive-form-label, .executive-form-hint, .executive-eyebrow.
   ============================================================ */

/* ---- Form page wrapper / large form card ---- */
[data-design="executive"] .executive-form-card.executive-form-card--lg {
    padding: 1.75rem !important;
}

/* ---- Form section block (replaces .form-section noisy panel) ---- */
[data-design="executive"] .executive-form-section {
    background: color-mix(in srgb, var(--card) 96%, var(--accent)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    padding: 1.5rem !important;
    box-shadow: none !important;
}

/* ---- Section head row (icon + title) ---- */
[data-design="executive"] .executive-form-section-head {
    align-items: center;
    margin-bottom: 1.25rem !important;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--hairline);
}

/* ---- Section icon: strip gradient circle, soft paper tint ---- */
[data-design="executive"] .executive-form-section-icon {
    background: color-mix(in srgb, var(--accent) 14%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    transform: none !important;
}
[data-design="executive"] .executive-form-section-icon i {
    color: var(--foreground-strong) !important;
    text-shadow: none !important;
}
[data-design="executive"] .executive-form-section-icon--hr {
    background: color-mix(in srgb, #d97706 12%, var(--card)) !important;
    border-color: color-mix(in srgb, #d97706 30%, transparent) !important;
}
[data-design="executive"] .executive-form-section-icon--hr i {
    color: #d97706 !important;
}

/* ---- Section title typography ---- */
[data-design="executive"] .executive-form-section-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', serif;
    font-weight: 600 !important;
    font-size: 1.2rem !important;
    letter-spacing: -0.005em;
    margin: 0;
}

/* ---- Labels inside form sections (rendered via Tailwind utilities) ---- */
[data-design="executive"] .executive-form-section label.block.text-sm {
    color: var(--foreground) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}
[data-design="executive"] .executive-form-section label.block.text-sm i {
    color: var(--muted-foreground) !important;
    text-shadow: none !important;
}

/* ---- Inline help text inside form sections ---- */
[data-design="executive"] .executive-form-section .text-xs.text-gray-500 {
    color: var(--muted-foreground) !important;
}

/* ---- Calm hr divider between sections ---- */
[data-design="executive"] .executive-form-divider {
    border-color: var(--hairline) !important;
    border-top-color: var(--hairline) !important;
    opacity: 1 !important;
    margin: 1.5rem 0;
}

/* ---- Photo upload wrapper (file input dashed box) ---- */
[data-design="executive"] .executive-form-section .photo-upload-wrapper input[type="file"] {
    border-color: var(--hairline) !important;
    background: color-mix(in srgb, var(--card) 92%, var(--accent)) !important;
    color: var(--foreground) !important;
}
[data-design="executive"] .executive-form-section .photo-upload-wrapper input[type="file"]:hover {
    border-color: color-mix(in srgb, var(--accent) 50%, var(--hairline)) !important;
}

/* ---- Checkbox accent under flag (overrides inline #4ECDC4) ---- */
[data-design="executive"] .executive-form-section input[type="checkbox"] {
    accent-color: var(--accent) !important;
}

/* ---- Form actions row ---- */
[data-design="executive"] .executive-form-actions {
    border-top: 1px solid var(--hairline);
    padding-top: 1.25rem !important;
    margin-top: .5rem;
}

/* ---- Generic form rendering helpers (payment_rate_form) ---- */
[data-design="executive"] .executive-form-row {
    margin-bottom: 0;
}
[data-design="executive"] .executive-form-row > .executive-form-label {
    color: var(--foreground) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}
[data-design="executive"] .executive-form-required {
    color: var(--destructive) !important;
    font-weight: 600 !important;
    margin-left: .25rem;
}
[data-design="executive"] .executive-form-error {
    color: var(--destructive) !important;
    font-size: 0.8125rem !important;
    margin-top: .35rem !important;
}
[data-design="executive"] .executive-form-error-block {
    background: color-mix(in srgb, var(--destructive) 8%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 28%, transparent) !important;
    color: var(--destructive) !important;
    border-radius: 10px !important;
    padding: .75rem 1rem !important;
    box-shadow: none !important;
}

/* ---- Monthly-rate-display dynamic states (child_form JS classes) ---- */
[data-design="executive"] #monthly-rate-display {
    background: color-mix(in srgb, var(--card) 96%, var(--accent)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
    box-shadow: none !important;
}
[data-design="executive"] #monthly-rate-display.bg-green-900 {
    background: color-mix(in srgb, var(--success) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 32%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] #monthly-rate-display.bg-yellow-900 {
    background: color-mix(in srgb, #d97706 8%, var(--card)) !important;
    border-color: color-mix(in srgb, #d97706 32%, transparent) !important;
    color: #d97706 !important;
}
[data-design="executive"] #monthly-rate-display.bg-red-900 {
    background: color-mix(in srgb, var(--destructive) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 32%, transparent) !important;
    color: var(--destructive) !important;
}

/* ---- Warning / info alert under flag (alert-modern alert-warning) ---- */
[data-design="executive"] .executive-alert.executive-alert--warning {
    background: color-mix(in srgb, #d97706 10%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, #d97706 32%, transparent) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    border-radius: 10px !important;
}
[data-design="executive"] .executive-alert.executive-alert--warning i,
[data-design="executive"] .executive-alert.executive-alert--warning strong {
    color: #d97706 !important;
}

/* ============================================================
   Confirm / delete pages — premium destructive screen
   ============================================================ */

/* ---- Confirm card container ---- */
[data-design="executive"] .executive-confirm-card {
    padding: 2rem !important;
}

/* ---- Confirm icon (text-only icon, e.g. payment_rate_confirm_delete) ---- */
[data-design="executive"] .executive-confirm-icon i {
    color: var(--destructive) !important;
    text-shadow: none !important;
    filter: none !important;
}
[data-design="executive"] .executive-confirm-icon--warning i {
    color: #d97706 !important;
}

/* ---- Confirm icon (circle bg, e.g. staff_confirm_delete) ---- */
[data-design="executive"] .executive-confirm-icon.rounded-full {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 30%, transparent) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-confirm-icon.rounded-full.executive-confirm-icon--warning {
    background: color-mix(in srgb, #d97706 12%, var(--card)) !important;
    border-color: color-mix(in srgb, #d97706 30%, transparent) !important;
}

/* ---- Wrapped confirm icon (child_confirm_delete / payment_confirm_delete) ---- */
[data-design="executive"] .executive-confirm-icon-wrap {
    display: flex !important;
    justify-content: center;
    margin-bottom: 1rem;
}
[data-design="executive"] .executive-confirm-icon-wrap > .executive-confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--destructive) 12%, var(--card));
    border: 1px solid color-mix(in srgb, var(--destructive) 30%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
[data-design="executive"] .executive-confirm-icon-wrap > .executive-confirm-icon--warning {
    background: color-mix(in srgb, #d97706 12%, var(--card));
    border-color: color-mix(in srgb, #d97706 30%, transparent);
}

/* ---- Confirm title / text typography ---- */
[data-design="executive"] .executive-confirm-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', serif;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}
[data-design="executive"] .executive-confirm-text {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-confirm-text--small {
    font-size: 0.875rem !important;
}

/* ---- Danger zone box (overrides bg-red-50 + inline rgba red) ---- */
[data-design="executive"] .executive-danger-zone {
    background: color-mix(in srgb, var(--destructive) 6%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 22%, transparent) !important;
    border-radius: 12px !important;
    padding: 1.25rem !important;
    box-shadow: none !important;
}

/* ---- Confirm meta lines (label: value pattern) ---- */
[data-design="executive"] .executive-confirm-meta {
    color: var(--foreground) !important;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0.2rem 0;
}
[data-design="executive"] .executive-confirm-meta strong {
    color: var(--muted-foreground) !important;
    font-weight: 500;
    margin-right: 0.35rem;
}

/* ---- Subject name in child_confirm danger zone ---- */
[data-design="executive"] .executive-confirm-name strong {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.25rem !important;
}

/* ---- Confirm avatar (child_confirm 96px) ---- */
[data-design="executive"] .executive-confirm-avatar {
    border: 2px solid var(--hairline) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-confirm-avatar.executive-confirm-avatar--initial {
    background: color-mix(in srgb, var(--accent) 14%, var(--card)) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-confirm-avatar.executive-confirm-avatar--initial i {
    color: var(--foreground-strong) !important;
}

/* ---- Subject row (staff_confirm avatar + name + role) ---- */
[data-design="executive"] .executive-confirm-subject {
    align-items: center;
}
[data-design="executive"] .executive-confirm-subject-avatar {
    box-shadow: none !important;
}
[data-design="executive"] .executive-confirm-subject-avatar.executive-confirm-subject-avatar--photo {
    border: 2px solid var(--hairline) !important;
}
[data-design="executive"] .executive-confirm-subject-avatar.executive-confirm-subject-avatar--initial {
    background: color-mix(in srgb, var(--accent) 14%, var(--card)) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    border: 1px solid var(--hairline) !important;
}
[data-design="executive"] .executive-confirm-subject-name {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', serif;
    font-weight: 600 !important;
}
[data-design="executive"] .executive-confirm-subject-role {
    color: var(--muted-foreground) !important;
}

/* ---- Divider inside danger zone ---- */
[data-design="executive"] .executive-confirm-divider {
    border-top: 1px solid color-mix(in srgb, var(--destructive) 18%, transparent) !important;
    padding-top: 0.85rem !important;
    margin-top: 0.5rem;
}

/* ============================================================
   Destructive button — calm, no glow, no gradient, no 3D
   ============================================================ */
[data-design="executive"] .executive-button-destructive {
    background: var(--destructive) !important;
    background-image: none !important;
    color: var(--destructive-foreground, #ffffff) !important;
    border: 1px solid var(--destructive) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    transition: background .15s ease, border-color .15s ease;
    font-weight: 500 !important;
}
[data-design="executive"] .executive-button-destructive:hover {
    background: color-mix(in srgb, var(--destructive) 88%, var(--foreground-strong)) !important;
    border-color: color-mix(in srgb, var(--destructive) 88%, var(--foreground-strong)) !important;
    transform: none !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-button-destructive:active,
[data-design="executive"] .executive-button-destructive:focus-visible {
    transform: none !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 25%, transparent) !important;
}
[data-design="executive"] .executive-button-destructive i {
    color: inherit !important;
    text-shadow: none !important;
}

/* End Phase 7 — Forms & Confirm-Delete Executive Polish */


/* ============================================================
   17. PHASE 8 — ATTENDANCE EXECUTIVE POLISH
   All rules strictly scoped under [data-design="executive"].
   Without ?design=executive these rules have zero effect.
   Reuses Phase 2–7 classes: .executive-section, .executive-filter-card,
   .executive-filter-row, .executive-input, .executive-select,
   .executive-button-primary, .executive-button-secondary,
   .executive-button-cancel, .executive-table-wrap, .executive-status-badge,
   .executive-section-title, .executive-row-counter, .executive-empty-cell,
   .executive-form-row, .executive-form-label, .executive-alert.
   ============================================================ */

/* ---- Stats row (3 KPI cards on attendance lists) ---- */
[data-design="executive"] .executive-attendance-stats {
    gap: 16px !important;
}
[data-design="executive"] .executive-attendance-stat.kpi-card {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    padding: 1.1rem 1.25rem !important;
    box-shadow: none !important;
    transform: none !important;
}
[data-design="executive"] .executive-attendance-stat.kpi-card::before,
[data-design="executive"] .executive-attendance-stat.kpi-card::after {
    display: none !important;
}
[data-design="executive"] .executive-attendance-stat-label {
    color: var(--muted-foreground) !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 0.35rem !important;
}
[data-design="executive"] .executive-attendance-stat-value {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', serif;
    font-weight: 600 !important;
    font-size: 1.75rem !important;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
[data-design="executive"] .executive-attendance-stat-value--present {
    color: var(--success) !important;
}
[data-design="executive"] .executive-attendance-stat-value--absent {
    color: var(--destructive) !important;
}

/* ---- Filter card (date / group filter) ---- */
[data-design="executive"] .executive-attendance-page .executive-filter-card {
    padding: 1rem 1.25rem !important;
}
[data-design="executive"] .executive-filter-label {
    color: var(--muted-foreground) !important;
    font-weight: 500 !important;
    font-size: 0.8125rem !important;
}

/* ---- Attendance table — alias of people-table styling ---- */
[data-design="executive"] .executive-attendance-table {
    width: 100%;
}
[data-design="executive"] .executive-attendance-table thead th {
    color: var(--muted-foreground) !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent !important;
    border-bottom: 1px solid var(--hairline) !important;
    padding: 0.85rem 0.9rem !important;
}
[data-design="executive"] .executive-attendance-table tbody td {
    color: var(--foreground) !important;
    font-size: 0.9375rem;
    padding: 0.85rem 0.9rem !important;
    border-bottom: 1px solid var(--hairline) !important;
    background: transparent !important;
}
[data-design="executive"] .executive-attendance-table tbody tr:hover td {
    background: color-mix(in srgb, var(--accent) 4%, transparent) !important;
}
[data-design="executive"] .executive-attendance-time {
    font-variant-numeric: tabular-nums;
    color: var(--foreground) !important;
}
[data-design="executive"] .executive-attendance-group,
[data-design="executive"] .executive-attendance-position,
[data-design="executive"] .executive-attendance-department,
[data-design="executive"] .executive-attendance-recorded-by,
[data-design="executive"] .executive-attendance-notes {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-attendance-person .executive-person-link {
    color: var(--foreground-strong) !important;
    font-weight: 500;
    text-decoration: none !important;
}
[data-design="executive"] .executive-attendance-person .executive-person-link:hover {
    color: var(--accent) !important;
    text-decoration: underline !important;
}
[data-design="executive"] .executive-empty-cta {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 500;
}
[data-design="executive"] .executive-empty-cta:hover {
    text-decoration: underline !important;
}

/* ---- Status badges in attendance tables (semantic soft) ---- */
[data-design="executive"] .executive-attendance-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    background-image: none !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-attendance-status--present {
    background: color-mix(in srgb, var(--success) 12%, var(--card)) !important;
    color: var(--success) !important;
    border: 1px solid color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-attendance-status--absent {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    color: var(--destructive) !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}
[data-design="executive"] .executive-attendance-status--late {
    background: color-mix(in srgb, #d97706 12%, var(--card)) !important;
    color: #d97706 !important;
    border: 1px solid color-mix(in srgb, #d97706 35%, transparent) !important;
}
[data-design="executive"] .executive-attendance-status--sick {
    background: color-mix(in srgb, #d97706 12%, var(--card)) !important;
    color: #d97706 !important;
    border: 1px solid color-mix(in srgb, #d97706 35%, transparent) !important;
}
[data-design="executive"] .executive-attendance-status--vacation {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
    color: var(--accent) !important;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent) !important;
}

/* ============================================================
   Mark attendance pages — paper-clean grid of person cards
   ============================================================ */

/* ---- Summary card (bulk_summary banner) ---- */
[data-design="executive"] .executive-summary-card {
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-left: 4px solid var(--accent) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-summary-title {
    color: var(--foreground-strong) !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
}
[data-design="executive"] .executive-summary-text {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-summary-text strong {
    color: var(--foreground-strong) !important;
}

/* ---- Info alert (Phase 7 had warning, now add info) ---- */
[data-design="executive"] .executive-alert.executive-alert--info {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    border-radius: 10px !important;
}
[data-design="executive"] .executive-alert.executive-alert--info i {
    color: var(--accent) !important;
}

/* ---- Form card wrapper ---- */
[data-design="executive"] .executive-attendance-form-card {
    padding: 1.5rem !important;
}

/* ---- Date row label override ---- */
[data-design="executive"] .executive-attendance-mark .executive-form-row > .executive-form-label {
    color: var(--foreground-strong) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    text-transform: none;
    letter-spacing: normal;
}

/* ---- Attendance grid ---- */
[data-design="executive"] .executive-attendance-grid {
    gap: 14px !important;
}

/* ---- Person card (each child/staff row) ---- */
[data-design="executive"] .executive-attendance-person-card.glass-card {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    padding: 1rem !important;
    transform: none !important;
}
[data-design="executive"] .executive-attendance-person-card.glass-card:hover {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--hairline)) !important;
    background: color-mix(in srgb, var(--accent) 3%, var(--card)) !important;
    transform: none !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-attendance-person-card::before,
[data-design="executive"] .executive-attendance-person-card::after {
    display: none !important;
}

/* ---- Avatar inside person card ---- */
[data-design="executive"] .executive-attendance-avatar.executive-attendance-avatar--photo {
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-attendance-avatar.executive-attendance-avatar--initial {
    background: color-mix(in srgb, var(--accent) 14%, var(--card)) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
}

/* ---- Person name / meta typography ---- */
[data-design="executive"] .executive-attendance-person-name {
    color: var(--foreground-strong) !important;
    font-weight: 500 !important;
    font-size: 0.9375rem;
    margin: 0;
}
[data-design="executive"] .executive-attendance-person-meta {
    color: var(--muted-foreground) !important;
    font-size: 0.75rem !important;
    margin-top: 0.15rem;
}
[data-design="executive"] .executive-attendance-saved-flag {
    color: var(--success) !important;
    font-weight: 500;
}

/* ---- Empty state inside grid ---- */
[data-design="executive"] .executive-attendance-empty {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-attendance-empty i {
    color: color-mix(in srgb, var(--muted-foreground) 70%, transparent) !important;
    text-shadow: none !important;
}

/* ---- Submit row ---- */
[data-design="executive"] .executive-attendance-submit-row {
    border-top: 1px solid var(--hairline);
    padding-top: 1.25rem !important;
    margin-top: 0.5rem;
}

/* ============================================================
   Status pickers — calm semantic radio buttons
   Mark child: custom .attendance-btn (inline <style>)
   Mark staff: Tailwind peer-checked utilities
   ============================================================ */

/* ---- Mark Child: base .attendance-btn override under flag ---- */
[data-design="executive"] .executive-attendance-mark .executive-attendance-btn {
    background: color-mix(in srgb, var(--card) 96%, var(--accent)) !important;
    background-image: none !important;
    border: 1.5px solid var(--hairline) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease !important;
}
[data-design="executive"] .executive-attendance-mark .executive-attendance-btn:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)) !important;
    background: color-mix(in srgb, var(--accent) 4%, var(--card)) !important;
}
[data-design="executive"] .executive-attendance-mark .attendance-radio:checked + .executive-attendance-btn[data-status="present"] {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 45%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] .executive-attendance-mark .attendance-radio:checked + .executive-attendance-btn[data-status="absent"] {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 45%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-attendance-mark .attendance-radio:checked + .executive-attendance-btn[data-status="sick"] {
    background: color-mix(in srgb, #d97706 14%, var(--card)) !important;
    border-color: color-mix(in srgb, #d97706 45%, transparent) !important;
    color: #d97706 !important;
}
[data-design="executive"] .executive-attendance-mark .executive-attendance-btn span {
    color: inherit !important;
}

/* ---- Mark Staff: Tailwind peer-checked override under flag ---- */
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-btn {
    background: color-mix(in srgb, var(--card) 96%, var(--accent)) !important;
    background-image: none !important;
    border: 1.5px solid var(--hairline) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease !important;
}
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-btn:hover {
    transform: none !important;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--accent) 4%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)) !important;
}
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-btn span {
    color: inherit !important;
}
/* Use :has() to detect checked input (modern browsers, 2026 baseline OK) */
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-status-label:has(input:checked) .executive-attendance-btn[data-status="present"] {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 45%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-status-label:has(input:checked) .executive-attendance-btn[data-status="absent"] {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 45%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-status-label:has(input:checked) .executive-attendance-btn[data-status="sick"] {
    background: color-mix(in srgb, #d97706 14%, var(--card)) !important;
    border-color: color-mix(in srgb, #d97706 45%, transparent) !important;
    color: #d97706 !important;
}
[data-design="executive"] .executive-attendance-mark--staff .executive-attendance-status-label:has(input:checked) .executive-attendance-btn[data-status="vacation"] {
    background: color-mix(in srgb, var(--accent) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important;
    color: var(--accent) !important;
}

/* End Phase 8 — Attendance Executive Polish */

/* ============================================================================
 * 18. PHASE 9 — REPORTS & DOCUMENTS EXECUTIVE POLISH
 * Goal: deliver an executive reporting workspace under [data-design="executive"]
 * for attendance report, staff documents list/upload, and fintech statements.
 *
 * Strategy:
 *  - All rules are STRICTLY scoped under [data-design="executive"].
 *  - Templates are modified additively only; without the flag the legacy
 *    look is fully preserved.
 *  - For attendance_report.html the dense sticky HR-grid is NOT rebuilt.
 *    We only calm the surrounding wrappers, headers, KPI cards, ranking
 *    table and the grid header strip; the functional status-* day-cell
 *    color codes are intentionally left untouched (they encode meaning).
 *  - For fintech reports the existing accounting-statement / data-table
 *    rendering is preserved; only header, filter, KPI and balance-total
 *    banner are softened.
 *  - Reuse existing executive-* primitives (executive-page, executive-eyebrow,
 *    executive-title, executive-section, executive-filter-card, executive-
 *    button-primary/secondary, executive-input/select, executive-empty-state).
 * ========================================================================== */

/* ---- 18.1  Universal report header / eyebrow / shell ----------------------- */
[data-design="executive"] .executive-report-page {
    padding-top: 8px;
}
[data-design="executive"] .executive-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
[data-design="executive"] .executive-report-header .executive-eyebrow {
    display: block !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 4px;
}
[data-design="executive"] .executive-report-header .executive-title {
    font-family: 'Fraunces', 'Inter', serif;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--foreground-strong) !important;
    margin: 0 !important;
    line-height: 1.15;
}
[data-design="executive"] .executive-report-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- 18.2  Universal report card (calm paper) ----------------------------- */
[data-design="executive"] .executive-report-card {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ---- 18.3  Universal KPI grid + KPI card --------------------------------- */
[data-design="executive"] .executive-report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
[data-design="executive"] .executive-report-kpi {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    padding: 14px 16px !important;
    text-align: left;
}
[data-design="executive"] .executive-report-kpi-label {
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-foreground) !important;
    margin: 0 0 6px 0 !important;
}
[data-design="executive"] .executive-report-kpi-value {
    font-family: 'Fraunces', 'Inter', serif !important;
    font-size: 1.55rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.012em;
    color: var(--foreground-strong) !important;
    font-variant-numeric: tabular-nums;
    margin: 0 !important;
}

/* Section head (fa-icon + text) inside report cards */
[data-design="executive"] .executive-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--foreground-strong);
    margin-bottom: 10px;
}
[data-design="executive"] .executive-section-head i {
    color: var(--accent) !important;
    opacity: 0.85;
}

/* ---- 18.4  Attendance report — outer shell ------------------------------- */
[data-design="executive"] .executive-attendance-report .glass-card {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
}
[data-design="executive"] .executive-attendance-report .report-header {
    border-bottom: 1px solid var(--hairline) !important;
    padding-bottom: 12px !important;
    margin-bottom: 12px !important;
}
[data-design="executive"] .executive-attendance-report .executive-report-title,
[data-design="executive"] .executive-attendance-report .report-title {
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-attendance-report .report-title i {
    color: var(--accent) !important;
}

/* Month navigator → calm paper instead of indigo gradient */
[data-design="executive"] .executive-month-navigator {
    background: var(--muted-bg, color-mix(in srgb, var(--foreground) 4%, var(--card))) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    padding: 6px 10px !important;
}
[data-design="executive"] .executive-month-nav-btn {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
[data-design="executive"] .executive-month-nav-btn:hover {
    background: color-mix(in srgb, var(--accent) 10%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-current-month {
    color: var(--foreground-strong) !important;
    text-shadow: none !important;
    font-weight: 700;
}

/* Toolbar stat badges (counts) */
[data-design="executive"] .executive-stat-badge {
    background: color-mix(in srgb, var(--accent) 10%, var(--card)) !important;
    color: var(--foreground-strong) !important;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
    font-variant-numeric: tabular-nums;
}
[data-design="executive"] .executive-stat-badge strong {
    color: var(--accent) !important;
}

/* Filter select (already styled by executive-select base) */
[data-design="executive"] .executive-attendance-report .filter-select.executive-select {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    font-weight: 500;
}
[data-design="executive"] .executive-attendance-report .filter-select.executive-select:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent) !important;
    outline: none;
}

/* Export buttons → calm semantic */
[data-design="executive"] .executive-export-btn {
    border-radius: 8px !important;
    box-shadow: none !important;
    border: 1px solid var(--hairline) !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
[data-design="executive"] .executive-export-btn--excel {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    color: var(--success) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-export-btn--excel:hover {
    background: color-mix(in srgb, var(--success) 22%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 55%, transparent) !important;
}
[data-design="executive"] .executive-export-btn--pdf {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    color: var(--destructive) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}
[data-design="executive"] .executive-export-btn--pdf:hover {
    background: color-mix(in srgb, var(--destructive) 20%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 55%, transparent) !important;
}

/* HR metrics inside attendance_report — promote to executive-report-kpi look
 * (the .hr-metric-card already received .executive-report-kpi additively). */
[data-design="executive"] .executive-attendance-report .hr-metric-card.executive-report-kpi {
    text-align: center;
}
[data-design="executive"] .executive-attendance-report .metric-value.executive-report-kpi-value {
    font-size: 1.5rem !important;
}
/* Keep semantic colors but route them through tokens for calm contrast */
[data-design="executive"] .executive-attendance-report .metric-value.metric-ok    { color: var(--success) !important; }
[data-design="executive"] .executive-attendance-report .metric-value.metric-warn  { color: #d97706 !important; }
[data-design="executive"] .executive-attendance-report .metric-value.metric-danger{ color: var(--destructive) !important; }
[data-design="executive"] .executive-attendance-report .metric-value.metric-info  { color: var(--accent) !important; }

/* ---- 18.5  Ranking table (HR top losers) -------------------------------- */
[data-design="executive"] .executive-ranking-table thead th {
    background: var(--muted-bg, color-mix(in srgb, var(--foreground) 4%, var(--card))) !important;
    color: var(--muted-foreground) !important;
    border-bottom: 1px solid var(--hairline) !important;
    font-weight: 700 !important;
}
[data-design="executive"] .executive-ranking-table tbody td {
    border-bottom: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
}
[data-design="executive"] .executive-ranking-table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
}
[data-design="executive"] .executive-ranking-table tbody tr.row-critical {
    background: color-mix(in srgb, var(--destructive) 7%, var(--card)) !important;
}
[data-design="executive"] .executive-ranking-table tbody tr.row-critical:hover {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
}
[data-design="executive"] .executive-ranking-table .ranking-staff-link,
[data-design="executive"] .executive-ranking-table a {
    color: var(--foreground-strong) !important;
    text-decoration: none;
    font-weight: 600;
}
[data-design="executive"] .executive-ranking-table .ranking-staff-link:hover,
[data-design="executive"] .executive-ranking-table a:hover {
    color: var(--accent) !important;
    text-decoration: underline;
}
/* Rank badges — keep semantic ranking but calmer */
[data-design="executive"] .executive-ranking-table .rank-badge {
    box-shadow: none !important;
    font-weight: 700;
}
[data-design="executive"] .executive-ranking-table .rank-1 {
    background: color-mix(in srgb, var(--destructive) 80%, transparent) !important;
}
[data-design="executive"] .executive-ranking-table .rank-2 {
    background: color-mix(in srgb, #d97706 80%, transparent) !important;
}
[data-design="executive"] .executive-ranking-table .rank-3 {
    background: color-mix(in srgb, #ca8a04 80%, transparent) !important;
}
[data-design="executive"] .executive-ranking-table .rank-n {
    background: var(--muted-foreground) !important;
}

/* ---- 18.6  Attendance grid header — calm gradient strip ----------------- */
/* Only thead is repainted; tbody day-cells keep their functional color codes
 * (status-present, status-absent, …) as those colors encode meaning. */
[data-design="executive"] .executive-attendance-grid thead th {
    background: var(--muted-bg, color-mix(in srgb, var(--foreground) 5%, var(--card))) !important;
    color: var(--foreground-strong) !important;
    border-bottom: 1px solid var(--hairline) !important;
    font-weight: 700;
    text-shadow: none !important;
}
[data-design="executive"] .executive-attendance-grid thead th.weekend-header {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-attendance-grid thead th.col-staff {
    background: var(--muted-bg, color-mix(in srgb, var(--foreground) 5%, var(--card))) !important;
    color: var(--foreground-strong) !important;
    border-right: 1px solid var(--hairline) !important;
}
/* col-summary headers carry inline gradient styles — overridden with !important */
[data-design="executive"] .executive-attendance-grid thead th.col-summary,
[data-design="executive"] .executive-attendance-grid thead th.col-summary[style] {
    background: var(--muted-bg, color-mix(in srgb, var(--foreground) 6%, var(--card))) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    text-shadow: none !important;
}

/* Body cells in attendance grid — calm staff & summary stripes */
[data-design="executive"] .executive-attendance-grid tbody td {
    border-color: var(--hairline) !important;
    background: var(--card) !important;
}
[data-design="executive"] .executive-attendance-grid tbody td.td-staff {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    color: var(--foreground-strong) !important;
    border-right: 1px solid var(--hairline) !important;
}
[data-design="executive"] .executive-attendance-grid tbody td.td-staff a {
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-attendance-grid tbody td.td-staff a:hover {
    color: var(--accent) !important;
}
[data-design="executive"] .executive-attendance-grid tbody td.td-summary {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border-left: 1px solid var(--hairline) !important;
    font-variant-numeric: tabular-nums;
}
[data-design="executive"] .executive-attendance-grid tbody tr:hover td {
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
}
[data-design="executive"] .executive-attendance-grid tbody tr:hover td.td-staff {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
}

/* Day-cell hover ring — calm accent instead of indigo + heavy shadow */
[data-design="executive"] .executive-attendance-grid .day-cell:hover {
    box-shadow: 0 0 0 2px var(--accent), 0 2px 6px rgba(0, 0, 0, 0.18) !important;
}

/* No-link badge */
[data-design="executive"] .executive-attendance-grid .no-link-badge {
    background: color-mix(in srgb, var(--destructive) 10%, var(--card)) !important;
    color: var(--destructive) !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}

/* Legend — calm paper card */
[data-design="executive"] .executive-attendance-legend {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-attendance-legend .legend-item {
    color: var(--foreground) !important;
}

/* ---- 18.7  Documents list page (templates/staff/documents_list.html) ----- */
/* Page header glass → calm paper */
[data-design="executive"] .executive-documents-header {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 18px 22px !important;
    margin-bottom: 16px !important;
}
[data-design="executive"] .executive-documents-header h1,
[data-design="executive"] .executive-documents-header .executive-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', serif;
    font-size: 1.6rem !important;
    margin: 0 0 4px 0 !important;
    font-weight: 600;
}
[data-design="executive"] .executive-documents-header p,
[data-design="executive"] .executive-documents-header .executive-subtitle {
    color: var(--muted-foreground) !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

/* Filter card */
[data-design="executive"] .executive-documents-filter {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 14px 16px !important;
}
[data-design="executive"] .executive-documents-filter .filter-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
[data-design="executive"] .executive-documents-filter .filter-control {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
}
[data-design="executive"] .executive-documents-filter .filter-control:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent) !important;
    background: var(--card) !important;
}
[data-design="executive"] .executive-documents-filter .btn-filter {
    background: var(--accent) !important;
    color: var(--accent-foreground, #fff) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    font-weight: 600;
}
[data-design="executive"] .executive-documents-filter .btn-filter:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--accent) 88%, var(--foreground-strong)) !important;
    box-shadow: none !important;
}

/* Documents table wrap */
[data-design="executive"] .executive-documents-table-wrap {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 8px !important;
}
[data-design="executive"] .executive-documents-table thead {
    background: color-mix(in srgb, var(--foreground) 4%, var(--card)) !important;
}
[data-design="executive"] .executive-documents-table th {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--hairline) !important;
}
[data-design="executive"] .executive-documents-table tbody tr {
    background: transparent !important;
}
[data-design="executive"] .executive-documents-table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
}
[data-design="executive"] .executive-documents-table tbody td {
    color: var(--foreground) !important;
    border-bottom: 1px solid var(--hairline) !important;
}
[data-design="executive"] .executive-documents-table .staff-link {
    color: var(--foreground-strong) !important;
    font-weight: 600;
}
[data-design="executive"] .executive-documents-table .staff-link:hover {
    color: var(--accent) !important;
}

/* Document type badges → calm soft chips
 * The legacy .badge-* gradients are replaced with semantic neutral chips
 * tinted by hue; type-meaning is preserved via subtle hue differentiation. */
[data-design="executive"] .executive-documents-table .badge {
    background: color-mix(in srgb, var(--foreground) 6%, var(--card)) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--hairline) !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-passport,
[data-design="executive"] .executive-documents-table .badge.badge-tax_form {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
    color: var(--accent) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-contract {
    background: color-mix(in srgb, #db2777 12%, var(--card)) !important;
    color: #db2777 !important;
    border-color: color-mix(in srgb, #db2777 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-certificate {
    background: color-mix(in srgb, #0891b2 12%, var(--card)) !important;
    color: #0891b2 !important;
    border-color: color-mix(in srgb, #0891b2 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-medical {
    background: color-mix(in srgb, var(--success) 12%, var(--card)) !important;
    color: var(--success) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-background_check {
    background: color-mix(in srgb, #d97706 12%, var(--card)) !important;
    color: #d97706 !important;
    border-color: color-mix(in srgb, #d97706 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-other {
    background: color-mix(in srgb, var(--foreground) 6%, var(--card)) !important;
    color: var(--muted-foreground) !important;
    border-color: var(--hairline) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-expired {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    color: var(--destructive) !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 45%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .badge.badge-expiring {
    background: color-mix(in srgb, #d97706 14%, var(--card)) !important;
    color: #d97706 !important;
    border: 1px solid color-mix(in srgb, #d97706 45%, transparent) !important;
}

/* Action buttons (download / delete) → ghost calm */
[data-design="executive"] .executive-documents-table .action-btn {
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
[data-design="executive"] .executive-documents-table .action-btn-download {
    background: color-mix(in srgb, var(--success) 12%, var(--card)) !important;
    color: var(--success) !important;
    border: 1px solid color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .action-btn-download:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--success) 20%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 55%, transparent) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-documents-table .action-btn-delete {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    color: var(--destructive) !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}
[data-design="executive"] .executive-documents-table .action-btn-delete:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--destructive) 20%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 55%, transparent) !important;
    box-shadow: none !important;
}

/* Empty state for documents */
[data-design="executive"] .executive-documents-table-wrap .no-documents {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-documents-table-wrap .no-documents i {
    color: var(--muted-foreground) !important;
    opacity: 0.6;
}

/* ---- 18.8  Upload document page (templates/staff/upload_document.html) --- */
[data-design="executive"] .executive-document-upload-page {
    max-width: 880px !important;
}
[data-design="executive"] .executive-document-upload-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 14px !important;
    text-align: center;
}
[data-design="executive"] .executive-document-upload-header h1,
[data-design="executive"] .executive-document-upload-header .executive-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', serif;
    font-weight: 600;
    font-size: 1.6rem !important;
}
[data-design="executive"] .executive-document-upload-header p,
[data-design="executive"] .executive-document-upload-header .executive-subtitle {
    color: var(--muted-foreground) !important;
    font-size: 0.95rem !important;
}

[data-design="executive"] .executive-document-upload-card {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 22px !important;
}
[data-design="executive"] .executive-document-upload-card .form-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
[data-design="executive"] .executive-document-upload-card .form-control-modern,
[data-design="executive"] .executive-document-upload-card input[type="text"],
[data-design="executive"] .executive-document-upload-card input[type="date"],
[data-design="executive"] .executive-document-upload-card select,
[data-design="executive"] .executive-document-upload-card textarea {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-document-upload-card .form-control-modern:focus,
[data-design="executive"] .executive-document-upload-card input:focus,
[data-design="executive"] .executive-document-upload-card select:focus,
[data-design="executive"] .executive-document-upload-card textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent) !important;
    background: var(--card) !important;
}
[data-design="executive"] .executive-document-upload-card .file-upload-area {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 2px dashed var(--hairline) !important;
    color: var(--foreground) !important;
}
[data-design="executive"] .executive-document-upload-card .file-upload-area:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
}
[data-design="executive"] .executive-document-upload-card .file-upload-area.dragover {
    border-color: color-mix(in srgb, var(--success) 60%, transparent) !important;
    background: color-mix(in srgb, var(--success) 8%, var(--card)) !important;
}
[data-design="executive"] .executive-document-upload-card .file-upload-icon,
[data-design="executive"] .executive-document-upload-card .file-upload-text {
    color: var(--foreground) !important;
}
[data-design="executive"] .executive-document-upload-card .file-upload-hint,
[data-design="executive"] .executive-document-upload-card .help-text {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] .executive-document-upload-card .selected-file {
    background: color-mix(in srgb, var(--success) 10%, var(--card)) !important;
    border: 1px solid color-mix(in srgb, var(--success) 45%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] .executive-document-upload-card .errorlist li {
    background: color-mix(in srgb, var(--destructive) 10%, var(--card)) !important;
    border: 1px solid color-mix(in srgb, var(--destructive) 45%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-document-upload-card .btn-primary {
    background: var(--accent) !important;
    color: var(--accent-foreground, #fff) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}
[data-design="executive"] .executive-document-upload-card .btn-primary:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--accent) 88%, var(--foreground-strong)) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-document-upload-card .btn-secondary {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}
[data-design="executive"] .executive-document-upload-card .btn-secondary:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
}

/* ---- 18.9  Fintech reports — minimal polish ----------------------------- */
/* Reports already use .accounting-statement / .data-table / Tailwind cards
 * (calmed by Phase 1 surface tokens). We only soften the report header,
 * KPI surfaces, and the noisy "Total Liabilities & Equity" gradient banner. */

[data-design="executive"] .executive-fintech-report .executive-report-header .executive-eyebrow {
    display: block !important;
}
[data-design="executive"] .executive-fintech-report .executive-button-secondary {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
}
[data-design="executive"] .executive-fintech-report .executive-button-secondary:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
}

/* Balance sheet — Total Liabilities & Equity gradient banner → calm accent */
[data-design="executive"] .executive-balance-total-inner {
    background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, var(--card))) !important;
    background-image: none !important;
    border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent) !important;
}
[data-design="executive"] .executive-balance-total-inner h2,
[data-design="executive"] .executive-balance-total-inner p {
    color: var(--foreground-strong) !important;
}

/* End Phase 9 — Reports & Documents Executive Polish */

/* ============================================================================
 * 19. PHASE 10A — MONTHLY REPORT EXECUTIVE POLISH
 * Goal: bring fintech/monthly_report.html to the Premium Calm Executive
 * level under [data-design="executive"], without redesigning calculations,
 * context keys, Chart.js data series, or the dual-mode JS palette.
 *
 * Strategy:
 *  - All rules are STRICTLY scoped under [data-design="executive"].
 *  - Templates are modified additively only; without the flag the legacy
 *    glassy gradient look is fully preserved.
 *  - Reuse Phase 9 primitives: executive-report-page, executive-report-card,
 *    executive-report-kpi-grid, executive-report-kpi*, executive-eyebrow.
 *  - Neutralize legacy decorations on the monthly_report scope only:
 *      * stat-card ::before color stripes (4 variants)
 *      * stat-card hover translateY/lift
 *      * stat-icon gradient backgrounds
 *      * progress-bar gradients + shimmer animation
 *      * trend-badge tints
 *      * loan-card violet gradient + hover translateY
 *      * account-flow-item / expense-category translateX hover
 *      * inline `style="color: #...";` on metric-values is overridden by
 *        modifier classes executive-monthly-kpi-value--{positive,negative,
 *        neutral,info} for semantic calm tokens.
 *  - Chart.js color palette is handled in-template (dual-mode __palette).
 * ========================================================================== */

/* ---- 19.1  Root + header ------------------------------------------------ */
[data-design="executive"] .executive-monthly-report {
    padding-top: 8px;
}
[data-design="executive"] .executive-monthly-report .fade-in {
    animation: none !important;
}
[data-design="executive"] .executive-monthly-header {
    margin-bottom: 18px !important;
}
[data-design="executive"] .executive-monthly-header .executive-eyebrow {
    display: inline-block !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 6px;
}
[data-design="executive"] .executive-monthly-title {
    font-family: 'Fraunces', 'Inter', serif !important;
    font-size: 1.9rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.012em !important;
    color: var(--foreground-strong) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
}
[data-design="executive"] .executive-monthly-header .executive-subtitle {
    color: var(--muted-foreground) !important;
    font-size: 1rem !important;
    opacity: 1 !important;
    margin: 0 !important;
}

/* ---- 19.2  Filter card -------------------------------------------------- */
[data-design="executive"] .executive-monthly-filter {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-design="executive"] .executive-monthly-filter label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
[data-design="executive"] .executive-monthly-filter .form-control-modern,
[data-design="executive"] .executive-monthly-filter select {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-monthly-filter .form-control-modern:focus,
[data-design="executive"] .executive-monthly-filter select:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent) !important;
    outline: none;
}
/* btn-3d (active view-type + Refresh) inside the filter -> calm primary */
[data-design="executive"] .executive-monthly-filter .btn-3d {
    background: var(--accent) !important;
    background-image: none !important;
    color: var(--accent-foreground, #fff) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transform: none !important;
}
[data-design="executive"] .executive-monthly-filter .btn-3d:hover,
[data-design="executive"] .executive-monthly-filter .btn-3d:focus {
    background: color-mix(in srgb, var(--accent) 88%, var(--foreground-strong)) !important;
    box-shadow: none !important;
    transform: none !important;
}
/* Inactive view-type pill (Tailwind bg-gray-600) -> calm secondary */
[data-design="executive"] .executive-monthly-filter .btn.bg-gray-600 {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-monthly-filter .btn.bg-gray-600:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
    color: var(--foreground-strong) !important;
}

/* ---- 19.3  KPI grid + KPI cards ----------------------------------------- */
[data-design="executive"] .executive-monthly-kpi-grid {
    margin-bottom: 18px;
}
/* Override .stat-card legacy chrome (already aliased via executive-report-kpi
 * which gives calm paper). Here we strip ::before stripe + hover lift. */
[data-design="executive"] .executive-monthly-kpi.stat-card {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 18px 20px !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
[data-design="executive"] .executive-monthly-kpi.stat-card:hover {
    transform: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    background: color-mix(in srgb, var(--accent) 4%, var(--card)) !important;
}
/* Kill the colored ::before stripe (4 variants) in favor of an
 * understated left-edge accent matching the semantic class. */
[data-design="executive"] .executive-monthly-kpi.stat-card::before {
    width: 3px !important;
    background: var(--hairline) !important;
    background-image: none !important;
    transition: none !important;
}
[data-design="executive"] .executive-monthly-kpi.stat-card:hover::before {
    width: 3px !important;
}
[data-design="executive"] .executive-monthly-kpi--positive.stat-card::before {
    background: color-mix(in srgb, var(--success) 65%, transparent) !important;
}
[data-design="executive"] .executive-monthly-kpi--negative.stat-card::before {
    background: color-mix(in srgb, var(--destructive) 65%, transparent) !important;
}
[data-design="executive"] .executive-monthly-kpi--neutral.stat-card::before,
[data-design="executive"] .executive-monthly-kpi--info.stat-card::before {
    background: color-mix(in srgb, var(--accent) 65%, transparent) !important;
}

/* Stat icon: kill rgba gradient bg, switch to soft semantic chip */
[data-design="executive"] .executive-monthly-kpi-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    font-size: 20px !important;
    background: color-mix(in srgb, var(--foreground) 6%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
    margin-bottom: 12px !important;
}
[data-design="executive"] .executive-monthly-kpi-icon--positive {
    background: color-mix(in srgb, var(--success) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] .executive-monthly-kpi-icon--negative {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-monthly-kpi-icon--neutral {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
    color: var(--accent) !important;
}
[data-design="executive"] .executive-monthly-kpi-icon--info {
    background: color-mix(in srgb, var(--accent) 10%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--accent) !important;
}

/* KPI label/value typography (already calmed by Phase 9 .executive-report-kpi-*).
 * Here we override the inline `style="color: #..."` on metric-value via
 * higher-specificity scoped rules + !important. */
[data-design="executive"] .executive-monthly-kpi .metric-label,
[data-design="executive"] .executive-monthly-kpi .executive-report-kpi-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 6px 0 !important;
    opacity: 1 !important;
}
[data-design="executive"] .executive-monthly-kpi .metric-value,
[data-design="executive"] .executive-monthly-kpi .executive-monthly-kpi-value {
    font-family: 'Fraunces', 'Inter', serif !important;
    font-size: 1.55rem !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.012em;
    font-variant-numeric: tabular-nums;
    margin: 0 !important;
}
[data-design="executive"] .executive-monthly-kpi-value--positive { color: var(--success) !important; }
[data-design="executive"] .executive-monthly-kpi-value--negative { color: var(--destructive) !important; }
[data-design="executive"] .executive-monthly-kpi-value--neutral  { color: var(--accent) !important; }
[data-design="executive"] .executive-monthly-kpi-value--info     { color: var(--accent) !important; }

[data-design="executive"] .executive-monthly-kpi .executive-report-kpi-meta,
[data-design="executive"] .executive-monthly-kpi small {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    opacity: 1 !important;
    letter-spacing: 0.02em;
}

/* ---- 19.4  Universal monthly-report sections (glass-card override) ------ */
[data-design="executive"] .executive-monthly-report .glass-card {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-design="executive"] .executive-monthly-report .section-header {
    border-bottom: 1px solid var(--hairline) !important;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
}
[data-design="executive"] .executive-monthly-report .section-icon {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--accent) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    font-size: 18px !important;
    box-shadow: none !important;
}
[data-design="executive"] .executive-monthly-report .section-header h3 {
    font-family: 'Fraunces', 'Inter', serif;
    color: var(--foreground-strong) !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
}
[data-design="executive"] .executive-monthly-report .section-header small {
    color: var(--muted-foreground) !important;
    opacity: 1 !important;
    font-size: 0.8rem !important;
}

/* ---- 19.5  Progress bar (breakeven, expense bars, loan bars) ----------- */
[data-design="executive"] .executive-monthly-report .progress-container {
    background: color-mix(in srgb, var(--foreground) 5%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 8px !important;
}
[data-design="executive"] .executive-monthly-report .progress-bar {
    border-radius: 7px !important;
    box-shadow: none !important;
    color: var(--accent-foreground, #fff) !important;
}
/* Strip animated shimmer overlay */
[data-design="executive"] .executive-monthly-report .progress-bar::after {
    display: none !important;
    animation: none !important;
}
[data-design="executive"] .executive-monthly-report .progress-success {
    background: var(--success) !important;
    background-image: none !important;
}
[data-design="executive"] .executive-monthly-report .progress-warning {
    background: #d97706 !important;
    background-image: none !important;
}
[data-design="executive"] .executive-monthly-report .progress-info {
    background: var(--accent) !important;
    background-image: none !important;
}

/* ---- 19.6  Trend badges (breakeven status + trend table) --------------- */
[data-design="executive"] .executive-monthly-report .trend-badge {
    border-radius: 999px !important;
    padding: 4px 12px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    box-shadow: none !important;
    border: 1px solid var(--hairline);
}
[data-design="executive"] .executive-monthly-report .trend-up {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    color: var(--success) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-monthly-report .trend-down {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    color: var(--destructive) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}

/* ---- 19.7  Income breakdown metric-grid -------------------------------- */
[data-design="executive"] .executive-monthly-income .metric-grid {
    margin: 0 0 14px 0 !important;
}
[data-design="executive"] .executive-monthly-income .metric-item {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    text-align: left;
    padding: 14px 16px !important;
}
[data-design="executive"] .executive-monthly-income .metric-item i {
    font-size: 1.4rem !important;
    color: var(--muted-foreground) !important;
    margin-bottom: 8px !important;
}
[data-design="executive"] .executive-monthly-income .metric-item .metric-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 1 !important;
}
[data-design="executive"] .executive-monthly-income .metric-item .metric-value {
    font-family: 'Fraunces', 'Inter', serif !important;
    font-weight: 600 !important;
    font-size: 1.3rem !important;
    color: var(--foreground-strong) !important;
    font-variant-numeric: tabular-nums;
}
[data-design="executive"] .executive-monthly-income .metric-item small {
    color: var(--muted-foreground) !important;
    opacity: 1 !important;
}

/* ---- 19.8  Expense category rows --------------------------------------- */
[data-design="executive"] .executive-monthly-expenses .expense-category {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    border-left: 3px solid color-mix(in srgb, var(--accent) 45%, transparent) !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    margin-bottom: 8px !important;
    transition: background 0.15s ease !important;
}
[data-design="executive"] .executive-monthly-expenses .expense-category:hover {
    transform: none !important;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
}
[data-design="executive"] .executive-monthly-expenses .expense-category strong {
    color: var(--foreground-strong) !important;
    font-weight: 600;
}
[data-design="executive"] .executive-monthly-expenses .expense-category strong:last-child {
    font-family: 'Fraunces', 'Inter', serif;
    font-variant-numeric: tabular-nums;
}

/* ---- 19.9  Account flow items ------------------------------------------ */
[data-design="executive"] .executive-monthly-accounts .account-flow-item {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
[data-design="executive"] .executive-monthly-accounts .account-flow-item:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
}
[data-design="executive"] .executive-monthly-accounts .account-flow-item i {
    font-size: 1.35rem !important;
    color: var(--accent) !important;
}
[data-design="executive"] .executive-monthly-accounts .account-flow-item small {
    color: var(--muted-foreground) !important;
    opacity: 1 !important;
}
[data-design="executive"] .executive-monthly-accounts .account-flow-item .text-right > div {
    font-family: 'Fraunces', 'Inter', serif !important;
    color: var(--foreground-strong) !important;
    font-variant-numeric: tabular-nums;
}

/* ---- 19.10 Cash flow + trend tables ----------------------------------- */
[data-design="executive"] .executive-monthly-report .table.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
[data-design="executive"] .executive-monthly-report .table.table-modern thead th {
    background: color-mix(in srgb, var(--foreground) 4%, var(--card)) !important;
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--hairline) !important;
    padding: 10px 12px !important;
}
[data-design="executive"] .executive-monthly-report .table.table-modern tbody td {
    color: var(--foreground) !important;
    border-bottom: 1px solid var(--hairline) !important;
    padding: 10px 12px !important;
    font-variant-numeric: tabular-nums;
}
[data-design="executive"] .executive-monthly-report .table.table-modern tbody tr:hover td {
    background: color-mix(in srgb, var(--accent) 5%, var(--card)) !important;
}
[data-design="executive"] .executive-monthly-report .table.table-modern .text-success {
    color: var(--success) !important;
}
[data-design="executive"] .executive-monthly-report .table.table-modern .text-danger {
    color: var(--destructive) !important;
}

/* ---- 19.11 Loan / investment cards ------------------------------------ */
/* Original .loan-card has violet gradient bg + hover translateY. Strip that
 * on monthly report scope, keep semantic content untouched. */
[data-design="executive"] .executive-monthly-loans .loan-card,
[data-design="executive"] .executive-monthly-investments .loan-card {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-bottom: 12px !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card:hover,
[data-design="executive"] .executive-monthly-investments .loan-card:hover {
    transform: none !important;
    box-shadow: none !important;
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card strong,
[data-design="executive"] .executive-monthly-investments .loan-card strong {
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card small,
[data-design="executive"] .executive-monthly-investments .loan-card small {
    color: var(--muted-foreground) !important;
    opacity: 1 !important;
}
/* Inline color="#..." on totals inside loan rows -> route through tokens */
[data-design="executive"] .executive-monthly-loans .loan-card div[style*="#10b981"],
[data-design="executive"] .executive-monthly-investments .loan-card div[style*="#10b981"] {
    color: var(--success) !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card div[style*="#ef4444"],
[data-design="executive"] .executive-monthly-investments .loan-card div[style*="#ef4444"] {
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card div[style*="#3b82f6"],
[data-design="executive"] .executive-monthly-investments .loan-card div[style*="#3b82f6"] {
    color: var(--accent) !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card div[style*="#f59e0b"],
[data-design="executive"] .executive-monthly-investments .loan-card div[style*="#f59e0b"] {
    color: #d97706 !important;
}
[data-design="executive"] .executive-monthly-loans .loan-card div[style*="#8b5cf6"],
[data-design="executive"] .executive-monthly-investments .loan-card div[style*="#8b5cf6"] {
    color: var(--accent) !important;
}
/* Tabular numerics on loan amounts */
[data-design="executive"] .executive-monthly-loans .loan-card,
[data-design="executive"] .executive-monthly-investments .loan-card {
    font-variant-numeric: tabular-nums;
}

/* badge-modern badge-info inside loan/investment cards -> calm soft chip */
[data-design="executive"] .executive-monthly-loans .badge-modern.badge-info,
[data-design="executive"] .executive-monthly-investments .badge-modern.badge-info {
    background: color-mix(in srgb, var(--accent) 12%, var(--card)) !important;
    color: var(--accent) !important;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent) !important;
    box-shadow: none !important;
    font-weight: 600;
}

/* ---- 19.12 Chart wrappers --------------------------------------------- */
[data-design="executive"] .executive-monthly-report .executive-chart-wrap {
    margin: 8px 0 0 0;
}

/* ---- 19.13 Inline metric-value color overrides (KPI safety net) -------- */
/* The KPI metric-value cells carry inline `style="color: #10b981"` etc.
 * Inline styles win against class rules unless overridden via attribute
 * selector + !important on the same cascade level. We already use modifier
 * classes above; this safety net catches any missed inline color. */
[data-design="executive"] .executive-monthly-kpi .metric-value[style*="#10b981"] {
    color: var(--success) !important;
}
[data-design="executive"] .executive-monthly-kpi .metric-value[style*="#ef4444"] {
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-monthly-kpi .metric-value[style*="#3b82f6"] {
    color: var(--accent) !important;
}
[data-design="executive"] .executive-monthly-kpi .metric-value[style*="#8b5cf6"] {
    color: var(--accent) !important;
}

/* End Phase 10A — Monthly Report Executive Polish */

/* ============================================================================
 * 20. PHASE 10C — GLOBAL COMPONENTS / SHELL EXECUTIVE POLISH
 * Goal: close the remaining shell-level gaps left by Phase 1 so the entire
 * ERP shell feels cohesive under [data-design="executive"]:
 *   - mobile menu button + mobile sidebar overlay
 *   - sidebar brand icon + global search trigger chip
 *   - sidebar group toggle expand/collapse polish
 *   - sidebar footer (theme / language / user / logout) refinements
 *   - search modal input / results / empty / hover states
 *   - FAB hover + per-item soft semantic accents (additive, not destructive)
 *   - toast soft-bordered refinement
 *   - notification dropdown inner item baseline
 *   - generic `.modal` pattern (calm card) safety net for inline modals
 *
 * Strategy:
 *   - All rules STRICTLY scoped under [data-design="executive"].
 *   - base.html is intentionally NOT modified (all class hooks already exist).
 *   - Reuse Phase 1–10A primitives (var(--card), var(--hairline),
 *     var(--muted-foreground), --primary-soft, color-mix, etc.).
 *   - !important only used where Tailwind utility or inline JS-set inline
 *     styles need to be overridden inside the executive scope.
 *   - JS, route names, permission checks, navigation links, keyboard
 *     shortcuts, search fetch URL, FAB open/close, toast injection,
 *     theme toggle and language switcher — UNCHANGED.
 * ========================================================================== */

/* ---- 20.1  Mobile menu button + mobile sidebar overlay ----------------- */
[data-design="executive"] #mobileMenuBtn,
[data-design="executive"] #mobileMenuBtn.tw-shell-icon-btn {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground-strong) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-design="executive"] #mobileMenuBtn:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 35%, transparent) !important;
}
[data-design="executive"] .sidebar-overlay,
[data-design="executive"] .sidebar-overlay.active {
    background: oklch(0 0 0 / 0.45) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ---- 20.2  Sidebar brand + global search trigger ----------------------- */
/* Brand icon (fa-graduation-cap) inside the brand link */
[data-design="executive"] .sidebar h1.gradient-text > i.fas {
    color: var(--primary) !important;
    margin-right: 8px;
}
/* The "Search..." trigger button at the top of the sidebar */
[data-design="executive"] .sidebar button[onclick="openSearch()"] {
    background: color-mix(in srgb, var(--foreground) 4%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
    border-radius: 10px !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .sidebar button[onclick="openSearch()"]:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .sidebar button[onclick="openSearch()"] i.fa-search {
    color: var(--muted-foreground);
}
[data-design="executive"] .sidebar button[onclick="openSearch()"] kbd,
[data-design="executive"] .sidebar button[onclick="openSearch()"] .tw-kbd {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---- 20.3  Sidebar nav scrollbar (calm thin) -------------------------- */
[data-design="executive"] .sidebar nav {
    scrollbar-width: thin;
    scrollbar-color: var(--hairline) transparent;
}
[data-design="executive"] .sidebar nav::-webkit-scrollbar {
    width: 6px;
}
[data-design="executive"] .sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}
[data-design="executive"] .sidebar nav::-webkit-scrollbar-thumb {
    background-color: var(--hairline);
    border-radius: 3px;
}
[data-design="executive"] .sidebar nav::-webkit-scrollbar-thumb:hover {
    background-color: var(--muted-foreground);
}

/* ---- 20.4  Sidebar group toggle states + chevron ---------------------- */
[data-design="executive"] .sidebar-group-toggle {
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.02em;
}
[data-design="executive"] .sidebar-group.open > .sidebar-group-toggle {
    color: var(--foreground-strong);
    background: transparent;
}
[data-design="executive"] .sidebar-group-toggle .toggle-icon {
    color: var(--muted-foreground) !important;
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.15s ease;
}
[data-design="executive"] .sidebar-group-toggle:hover .toggle-icon {
    opacity: 1;
}

/* Sidebar nav link inline indicator dots (text-green-400 / text-red-400) */
[data-design="executive"] .sidebar-link i.text-green-400 {
    color: var(--success) !important;
    opacity: 0.85;
}
[data-design="executive"] .sidebar-link i.text-red-400 {
    color: var(--destructive) !important;
    opacity: 0.85;
}

/* ---- 20.5  Sidebar footer block (theme/lang/user/logout) -------------- */
/* Outer divider line (inline `border-top: 1px solid rgba(255,255,255,0.1)`) */
[data-design="executive"] .sidebar > div:last-child {
    border-top: 1px solid var(--hairline) !important;
    background: color-mix(in srgb, var(--foreground) 2%, var(--card));
}
/* Theme toggle and language form buttons */
[data-design="executive"] #themeToggle,
[data-design="executive"] #langForm > button {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
[data-design="executive"] #themeToggle:hover,
[data-design="executive"] #langForm > button:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--foreground-strong) !important;
}
/* Theme icon under both states (sun/moon) — calm semantic accent */
[data-design="executive"] #themeIcon.text-yellow-400 {
    color: #d97706 !important;
}
[data-design="executive"] #themeIcon.text-purple-400 {
    color: var(--accent) !important;
}

/* User info container (legacy `.bg-white/5` is calmed by Phase 1; we add
 * proper paper feel and refined typography here). */
[data-design="executive"] .sidebar > div:last-child > div.flex.items-center {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
}
[data-design="executive"] .sidebar > div:last-child .text-gray-400 {
    color: var(--muted-foreground) !important;
}

/* Logout icon (red ghost -> calm destructive ghost) */
[data-design="executive"] .sidebar a[href*="logout"].text-red-400 {
    color: var(--destructive) !important;
    border-radius: 6px;
    transition: background 0.15s ease;
}
[data-design="executive"] .sidebar a[href*="logout"].text-red-400:hover {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    color: var(--destructive) !important;
}

/* ---- 20.6  Search modal — input / results / empty state --------------- */
/* Backdrop already calmed by Phase 1 (.search-modal -> oklch(0 0 0 /0.55)).
 * Add a soft blur to lift the calm card off the page. */
[data-design="executive"] .search-modal {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
/* Header section divider inside .search-container */
[data-design="executive"] .search-container > div.p-4.border-b {
    border-bottom-color: var(--hairline) !important;
    background: color-mix(in srgb, var(--foreground) 3%, var(--card));
}
/* Input field */
[data-design="executive"] #searchInput {
    background: transparent !important;
    color: var(--foreground-strong) !important;
    caret-color: var(--accent);
}
[data-design="executive"] #searchInput::placeholder {
    color: var(--muted-foreground);
    opacity: 1;
}
[data-design="executive"] #searchInput:focus {
    outline: none;
    box-shadow: none;
}
/* Search icon at the left */
[data-design="executive"] .search-container i.fa-search {
    color: var(--muted-foreground) !important;
}
/* Close hint button */
[data-design="executive"] .search-container button[onclick="closeSearch()"] {
    color: var(--muted-foreground) !important;
}
/* Result rows (rendered by JS) — calm hover + readable typography.
 * The JS uses `hover:bg-white/10` Tailwind utility on result `<a>` rows. */
[data-design="executive"] #searchResults a {
    border-radius: 8px;
    transition: background 0.15s ease;
}
[data-design="executive"] #searchResults a:hover,
[data-design="executive"] #searchResults a.hover\:bg-white\/10:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
}
/* Section labels in results (rendered with inline color: var(--text-secondary)) */
[data-design="executive"] #searchResults div[style*="--text-secondary"] {
    color: var(--muted-foreground) !important;
}
[data-design="executive"] #searchResults div[style*="--primary-color"] {
    color: var(--primary) !important;
}
[data-design="executive"] #searchResults div[style*="--text-primary"] {
    color: var(--foreground-strong) !important;
}
/* Empty / loading / error placeholder paragraphs */
[data-design="executive"] #searchResults p.text-gray-500 {
    color: var(--muted-foreground) !important;
    font-size: 0.95rem;
    padding: 32px 16px !important;
}
[data-design="executive"] #searchResults p.text-red-500 {
    color: var(--destructive) !important;
}

/* ---- 20.7  FAB — refinements over Phase 1 ----------------------------- */
/* Phase 1 already turns fab-main into calm primary and fab-item into paper.
 * Polish the open-state rotation chip glow and the per-item icon hue. */
[data-design="executive"] .fab-main {
    border-radius: 14px !important;
    width: 52px !important;
    height: 52px !important;
}
[data-design="executive"] .fab-main:hover {
    transform: none !important;
    filter: brightness(1.04);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent), inset 0 1px 0 var(--card-highlight) !important;
}
[data-design="executive"] .fab-main.open {
    /* Keep close-icon rotation; only soften the visual. */
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    color: var(--destructive) !important;
    border-color: color-mix(in srgb, var(--destructive) 40%, transparent) !important;
}
/* Per-item subtle semantic icon hue (income / expense / payment / recurring) */
[data-design="executive"] .fab-item {
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.18s ease !important;
}
[data-design="executive"] .fab-item:hover {
    transform: translateX(-3px) !important;
    background: color-mix(in srgb, var(--accent) 6%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
}
[data-design="executive"] .fab-item:nth-child(1) i.fa-plus-circle    { color: var(--success) !important; }
[data-design="executive"] .fab-item:nth-child(2) i.fa-minus-circle   { color: var(--destructive) !important; }
[data-design="executive"] .fab-item:nth-child(3) i.fa-money-bill     { color: var(--primary) !important; }
[data-design="executive"] .fab-item:nth-child(4) i.fa-sync-alt       { color: var(--accent) !important; }

/* ---- 20.8  Toast soft-bordered refinement ----------------------------- */
/* Phase 1 sets solid background. Add a subtle inner edge + readable contrast.
 * We do NOT switch to soft pastel because solid toasts read better at peripheral
 * vision (system-grade attention). */
[data-design="executive"] .toast {
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-weight: 500;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}
[data-design="executive"] .toast-success { border-color: color-mix(in srgb, var(--success) 60%, transparent) !important; }
[data-design="executive"] .toast-error   { border-color: color-mix(in srgb, var(--destructive) 60%, transparent) !important; }
[data-design="executive"] .toast-warning { border-color: color-mix(in srgb, var(--warning, #d97706) 60%, transparent) !important; }
[data-design="executive"] .toast-info    { border-color: color-mix(in srgb, var(--primary) 60%, transparent) !important; }

/* ---- 20.9  Notification dropdown — inner items baseline -------------- */
[data-design="executive"] .notification-dropdown {
    padding: 6px;
}
[data-design="executive"] .notification-dropdown a,
[data-design="executive"] .notification-dropdown .notification-item {
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--foreground);
    transition: background 0.15s ease;
}
[data-design="executive"] .notification-dropdown a:hover,
[data-design="executive"] .notification-dropdown .notification-item:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card));
    color: var(--foreground-strong);
}

/* ---- 20.10 Generic modal safety net (`.modal` / `.modal-dialog` /
 *           `.modal-content` Bootstrap-like inline modals if any page ships
 *           them through extra blocks) ------------------------------------ */
[data-design="executive"] .modal-content,
[data-design="executive"] .modal-dialog .modal-content {
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18) !important;
    color: var(--foreground);
}
[data-design="executive"] .modal-header {
    border-bottom: 1px solid var(--hairline) !important;
    background: color-mix(in srgb, var(--foreground) 3%, var(--card));
}
[data-design="executive"] .modal-footer {
    border-top: 1px solid var(--hairline) !important;
    background: color-mix(in srgb, var(--foreground) 3%, var(--card));
}
[data-design="executive"] .modal-backdrop,
[data-design="executive"] .modal.fade .modal-backdrop {
    background: oklch(0 0 0 / 0.45) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
[data-design="executive"] .modal .close,
[data-design="executive"] .modal button.btn-close {
    color: var(--muted-foreground) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .modal .close:hover,
[data-design="executive"] .modal button.btn-close:hover {
    background: color-mix(in srgb, var(--foreground) 6%, var(--card)) !important;
    color: var(--foreground-strong) !important;
}

/* ---- 20.11 KBD polish (Ctrl+K, ESC) — final refinement --------------- */
/* Phase 1 has base kbd; Phase 10C upgrades sizing/spacing for shell context. */
[data-design="executive"] .tw-kbd {
    padding: 2px 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: 0.04em;
}

/* End Phase 10C — Global Components / Shell Executive Polish */

/* ============================================================================
 * 21. PHASE 10D — AUTH & EDGE PAGES EXECUTIVE POLISH
 *
 * Pages affected (additive `executive-auth-*` / `executive-edge-*` classes
 * applied in templates; calm-executive.css and the URL-flag IIFE were
 * inserted in each standalone auth template head):
 *
 *   AUTH (8, standalone — do NOT extend base.html):
 *     templates/auth/login.html
 *     templates/auth/locked_out.html
 *     templates/auth/password_reset_form.html
 *     templates/auth/password_reset_done.html
 *     templates/auth/password_reset_confirm.html
 *     templates/auth/password_reset_complete.html
 *     templates/auth/password_change_form.html
 *     templates/auth/password_change_done.html
 *
 *   EDGE (extend base.html — already get the flag + this CSS automatically):
 *     templates/404.html
 *     templates/500.html
 *
 *   PROVIDED BY THIS PHASE:
 *     .executive-auth-page    body marker (so we can scope safely)
 *     .executive-auth-shell   centered max-width column
 *     .executive-auth-brand   logo+title block
 *     .executive-auth-logo    premium logo medallion
 *     .executive-auth-title   primary heading
 *     .executive-auth-subtitle calm helper line
 *     .executive-auth-card    paper card surface (over .glass-card .neon-border)
 *     .executive-auth-form    form vertical scope
 *     .executive-auth-input   premium input (over .form-control-modern)
 *     .executive-auth-action  primary submit button (over .btn-3d)
 *     .executive-auth-link    calm primary link (over .text-purple-400)
 *     .executive-auth-helper  calm footer typography
 *     .executive-auth-alert   calm alert chip (over .alert-modern)
 *     .executive-auth-icon    semantic centered icon
 *     .executive-auth-icon--destructive / --success / --info
 *     .executive-edge-page    edge-page outer marker
 *     .executive-edge-card    centered paper card for 404/500/403
 *     .executive-edge-icon    big circular icon
 *     .executive-edge-icon--warning / --destructive / --info
 *     .executive-edge-code    big "404" / "500" code typography
 *     .executive-edge-title / .executive-edge-subtitle / .executive-edge-actions
 *
 * Strategy:
 *   - All rules STRICTLY scoped under [data-design="executive"].
 *   - Phase 1 already neutralizes .gradient-text / .glass-card / .neon-border /
 *     .btn-3d / .alert-modern / .form-control-modern. Phase 10D layers a
 *     premium auth/edge feel on top via additive marker classes.
 *   - !important used only to override Tailwind utilities and inline style
 *     attributes inside the executive scope.
 *   - Form action, method, csrf_token, field names, URL routes, theme JS,
 *     login submit JS — UNCHANGED.
 * ========================================================================== */

/* ---- 21.1  Auth body — calm executive surface, no animated bg --------- */
[data-design="executive"] body.executive-auth-page {
    background: var(--background) !important;
    background-image: none !important;
    animation: none !important;
}
[data-design="executive"] body.executive-auth-page::before,
[data-design="executive"] body.executive-auth-page::after {
    display: none !important;
    background: none !important;
    animation: none !important;
}
[data-design="executive"] body.executive-auth-page .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ---- 21.2  Auth shell + brand ---------------------------------------- */
[data-design="executive"] .executive-auth-shell {
    width: 100%;
    max-width: 420px;
}
[data-design="executive"] .executive-auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

/* Login logo medallion — kill purple-pink animate-pulse-slow under flag.
 * The medallion stays as `<div>` with bg-gradient-to-r utilities; we repaint
 * it to a calm paper coin with a soft primary halo. */
[data-design="executive"] .executive-auth-logo {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 16px !important;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 8px 24px color-mix(in srgb, var(--primary) 14%, transparent) !important;
    color: var(--primary) !important;
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    animation: none !important;
}
[data-design="executive"] .executive-auth-logo i {
    color: var(--primary) !important;
    font-size: 28px !important;
}

/* ---- 21.3  Auth title / subtitle ------------------------------------- */
[data-design="executive"] .executive-auth-title {
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    color: var(--foreground-strong) !important;
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
    margin-bottom: 6px !important;
}
[data-design="executive"] .executive-auth-subtitle {
    font-size: 14px !important;
    color: var(--muted-foreground) !important;
    line-height: 1.5;
}

/* ---- 21.4  Auth card — premium paper over .glass-card .neon-border --- */
[data-design="executive"] .executive-auth-card {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 14px !important;
    padding: 28px !important;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 18px 50px rgba(0,0,0,0.10) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
[data-design="executive"] body.executive-auth-page .neon-border {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 18px 50px rgba(0,0,0,0.10) !important;
    border-color: var(--hairline) !important;
}

/* ---- 21.5  Auth form — labels / inputs / focus ----------------------- */
[data-design="executive"] .executive-auth-form label {
    color: var(--foreground) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.01em;
}
[data-design="executive"] .executive-auth-form label i {
    color: var(--muted-foreground) !important;
    margin-right: 6px;
}
[data-design="executive"] .executive-auth-input,
[data-design="executive"] body.executive-auth-page input.form-control-modern {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground-strong) !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}
[data-design="executive"] .executive-auth-input::placeholder,
[data-design="executive"] body.executive-auth-page input.form-control-modern::placeholder {
    color: var(--muted-foreground) !important;
    opacity: 0.7;
}
[data-design="executive"] .executive-auth-input:focus,
[data-design="executive"] body.executive-auth-page input.form-control-modern:focus {
    outline: none !important;
    border-color: color-mix(in srgb, var(--primary) 60%, var(--hairline)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent) !important;
    background: var(--card) !important;
}

/* ---- 21.6  Auth submit / action button ------------------------------- */
[data-design="executive"] .executive-auth-action,
[data-design="executive"] body.executive-auth-page button.btn-3d,
[data-design="executive"] body.executive-auth-page a.btn-3d {
    background: var(--primary) !important;
    background-image: none !important;
    color: var(--primary-foreground) !important;
    border: 1px solid var(--primary-edge) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    transform: none !important;
    box-shadow: var(--shadow-press-primary, 0 1px 0 0 rgba(0,0,0,0.04)) !important;
    transition: filter 0.15s ease, background-color 0.15s ease !important;
}
[data-design="executive"] body.executive-auth-page button.btn-3d:hover,
[data-design="executive"] body.executive-auth-page a.btn-3d:hover {
    filter: brightness(1.04);
    transform: none !important;
    background: var(--primary-strong, var(--primary)) !important;
}
[data-design="executive"] body.executive-auth-page button.btn-3d:active,
[data-design="executive"] body.executive-auth-page a.btn-3d:active {
    transform: none !important;
    filter: brightness(0.96);
}

/* ---- 21.7  Auth alerts ----------------------------------------------- */
[data-design="executive"] .executive-auth-alert,
[data-design="executive"] body.executive-auth-page .alert-modern {
    border-radius: 10px !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    border: 1px solid var(--hairline) !important;
    background: var(--card) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
}
[data-design="executive"] body.executive-auth-page .alert-modern.alert-error {
    background: color-mix(in srgb, var(--destructive) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] body.executive-auth-page .alert-modern.alert-success {
    background: color-mix(in srgb, var(--success) 10%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] body.executive-auth-page .alert-modern.alert-warning {
    background: color-mix(in srgb, var(--warning, #d97706) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--warning, #d97706) 35%, transparent) !important;
    color: var(--warning, #d97706) !important;
}
[data-design="executive"] body.executive-auth-page .alert-modern.alert-info {
    background: color-mix(in srgb, var(--primary) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent) !important;
    color: var(--primary) !important;
}

/* ---- 21.8  Auth helper + links --------------------------------------- */
[data-design="executive"] .executive-auth-helper {
    color: var(--muted-foreground) !important;
    font-size: 13px !important;
}
[data-design="executive"] .executive-auth-link,
[data-design="executive"] body.executive-auth-page a.text-purple-400 {
    color: var(--primary) !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}
[data-design="executive"] .executive-auth-link:hover,
[data-design="executive"] body.executive-auth-page a.text-purple-400:hover {
    color: var(--primary-strong, var(--primary)) !important;
    text-decoration: underline;
}

/* ---- 21.9  Auth top-right theme/lang controls (login) ---------------- */
[data-design="executive"] body.executive-auth-page #theme-toggle.glass-card,
[data-design="executive"] body.executive-auth-page select.glass-card {
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
}
[data-design="executive"] body.executive-auth-page #theme-toggle:hover {
    transform: none !important;
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
}

/* ---- 21.10 Inline Tailwind colour tokens used inside auth pages ------ */
[data-design="executive"] body.executive-auth-page p.text-red-400,
[data-design="executive"] body.executive-auth-page .text-red-400 {
    color: var(--destructive) !important;
}
[data-design="executive"] body.executive-auth-page .text-red-500 {
    color: var(--destructive) !important;
}
[data-design="executive"] body.executive-auth-page .text-green-400 {
    color: var(--success) !important;
}
[data-design="executive"] body.executive-auth-page .text-purple-400 i.fa-envelope {
    color: var(--primary) !important;
}
[data-design="executive"] body.executive-auth-page .text-gray-200,
[data-design="executive"] body.executive-auth-page .text-gray-300,
[data-design="executive"] body.executive-auth-page .text-gray-400,
[data-design="executive"] body.executive-auth-page .text-gray-500,
[data-design="executive"] body.executive-auth-page .text-gray-600 {
    color: var(--muted-foreground) !important;
}

/* ---- 21.11 Auth icon — calm semantic medallion ----------------------- */
[data-design="executive"] .executive-auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    margin: 0 auto 16px !important;
    border: 1px solid var(--hairline);
    background: color-mix(in srgb, var(--muted-foreground) 10%, var(--card));
}
[data-design="executive"] .executive-auth-icon i {
    font-size: 26px !important;
    line-height: 1;
}
[data-design="executive"] .executive-auth-icon--destructive {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 35%, transparent) !important;
}
[data-design="executive"] .executive-auth-icon--destructive i {
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-auth-icon--success {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 35%, transparent) !important;
}
[data-design="executive"] .executive-auth-icon--success i {
    color: var(--success) !important;
}
[data-design="executive"] .executive-auth-icon--info {
    background: color-mix(in srgb, var(--primary) 10%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent) !important;
}
[data-design="executive"] .executive-auth-icon--info i {
    color: var(--primary) !important;
}

/* =============================================================
 * EDGE pages 404 / 500 / 403
 * ============================================================= */

[data-design="executive"] .executive-edge-page {
    padding: 32px 16px;
}
[data-design="executive"] .executive-edge-card {
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 48px 56px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 24px 60px rgba(0,0,0,0.10);
    max-width: 600px;
    margin: 0 auto;
}
@media (max-width: 640px) {
    [data-design="executive"] .executive-edge-card {
        padding: 32px 20px;
    }
}

/* Big circular icon — neutralize bg-gradient-to-r and inline gradients */
[data-design="executive"] .executive-edge-icon {
    background: color-mix(in srgb, var(--muted-foreground) 8%, var(--card)) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    color: var(--muted-foreground) !important;
    width: 96px !important;
    height: 96px !important;
    padding: 0 !important;
    margin: 0 auto 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-design="executive"] .executive-edge-icon i {
    color: inherit !important;
    font-size: 38px !important;
}
[data-design="executive"] .executive-edge-icon--warning {
    background: color-mix(in srgb, var(--warning, #d97706) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--warning, #d97706) 30%, transparent) !important;
    color: var(--warning, #d97706) !important;
}
[data-design="executive"] .executive-edge-icon--destructive {
    background: color-mix(in srgb, var(--destructive) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 30%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .executive-edge-icon--info {
    background: color-mix(in srgb, var(--primary) 10%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--primary) 30%, transparent) !important;
    color: var(--primary) !important;
}

/* Big "404" / "500" code — Fraunces serif, calm foreground */
[data-design="executive"] .executive-edge-code {
    font-family: 'Fraunces', 'Inter', serif !important;
    font-size: 96px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: var(--foreground-strong) !important;
    background: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: var(--foreground-strong) !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 16px !important;
}
[data-design="executive"] .executive-edge-title {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: var(--foreground-strong) !important;
    margin-bottom: 12px !important;
    line-height: 1.3;
}
[data-design="executive"] .executive-edge-subtitle {
    font-size: 15px !important;
    color: var(--muted-foreground) !important;
    margin-bottom: 28px !important;
    line-height: 1.5;
}

/* Edge action row — calm primary + secondary, neutralize inline
 * `style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%)"`
 * placed by 404.html / 500.html on the second button. */
[data-design="executive"] .executive-edge-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
[data-design="executive"] .executive-edge-actions .btn-3d {
    border-radius: 10px !important;
    padding: 11px 22px !important;
    font-weight: 600 !important;
    transform: none !important;
    box-shadow: var(--shadow-press-primary, 0 1px 0 0 rgba(0,0,0,0.04)) !important;
}
[data-design="executive"] .executive-edge-actions .btn-3d[style*="linear-gradient"],
[data-design="executive"] .executive-edge-actions .executive-button-secondary {
    background: var(--card) !important;
    background-image: none !important;
    color: var(--foreground-strong) !important;
    border: 1px solid var(--hairline) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}
[data-design="executive"] .executive-edge-actions .btn-3d[style*="linear-gradient"]:hover,
[data-design="executive"] .executive-edge-actions .executive-button-secondary:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    transform: none !important;
}

/* End Phase 10D — Auth & Edge Pages Executive Polish */

/* ============================================================================
 * 22. PHASE 10E — SHARED COMPONENTS / PARTIALS EXECUTIVE POLISH
 *
 * Partials covered (no template changes — all class hooks are stable):
 *
 *   templates/components/pagination.html      .pagination, .pagination-info,
 *                                             .pagination-buttons, .pagination-btn,
 *                                             .pagination-btn.active,
 *                                             .pagination-btn[disabled]
 *   templates/components/breadcrumb.html      .breadcrumb, .breadcrumb a,
 *                                             .breadcrumb .separator,
 *                                             .breadcrumb .current
 *   templates/components/date_filter.html     .filter-bar, .filter-group,
 *                                             .filter-label, .filter-input,
 *                                             .date-presets, .date-preset,
 *                                             .date-preset.active
 *   templates/components/export_buttons.html  .export-buttons, .btn-export,
 *                                             .btn-export.csv / .excel / .pdf
 *                                             / .print
 *
 * Strategy:
 *   - All rules STRICTLY scoped under [data-design="executive"].
 *   - No template edits — partials remain byte-identical so non-flag UI is
 *     untouched and any include site keeps working without changes.
 *   - Phase 1 already provides a thin pagination base; we deepen it (info row,
 *     button sizing, disabled state, hover) and add full coverage for the
 *     other three partials.
 *   - Reuses Phase 1–10D tokens (--card, --hairline, --primary, --primary-soft,
 *     --primary-soft-fg, --primary-edge, --success, --destructive,
 *     --muted-foreground, --foreground-strong, --shadow-card, --radius-button).
 *   - `!important` only where Tailwind utilities or legacy style.css rules
 *     win specificity inside the executive scope.
 *   - Pagination active-page inline `style="background: var(--primary); ..."`
 *     is left intact: under executive flag those tokens already resolve to
 *     emerald via Phase 1's bridge, so the active chip is already correct.
 *   - `page_obj`, query-string preservation, GET param logic, breadcrumb
 *     `breadcrumbs` context, date-filter form submit JS, export URLs and
 *     `window.print()` — UNCHANGED.
 * ========================================================================== */

/* ---- 22.1  Pagination — premium pager --------------------------------- */
[data-design="executive"] .pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px !important;
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    margin-top: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-design="executive"] .pagination-info {
    color: var(--muted-foreground) !important;
    font-size: 13px !important;
    letter-spacing: 0.01em;
}
[data-design="executive"] .pagination-buttons {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
[data-design="executive"] .pagination-btn,
[data-design="executive"] .pagination .pagination-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px !important;
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    box-shadow: none !important;
}
[data-design="executive"] .pagination-btn:hover:not([disabled]):not(.active) {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .pagination-btn[disabled],
[data-design="executive"] .pagination-btn:disabled {
    background: color-mix(in srgb, var(--foreground) 2%, var(--card)) !important;
    color: var(--muted-foreground) !important;
    border-color: var(--hairline) !important;
    opacity: 0.55;
    cursor: not-allowed;
}
[data-design="executive"] .pagination-btn.active,
[data-design="executive"] .pagination .pagination-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary-edge) !important;
    color: var(--primary-foreground) !important;
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.04), inset 0 1px 0 var(--card-highlight, transparent) !important;
}
/* "..." gap chips — neutral, no border highlight */
[data-design="executive"] .pagination-btn:not(a):not(button):not(.active) {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--muted-foreground) !important;
}

/* ---- 22.2  Breadcrumb — calm muted path ------------------------------ */
[data-design="executive"] .breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px !important;
    background: color-mix(in srgb, var(--foreground) 2%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 10px !important;
    color: var(--muted-foreground) !important;
    font-size: 13px !important;
    margin-bottom: 16px;
    box-shadow: none !important;
}
[data-design="executive"] .breadcrumb a {
    color: var(--muted-foreground) !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 2px 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
[data-design="executive"] .breadcrumb a:hover {
    color: var(--primary) !important;
    background: color-mix(in srgb, var(--primary) 8%, transparent) !important;
}
[data-design="executive"] .breadcrumb a > i.fa-home,
[data-design="executive"] .breadcrumb a > i.fas {
    color: var(--muted-foreground) !important;
    transition: color 0.15s ease;
}
[data-design="executive"] .breadcrumb a:hover > i.fa-home,
[data-design="executive"] .breadcrumb a:hover > i.fas {
    color: var(--primary) !important;
}
[data-design="executive"] .breadcrumb .separator {
    color: var(--hairline) !important;
    user-select: none;
    font-weight: 400;
}
[data-design="executive"] .breadcrumb .current {
    color: var(--foreground-strong) !important;
    font-weight: 600 !important;
    padding: 2px 6px;
}

/* ---- 22.3  Date Filter — premium filter card ------------------------- */
[data-design="executive"] .filter-bar {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px 20px !important;
    align-items: flex-end;
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-design="executive"] .filter-group {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
[data-design="executive"] .filter-label {
    color: var(--muted-foreground) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 !important;
}
[data-design="executive"] .filter-input,
[data-design="executive"] .filter-bar input.filter-input,
[data-design="executive"] .filter-bar select.filter-input {
    background: color-mix(in srgb, var(--foreground) 3%, var(--card)) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground-strong) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: none !important;
    min-width: 150px;
}
[data-design="executive"] .filter-input:focus {
    outline: none !important;
    border-color: color-mix(in srgb, var(--primary) 60%, var(--hairline)) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent) !important;
    background: var(--card) !important;
}

/* Date preset pill row */
[data-design="executive"] .date-presets {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 6px;
}
[data-design="executive"] .date-preset {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px !important;
    background: var(--card) !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground) !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .date-preset:hover:not(.active) {
    background: color-mix(in srgb, var(--accent) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--accent) 30%, transparent) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .date-preset.active {
    background: var(--primary-soft) !important;
    border-color: color-mix(in srgb, var(--primary) 35%, transparent) !important;
    color: var(--primary-soft-fg) !important;
    font-weight: 600 !important;
}

/* ---- 22.4  Export buttons — semantic calm pills ---------------------- */
[data-design="executive"] .export-buttons {
    display: inline-flex !important;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
[data-design="executive"] .btn-export {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px !important;
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    color: var(--foreground-strong) !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.18s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
[data-design="executive"] .btn-export:hover {
    transform: none !important;
    filter: none;
}
[data-design="executive"] .btn-export i {
    font-size: 14px;
}

/* CSV — neutral primary tint */
[data-design="executive"] .btn-export.csv {
    background: color-mix(in srgb, var(--primary) 6%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--primary) 28%, transparent) !important;
    color: var(--primary) !important;
}
[data-design="executive"] .btn-export.csv:hover {
    background: color-mix(in srgb, var(--primary) 12%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--primary) 45%, transparent) !important;
}
[data-design="executive"] .btn-export.csv i {
    color: var(--primary) !important;
}

/* Excel — success soft */
[data-design="executive"] .btn-export.excel {
    background: color-mix(in srgb, var(--success) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 32%, transparent) !important;
    color: var(--success) !important;
}
[data-design="executive"] .btn-export.excel:hover {
    background: color-mix(in srgb, var(--success) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--success) 50%, transparent) !important;
}
[data-design="executive"] .btn-export.excel i {
    color: var(--success) !important;
}

/* PDF — destructive soft */
[data-design="executive"] .btn-export.pdf {
    background: color-mix(in srgb, var(--destructive) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 32%, transparent) !important;
    color: var(--destructive) !important;
}
[data-design="executive"] .btn-export.pdf:hover {
    background: color-mix(in srgb, var(--destructive) 14%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--destructive) 50%, transparent) !important;
}
[data-design="executive"] .btn-export.pdf i {
    color: var(--destructive) !important;
}

/* Print — neutral graphite */
[data-design="executive"] .btn-export.print {
    background: color-mix(in srgb, var(--foreground) 4%, var(--card)) !important;
    border-color: var(--hairline) !important;
    color: var(--foreground-strong) !important;
}
[data-design="executive"] .btn-export.print:hover {
    background: color-mix(in srgb, var(--foreground) 8%, var(--card)) !important;
    border-color: color-mix(in srgb, var(--foreground) 18%, transparent) !important;
}
[data-design="executive"] .btn-export.print i {
    color: var(--muted-foreground) !important;
}

/* ---- 22.5  Generic empty-state safety net ---------------------------- */
/* Common patterns used across list pages: `.empty-state`, `.no-results`,
 * `.empty` (Phase 5–9 already handle most page-specific empties via
 * `.executive-empty`). This is a generic baseline for any future include. */
[data-design="executive"] .empty-state,
[data-design="executive"] .no-results,
[data-design="executive"] .empty:not(.executive-empty) {
    text-align: center;
    padding: 40px 24px !important;
    background: var(--card) !important;
    border: 1px dashed var(--hairline) !important;
    border-radius: 12px !important;
    color: var(--muted-foreground) !important;
    box-shadow: none !important;
}
[data-design="executive"] .empty-state i,
[data-design="executive"] .no-results i,
[data-design="executive"] .empty:not(.executive-empty) i {
    color: color-mix(in srgb, var(--muted-foreground) 70%, transparent) !important;
    margin-bottom: 12px;
    display: inline-block;
}
[data-design="executive"] .empty-state h3,
[data-design="executive"] .empty-state h4,
[data-design="executive"] .no-results h3,
[data-design="executive"] .no-results h4 {
    color: var(--foreground-strong) !important;
    font-weight: 600 !important;
    margin-bottom: 6px;
}

/* ---- 22.6  Mobile responsiveness for shared components --------------- */
@media (max-width: 640px) {
    [data-design="executive"] .pagination {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    [data-design="executive"] .pagination-info {
        text-align: center;
    }
    [data-design="executive"] .pagination-buttons {
        justify-content: center;
    }
    [data-design="executive"] .filter-bar {
        gap: 12px;
    }
    [data-design="executive"] .filter-group {
        width: 100%;
    }
    [data-design="executive"] .filter-input {
        width: 100%;
    }
    [data-design="executive"] .export-buttons {
        width: 100%;
    }
    [data-design="executive"] .btn-export {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }
}

/* End Phase 10E — Shared Components / Partials Executive Polish */


/* ============================================================================
 * 23. PHASE 11B — FINAL SAFETY NET + REPORTS HUB POLISH
 * ============================================================================
 *  Goals:
 *  1. Close remaining Tailwind utility leftovers (icon -500 colors, purple/
 *     orange/indigo soft surfaces, -200 borders) so unpolished pages also
 *     render in the calm executive palette under the flag.
 *  2. Add a SCOPED inline-gradient neutralizer — only inside known card
 *     containers, never globally. We deliberately avoid a universal
 *     [style*="linear-gradient"] selector because semantic buttons
 *     (.btn-3d / FAB items) rely on inline gradient styles for identity.
 *  3. Polish reports_center hub.html as the executive entrypoint into
 *     financial reports — premium tiles, calm icons, semantic chips.
 *  4. Add --success / --destructive / --warning modifiers for
 *     executive-status-badge so generic semantic chips can be reused.
 *
 *  Without ?design=executive nothing in this section applies.
 * ============================================================================ */

/* ---- 23.1  Tailwind icon palette gap-fill (-500 levels) ------------------ */
/*  Phase 1 covered text-blue-400/700, text-indigo-400/600, text-red-500,
 *  text-purple-400/600, etc. The -500 mid-tier (used by hub/page accents
 *  like text-blue-500, text-indigo-500) was missed. We close that here. */
[data-design="executive"] .text-blue-500,
[data-design="executive"] .text-indigo-500,
[data-design="executive"] .text-cyan-500,
[data-design="executive"] .text-violet-500,
[data-design="executive"] .text-sky-500 {
    color: var(--primary) !important;
}
[data-design="executive"] .text-purple-500,
[data-design="executive"] .text-pink-500,
[data-design="executive"] .text-fuchsia-500 {
    color: var(--accent, var(--primary)) !important;
}
[data-design="executive"] .text-emerald-500,
[data-design="executive"] .text-teal-500 {
    color: var(--success) !important;
}
[data-design="executive"] .text-orange-400,
[data-design="executive"] .text-orange-500,
[data-design="executive"] .text-orange-600,
[data-design="executive"] .text-orange-700,
[data-design="executive"] .text-orange-800 {
    color: var(--warning-soft-fg) !important;
}

/* ---- 23.2  Tailwind soft surface gap-fill (purple/indigo/orange/pink) ---- */
/*  Phase 1 already maps bg-blue-100 / bg-green-100 / bg-red-100 /
 *  bg-yellow-100 to soft tokens. Purple, indigo, orange, pink were missed. */
[data-design="executive"] .bg-purple-50,
[data-design="executive"] .bg-purple-100,
[data-design="executive"] .bg-violet-50,
[data-design="executive"] .bg-violet-100,
[data-design="executive"] .bg-fuchsia-50,
[data-design="executive"] .bg-fuchsia-100,
[data-design="executive"] .bg-pink-50,
[data-design="executive"] .bg-pink-100 {
    background-color: var(--primary-soft) !important;
    color: var(--primary-soft-fg);
}
[data-design="executive"] .bg-indigo-50,
[data-design="executive"] .bg-indigo-100 {
    background-color: var(--primary-soft) !important;
    color: var(--primary-soft-fg);
}
[data-design="executive"] .bg-orange-50,
[data-design="executive"] .bg-orange-100,
[data-design="executive"] .bg-amber-50,
[data-design="executive"] .bg-amber-100 {
    background-color: var(--warning-soft) !important;
    color: var(--warning-soft-fg);
}

/* ---- 23.3  Tailwind soft text gap-fill (purple-700/800, indigo-700/800) -- */
[data-design="executive"] .text-purple-700,
[data-design="executive"] .text-purple-800,
[data-design="executive"] .text-violet-700,
[data-design="executive"] .text-violet-800,
[data-design="executive"] .text-fuchsia-700,
[data-design="executive"] .text-pink-700 {
    color: var(--primary-soft-fg) !important;
}
[data-design="executive"] .text-indigo-700,
[data-design="executive"] .text-indigo-800 {
    color: var(--primary-soft-fg) !important;
}
[data-design="executive"] .text-amber-700,
[data-design="executive"] .text-amber-800 {
    color: var(--warning-soft-fg) !important;
}

/* ---- 23.4  Tailwind border -200 gap-fill (semantic hairlines) ------------ */
/*  Used by callouts, alert banners, info-card borders. Phase 1 covered
 *  -400/-500 borders only; -200 (lighter) borders were missed. */
[data-design="executive"] .border-blue-200,
[data-design="executive"] .border-indigo-200,
[data-design="executive"] .border-sky-200 {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--hairline)) !important;
}
[data-design="executive"] .border-green-200,
[data-design="executive"] .border-emerald-200,
[data-design="executive"] .border-teal-200 {
    border-color: color-mix(in srgb, var(--success) 28%, var(--hairline)) !important;
}
[data-design="executive"] .border-red-200,
[data-design="executive"] .border-rose-200 {
    border-color: color-mix(in srgb, var(--destructive) 28%, var(--hairline)) !important;
}
[data-design="executive"] .border-yellow-200,
[data-design="executive"] .border-amber-200,
[data-design="executive"] .border-orange-200 {
    border-color: color-mix(in srgb, var(--warning) 30%, var(--hairline)) !important;
}
[data-design="executive"] .border-purple-200,
[data-design="executive"] .border-violet-200,
[data-design="executive"] .border-pink-200,
[data-design="executive"] .border-fuchsia-200 {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--hairline)) !important;
}

/* ---- 23.5  Inline linear-gradient SCOPED neutralizer --------------------- */
/*  Strictly scoped: only inside known visual card wrappers AND not on
 *  buttons/anchors that may use gradient as their identity color.
 *  Phase 1 already neutralizes .btn-3d / .glass-card / .neon-border globally;
 *  here we cover stray inline gradients on remaining unpolished cards
 *  (e.g. group_detail.html, hikvision_dashboard.html, fixed_asset_detail.html)
 *  without breaking semantic buttons. */
[data-design="executive"] .reports-center-v1 [style*="linear-gradient"]:not(button):not(a):not(.btn-3d):not(.btn-primary):not(.btn-secondary),
[data-design="executive"] .dashboard-card[style*="linear-gradient"],
[data-design="executive"] .tw-card[style*="linear-gradient"],
[data-design="executive"] .stat-card[style*="linear-gradient"],
[data-design="executive"] .info-card[style*="linear-gradient"] {
    background-image: none !important;
    background-color: var(--card) !important;
}
/*  glass-card with inline gradient — already neutralized as glass-card in
 *  Phase 1; this adds an extra safety layer for nested decorative wrappers. */
[data-design="executive"] .glass-card [style*="linear-gradient"]:not(button):not(a):not(.btn-3d):not(i) {
    background-image: none !important;
    background-color: transparent !important;
}

/* ---- 23.6  Status badge — semantic modifiers (added in Phase 11B) -------- */
/*  Phase 5 added --paid/--pending/--overdue, Phase 6 added --info/--neutral.
 *  We add the generic --success/--destructive/--warning trio so any page
 *  can reuse executive-status-badge with semantic hint. */
[data-design="executive"] .executive-status-badge--success {
    background-color: var(--success-soft) !important;
    color: var(--success-soft-fg) !important;
    border-color: color-mix(in srgb, var(--success) 28%, var(--hairline)) !important;
}
[data-design="executive"] .executive-status-badge--destructive {
    background-color: var(--destructive-soft) !important;
    color: var(--destructive-soft-fg) !important;
    border-color: color-mix(in srgb, var(--destructive) 28%, var(--hairline)) !important;
}
[data-design="executive"] .executive-status-badge--warning {
    background-color: var(--warning-soft) !important;
    color: var(--warning-soft-fg) !important;
    border-color: color-mix(in srgb, var(--warning) 30%, var(--hairline)) !important;
}

/* ---- 23.7  Reports Hub container ----------------------------------------- */
/*  Reuses existing executive-page / executive-report-page / executive-report-
 *  header / executive-page-heading / executive-eyebrow / executive-title /
 *  executive-subtitle from Phase 1–10. Only minor tile-grid additions. */
[data-design="executive"] .executive-reports-hub {
    margin-bottom: 24px;
}
[data-design="executive"] .executive-reports-hub .executive-report-header {
    margin-bottom: 22px;
    align-items: flex-start;
    gap: 16px;
}
[data-design="executive"] .executive-reports-hub .executive-page-heading {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}
[data-design="executive"] .executive-reports-hub .executive-title i {
    color: var(--accent, var(--primary)) !important;
    font-size: 22px;
}

/* ---- 23.8  Reports Hub grid + tiles -------------------------------------- */
/*  Generic premium nav grid for "report library" pages. Distinct from
 *  Phase 9 .executive-report-kpi-grid which targets KPI value cards. */
[data-design="executive"] .executive-report-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 14px !important;
}

[data-design="executive"] .executive-report-tile {
    display: block !important;
    background: var(--card) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    padding: 18px 18px 16px !important;
    color: var(--foreground) !important;
    text-decoration: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
}
[data-design="executive"] .executive-report-tile:hover {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--hairline)) !important;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.10),
                0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-1px);
}
[data-design="executive"] .executive-report-tile:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Tile head row (title + status badge) */
[data-design="executive"] .executive-report-tile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

/* Tile title h3 */
[data-design="executive"] .executive-report-tile-title {
    color: var(--foreground-strong) !important;
    font-family: 'Fraunces', 'Inter', serif;
    font-weight: 600 !important;
    font-size: 15.5px !important;
    letter-spacing: -0.005em;
    line-height: 1.25;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

/* Tile icon (i inside title) */
[data-design="executive"] .executive-report-tile-icon,
[data-design="executive"] .executive-report-tile-title > i {
    color: var(--primary) !important;
    font-size: 14px !important;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Tile meta paragraph */
[data-design="executive"] .executive-report-tile-meta {
    color: var(--muted-foreground) !important;
    font-size: 12.5px !important;
    line-height: 1.5;
    margin: 4px 0 0 0 !important;
}

/* ---- 23.9  Mobile responsiveness for reports hub ------------------------- */
@media (max-width: 640px) {
    [data-design="executive"] .executive-report-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    [data-design="executive"] .executive-reports-hub .executive-report-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    [data-design="executive"] .executive-report-tile {
        padding: 14px !important;
    }
}

/* End Phase 11B — Final Safety Net + Reports Hub Polish */


/* ============================================================================
 * 24. PHASE 12 — PREMIUM DESIGN TOGGLE (cookie opt-in UI)
 * ============================================================================
 *  A small calm pill button in the sidebar footer that lets the user opt in
 *  to the Premium Calm Executive design across the ERP. Persistence is via
 *  cookie kp_design only — no backend, no localStorage, no middleware.
 *
 *  Element: button#designToggle.executive-design-toggle
 *  States:
 *    - default (classic active)  → muted neutral pill
 *    - .executive-design-toggle--on (executive active) → soft primary pill
 *
 *  All rules below are scoped under [data-design="executive"] so they only
 *  apply when Premium is active. In classic mode the button keeps its
 *  default Tailwind utility styling (bg-white/5 + border-white/10), which
 *  matches the existing theme/language row exactly.
 * ============================================================================ */

[data-design="executive"] .executive-design-toggle {
    background-color: var(--card-tint, var(--muted)) !important;
    border-color: var(--hairline) !important;
    color: var(--muted-foreground) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
[data-design="executive"] .executive-design-toggle:hover {
    background-color: var(--muted) !important;
    color: var(--foreground-strong) !important;
    border-color: color-mix(in srgb, var(--primary) 20%, var(--hairline)) !important;
}
[data-design="executive"] .executive-design-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Active state — Premium is currently ON */
[data-design="executive"] .executive-design-toggle--on {
    background-color: var(--primary-soft) !important;
    border-color: color-mix(in srgb, var(--primary) 32%, var(--hairline)) !important;
    color: var(--primary-soft-fg) !important;
}
[data-design="executive"] .executive-design-toggle--on:hover {
    background-color: color-mix(in srgb, var(--primary) 18%, var(--card)) !important;
}
[data-design="executive"] .executive-design-toggle--on .fa-gem,
[data-design="executive"] .executive-design-toggle--on i {
    color: var(--primary) !important;
}

/* Idle gem icon — calm primary tint, even before active state */
[data-design="executive"] .executive-design-toggle .fa-gem {
    color: var(--primary) !important;
    font-size: 12px;
    opacity: 0.85;
}

/* End Phase 12 — Premium Design Toggle */
