:root {
    color-scheme: light;
    --app-font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --bg-base: #edf2f8;
    --bg-top: #d7e1ef;
    --bg-mid: #e7eef8;
    --bg-bottom: #f2f6fb;
    --bg-surface: rgba(247, 250, 255, 0.88);
    --bg-elevated: #d6e0ee;
    --bg-hero: linear-gradient(145deg, #10233f 0%, #194271 48%, #2457d6 100%);
    --bg-pattern: rgba(255, 255, 255, 0.18);
    --bg-accent-1: rgba(37, 99, 235, 0.14);
    --bg-accent-2: rgba(14, 165, 233, 0.10);
    --bg-accent-3: rgba(59, 130, 246, 0.08);
    --surface: rgba(247, 250, 255, 0.90);
    --surface-strong: rgba(251, 253, 255, 0.96);
    --surface-soft: rgba(243, 248, 255, 0.94);
    --surface-tinted: rgba(234, 241, 251, 0.92);
    --surface-table: rgba(249, 251, 255, 0.95);
    --surface-chip: rgba(221, 233, 252, 0.94);
    --surface-elevated: rgba(252, 253, 255, 0.98);
    --hero-grad-start: #10233f;
    --hero-grad-mid: #194271;
    --hero-grad-end: #2457d6;
    --hero-glow: rgba(125, 211, 252, 0.20);
    --hero-tint: rgba(255, 255, 255, 0.04);
    --hero-metric-bg: rgba(255, 255, 255, 0.10);
    --hero-metric-border: rgba(255, 255, 255, 0.12);
    --text: #16263c;
    --text-strong: #0f1d31;
    --text-on-hero: #ffffff;
    --text-secondary: #5b6c83;
    --muted: #5b6c83;
    --muted-soft: rgba(255, 255, 255, 0.82);
    --muted-hero: rgba(255, 255, 255, 0.72);
    --border-soft: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(100, 116, 139, 0.26);
    --line-soft: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(100, 116, 139, 0.26);
    --line-bright: rgba(255, 255, 255, 0.72);
    --accent-primary: #2457d6;
    --accent-primary-hover: #1b46ad;
    --primary: #2457d6;
    --primary-strong: #1b46ad;
    --primary-soft: #e9f0ff;
    --primary-ring: rgba(36, 87, 214, 0.14);
    --button-shadow: 0 12px 22px rgba(36, 87, 214, 0.22);
    --button-shadow-hover: 0 16px 28px rgba(36, 87, 214, 0.28);
    --shadow-soft: 0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    --shadow-lift: 0 24px 56px rgba(15, 23, 42, 0.15);
    --shadow-soft-token: 0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow-medium-token: 0 18px 42px rgba(15, 23, 42, 0.12);
    --shadow-strong-token: 0 24px 56px rgba(15, 23, 42, 0.15);
    --table-head-bg: #163760;
    --table-head-text: #ffffff;
    --table-head-muted: rgba(255, 255, 255, 0.68);
    --row-overpay: rgba(254, 242, 242, 0.88);
    --row-good: rgba(240, 253, 244, 0.88);
    --row-normal: rgba(255, 255, 255, 0.92);
    --row-hover: rgba(229, 238, 255, 0.98);
    --pill-bg: rgba(221, 233, 252, 0.94);
    --pill-overpay-bg: rgba(254, 202, 202, 0.95);
    --pill-overpay-text: #991b1b;
    --pill-good-bg: rgba(187, 247, 208, 0.95);
    --pill-good-text: #166534;
    --pill-normal-bg: rgba(226, 232, 240, 0.95);
    --pill-normal-text: #334155;
    --alert-error-bg: rgba(254, 226, 226, 0.90);
    --alert-error-border: rgba(248, 113, 113, 0.28);
    --alert-error-text: #991b1b;
    --alert-success-bg: rgba(220, 252, 231, 0.85);
    --alert-success-border: rgba(74, 222, 128, 0.24);
    --alert-success-text: #166534;
    --chart-grid: rgba(148, 163, 184, 0.18);
    --chart-tick: #475569;
    --chart-legend: #334155;
    --chart-top-1: #ef4444;
    --chart-top-2: #f97316;
    --chart-top-3: #fb7185;
    --chart-top-4: #dc2626;
    --chart-top-5: #f59e0b;
    --chart-save-1: #2563eb;
    --chart-save-2: #1d4ed8;
    --chart-save-3: #0ea5e9;
    --chart-save-4: #14b8a6;
    --chart-save-5: #22c55e;
    --chart-status-1: #f87171;
    --chart-status-2: #4ade80;
    --chart-status-3: #94a3b8;
    --radius-xl: 22px;
    --radius-lg: 18px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --workspace-guide-rail-width: 280px;
    --workspace-guide-rail-gap: 26px;
    --bg-base: #091321;
    --bg-top: #0d1a2f;
    --bg-mid: #0b1628;
    --bg-bottom: #0a1323;
    --bg-surface: rgba(18, 29, 47, 0.84);
    --bg-elevated: #10203a;
    --bg-hero: linear-gradient(145deg, #091321 0%, #143154 46%, #2b56c7 100%);
    --bg-pattern: rgba(148, 163, 184, 0.08);
    --bg-accent-1: rgba(59, 130, 246, 0.20);
    --bg-accent-2: rgba(56, 189, 248, 0.10);
    --bg-accent-3: rgba(16, 185, 129, 0.06);
    --surface: rgba(17, 28, 46, 0.86);
    --surface-strong: rgba(22, 36, 60, 0.97);
    --surface-soft: rgba(21, 34, 56, 0.90);
    --surface-tinted: rgba(28, 44, 70, 0.86);
    --surface-table: rgba(16, 27, 45, 0.94);
    --surface-chip: rgba(37, 99, 235, 0.22);
    --surface-elevated: rgba(24, 39, 63, 0.98);
    --hero-grad-start: #091321;
    --hero-grad-mid: #143154;
    --hero-grad-end: #2b56c7;
    --hero-glow: rgba(96, 165, 250, 0.16);
    --hero-tint: rgba(255, 255, 255, 0.04);
    --hero-metric-bg: rgba(255, 255, 255, 0.06);
    --hero-metric-border: rgba(148, 163, 184, 0.14);
    --text: #e5edf8;
    --text-strong: #f8fafc;
    --text-on-hero: #f8fafc;
    --text-secondary: #a9b8cb;
    --muted: #a9b8cb;
    --muted-soft: rgba(226, 232, 240, 0.84);
    --muted-hero: rgba(226, 232, 240, 0.72);
    --border-soft: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.26);
    --line-soft: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.26);
    --line-bright: rgba(148, 163, 184, 0.18);
    --accent-primary: #6da8ff;
    --accent-primary-hover: #4d88f0;
    --primary: #6da8ff;
    --primary-strong: #4d88f0;
    --primary-soft: rgba(44, 87, 181, 0.24);
    --primary-ring: rgba(109, 168, 255, 0.18);
    --button-shadow: 0 12px 22px rgba(8, 15, 30, 0.32);
    --button-shadow-hover: 0 16px 28px rgba(8, 15, 30, 0.4);
    --shadow-soft: 0 10px 18px rgba(2, 6, 23, 0.2);
    --shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
    --shadow-lift: 0 24px 56px rgba(2, 6, 23, 0.42);
    --shadow-soft-token: 0 10px 18px rgba(2, 6, 23, 0.2);
    --shadow-medium-token: 0 18px 42px rgba(2, 6, 23, 0.34);
    --shadow-strong-token: 0 24px 56px rgba(2, 6, 23, 0.42);
    --table-head-bg: #143154;
    --table-head-text: #f8fafc;
    --table-head-muted: rgba(226, 232, 240, 0.68);
    --row-overpay: rgba(69, 10, 10, 0.42);
    --row-good: rgba(20, 83, 45, 0.34);
    --row-normal: rgba(10, 18, 34, 0.84);
    --row-hover: rgba(24, 39, 63, 0.98);
    --pill-bg: rgba(37, 99, 235, 0.22);
    --pill-overpay-bg: rgba(127, 29, 29, 0.48);
    --pill-overpay-text: #fecaca;
    --pill-good-bg: rgba(20, 83, 45, 0.52);
    --pill-good-text: #bbf7d0;
    --pill-normal-bg: rgba(51, 65, 85, 0.72);
    --pill-normal-text: #cbd5e1;
    --alert-error-bg: rgba(69, 10, 10, 0.62);
    --alert-error-border: rgba(248, 113, 113, 0.22);
    --alert-error-text: #fecaca;
    --alert-success-bg: rgba(20, 83, 45, 0.54);
    --alert-success-border: rgba(74, 222, 128, 0.18);
    --alert-success-text: #bbf7d0;
    --chart-grid: rgba(148, 163, 184, 0.14);
    --chart-tick: #cbd5e1;
    --chart-legend: #e2e8f0;
    --chart-top-1: #f87171;
    --chart-top-2: #fb923c;
    --chart-top-3: #fb7185;
    --chart-top-4: #ef4444;
    --chart-top-5: #fbbf24;
    --chart-save-1: #60a5fa;
    --chart-save-2: #3b82f6;
    --chart-save-3: #38bdf8;
    --chart-save-4: #2dd4bf;
    --chart-save-5: #4ade80;
    --chart-status-1: #f87171;
    --chart-status-2: #4ade80;
    --chart-status-3: #94a3b8;
    --guide-panel-bg:
        linear-gradient(180deg, rgba(20, 33, 54, 0.98), rgba(11, 22, 38, 0.96));
    --guide-panel-border: rgba(125, 167, 255, 0.22);
    --guide-panel-shadow: 0 28px 64px rgba(2, 6, 23, 0.44);
    --guide-panel-head-bg:
        linear-gradient(180deg, rgba(28, 45, 72, 0.98), rgba(18, 31, 52, 0.96));
    --guide-panel-head-border: rgba(125, 167, 255, 0.16);
    --guide-panel-head-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --guide-panel-kicker: #c7d9f7;
    --guide-panel-title: #f8fbff;
    --guide-panel-section: #dce8fb;
    --guide-panel-item-bg:
        linear-gradient(180deg, rgba(25, 41, 67, 0.98), rgba(18, 31, 52, 0.95));
    --guide-panel-item-border: rgba(125, 167, 255, 0.18);
    --guide-panel-item-shadow: 0 12px 24px rgba(2, 6, 23, 0.18);
    --guide-panel-item-hover:
        linear-gradient(180deg, rgba(31, 50, 80, 1), rgba(21, 36, 60, 0.98));
    --guide-panel-item-hover-border: rgba(125, 167, 255, 0.28);
    --guide-panel-item-hover-shadow: 0 16px 28px rgba(2, 6, 23, 0.26);
    --guide-panel-item-text: #eef4ff;
    --guide-panel-item-muted: #bfd0e8;
    --guide-panel-tip-bg:
        linear-gradient(180deg, rgba(24, 39, 63, 0.96), rgba(16, 29, 49, 0.94));
    --guide-panel-tip-border: rgba(148, 163, 184, 0.16);
    --guide-panel-tip-shadow: 0 10px 22px rgba(2, 6, 23, 0.16);
    --guide-panel-tip-hover:
        linear-gradient(180deg, rgba(29, 47, 74, 0.98), rgba(18, 32, 54, 0.96));
    --guide-panel-tip-text: #d7e4f7;
    --guide-panel-close-bg: rgba(15, 23, 42, 0.52);
    --guide-panel-close-border: rgba(125, 167, 255, 0.18);
    --guide-panel-close-text: #d7e4f7;
    --guide-panel-close-hover-bg: rgba(23, 38, 62, 0.82);
    --guide-panel-close-hover-border: rgba(125, 167, 255, 0.30);
    --guide-panel-close-hover-text: #f8fbff;
    --guide-ask-bg: linear-gradient(180deg, rgba(18, 31, 52, 0.98), rgba(14, 24, 41, 0.96));
    --guide-ask-border: rgba(125, 167, 255, 0.18);
    --guide-ask-shadow: 0 12px 24px rgba(2, 6, 23, 0.18);
    --guide-ask-input-bg: rgba(10, 18, 32, 0.72);
    --guide-ask-input-border: rgba(148, 163, 184, 0.16);
    --guide-ask-input-text: #eef4ff;
    --guide-ask-input-placeholder: #95a8c3;
    --guide-ask-answer-bg: linear-gradient(180deg, rgba(23, 38, 62, 0.98), rgba(16, 28, 46, 0.96));
    --guide-ask-answer-border: rgba(125, 167, 255, 0.18);
    --guide-ask-answer-text: #eef4ff;
    --guide-ask-answer-muted: #bfd0e8;
    --guide-ask-answer-label: #dce8fb;
    --guide-workspace-shell-bg:
        linear-gradient(180deg, rgba(12, 22, 38, 0.98), rgba(8, 17, 30, 0.96));
    --guide-workspace-shell-border: rgba(125, 167, 255, 0.16);
    --guide-workspace-shell-shadow: 0 28px 60px rgba(2, 6, 23, 0.34);
    --guide-workspace-card-bg:
        linear-gradient(180deg, rgba(20, 33, 54, 0.98), rgba(12, 23, 39, 0.96));
    --guide-workspace-card-border: rgba(125, 167, 255, 0.18);
    --guide-workspace-card-shadow: 0 18px 34px rgba(2, 6, 23, 0.24);
    --guide-workspace-card-hover-border: rgba(125, 167, 255, 0.30);
    --guide-workspace-card-hover-shadow: 0 22px 38px rgba(2, 6, 23, 0.28);
    --guide-workspace-title: #f8fbff;
    --guide-workspace-copy: #bfd0e8;
    --guide-workspace-muted: #9fb5d4;
    --guide-workspace-accent: #dce8fb;
    --guide-workspace-answer-bg:
        linear-gradient(180deg, rgba(26, 42, 68, 0.98), rgba(16, 30, 50, 0.96));
    --guide-workspace-answer-border: rgba(125, 167, 255, 0.2);
    --guide-workspace-answer-shadow: 0 22px 40px rgba(2, 6, 23, 0.24);
}

:root {
    --bg-elevated: #d6e0ee;
    --panel-bg: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(242, 247, 253, 0.96));
    --header-bg: #163760;
    --accent-primary: #2457d6;
    --accent-primary-strong: #1b46ad;
    --accent-primary-soft: #e9f0ff;
    --accent-secondary: #7dd3fc;
    --focus-ring: rgba(36, 87, 214, 0.14);
    --pill-surface: rgba(225, 236, 255, 0.94);
    --surface-base: rgba(247, 250, 255, 0.90);
    --surface-panel: rgba(251, 253, 255, 0.96);
    --surface-panel-soft: rgba(243, 248, 255, 0.94);
    --surface-panel-tint: rgba(234, 241, 251, 0.92);
    --surface-elevated-token: rgba(252, 253, 255, 0.98);
    --surface-table-tone: rgba(249, 251, 255, 0.95);
    --header-surface: #163760;
    --header-surface-soft: #24508b;
    --panel-header-surface: linear-gradient(180deg, rgba(237, 243, 252, 0.98), rgba(246, 249, 253, 0.96));
    --panel-header-surface-hover: linear-gradient(180deg, rgba(229, 237, 249, 0.99), rgba(241, 246, 252, 0.97));
    --collapsed-panel-surface: linear-gradient(135deg, rgba(236, 242, 250, 0.98), rgba(246, 249, 253, 0.97));
    --filter-shell-bg: linear-gradient(180deg, rgba(230, 238, 248, 0.98), rgba(243, 247, 252, 0.97));
    --filter-inner-bg: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 245, 251, 0.95));
    --filter-accent-glow: rgba(36, 87, 214, 0.10);
    --border-soft-token: rgba(148, 163, 184, 0.20);
    --border-strong-token: rgba(100, 116, 139, 0.30);
    --shadow-soft-token: 0 10px 18px rgba(15, 23, 42, 0.08);
    --shadow-medium-token: 0 22px 56px rgba(15, 23, 42, 0.12);
    --shadow-strong-token: 0 30px 68px rgba(15, 23, 42, 0.16);
    --text-primary: #16263c;
    --text-secondary: #5b6c83;
    --text-inverse: #ffffff;
    --border-soft: rgba(148, 163, 184, 0.20);
    --border-strong: rgba(100, 116, 139, 0.30);
    --primary: var(--accent-primary);
    --primary-strong: var(--accent-primary-strong);
    --primary-soft: var(--accent-primary-soft);
    --primary-ring: var(--focus-ring);
    --surface: var(--surface-base);
    --surface-strong: var(--surface-panel);
    --surface-soft: var(--surface-panel-soft);
    --surface-tinted: var(--surface-panel-tint);
    --surface-table: var(--surface-table-tone);
    --surface-chip: var(--pill-surface);
    --surface-elevated: var(--surface-elevated-token);
    --text: var(--text-primary);
    --text-strong: #10233f;
    --text-on-hero: var(--text-inverse);
    --muted: var(--text-secondary);
    --line-soft: var(--border-soft-token);
    --line-strong: var(--border-strong-token);
    --shadow: var(--shadow-medium-token);
    --shadow-soft: var(--shadow-soft-token);
    --shadow-lift: var(--shadow-strong-token);
    --table-head-bg: var(--header-surface);
    --step-hero-panel-bg:
        linear-gradient(90deg, rgba(36, 87, 214, 0.16) 0%, rgba(36, 87, 214, 0.04) 46%, rgba(36, 87, 214, 0.01) 100%),
        linear-gradient(145deg, rgba(229, 238, 250, 0.99) 0%, rgba(217, 229, 245, 0.98) 52%, rgba(190, 214, 248, 0.94) 100%);
    --step-hero-panel-border: rgba(111, 136, 171, 0.24);
    --step-hero-panel-shadow: 0 24px 58px rgba(15, 23, 42, 0.14);
    --step-card-bg: linear-gradient(180deg, rgba(244, 249, 255, 0.99), rgba(229, 238, 249, 0.97));
    --step-card-bg-hover: linear-gradient(180deg, rgba(236, 244, 252, 1), rgba(221, 232, 246, 0.98));
    --step-card-border: rgba(111, 136, 171, 0.24);
    --step-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), 0 10px 24px rgba(15, 23, 42, 0.10);
    --step-badge-bg: rgba(223, 234, 251, 0.96);
    --step-badge-border: rgba(36, 87, 214, 0.20);
    --step-title-color: #10243d;
    --step-text-color: #556b86;
    --step-arrow-bg: rgba(248, 251, 255, 0.94);
    --step-arrow-border: rgba(111, 136, 171, 0.24);
    --step-arrow-color: #2c5aa0;
    --step-arrow-bg-hover: rgba(240, 246, 253, 0.98);
    --step-arrow-color-hover: #1f4d92;
}

:root[data-theme="dark"] {
    --bg-elevated: #10203a;
    --panel-bg: linear-gradient(180deg, rgba(21, 35, 58, 0.96), rgba(13, 23, 39, 0.94));
    --header-bg: #143154;
    --accent-primary: #6da8ff;
    --accent-primary-strong: #4d88f0;
    --accent-primary-soft: rgba(44, 87, 181, 0.24);
    --accent-secondary: #8ec5ff;
    --focus-ring: rgba(109, 168, 255, 0.18);
    --pill-surface: rgba(37, 99, 235, 0.22);
    --surface-base: rgba(17, 28, 46, 0.86);
    --surface-panel: rgba(22, 36, 60, 0.97);
    --surface-panel-soft: rgba(21, 34, 56, 0.90);
    --surface-panel-tint: rgba(28, 44, 70, 0.86);
    --surface-elevated-token: rgba(24, 39, 63, 0.99);
    --surface-table-tone: rgba(16, 27, 45, 0.94);
    --header-surface: #143154;
    --header-surface-soft: #1f4d84;
    --panel-header-surface: linear-gradient(180deg, rgba(22, 37, 60, 0.99), rgba(15, 27, 46, 0.97));
    --panel-header-surface-hover: linear-gradient(180deg, rgba(28, 45, 72, 1), rgba(18, 31, 52, 0.99));
    --collapsed-panel-surface: linear-gradient(135deg, rgba(22, 37, 60, 0.99), rgba(14, 25, 43, 0.99));
    --filter-shell-bg: linear-gradient(180deg, rgba(22, 38, 61, 0.99), rgba(15, 27, 46, 0.97));
    --filter-inner-bg: linear-gradient(180deg, rgba(24, 39, 63, 0.96), rgba(18, 31, 52, 0.94));
    --filter-accent-glow: rgba(109, 168, 255, 0.12);
    --border-soft-token: rgba(148, 163, 184, 0.16);
    --border-strong-token: rgba(148, 163, 184, 0.26);
    --shadow-soft-token: 0 12px 22px rgba(2, 6, 23, 0.22);
    --shadow-medium-token: 0 24px 58px rgba(2, 6, 23, 0.38);
    --shadow-strong-token: 0 32px 70px rgba(2, 6, 23, 0.46);
    --text-primary: #e8eff9;
    --text-secondary: #a9b8cb;
    --text-inverse: #f8fafc;
    --border-soft: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(148, 163, 184, 0.26);
    --primary: var(--accent-primary);
    --primary-strong: var(--accent-primary-strong);
    --primary-soft: var(--accent-primary-soft);
    --primary-ring: var(--focus-ring);
    --surface: var(--surface-base);
    --surface-strong: var(--surface-panel);
    --surface-soft: var(--surface-panel-soft);
    --surface-tinted: var(--surface-panel-tint);
    --surface-table: var(--surface-table-tone);
    --surface-chip: var(--pill-surface);
    --surface-elevated: var(--surface-elevated-token);
    --text: var(--text-primary);
    --muted: var(--text-secondary);
    --text-on-hero: var(--text-inverse);
    --line-soft: var(--border-soft-token);
    --line-strong: var(--border-strong-token);
    --shadow: var(--shadow-medium-token);
    --shadow-soft: var(--shadow-soft-token);
    --shadow-lift: var(--shadow-strong-token);
    --table-head-bg: var(--header-surface);
    --step-hero-panel-bg:
        linear-gradient(90deg, rgba(3, 7, 18, 0.6) 0%, rgba(3, 7, 18, 0.38) 46%, rgba(3, 7, 18, 0.1) 100%),
        linear-gradient(145deg, rgba(8, 18, 33, 0.98) 0%, rgba(14, 36, 64, 0.97) 52%, rgba(37, 99, 235, 0.9) 100%);
    --step-hero-panel-border: rgba(148, 163, 184, 0.16);
    --step-hero-panel-shadow: var(--shadow);
    --step-card-bg: linear-gradient(180deg, rgba(22, 37, 60, 0.99), rgba(15, 27, 46, 0.97));
    --step-card-bg-hover: linear-gradient(180deg, rgba(28, 45, 72, 1), rgba(18, 31, 52, 0.99));
    --step-card-border: rgba(148, 163, 184, 0.16);
    --step-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 24px rgba(2, 6, 23, 0.12);
    --step-badge-bg: rgba(96, 165, 250, 0.12);
    --step-badge-border: rgba(96, 165, 250, 0.16);
    --step-title-color: #e5edf8;
    --step-text-color: #adc0d4;
    --step-arrow-bg: rgba(15, 23, 42, 0.46);
    --step-arrow-border: rgba(148, 163, 184, 0.14);
    --step-arrow-color: #bfdbfe;
    --step-arrow-bg-hover: rgba(30, 41, 59, 0.72);
    --step-arrow-color-hover: #e8f1ff;
}

.access-shell {
    --access-mouse-x: 50%;
    --access-mouse-y: 36%;
    --access-mouse-opacity: 0;
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(28px, 4vw, 64px) clamp(18px, 3vw, 40px);
    overflow: hidden;
}

.access-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.access-gradient-layer,
.access-spotlight-layer,
.access-mouse-light {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.access-gradient-layer {
    opacity: 0.9;
    background:
        radial-gradient(circle at 18% 22%, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.08), transparent 26%),
        radial-gradient(circle at 50% 78%, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(125deg, rgba(8, 18, 34, 0.10) 0%, rgba(19, 48, 85, 0.14) 38%, rgba(11, 26, 47, 0.06) 100%);
    background-size: 120% 120%, 140% 140%, 130% 130%, 100% 100%;
    background-position: 0% 0%, 100% 0%, 50% 100%, 50% 50%;
    animation: accessGradientDrift 24s ease-in-out infinite alternate;
}

.access-spotlight-layer {
    opacity: 0.95;
    background:
        radial-gradient(circle at 50% 28%, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.08) 24%, transparent 58%),
        radial-gradient(circle at 50% 72%, rgba(14, 165, 233, 0.12), transparent 44%);
}

.access-mouse-light {
    opacity: var(--access-mouse-opacity);
    background:
        radial-gradient(circle at var(--access-mouse-x) var(--access-mouse-y), rgba(147, 197, 253, 0.18), rgba(96, 165, 250, 0.08) 16%, transparent 34%);
    transition: opacity 0.22s ease;
}

.access-shell::before,
.access-shell::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    filter: blur(18px);
}

.access-shell::before {
    top: 8%;
    left: 50%;
    width: min(88vw, 1240px);
    height: 420px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.26) 0%, rgba(37, 99, 235, 0.10) 42%, transparent 74%);
}

.access-shell::after {
    bottom: 8%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 72%);
}

.access-stage {
    position: relative;
    width: min(100%, 1320px);
    display: grid;
    justify-items: center;
    gap: clamp(20px, 2.3vw, 30px);
    padding: clamp(14px, 1.8vw, 22px) clamp(16px, 2vw, 24px) clamp(6px, 1vw, 10px);
    z-index: 1;
}

.access-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 40px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 82%),
        radial-gradient(circle at top center, var(--hero-glow), transparent 68%);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.access-hero {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: clamp(10px, 1.2vw, 16px);
    text-align: center;
    padding: clamp(10px, 1.4vw, 18px) clamp(14px, 2vw, 28px) 0;
}

.access-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
    color: var(--text-strong);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.access-hero-title {
    margin: 0;
    max-width: 16ch;
    color: var(--text-strong);
    font-family: var(--font-heading);
    font-size: clamp(2.05rem, 4vw, 3.7rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.access-hero-copy {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: clamp(0.88rem, 1vw, 0.98rem);
    line-height: 1.52;
    text-wrap: pretty;
}

.access-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 980px;
    margin: 10px 0 0;
    padding: 0;
}

.access-point {
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.access-card {
    position: relative;
    width: min(100%, 520px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 26%),
        linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lift);
    padding: clamp(18px, 2vw, 24px);
    backdrop-filter: blur(14px);
}

.access-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
}

.access-title {
    margin: 8px 0 10px;
    color: var(--text-strong);
    font-family: var(--font-heading);
    font-size: clamp(1.34rem, 1.55vw, 1.6rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.access-copy {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.access-form {
    display: grid;
    gap: 12px;
}

.access-label {
    color: var(--text-strong);
    font-weight: 600;
}

.access-input {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--surface), var(--surface-tinted));
    color: var(--text);
    padding: 11px 13px;
    font: inherit;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

.access-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.access-helper {
    margin: -4px 0 2px;
    color: var(--muted);
    font-size: 0.82rem;
}

.access-submit {
    width: 100%;
    justify-self: stretch;
    min-height: 40px;
    font-size: 0.9rem;
}

.access-error {
    margin: 0;
}

@media (max-width: 720px) {
    .access-shell {
        --access-mouse-opacity: 0;
        padding-inline: 16px;
    }

    .access-stage {
        width: min(100%, 680px);
        gap: 28px;
        padding: 14px 0 0;
    }

    .access-stage::before {
        inset: 4px 0 0;
        border-radius: 28px;
    }

    .access-points {
        gap: 10px;
        margin-top: 6px;
    }

    .access-point {
        width: 100%;
        justify-self: stretch;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .access-gradient-layer {
        animation: none;
    }

    .recipe-pricing-card::before,
    .recipe-pricing-metric-highlight::after,
    .qc2-analysis-savings,
    .qc2-result-v2__badge--opportunity {
        animation: none;
    }

    .access-mouse-light {
        display: none;
    }
}

@keyframes accessGradientDrift {
    0% {
        transform: translate3d(-1.5%, -1%, 0) scale(1);
    }
    50% {
        transform: translate3d(1.5%, 1%, 0) scale(1.04);
    }
    100% {
        transform: translate3d(-1%, 1.5%, 0) scale(1.02);
    }
}

@media (max-width: 520px) {
    .access-shell {
        padding-block: 24px;
    }

    .access-hero {
        gap: 14px;
        padding-inline: 4px;
    }

    .access-hero-title {
        max-width: 11ch;
        font-size: clamp(2.5rem, 11vw, 3.6rem);
    }

    .access-hero-copy {
        max-width: 100%;
    }

    .access-eyebrow {
        min-height: 32px;
        padding-inline: 12px;
        letter-spacing: 0.16em;
    }

    .access-card {
        border-radius: 24px;
        padding: 22px 18px;
    }
}

.app-shell-locked {
    display: none;
}

html.auth-pending #accessShell,
html.auth-pending #appShell,
body.app-booting #accessShell,
body.app-booting #appShell {
    display: none !important;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at top left, var(--bg-accent-1), transparent 26%),
        radial-gradient(circle at 85% 10%, var(--bg-accent-2), transparent 20%),
        radial-gradient(circle at bottom right, var(--bg-accent-3), transparent 24%),
        linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 58%, var(--bg-bottom) 100%);
    font-size: 14px;
    transition: background 0.25s ease, color 0.25s ease;
}

