        @keyframes liquidCaustic {
            0%, 100% { transform: translate3d(-4%, -1%, 0) rotate(-2deg); opacity: .18; }
            50% { transform: translate3d(4%, 2%, 0) rotate(1.5deg); opacity: .34; }
        }

        @keyframes liquidDrift {
            0%, 100% { background-position: 0% 0%, 50% 0%, 56% 58%, 0% 0%; }
            50% { background-position: 6% 4%, 46% 8%, 52% 54%, 0% 0%; }
        }

        html,
        body {
            min-height: 100%;
        }

        body {
            margin: 0;
            font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            color: var(--text);
            background: #f4f4f6;
            overflow-x: hidden;
        }

        .ambient-bg {
            position: fixed;
            inset: 0;
            z-index: -2;
            pointer-events: none;
            background:
                radial-gradient(42rem 28rem at 8% 12%, color-mix(in srgb, var(--accent-1) 25%, transparent), transparent 72%),
                radial-gradient(36rem 24rem at 92% 18%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 74%),
                radial-gradient(44rem 30rem at 30% 100%, color-mix(in srgb, var(--accent-3) 18%, transparent), transparent 78%),
                linear-gradient(180deg, #fbfbfc 0%, #f4f4f6 45%, #eeeeef 100%);
        }

        .ambient-bg::before,
        .ambient-bg::after {
            content: "";
            position: absolute;
            inset: auto;
            width: 120vw;
            height: 42vh;
            left: -10vw;
            border-radius: 999px;
            filter: blur(42px);
            opacity: 0.38;
            transform: rotate(-8deg);
            background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-4), var(--accent-3));
        }

        .ambient-bg::before {
            top: 18vh;
        }

        .ambient-bg::after {
            top: 58vh;
            transform: rotate(7deg);
            opacity: 0.26;
        }

        .frost-layer {
            position: fixed;
            inset: 0;
            z-index: -1;
            pointer-events: none;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            background: rgba(255, 255, 255, 0.16);
        }

        .glass-surface {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            --mx: 50%;
            --my: 50%;
            --shine-x: 50%;
            --shine-y: 16%;
            --refract-x: 52%;
            --refract-y: 52%;
            --water: 0;
            --flow-x: 0;
            --flow-y: 0;
            background: var(--liquid-bg);
            border: 1px solid var(--liquid-border);
            box-shadow: var(--liquid-shadow);
            backdrop-filter: blur(16px) saturate(165%) contrast(1.04);
            -webkit-backdrop-filter: blur(16px) saturate(165%) contrast(1.04);
            transition: box-shadow .22s ease, border-color .22s ease, background-image .18s ease, backdrop-filter .18s ease;
            will-change: box-shadow, background-image;
        }

        .glass-surface::before,
        .glass-surface::after,
        .section-card::before,
        .section-card::after,
        .header-chip::before,
        .header-chip::after,
        .quick-link::before,
        .quick-link::after {
            content: "";
            position: absolute;
            border-radius: inherit;
            pointer-events: none;
        }

        .glass-surface::before,
        .section-card::before,
        .header-chip::before,
        .quick-link::before {
            inset: 1px;
            background:
                linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.05) 42%, rgba(15,23,42,.05) 100%);
            opacity: .72;
            animation: none;
        }

        .glass-surface::after,
        .section-card::after,
        .header-chip::after,
        .quick-link::after {
            display: none;
        }

        .glass-surface.liquid-reactive:hover,
        .section-card.liquid-reactive:hover,
        .header-chip.liquid-reactive:hover,
        .quick-link.liquid-reactive:hover {
            border-color: rgba(255,255,255,.78);
            box-shadow: 0 24px 44px rgba(15,23,42,.1), 0 8px 18px rgba(15,23,42,.06), inset 0 1px 0 rgba(255,255,255,.94), inset 0 -1px 0 rgba(15,23,42,.07);
        }

        .app-shell {
            max-width: 1240px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        .top-header {
            position: fixed;
            top: 1.25rem;
            left: 0;
            right: 0;
            z-index: 70;
        }

        .brand-badge {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 1.1rem;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(132deg, color-mix(in srgb, var(--accent-1) 86%, white), color-mix(in srgb, var(--accent-2) 76%, #14324a));
            color: #fff;
            font-size: 0.75rem;
            font-weight: 800;
            box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-1) 28%, transparent);
        }

        .header-chip {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.65);
            background: var(--liquid-bg);
            backdrop-filter: blur(12px) saturate(155%);
            -webkit-backdrop-filter: blur(12px) saturate(155%);
            box-shadow: var(--liquid-shadow), var(--liquid-edge-shadow);
        }

        .nav-ribbon {
            position: fixed;
            top: 5.85rem;
            left: 0;
            right: 0;
            z-index: 65;
        }

        .mega-nav {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 0.4rem;
            padding: 0.45rem;
            border-radius: var(--liquid-radius-lg);
            width: 18.5rem;
            max-height: calc(100vh - 7.15rem);
        }

        /*
         * Горизонтальная лента навигации.
         * Раньше .primary-nav жил внутри .mega-nav (узкий вертикальный сайдбар).
         * После редизайна base.html обёртки .mega-nav больше нет, поэтому колонка
         * растягивалась на всю ширину .nav-ribbon (position: fixed) и перекрывала
         * контент страницы. Теперь это строка с горизонтальным скроллом.
         */
        .primary-nav {
            display: flex;
            flex-direction: row;
            flex-wrap: nowrap;
            align-items: center;
            gap: 0.4rem;
            width: 100%;
            position: relative;
            min-width: 0;
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-width: thin;
            padding: 0.45rem 0.6rem;
            -webkit-overflow-scrolling: touch;
        }

        .primary-nav-lens {
            position: absolute;
            left: 0;
            right: 0.2rem;
            top: 0;
            height: 0;
            opacity: 0;
            border-radius: 24px;
            pointer-events: none;
            border: 1px solid rgba(255, 255, 255, 0.8);
            background: linear-gradient(150deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.28));
            backdrop-filter: blur(20px) saturate(150%);
            -webkit-backdrop-filter: blur(20px) saturate(150%);
            box-shadow: 0 20px 38px rgba(148,163,184,0.32), inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -16px 26px rgba(148,163,184,0.18);
            transform: translate3d(0, 0, 0) scale(0.97);
            transition: transform 520ms cubic-bezier(0.22,1,0.36,1), height 520ms cubic-bezier(0.22,1,0.36,1), opacity 220ms ease;
            overflow: hidden;
            z-index: 0;
            view-transition-name: cabinet-primary-nav-lens;
            contain: layout;
        }

        .primary-nav-lens::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: 999px;
            background: linear-gradient(140deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.42) 22%, rgba(225,238,255,0.22) 48%, rgba(255,255,255,0.18) 68%, rgba(210,228,248,0.42) 100%);
        }

        .primary-nav-lens::after {
            content: "";
            position: absolute;
            left: 13%;
            right: 13%;
            top: 4px;
            height: 38%;
            border-radius: 999px;
            background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0.45), transparent);
            opacity: 0.95;
        }

        .primary-nav::-webkit-scrollbar {
            width: 7px;
            height: 7px;
        }

        .primary-nav::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.45);
        }

        .primary-nav::-webkit-scrollbar-track {
            background: transparent;
        }

        .primary-nav-link {
            position: relative;
            z-index: 1;
            isolation: isolate;
            overflow: hidden;
            --mx: 50%;
            --my: 50%;
            white-space: nowrap;
            font-size: 0.86rem;
            font-weight: 800;
            color: #52525b;
            border-radius: 18px;
            border: 1px solid rgba(255,255,255,.3);
            background: linear-gradient(148deg, rgba(255,255,255,.18), rgba(255,255,255,.05) 44%, rgba(210,228,248,.06));
            box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(15,23,42,.04);
            backdrop-filter: blur(8px) saturate(130%);
            -webkit-backdrop-filter: blur(8px) saturate(130%);
            padding: 0.65rem 0.85rem;
            transition: color .18s ease, border-color .18s ease, box-shadow .18s ease, background-image .18s ease;
            flex: 0 0 auto;
            text-align: center;
        }

        .primary-nav-link:hover {
            color: #0f172a;
            border-color: rgba(255,255,255,.65);
        }

        .primary-nav-link.is-active {
            color: #0f172a;
            border-color: rgba(255,255,255,.75);
            background: linear-gradient(148deg, rgba(255,255,255,.38), rgba(255,255,255,.12) 44%, rgba(210,228,248,.12));
            box-shadow: 0 12px 24px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.84), inset 0 -1px 0 rgba(15,23,42,.06);
        }

        ::view-transition-old(cabinet-primary-nav-lens),
        ::view-transition-new(cabinet-primary-nav-lens) {
            animation-duration: 520ms;
            animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
        }

        .mega-nav-divider {
            display: none;
        }

        .quick-nav {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            align-items: stretch;
            overflow-y: auto;
            overflow-x: hidden;
            min-height: 0;
            flex: 1 1 auto;
            scrollbar-width: thin;
            padding-right: 0.2rem;
        }

        .quick-nav::-webkit-scrollbar {
            width: 7px;
            height: 7px;
        }

        .quick-nav::-webkit-scrollbar-thumb {
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.45);
        }

        .quick-nav::-webkit-scrollbar-track {
            background: transparent;
        }

        .quick-link {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            --mx: 50%;
            --my: 50%;
            white-space: normal;
            font-size: 10.5px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.48rem 0.78rem;
            border-radius: 16px;
            border: 1px solid rgba(15, 23, 42, 0.08);
            background: linear-gradient(146deg, rgba(255,255,255,.24), rgba(255,255,255,.08) 44%, rgba(255,255,255,.14));
            color: #475569;
            transition: all 0.2s ease;
            width: 100%;
            text-align: left;
            box-shadow: var(--liquid-shadow), var(--liquid-edge-shadow);
            backdrop-filter: blur(10px) saturate(150%);
            -webkit-backdrop-filter: blur(10px) saturate(150%);
        }

        .quick-link:hover {
            color: #0f172a;
            border-color: color-mix(in srgb, var(--accent-1) 35%, white);
        }

        .quick-link.is-active {
            color: #0f172a;
            background: linear-gradient(148deg, rgba(255,255,255,.4), rgba(255,255,255,.16));
            border-color: rgba(255, 255, 255, 0.74);
            box-shadow: 0 10px 18px rgba(15,23,42,0.07), var(--liquid-edge-shadow);
        }

        /*
         * padding-top закрывает фиксированные .top-header + .nav-ribbon.
         * padding-left раньше резервировал место под вертикальный сайдбар,
         * которого в разметке больше нет — из-за него контент был смещён вправо.
         */
        .page-content {
            padding-top: 9.5rem;
            padding-left: 0;
            padding-bottom: 7rem;
        }

        .section-card {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            --mx: 50%;
            --my: 50%;
            border-radius: var(--liquid-radius-xl);
            border: 1px solid var(--liquid-border);
            background: var(--liquid-bg);
            box-shadow: var(--liquid-shadow);
            backdrop-filter: blur(16px) saturate(160%) contrast(1.04);
            -webkit-backdrop-filter: blur(16px) saturate(160%) contrast(1.04);
            padding: 2rem;
            margin-bottom: 1.5rem;
            transition: box-shadow 0.2s ease, background-image .18s ease;
            will-change: box-shadow, background-image;
        }

        .section-card:hover {
            box-shadow: 0 22px 38px rgba(15, 23, 42, 0.08), 0 4px 14px rgba(15,23,42,.05), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(15,23,42,.06);
        }

        .lens-blob-a { border-radius: 40px 54px 42px 60px / 50px 34px 60px 38px; }
        .lens-blob-b { border-radius: 54px 24px 60px 28px / 26px 56px 30px 64px; }
        .lens-blob-c { border-radius: 24px 58px 22px 70px / 64px 22px 44px 28px; }
        .lens-blob-d { border-radius: 60px 22px 38px 34px / 24px 66px 24px 50px; }
        .lens-blob-e { border-radius: 28px 66px 34px 52px / 42px 20px 64px 26px; }
        .lens-blob-f { border-radius: 66px 24px 72px 22px / 24px 52px 24px 70px; }
        .lens-blob-g { border-radius: 22px 60px 30px 68px / 66px 22px 42px 26px; }
        .lens-blob-h { border-radius: 68px 22px 40px 62px / 24px 64px 26px 58px; }

        .label-custom {
            display: inline-block;
            font-size: 10px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            font-weight: 900;
            color: #64748b;
        }

        .notice {
            display: flex;
            gap: 0.75rem;
            align-items: flex-start;
            padding: 1rem 1.25rem;
            border-radius: 1.2rem;
            border: 1px solid rgba(239, 68, 68, 0.25);
            background: rgba(239, 68, 68, 0.08);
            color: #b91c1c;
        }

        .notice.hidden {
            display: none;
        }

        .notice-title {
            font-size: 11px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            margin-bottom: 0.35rem;
        }

        .notice-list {
            font-size: 12px;
            font-weight: 700;
        }

        input[type="text"], input[type="date"], input[type="url"],
        input[type="number"], input[type="email"], input[type="password"],
        select, textarea {
            --mx: 50%;
            --my: 50%;
            width: 100%;
            padding: 0.9rem 1rem;
            border-radius: 20px;
            border: 1px solid rgba(15, 23, 42, 0.12);
            background: linear-gradient(148deg, rgba(255,255,255,.44), rgba(255,255,255,.18) 38%, rgba(255,255,255,.28));
            color: #0f172a;
            font-weight: 600;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), inset 0 -1px 0 rgba(15,23,42,.05), 0 8px 18px rgba(15, 23, 42, 0.06);
            transition: all 0.2s ease;
            outline: none;
            backdrop-filter: blur(10px) saturate(145%);
            -webkit-backdrop-filter: blur(10px) saturate(145%);
        }

        input:focus, select:focus, textarea:focus {
            border-color: color-mix(in srgb, var(--accent-1) 40%, white);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-1) 16%, transparent), 0 10px 24px rgba(15, 23, 42, 0.08);
        }

        .switch-input {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch-ui {
            position: relative;
            width: 3rem;
            height: 1.75rem;
            border-radius: 999px;
            background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
            border: 1px solid rgba(15, 23, 42, 0.1);
            transition: all 0.2s ease;
        }

        .switch-ui::after {
            content: "";
            position: absolute;
            top: 0.25rem;
            left: 0.25rem;
            width: 1.2rem;
            height: 1.2rem;
            border-radius: 999px;
            background: white;
            box-shadow: 0 5px 12px rgba(15, 23, 42, 0.2);
            transition: transform 0.2s ease;
        }

        .switch-input:checked + .switch-ui {
            background: linear-gradient(180deg, var(--accent-1), color-mix(in srgb, var(--accent-1) 70%, var(--accent-2)));
            border-color: color-mix(in srgb, var(--accent-1) 50%, transparent);
        }

        .switch-input:checked + .switch-ui::after {
            transform: translateX(1.2rem);
        }

        .text-emerald-500, .text-emerald-600 { color: var(--accent-1) !important; }
        .text-emerald-700 { color: color-mix(in srgb, var(--accent-1) 60%, #0f172a) !important; }
        .bg-emerald-500 { background-color: var(--accent-1) !important; }
        .bg-emerald-600 { background-color: color-mix(in srgb, var(--accent-1) 70%, #0f172a) !important; }
        .bg-emerald-50 { background-color: color-mix(in srgb, var(--accent-1) 10%, white) !important; }
        .border-emerald-100 { border-color: color-mix(in srgb, var(--accent-1) 16%, white) !important; }

        table {
            border-collapse: separate;
            border-spacing: 0 10px;
        }

        thead th {
            color: #64748b;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        tbody tr {
            background: linear-gradient(150deg, rgba(255,255,255,.78), rgba(255,255,255,.42));
            box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
        }

        tbody td {
            border-top: 1px solid rgba(255, 255, 255, 0.75);
            border-bottom: 1px solid rgba(255, 255, 255, 0.75);
        }

        tbody td:first-child {
            border-left: 1px solid rgba(255, 255, 255, 0.75);
            border-top-left-radius: 1rem;
            border-bottom-left-radius: 1rem;
        }

        tbody td:last-child {
            border-right: 1px solid rgba(255, 255, 255, 0.75);
            border-top-right-radius: 1rem;
            border-bottom-right-radius: 1rem;
        }

        .mobile-dock {
            border-radius: var(--liquid-radius-lg);
            padding: 0.8rem 1rem;
        }

        .mobile-dock a {
            --mx: 50%;
            --my: 50%;
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            border: 1px solid rgba(255,255,255,.32);
            background: linear-gradient(148deg, rgba(255,255,255,.18), rgba(255,255,255,.05) 44%, rgba(210,228,248,.08));
            box-shadow: inset 0 1px 0 rgba(255,255,255,.62), inset 0 -1px 0 rgba(15,23,42,.05);
            backdrop-filter: blur(8px) saturate(130%);
            -webkit-backdrop-filter: blur(8px) saturate(130%);
        }

        @media (prefers-reduced-motion: reduce) {
            .glass-surface,
            .section-card,
            .header-chip,
            .quick-link,
            .primary-nav-link,
            .mobile-dock a,
            input[type="text"], input[type="date"], input[type="url"],
            input[type="number"], input[type="email"], input[type="password"],
            select, textarea {
                transition: none !important;
                animation: none !important;
            }

            .glass-surface::before,
            .glass-surface::after,
            .section-card::before,
            .section-card::after,
            .header-chip::before,
            .header-chip::after,
            .quick-link::before,
            .quick-link::after {
                animation: none !important;
                transform: none !important;
            }
        }

        .mobile-dock a.is-active {
            color: #fff;
            background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
            box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-1) 35%, transparent);
        }

        @media (max-width: 1023px) {
            .top-header {
                top: 0.7rem;
            }

            .nav-ribbon {
                top: 4.85rem;
            }

            .app-shell {
                padding: 0 0.75rem;
            }

            .mega-nav {
                width: auto;
                max-height: none;
                flex-direction: row;
                align-items: center;
                gap: 0.5rem;
                padding: 0.42rem;
            }

            .primary-nav {
                width: 100%;
                padding: 0.4rem 0.5rem;
            }

            .quick-nav {
                display: none;
            }

            .mega-nav-divider {
                display: none;
            }

            .primary-nav-link {
                font-size: 0.78rem;
                padding: 0.56rem 0.5rem;
            }

            .page-content {
                padding-top: 8.6rem;
                padding-left: 0;
            }

            .section-card {
                border-radius: 24px;
                padding: 1.2rem;
            }
        }

        #ai-fab {
            position: fixed; bottom: 28px; right: 28px; z-index: 9000;
            width: 52px; height: 52px; border-radius: 50%;
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            box-shadow: 0 4px 20px rgba(99,102,241,.45);
            border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
            transition: transform .15s, box-shadow .15s;
            color: #fff; font-size: 20px;
        }
        #ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(99,102,241,.6); }
        #ai-panel {
            position: fixed; bottom: 90px; right: 28px; z-index: 9000;
            width: 360px; max-height: 520px;
            display: flex; flex-direction: column;
            background: rgba(255,255,255,.92); backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,.8);
            border-radius: 20px; box-shadow: 0 20px 60px rgba(15,23,42,.18);
            overflow: hidden; transition: opacity .2s, transform .2s;
        }
        #ai-panel.hidden { opacity: 0; pointer-events: none; transform: translateY(12px); }
        .ai-header {
            padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.06);
            display: flex; align-items: center; gap: 10px;
            background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
            color: #fff;
        }
        .ai-header .ai-avatar {
            width: 32px; height: 32px; border-radius: 50%;
            background: rgba(255,255,255,.25);
            display: flex; align-items: center; justify-content: center; font-size: 15px;
        }
        .ai-header h4 { margin: 0; font-size: 14px; font-weight: 700; }
        .ai-header p { margin: 0; font-size: 11px; opacity: .75; }
        .ai-header .ai-close-btn {
            margin-left: auto; background: none; border: none; color: rgba(255,255,255,.8);
            cursor: pointer; font-size: 18px; padding: 0; line-height: 1;
        }
        #ai-messages {
            flex: 1; overflow-y: auto; padding: 14px;
            display: flex; flex-direction: column; gap: 10px;
        }
        .ai-msg { max-width: 88%; border-radius: 14px; padding: 9px 13px; font-size: 13px; line-height: 1.5; }
        .ai-msg.user { background: linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; align-self: flex-end; border-bottom-right-radius: 4px; }
        .ai-msg.bot { background: #f1f5f9; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 4px; }
        .ai-msg.bot.typing { color: #94a3b8; font-style: italic; }
        .ai-input-row {
            padding: 10px; border-top: 1px solid rgba(0,0,0,.06);
            display: flex; gap: 8px; align-items: center;
        }
        #ai-input {
            flex: 1; border: 1px solid #e2e8f0; border-radius: 10px;
            padding: 8px 12px; font-size: 13px; outline: none; resize: none;
            background: #f8fafc; line-height: 1.4; max-height: 80px;
        }
        #ai-input:focus { border-color: #6366f1; background: #fff; }
        #ai-send-btn {
            width: 36px; height: 36px; border-radius: 10px; border: none; cursor: pointer;
            background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; font-size: 14px;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
        }
        .ai-clear-btn {
            background: none; border: none; cursor: pointer; font-size: 11px;
            color: #94a3b8; padding: 2px 6px; border-radius: 6px;
        }
        .ai-clear-btn:hover { background: #f1f5f9; color: #64748b; }

/* --- Global flash messages (toasts) --- */
.flash-stack {
    position: fixed;
    top: 5.4rem;
    right: 1rem;
    left: 1rem;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    pointer-events: none;
}
@media (min-width: 640px) {
    .flash-stack { left: auto; width: 24rem; }
}
.flash-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: 1.1rem;
    font-size: .85rem;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
}
.flash-toast i { margin-top: .1rem; }
.flash-success i { color: #059669; }
.flash-error i { color: #e11d48; }
.flash-warning i { color: #d97706; }
.flash-info i { color: #0284c7; }
.flash-success { border-left: 4px solid #10b981; }
.flash-error { border-left: 4px solid #f43f5e; }
.flash-warning { border-left: 4px solid #f59e0b; }
.flash-info { border-left: 4px solid #0ea5e9; }
.flash-close {
    margin-left: auto;
    font-size: 1rem;
    line-height: 1;
    color: #64748b;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0 .15rem;
}
.flash-close:hover { color: #0f172a; }

/* Investor-demo polish: calmer production surface and safer form controls. */
.ambient-bg {
    background:
        radial-gradient(36rem 22rem at 10% 12%, color-mix(in srgb, var(--accent-1) 12%, transparent), transparent 76%),
        radial-gradient(34rem 22rem at 92% 18%, color-mix(in srgb, var(--accent-2) 11%, transparent), transparent 78%),
        linear-gradient(180deg, #fbfcfd 0%, #f5f7fb 58%, #eef2f7 100%) !important;
}
.ambient-bg::before,
.ambient-bg::after {
    opacity: .12 !important;
    filter: blur(70px) !important;
}
.frost-layer {
    background: rgba(255,255,255,.42) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}
.section-card,
.glass-surface {
    background-color: rgba(255,255,255,.62);
}
input[type="number"] {
    min-height: 3.2rem;
    font-variant-numeric: tabular-nums;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}
.field-with-unit {
    position: relative;
}
.field-with-unit input {
    padding-right: 3.25rem;
}
.field-with-unit__unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: .82rem;
    font-weight: 900;
    pointer-events: none;
}
.demo-muted-note {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.45;
}