.page-header,
.collapsible-panel,
.summary-card,
.decision-card,
.chart-card,
.table-shell,
.top-insight-card,
.action-priority-panel,
.side-panel-card {
    background: var(--panel-bg);
}

.page-header {
    padding: 6px 2px 2px;
    margin-bottom: 12px;
}

.collapsible-panel,
.summary-card,
.decision-card,
.chart-card,
.table-shell,
.top-insight-card,
.action-priority-panel {
    border-radius: 20px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--bg-pattern) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-pattern) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
    opacity: 0.28;
}

.container {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
}

.app-shell {
    transition: padding-left 0.24s ease;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

:root:not([data-theme="dark"]) .page-header {
    background: linear-gradient(180deg, rgba(236, 242, 250, 0.78), rgba(236, 242, 250, 0.28));
    border-radius: 18px;
    padding: 12px 14px 8px;
    border: 1px solid rgba(148, 163, 184, 0.10);
    box-shadow: none;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.brand-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 800;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-view-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 14px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-elevated));
    box-shadow: var(--shadow-soft);
}

.workspace-hero-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shared-scope-card {
    display: grid;
    gap: 8px;
    min-width: min(260px, 100%);
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-elevated));
    box-shadow: var(--shadow-soft);
}

.shared-scope-label {
    color: rgba(191, 219, 254, 0.82);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shared-scope-summary {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.shared-scope-note {
    color: rgba(191, 219, 254, 0.68);
    font-size: 11px;
    line-height: 1.5;
}

.shared-scope-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.shared-scope-continue-btn,
.shared-scope-reset-btn {
    min-height: 30px;
    padding: 6px 10px;
}

.shared-scope-continue-btn {
    justify-self: flex-start;
    border-color: rgba(96, 165, 250, 0.24);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.18), rgba(15, 23, 42, 0.78));
    color: #dbeafe;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.shared-scope-continue-btn:hover {
    border-color: rgba(147, 197, 253, 0.34);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.88));
    color: #eff6ff;
}

.shared-scope-reset-btn {
    justify-self: flex-start;
    border-color: rgba(248, 113, 113, 0.22);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.18), rgba(15, 23, 42, 0.78));
    color: #fecaca;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.shared-scope-reset-btn:hover {
    border-color: rgba(248, 113, 113, 0.34);
    background: linear-gradient(180deg, rgba(153, 27, 27, 0.24), rgba(15, 23, 42, 0.88));
    color: #fee2e2;
}

.workspace-reset-overlay {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.workspace-reset-overlay[hidden] {
    display: none !important;
}

body.is-workspace-reset-open {
    overflow: hidden;
}

.workspace-reset-modal {
    width: min(100%, 460px);
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(248, 113, 113, 0.18);
    background:
        radial-gradient(circle at top right, rgba(127, 29, 29, 0.18), transparent 34%),
        linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.5);
}

.workspace-reset-list {
    margin: 12px 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.7;
}

.workspace-reset-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.32);
    background: linear-gradient(180deg, rgba(185, 28, 28, 0.92), rgba(127, 29, 29, 0.92));
    color: #fff1f2;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
    box-shadow: 0 12px 30px rgba(127, 29, 29, 0.28);
}

.danger-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(252, 165, 165, 0.44);
    filter: brightness(1.04);
}

.danger-btn:disabled {
    cursor: progress;
    opacity: 0.7;
    transform: none;
    filter: none;
}

.app-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.app-view-tab:hover {
    color: var(--text-strong);
}

.app-view-tab.is-active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.app-view {
    display: block;
}

.recipes-view-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 28px 30px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 36%),
        linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.recipes-view-hero-actions,
.recipes-empty-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recipes-empty-shell {
    margin-bottom: 14px;
}

.recipes-empty-card {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.recipes-panel-view {
    display: block;
}

.quote-compare-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-1), transparent 34%),
        linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.quote-compare-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.quote-compare-hero-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.quote-compare-hero-right {
    flex: 0 0 320px;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.quote-compare-hero-right > .shared-scope-card,
.quote-compare-hero-right > #quoteUploadNewFileButton {
    width: 100%;
}

.quote-demo-state {
    width: 100%;
}

.quote-demo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 72%, var(--surface-panel)) 0%, var(--surface-panel) 100%);
    box-shadow: var(--shadow-soft);
}

.quote-demo-banner-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.quote-demo-banner-title {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
}

.quote-demo-banner-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 760px;
}

.quote-demo-exit-btn {
    min-height: 42px;
    padding-inline: 16px;
    white-space: nowrap;
}

.quote-compare-empty-shell {
    margin-bottom: 18px;
}

.quote-compare-empty-card,
.quote-library-card,
.quote-compare-sidebar,
.quote-compare-summary-card,
.quote-compare-editor-card,
.quote-compare-table-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.quote-compare-shell {
    display: block;
}

.quote-compare-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.quote-compare-main {
    display: grid;
    gap: 14px;
    align-content: start;
}

.quote-workspace-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.quote-workspace-nav-tab {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.quote-workspace-nav-tab.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-soft), var(--surface-tinted));
    color: var(--text-strong);
    box-shadow: 0 0 0 2px var(--primary-ring);
}

.quote-workspace-nav-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.quote-compare-sidebar,
#quoteToSaveStepButton,
#quoteBackToAnalysisButton,
.quote-workflow-strip,
.quote-intake-toggle,
.quote-import-fields,
.quote-import-support,
.quote-manual-guide {
    display: none !important;
}

.qc-screen[hidden] {
    display: none !important;
}

.quote-start-screen {
    display: grid;
    gap: 22px;
}

.quote-start-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.quote-start-secondary {
    display: flex;
    justify-content: flex-start;
}

.quote-start-choice-card {
    display: grid;
    gap: 8px;
    width: 100%;
    min-height: 152px;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-panel));
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quote-start-choice-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.26), 0 0 0 1px var(--primary-ring);
}

.quote-start-choice-card:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow-soft);
}

.quote-start-choice-card.is-selected {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-soft), var(--surface-panel));
    box-shadow: 0 0 0 3px var(--primary-ring), 0 18px 36px rgba(2, 6, 23, 0.2);
}

.quote-start-choice-card-secondary {
    min-height: 120px;
    max-width: 360px;
    padding: 18px 20px;
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    border-color: var(--line-soft);
    box-shadow: 0 12px 26px rgba(2, 6, 23, 0.18);
}

.quote-start-choice-title {
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.4;
}

.quote-start-choice-copy {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.quote-stepper-card {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.quote-stepper-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.quote-stepper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.quote-stepper-tab {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.quote-stepper-tab:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.quote-stepper-tab.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-soft), var(--surface-tinted));
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.quote-stepper-tab:disabled {
    opacity: 0.54;
    cursor: not-allowed;
}

.quote-stepper-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--surface-chip);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.quote-stepper-title {
    display: block;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
}

.quote-stepper-text {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.quote-step-panel {
    display: grid;
    gap: 14px;
}

.qc-screen {
    display: grid;
    gap: 14px;
}

.quote-analysis-save {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.quote-analysis-save-field {
    min-width: min(320px, 100%);
}

.quote-history-workspace-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow-soft);
}

.quote-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.quote-step-actions-end {
    justify-content: flex-end;
}

.quote-simple-screen-head {
    margin-bottom: 2px;
}

.quote-compare-panel-head,
.quote-compare-summary-head,
.quote-compare-editor-head,
.quote-bids-head,
.quote-import-head,
.quote-compare-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.quote-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-sidebar-toggle {
    min-width: 110px;
}

.quote-sidebar-body {
    margin-top: 14px;
}

.quote-compare-summary-title,
.quote-compare-editor-title,
.quote-compare-table-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.12rem;
    font-weight: 800;
}

.quote-compare-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.quote-compare-save-shell {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.quote-compare-save-title {
    margin: 6px 0 0;
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.quote-compare-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quote-compare-list-empty {
    color: var(--muted);
    line-height: 1.6;
}

.quote-compare-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.quote-bids-card,
.quote-import-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow-soft);
    margin-top: 0;
}

.quote-bids-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.quote-bids-copy-compact {
    max-width: 560px;
}

.quote-prep-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow-soft);
}

.quote-prep-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.quote-prep-review-card,
.quote-history-readiness-card,
.quote-product-hub-list-card,
.quote-product-hub-detail-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow-soft);
}

.quote-intake-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
}

.quote-intake-tab {
    min-height: 74px;
    padding: 16px;
    border-radius: 16px;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.quote-intake-tab.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--primary-soft), var(--surface-tinted));
    color: var(--text-strong);
    box-shadow: 0 0 0 2px var(--primary-ring);
}

.quote-intake-panel {
    margin-top: 12px;
}

.quote-import-support {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.quote-upload-form {
    display: grid;
    gap: 10px;
}

.quote-import-fields {
    display: grid;
    gap: 10px;
}

.quote-import-fields-group {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-import-fields-title {
    color: var(--text-strong);
    font-size: 0.95rem;
    font-weight: 800;
}

.quote-import-fields-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.quote-import-field-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quote-hidden-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

.quote-upload-shell,
.quote-manual-copy-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-upload-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.info-box {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--surface-tinted);
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.info-box strong {
    color: var(--text-strong);
}

.quote-compare-info-box {
    margin-bottom: 14px;
}

.quote-upload-title {
    color: var(--text-strong);
    font-size: 0.93rem;
    font-weight: 800;
}

.quote-upload-note {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    max-width: 540px;
}

.quote-upload-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-upload-fileline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 12px;
}

.quote-upload-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.quote-upload-filelabel {
    color: var(--text-strong);
    font-weight: 700;
}

.quote-fields-help {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-fields-help summary {
    color: var(--text-strong);
    font-weight: 800;
    cursor: pointer;
}

.quote-fields-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.quote-fields-help-title {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
}

.quote-fields-help-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.quote-manual-copy {
    margin-top: 8px;
    color: var(--text-strong);
    line-height: 1.6;
}

.quote-manual-copy.subtle {
    color: var(--muted);
    font-size: 12px;
}

.quote-bids-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.quote-manual-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.quote-manual-builder-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.quote-manual-saved-products {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.quote-saved-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-saved-product-title {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
}

.quote-saved-product-meta {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.quote-saved-product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-bid-row {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-bid-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.quote-bid-grid-simple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quote-bid-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.quote-bid-notes {
    flex: 1 1 auto;
}

.quote-compare-table-wrap {
    margin-top: 16px;
}

.quote-compare-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, 1fr)) auto;
    gap: 12px;
    margin-top: 16px;
    align-items: end;
}

.quote-compare-filters-simple {
    grid-template-columns: minmax(0, 1.3fr) minmax(180px, 1fr) auto auto;
}

.quote-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 600;
}

.quote-product-group {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-tinted);
}

.quote-product-group-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.quote-product-group-title {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.quote-product-group-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.quote-offer-supplier {
    color: var(--text-strong);
    font-weight: 700;
}

.quote-offer-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.quote-offer-badge {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.quote-offer-badge.is-muted {
    background: var(--surface-panel);
    color: var(--muted);
}

.quote-compare-table tr.is-best-offer td {
    background: color-mix(in srgb, var(--primary-soft) 70%, transparent);
}

.quote-compare-table-scroll {
    overflow-x: auto;
}

.quote-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.quote-compare-table th,
.quote-compare-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    color: var(--text-strong);
    font-size: 13px;
}

.quote-compare-table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-flow-title {
    margin: 6px 0 0;
    color: var(--text-strong);
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.4;
}

.quote-workflow-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.quote-workflow-step,
.quote-manual-guide-step,
.mapping-section {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.quote-workflow-step,
.quote-manual-guide-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: flex-start;
}

.quote-workflow-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.quote-workflow-label,
.quote-manual-guide-title,
.mapping-section-title {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

.quote-workflow-copy,
.quote-manual-guide-copy,
.mapping-section-copy,
.quote-results-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.quote-manual-guide {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mapping-section + .mapping-section {
    margin-top: 14px;
}

.mapping-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.mapping-section-grid {
    display: grid;
    gap: 12px;
}

.quote-bid-row {
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.quote-bid-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.quote-bid-row-title {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
}

.quote-bid-row-copy {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.quote-bid-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-bid-optional {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.quote-bid-optional summary {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.quote-bid-optional summary::-webkit-details-marker {
    display: none;
}

.quote-bid-optional-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quote-bid-notes {
    grid-column: 1 / -1;
}

.quote-bid-footer {
    justify-content: flex-end;
}

.quote-manual-review-list,
.quote-history-preview-grid,
.quote-product-hub-history {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.quote-manual-review-item,
.quote-history-preview-card,
.quote-history-round {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.quote-manual-review-head,
.quote-history-round-head,
.quote-product-hub-head,
.quote-product-hub-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.quote-manual-review-title,
.quote-history-preview-title,
.quote-history-round-title {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
}

.quote-manual-review-copy,
.quote-history-preview-copy,
.quote-history-round-copy,
.quote-history-preview-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.quote-manual-review-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quote-manual-review-offers {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.quote-manual-review-offer {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-panel);
    color: var(--text-strong);
    font-size: 13px;
}

.quote-history-preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quote-product-hub-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
    gap: 18px;
}

.quote-product-hub-search {
    margin-bottom: 16px;
}

.quote-product-hub-list {
    display: grid;
    gap: 10px;
}

.quote-product-hub-item {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-tinted));
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quote-product-hub-item:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.quote-product-hub-item.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.quote-product-hub-item-name {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
}

.quote-product-hub-item-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.quote-product-hub-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.quote-next-product-btn,
.quote-product-toggle,
.quote-offer-pick {
    min-width: 126px;
}

.quote-product-group {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.quote-product-group.is-collapsed {
    opacity: 0.94;
}

.quote-product-group-signal {
    margin-top: 8px;
    color: var(--text-strong);
    font-size: 13px;
    line-height: 1.6;
}

.quote-product-group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.quote-product-group-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quote-summary-stat,
.quote-offer-metric {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-panel);
}

.quote-summary-label,
.quote-offer-metric-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-summary-value,
.quote-offer-metric-value {
    display: block;
    margin-top: 8px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.quote-decision-signal {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface));
    color: var(--text-strong);
    font-size: 13px;
    line-height: 1.68;
}

.quote-product-group-body {
    margin-top: 16px;
}

.quote-offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.quote-offer-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface));
    box-shadow: var(--shadow-soft);
}

.quote-offer-card.is-best-offer {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow-soft);
}

.quote-offer-card.is-selected-offer {
    border-color: rgba(34, 197, 94, 0.42);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12), var(--shadow-soft);
}

.quote-offer-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.quote-offer-total {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.quote-offer-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quote-offer-notes {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.quote-offer-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.quote-offer-detail {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-panel);
}

.quote-offer-detail span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quote-offer-detail strong {
    display: block;
    margin-top: 8px;
    color: var(--text-strong);
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 1280px) {
    .quote-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .quote-stepper,
    .quote-prep-grid,
    .quote-product-group-summary,
    .quote-bid-grid,
    .quote-bid-optional-grid,
    .quote-fields-help-grid,
    .quote-manual-product-grid,
    .quote-start-choice-grid,
    .quote-product-hub-metrics,
    .quote-offer-detail-grid {
        grid-template-columns: 1fr;
    }

    .quote-offer-metrics {
        grid-template-columns: 1fr;
    }

    .quote-product-hub-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .quote-step-actions,
    .quote-product-group-head,
    .quote-product-group-actions,
    .quote-offer-card-head,
    .quote-bid-row-head,
    .quote-saved-product-item,
    .quote-manual-review-head,
    .quote-manual-review-actions,
    .quote-history-round-head,
    .quote-product-hub-head,
    .quote-product-hub-detail-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-manual-review-offer {
        grid-template-columns: 1fr;
    }
}

.workspace-toggle-btn {
    min-width: 82px;
    min-height: 40px;
    padding: 9px 13px;
    font-size: 13px;
    box-shadow: none;
}

.workspace-toggle-btn.is-active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.side-panel {
    position: fixed;
    top: 104px;
    bottom: auto;
    z-index: 1200;
    width: min(var(--workspace-guide-rail-width), calc(100vw - 40px));
    max-height: min(calc(100vh - 136px), 760px);
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
    transition: transform 0.24s ease, opacity 0.2s ease;
}

.side-panel-left {
    left: 24px;
    transform: translateX(-10px);
}

.side-panel-right {
    right: 24px;
    transform: translateX(10px);
}

.side-panel.is-open {
    pointer-events: auto;
    opacity: 1;
    transform: translateX(0);
}

@media (min-width: 1220px) {
    .app-shell.app-shell-guide-open {
        padding-left: calc(var(--workspace-guide-rail-width) + var(--workspace-guide-rail-gap));
    }
}

.side-panel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: inherit;
    min-height: 0;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background:
        linear-gradient(180deg, var(--surface-elevated), var(--surface));
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.side-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--line-soft);
    flex: 0 0 auto;
}

.side-panel-kicker {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.side-panel-title {
    margin: 6px 0 0;
    color: var(--text-strong);
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.side-panel-close {
    border: 1px solid var(--line-strong);
    background: var(--surface-strong);
    color: var(--muted);
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.side-panel-close:hover {
    border-color: var(--primary);
    color: var(--text-strong);
    background: var(--surface-elevated);
}

.side-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 22px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.side-panel-section-label,
.notes-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.side-panel-checklist {
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.side-panel-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    border: 1px solid var(--line-soft);
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
}

.side-panel-checklist li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 0 0 4px var(--primary-ring);
    flex: 0 0 auto;
}

.side-panel-tip-list {
    display: grid;
    gap: 10px;
}

.side-panel-tip-list p {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.42);
    color: var(--muted);
    line-height: 1.6;
}

#guidePanel .side-panel-card {
    border-color: var(--guide-panel-border);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 34%),
        radial-gradient(circle at top left, rgba(45, 212, 191, 0.08), transparent 26%),
        var(--guide-panel-bg);
    box-shadow: var(--guide-panel-shadow);
}

#guidePanel .side-panel-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 18px 18px 14px;
    border-bottom-color: var(--guide-panel-head-border);
    background:
        linear-gradient(90deg, rgba(125, 167, 255, 0.10), rgba(125, 167, 255, 0) 22%),
        var(--guide-panel-head-bg);
    box-shadow: var(--guide-panel-head-shadow);
}

#guidePanel .side-panel-kicker {
    color: var(--guide-panel-kicker);
    font-size: 10px;
    letter-spacing: 0.18em;
}

#guidePanel .side-panel-title {
    margin-top: 8px;
    color: var(--guide-panel-title);
    font-size: 1.14rem;
}

#guidePanel .side-panel-close {
    min-height: 38px;
    padding: 9px 13px;
    border-radius: 14px;
    border-color: var(--guide-panel-close-border);
    background: var(--guide-panel-close-bg);
    color: var(--guide-panel-close-text);
    box-shadow: 0 10px 18px rgba(2, 6, 23, 0.16);
}

#guidePanel .side-panel-close:hover {
    border-color: var(--guide-panel-close-hover-border);
    background: var(--guide-panel-close-hover-bg);
    color: var(--guide-panel-close-hover-text);
    box-shadow: 0 14px 24px rgba(2, 6, 23, 0.24);
}

#guidePanel .side-panel-close:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 6px var(--primary-ring), 0 14px 24px rgba(2, 6, 23, 0.24);
}

#guidePanel .side-panel-body {
    padding: 18px;
    padding-bottom: 26px;
}

#guidePanel .side-panel-section-label {
    margin-bottom: 12px;
    color: var(--guide-panel-section);
    font-size: 10px;
    letter-spacing: 0.18em;
}

#guidePanel .side-panel-checklist {
    gap: 12px;
    margin-bottom: 26px;
}

#guidePanel .side-panel-checklist li {
    position: relative;
    gap: 12px;
    padding: 14px 16px;
    border-color: var(--guide-panel-item-border);
    background: var(--guide-panel-item-bg);
    color: var(--guide-panel-item-text);
    box-shadow: var(--guide-panel-item-shadow);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

#guidePanel .side-panel-checklist li:hover {
    transform: translateY(-1px);
    border-color: var(--guide-panel-item-hover-border);
    background: var(--guide-panel-item-hover);
    box-shadow: var(--guide-panel-item-hover-shadow);
}

#guidePanel .side-panel-checklist li::before {
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 5px var(--primary-ring), 0 0 18px rgba(109, 168, 255, 0.32);
}

#guidePanel .side-panel-tip-list {
    gap: 12px;
}

#guidePanel .side-panel-tip-list p {
    padding: 14px 16px;
    border-color: var(--guide-panel-tip-border);
    background: var(--guide-panel-tip-bg);
    color: var(--guide-panel-tip-text);
    box-shadow: var(--guide-panel-tip-shadow);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#guidePanel .side-panel-tip-list p:hover {
    transform: translateY(-1px);
    border-color: var(--guide-panel-item-hover-border);
    background: var(--guide-panel-tip-hover);
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.22);
}

#guidePanel .side-panel-tip-list + .side-panel-section-label {
    margin-top: 24px;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-copy {
    margin: 10px 0 0;
    color: var(--guide-panel-item-muted);
    font-size: 13px;
    line-height: 1.72;
    max-width: 28ch;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-label {
    color: var(--guide-panel-section);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid var(--guide-ask-border);
    background: var(--guide-ask-bg);
    box-shadow: var(--guide-ask-shadow);
}

:is(#guidePanel, #guideWorkspace) .guide-ask-input {
    min-width: 0;
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid var(--guide-ask-input-border);
    background: var(--guide-ask-input-bg);
    color: var(--guide-ask-input-text);
    font: inherit;
    font-size: 14px;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-input::placeholder {
    color: var(--guide-ask-input-placeholder);
}

:is(#guidePanel, #guideWorkspace) .guide-ask-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary), 0 0 0 4px var(--primary-ring);
}

:is(#guidePanel, #guideWorkspace) .guide-ask-button {
    min-width: 82px;
    min-height: 44px;
    align-self: stretch;
}

#guidePanel .guide-ask-answer {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    min-height: 196px;
    max-height: 340px;
    overflow-y: auto;
    padding: 20px 20px 22px;
    border-radius: 20px;
    border: 1px solid var(--guide-ask-answer-border);
    background: var(--guide-ask-answer-bg);
    box-shadow: 0 16px 30px rgba(2, 6, 23, 0.22);
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    animation: guideAnswerReveal 0.18s ease;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-answer-label {
    color: var(--guide-ask-answer-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-answer-text {
    color: var(--guide-ask-answer-text);
    font-size: 14px;
    line-height: 1.82;
    white-space: pre-wrap;
}

:is(#guidePanel, #guideWorkspace) .guide-ask-answer-meta {
    display: grid;
    gap: 10px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

:is(#guidePanel, #guideWorkspace) .guide-ask-answer-line {
    color: var(--guide-ask-answer-muted);
    font-size: 12px;
    line-height: 1.6;
}

@keyframes guideAnswerReveal {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-workspace {
    display: grid;
    gap: 16px;
}

.guide-workspace-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px;
    border-radius: 24px;
    border: 1px solid var(--guide-workspace-shell-border);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.14), transparent 30%),
        radial-gradient(circle at left center, rgba(45, 212, 191, 0.07), transparent 26%),
        var(--guide-workspace-shell-bg);
    box-shadow: var(--guide-workspace-shell-shadow);
}

.guide-workspace-hero .panel-title,
.guide-card-title,
.guide-answer-title {
    color: var(--guide-workspace-title);
}

.guide-workspace-hero .panel-copy,
.guide-card-copy,
.guide-ask-answer-text,
.guide-answer-context,
.guide-ask-answer-line,
.guide-history-empty {
    color: var(--guide-workspace-copy);
}

.guide-workspace-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-workspace-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.guide-sidebar,
.guide-main {
    display: grid;
    gap: 16px;
}

.guide-surface {
    padding: 19px;
    border-radius: 20px;
    border: 1px solid var(--guide-workspace-card-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--guide-workspace-card-bg);
    box-shadow: var(--guide-workspace-card-shadow);
}

.guide-card-kicker {
    color: var(--guide-workspace-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.guide-card-title {
    margin: 10px 0 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.guide-card-copy {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.68;
}

.guide-action-card {
    display: grid;
    align-content: start;
    align-items: start;
}

.guide-action-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.guide-overview-actions,
.guide-topic-list,
.guide-answer-actions,
.guide-answer-steps {
    display: grid;
    gap: 10px;
}

.guide-overview-actions {
    margin-top: 14px;
}

.guide-context-card {
    display: grid;
    gap: 14px;
}

.guide-context-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.guide-context-metric {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--guide-workspace-card-border);
    background: linear-gradient(180deg, rgba(27, 43, 70, 0.92), rgba(16, 29, 48, 0.92));
}

.guide-context-metric.is-accent {
    border-color: rgba(96, 165, 250, 0.34);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.12);
}

.guide-context-metric-value {
    color: var(--guide-workspace-title);
    font-size: 1.05rem;
    font-weight: 800;
}

.guide-context-metric-label {
    margin-top: 4px;
    color: var(--guide-workspace-copy);
    font-size: 12px;
    line-height: 1.5;
}

.guide-context-hints {
    display: grid;
    gap: 10px;
}

.guide-context-hint {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.58));
    color: var(--guide-workspace-copy);
    font-size: 12px;
    line-height: 1.62;
}

.guide-overview-actions.guide-action-list,
.guide-topic-list.guide-action-list {
    margin-bottom: 0;
}

.guide-topic-button,
.guide-history-button,
.guide-action-link {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--guide-workspace-card-border);
    background:
        linear-gradient(180deg, rgba(27, 43, 70, 0.98), rgba(16, 29, 48, 0.95));
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.16);
    color: var(--guide-workspace-title);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

.guide-action-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    box-sizing: border-box;
    text-align: left;
    line-height: 1.5;
}

.guide-topic-button:hover,
.guide-history-button:hover,
.guide-action-link:hover {
    transform: translateY(-1px);
    border-color: var(--guide-workspace-card-hover-border);
    box-shadow: var(--guide-workspace-card-hover-shadow);
    background:
        linear-gradient(180deg, rgba(33, 53, 84, 1), rgba(18, 34, 57, 0.98));
}

.guide-topic-button.is-active {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.44);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.18), 0 16px 32px rgba(37, 99, 235, 0.18);
    background:
        linear-gradient(180deg, rgba(38, 63, 102, 1), rgba(18, 37, 66, 0.98));
}

.guide-history-list {
    display: grid;
    gap: 10px;
}

.guide-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.guide-history-clear {
    min-height: 34px;
    padding-inline: 12px;
    flex: 0 0 auto;
}

.guide-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.guide-history-button {
    padding-right: 16px;
}

.guide-history-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 100%;
    border-radius: 18px;
    border: 1px solid var(--guide-workspace-card-border);
    background:
        linear-gradient(180deg, rgba(27, 43, 70, 0.98), rgba(16, 29, 48, 0.95));
    box-shadow: 0 14px 26px rgba(2, 6, 23, 0.16);
    color: var(--guide-workspace-muted);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.guide-history-delete:hover {
    transform: translateY(-1px);
    border-color: var(--guide-workspace-card-hover-border);
    box-shadow: var(--guide-workspace-card-hover-shadow);
    color: var(--guide-workspace-title);
    background:
        linear-gradient(180deg, rgba(33, 53, 84, 1), rgba(18, 34, 57, 0.98));
}

.guide-history-delete:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.guide-history-empty {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.72;
}

.guide-assistant-shell {
    padding: 20px;
}

.guide-assistant-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.guide-ask-form-workspace {
    margin-top: 16px;
}

.guide-answer-stage,
.guide-answer-empty {
    margin-top: 18px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--guide-workspace-answer-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--guide-workspace-answer-bg);
    box-shadow: var(--guide-workspace-answer-shadow);
}

.guide-answer-stage {
    display: grid;
    gap: 14px;
    min-height: 360px;
    max-height: min(72vh, 700px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.guide-answer-stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.guide-answer-context-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(109, 168, 255, 0.24);
    background: rgba(109, 168, 255, 0.12);
    color: var(--guide-workspace-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-answer-title {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.35;
}

.guide-answer-section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(125, 167, 255, 0.18);
    background: rgba(125, 167, 255, 0.1);
    color: var(--guide-workspace-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-answer-context {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(10, 18, 32, 0.34);
    font-size: 13px;
    line-height: 1.66;
}

.guide-answer-flow {
    display: grid;
    gap: 10px;
}

.guide-answer-body {
    display: grid;
    gap: 14px;
}

.guide-answer-section {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 167, 255, 0.12);
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.9), rgba(11, 19, 32, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.guide-answer-subtitle {
    color: var(--guide-workspace-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.guide-answer-subtitle-inline {
    margin-bottom: 2px;
}

.guide-ask-answer-text-secondary {
    font-size: 13px;
    line-height: 1.7;
}

.guide-answer-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--guide-workspace-card-border);
    background:
        linear-gradient(180deg, rgba(27, 43, 70, 0.96), rgba(16, 29, 48, 0.94));
    color: var(--guide-workspace-title);
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.16);
}

.guide-answer-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(109, 168, 255, 0.26);
    background: rgba(109, 168, 255, 0.14);
    color: var(--guide-workspace-accent);
    font-size: 12px;
    font-weight: 800;
}

.guide-answer-step-text {
    font-size: 13px;
    line-height: 1.64;
}

.guide-answer-actions {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.guide-answer-snapshot {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.guide-answer-snapshot-item {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(125, 167, 255, 0.14);
    background: linear-gradient(180deg, rgba(30, 46, 74, 0.88), rgba(17, 28, 46, 0.9));
}

.guide-answer-snapshot-label {
    color: var(--guide-workspace-copy);
    font-size: 11px;
    line-height: 1.5;
}

.guide-answer-snapshot-value {
    margin-top: 4px;
    color: var(--guide-workspace-title);
    font-size: 1rem;
    font-weight: 800;
}

.guide-action-link {
    text-align: center;
}

#guideWorkspaceView {
    display: grid;
    gap: 20px;
}

#guideWorkspaceView .guide-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

#guideWorkspaceView .guide-sidebar,
#guideWorkspaceView .guide-main {
    display: grid;
    gap: 16px;
    align-content: start;
    align-items: start;
    min-width: 0;
}

#guideWorkspaceView .guide-main {
    grid-auto-rows: min-content;
}

#guideWorkspaceView .guide-surface,
#guideWorkspaceView .guide-assistant-shell,
#guideWorkspaceView .guide-answer-stage,
#guideWorkspaceView .guide-answer-empty {
    width: 100%;
    height: auto;
    min-height: 0;
    align-self: start;
}

#guideWorkspaceView .guide-assistant-shell {
    display: grid;
    gap: 18px;
}

#guideWorkspaceView .guide-assistant-shell.is-empty,
#guideWorkspaceView .guide-result-stage.guide-result-empty {
    align-content: start;
}

#guideWorkspaceView .guide-result-stage {
    display: grid;
    gap: 0;
    align-content: start;
}

#guideWorkspaceView .guide-result-stage.guide-result-empty .guide-answer-stage {
    display: none !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

#guideWorkspaceView .guide-result-stage.guide-result-empty .guide-answer-body,
#guideWorkspaceView .guide-result-stage.guide-result-empty .guide-answer-flow {
    display: none !important;
}

#guideWorkspaceView .guide-result-stage.guide-result-empty .guide-answer-empty {
    display: block;
    min-height: 0;
    padding: 20px 22px;
    margin-top: 0;
}

#guideWorkspaceView .guide-assistant-shell.is-empty .guide-card-copy {
    margin-top: 8px;
}

#guideWorkspaceView .guide-result-stage.guide-result-ready .guide-answer-empty,
#guideWorkspaceView .guide-assistant-shell.has-answer .guide-answer-empty {
    display: none;
}

#guideWorkspaceView .guide-result-stage.guide-result-ready .guide-answer-stage {
    display: grid;
}

#guideWorkspaceView .guide-ask-form-workspace,
#guideWorkspaceView .guide-answer-stage,
#guideWorkspaceView .guide-answer-empty {
    margin-top: 0;
}

#guideWorkspaceView .guide-answer-stage {
    gap: 14px;
    min-height: 220px;
    max-height: 560px;
    overflow-y: auto;
}

#guideWorkspaceView .guide-answer-empty {
    min-height: 0;
}

#guideWorkspaceView #guideAskAnswer {
    display: grid;
    align-content: start;
}

#guideWorkspaceView #guideAskAnswerText {
    display: block;
    min-height: 72px;
    width: 100%;
}

@media (max-width: 980px) {
    .guide-workspace-grid,
    #guideWorkspaceView .guide-layout {
        grid-template-columns: 1fr;
    }

    .notes-workspace-grid {
        grid-template-columns: 1fr;
    }

    .guide-workspace-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .guide-workspace-hero,
    .guide-surface,
    .guide-answer-stage,
    .guide-answer-empty {
        padding: 20px;
    }

    .guide-answer-stage {
        min-height: 360px;
    }

    .guide-ask-row {
        grid-template-columns: 1fr;
    }

    .guide-ask-button {
        width: 100%;
    }
}

.notes-textarea {
    width: 100%;
    min-height: 240px;
    resize: vertical;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    color: var(--text);
    padding: 16px;
    font: inherit;
    line-height: 1.6;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.notes-workbench-copy {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.notes-grid {
    display: grid;
    gap: 12px;
}

.notes-sections-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.notes-list-shell {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.notes-workspace-grid {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.notes-shell {
    min-height: 100%;
}

.notes-overview-pills {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.notes-suggested-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notes-tag-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(125, 167, 255, 0.18);
    background: linear-gradient(180deg, rgba(36, 53, 82, 0.98), rgba(16, 28, 46, 0.98));
    color: var(--guide-workspace-title);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.notes-tag-chip:hover,
.notes-tag-chip:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(125, 167, 255, 0.34);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.12);
    outline: none;
}

.notes-list-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notes-compose-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface));
}

.notes-compose-card-rich {
    gap: 14px;
}

.notes-inline-field {
    display: grid;
    gap: 6px;
}

.notes-inline-field-wide {
    grid-column: 1 / -1;
}

.notes-inline-label {
    color: var(--text-strong);
    font-size: 12px;
    font-weight: 700;
}

.notes-inline-input {
    min-height: 42px;
}

.notes-textarea-inline {
    min-height: 100px;
}

.notes-compose-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.notes-item-list {
    display: grid;
    gap: 10px;
}

.notes-item-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    animation: notesItemReveal 0.18s ease;
}

.notes-item-card.is-removing {
    animation: notesItemRemove 0.18s ease forwards;
}

.notes-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notes-item-title {
    margin: 0 0 10px;
    color: #f8fbff;
    font-size: 1rem;
    line-height: 1.35;
}

.notes-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.notes-item-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
    font-size: 11px;
    font-weight: 700;
}

.notes-item-time {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.notes-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.notes-item-action-btn {
    min-height: 34px;
    padding: 7px 10px;
}

.notes-item-action-btn.is-danger {
    border-color: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}

.notes-item-text {
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.notes-item-empty {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    padding: 10px 2px 0;
}

@keyframes notesItemReveal {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notesItemRemove {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.notes-section-card {
    margin-bottom: 0;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
}

.notes-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notes-section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.notes-section-count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 167, 255, 0.16);
    background: rgba(59, 130, 246, 0.08);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.notes-section-create-btn {
    min-height: 34px;
    padding: 7px 12px;
}

.notes-section-title {
    display: block;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.notes-section-copy {
    display: block;
    margin-top: 4px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}

.notes-textarea-compact {
    min-height: 132px;
}

.notes-section-editor {
    margin-top: 12px;
}

.notes-section-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.notes-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.notes-saved-indicator {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.notes-saved-indicator.is-active {
    color: var(--primary-strong);
    opacity: 1;
}

.notes-clear-btn {
    min-height: 40px;
    padding: 10px 14px;
}

.qc2-analysis-detail-note-secondary {
    margin-top: 12px;
    color: var(--muted);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface));
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 18px;
    margin-bottom: 0;
}

.hero-compact {
    display: block;
}

.hero-main-compact {
    position: relative;
    padding: 20px 22px;
}

.hero-compact-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.hero-main-compact h1 {
    margin: 0 0 10px;
    max-width: 640px;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.02;
    font-family: var(--font-heading);
    font-weight: 800;
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.26);
    filter: contrast(1.04);
}

.hero-main-compact p {
    max-width: 620px;
    font-size: 0.96rem;
    line-height: 1.55;
    color: rgba(241, 245, 249, 0.88);
}

.hero-steps-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.hero-steps-compact .hero-step {
    padding: 12px 14px;
    border-radius: 18px;
}

.hero-steps-compact .hero-step-index {
    min-width: 48px;
    min-height: 34px;
    font-size: 11px;
}

.hero-steps-compact .hero-step-title {
    font-size: 0.96rem;
}

.hero-steps-compact .hero-step-copy {
    font-size: 0.88rem;
    line-height: 1.45;
}

.collapsible-panel {
    margin-bottom: 18px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    overflow: clip;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.collapsible-panel-hero {
    background: var(--step-hero-panel-bg);
    border-color: var(--step-hero-panel-border);
    box-shadow: var(--step-hero-panel-shadow);
}

:root:not([data-theme="dark"]) .collapsible-panel-hero {
    background: var(--step-hero-panel-bg);
    border-color: var(--step-hero-panel-border);
    box-shadow: var(--step-hero-panel-shadow);
}

.collapsible-panel-upload {
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
}

.collapsible-panel-inline {
    margin-bottom: 18px;
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    border-color: var(--line-soft);
    box-shadow: var(--shadow-soft);
}

.collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    background: var(--step-card-bg);
    color: var(--step-title-color);
    box-shadow: var(--step-card-shadow);
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.collapsible-toggle:hover {
    background: var(--step-card-bg-hover);
    transform: translateY(-1px);
}

.collapsible-toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary), inset 0 0 0 6px var(--primary-ring);
}

.collapsible-toggle-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.collapsible-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--step-badge-bg);
    border: 1px solid var(--step-badge-border);
    color: var(--step-title-color);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.collapsible-toggle-kicker {
    color: var(--step-title-color);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.collapsible-toggle-title {
    color: var(--step-text-color);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    transition: color 0.2s ease;
    font-family: var(--font-body);
}

.collapsible-toggle-icon {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    color: var(--step-arrow-color);
    opacity: 0.86;
    border-radius: 999px;
    background: var(--step-arrow-bg);
    border: 1px solid var(--step-arrow-border);
    transition: transform 0.22s ease, opacity 0.22s ease, color 0.22s ease, filter 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.collapsible-toggle-icon::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.collapsible-toggle:hover .collapsible-toggle-icon {
    opacity: 1;
    background: var(--step-arrow-bg-hover);
    border-color: var(--step-badge-border);
    color: var(--step-arrow-color-hover);
}

.collapsible-panel.is-collapsed .collapsible-toggle-icon {
    transform: rotate(-90deg);
    opacity: 0.96;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.16));
}

.collapsible-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.26s ease;
}

.collapsible-panel.is-collapsed .collapsible-body {
    grid-template-rows: 0fr;
}

.collapsible-body-inner {
    min-height: 0;
    overflow: hidden;
}

.collapsible-panel.is-collapsed .collapsible-toggle {
    position: relative;
    padding-block: 15px;
    background: var(--collapsed-panel-surface);
}

.collapsible-panel.is-collapsed .collapsible-body-inner {
    visibility: hidden;
}

.collapsible-panel.is-collapsed {
    border-color: var(--line-strong);
    background: var(--collapsed-panel-surface);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.collapsible-panel.is-collapsed:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.42);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.10);
}

.collapsible-panel.is-collapsed .collapsible-toggle:hover {
    background:
        linear-gradient(90deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.04) 22%, rgba(255, 255, 255, 0.05)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.collapsible-panel.is-collapsed .collapsible-toggle-kicker {
    color: #315ea8;
}

.collapsible-panel.is-collapsed .collapsible-toggle-title {
    color: #17315f;
}

.collapsible-panel.is-collapsed .collapsible-toggle::after {
    content: none;
}

.collapsible-panel-hero.is-collapsed {
    border-color: rgba(125, 167, 255, 0.34);
    background:
        linear-gradient(90deg, rgba(96, 165, 250, 0.18), rgba(96, 165, 250, 0) 16%),
        linear-gradient(145deg, rgba(16, 31, 58, 0.94) 0%, rgba(23, 55, 103, 0.92) 52%, rgba(42, 93, 191, 0.88) 100%);
    box-shadow: 0 16px 34px rgba(9, 20, 43, 0.18);
}

.collapsible-panel-hero.is-collapsed .collapsible-toggle {
    background:
        linear-gradient(90deg, rgba(125, 167, 255, 0.18), rgba(125, 167, 255, 0) 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.collapsible-panel-hero.is-collapsed .collapsible-toggle:hover {
    background:
        linear-gradient(90deg, rgba(125, 167, 255, 0.26), rgba(125, 167, 255, 0.05) 24%, rgba(255, 255, 255, 0.04)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.03));
}

.collapsible-panel-hero.is-collapsed .collapsible-toggle-kicker {
    color: rgba(219, 234, 254, 0.8);
}

.collapsible-panel-hero.is-collapsed .collapsible-toggle-title {
    color: #f8fbff;
}

.collapsible-panel-hero.is-collapsed .collapsible-toggle::after {
    border-color: rgba(191, 219, 254, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #dbeafe;
}

.collapsible-panel-inline.is-collapsed {
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.10), rgba(37, 99, 235, 0) 16%),
        linear-gradient(180deg, var(--surface-strong), rgba(232, 239, 252, 0.86));
}

.collapsible-panel-inline.is-collapsed .collapsible-toggle-icon {
    color: var(--primary-strong);
}

.collapsible-panel.is-expanded .collapsible-toggle {
    border-bottom: 1px solid var(--step-card-border);
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed {
    border-color: rgba(96, 165, 250, 0.30);
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(96, 165, 250, 0.03)),
        linear-gradient(180deg, rgba(13, 23, 42, 0.94), rgba(18, 31, 57, 0.92));
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.26);
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed:hover {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.34);
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-toggle {
    background:
        linear-gradient(90deg, rgba(96, 165, 250, 0.16), rgba(96, 165, 250, 0.02) 18%, rgba(255, 255, 255, 0.01)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-toggle:hover {
    background:
        linear-gradient(90deg, rgba(96, 165, 250, 0.24), rgba(96, 165, 250, 0.06) 24%, rgba(255, 255, 255, 0.02)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-toggle-kicker {
    color: #93c5fd;
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-toggle-title {
    color: #eff6ff;
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-toggle::after {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(96, 165, 250, 0.10);
    color: #bfdbfe;
}

:root[data-theme="dark"] .collapsible-panel.is-collapsed .collapsible-step-badge {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}

.table-shell > .collapsible-panel-inline:first-of-type {
    margin-bottom: 18px;
}

.collapsible-panel-filters .filter-panel {
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.collapsible-panel-summary .executive-summary,
.collapsible-panel-workspace .table-shell,
.collapsible-panel-ask .ai-entry-shell {
    margin-bottom: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.collapsible-panel-summary .executive-summary,
.collapsible-panel-workspace .table-shell,
.collapsible-panel-ask .ai-entry-shell {
    padding: 26px;
}

.collapsible-panel-charts .dashboard-section-head {
    margin-bottom: 18px;
    padding: 0 2px;
}

.collapsible-panel-charts .dashboard-grid {
    margin-bottom: 0;
}

.collapsible-panel.is-collapsed .collapsible-step-badge {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(59, 130, 246, 0.18);
    color: #315ea8;
}

.collapsible-panel-hero.is-collapsed .collapsible-step-badge {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(191, 219, 254, 0.18);
    color: #dbeafe;
}

.collapsible-panel-workspace {
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
}

:root[data-theme="dark"] .collapsible-panel-workspace .collapsible-toggle-title,
:root[data-theme="dark"] .workspace-filter-block .collapsible-toggle-title,
:root[data-theme="dark"] .filter-panel-copy,
:root[data-theme="dark"] .filter-summary-text,
:root[data-theme="dark"] .filter-label,
:root[data-theme="dark"] .date-input-empty,
:root[data-theme="dark"] .date-range-separator,
:root[data-theme="dark"] .search-input::placeholder,
:root[data-theme="dark"] .date-input::-webkit-datetime-edit-text,
:root[data-theme="dark"] .table-subtitle,
:root[data-theme="dark"] .panel-copy,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .sample-links-label,
:root[data-theme="dark"] .demo-cta-copy,
:root[data-theme="dark"] .demo-note {
    color: var(--text-secondary);
}

:root[data-theme="dark"] .search-input-shell,
:root[data-theme="dark"] .date-input-inline,
:root[data-theme="dark"] .searchable-select-trigger,
:root[data-theme="dark"] .filter-popover-search {
    color: var(--text);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
    border-color: var(--line-strong);
}

.hero-main,
.hero-side,
.upload-box,
.summary-card,
.decision-card,
.chart-card,
.table-shell {
    border: 1px solid var(--line-soft);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.hero-main {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.70) 0%, rgba(2, 6, 23, 0.46) 46%, rgba(2, 6, 23, 0.14) 100%),
        linear-gradient(135deg, var(--hero-tint), rgba(255, 255, 255, 0.02)),
        var(--bg-hero);
    color: var(--text-on-hero);
    border-color: rgba(255, 255, 255, 0.14);
}

.hero-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.08), transparent 22%),
        radial-gradient(circle at 88% 26%, var(--hero-glow), transparent 28%);
    pointer-events: none;
}

.hero-main::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -46px;
    top: -54px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hero-glow), transparent 70%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-on-hero);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.hero-main h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    max-width: 760px;
    font-size: clamp(2.4rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
    font-family: var(--font-heading);
    font-weight: 800;
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(2, 6, 23, 0.34);
    filter: contrast(1.04);
}

.hero-main p {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 700px;
    color: rgba(241, 245, 249, 0.86);
    font-size: 0.98rem;
    line-height: 1.58;
}

.hero-steps {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.hero-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-on-hero);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-step-content {
    min-width: 0;
}

.hero-step-title {
    margin: 0 0 6px;
    color: var(--text-on-hero);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    font-family: var(--font-heading);
}

.hero-step-copy {
    margin: 0;
    color: rgba(241, 245, 249, 0.80);
    font-size: 0.97rem;
    line-height: 1.55;
}

.hero-cta-shell {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 2px;
}

.hero-cta-btn {
    min-width: 220px;
    min-height: 56px;
    padding-inline: 26px;
    border-radius: 18px;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.hero-metrics,
.quick-links,
.upload-row,
.toolbar {
    display: flex;
    flex-wrap: wrap;
}

.hero-metrics {
    position: relative;
    z-index: 1;
    gap: 12px;
    margin-top: 26px;
}

.hero-metric {
    min-width: 150px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--hero-metric-bg);
    border: 1px solid var(--hero-metric-border);
}

.hero-metric-label {
    margin-bottom: 6px;
    color: var(--muted-hero);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-metric-value {
    font-size: 1.2rem;
    font-weight: 800;
}

.hero-side {
    padding: 24px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 32%),
        linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
    border-color: var(--line-soft);
}

:root:not([data-theme="dark"]) .hero-side {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(239, 245, 251, 0.94));
}

.panel-label,
.summary-card-title,
.meta-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.panel-label { margin-bottom: 12px; }

.panel-title,
.upload-title,
.table-title {
    margin: 0 0 10px;
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--text-strong);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.panel-copy,
.upload-subtitle,
.table-subtitle,
.summary-card-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.insight-list {
    margin: 18px 0 0;
    padding-left: 18px;
    color: var(--text);
}

.insight-list li {
    margin-bottom: 12px;
    line-height: 1.55;
}

.upload-box,
.table-shell {
    margin-bottom: 24px;
    padding: 26px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
}

.upload-box {
    background:
        linear-gradient(180deg, var(--surface-strong), var(--surface));
    cursor: pointer;
    margin-bottom: 0;
    border: none;
    backdrop-filter: none;
    box-shadow: none;
    transition: transform 0.22s ease, background 0.22s ease;
    padding: 18px;
}

.upload-box .upload-header {
    gap: 10px;
    margin-bottom: 10px;
}

.upload-box .upload-title {
    margin: 0 0 4px;
}

.upload-box .upload-subtitle {
    margin: 0;
    max-width: 720px;
    font-size: 0.92rem;
    line-height: 1.48;
}

.upload-box .upload-flow,
.upload-box .upload-secondary-flow {
    margin-top: 10px;
}

.upload-box .upload-dropzone {
    padding: 16px 16px;
}

.upload-box .upload-row {
    margin-top: 8px;
}

.upload-box .sample-links,
.upload-box .upload-meta {
    margin-top: 10px;
}

#uploadPanel .collapsible-body-inner {
    overflow: visible;
}

#uploadPanel .upload-box {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at top center, rgba(96, 165, 250, 0.11), transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
        linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 14px 30px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

#uploadPanel .upload-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    pointer-events: none;
}

#uploadPanel .upload-box::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 180px;
    top: -82px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 72%);
    pointer-events: none;
}

#uploadPanel .upload-header {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 0;
}

#uploadPanel .upload-header > div:first-child,
#uploadPanel .demo-cta-shell > div:first-child {
    display: grid;
    gap: 5px;
    min-width: 0;
}

#uploadPanel .upload-title {
    margin: 0;
}

#uploadPanel .upload-subtitle {
    max-width: 680px;
    font-size: 0.89rem;
    line-height: 1.45;
}

#uploadPanel .clear-analysis-form {
    align-self: center;
}

#uploadPanel .upload-flow,
#uploadPanel .upload-secondary-flow {
    margin-top: 4px;
    gap: 8px;
}

#uploadPanel .upload-dropzone {
    gap: 5px;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top center, rgba(96, 165, 250, 0.09), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 24px rgba(15, 23, 42, 0.08);
    position: relative;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#uploadPanel .upload-dropzone:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 14px 28px rgba(15, 23, 42, 0.10);
}

#uploadPanel .upload-box.has-file .upload-dropzone,
#uploadPanel .upload-dropzone.has-file {
    border-color: rgba(96, 165, 250, 0.28);
    background:
        radial-gradient(circle at top center, rgba(96, 165, 250, 0.12), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
}

#uploadPanel .upload-dropzone-kicker {
    margin-bottom: 1px;
    font-size: 0.73rem;
    letter-spacing: 0.16em;
}

#uploadPanel .upload-dropzone-title {
    font-size: 1.02rem;
    line-height: 1.22;
}

#uploadPanel .upload-dropzone-copy {
    max-width: 470px;
    font-size: 0.83rem;
    line-height: 1.42;
}

#uploadPanel .upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#uploadPanel .upload-submit {
    min-width: 156px;
    min-height: 42px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

#uploadPanel .mapping-review-panel {
    margin-top: 8px;
    padding: 14px;
    border-radius: 18px;
}

#uploadPanel .demo-cta-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at left center, rgba(59, 130, 246, 0.08), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, var(--surface-tinted), var(--surface-soft));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#uploadPanel .demo-cta-shell:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 14px 28px rgba(15, 23, 42, 0.09);
}

#uploadPanel .demo-form .upload-step {
    margin-bottom: 2px;
}

#uploadPanel .demo-cta-title {
    font-size: 0.98rem;
}

#uploadPanel .demo-cta-copy {
    max-width: 540px;
    font-size: 0.85rem;
    line-height: 1.42;
}

#uploadPanel .demo-cta-actions {
    justify-content: flex-end;
    gap: 8px;
}

#uploadPanel .demo-btn {
    min-width: 148px;
    min-height: 40px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#uploadPanel .demo-btn:disabled {
    cursor: wait;
    opacity: 0.82;
}

#uploadPanel .demo-note {
    font-size: 0.82rem;
    white-space: nowrap;
}

#uploadPanel .sample-links {
    margin-top: 6px;
    gap: 8px;
}

#uploadPanel .upload-meta {
    align-items: stretch;
    gap: 10px;
    margin-top: 6px;
}

#uploadPanel .meta-item {
    display: grid;
    gap: 5px;
    align-content: start;
    min-height: 0;
    padding: 10px 12px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        linear-gradient(180deg, var(--surface-tinted), var(--surface-soft));
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#uploadPanel .meta-item:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 10px 18px rgba(15, 23, 42, 0.06);
}

#uploadPanel .meta-label {
    margin-bottom: 0;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
}

#uploadPanel .meta-value {
    font-size: 0.84rem;
    line-height: 1.42;
}

#uploadPanel #uploadStatusHost,
#uploadPanel .error-box {
    margin-top: 6px;
}

#uploadPanel .upload-success-row {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(74, 222, 128, 0.16);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.03));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#uploadPanel .upload-success-row span {
    min-width: 0;
    line-height: 1.35;
}

#uploadPanel .upload-success-action {
    min-width: 132px;
    min-height: 38px;
}

.mapping-review-panel {
    margin-top: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-soft));
    box-shadow: var(--shadow-soft);
}

.quote-review-body {
    display: grid;
    gap: 16px;
}

.quote-review-section {
    display: grid;
    gap: 12px;
}

.quote-review-field-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.quote-review-detected-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.quote-compare-shell-fresh {
    margin-top: 18px;
}

.qc2-screen {
    display: grid;
    gap: 10px;
}

.qc2-card,
.qc2-review-panel {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-soft));
    box-shadow: var(--shadow-soft);
}

.qc2-head {
    display: grid;
    gap: 6px;
}

.qc2-head-shell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.qc2-head-copy {
    display: grid;
    gap: 6px;
}

.qc2-head-compact {
    margin-bottom: 6px;
}

.qc2-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.34rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    line-height: 1.14;
}

.qc2-copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.48;
}

.qc2-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.qc2-choice-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.qc2-choice-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.qc2-choice-card-secondary {
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.qc2-choice-title {
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 800;
}

.qc2-choice-copy,
.qc2-upload-copy,
.qc2-result-copy,
.qc2-inline-error {
    color: var(--muted);
    line-height: 1.5;
}

.qc2-upload-shell,
.qc2-actions,
.qc2-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-upload-title,
.qc2-result-title {
    color: var(--text-strong);
    font-weight: 800;
}

.qc2-upload-card {
    display: grid;
    gap: 16px;
}

.qc2-upload-head {
    gap: 10px;
}

.qc2-upload-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.qc2-upload-copy-block,
.qc2-file-meta {
    display: grid;
    gap: 4px;
}

.qc2-upload-title,
.qc2-file-panel-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.qc2-upload-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.42;
}

.qc2-upload-actions,
.qc2-summary-grid,
.qc2-mapping-confirm-grid {
    display: grid;
    gap: 10px;
}

.qc2-upload-actions {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
}

.qc2-hidden-input {
    display: none;
}

.qc2-file-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-soft));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qc2-file-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-file-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.qc2-file-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.qc2-file-name {
    color: var(--text-strong);
    font-weight: 700;
    font-size: 0.92rem;
}

.qc2-upload-footer {
    padding-top: 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.qc2-manual-list,
.qc2-result-table {
    display: grid;
    gap: 10px;
}

.qc2-manual-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.qc2-manual-row.is-incomplete {
    border-color: rgba(245, 158, 11, 0.22);
}

.qc2-manual-row .recipe-field {
    min-width: 0;
}

.qc2-manual-row-main {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.qc2-manual-row-optional {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.qc2-manual-row-optional .recipe-field.is-wide {
    grid-column: span 2;
}

.qc2-manual-row .qc2-manual-date-input,
.qc2-manual-row .recipe-input {
    min-height: 48px;
}

.qc2-manual-date-input {
    appearance: auto;
    -webkit-appearance: auto;
}

.qc2-manual-row-action {
    align-self: end;
    min-height: 48px;
    min-width: 104px;
    margin-top: 22px;
    justify-content: center;
    text-align: center;
}

.qc2-manual-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.qc2-manual-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-manual-actions-group-end {
    margin-left: auto;
}

.qc2-manual-footer-btn {
    min-height: 48px;
    min-width: 132px;
    justify-content: center;
    text-align: center;
}

.qc2-manual-footer-btn-primary {
    min-width: 156px;
}

.qc2-manual-list {
    gap: 12px;
}

.qc2-manual-required {
    color: rgba(147, 197, 253, 0.96);
    font-weight: 800;
}

.qc2-manual-inline-note {
    grid-column: 1 / -1;
    margin-top: 2px;
    color: rgba(191, 219, 254, 0.82);
    font-size: 12px;
    line-height: 1.45;
}

.qc2-manual-review-table-shell {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.38);
}

.qc2-manual-review-table th {
    white-space: nowrap;
}

.qc2-manual-review-table td {
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
}

.qc2-manual-entry-shell {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
    overflow: hidden;
}

.qc2-manual-entry-scroll {
    max-height: 560px;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.qc2-manual-entry-table {
    min-width: 1240px;
    margin: 0;
}

.qc2-manual-entry-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    vertical-align: bottom;
    padding-top: 10px;
    padding-bottom: 10px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
}

.qc2-manual-entry-table tbody tr.is-incomplete {
    background: rgba(245, 158, 11, 0.05);
}

.qc2-manual-entry-table td,
.qc2-manual-entry-table th {
    white-space: nowrap;
}

.qc2-manual-entry-head-label,
.qc2-manual-entry-head-badge {
    display: block;
}

.qc2-manual-entry-head-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(248, 250, 252, 0.96);
}

.qc2-manual-entry-head-badge {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.78);
}

.qc2-manual-entry-table th.is-optional .qc2-manual-entry-head-badge {
    color: rgba(148, 163, 184, 0.88);
}

.qc2-manual-entry-cell {
    display: block;
    min-width: 0;
}

.qc2-manual-entry-mobile-label {
    display: none;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.88);
}

.qc2-manual-entry-input {
    min-width: 104px;
    min-height: 42px;
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.qc2-manual-entry-input:hover {
    border-color: rgba(148, 163, 184, 0.32);
}

.qc2-manual-entry-input:focus,
.qc2-manual-entry-input:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.qc2-manual-entry-input:not(.is-invalid):not([aria-invalid="true"]):invalid {
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

.qc2-manual-entry-input.is-invalid,
.qc2-manual-entry-input[aria-invalid="true"] {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.16);
}

.qc2-manual-entry-row-index {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    font-weight: 700;
    color: rgba(191, 219, 254, 0.84);
}

.qc2-manual-entry-row-actions {
    min-width: 136px;
    white-space: normal;
}

.qc2-manual-entry-row-actions .qc2-remove-row {
    width: 100%;
    justify-content: center;
}

.qc2-manual-entry-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 14px;
    color: rgba(203, 213, 225, 0.84);
    font-size: 12px;
    line-height: 1.45;
}

.qc2-manual-entry-legend strong {
    color: rgba(248, 250, 252, 0.96);
}

.qc2-review-field-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qc2-detected-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-strong);
    font-size: 11px;
    font-weight: 800;
}

.qc2-optional-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text-strong);
    font-size: 11px;
    font-weight: 800;
}

.qc2-inline-error {
    color: #b91c1c;
    font-size: 10px;
    font-weight: 700;
}

.qc2-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.qc2-mapping-confirm-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.qc2-mapping-confirm-item {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.qc2-mapping-confirm-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.qc2-mapping-confirm-value {
    color: var(--text-strong);
    font-weight: 800;
}

.qc2-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.qc2-result-metric {
    text-align: right;
}

.qc2-trend-list,
.qc2-analysis-table {
    display: grid;
    gap: 14px;
}

.qc2-trend-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-collapse-btn {
    min-width: 84px;
}

.qc2-history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.qc2-history-combobox {
    position: relative;
}

.qc2-history-combobox-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
}

.qc2-history-combobox-trigger.has-value {
    color: var(--text-strong);
}

.qc2-history-combobox-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qc2-history-combobox-value.is-placeholder {
    color: var(--muted);
    font-weight: 500;
}

.qc2-history-combobox-caret {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.72;
}

.qc2-history-combobox.is-open .qc2-history-combobox-caret {
    transform: rotate(-135deg) translateY(-1px);
}

.qc2-history-combobox-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.32);
}

.qc2-history-combobox-panel[hidden] {
    display: none !important;
}

.qc2-history-combobox-search-shell {
    position: relative;
}

.qc2-history-combobox-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(68, 136, 240, 0.35);
    background: rgba(20, 35, 58, 0.95);
    color: var(--text-strong);
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    outline: none;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.qc2-history-combobox-search::placeholder {
    color: var(--muted);
    font-weight: 500;
}

.qc2-history-combobox-search:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.qc2-history-combobox-options {
    display: grid;
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
    padding: 2px 4px 2px 0;
}

.qc2-history-combobox-option {
    width: 100%;
    box-sizing: border-box;
    display: block;
    padding: 8px 12px;
    margin: 0 0 4px 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-strong);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.qc2-history-combobox-option:hover,
.qc2-history-combobox-option:focus-visible {
    outline: none;
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(59, 130, 246, 0.16);
    color: var(--text-strong);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.qc2-history-combobox-option.is-selected {
    border-color: rgba(96, 165, 250, 0.34);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.24), rgba(30, 64, 175, 0.18));
    color: #e8f1ff;
}

.qc2-history-combobox-option.is-clear {
    color: var(--muted);
}

.qc2-history-combobox-empty {
    padding: 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.48);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.qc2-trend-value {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.qc2-trend-meta {
    color: var(--muted);
    line-height: 1.5;
}

.qc2-summary-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.qc2-summary-grid-hero {
    gap: 10px;
    margin-bottom: 10px;
}

.qc2-summary-card-compact {
    min-height: 0;
}

.qc2-summary-grid-hero .qc2-summary-card-compact {
    min-height: 142px;
    padding: 17px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(20, 32, 54, 0.98), rgba(10, 18, 32, 0.98));
    border: 1px solid rgba(96, 165, 250, 0.14);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
    min-width: 0;
    overflow: hidden;
}

.qc2-summary-grid-hero .qc2-summary-card-compact.is-savings {
    background: linear-gradient(135deg, rgba(10, 72, 58, 0.96), rgba(9, 43, 34, 0.98));
    border-color: rgba(52, 211, 153, 0.24);
}

.qc2-summary-grid-hero .summary-card-title {
    color: rgba(191, 219, 254, 0.78);
}

.qc2-summary-grid-hero .summary-card-value.compact {
    font-size: clamp(1.84rem, 2.7vw, 2.55rem);
    line-height: 1;
    color: #f8fafc;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.qc2-summary-grid-hero .summary-card-insight {
    color: rgba(219, 234, 254, 0.82);
    min-width: 0;
    overflow-wrap: anywhere;
}

.qc2-summary-grid-hero .qc2-summary-card-compact.is-savings .summary-card-value.compact {
    font-size: clamp(1.48rem, 2.15vw, 2.18rem);
}

.qc2-screen-analyze .qc2-title {
    font-size: 1.42rem;
    line-height: 1.12;
}

.qc2-screen-analyze .qc2-copy,
.qc2-screen-analyze .mapping-section-copy,
.qc2-screen-analyze .summary-card-insight,
.qc2-screen-analyze .qc2-spotlight-meta,
.qc2-screen-analyze .qc2-best-copy,
.qc2-screen-analyze .qc2-analysis-sub,
.qc2-screen-analyze .qc2-analysis-detail-value,
.qc2-screen-analyze .qc2-analysis-detail-note {
    font-size: 0.8rem;
    line-height: 1.38;
}

.qc2-screen-analyze .mapping-section-title,
.qc2-screen-analyze .qc2-spotlight-title,
.qc2-screen-analyze .qc2-best-title,
.qc2-screen-analyze .qc2-analysis-product,
.qc2-screen-analyze .qc2-analysis-value {
    font-size: 0.9rem;
    line-height: 1.18;
}

.qc2-screen-analyze .qc2-analysis-table-head {
    font-size: 9px;
    letter-spacing: 0.14em;
}

.qc2-screen-analyze .qc2-mode-switch-btn,
.qc2-screen-analyze .qc2-spotlight-badge,
.qc2-screen-analyze .qc2-spotlight-label,
.qc2-screen-analyze .qc2-result-v2__badge,
.qc2-screen-analyze .qc2-collapsible-summary-action,
.qc2-screen-analyze .qc2-collapsible-summary-copy {
    font-size: 10px;
}

.qc2-analyze-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.qc2-analyze-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2px;
    margin-bottom: 6px;
}

.qc2-analyze-tab {
    min-height: 38px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(24, 39, 63, 0.84), rgba(15, 23, 42, 0.9));
    color: rgba(219, 234, 254, 0.82);
}

.qc2-analyze-tab.active-tab {
    border-color: rgba(59, 130, 246, 0.28);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.92));
    color: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(96, 165, 250, 0.14);
}

.qc2-analyze-tab-panels {
    display: grid;
    gap: 6px;
    min-height: 0;
}

.qc2-analyze-tab-panel {
    display: none;
    min-height: 0;
}

.qc2-analyze-tab-panel.active-tab {
    display: grid;
    align-content: start;
    min-height: 0;
}

.qc2-mode-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background: linear-gradient(180deg, rgba(24, 39, 63, 0.88), rgba(15, 23, 42, 0.92));
    color: #dbeafe;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
}

.qc2-analyze-head,
.qc2-history-card {
    display: grid;
    gap: 10px;
}

.qc2-analysis-block {
    display: grid;
    gap: 16px;
    min-height: 0;
}

.qc2-analysis-block-primary,
.qc2-analysis-block-secondary,
.qc2-analysis-block-advanced {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 18, 32, 0.98));
}

.qc2-analysis-block-advanced {
    gap: 14px;
    padding: 24px;
    margin-top: 6px;
    border-color: rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(18, 29, 49, 0.98), rgba(9, 17, 31, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(2, 6, 23, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.qc2-analysis-block-advanced:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 46px rgba(2, 6, 23, 0.26), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.qc2-analysis-block-primary {
    gap: 16px;
    padding: 18px;
}


.qc2-analysis-block-primary:not(.is-collapsed) {
    gap: 14px;
    padding: 18px 18px 16px;
    margin-top: 2px;
    border-color: rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(18, 29, 49, 0.98), rgba(9, 17, 31, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(2, 6, 23, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.qc2-analysis-block-primary:not(.is-collapsed):hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 46px rgba(2, 6, 23, 0.26), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.qc2-analysis-block-primary.is-collapsed {
    gap: 0;
    padding: 24px;
    margin-top: 6px;
    border-color: rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(18, 29, 49, 0.98), rgba(9, 17, 31, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(2, 6, 23, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.qc2-analysis-block-primary.is-collapsed:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 22px 46px rgba(2, 6, 23, 0.26), 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.qc2-analysis-block-primary .mapping-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.12);
}

.qc2-analysis-block-primary .mapping-section-head > div:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.qc2-analysis-block-primary .mapping-section-title {
    line-height: 1.1;
}

.qc2-analysis-block-primary .mapping-section-copy {
    max-width: 680px;
    color: rgba(191, 219, 254, 0.78);
}

.qc2-analysis-block-primary.is-collapsed .mapping-section-title,
.qc2-analysis-block-primary.is-collapsed .qc2-collapsible-summary-copy {
    display: block;
}

.qc2-analysis-section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.qc2-section-action-btn {
    min-height: 36px;
}

.qc2-analysis-block-primary .qc2-section-action-btn {
    min-height: 38px;
    padding-inline: 13px;
    border-color: rgba(59, 130, 246, 0.26);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.94), rgba(29, 78, 216, 0.96));
    color: #eff6ff;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.qc2-analysis-block-primary .qc2-section-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.42);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(96, 165, 250, 0.14);
    filter: brightness(1.03);
}

.qc2-analysis-block-primary .qc2-section-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.24), 0 16px 28px rgba(37, 99, 235, 0.28);
}

.qc2-analysis-block-advanced .qc2-section-action-btn {
    min-height: 42px;
    padding-inline: 16px;
    border-color: rgba(59, 130, 246, 0.26);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.94), rgba(29, 78, 216, 0.96));
    color: #eff6ff;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.qc2-analysis-block-advanced .qc2-section-action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.42);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(96, 165, 250, 0.14);
    filter: brightness(1.03);
}

.qc2-analysis-block-advanced .qc2-section-action-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.24), 0 16px 28px rgba(37, 99, 235, 0.28);
}

.qc2-section-summary-btn {
    align-items: center;
}

.qc2-analysis-block-primary.is-collapsed .qc2-section-summary-btn {
    width: 100%;
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

.qc2-analysis-block-primary.is-collapsed .qc2-section-summary-btn > span:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.qc2-analysis-block-primary.is-collapsed .qc2-collapsible-summary-copy {
    max-width: 680px;
    color: rgba(191, 219, 254, 0.78);
}

.qc2-analysis-block-primary.is-collapsed .qc2-collapsible-summary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding-inline: 16px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.26);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.94), rgba(29, 78, 216, 0.96));
    color: #eff6ff;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.qc2-analysis-block-primary.is-collapsed .qc2-section-summary-btn:hover .qc2-collapsible-summary-action {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.42);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(96, 165, 250, 0.14);
    filter: brightness(1.03);
}

.qc2-analysis-table-headbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 0 2px 16px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.14);
}

.qc2-analysis-table-headbar > div:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.qc2-analysis-block-advanced .mapping-section-title {
    line-height: 1.1;
}

.qc2-analysis-block-advanced .mapping-section-copy {
    max-width: 680px;
    color: rgba(191, 219, 254, 0.78);
    font-size: 0.78rem;
    line-height: 1.32;
}

.qc2-analysis-table-frame {
    width: min(100%, 1480px);
    margin: 12px auto 0;
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.05), transparent 30%),
        linear-gradient(180deg, rgba(12, 20, 35, 0.98), rgba(8, 15, 28, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 22px 42px rgba(2, 6, 23, 0.22);
    min-height: 0;
    max-height: 460px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.qc2-analysis-table-frame.is-active,
.qc2-analysis-table-frame:focus-within {
    border-color: rgba(251, 191, 36, 0.28);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(12, 20, 35, 0.98), rgba(8, 15, 28, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 24px 48px rgba(2, 6, 23, 0.26),
        0 0 0 1px rgba(251, 191, 36, 0.08),
        0 0 28px rgba(251, 191, 36, 0.08);
}

.qc2-analysis-table-scroll {
    min-height: 0;
    max-height: 436px;
    padding-right: 14px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 20px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    cursor: grab;
}

.qc2-analysis-table-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.qc2-analysis-table-scroll.is-dragging * {
    cursor: grabbing;
    user-select: none;
}

.qc2-analysis-filterbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: center;
    gap: 16px;
    width: min(100%, 1480px);
    margin: 14px auto 0;
    padding: 0 2px;
}

.qc2-analysis-filter-scope {
    grid-column: 1 / -1;
    color: rgba(191, 219, 254, 0.82);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.recipes-view-hero .panel-copy {
    margin-top: 10px;
    max-width: 760px;
}

.recipes-view-hero .recipes-library-open-btn {
    min-height: 50px;
    padding-inline: 24px;
    flex-shrink: 0;
}

.qc2-analysis-filterbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qc2-analysis-filter-btn {
    min-height: 32px;
    padding: 0 12px;
    font-size: 10px;
    border-color: rgba(96, 165, 250, 0.14);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.qc2-analysis-filter-btn[data-filter-value="savings-available"] {
    border-color: rgba(251, 191, 36, 0.22);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.qc2-analysis-filter-btn[data-filter-value="already-best"] {
    border-color: rgba(16, 185, 129, 0.24);
    background: rgba(16, 185, 129, 0.08);
    color: #99f6e4;
}

.qc2-analysis-filter-btn[data-filter-value="no-unit-advantage"] {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(148, 163, 184, 0.08);
    color: #dbeafe;
}

.qc2-analysis-filter-btn.is-active {
    border-width: 1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(96, 165, 250, 0.24);
    color: #eff6ff;
}

#qcTabFullTable .qc2-analysis-filter-btn {
    position: relative;
    min-height: 36px;
    padding-inline: 14px;
    border-color: rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(20, 33, 54, 0.94), rgba(13, 23, 39, 0.96));
    color: rgba(226, 232, 240, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#qcTabFullTable .qc2-analysis-filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 167, 255, 0.28);
    color: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 20px rgba(2, 6, 23, 0.18);
}

#qcTabFullTable .qc2-analysis-filter-btn.is-active {
    border-color: rgba(125, 167, 255, 0.46);
    color: #f8fbff;
    text-shadow: 0 0 10px rgba(191, 219, 254, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(191, 219, 254, 0.1),
        0 0 0 1px rgba(96, 165, 250, 0.24),
        0 14px 26px rgba(2, 6, 23, 0.22);
}

#qcTabFullTable .qc2-analysis-filter-btn[data-filter-value="all"].is-active {
    border-color: rgba(96, 165, 250, 0.34);
    background:
        linear-gradient(180deg, rgba(52, 93, 173, 0.22), rgba(17, 29, 48, 0.96)),
        linear-gradient(180deg, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.92));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(191, 219, 254, 0.08),
        0 0 0 1px rgba(96, 165, 250, 0.24),
        0 0 22px rgba(96, 165, 250, 0.12);
}

#qcTabFullTable .qc2-analysis-filter-btn[data-filter-value="pricing-opportunities"].is-active {
    border-color: rgba(125, 167, 255, 0.5);
    background:
        radial-gradient(circle at top center, rgba(96, 165, 250, 0.16), transparent 72%),
        linear-gradient(180deg, rgba(38, 70, 124, 0.34), rgba(15, 27, 46, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 0 1px rgba(191, 219, 254, 0.1),
        0 0 0 1px rgba(96, 165, 250, 0.3),
        0 0 24px rgba(96, 165, 250, 0.16);
}

#qcTabFullTable .qc2-analysis-filter-btn[data-filter-value="no-immediate-action"].is-active {
    border-color: rgba(148, 163, 184, 0.42);
    background:
        linear-gradient(180deg, rgba(71, 85, 105, 0.3), rgba(15, 23, 42, 0.96)),
        linear-gradient(180deg, rgba(100, 116, 139, 0.16), rgba(12, 20, 35, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(226, 232, 240, 0.06),
        0 0 0 1px rgba(148, 163, 184, 0.18),
        0 10px 22px rgba(2, 6, 23, 0.18);
}

#qcTabFullTable .qc2-analysis-filter-btn .qc2-analysis-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 20px;
    padding-inline: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: rgba(226, 232, 240, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#qcTabFullTable .qc2-analysis-filter-btn.is-active .qc2-analysis-filter-count {
    background: rgba(191, 219, 254, 0.12);
    color: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(191, 219, 254, 0.12);
}

.qc2-analysis-filter-count {
    margin-left: 6px;
    color: rgba(191, 219, 254, 0.78);
}

.qc2-analysis-search-shell {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: min(100%, 360px);
    min-height: 50px;
    padding: 6px 6px 6px 16px;
    border-radius: 18px;
    border-color: rgba(96, 165, 250, 0.22);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 52%),
        linear-gradient(180deg, rgba(17, 28, 47, 0.98), rgba(9, 16, 30, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 16px 28px rgba(2, 6, 23, 0.24);
    cursor: text;
}

.qc2-analysis-search-shell:hover {
    border-color: rgba(96, 165, 250, 0.3);
    background: linear-gradient(180deg, rgba(20, 33, 55, 0.98), rgba(11, 19, 34, 0.99));
}

.qc2-analysis-search-shell:focus-within {
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 16px 32px rgba(2, 6, 23, 0.28);
}

.qc2-analysis-search-input {
    min-height: 38px;
    color: #f8fafc;
    font-size: 12.5px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.qc2-analysis-search-input::placeholder {
    color: rgba(191, 219, 254, 0.64);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.qc2-analysis-search-button {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.38);
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 12px 24px rgba(37, 99, 235, 0.24);
    color: #f8fafc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
}

.qc2-analysis-search-clear {
    min-height: 38px;
    min-width: 38px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(15, 23, 42, 0.62);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qc2-analysis-search-clear[hidden] {
    display: none;
}

.qc2-analysis-search-export {
    min-height: 38px;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .qc2-analysis-filterbar {
        grid-template-columns: 1fr;
    }
}

.qc2-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 16px;
    align-items: start;
}

.qc2-spotlight-panel {
    display: grid;
    gap: 12px;
    padding: 2px;
    border-radius: 20px;
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
    overflow: hidden;
}

.qc2-spotlight-panel-scroll {
    min-height: 0;
    max-height: min(82vh, 1180px);
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 18px;
    padding-right: 4px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.qc2-spotlight-card {
    display: grid;
    grid-template-rows: auto minmax(132px, 1fr) auto auto auto;
    align-content: start;
    gap: 12px;
    height: 100%;
    min-height: 336px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid var(--qc2-card-border, rgba(96, 165, 250, 0.12));
    background: linear-gradient(180deg, rgba(24, 39, 63, 0.94), rgba(15, 23, 42, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    min-width: 0;
}

.qc2-spotlight-card.is-active-card {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(147, 197, 253, 0.28), 0 18px 42px rgba(37, 99, 235, 0.18);
}

.qc2-spotlight-loadmore {
    display: flex;
    justify-content: center;
    padding: 14px 0 4px;
}

.qc2-spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(90deg, transparent, var(--qc2-card-border, rgba(96, 165, 250, 0.22)), transparent);
}

.qc2-spotlight-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 22px 44px var(--qc2-card-glow, rgba(59, 130, 246, 0.10));
    pointer-events: none;
}

.qc2-spotlight-card.is-expanded .qc2-spotlight-detail {
    display: grid;
}

.qc2-spotlight-card-head,
.qc2-spotlight-savings-row,
.qc2-collapsible-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.qc2-spotlight-card-head > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.qc2-spotlight-title {
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.18;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-meta,
.qc2-best-copy,
.qc2-collapsible-summary-copy,
.qc2-collapsible-summary-action {
    color: rgba(191, 219, 254, 0.78);
    line-height: 1.2;
}

.qc2-spotlight-meta {
    font-size: 0.8rem;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--qc2-card-badge-bg, rgba(59, 130, 246, 0.14));
    border: 1px solid var(--qc2-card-border, rgba(96, 165, 250, 0.18));
    color: var(--qc2-card-badge-text, #dbeafe);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    max-width: 100%;
}

.qc2-spotlight-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    height: 100%;
    min-width: 0;
}

.qc2-spotlight-lane {
    display: grid;
    gap: 6px;
    padding: 11px;
    border-radius: 18px;
    border: 1px solid var(--qc2-card-lane-border, rgba(148, 163, 184, 0.14));
    background: rgba(15, 23, 42, 0.68);
    align-content: start;
    min-width: 0;
    overflow: hidden;
}

.qc2-spotlight-lane.is-best {
    border-color: var(--qc2-card-best-border, rgba(52, 211, 153, 0.22));
    background: linear-gradient(180deg, var(--qc2-card-glow, rgba(6, 78, 59, 0.22)), rgba(15, 23, 42, 0.7));
}

.qc2-spotlight-label {
    color: rgba(191, 219, 254, 0.68);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.1;
}

.qc2-spotlight-supplier,
.qc2-best-title {
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.18;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-value,
.qc2-spotlight-savings-value {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.08;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.qc2-spotlight-arrow {
    display: grid;
    place-items: center;
    color: #93c5fd;
    font-size: 1rem;
    font-weight: 900;
    align-self: center;
}

.qc2-spotlight-savings-copy {
    color: var(--qc2-card-savings-text, #86efac);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-potential {
    display: grid;
    gap: 2px;
    margin-top: 4px;
}

.qc2-spotlight-potential-label {
    color: rgba(191, 219, 254, 0.68);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.qc2-spotlight-potential-value {
    color: rgba(239, 246, 255, 0.96);
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.12;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.qc2-spotlight-potential-note {
    margin-top: 2px;
    color: rgba(148, 163, 184, 0.88);
    font-size: 9px;
    line-height: 1.28;
    font-weight: 600;
}

.qc2-spotlight-savings-row > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.qc2-spotlight-savings-row > div:first-child {
    min-width: 148px;
}

.qc2-spotlight-savings-row {
    margin-top: auto;
    align-items: flex-end;
    min-width: 0;
}

.qc2-spotlight-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.qc2-spotlight-decision {
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--qc2-card-decision-bg, linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(15, 23, 42, 0.72)));
    border: 1px solid var(--qc2-card-decision-border, rgba(52, 211, 153, 0.16));
    color: #dcfce7;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.28;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-decision.is-neutral {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.82));
    border-color: rgba(148, 163, 184, 0.16);
    color: #dbeafe;
}

.qc2-spotlight-detail {
    display: none;
    padding-top: 2px;
}

.qc2-spotlight-card.is-expanded {
    min-height: 0;
    border-color: rgba(96, 165, 250, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(96, 165, 250, 0.14);
}

.qc2-spotlight-detail-shell {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(10, 18, 32, 0.96), rgba(8, 15, 28, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.qc2-spotlight-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
    min-width: 0;
}

.qc2-spotlight-detail-group {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.08);
    background: linear-gradient(180deg, rgba(20, 32, 54, 0.86), rgba(13, 22, 38, 0.92));
    min-width: 0;
    overflow: hidden;
}

.qc2-spotlight-detail-group.is-highlighted {
    border-color: rgba(59, 130, 246, 0.18);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.16), rgba(15, 23, 42, 0.92));
}

.qc2-spotlight-detail-group-snapshot {
    padding: 13px 14px;
}

.qc2-spotlight-detail-group-snapshot .qc2-spotlight-detail-group-title {
    margin-bottom: 2px;
}

.qc2-spotlight-detail-group-snapshot .qc2-spotlight-detail-table {
    width: 100%;
    gap: 6px;
}

.qc2-spotlight-detail-group-snapshot .qc2-spotlight-detail-row {
    grid-template-columns: minmax(104px, 120px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 0;
}

.qc2-spotlight-detail-group-snapshot .qc2-spotlight-detail-label {
    text-align: left;
    justify-self: start;
}

.qc2-spotlight-detail-group-snapshot .qc2-spotlight-detail-value {
    text-align: left;
    justify-self: start;
}

.qc2-spotlight-detail-group-title {
    color: #dbeafe;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.1;
}

.qc2-spotlight-detail-table {
    display: grid;
    gap: 2px;
}

.qc2-spotlight-detail-row {
    display: grid;
    grid-template-columns: minmax(74px, 92px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 5px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    min-width: 0;
}

.qc2-spotlight-detail-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.qc2-spotlight-detail-label {
    color: rgba(191, 219, 254, 0.6);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    min-width: 0;
}

.qc2-spotlight-detail-value,
.qc2-spotlight-detail-note {
    color: #e2e8f0;
    font-size: 10px;
    line-height: 1.22;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.qc2-spotlight-detail-group-notes {
    grid-column: 1 / -1;
    min-width: 0;
}

.qc2-spotlight-detail-note {
    padding-top: 2px;
}

.qc2-collapsible-summary {
    width: 100%;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: linear-gradient(180deg, rgba(24, 39, 63, 0.88), rgba(15, 23, 42, 0.94));
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.qc2-collapsible-summary-action {
    font-weight: 800;
    line-height: 1.1;
    flex-shrink: 0;
}

.qc2-best-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 14px;
    align-items: start;
}

.qc2-best-panel {
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(8, 15, 28, 0.99));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qc2-best-panel-scroll {
    min-height: min(180px, 24vh);
    max-height: min(70vh, 820px);
    overflow-y: auto;
    overflow-x: visible;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border-radius: 18px;
    padding-right: 0;
}

.qc2-best-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--qc2-best-card-border, rgba(148, 163, 184, 0.14));
    background: linear-gradient(180deg, rgba(19, 78, 74, 0.18), rgba(15, 23, 42, 0.86));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 16px 36px var(--qc2-best-card-glow, rgba(59, 130, 246, 0.08));
    position: relative;
    min-height: 108px;
}

.qc2-best-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg, transparent, var(--qc2-best-card-border, rgba(96, 165, 250, 0.24)), transparent);
}

.qc2-best-card::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--qc2-best-card-accent, rgba(59, 130, 246, 0.16));
    box-shadow: 0 0 0 1px var(--qc2-best-card-border, rgba(96, 165, 250, 0.24));
    pointer-events: none;
}

.qc2-best-title {
    color: var(--qc2-best-card-text, #f8fafc);
}

.qc2-analysis-table {
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background:
        linear-gradient(180deg, rgba(19, 31, 52, 0.98), rgba(11, 18, 32, 0.99));
    overflow: visible;
    min-width: 1560px;
    width: 100%;
    font-size: 11px;
    gap: 0;
}

.qc2-analysis-table-head,
.qc2-analysis-row-main {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.5fr)
        minmax(170px, 1.02fr)
        minmax(132px, 0.8fr)
        minmax(170px, 1.02fr)
        minmax(132px, 0.8fr)
        minmax(156px, 0.9fr)
        minmax(180px, 0.92fr)
        248px;
    gap: 14px;
    align-items: center;
}

.qc2-analysis-table-head {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.12);
    background:
        linear-gradient(180deg, rgba(33, 50, 78, 0.98), rgba(18, 30, 50, 0.98));
    color: rgba(239, 246, 255, 0.82);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 26px rgba(2, 6, 23, 0.2);
}

.qc2-analysis-table-head span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding-inline: 6px;
    white-space: nowrap;
}

.qc2-analysis-table-head span:first-child {
    position: sticky;
    left: 0;
    z-index: 21;
    margin-left: -20px;
    padding-left: 28px;
    padding-right: 14px;
    background: linear-gradient(180deg, rgba(33, 50, 78, 0.98), rgba(18, 30, 50, 0.98));
    box-shadow: 16px 0 22px -16px rgba(2, 6, 23, 0.95), 1px 0 0 rgba(251, 191, 36, 0.16);
}

.qc2-analysis-table-head span:nth-child(5),
.qc2-analysis-table-head span:nth-child(6) {
    justify-content: flex-end;
    text-align: right;
}

.qc2-analysis-table-head span:nth-child(3) {
    justify-content: flex-start;
    text-align: left;
}

.qc2-analysis-table-head span:nth-child(7),
.qc2-analysis-table-head span:nth-child(8) {
    justify-content: center;
    text-align: center;
}

.qc2-analysis-table-head span:last-child {
    width: 248px;
    min-width: 248px;
    max-width: 248px;
    padding-inline: 8px 16px;
}

.qc2-analysis-row {
    border-bottom: 1px solid rgba(96, 165, 250, 0.08);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(12, 20, 35, 0.9));
    transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.qc2-analysis-row:nth-child(even) {
    background: linear-gradient(180deg, rgba(19, 31, 52, 0.92), rgba(13, 22, 38, 0.94));
}

.qc2-analysis-row:hover {
    background: linear-gradient(180deg, rgba(26, 42, 69, 0.98), rgba(18, 30, 50, 0.98));
    box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.16);
}

.qc2-analysis-row.is-selected {
    border-bottom-color: rgba(96, 165, 250, 0.24);
    background:
        linear-gradient(180deg, rgba(21, 38, 68, 0.98), rgba(16, 28, 50, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        inset 0 0 0 1px rgba(96, 165, 250, 0.2),
        inset 0 0 28px rgba(37, 99, 235, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.qc2-analysis-row:last-child {
    border-bottom: none;
}

.qc2-analysis-row.is-expanded {
    margin-block: 8px;
    background: linear-gradient(180deg, rgba(27, 46, 77, 0.98), rgba(16, 30, 51, 0.98));
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2), 0 0 0 1px rgba(96, 165, 250, 0.12);
}

.qc2-analysis-row.is-selected.is-expanded {
    background:
        linear-gradient(180deg, rgba(26, 44, 78, 0.98), rgba(17, 31, 56, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        inset 0 0 0 1px rgba(96, 165, 250, 0.24),
        inset 0 0 28px rgba(37, 99, 235, 0.08),
        0 0 0 1px rgba(96, 165, 250, 0.12);
}

.qc2-analysis-table-optimize .qc2-analysis-table-head,
.qc2-analysis-row-main-optimize {
    grid-template-columns:
        minmax(220px, 1.45fr)
        minmax(180px, 1.08fr)
        minmax(120px, 0.82fr)
        minmax(96px, 0.64fr)
        minmax(130px, 0.84fr)
        minmax(100px, 0.66fr)
        minmax(120px, 0.82fr)
        minmax(136px, 0.74fr);
}

.qc2-analysis-row-main {
    padding: 14px 20px;
    min-height: 72px;
    overflow: visible;
}

.qc2-analysis-cell {
    min-width: 0;
    display: grid;
    gap: 4px;
    align-content: center;
    padding-inline: 6px;
}

.qc2-analysis-cell-expand {
    display: grid;
    align-content: center;
    justify-items: center;
    align-self: stretch;
    gap: 8px;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    padding: 6px 12px;
    box-sizing: border-box;
    overflow: visible;
}

.qc2-analysis-cell-expand.single-action {
    justify-items: center;
}

.qc2-analysis-cell-expand .qc2-collapse-btn {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    height: 36px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    justify-content: center;
}

.qc2-analysis-cell-expand .qc2-collapse-btn:hover,
.qc2-analysis-cell-expand .qc2-collapse-btn:focus-visible {
    z-index: 2;
}

.qc2-analysis-cell-price,
.qc2-analysis-cell-savings {
    justify-items: end;
    text-align: right;
    padding-inline: 4px 10px;
}

.qc2-analysis-row-main .qc2-analysis-cell-price:nth-child(3) {
    justify-items: start;
    text-align: left;
    padding-inline: 6px;
}

.qc2-analysis-cell-result {
    justify-items: center;
    padding-inline: 8px;
}

.qc2-analysis-cell-product {
    position: sticky;
    left: 0;
    z-index: 5;
    margin-left: -20px;
    padding-left: 28px;
    padding-right: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(12, 20, 35, 0.98));
    box-shadow: 16px 0 22px -16px rgba(2, 6, 23, 0.92), 1px 0 0 rgba(96, 165, 250, 0.1);
}

.qc2-analysis-row:nth-child(even) .qc2-analysis-cell-product {
    background: linear-gradient(180deg, rgba(19, 31, 52, 0.98), rgba(13, 22, 38, 0.98));
}

.qc2-analysis-row:hover .qc2-analysis-cell-product {
    background: linear-gradient(180deg, rgba(26, 42, 69, 0.98), rgba(18, 30, 50, 0.98));
}

.qc2-analysis-row.is-selected .qc2-analysis-cell-product {
    background:
        linear-gradient(180deg, rgba(21, 38, 68, 0.98), rgba(16, 28, 50, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        16px 0 22px -16px rgba(2, 6, 23, 0.95),
        1px 0 0 rgba(96, 165, 250, 0.24);
}

.qc2-analysis-row.is-expanded .qc2-analysis-cell-product {
    background: linear-gradient(180deg, rgba(27, 46, 77, 0.98), rgba(16, 30, 51, 0.98));
}

.qc2-analysis-row.is-selected.is-expanded .qc2-analysis-cell-product {
    background:
        linear-gradient(180deg, rgba(26, 44, 78, 0.98), rgba(17, 31, 56, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        16px 0 22px -16px rgba(2, 6, 23, 0.95),
        1px 0 0 rgba(96, 165, 250, 0.24);
}

.qc2-analysis-history-btn {
    min-width: 92px;
    padding-inline: 12px;
}

.qc2-analysis-product {
    color: #f8fafc;
    font-weight: 900;
    font-size: 13px;
    line-height: 1.22;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc2-analysis-value {
    color: rgba(241, 245, 249, 0.96);
    font-weight: 800;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc2-analysis-supplier {
    color: rgba(226, 232, 240, 0.92);
}

.qc2-analysis-price {
    color: #fefce8;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.qc2-analysis-sub {
    margin-top: 0;
    color: rgba(191, 219, 254, 0.64);
    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qc2-analysis-savings {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.12), rgba(120, 53, 15, 0.08));
    color: #fde68a;
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.05), 0 0 12px rgba(251, 191, 36, 0.06);
    animation: none;
}

.qc2-analysis-savings.is-neutral {
    min-height: 24px;
    padding: 0 10px;
    border-color: rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.42));
    color: rgba(203, 213, 225, 0.9);
    font-size: 10px;
    font-weight: 800;
    box-shadow: none;
    animation: none;
}

.qc2-analysis-neutral-value {
    color: rgba(148, 163, 184, 0.88);
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.qc2-analysis-row.is-filter-hidden {
    display: none;
}

#qcTabFullTable .qc2-analysis-table {
    --qc2-full-table-columns:
        minmax(240px, 1.55fr)
        minmax(185px, 1.02fr)
        minmax(200px, 1.04fr)
        minmax(185px, 1.02fr)
        minmax(200px, 1.04fr)
        minmax(180px, 0.82fr)
        minmax(210px, 0.94fr)
        minmax(185px, 0.84fr);
    --qc2-full-table-gap: 10px;
    --qc2-full-table-cell-x: 14px;
    --qc2-full-table-primary-size: 12.5px;
    --qc2-full-table-primary-line: 1.32;
    --qc2-full-table-primary-weight: 800;
    --qc2-full-table-secondary-size: 9.5px;
    --qc2-full-table-secondary-line: 1.38;
    --qc2-full-table-secondary-weight: 600;
    font-size: 11px;
    min-width: 1760px;
}

#qcTabFullTable .qc2-analysis-table-head,
#qcTabFullTable .qc2-analysis-row-main {
    gap: var(--qc2-full-table-gap);
    grid-template-columns: var(--qc2-full-table-columns);
}

#qcTabFullTable .qc2-analysis-table-head {
    padding: 14px 18px;
    font-size: 8.5px;
    letter-spacing: 0.12em;
    align-items: center;
}

#qcTabFullTable .qc2-analysis-table-head span {
    min-width: 0;
    min-height: 24px;
    padding-inline: var(--qc2-full-table-cell-x);
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    justify-content: flex-start;
    text-align: left;
}

#qcTabFullTable .qc2-analysis-table-head span:last-child {
    width: auto;
    min-width: 0;
    max-width: none;
    padding-inline: 10px;
    justify-content: center;
    text-align: center;
}

#qcTabFullTable .qc2-analysis-table-head span:first-child {
    margin-left: -18px;
    padding-left: 26px;
    padding-right: 12px;
}

#qcTabFullTable .qc2-analysis-row-main {
    padding: 14px 18px;
    min-height: 76px;
    align-items: stretch;
}

#qcTabFullTable .qc2-analysis-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding-inline: var(--qc2-full-table-cell-x);
    overflow: hidden;
}

#qcTabFullTable .qc2-analysis-cell > * {
    min-width: 0;
    max-width: 100%;
}

#qcTabFullTable .qc2-analysis-text-stack,
#qcTabFullTable .qc2-analysis-price-stack {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

#qcTabFullTable .qc2-analysis-cell-product,
#qcTabFullTable .qc2-analysis-cell-supplier,
#qcTabFullTable .qc2-analysis-cell-price,
#qcTabFullTable .qc2-analysis-cell-savings {
    align-items: flex-start;
    text-align: left;
}

#qcTabFullTable .qc2-analysis-cell-price,
#qcTabFullTable .qc2-analysis-cell-savings {
    padding-inline: 16px 12px;
}

#qcTabFullTable .qc2-analysis-cell-result {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-width: 0;
    text-align: center;
    overflow: visible;
}

#qcTabFullTable .qc2-analysis-cell-expand {
    width: auto;
    min-width: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    align-content: center;
}

#qcTabFullTable .qc2-analysis-cell-expand .qc2-collapse-btn {
    width: 148px;
    min-width: 148px;
    max-width: 148px;
    height: 34px;
    padding-inline: 12px;
}

#qcTabFullTable .qc2-analysis-cell-product {
    margin-left: -18px;
    padding-left: 30px;
    padding-right: 14px;
}

#qcTabFullTable .qc2-analysis-cell-supplier,
#qcTabFullTable .qc2-analysis-cell-price,
#qcTabFullTable .qc2-analysis-cell-savings {
    padding-inline: 14px;
}

#qcTabFullTable .qc2-analysis-primary,
#qcTabFullTable .qc2-analysis-product,
#qcTabFullTable .qc2-analysis-value,
#qcTabFullTable .qc2-analysis-price {
    font-size: var(--qc2-full-table-primary-size);
    line-height: var(--qc2-full-table-primary-line);
    font-weight: var(--qc2-full-table-primary-weight);
}

#qcTabFullTable .qc2-analysis-product,
#qcTabFullTable .qc2-analysis-supplier {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
}

#qcTabFullTable .qc2-analysis-price {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

#qcTabFullTable .qc2-analysis-secondary,
#qcTabFullTable .qc2-analysis-sub {
    font-size: var(--qc2-full-table-secondary-size);
    line-height: var(--qc2-full-table-secondary-line);
    font-weight: var(--qc2-full-table-secondary-weight);
    color: rgba(191, 219, 254, 0.66);
}

#qcTabFullTable .qc2-analysis-neutral-value {
    font-size: var(--qc2-full-table-primary-size);
    line-height: var(--qc2-full-table-primary-line);
    font-weight: var(--qc2-full-table-primary-weight);
    font-variant-numeric: tabular-nums;
}

/* RESULT V2 — STABLE + RESPONSIVE */

#qcTabFullTable .qc2-result-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  width: 100%;
  max-width: 168px;
  min-width: 0;

  margin: 0 auto;
  text-align: center;
}

/* ZONES */

#qcTabFullTable .qc2-result-v2__badge-zone,
#qcTabFullTable .qc2-result-v2__helper-zone,
#qcTabFullTable .qc2-result-v2__insight-zone {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qcTabFullTable .qc2-result-v2__badge-zone {
  min-height: 32px;
}

#qcTabFullTable .qc2-result-v2__helper-zone {
  min-height: 14px;
}

#qcTabFullTable .qc2-result-v2__insight-zone {
  min-height: 20px;
}

/* BADGE */

#qcTabFullTable .qc2-result-v2__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  max-width: 100%;
  min-height: 32px;
  padding: 6px 12px;

  border-radius: 999px;
  box-sizing: border-box;

  font-size: 10px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.04em;

  text-align: center;
  text-transform: uppercase;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* BADGE VARIANTS */

#qcTabFullTable .qc2-result-v2__badge--best {
  border: 1px solid rgba(16, 185, 129, 0.18);
  background: rgba(16, 185, 129, 0.14);
  color: #99f6e4;
}

#qcTabFullTable .qc2-result-v2__badge--opportunity {
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(
    180deg,
    rgba(251, 191, 36, 0.18),
    rgba(146, 64, 14, 0.06)
  );
  color: #fef3c7;
}

#qcTabFullTable .qc2-result-v2__badge--neutral {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(30, 41, 59, 0.32);
  color: rgba(203, 213, 225, 0.85);
}

/* TEXTS */

#qcTabFullTable .qc2-result-v2__helper {
  max-width: 168px;
  margin: 0;

  font-size: var(--qc2-full-table-secondary-size);
  line-height: 1.22;
  font-weight: var(--qc2-full-table-secondary-weight);

  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

#qcTabFullTable .qc2-result-v2__insight {
  max-width: 168px;
  margin: 0;

  font-size: 9px;
  line-height: 1.24;
  font-weight: 600;

  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}


#qcTabFullTable .qc2-analysis-savings {
    min-height: 30px;
    padding-inline: 14px;
    font-size: var(--qc2-full-table-primary-size);
    line-height: var(--qc2-full-table-primary-line);
    font-variant-numeric: tabular-nums;
    align-self: flex-start;
}

#qcTabFullTable .qc2-analysis-savings.is-neutral {
    min-height: 26px;
    padding-inline: 12px;
}

#qcTabFullTable .qc2-analysis-cell-price .qc2-analysis-sub,
#qcTabFullTable .qc2-analysis-cell-savings .qc2-analysis-sub {
    text-align: left;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#qcTabFullTable .qc2-analysis-head-price {
    justify-content: flex-start;
    text-align: left;
}

#qcTabFullTable .qc2-analysis-head-result,
#qcTabFullTable .qc2-analysis-head-details {
    justify-content: center;
    text-align: center;
}

#qcTabFullTable .qc2-analysis-actions-stack {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 7px;
    width: min(100%, 152px);
    margin-inline: auto;
}

#qcTabFullTable .qc2-analysis-actions-stack .qc2-collapse-btn {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 20px rgba(2, 6, 23, 0.16);
}

/* Full Table V3 */

#qcTabFullTable .qc2-full-table-v3 {
    --qc2-ft-columns:
        minmax(280px, 1.55fr)
        minmax(220px, 1.08fr)
        minmax(180px, 0.9fr)
        minmax(220px, 1.08fr)
        minmax(180px, 0.9fr)
        minmax(140px, 0.72fr)
        minmax(220px, 0.96fr)
        minmax(168px, 0.7fr);
    --qc2-ft-gap: 12px;
    --qc2-ft-x: 14px;
    --qc2-ft-primary-size: 12.5px;
    --qc2-ft-primary-line: 1.34;
    --qc2-ft-secondary-size: 9.5px;
    --qc2-ft-secondary-line: 1.35;
    min-width: 1700px;
}

#qcTabFullTable .qc2-ft-grid {
    display: grid;
    grid-template-columns: var(--qc2-ft-columns);
    gap: var(--qc2-ft-gap);
}

#qcTabFullTable .qc2-ft-head.qc2-analysis-table-head {
    align-items: center;
    padding: 14px 18px;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 24px;
    padding-inline: var(--qc2-ft-x);
    color: rgba(239, 246, 255, 0.8);
    font-size: 8.5px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: left;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-sort-btn {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-sort-btn.is-active {
    color: #bfdbfe;
}

.qc2-virtual-spacer {
    width: 100%;
    pointer-events: none;
}

.qc2-ft-savings-pill--nowrap,
.qc2-ft-cell--savings,
.qc2-ft-cell--savings .qc2-ft-meta {
    white-space: nowrap;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell:nth-child(2),
#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell:nth-child(3),
#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell:nth-child(4),
#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell:nth-child(5),
#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell:nth-child(6) {
    justify-content: center;
    text-align: center;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell.qc2-ft-head-cell--savings,
#qcTabFullTable .qc2-ft-cell--savings {
    min-width: 168px;
}

#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell.qc2-ft-head-cell--product {
    position: sticky;
    left: 0;
    z-index: 21;
    margin-left: -18px;
    padding-left: 30px;
    padding-right: 14px;
    background: linear-gradient(180deg, rgba(33, 50, 78, 0.98), rgba(18, 30, 50, 0.98));
    box-shadow: 16px 0 22px -16px rgba(2, 6, 23, 0.95), 1px 0 0 rgba(251, 191, 36, 0.16);
}

#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell.qc2-ft-head-cell--result,
#qcTabFullTable .qc2-ft-head .qc2-ft-head-cell.qc2-ft-head-cell--details {
    justify-content: center;
    text-align: center;
}

#qcTabFullTable .qc2-ft-row-main.qc2-analysis-row-main {
    align-items: stretch;
    min-height: 88px;
    padding: 12px 18px;
}

#qcTabFullTable .qc2-ft-cell.qc2-analysis-cell {
    display: flex;
    min-width: 0;
    padding-inline: var(--qc2-ft-x);
    overflow: hidden;
}

#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--product {
    position: sticky;
    left: 0;
    z-index: 5;
    margin-left: -18px;
    padding-left: 30px;
    padding-right: 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(12, 20, 35, 0.98));
    box-shadow: 16px 0 22px -16px rgba(2, 6, 23, 0.92), 1px 0 0 rgba(96, 165, 250, 0.1);
}

#qcTabFullTable .qc2-analysis-row:nth-child(even) .qc2-ft-cell.qc2-ft-cell--product {
    background: linear-gradient(180deg, rgba(19, 31, 52, 0.98), rgba(13, 22, 38, 0.98));
}

#qcTabFullTable .qc2-analysis-row:hover .qc2-ft-cell.qc2-ft-cell--product {
    background: linear-gradient(180deg, rgba(26, 42, 69, 0.98), rgba(18, 30, 50, 0.98));
}

#qcTabFullTable .qc2-analysis-row.is-selected .qc2-ft-cell.qc2-ft-cell--product {
    background: linear-gradient(180deg, rgba(21, 38, 68, 0.98), rgba(16, 28, 50, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        16px 0 22px -16px rgba(2, 6, 23, 0.95),
        1px 0 0 rgba(96, 165, 250, 0.24);
}

#qcTabFullTable .qc2-analysis-row.is-expanded .qc2-ft-cell.qc2-ft-cell--product {
    background: linear-gradient(180deg, rgba(27, 46, 77, 0.98), rgba(16, 30, 51, 0.98));
}

#qcTabFullTable .qc2-analysis-row.is-selected.is-expanded .qc2-ft-cell.qc2-ft-cell--product {
    background: linear-gradient(180deg, rgba(26, 44, 78, 0.98), rgba(17, 31, 56, 0.98));
    box-shadow:
        inset 6px 0 0 rgba(96, 165, 250, 0.95),
        16px 0 22px -16px rgba(2, 6, 23, 0.95),
        1px 0 0 rgba(96, 165, 250, 0.24);
}

#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--supplier,
#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--price,
#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--savings {
    align-items: center;
    justify-content: center;
    text-align: center;
}

#qcTabFullTable .qc2-ft-cell--supplier .qc2-ft-stack,
#qcTabFullTable .qc2-ft-cell--price .qc2-ft-stack,
#qcTabFullTable .qc2-ft-cell--savings .qc2-ft-stack {
    justify-items: center;
    text-align: center;
}

#qcTabFullTable .qc2-ft-cell--price .qc2-ft-stack {
    width: auto;
    max-width: 100%;
    padding-inline: 8px;
    box-sizing: border-box;
}

#qcTabFullTable .qc2-ft-cell--supplier .qc2-ft-primary,
#qcTabFullTable .qc2-ft-cell--supplier .qc2-ft-meta,
#qcTabFullTable .qc2-ft-cell--price .qc2-ft-primary,
#qcTabFullTable .qc2-ft-cell--price .qc2-ft-meta,
#qcTabFullTable .qc2-ft-cell--savings .qc2-ft-primary,
#qcTabFullTable .qc2-ft-cell--savings .qc2-ft-meta,
#qcTabFullTable .qc2-ft-cell--savings .qc2-ft-neutral-value {
    text-align: center;
}

#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--result,
#qcTabFullTable .qc2-ft-cell.qc2-ft-cell--details {
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
}

#qcTabFullTable .qc2-ft-stack {
    display: grid;
    gap: 6px;
    align-content: center;
    width: 100%;
    min-width: 0;
}

#qcTabFullTable .qc2-ft-primary {
    color: rgba(241, 245, 249, 0.96);
    font-size: var(--qc2-ft-primary-size);
    line-height: var(--qc2-ft-primary-line);
    font-weight: 800;
    overflow: hidden;
}

#qcTabFullTable .qc2-ft-product,
#qcTabFullTable .qc2-ft-supplier {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
}

#qcTabFullTable .qc2-ft-product {
    color: #f8fafc;
    font-weight: 900;
    letter-spacing: -0.02em;
}

#qcTabFullTable .qc2-ft-money,
#qcTabFullTable .qc2-ft-neutral-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

#qcTabFullTable .qc2-ft-money {
    display: inline-flex;
    justify-content: center;
    max-width: 100%;
    padding-inline: 4px;
    box-sizing: border-box;
    overflow: visible;
    color: #fefce8;
    font-weight: 900;
    letter-spacing: -0.02em;
}

#qcTabFullTable .qc2-ft-meta {
    margin: 0;
    color: rgba(191, 219, 254, 0.66);
    font-size: var(--qc2-ft-secondary-size);
    line-height: var(--qc2-ft-secondary-line);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#qcTabFullTable .qc2-ft-neutral-value {
    color: rgba(148, 163, 184, 0.9);
    font-size: var(--qc2-ft-primary-size);
    line-height: var(--qc2-ft-primary-line);
    font-weight: 800;
}

#qcTabFullTable .qc2-ft-savings-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: none;
    min-height: 30px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(251, 191, 36, 0.18);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.12), rgba(120, 53, 15, 0.08));
    color: #fde68a;
    font-size: 12px;
    line-height: 1.1;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.05), 0 0 12px rgba(251, 191, 36, 0.06);
}

#qcTabFullTable .qc2-ft-result {
    display: grid;
    grid-template-rows: minmax(34px, auto) minmax(18px, auto) minmax(24px, auto);
    gap: 4px;
    width: min(100%, 188px);
    min-width: 0;
    align-content: center;
    justify-items: center;
}

#qcTabFullTable .qc2-ft-result__badge-zone,
#qcTabFullTable .qc2-ft-result__helper-zone,
#qcTabFullTable .qc2-ft-result__insight-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

#qcTabFullTable .qc2-ft-result__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    box-sizing: border-box;
    font-size: 10px;
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#qcTabFullTable .qc2-ft-result__badge--best {
    border: 1px solid rgba(16, 185, 129, 0.18);
    background: rgba(16, 185, 129, 0.14);
    color: #99f6e4;
}

#qcTabFullTable .qc2-ft-result__badge--opportunity {
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.18), rgba(146, 64, 14, 0.06));
    color: #fef3c7;
}

#qcTabFullTable .qc2-ft-result__badge--neutral {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(30, 41, 59, 0.32);
    color: rgba(203, 213, 225, 0.85);
}

#qcTabFullTable .qc2-ft-result__helper,
#qcTabFullTable .qc2-ft-result__insight {
    width: 100%;
    margin: 0;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

#qcTabFullTable .qc2-ft-result__helper {
    color: rgba(191, 219, 254, 0.72);
    font-size: var(--qc2-ft-secondary-size);
    line-height: 1.25;
    font-weight: 700;
}

#qcTabFullTable .qc2-ft-result__insight {
    color: rgba(191, 219, 254, 0.62);
    font-size: 9px;
    line-height: 1.28;
    font-weight: 600;
}

#qcTabFullTable .qc2-ft-actions {
    display: grid;
    gap: 8px;
    width: min(100%, 148px);
    justify-items: center;
    align-content: center;
}

#qcTabFullTable .qc2-ft-actions .qc2-collapse-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 34px;
    height: auto;
    padding: 8px 12px;
    justify-content: center;
    line-height: 1.2;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 20px rgba(2, 6, 23, 0.16);
}

@keyframes qc2-savings-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.05), 0 0 14px rgba(251, 191, 36, 0.06);
        filter: brightness(1);
    }

    50% {
        box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.12), 0 0 26px rgba(251, 191, 36, 0.14);
        filter: brightness(1.06);
    }
}

.qc2-analysis-row-detail {
    display: none;
    padding: 0 10px 10px;
    background: linear-gradient(180deg, rgba(10, 18, 32, 0.98), rgba(8, 15, 28, 0.99));
    max-height: 240px;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.qc2-analysis-row.is-expanded .qc2-analysis-row-detail {
    display: grid;
    gap: 10px;
    margin: 0 8px 8px;
    padding: 12px 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.12);
}

.qc2-analysis-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    align-content: start;
}

.qc2-analysis-filter-empty {
    padding: 16px 12px;
    color: rgba(191, 219, 254, 0.78);
    font-size: 11px;
}

.qc2-analysis-detail-item {
    display: grid;
    gap: 4px;
    padding: 9px 10px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(20, 32, 54, 0.92), rgba(13, 22, 38, 0.96));
}

.qc2-analysis-detail-item.is-highlighted {
    border-color: rgba(37, 99, 235, 0.22);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.05));
}

.qc2-analysis-detail-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qc2-analysis-detail-value,
.qc2-analysis-detail-note {
    color: var(--text-strong);
    font-size: 11px;
    line-height: 1.35;
}

#qcTabFullTable .qc2-ft-detail-panel.qc2-analysis-row-detail {
    max-height: 220px;
    padding: 0 8px 8px;
}

#qcTabFullTable .qc2-analysis-row.is-expanded .qc2-ft-detail-panel.qc2-analysis-row-detail {
    gap: 8px;
    margin: 0 8px 8px;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(11, 19, 34, 0.98), rgba(8, 15, 28, 0.99));
}

#qcTabFullTable .qc2-ft-detail-grid.qc2-analysis-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#qcTabFullTable .qc2-ft-detail-card.qc2-analysis-detail-item {
    gap: 3px;
    min-width: 0;
    min-height: 0;
    padding: 8px 10px;
    border-radius: 14px;
}

#qcTabFullTable .qc2-ft-detail-card .qc2-analysis-detail-label {
    font-size: 9px;
    line-height: 1.2;
}

#qcTabFullTable .qc2-ft-detail-card .qc2-analysis-detail-value {
    min-width: 0;
    font-size: 11px;
    line-height: 1.32;
    white-space: normal;
    overflow-wrap: anywhere;
}

#qcTabFullTable .qc2-ft-detail-note.qc2-analysis-detail-note-secondary {
    margin: 0;
    padding: 0 2px;
    color: rgba(191, 219, 254, 0.7);
    font-size: 10.5px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

#qcTabFullTable .qc2-ft-detail-insight.qc2-analysis-detail-note {
    margin: 0;
    padding: 9px 12px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.42), rgba(15, 23, 42, 0.48));
    color: rgba(226, 232, 240, 0.94);
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-analyze-actions {
    margin-top: 28px;
}

.qc2-history-controls {
    padding-bottom: 4px;
}

.qc2-screen-history[data-qc-anchor="history-top"] {
    scroll-margin-top: 12px;
}

.qc2-history-summary-grid {
    margin-top: 2px;
}

.qc2-history-block {
    display: grid;
    gap: 12px;
}

.qc2-history-empty-state {
    margin: 0 0 2px;
}

.qc2-history-trend-block {
    padding: 14px 16px 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0.32));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qc2-history-trend-block [data-qc-history-trend-content] {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.qc2-header-premium {
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.qc2-analyze-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 16px 0;
}

.qc2-analyze-actions-slot {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
}

.qc2-analyze-actions-slot.is-left {
    justify-content: flex-start;
    margin-right: auto;
}

.qc2-analyze-actions-slot.is-center {
    justify-content: flex-start;
}

.qc2-analyze-actions-slot.is-right {
    justify-content: flex-end;
    margin-left: auto;
}

.qc2-trend-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) max-content;
    align-items: center;
    gap: 14px;
}

.qc2-trend-meta {
    display: grid;
    gap: 2px;
    justify-content: stretch;
}

.qc2-change-positive {
    color: #059669;
    font-weight: 700;
}

.qc2-change-negative {
    color: #dc2626;
    font-weight: 700;
}

.qc2-trend-bar-shell {
    width: 100%;
    min-width: 0;
}

.qc2-trend-bar-track {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.qc2-trend-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-strong));
}

.qc2-trend-bar.is-positive {
    background: linear-gradient(90deg, #10b981, #14b8a6);
}

.qc2-trend-bar.is-negative {
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.qc2-trend-bar.is-neutral {
    background: linear-gradient(90deg, #64748b, #94a3b8);
}

@media (max-width: 980px) {
    .qc2-manual-row-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc2-manual-row-optional {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc2-upload-actions {
        grid-auto-flow: row;
        justify-items: stretch;
    }

    .qc2-file-line {
        align-items: flex-start;
    }

    .qc2-analyze-actions {
        justify-content: stretch;
        gap: 12px;
        padding: 10px 0 0;
    }

    .qc2-analyze-actions-slot,
    .qc2-analyze-actions-slot.is-left,
    .qc2-analyze-actions-slot.is-center,
    .qc2-analyze-actions-slot.is-right {
        justify-content: stretch;
    }

    .qc2-analyze-actions-slot > .secondary-btn,
    .qc2-analyze-actions-slot > .action-btn {
        width: 100%;
    }

    .qc2-head-shell {
        align-items: stretch;
    }

    .qc2-analysis-table-head {
        display: none;
    }

    .qc2-analysis-cell-product {
        position: static;
        left: auto;
        margin-left: 0;
        padding-left: 6px;
        z-index: auto;
        box-shadow: none;
    }

    .qc2-analysis-row-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc2-analysis-row-main-optimize {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc2-spotlight-grid,
    .qc2-best-grid {
        grid-template-columns: 1fr;
    }

    .qc2-analysis-cell-expand {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    #qcTabFullTable .qc2-full-table-v3 {
        min-width: 0;
    }

    #qcTabFullTable .qc2-ft-head.qc2-analysis-table-head {
        display: none;
    }

    #qcTabFullTable .qc2-ft-row-main.qc2-analysis-row-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
        padding: 14px 14px 12px;
    }

    #qcTabFullTable .qc2-ft-cell.qc2-ft-cell--product {
        position: static;
        left: auto;
        margin-left: 0;
        padding-left: 6px;
        z-index: auto;
        box-shadow: none;
    }

    #qcTabFullTable .qc2-ft-cell.qc2-ft-cell--details {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    #qcTabFullTable .qc2-ft-actions {
        width: min(100%, 320px);
        justify-items: stretch;
    }

    #qcTabFullTable .qc2-ft-detail-grid.qc2-analysis-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qc2-trend-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 640px) {
    .qc2-manual-row-main,
    .qc2-manual-row-optional,
    .qc2-result-row {
        grid-template-columns: 1fr;
    }

    .qc2-manual-row-optional .recipe-field.is-wide {
        grid-column: auto;
    }

    .qc2-manual-actions,
    .qc2-manual-actions-group,
    .qc2-manual-actions-group-end {
        width: 100%;
    }

    .qc2-manual-actions-group-end {
        margin-left: 0;
    }

    .qc2-manual-footer-btn {
        width: 100%;
    }

    .qc2-result-row {
        display: grid;
    }

    .qc2-history-filters,
    .qc2-analysis-row-main,
    .qc2-analysis-row-main-optimize,
    .qc2-analysis-detail-grid {
        grid-template-columns: 1fr;
    }

    #qcTabFullTable .qc2-ft-row-main.qc2-analysis-row-main {
        grid-template-columns: 1fr;
    }

    #qcTabFullTable .qc2-ft-detail-grid.qc2-analysis-detail-grid {
        grid-template-columns: 1fr;
    }

    .qc2-mode-switch {
        grid-auto-flow: row;
        width: 100%;
    }

    .qc2-analysis-table-scroll,
    .qc2-spotlight-panel-scroll,
    .qc2-best-panel-scroll,
    .qc2-history-table-scroll {
        min-height: 0;
        max-height: none;
    }
}

.mapping-review-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mapping-review-title {
    margin: 4px 0 6px;
    color: var(--text-strong);
    font-size: 1.12rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.mapping-review-copy,
.mapping-review-note {
    color: var(--muted);
    line-height: 1.6;
}

.mapping-review-note {
    margin-bottom: 16px;
}

.mapping-summary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mapping-summary-chip,
.mapping-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: var(--surface-chip);
    color: var(--primary-strong);
    font-size: 12px;
    font-weight: 800;
}

.mapping-summary-chip.is-warning {
    background: rgba(254, 240, 138, 0.18);
    color: #a16207;
    border-color: rgba(234, 179, 8, 0.22);
}

.mapping-grid {
    display: grid;
    gap: 12px;
}

.mapping-row {
    display: grid;
    grid-template-columns: minmax(240px, 1.1fr) minmax(320px, 1.4fr) 120px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.mapping-row.is-missing {
    border-color: rgba(248, 113, 113, 0.26);
    background: linear-gradient(180deg, rgba(145, 28, 28, 0.14), rgba(15, 23, 42, 0.92));
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.08);
}

.mapping-field-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mapping-field-title {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
}

.mapping-field-help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.mapping-select-shell {
    width: 100%;
    min-width: 0;
}

.mapping-select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
    color: var(--text-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mapping-select option {
    background: var(--surface-elevated);
    color: var(--text-strong);
}

.mapping-select option[value=""] {
    color: var(--muted);
}

.mapping-select option:checked {
    background: var(--primary-soft);
    color: var(--text-strong);
}

.mapping-select:hover {
    border-color: var(--primary);
}

.mapping-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

:root[data-theme="dark"] .mapping-select {
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    color: var(--text-strong);
    border-color: var(--line-strong);
}

:root[data-theme="dark"] .mapping-select:hover {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
}

:root[data-theme="dark"] .mapping-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

:root[data-theme="dark"] .mapping-select option {
    background: #18273f;
    color: var(--text-strong);
}

:root[data-theme="dark"] .mapping-select option[value=""] {
    color: var(--muted);
}

:root[data-theme="dark"] .mapping-select option:checked {
    background: #274a86;
    color: var(--text-on-hero);
}

.mapping-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    text-align: center;
}

.mapping-status.is-strong {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.mapping-status.is-possible {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
}

.mapping-status.is-missing {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

.mapping-alert {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
}

.mapping-alert-error {
    border: 1px solid var(--alert-error-border);
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
}

.mapping-alert-info {
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    color: var(--muted);
}

.mapping-alert-warning {
    border: 1px solid rgba(245, 158, 11, 0.34);
    background: rgba(120, 53, 15, 0.18);
    color: #fde68a;
}

.mapping-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.mapping-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.mapping-actions-bar,
.qc2-review-panel .qc2-actions {
    width: 100%;
    margin-top: 28px;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.mapping-actions-bar > .secondary-btn,
.qc2-review-panel .qc2-actions > .secondary-btn {
    margin-right: auto;
}

.mapping-actions-bar > .action-btn,
.qc2-review-panel .qc2-actions > .action-btn {
    margin-left: auto;
}

@media (max-width: 720px) {
    .mapping-actions-bar,
    .qc2-review-panel .qc2-actions {
        align-items: stretch;
    }

    .mapping-actions-bar > .secondary-btn,
    .mapping-actions-bar > .action-btn,
    .qc2-review-panel .qc2-actions > .secondary-btn,
    .qc2-review-panel .qc2-actions > .action-btn {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.mapping-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(11, 18, 32, 0.96));
}

.mapping-toolbar-copy {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.mapping-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mapping-toolbar-btn {
    min-height: 40px;
}

.qc2-inline-error {
    color: #fca5a5;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

:root[data-theme="dark"] .qc2-review-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
    border: 1px solid rgba(96, 165, 250, 0.12);
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.42);
}

:root[data-theme="dark"] .mapping-review-copy,
:root[data-theme="dark"] .mapping-review-note,
:root[data-theme="dark"] .mapping-section-copy,
:root[data-theme="dark"] .mapping-field-help,
:root[data-theme="dark"] .mapping-toolbar-copy,
:root[data-theme="dark"] .mapping-alert-info {
    color: rgba(191, 219, 254, 0.78);
}

:root[data-theme="dark"] .mapping-summary-chip,
:root[data-theme="dark"] .mapping-pill {
    background: rgba(30, 41, 59, 0.88);
    border-color: rgba(96, 165, 250, 0.16);
    color: #dbeafe;
}

:root[data-theme="dark"] .mapping-summary-chip.is-warning {
    background: rgba(120, 53, 15, 0.28);
    border-color: rgba(251, 191, 36, 0.18);
    color: #fde68a;
}

:root[data-theme="dark"] .mapping-section {
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 15, 28, 0.94));
    border-radius: 22px;
    padding: 18px;
}

:root[data-theme="dark"] .mapping-row {
    grid-template-columns: minmax(240px, 1.1fr) minmax(320px, 1.4fr) 120px;
    padding: 16px;
    border-color: rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(24, 39, 63, 0.92), rgba(15, 23, 42, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .mapping-row.is-missing {
    border-color: rgba(248, 113, 113, 0.28);
    background: linear-gradient(180deg, rgba(69, 10, 10, 0.36), rgba(15, 23, 42, 0.96));
}

:root[data-theme="dark"] .mapping-field-title {
    color: #f8fafc;
}

:root[data-theme="dark"] .qc2-detected-badge,
:root[data-theme="dark"] .qc2-optional-badge {
    border-color: rgba(96, 165, 250, 0.16);
    background: rgba(30, 41, 59, 0.88);
    color: #dbeafe;
}

:root[data-theme="dark"] .mapping-alert-info {
    border-color: rgba(96, 165, 250, 0.14);
    background: linear-gradient(180deg, rgba(20, 32, 54, 0.96), rgba(12, 20, 35, 0.96));
}

@media (max-width: 900px) {
    .qc2-spotlight-compare {
        grid-template-columns: 1fr;
    }

    .qc2-spotlight-arrow {
        transform: rotate(90deg);
    }

    .mapping-row,
    :root[data-theme="dark"] .mapping-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .mapping-status {
        justify-self: flex-start;
    }

    .mapping-toolbar {
        align-items: flex-start;
    }
}

.upload-box:hover,
.upload-box.has-file {
    border-color: var(--primary);
    box-shadow: var(--shadow-lift);
    transform: translateY(-2px);
}

.upload-box.is-dragging {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow-lift);
    background:
        linear-gradient(180deg, var(--surface-strong), var(--primary-soft));
}

.upload-header,
.table-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.table-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.table-config-btn {
    min-height: 38px;
    padding-inline: 13px;
}

.quick-links,
.upload-row,
.toolbar {
    gap: 10px;
}

.upload-flow {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-step {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 16px;
    border-radius: 20px;
    border: 1px dashed var(--line-strong);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface-tinted));
    text-align: center;
    cursor: pointer;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragging,
.upload-dropzone.has-file {
    border-color: var(--primary);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
    background: linear-gradient(180deg, var(--surface-strong), var(--primary-soft));
}

.upload-dropzone-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.upload-dropzone-title {
    color: var(--text-strong);
    font-size: clamp(1rem, 1.55vw, 1.28rem);
    font-weight: 800;
    font-family: var(--font-heading);
}

.upload-dropzone-copy {
    max-width: 480px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.44;
}

.upload-row {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 14px;
    background: var(--surface-tinted);
    border: 1px solid var(--line-soft);
}

.custom-file-label,
.action-btn,
.secondary-btn,
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    max-width: 100%;
    padding: 7px 12px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    font-family: var(--font-body);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.custom-file-label,
.secondary-btn,
.filter-btn {
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-soft));
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.action-btn {
    border: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-strong));
    color: white;
    box-shadow: var(--button-shadow);
    cursor: pointer;
}

.custom-file-label:hover,
.secondary-btn:hover,
.action-btn:hover,
.filter-btn:hover {
    transform: translateY(-1px);
}

.custom-file-label:hover,
.secondary-btn:hover {
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary-hover), var(--accent-primary-strong));
    box-shadow: var(--button-shadow-hover);
}

#file-upload { display: none; }

#file-name {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
}

.upload-submit {
    min-width: 156px;
}

.workspace-toggle-btn,
.guide-history-clear,
#quoteCompareSelectFileButton,
#inspectQuoteCompareUploadButton,
#quoteCompareDemoButton,
#addQuoteBidButton,
#newQuoteComparisonButton,
#quoteSidebarToggleButton,
#guideAskButton,
#recipesEmptyGoToAnalyzerButton {
    flex: 0 0 auto;
}

.sample-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.sample-links-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.sample-link {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.sample-link:hover {
    text-decoration: underline;
}

.upload-secondary-flow {
    margin-top: 10px;
}

.demo-form {
    display: block;
}

.demo-cta-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-tinted), var(--surface-strong));
    box-shadow: var(--shadow-soft);
}

.demo-cta-title {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.demo-cta-copy,
.demo-note {
    color: var(--muted);
    line-height: 1.6;
}

.demo-cta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.demo-btn {
    min-width: 148px;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--surface-chip);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.upload-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.meta-item {
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--surface-tinted);
    border: 1px solid var(--line-soft);
}

.meta-label { margin-bottom: 6px; }

.meta-value {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.error-box,
.success-text {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
}

.error-box {
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
    border: 1px solid var(--alert-error-border);
}

.success-text {
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
    border: 1px solid var(--alert-success-border);
}

.upload-success-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-block: 12px;
}

.upload-success-row span {
    min-width: 0;
    line-height: 1.45;
}

.upload-success-action {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(59, 130, 246, 0.08));
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.upload-success-action:hover {
    border-color: rgba(37, 99, 235, 0.34);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.12));
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.16);
}

.upload-success-action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 12px 22px rgba(37, 99, 235, 0.16);
}

:root[data-theme="dark"] .upload-success-action {
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.24);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(59, 130, 246, 0.12));
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
}

:root[data-theme="dark"] .upload-success-action:hover {
    border-color: rgba(96, 165, 250, 0.38);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(96, 165, 250, 0.14));
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.summary-card,
.chart-card {
    padding: 13px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.summary-card:hover,
.decision-card:hover,
.chart-card:hover,
.top-insight-card:hover,
.action-priority-panel:hover,
.ai-entry-shell:hover,
.ai-workspace:hover,
.filter-panel:hover,
.table-shell:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
}

.summary-card.is-focused,
.decision-card.is-focused,
.table-shell.is-focused,
.dashboard-grid.is-focused {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow-lift);
}

.summary-card-value {
    font-size: clamp(1.18rem, 1.45vw, 1.68rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-strong);
}

.summary-card-value.compact {
    font-size: 1.14rem;
}

.summary-card-sub {
    margin-top: 6px;
    font-size: 10px;
}

.summary-card-insight {
    margin-top: 6px;
    color: var(--text-strong);
    font-size: 11px;
    line-height: 1.42;
}

.summary-card-trend {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--line-soft);
    background: var(--surface-strong);
    color: var(--muted);
}

.summary-card-trend.positive {
    color: var(--pill-good-text);
    background: var(--pill-good-bg);
}

.summary-card-trend.negative {
    color: var(--pill-overpay-text);
    background: var(--pill-overpay-bg);
}

.summary-card-trend.neutral {
    color: var(--text);
}

.executive-summary {
    margin-bottom: 14px;
    padding: 16px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
}

.key-insights {
    position: relative;
    overflow: hidden;
}

.key-insights::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -70px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--bg-accent-2), transparent 68%);
    pointer-events: none;
}

.executive-summary-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.executive-summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.executive-summary-smartline {
    position: relative;
    z-index: 1;
    margin: 0 0 18px;
    max-width: 860px;
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
}

.executive-summary-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 18px;
}

.decision-view-shell {
    padding: 24px 24px 22px;
}

.decision-view-shell .executive-summary-body {
    grid-template-columns: 1fr;
}

.decision-tab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 18px;
}

.decision-tab {
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-strong);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.decision-tab:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    color: var(--text-strong);
}

.decision-tab.is-active {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-strong);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.decision-tab-panels {
    display: grid;
    gap: 18px;
}

.decision-grid-tight {
    margin-top: 18px;
}

.decision-card-metric {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
}

.decision-actions-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 18px;
    margin-bottom: 18px;
}

.decision-side-panel {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow-soft);
}

.decision-insight-list {
    margin: 0;
}

.decision-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.results-export-primary {
    min-height: 44px;
    padding-inline: 16px;
}

.results-export-secondary {
    min-height: 44px;
    padding-inline: 16px;
}

.top-insights-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hero-insight-card {
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 40%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-panel-tint));
    box-shadow: var(--shadow-soft);
}

.hero-insight-title {
    margin: 0 0 12px;
    color: var(--text-strong);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    font-weight: 800;
    line-height: 1.2;
}

.hero-insight-value {
    margin-bottom: 12px;
    color: var(--text-strong);
    font-size: clamp(2.45rem, 4vw, 4rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.hero-insight-copy {
    margin: 0 0 18px;
    color: var(--text-strong);
    font-size: 14px;
    line-height: 1.7;
    max-width: 720px;
}

.hero-insight-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-metric-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.48);
}

.hero-metric-label {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-metric-value {
    color: var(--text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
}

:root[data-theme="dark"] .hero-metric-card {
    background: rgba(15, 23, 42, 0.42);
}

.top-insight-card {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 42%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-panel-tint));
    box-shadow: var(--shadow-soft);
}

.top-insight-label {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.top-insight-value {
    margin-bottom: 10px;
    color: var(--text-strong);
    font-size: clamp(2rem, 3vw, 2.9rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.top-insight-value.compact {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.top-insight-copy {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.action-priority-panel {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.action-priority-head {
    margin-bottom: 14px;
}

.action-priority-subtitle {
    margin-top: 8px;
    color: var(--text-strong);
    font-size: 1.05rem;
    font-weight: 800;
}

.action-priority-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-priority-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
}

.action-priority-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border-radius: 14px;
    background: var(--surface-chip);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.action-priority-title {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.action-priority-copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

#mainDashboardView .collapsible-panel {
    margin-bottom: 14px;
}

#mainDashboardView .collapsible-toggle {
    gap: 14px;
    padding: 12px 14px;
}

#mainDashboardView .collapsible-toggle-copy {
    gap: 4px;
}

#mainDashboardView .collapsible-step-badge,
#mainDashboardView .panel-label,
#mainDashboardView .summary-card-title,
#mainDashboardView .meta-label {
    font-size: 10px;
    letter-spacing: 0.12em;
}

#mainDashboardView .collapsible-toggle-kicker {
    font-size: 0.9rem;
}

#mainDashboardView .collapsible-toggle-title,
#mainDashboardView .panel-copy,
#mainDashboardView .upload-subtitle,
#mainDashboardView .table-subtitle,
#mainDashboardView .summary-card-sub {
    font-size: 0.84rem;
    line-height: 1.42;
}

#mainDashboardView .panel-title,
#mainDashboardView .upload-title,
#mainDashboardView .table-title {
    margin-bottom: 8px;
    font-size: 1.08rem;
}

#mainDashboardView .executive-summary {
    margin-bottom: 12px;
    padding: 14px;
}

#mainDashboardView .executive-summary-head {
    margin-bottom: 12px;
}

#mainDashboardView .executive-summary-smartline {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.55;
}

#mainDashboardView .decision-view-shell {
    padding: 18px 18px 16px;
}

#mainDashboardView .decision-tab-strip {
    margin: 14px 0;
}

#mainDashboardView .decision-tab,
#mainDashboardView .results-export-primary,
#mainDashboardView .results-export-secondary {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 12px;
}

#mainDashboardView .summary-grid,
#mainDashboardView .top-insights-grid,
#mainDashboardView .decision-grid,
#mainDashboardView .decision-tab-panels {
    gap: 12px;
}

#mainDashboardView .summary-card,
#mainDashboardView .chart-card,
#mainDashboardView .top-insight-card,
#mainDashboardView .action-priority-panel,
#mainDashboardView .table-shell {
    padding: 14px;
}

#mainDashboardView .summary-card-value {
    font-size: clamp(1.05rem, 1.2vw, 1.42rem);
}

#mainDashboardView .summary-card-value.compact {
    font-size: 1rem;
}

#mainDashboardView .summary-card-insight,
#mainDashboardView .top-insight-copy,
#mainDashboardView .action-priority-copy {
    font-size: 12px;
    line-height: 1.5;
}

#mainDashboardView .summary-card-trend {
    margin-top: 10px;
    padding: 4px 8px;
    font-size: 10px;
}

#mainDashboardView .hero-insight-card {
    padding: 18px;
    border-radius: 20px;
}

#mainDashboardView .hero-insight-title {
    margin-bottom: 8px;
    font-size: clamp(1.16rem, 1.5vw, 1.5rem);
}

#mainDashboardView .hero-insight-value {
    margin-bottom: 10px;
    font-size: clamp(2rem, 3vw, 3rem);
}

#mainDashboardView .hero-insight-copy {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.55;
}

#mainDashboardView .hero-insight-metrics {
    gap: 10px;
}

#mainDashboardView .hero-metric-card {
    padding: 11px 12px;
    border-radius: 14px;
}

#mainDashboardView .hero-metric-label {
    margin-bottom: 4px;
    font-size: 10px;
}

#mainDashboardView .hero-metric-value,
#mainDashboardView .top-insight-value.compact {
    font-size: 0.92rem;
}

#mainDashboardView .top-insight-value {
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
}

#mainDashboardView .action-priority-head {
    margin-bottom: 10px;
}

#mainDashboardView .action-priority-subtitle {
    margin-top: 6px;
    font-size: 0.96rem;
}

#mainDashboardView .action-priority-list {
    gap: 10px;
}

#mainDashboardView .action-priority-item {
    gap: 10px;
    padding: 12px;
}

#mainDashboardView .action-priority-index {
    min-width: 36px;
    min-height: 36px;
    border-radius: 12px;
    font-size: 11px;
}

#mainDashboardView .action-priority-title {
    font-size: 13px;
    line-height: 1.35;
}

#mainDashboardView .upload-box {
    padding: 14px;
}

#mainDashboardView #uploadPanel .upload-box {
    gap: 8px;
    padding: 14px;
}

#mainDashboardView #uploadPanel .upload-dropzone {
    padding: 12px 13px;
}

#mainDashboardView #uploadPanel .upload-row {
    gap: 10px;
    padding: 9px 10px;
}

#mainDashboardView .action-btn,
#mainDashboardView .secondary-btn,
#mainDashboardView .filter-btn,
#mainDashboardView .custom-file-label {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 11px;
}

#mainDashboardView .table-shell {
    margin-bottom: 16px;
}

#mainDashboardView .table-wrap table {
    font-size: 12px;
}

#mainDashboardView .table-wrap th,
#mainDashboardView .table-wrap td {
    padding: 10px 10px;
}

#mainDashboardView .status-pill {
    min-width: 78px;
    padding: 5px 8px;
    font-size: 10px;
}

.ai-entry-shell,
.ai-workspace {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 30%),
        linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow);
}

.ai-entry-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ai-entry-copy {
    max-width: 720px;
}

.ai-entry-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-entry-btn {
    min-width: 180px;
}

.recipes-shell {
    padding: 0;
}

.recipes-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1.72fr);
    gap: 22px;
    align-items: start;
}

.recipes-sidebar,
.recipes-editor-card,
.recipe-breakdown-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
    box-shadow: var(--shadow-soft);
}

.recipes-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 100%;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(244, 114, 182, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.recipes-editor-card {
    display: grid;
    gap: 20px;
    overflow: visible;
    padding: 26px;
}

.recipes-main {
    display: grid;
    gap: 18px;
}

.recipes-panel-head,
.recipes-editor-head,
.recipe-breakdown-head,
.recipe-ingredients-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.recipes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.recipes-empty {
    margin-top: 0;
    padding: 18px 18px 20px;
    border-radius: 20px;
    border: 1px dashed rgba(148, 163, 184, 0.26);
    background:
        linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.58)),
        var(--surface-tinted);
    color: var(--muted);
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.recipes-sidebar-actions {
    margin-top: auto;
    padding-top: 6px;
}

.recipes-sidebar-actions .secondary-btn {
    width: 100%;
}

.recipes-back-home-btn {
    width: 100% !important;
    justify-content: center;
}

.recipe-list-item {
    width: 100%;
    padding: 16px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(15, 23, 42, 0.34));
    color: var(--text-strong);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.recipe-list-item:hover {
    transform: none;
    border-color: rgba(96, 165, 250, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.46));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.recipe-list-item.is-active {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.recipe-list-name {
    display: block;
    color: var(--text-strong);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.recipe-list-meta {
    display: block;
    margin-top: 7px;
    color: rgba(148, 163, 184, 0.92);
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.recipes-new-recipe-btn {
    min-height: 48px;
    padding-inline: 20px;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.18);
}

.recipes-editor-title,
.recipe-breakdown-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.12rem;
    font-weight: 800;
}

.recipe-breakdown-card {
    display: grid;
    gap: 12px;
}

.recipe-pricing-card {
    position: relative;
    gap: 16px;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.14);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.48));
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(251, 191, 36, 0.04);
}

.recipe-pricing-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(251, 191, 36, 0.08) 42%, transparent 72%);
    opacity: 0.55;
    animation: recipe-pricing-sheen 9s ease-in-out infinite;
}

.recipe-pricing-card > * {
    position: relative;
    z-index: 1;
}

.recipe-pricing-card .result-chip {
    border-color: rgba(251, 191, 36, 0.28);
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.14), rgba(120, 53, 15, 0.16));
    color: #fde68a;
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.08);
}

.recipe-pricing-card .recipe-input:hover,
.recipe-pricing-card .recipe-select:hover {
    border-color: rgba(251, 191, 36, 0.26);
}

.recipe-pricing-card .recipe-input:focus,
.recipe-pricing-card .recipe-select:focus {
    border-color: rgba(251, 191, 36, 0.62);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.recipe-breakdown-head {
    align-items: center;
    margin-bottom: 0;
    flex-wrap: nowrap;
}

.recipe-breakdown-head-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.recipe-breakdown-card #recipePricingModeChip {
    flex: 0 0 auto;
    align-self: center;
}

.recipe-breakdown-list {
    display: grid;
    gap: 10px;
}

.recipe-ingredient-breakdown-card {
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.36));
}

.recipe-ingredient-breakdown-card .recipe-breakdown-head {
    margin-bottom: 12px;
}

.recipe-ingredient-breakdown-card .recipe-breakdown-list {
    max-height: 460px;
    overflow-y: auto;
    padding: 6px 6px 4px 0;
    gap: 12px;
    scrollbar-color: rgba(96, 165, 250, 0.42) transparent;
}

.recipe-breakdown-card .decision-list-empty {
    margin: 0;
    padding: 16px 18px;
    min-height: 0;
}

.recipes-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.recipes-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 0;
}

.recipe-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipe-field-label {
    color: rgba(191, 219, 254, 0.8);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recipe-input,
.recipe-select {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.42));
    color: var(--text-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.recipe-select {
    background-color: #18273f;
    color: #f8fbff;
    color-scheme: dark;
}

.recipe-input::placeholder {
    color: rgba(148, 163, 184, 0.84);
}

.recipe-input:hover,
.recipe-select:hover {
    border-color: rgba(96, 165, 250, 0.32);
}

.recipe-input:focus,
.recipe-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring);
}

.recipe-select option {
    background: #18273f;
    color: #f8fbff;
}

.recipe-select option[value=""] {
    color: #bfd0e8;
}

.recipe-ingredients-card {
    margin-top: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    overflow: visible;
    --recipe-ingredient-grid-template: minmax(0, 1.9fr) 140px 160px 96px;
    --recipe-ingredient-grid-gap: 10px;
    --recipe-ingredient-grid-inset: 12px;
}

.recipe-ingredients-head {
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.recipe-ingredients-head-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.recipe-ingredients-copy {
    margin-top: 0;
    color: rgba(148, 163, 184, 0.92);
    font-size: 13px;
    line-height: 1.45;
}

.recipe-ingredient-grid {
    display: grid;
    grid-template-columns: var(--recipe-ingredient-grid-template);
    gap: var(--recipe-ingredient-grid-gap);
    align-items: center;
}

.recipe-ingredients-table-head {
    margin-bottom: 8px;
    min-height: 38px;
    padding: 6px var(--recipe-ingredient-grid-inset);
    border-bottom: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.22));
}

.recipe-ingredient-head-cell {
    padding: 0;
    color: rgba(191, 219, 254, 0.84);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    text-align: left;
}

.recipe-ingredient-head-cell-action {
    padding: 0;
    text-align: left;
}

.recipe-ingredients-list {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.recipe-ingredient-row {
    gap: 10px;
    align-items: center;
    padding: var(--recipe-ingredient-grid-inset);
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.34));
}

.recipe-ingredient-cell {
    min-width: 0;
}

.recipe-ingredient-cell .recipe-field-label {
    display: none;
}

.recipe-ingredient-cell .recipe-input,
.recipe-ingredient-cell .recipe-select,
.recipe-remove-btn {
    min-height: 48px;
}

.recipe-ingredient-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.recipe-remove-btn {
    width: 100%;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: rgba(15, 23, 42, 0.34);
    color: rgba(148, 163, 184, 0.92);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.recipe-remove-btn:hover,
.recipe-remove-btn:focus {
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-strong);
}

.recipe-status {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: rgba(15, 23, 42, 0.42);
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.recipe-status.is-error {
    border-color: var(--alert-error-border);
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
}

.recipe-status.is-danger {
    border-color: var(--alert-error-border);
    background: var(--alert-error-bg);
    color: var(--alert-error-text);
}

.recipe-status.is-success {
    border-color: var(--alert-success-border);
    background: var(--alert-success-bg);
    color: var(--alert-success-text);
}

.recipe-delete-confirm {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: var(--surface-tinted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.recipe-delete-confirm-sidebar {
    margin-top: 12px;
}

.recipe-delete-confirm-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--text-strong);
    line-height: 1.5;
}

.recipe-delete-confirm-copy strong {
    font-size: 14px;
}

.recipe-delete-confirm-copy span {
    color: var(--muted);
    font-size: 13px;
}

.recipe-delete-confirm-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.recipes-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 0;
}

.recipes-summary-grid .summary-card {
    min-height: 192px;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.recipes-summary-grid .summary-card-title {
    margin-bottom: 12px;
}

.recipes-summary-grid .summary-card-value {
    margin-bottom: 14px;
}

.recipes-summary-grid .summary-card-insight {
    margin-top: auto;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(148, 163, 184, 0.92);
}

.recipe-pricing-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.recipe-pricing-helper {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(251, 191, 36, 0.1);
    background: rgba(251, 191, 36, 0.03);
    color: rgba(254, 243, 199, 0.8);
    font-size: 12px;
    line-height: 1.55;
}

.recipe-pricing-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.recipe-pricing-metric {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 8px;
    min-height: 112px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.34));
}

.recipe-pricing-metric-highlight {
    border-color: rgba(251, 191, 36, 0.18);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(25, 29, 44, 0.78), rgba(15, 23, 42, 0.42));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18), 0 0 22px rgba(251, 191, 36, 0.05);
}

.recipe-pricing-metric-highlight::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.55), transparent);
    animation: recipe-pricing-glow 3.8s ease-in-out infinite;
}

.recipe-pricing-metric-suggested {
    grid-column: 1 / -1;
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.22), 0 0 34px rgba(251, 191, 36, 0.09);
}

.recipe-pricing-metric-label {
    color: rgba(191, 219, 254, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recipe-pricing-metric-value {
    color: var(--text-strong);
    font-size: clamp(1.12rem, 1.35vw, 1.5rem);
    line-height: 1.15;
    font-weight: 900;
}

.recipe-pricing-metric-subtext {
    margin-top: auto;
    color: rgba(191, 219, 254, 0.68);
    font-size: 11px;
    line-height: 1.4;
    font-weight: 700;
}

.recipe-pricing-metric-highlight .recipe-pricing-metric-label {
    color: rgba(254, 243, 199, 0.82);
}

.recipe-pricing-metric-highlight .recipe-pricing-metric-value {
    color: #fff7e0;
    text-shadow: 0 0 16px rgba(251, 191, 36, 0.08);
}

.recipe-pricing-metric-highlight .recipe-pricing-metric-subtext {
    color: rgba(254, 243, 199, 0.72);
}

:root[data-theme="dark"] .recipe-select option {
    background: #18273f;
    color: var(--text-strong);
}

#recipePricingModeSelect {
    position: static;
    z-index: auto;
    pointer-events: auto;
    appearance: auto;
    -webkit-appearance: menulist;
    box-sizing: border-box;
    max-width: 100%;
    overflow: visible;
    background-color: #18273f;
    color: #f8fbff;
}

#recipePricingModeSelect option {
    background: #18273f;
    color: #f8fbff;
}

#recipePricingGoalTypeSelect {
    background-color: #18273f;
    color: #f8fbff;
}

@keyframes recipe-pricing-sheen {
    0%,
    100% {
        opacity: 0.2;
        transform: translateX(-18%);
    }

    50% {
        opacity: 0.72;
        transform: translateX(18%);
    }
}

@keyframes recipe-pricing-glow {
    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 0.9;
    }
}

.recipes-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.recipes-archive-summary {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.24));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.recipes-sidebar .recipes-panel-head {
    display: grid;
    gap: 16px;
}

.recipes-sidebar .recipes-panel-head > div {
    display: grid;
    gap: 8px;
}

.recipes-sidebar .panel-copy {
    max-width: 30ch;
    margin: 0;
    color: rgba(226, 232, 240, 0.74);
}

.recipes-new-recipe-btn,
.recipes-archive-open-btn,
.recipes-sidebar-actions .secondary-btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
}

.recipes-new-recipe-btn {
    box-shadow: 0 10px 24px rgba(244, 114, 182, 0.16);
}

.recipe-list-delete-btn {
    width: 42px;
    min-height: 68px;
    border-radius: 14px;
    border: 1px solid rgba(255, 99, 132, 0.18);
    background: rgba(255, 99, 132, 0.08);
    color: #fecdd3;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.recipe-list-delete-btn:hover,
.recipe-list-delete-btn:focus-visible {
    border-color: rgba(255, 99, 132, 0.38);
    background: rgba(255, 99, 132, 0.16);
    color: #ffffff;
    transform: none;
    outline: none;
}

.recipe-input,
.recipe-select {
    min-height: 44px;
    border-radius: 14px;
}

.recipe-ingredients-card {
    overflow: visible;
}

.recipe-ingredients-table-head {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 38px;
    margin-bottom: 8px;
    padding: 6px var(--recipe-ingredient-grid-inset);
    border-bottom: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.48), rgba(15, 23, 42, 0.22));
}

.recipe-ingredients-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-color: rgba(96, 165, 250, 0.45) transparent;
}

.recipe-ingredient-row {
    position: relative;
    align-items: start;
    padding: 14px 12px;
}

.recipe-ingredient-row.is-product-open {
    z-index: 20;
    margin-bottom: min(54vh, 448px);
}

.recipe-product-search-input {
    font-weight: 700;
}

.recipe-product-search-input.has-clear-action {
    padding-right: 44px;
}

.recipe-product-picker-wrap {
    position: relative;
    width: 100%;
}

.recipe-product-clear-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    color: rgba(219, 234, 254, 0.88);
    font-size: 17px;
    line-height: 1;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.recipe-product-clear-btn:hover,
.recipe-product-clear-btn:focus-visible {
    border-color: rgba(96, 165, 250, 0.34);
    background: rgba(37, 99, 235, 0.18);
    color: #ffffff;
    transform: translateY(-50%) scale(1.04);
    outline: none;
}

.recipe-product-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 60;
    max-height: min(54vh, 448px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98)),
        var(--surface-panel);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(96, 165, 250, 0.08);
    scrollbar-color: rgba(96, 165, 250, 0.45) transparent;
}

.recipe-product-option,
.recipe-product-option-empty {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 11px 12px;
    background: transparent;
    color: rgba(226, 232, 240, 0.94);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    display: block;
}

.recipe-product-option {
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.recipe-product-option:hover,
.recipe-product-option:focus-visible,
.recipe-product-option.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.1));
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.recipe-product-option-empty {
    color: rgba(148, 163, 184, 0.9);
    cursor: default;
}

.recipe-purchase-meta {
    margin-top: 8px;
    color: rgba(148, 163, 184, 0.88);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 700;
}

.recipe-conversion-block {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.recipe-conversion-label {
    color: rgba(148, 163, 184, 0.9);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.recipe-conversion-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    flex-wrap: nowrap;
}

.recipe-conversion-equation {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
}

.recipe-conversion-copy {
    color: rgba(191, 219, 254, 0.82);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.recipe-conversion-unit-select,
.recipe-conversion-input {
    min-height: 36px !important;
    border-radius: 12px;
    font-size: 12px;
}

.recipe-conversion-input {
    width: 110px;
    min-width: 110px;
    flex: 0 0 110px;
    text-align: right;
}

.recipe-purchase-unit-pill {
    min-height: 36px;
    min-width: 56px;
    max-width: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background: rgba(15, 23, 42, 0.5);
    color: rgba(226, 232, 240, 0.9);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-conversion-unit-select {
    width: 78px;
    min-width: 78px;
    flex: 0 0 78px;
}

.recipe-conversion-copy.is-target-unit {
    min-width: 34px;
    flex-shrink: 0;
    color: rgba(226, 232, 240, 0.95);
}

.recipe-conversion-info {
    position: relative;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: rgba(37, 99, 235, 0.12);
    color: rgba(219, 234, 254, 0.96);
    font-size: 12px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    margin-left: auto;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.recipe-conversion-info:hover,
.recipe-conversion-info:focus-visible {
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(37, 99, 235, 0.22);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), 0 10px 22px rgba(15, 23, 42, 0.24);
    transform: translateY(-1px);
    outline: none;
}

.recipe-conversion-info::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 220px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(15, 23, 42, 0.98);
    color: rgba(241, 245, 249, 0.96);
    font-size: 11px;
    line-height: 1.45;
    font-weight: 700;
    text-align: left;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 40;
}

.recipes-library-open-btn {
    flex-shrink: 0;
}

.recipes-view-all-btn {
    margin-top: 10px;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: rgba(147, 197, 253, 0.88);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.18s ease, transform 0.18s ease;
}

.recipes-view-all-btn:hover,
.recipes-view-all-btn:focus-visible {
    color: #ffffff;
    transform: translateX(2px);
    outline: none;
}

.recipes-archive-open-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

.recipes-library-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
    animation: recipeLibraryFade 0.2s ease;
}

.recipes-library-overlay[hidden] {
    display: none !important;
}

.recipes-library-panel {
    width: min(78vw, 1480px);
    max-height: min(80vh, 900px);
    display: flex;
    flex-direction: column;
    padding: 26px;
    border-radius: 28px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(11, 18, 32, 0.98));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.08);
      animation: recipeLibraryRise 0.24s ease;
  }

.recipes-library-content {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 18px;
    margin-top: 16px;
}

.recipes-library-head,
.recipes-library-toolbar,
.recipes-library-head {
    justify-content: space-between;
    gap: 16px;
}

.recipes-library-subtitle {
    margin-top: 8px;
    max-width: none;
}

.recipes-library-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.recipes-library-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: rgba(15, 23, 42, 0.42);
}

.recipes-library-search {
    flex: 1 1 320px;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    border-radius: 16px;
}

.recipes-library-sort {
    width: 210px;
    flex: 0 0 210px;
    max-width: 210px;
    min-height: 54px;
    border-radius: 16px;
}

.recipes-library-list {
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-color: rgba(96, 165, 250, 0.45) transparent;
}

.recipes-library-detail {
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.recipes-library-detail-card,
.recipes-library-detail-empty {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.46));
}

.recipes-library-detail-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.2rem;
    font-weight: 900;
}

.recipes-library-detail-meta,
.recipes-library-detail-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    font-weight: 700;
}

.recipes-library-detail-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.recipes-library-detail-kpi {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: rgba(15, 23, 42, 0.44);
}

.recipes-library-detail-kpi span {
    color: rgba(148, 163, 184, 0.88);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.recipes-library-detail-kpi strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
}

.recipes-library-detail-section {
    display: grid;
    gap: 10px;
}

.recipes-library-detail-list {
    display: grid;
    gap: 10px;
}

.recipes-library-detail-pricing-grid {
    display: grid;
    gap: 10px;
}

.recipes-library-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.08);
    background: rgba(15, 23, 42, 0.38);
}

.recipes-library-detail-row strong {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
}

.recipes-library-detail-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.recipes-library-row-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) auto;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.48));
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.recipes-library-row {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: inherit;
    transition: none;
}

.recipes-library-row-shell.is-active,
.recipes-library-row-shell:hover,
.recipes-library-row-shell:focus-within {
    border-color: rgba(96, 165, 250, 0.28);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.72));
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(96, 165, 250, 0.08);
}

.recipes-library-row:focus-visible,
.recipes-library-delete-btn:focus-visible {
    outline: none;
}

.recipes-library-main-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipes-library-name {
    color: var(--text-strong);
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.recipes-library-meta,
.recipes-library-preview {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.recipes-library-preview {
    opacity: 0;
    transition: opacity 0.18s ease;
}

.recipes-library-row-shell:hover .recipes-library-preview,
.recipes-library-row-shell:focus-within .recipes-library-preview,
.recipes-library-row-shell.is-active .recipes-library-preview {
    opacity: 1;
}

.recipes-library-metrics {
    display: contents;
}

.recipes-library-metric {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, 0.1);
    background: rgba(15, 23, 42, 0.44);
    text-align: center;
}

.recipes-library-metric.total {
    min-width: 0;
}

.recipes-library-metric-label {
    color: rgba(148, 163, 184, 0.88);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.recipes-library-metric strong {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1;
    font-weight: 900;
}

.recipes-library-metric:first-child strong {
    color: var(--primary);
}

.recipes-library-delete-btn {
    width: 46px;
    min-height: 46px;
    align-self: center;
}

.recipes-library-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    align-self: center;
}

.recipe-library-delete-confirm {
    margin-left: 0;
}

.recipes-library-empty-state {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 24px;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.38));
    text-align: center;
}

.recipes-library-empty-title {
    color: var(--text-strong);
    font-size: 1.4rem;
    font-weight: 900;
}

.recipes-library-empty-copy {
    max-width: 320px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    font-weight: 700;
}

@keyframes recipeLibraryFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes recipeLibraryRise {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 720px) {
    .recipes-library-overlay {
        padding: 12px;
    }

    .recipes-library-panel {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 16px;
    }

    .recipes-library-content {
        grid-template-columns: 1fr;
    }

    .recipes-library-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .recipes-library-sort {
        width: 100%;
        flex-basis: auto;
    }

    .recipes-library-row {
        width: 100%;
    }

    .recipes-library-row-shell {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .recipes-library-delete-btn {
        width: 100%;
    }

    .recipes-library-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }
}

.recipe-conversion-info:hover::after,
.recipe-conversion-info:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.recipe-unit-warning {
    margin-top: 8px;
    color: rgba(251, 191, 36, 0.9);
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
}

.recipes-summary-grid {
    gap: 14px;
}

.recipe-delete-confirm-sidebar {
    margin-top: 0;
}

.ai-workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.ai-workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-workspace-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
    gap: 18px;
}

.ai-preset-panel,
.ai-answer-shell {
    border: 1px solid var(--line-soft);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.ai-preset-panel {
    padding: 20px;
}

.ai-panel-head {
    margin-bottom: 16px;
}

.ai-panel-kicker,
.ai-answer-action-label,
.ai-followup-label,
.ai-input-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ai-panel-title {
    margin: 8px 0 0;
    color: var(--text-strong);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
}

.ai-preset-grid,
.ai-followup-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.ai-preset-card,
.ai-followup-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ai-preset-card:hover,
.ai-followup-chip:hover,
.ai-preset-card.is-active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(37, 99, 235, 0.26);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-strong));
}

.ai-preset-card-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ai-preset-card-text,
.ai-followup-chip {
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
}

.ai-answer-shell {
    padding: 20px;
}

.ai-question-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.ai-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-question-input {
    flex: 1 1 auto;
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-strong));
    color: var(--text);
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ai-question-input:hover {
    border-color: rgba(37, 99, 235, 0.24);
}

.ai-question-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow-soft);
}

.ai-submit-btn {
    min-width: 150px;
}

.ai-answer-panel {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 28%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.ai-answer-state {
    color: var(--muted);
    line-height: 1.7;
}

.ai-answer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.ai-answer-period,
.ai-answer-source {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: var(--surface-chip);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.ai-answer-headline {
    margin: 0 0 14px;
    color: var(--text-strong);
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.ai-answer-insights {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.ai-answer-insights li {
    margin-bottom: 10px;
    line-height: 1.62;
}

.ai-answer-action-shell {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.ai-answer-action {
    margin: 8px 0 0;
    color: var(--text-strong);
    line-height: 1.7;
}

.ai-followup-shell {
    margin-top: 18px;
}

.ai-followup-row {
    margin-top: 10px;
}

.ai-followup-chip {
    align-items: flex-start;
    padding: 14px 15px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.dashboard-section-copy {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.decision-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.decision-grid-solo {
    grid-template-columns: minmax(0, 1fr);
}

.decision-card {
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-panel), var(--surface-base));
}

.decision-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.decision-card-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.2rem;
    font-weight: 800;
}

.decision-card-copy {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.6;
}

.decision-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.decision-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-tinted);
    border: 1px solid var(--line-soft);
}

.decision-item-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 14px;
    background: var(--pill-overpay-bg);
    color: var(--pill-overpay-text);
    font-size: 13px;
    font-weight: 800;
}

.decision-item-rank.supplier {
    background: var(--pill-good-bg);
    color: var(--pill-good-text);
}

.decision-item-title {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
}

.decision-item-meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.decision-item-value {
    font-size: 15px;
    font-weight: 800;
    text-align: right;
}

.decision-item-value.negative {
    color: var(--pill-overpay-text);
}

.decision-item-value.positive {
    color: var(--pill-good-text);
}

.recipe-breakdown-card .decision-list {
    gap: 12px;
}

.recipe-breakdown-card .decision-item {
    align-items: start;
    padding: 16px 18px;
    border-color: rgba(96, 165, 250, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.34));
}

.recipe-ingredient-breakdown-card .decision-item {
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: start;
    padding: 18px 20px;
    border-radius: 18px;
}

.recipe-ingredient-breakdown-card .decision-item-rank.supplier {
    width: 88px;
    min-width: 88px;
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-transform: none;
    box-sizing: border-box;
}

.recipe-ingredient-breakdown-card .decision-item-body {
    min-width: 0;
}

.recipe-ingredient-breakdown-card .decision-item-value {
    align-self: start;
    padding-top: 2px;
}

.recipe-breakdown-card .decision-item-title {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.recipe-breakdown-card .decision-item-meta {
    margin-top: 6px;
    color: rgba(148, 163, 184, 0.92);
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.recipe-breakdown-card .decision-item-value {
    line-height: 1.25;
    white-space: nowrap;
}

.decision-list-empty {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-tinted);
    border: 1px solid var(--line-soft);
    color: var(--muted);
    line-height: 1.6;
}

.chart-card.wide {
    grid-column: span 2;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.chart-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.chart-subtitle {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.55;
    margin-top: 4px;
}

.chart-takeaway {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 35%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    border: 1px solid var(--line-soft);
    color: var(--text-strong);
    font-size: 13px;
    line-height: 1.6;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.chart-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.chart-card canvas {
    display: block;
    width: 100% !important;
    height: 300px !important;
    padding: 4px 2px 0;
}

.status-mix-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.82fr) minmax(260px, 1fr);
    gap: 18px;
    align-items: center;
}

.status-mix-chart-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 4px 0;
}

.status-mix-chart-shell canvas {
    height: 240px !important;
    max-width: 240px;
    padding: 0 !important;
}

.status-mix-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-mix-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.status-mix-kpi {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-tinted));
    box-shadow: var(--shadow-soft);
}

.status-mix-kpi-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-mix-kpi-value {
    margin-top: 10px;
    color: var(--text-strong);
    font-size: clamp(1.2rem, 1.8vw, 1.65rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.status-mix-kpi-copy {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.status-mix-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-mix-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.status-mix-row-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 700;
}

.status-mix-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.status-mix-dot.overpay { background: var(--chart-status-1); }
.status-mix-dot.good { background: var(--chart-status-2); }
.status-mix-dot.normal { background: var(--chart-status-3); }

.status-mix-row-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-mix-row-value {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.result-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--primary-ring);
    background: var(--surface-chip);
    color: var(--primary-strong);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel {
    position: relative;
    z-index: 20;
    isolation: isolate;
    overflow: visible;
    margin-bottom: 18px;
    padding: 0;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: var(--filter-shell-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.filter-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, var(--filter-accent-glow), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 26%);
    opacity: 0.9;
}

.workspace-filter-block {
    margin: 0 0 18px;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: var(--filter-shell-bg);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 18px;
    z-index: 40;
}

.workspace-filter-block .collapsible-toggle {
    border-bottom: 1px solid var(--line-soft);
}

.collapsible-toggle-subpanel {
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--filter-shell-bg);
}

.workspace-filter-block .collapsible-toggle-kicker {
    font-size: 0.98rem;
    letter-spacing: -0.01em;
}

.workspace-filter-block .collapsible-toggle-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

body.filters-open .filter-panel {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow);
}

body.filters-open .dashboard-grid,
body.filters-open .decision-grid,
body.filters-open .executive-summary,
body.filters-open .summary-grid,
body.filters-open .table-shell {
    opacity: 0.72;
    filter: saturate(0.9);
    transition: opacity 0.18s ease, filter 0.18s ease;
}

body.filters-open .table-shell {
    opacity: 0.6;
    filter: saturate(0.88) blur(1px);
}

body.filters-open .table-wrap,
body.filters-open th,
body.filters-open tbody tr {
    transition: opacity 0.18s ease, filter 0.18s ease, background 0.18s ease;
}

body.filters-open .table-wrap {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.filter-panel-head,
.filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-panel-head {
    position: relative;
    z-index: 1;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent), var(--filter-inner-bg);
}

.filter-panel-title {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
}

.filter-panel-copy,
.filter-summary-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.filter-panel-copy {
    margin: 6px 0 0;
}

.filter-grid {
    position: relative;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 18px 18px 14px;
}

.filter-field {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-field.span-2 {
    grid-column: span 2;
}

.filter-date-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.search-input-shell,
.date-input-inline {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-strong));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

.search-input-shell:hover,
.date-input-inline:hover {
    border-color: rgba(37, 99, 235, 0.24);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
}

.search-input-shell:focus-within,
.date-input-inline:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-ring), var(--shadow-soft);
}

.date-range-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.date-input-empty {
    position: absolute;
    left: 14px;
    right: 40px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.16s ease;
}

.date-input-inline.has-value .date-input-empty,
.date-input-inline:focus-within .date-input-empty {
    opacity: 0;
}

.filter-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.search-input {
    width: 100%;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.18s ease;
}

.search-input::placeholder {
    color: var(--muted);
    opacity: 1;
    font-weight: 500;
}

.search-input:focus,
.date-input:focus {
    outline: none;
    box-shadow: none;
}

.date-input {
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 14px;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    color: var(--text-strong);
    appearance: none;
    -webkit-appearance: none;
}

.date-input-inline:not(.has-value) .date-input {
    color: transparent;
}

.qc2-history-date-shell {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 0 44px 0 14px;
}

.qc2-history-date-shell.has-value {
    padding-right: 118px;
}

.qc2-history-date-clear {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.45);
    color: rgba(226, 232, 240, 0.9);
    padding: 6px 10px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    z-index: 5;
}

.qc2-history-date-clear:hover,
.qc2-history-date-clear:focus-visible {
    color: #ffffff;
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(30, 41, 59, 0.7);
    outline: none;
}

.qc2-history-date-trigger {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dbe2ea' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2' ry='2'/%3E%3Cline x1='16' y1='3' x2='16' y2='7'/%3E%3Cline x1='8' y1='3' x2='8' y2='7'/%3E%3Cline x1='3' y1='11' x2='21' y2='11'/%3E%3C/svg%3E");
    opacity: 0.9;
    cursor: pointer;
    z-index: 4;
}

.qc2-history-date-trigger:hover,
.qc2-history-date-trigger:focus-visible {
    opacity: 1;
    outline: none;
}

.qc2-history-date-value {
    display: flex;
    align-items: center;
    min-height: 48px;
    width: 100%;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.qc2-history-date-value.is-placeholder {
    color: rgba(191, 219, 254, 0.70);
    font-weight: 500;
}

.qc2-history-date-shell .date-input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    opacity: 0;
    z-index: 3;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
}

.qc2-history-date-shell .date-input::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    color: transparent;
    cursor: pointer;
}

.qc2-history-date-shell .date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(148, 163, 184, 0.10);
}

.date-input::-webkit-datetime-edit {
    padding: 0;
    color: var(--text-strong);
}

.date-input::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.date-input::-webkit-datetime-edit-text {
    color: var(--muted);
    padding-inline: 3px;
}

.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit,
.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit-fields-wrapper,
.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit-text,
.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit-month-field,
.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit-day-field,
.date-input-inline:not(.has-value) .date-input::-webkit-datetime-edit-year-field {
    color: transparent;
}

.date-input::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 4px 2px 4px 8px;
    border-radius: 10px;
    opacity: 0.58;
    cursor: pointer;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 0.9;
    background: rgba(37, 99, 235, 0.08);
}

.date-input::-webkit-clear-button,
.date-input::-webkit-inner-spin-button {
    display: none;
}

:root[data-theme="dark"] .search-input-shell,
:root[data-theme="dark"] .date-input-inline {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.88);
}

.searchable-select {
    position: relative;
    z-index: 1;
}

.searchable-select.is-open {
    z-index: 2;
}

.searchable-select-trigger,
.filter-popover-search {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-panel-soft));
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.searchable-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    cursor: pointer;
    text-align: left;
}

.searchable-select-trigger::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.6;
    margin-top: -4px;
    flex: 0 0 auto;
}

.searchable-select.is-open .searchable-select-trigger {
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface-panel));
    box-shadow: 0 0 0 4px var(--primary-ring), 0 18px 34px rgba(15, 23, 42, 0.12);
}

.filter-popover-root {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
}

.filter-popover-panel {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    padding: 12px;
    min-width: 220px;
    max-width: min(420px, calc(100vw - 32px));
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(circle at top right, var(--bg-accent-2), transparent 28%),
        linear-gradient(180deg, var(--surface-elevated), var(--surface));
    box-shadow: 0 26px 58px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
}

body.filters-open .filter-popover-panel {
    border-color: rgba(37, 99, 235, 0.18);
}

:root[data-theme="dark"] body.filters-open .filter-panel {
    box-shadow: 0 28px 60px rgba(2, 6, 23, 0.34);
}

:root[data-theme="dark"] body.filters-open .dashboard-grid,
:root[data-theme="dark"] body.filters-open .decision-grid,
:root[data-theme="dark"] body.filters-open .executive-summary,
:root[data-theme="dark"] body.filters-open .summary-grid,
:root[data-theme="dark"] body.filters-open .table-shell {
    opacity: 0.7;
    filter: saturate(0.86);
}

:root[data-theme="dark"] body.filters-open .table-shell {
    opacity: 0.56;
    filter: saturate(0.82) blur(1px);
}

:root[data-theme="dark"] .searchable-select.is-open .searchable-select-trigger {
    box-shadow: 0 0 0 4px var(--primary-ring), 0 20px 36px rgba(2, 6, 23, 0.28);
}

:root[data-theme="dark"] .filter-popover-panel {
    box-shadow: 0 30px 64px rgba(2, 6, 23, 0.34);
}

.filter-popover-search {
    padding: 0 16px;
}

.filter-popover-search:focus,
.searchable-select-trigger:focus {
    outline: none;
}

.filter-popover-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.filter-popover-option {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.filter-popover-option:hover,
.filter-popover-option:focus {
    outline: none;
    background: var(--primary-soft);
    border-color: var(--primary);
}

.filter-popover-option.is-selected {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--text-strong);
    font-weight: 700;
}

.filter-popover-empty {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 18px 18px;
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, var(--surface-elevated), var(--surface));
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.filter-chip:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    background: linear-gradient(180deg, var(--surface-elevated), var(--primary-soft));
}

.filter-chip button {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
}

.filter-chip button:hover {
    color: var(--primary);
}

.filter-btn {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.filter-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    border-color: transparent;
    box-shadow: var(--button-shadow);
}

.filter-btn.ghost {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.filter-btn.ghost:hover {
    box-shadow: var(--shadow-soft);
}

.is-hidden {
    display: none !important;
}

.table-wrap {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-table);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), var(--shadow-soft);
    min-height: 0;
    max-height: min(82vh, 1040px);
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 980px;
}

th,
td {
    padding: 12px 11px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    white-space: nowrap;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--table-head-bg);
    color: var(--table-head-text);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    white-space: nowrap;
}

th:first-child,
td:first-child {
    min-width: 50px;
}

.column-header {
    position: relative;
    user-select: none;
    cursor: grab;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        var(--table-head-bg);
    transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.column-header:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        var(--table-head-bg);
}

.column-header.is-dragging {
    opacity: 0.62;
    transform: translateY(-1px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.08)),
        var(--table-head-bg);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    cursor: grabbing;
}

.column-header.is-drop-target::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: -1px;
    width: 2px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

:root[data-theme="dark"] .column-header:hover {
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.08), rgba(30, 41, 59, 0.06)),
        var(--table-head-bg);
}

:root[data-theme="dark"] .column-header.is-dragging {
    background:
        linear-gradient(180deg, rgba(148, 163, 184, 0.05), rgba(2, 6, 23, 0.16)),
        var(--table-head-bg);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.34);
}

.sort-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.sort-button:hover { opacity: 0.92; }

.column-header .sort-button {
    cursor: inherit;
}

.sort-button span {
    pointer-events: none;
}

.sort-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sort-indicator {
    flex: 0 0 auto;
    min-width: 14px;
    color: var(--table-head-muted);
    font-size: 0;
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
    opacity: 0.75;
}

.sort-indicator::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transform-origin: center;
}

.sort-button.active .sort-indicator { color: white; opacity: 1; }

.sort-button.active .sort-indicator::before {
    transform: rotate(45deg) translateY(-1px);
}

.sort-button.active[data-direction="desc"] .sort-indicator::before {
    transform: rotate(-135deg) translateY(-1px);
}

tr.overpay-row { background: linear-gradient(90deg, rgba(239, 68, 68, 0.18), var(--row-overpay)); }
tr.good-row { background: linear-gradient(90deg, rgba(34, 197, 94, 0.18), var(--row-good)); }
tr.normal-row { background: var(--row-normal); }
tbody tr {
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

tbody tr:hover {
    background: var(--row-hover);
    box-shadow: inset 4px 0 0 var(--accent-primary);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 800;
}

.status-overpay {
    background: var(--pill-overpay-bg);
    color: var(--pill-overpay-text);
}

.status-good {
    background: var(--pill-good-bg);
    color: var(--pill-good-text);
}

.status-normal {
    background: var(--pill-normal-bg);
    color: var(--pill-normal-text);
}

.empty-state {
    display: none;
    padding: 34px 18px;
    text-align: center;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-strong);
    font-size: 1rem;
}

canvas {
    width: 100% !important;
    max-height: 320px !important;
}

:root[data-panel-tone="mist"] {
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.97);
    --surface-soft: rgba(255, 255, 255, 0.78);
}

:root[data-panel-tone="ink"] {
    --surface: rgba(245, 248, 255, 0.74);
    --surface-strong: rgba(240, 245, 255, 0.90);
    --surface-soft: rgba(233, 239, 252, 0.68);
}

body[data-density="compact"] .collapsible-toggle {
    padding: 13px 16px;
}

body[data-density="compact"] .hero-main-compact,
body[data-density="compact"] .upload-box,
body[data-density="compact"] .table-shell,
body[data-density="compact"] .decision-view-shell {
    padding: 20px;
}

body[data-density="compact"] .summary-card,
body[data-density="compact"] .chart-card,
body[data-density="compact"] .decision-card,
body[data-density="compact"] .top-insight-card,
body[data-density="compact"] .action-priority-panel,
body[data-density="compact"] .hero-insight-card {
    padding: 18px;
}

body[data-density="compact"] .upload-box .upload-dropzone {
    padding: 12px 12px;
}

body[data-density="compact"] .table-wrap th,
body[data-density="compact"] .table-wrap td {
    padding: 16px 14px;
}

@media (max-width: 1100px) {
    .hero,
    .decision-grid,
    .decision-actions-grid,
    .dashboard-grid,
    .recipes-layout,
    .recipes-summary-grid,
    .quote-compare-layout,
    .quote-compare-form-grid,
    .quote-compare-summary-grid,
    .filter-grid,
    .executive-summary-body,
    .top-insights-grid,
    .hero-insight-metrics,
    .ai-workspace-grid {
        grid-template-columns: 1fr;
    }

    .quote-compare-filters,
    .quote-bid-grid {
        grid-template-columns: 1fr;
    }

    .quote-upload-shell {
        align-items: flex-start;
    }

    .quote-demo-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-card.wide { grid-column: span 1; }
    .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .upload-meta { grid-template-columns: 1fr; }
    .filter-field.span-2 { grid-column: span 1; }
    .dashboard-section-head { flex-direction: column; align-items: stretch; }

    .status-mix-layout,
    .status-mix-kpis {
        grid-template-columns: 1fr;
    }

    .status-mix-chart-shell {
        min-height: 220px;
    }

    .recipes-form-grid,
    .recipe-pricing-form,
    .recipe-pricing-metrics,
    .recipe-ingredient-grid,
    .quote-bid-grid {
        grid-template-columns: 1fr;
    }

    .recipe-ingredients-table-head {
        display: none;
    }

    .recipe-ingredients-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .recipe-breakdown-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .recipe-ingredient-cell .recipe-field-label {
        display: block;
    }

    .recipe-ingredient-action,
    .recipe-ingredient-head-cell-action {
        justify-content: stretch;
        text-align: left;
    }

    .recipe-remove-btn {
        width: 100%;
    }

    .quote-bid-footer {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 760px) {
    body { padding: 18px; }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .app-view-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .app-view-tab {
        width: 100%;
        text-align: center;
    }

    .side-panel {
        top: auto;
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-height: min(calc(100vh - 32px), 560px);
    }

    .side-panel-left,
    .side-panel-right {
        transform: translateY(18px);
    }

    .side-panel.is-open {
        transform: translateY(0);
    }

    .hero-main,
    .hero-side,
    .upload-box,
    .table-shell {
        padding: 20px;
    }

    .collapsible-toggle {
        padding: 16px 18px;
    }

    .hero-step {
        grid-template-columns: 1fr;
    }

    .hero-compact-head,
    .hero-steps-compact {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hero-step-index {
        min-width: 0;
        justify-self: start;
    }

    .summary-grid { grid-template-columns: 1fr; }

    .upload-header,
    .table-header,
    .upload-row,
    .quick-links,
    .table-header-actions,
    .filter-actions,
    .filter-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .sample-links,
    .executive-summary-actions,
    .demo-cta-shell,
    .demo-cta-actions,
    .ai-entry-actions,
    .ai-workspace-header-actions,
    .ai-input-row {
        align-items: stretch;
    }

    .demo-cta-shell,
    .demo-cta-actions,
    .ai-entry-shell,
    .ai-input-row {
        flex-direction: column;
    }

    .custom-file-label,
    .action-btn,
    .secondary-btn {
        width: 100%;
    }

    .upload-success-row {
        flex-direction: column;
        align-items: stretch;
    }

    #uploadPanel .upload-row,
    #uploadPanel .demo-cta-shell {
        grid-template-columns: 1fr;
    }

    #uploadPanel .demo-cta-actions {
        justify-content: flex-start;
    }

    .filter-date-group {
        grid-template-columns: 1fr;
    }

    .date-range-separator {
        min-height: 16px;
    }

.summary-grid { grid-template-columns: 1fr; }
}

/* ===== PRODUCT HISTORY TABLE - FULLY DYNAMIC FINAL ===== */

.qc2-history-section {
    display: grid;
    gap: 12px;
    padding-top: 6px;
    overflow: hidden;
}

.qc2-history-table-block {
    padding-top: 2px;
    overflow: visible;
}

.qc2-history-table-shell {
    max-width: 100%;
    border: 1px solid rgba(125, 167, 255, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(18, 34, 58, 0.96), rgba(12, 24, 42, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 40px rgba(2, 6, 23, 0.26);
    overflow: hidden;
}

.qc2-history-table-scroll {
    max-height: 520px;
    max-width: 100%;
    overflow: auto;
    contain: content;
}

.qc2-history-table {
    width: 100%;
    min-width: 1200px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.qc2-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px 12px;
    background: linear-gradient(180deg, rgba(28, 58, 98, 0.98), rgba(20, 49, 84, 0.98));
    color: rgba(255,255,255,0.92);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid rgba(125, 167, 255, 0.18);
}

.qc2-history-table thead th.qc2-history-sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.qc2-history-table thead th.qc2-history-sortable-header:hover {
    background: linear-gradient(180deg, rgba(38, 73, 119, 0.98), rgba(26, 58, 98, 0.98));
    color: rgba(255, 255, 255, 0.98);
}

.qc2-history-table thead th.qc2-history-sortable-header:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.85);
}

.qc2-history-sortable-head-copy {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.qc2-history-sortable-label {
    min-width: 0;
}

.qc2-history-sortable-indicator {
    flex: 0 0 auto;
    color: rgba(191, 219, 254, 0.82);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0;
}

.qc2-history-table thead th.qc2-history-sortable-header.is-sort-active {
    background: linear-gradient(180deg, rgba(43, 84, 136, 0.98), rgba(28, 67, 112, 0.98));
    color: #ffffff;
    box-shadow: inset 0 -1px 0 rgba(147, 197, 253, 0.35);
}

.qc2-history-table thead th.qc2-history-sortable-header.is-sort-active .qc2-history-sortable-indicator {
    color: #ffffff;
}

.qc2-history-table thead th.qc2-history-sortable-header.is-sort-asc .qc2-history-sortable-indicator,
.qc2-history-table thead th.qc2-history-sortable-header.is-sort-desc .qc2-history-sortable-indicator {
    transform: translateY(-0.5px);
}

.qc2-history-table tbody td {
    padding: 16px 12px;
    color: rgba(240, 246, 255, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    vertical-align: top;
    background: transparent;
}

.qc2-history-table tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.015);
}

.qc2-history-table tbody tr:hover td {
    background: rgba(109, 168, 255, 0.08);
}

.qc2-history-cell-product,
.qc2-history-cell-supplier,
.qc2-history-cell-unit {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.42;
}

.qc2-history-cell-date,
.qc2-history-cell-quantity,
.qc2-history-cell-unitPrice,
.qc2-history-cell-totalPrice,
.qc2-history-cell-changeValue,
.qc2-history-cell-changePercent {
    white-space: nowrap;
}

.qc2-history-cell-quantity,
.qc2-history-cell-unitPrice,
.qc2-history-cell-totalPrice,
.qc2-history-cell-changeValue,
.qc2-history-cell-changePercent {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.qc2-history-cell-totalPrice,
.qc2-history-cell-changeValue,
.qc2-history-cell-changePercent {
    font-weight: 700;
}

.qc2-history-table th.qc2-history-cell-date,
.qc2-history-table td.qc2-history-cell-date {
    white-space: nowrap;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}

.qc2-history-table thead th:first-child,
.qc2-history-table tbody td:first-child {
    white-space: nowrap;
    width: 110px;
    min-width: 110px;
    max-width: 110px;
}

.qc2-history-cell-unit {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 90px;
}

.qc2-history-cell-quantity {
    white-space: nowrap;
    min-width: 52px;
}

.qc2-history-cell-unitPrice {
    white-space: nowrap;
    min-width: 90px;
}

.qc2-history-cell-totalPrice {
    white-space: nowrap;
    min-width: 105px;
}

.qc2-history-cell-changeValue {
    white-space: nowrap;
    min-width: 90px;
}

.qc2-history-cell-changePercent {
    white-space: nowrap;
    min-width: 72px;
}

.qc2-history-cell-product,
.qc2-history-cell-supplier {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.42;
    min-width: 180px;
}

.qc2-history-table thead th,
.qc2-history-table tbody td {
    padding-left: 10px;
    padding-right: 10px;
}

.qc2-history-columns-btn {
    min-width: 102px;
}

.qc2-history-columns-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 12;
    width: min(260px, 78vw);
}

.qc2-history-table tbody tr[data-qc-history-row] {
    cursor: pointer;
    transition: box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.qc2-history-table tbody tr[data-qc-history-row]:hover td {
    background: rgba(125, 167, 255, 0.12);
}

.qc2-history-table tbody tr[data-qc-history-row]:focus-visible {
    outline: none;
}

.qc2-history-table tbody tr[data-qc-history-row]:focus-visible td,
.qc2-history-table tbody tr.is-history-row-selected td {
    background: rgba(96, 165, 250, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), inset 0 0 0 1px rgba(147, 197, 253, 0.18);
}

.qc2-history-selected-series-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 167, 255, 0.14);
    background: linear-gradient(180deg, rgba(25, 45, 72, 0.92), rgba(16, 30, 50, 0.96));
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.18);
}

.qc2-history-selected-series-stats {
    display: grid;
    gap: 4px;
    color: rgba(191, 219, 254, 0.82);
    font-size: 12px;
    text-align: right;
}

.qc2-trend-list-series {
    display: grid;
    gap: 12px;
}

.qc2-trend-value {
    display: grid;
    gap: 4px;
}

.qc2-trend-value-sub {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.qc2-history-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(8px);
    z-index: 120;
}

.qc2-product-summary-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(8px);
    z-index: 124;
}

.qc2-product-summary-drawer {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: min(760px, calc(100vw - 32px));
    padding: 20px;
    overflow: auto;
    z-index: 125;
    border-radius: 26px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 18, 34, 0.98));
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255,255,255,0.04);
}

.qc2-product-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-product-summary-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
    gap: 12px;
    margin-top: 18px;
}

.qc2-product-summary-kpi {
    display: grid;
    grid-template-rows: minmax(32px, auto) minmax(34px, auto) minmax(34px, 1fr);
    align-content: start;
    gap: 8px;
    min-height: 132px;
    height: 100%;
}

.qc2-product-summary-kpi .summary-card-title {
    min-height: 32px;
    margin: 0;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-product-summary-kpi .summary-card-value {
    min-height: 34px;
    margin: 0;
    align-self: center;
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-product-summary-kpi .summary-card-insight {
    min-height: 34px;
    margin: 0;
    align-self: start;
    line-height: 1.32;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-product-summary-insights {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.qc2-product-summary-insight {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(125, 167, 255, 0.12);
    background: rgba(30, 41, 59, 0.56);
    color: rgba(240, 246, 255, 0.92);
    line-height: 1.55;
}

.qc2-product-summary-timeline {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.qc2-product-summary-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 167, 255, 0.1);
    background: rgba(15, 23, 42, 0.56);
}

.qc2-product-summary-item.is-highlighted {
    border-color: rgba(96, 165, 250, 0.24);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.18), rgba(15, 23, 42, 0.62));
}

.qc2-product-summary-item-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: rgba(226, 232, 240, 0.9);
    font-size: 12px;
    font-weight: 700;
}

.qc2-product-summary-item-copy {
    margin-top: 6px;
    color: rgba(191, 219, 254, 0.76);
    font-size: 12px;
    line-height: 1.5;
}

.qc2-history-detail-drawer {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: min(760px, calc(100vw - 32px));
    padding: 20px;
    overflow: auto;
    z-index: 121;
    border-radius: 26px;
    border: 1px solid rgba(125, 167, 255, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 18, 34, 0.98));
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255,255,255,0.04);
}

.qc2-history-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qc2-history-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    color: rgba(191, 219, 254, 0.82);
    font-size: 12px;
}

.qc2-history-chart-shell {
    margin-top: 18px;
    padding: 16px;
    height: 320px;
    border-radius: 20px;
    border: 1px solid rgba(125, 167, 255, 0.12);
    background: linear-gradient(180deg, rgba(18, 34, 58, 0.76), rgba(9, 19, 35, 0.9));
}

.qc2-history-chart {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.qc2-history-chart-point circle {
    fill: #e0f2fe;
    stroke: #38bdf8;
    stroke-width: 2;
}


.qc2-history-detail-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: stretch;
    gap: 12px;
    margin-top: 18px;
}

.qc2-history-detail-kpi {
    display: grid;
    grid-template-rows: minmax(32px, auto) minmax(34px, auto) minmax(0, 1fr);
    align-content: start;
    gap: 8px;
    min-height: 132px;
    height: 100%;
}

.qc2-history-detail-kpi .summary-card-title {
    min-height: 32px;
    margin: 0;
    color: rgba(191, 219, 254, 0.82);
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-wrap: balance;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-kpi .summary-card-value {
    min-height: 34px;
    margin: 0;
    align-self: center;
    color: rgba(248, 250, 252, 0.98);
    line-height: 1.08;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-kpi .summary-card-insight {
    min-height: 0;
    margin: 0;
    line-height: 1.32;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-kpi-current-supplier .summary-card-value {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.22;
    font-weight: 700;
}

.qc2-history-detail-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.qc2-history-detail-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.qc2-history-detail-section-title {
    color: rgba(191, 219, 254, 0.86);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qc2-history-detail-section-suppliers {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    background: linear-gradient(180deg, rgba(18, 34, 58, 0.82), rgba(12, 24, 42, 0.72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qc2-history-detail-suppliers {
    display: grid;
    gap: 8px;
}

.qc2-history-detail-supplier-card {
    padding: 11px 13px;
    border-radius: 15px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(25, 47, 78, 0.7), rgba(16, 31, 53, 0.6));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.qc2-history-detail-supplier-card.is-lowest {
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.qc2-history-detail-supplier-card.is-highest {
    border-color: rgba(251, 146, 60, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 0 1px rgba(249, 115, 22, 0.08);
}

.qc2-history-detail-supplier-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.qc2-history-detail-supplier-name {
    display: block;
    flex: 1 1 auto;
    color: #f8fafc;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    max-width: 100%;
    min-width: 0;
}

.qc2-history-detail-supplier-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qc2-history-detail-supplier-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.qc2-history-detail-supplier-badge.is-lowest {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: #bbf7d0;
}

.qc2-history-detail-supplier-badge.is-highest {
    background: rgba(249, 115, 22, 0.14);
    border: 1px solid rgba(251, 146, 60, 0.2);
    color: #fdba74;
}

.qc2-history-detail-supplier-meta {
    margin-top: 6px;
    color: rgba(191, 219, 254, 0.58);
    font-size: 10px;
    line-height: 1.35;
}

.qc2-history-detail-supplier-price {
    margin-top: 2px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.16;
}

.qc2-history-detail-insights {
    display: grid;
    gap: 10px;
    margin-top: 0;
}

.qc2-history-detail-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(125, 167, 255, 0.12);
    background: rgba(30, 41, 59, 0.56);
    color: rgba(240, 246, 255, 0.92);
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-insight::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: 6px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.9);
    flex: 0 0 6px;
}

.qc2-history-detail-timeline {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.qc2-history-detail-item {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 167, 255, 0.1);
    background: rgba(15, 23, 42, 0.7);
}

.qc2-history-detail-item-date {
    order: 1;
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: #f8fafc;
    font-weight: 700;
}

.qc2-history-detail-item-copy {
    order: 2;
    margin-top: 6px;
    color: rgba(191, 219, 254, 0.8);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-history-detail-item-supplier {
    order: 3;
    color: rgba(226, 232, 240, 0.92);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

.qc2-mobile-card-list {
    display: none;
}

.qc2-mobile-data-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(125, 167, 255, 0.16);
    background: linear-gradient(180deg, rgba(18, 34, 58, 0.96), rgba(12, 24, 42, 0.98));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 14px 30px rgba(2, 6, 23, 0.18);
}

.qc2-mobile-data-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.qc2-mobile-data-label {
    color: rgba(191, 219, 254, 0.76);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.qc2-mobile-data-value {
    color: rgba(240, 246, 255, 0.96);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.qc2-mobile-data-value--positive {
    color: #86efac;
}

.qc2-mobile-data-value--negative {
    color: #fca5a5;
}

@media (max-width: 1023px) {
    .recipes-layout,
    .quote-compare-layout,
    .quote-compare-main,
    .quote-compare-hero-top,
    .workspace-hero-actions {
        grid-template-columns: 1fr;
    }

    .recipes-sidebar,
    .quote-compare-hero-right,
    .shared-scope-card {
        position: static;
        width: 100%;
    }

    .recipes-panel-head,
    .recipes-editor-head,
    .recipe-breakdown-head,
    .quote-compare-editor-head,
    .quote-compare-hero-top {
        flex-direction: column;
        align-items: stretch;
    }

    .recipes-library-detail,
    .recipes-library-list,
    .recipes-main,
    .quote-compare-shell,
    .quote-compare-main {
        min-width: 0;
    }
}

@media (max-width: 767px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .recipes-layout,
    .recipes-main,
    .quote-compare-main,
    .quote-compare-shell,
    .qc2-analyze-tab-panels {
        grid-template-columns: 1fr;
    }

    .recipes-sidebar,
    .recipes-editor-card,
    .recipe-breakdown-card,
    .quote-compare-shell,
    .qc2-card,
    .qc2-analysis-table-frame,
    .qc2-history-table-shell {
        min-width: 0;
        max-width: 100%;
    }

    .qc2-mobile-card-list {
        display: grid;
        gap: 12px;
    }

    .qc2-analysis-table,
    .qc2-history-table-shell {
        display: none;
    }

    .qc2-analysis-table-frame,
    .qc2-analysis-table-scroll,
    .qc2-history-table-scroll {
        max-height: none;
        padding-right: 0;
        overflow: visible;
    }

    .qc2-analysis-filterbar,
    .qc2-actions,
    .qc2-upload-shell,
    .qc2-upload-actions,
    .recipes-library-head-actions,
    .recipes-library-toolbar,
    .recipes-library-actions,
    .recipes-sidebar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .qc2-history-table thead th,
    .qc2-ft-head {
        position: static;
    }

    .side-panel,
    .side-panel-left,
    .side-panel-right {
        position: static;
        inset: auto;
        transform: none;
        max-height: none;
    }
}

@media (hover: none), (pointer: coarse) {
    tbody tr:hover,
    .qc2-analysis-row:hover,
    .qc2-history-table tbody tr:hover td,
    .qc2-history-table tbody tr[data-qc-history-row]:hover td,
    .summary-card:hover,
    .decision-card:hover,
    .chart-card:hover,
    .top-insight-card:hover,
    .action-priority-panel:hover,
    .ai-entry-shell:hover,
    .ai-workspace:hover,
    .filter-panel:hover,
    .table-shell:hover,
    .recipe-list-item:hover,
    .qc2-choice-card:hover {
        background: inherit;
        box-shadow: none;
        transform: none;
    }

    .qc2-analysis-table-scroll,
    .qc2-analysis-table-scroll.is-dragging,
    .qc2-analysis-table-scroll.is-dragging * {
        cursor: auto;
    }
}
