:root {
    /* ── Official Zilla Brand System Tokens (Ground Truth from Zilla_Logo.svg) ── */
    --zilla-pink: #FF6B9E;
    --zilla-red: #FF3366;
    --zilla-purple: #9D4EDD;
    --zilla-bg: #0A0A0F;
    --zilla-surface: #13131A;
    --zilla-border: #1E1E2E;
    --zilla-text: #FFFFFF;
    --zilla-muted: #A1A1AA;

    /* ── Official Brand Gradients ── */
    --zilla-gradient: linear-gradient(135deg, #FF6B9E 0%, #FF3366 50%, #9D4EDD 100%);
    --gradient-primary: var(--zilla-gradient);
    --gradient-brand: linear-gradient(135deg, #FF6B9E 0%, #FF3366 50%, #9D4EDD 100%);

    /* ── Aliased Solid & Glass Background Hierarchy ── */
    --bg-base: var(--zilla-bg);
    --bg-surface: var(--zilla-surface);
    --bg-elevated: #1A1A24;
    --bg-card: rgba(19, 19, 26, 0.75);
    --bg-card-hover: rgba(28, 28, 38, 0.85);
    --bg-input: #161622;
    --bg-well: #0E0E14;
    --bg-surface-glass: rgba(19, 19, 26, 0.72);
    --bg-card-glass: rgba(19, 19, 26, 0.75);
    --bg-card-glass-hover: rgba(28, 28, 38, 0.85);
    --bg-modal-glass: rgba(19, 19, 26, 0.90);
    
    /* ── Solid & Glass Border System ── */
    --border-subtle: #1E1E2E;
    --border-default: var(--zilla-border);
    --border-strong: #2D2D42;
    --border-focus: var(--zilla-pink);
    --glass-border-subtle: rgba(255, 255, 255, 0.06);
    --glass-border-default: rgba(255, 255, 255, 0.09);
    --glass-border-top: rgba(255, 255, 255, 0.15);
    --glass-border-focus: rgba(255, 107, 158, 0.40);
    --glass-border: var(--glass-border-default);
    --glass-border-strong: var(--border-strong);
    
    /* ── Canonical Zilla Accent System ── */
    --accent-primary: var(--zilla-pink);
    --accent-hover: #FF85A2;
    --accent-active: #FF3366;
    --accent-secondary: var(--zilla-purple);
    --accent-bg-subtle: rgba(255, 107, 158, 0.08);
    --accent-border-subtle: rgba(255, 107, 158, 0.20);
    --accent-pink: var(--zilla-pink);
    --accent-pink-soft: #FF85A2;
    --accent-pink-glow: rgba(255, 107, 158, 0.15);
    --accent-pink-border: rgba(255, 107, 158, 0.30);
    --primary: var(--accent-primary);
    
    /* ── Semantic Status Colors ── */
    --accent-emerald: #22c55e;
    --accent-emerald-bg: #071a0e;
    --accent-emerald-border: #14532d;
    --accent-amber: #f59e0b;
    --accent-amber-bg: #1c1404;
    --accent-amber-border: #78350f;
    --accent-rose: #ef4444;
    --accent-rose-bg: #1a0707;
    --accent-rose-border: #7f1d1d;
    --accent-crimson: var(--accent-rose);
    --accent-cyan: var(--zilla-pink);
    
    /* ── Backoffice / Admin Tokens ── */
    --admin-primary: #f59e0b;
    --admin-surface: var(--zilla-surface);
    --admin-border: #332408;
    
    /* ── High Contrast Typography ── */
    --text-primary: #FFFFFF;
    --text-secondary: #D4D4D8;
    --text-muted: #A1A1AA;
    
    /* ── Blur Levels ── */
    --blur-subtle: blur(12px);
    --blur-standard: blur(20px);
    --blur-deep: blur(32px);
    
    /* ── Layout Dimensions ── */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 72px;
    --header-height: 64px;
    --northbound-height: 32px;
    --demo-bar-height: 38px;
    
    /* ── Disciplined Utilitarian Geometry ── */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 20px;
    
    /* ── Crisp Performance Transitions ── */
    --transition-fast: 0.12s ease-out;
    --transition-smooth: 0.2s ease-out;
    
    /* ── Elevation & Deep Glass Shadows ── */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.8);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.9);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.95);
    --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 40px 0 rgba(255, 107, 158, 0.08);
    --glass-shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 1px 1px 0 rgba(255, 255, 255, 0.08);
    --glass-shadow-card-hover: 0 16px 40px 0 rgba(0, 0, 0, 0.7), 0 0 24px 0 rgba(255, 107, 158, 0.12), inset 0 1px 1px 0 rgba(255, 255, 255, 0.18);
    --glass-shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.95), 0 0 40px 0 rgba(255, 107, 158, 0.08), inset 0 1px 2px 0 rgba(255, 255, 255, 0.15);
    --glass-shadow-nav: 0 12px 32px 0 rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

/* Skeleton & Onboarding Animations */
@keyframes pulseSkeleton { 0% { opacity: 0.5; } 50% { opacity: 0.8; } 100% { opacity: 0.5; } }
.skeleton { background: #181818; border-radius: var(--radius-sm); animation: pulseSkeleton 1.5s infinite ease-in-out; }
.skel-header { width: 40%; height: 32px; margin-bottom: 8px; }
.skel-sub { width: 60%; height: 16px; margin-bottom: 32px; }
.skel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 32px; }
.skel-card { height: 120px; border-radius: var(--radius-md); }
.skel-table { height: 300px; border-radius: var(--radius-md); display: flex; flex-direction: column; padding: 24px; gap: 16px; }
.skel-row { width: 100%; height: 24px; border-radius: var(--radius-sm); }
.skel-row.header { background: #242424; height: 32px; margin-bottom: 8px; }

@keyframes pulseLogo { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-base); color: var(--text-primary); overflow: hidden; display: flex; height: 100vh; width: 100vw; }

/* Top Northbound Bar */
.northbound-switcher-bar { position: fixed; top: 0; left: 0; width: 100vw; height: var(--northbound-height); background: #050505; border-bottom: 1px solid var(--border-subtle); z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 11px; }
.env-indicator { display: flex; align-items: center; gap: 8px; }
.env-badge-tenant { background: var(--accent-bg-subtle); color: var(--accent-secondary); border: 1px solid var(--accent-border-subtle); padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.env-badge-master { background: var(--accent-amber-bg); color: #fbbf24; border: 1px solid var(--accent-amber-border); padding: 2px 8px; border-radius: var(--radius-sm); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.env-switch-btn { background: #141414; border: 1px solid var(--border-default); color: #fff; padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; cursor: pointer; transition: var(--transition-fast); display: flex; align-items: center; gap: 6px; }
.env-switch-btn:hover { background: #1e1e1e; border-color: var(--border-strong); }

/* ── Persistent Sticky Top Demo Session Bar (Phase 2 Sandbox) ── */
.demo-session-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--demo-bar-height, 38px);
    background: linear-gradient(90deg, rgba(22, 12, 18, 0.95) 0%, rgba(10, 10, 14, 0.98) 100%);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border-bottom: 1px solid rgba(255, 107, 158, 0.22);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 107, 158, 0.08);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, height 0.3s ease;
}

body.has-demo-session .demo-session-bar {
    display: flex;
}

body.has-demo-session .northbound-switcher-bar {
    display: none !important; /* Hide internal admin switcher during client demo */
}

body.has-demo-session .app-container {
    margin-top: var(--demo-bar-height, 38px);
    height: calc(100vh - var(--demo-bar-height, 38px));
}

/* Demo Pulse & Badges */
.demo-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-shrink: 1;
}

.demo-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 107, 158, 0.12);
    border: 1px solid rgba(255, 107, 158, 0.28);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #FF6B9E;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.demo-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #FF6B9E;
    box-shadow: 0 0 8px #FF6B9E;
    animation: demoPulse 1.8s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes demoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}

.demo-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.demo-brand-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: #e5e5e5;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.demo-helper-text {
    color: #888888;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Demo Action Buttons */
.demo-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-demo-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d4d4d4;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-demo-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-demo-primary {
    background: #FF6B9E;
    border: 1px solid #FF6B9E;
    color: #050505;
    padding: 4px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(255, 107, 158, 0.25);
    white-space: nowrap;
    text-decoration: none;
}

.btn-demo-primary:hover {
    background: #FF85A2;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 158, 0.45);
}

.btn-demo-close {
    background: transparent;
    border: none;
    color: #737373;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.btn-demo-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

/* Demo Bar Minimized State */
.demo-session-bar.minimized {
    height: 6px;
    padding: 0;
    overflow: hidden;
    opacity: 0.7;
    cursor: pointer;
    border-bottom: 2px solid #FF6B9E;
}

.demo-session-bar.minimized > * {
    display: none;
}

body.has-demo-session.demo-bar-collapsed .app-container {
    margin-top: 6px;
    height: calc(100vh - 6px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .demo-helper-text {
        display: none !important;
    }
    .demo-session-bar {
        padding: 0 8px;
        font-size: 11px;
    }
    .btn-demo-secondary span,
    .btn-demo-primary span {
        font-size: 10px;
    }
}

.ambient-canvas { display: none; }
.app-container { display: flex; width: 100vw; height: calc(100vh - var(--northbound-height)); margin-top: var(--northbound-height); position: relative; z-index: 1; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); height: calc(100% - 42px); background: rgba(10, 10, 12, 0.82); backdrop-filter: var(--blur-standard) saturate(180%); -webkit-backdrop-filter: var(--blur-standard) saturate(180%); border-right: 1px solid var(--glass-border-default); display: flex; flex-direction: column; transition: width var(--transition-smooth); z-index: 20; flex-shrink: 0; }
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar-header { height: 72px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--glass-border-subtle); background: transparent; }
.brand-box { display: flex; align-items: center; gap: 14px; cursor: pointer; overflow: hidden; }
.brand-logo { height: 48px; width: auto; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-logo img { height: 44px; width: auto; object-fit: contain; }
.brand-logo.admin-logo { background: var(--admin-primary); color: #050505; box-shadow: none; }
.brand-info { display: none !important; }
.sidebar.collapsed .sidebar-header { padding: 0; justify-content: center; position: relative; }
.sidebar.collapsed .brand-box { justify-content: center; width: 100%; }
.sidebar.collapsed .brand-logo { width: 48px; height: 48px; margin: 0 auto; }
.sidebar.collapsed .brand-logo img { width: 42px; height: 42px; object-fit: contain; }
.sidebar.collapsed .brand-info { opacity: 0; display: none; }
.sidebar.collapsed .toggle-sidebar-btn { position: absolute; right: 4px; top: 4px; opacity: 0; pointer-events: none; }
.sidebar.collapsed:hover .sidebar-header { padding: 0 8px; justify-content: space-between; }
.sidebar.collapsed:hover .toggle-sidebar-btn { opacity: 1; pointer-events: auto; position: static; }
.brand-title { font-size: 15px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.brand-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.brand-badge.admin-badge { color: var(--admin-primary); }
.toggle-sidebar-btn { background: transparent; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 4px; border-radius: var(--radius-sm); transition: var(--transition-fast); }
.toggle-sidebar-btn:hover { color: #fff; background: #181818; }

.nav-container { flex: 1; overflow-y: auto; padding: 12px 8px; }
.nav-container::-webkit-scrollbar { width: 4px; }
.nav-container::-webkit-scrollbar-thumb { background: #242424; border-radius: 2px; }
.nav-category-group { margin-bottom: 6px; }
.nav-category-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition-fast); }
.nav-category-header:hover { color: var(--text-secondary); background: #141414; }
.nav-category-items { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.nav-category-group.collapsed .nav-category-items { display: none; }
.nav-item { padding: 8px 12px; display: flex; align-items: center; gap: 12px; color: #888888; text-decoration: none; border-radius: var(--radius-sm); border-left: 3px solid transparent; transition: var(--transition-fast); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.nav-item i { font-size: 18px; color: #666666; flex-shrink: 0; }
.nav-item:hover { color: #ffffff; background: #141414; padding-left: 14px; }
.nav-item:hover i { color: #a3a3a3; }
.nav-item.active { color: #ffffff; background: var(--accent-bg-subtle); font-weight: 700; border-left: 3px solid var(--accent-primary); }
.nav-item.active.admin-active { background: var(--accent-amber-bg); border-left: 3px solid var(--admin-primary); color: #ffffff; }
.nav-item.active i { color: var(--accent-primary); }
.nav-item.active.admin-active i { color: var(--admin-primary); }
.sidebar.collapsed .nav-category-header { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; border-left: none; }
.sidebar.collapsed .nav-item span { display: none; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--glass-border-subtle); display: flex; align-items: center; justify-content: space-between; background: transparent; }
.sidebar.collapsed .sidebar-footer { padding: 12px 6px; justify-content: center; }
.sidebar.collapsed .sidebar-footer button { display: none; }
.user-pill { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius-md); transition: var(--transition-fast); overflow: hidden; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border-subtle); }
.user-pill:hover { background: rgba(255,255,255,0.07); border-color: var(--glass-border-default); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #050505; font-weight: 800; font-size: 13px; background: var(--accent-primary); flex-shrink: 0; }
.user-meta { display: flex; flex-direction: column; white-space: nowrap; }
.user-name { font-size: 13px; font-weight: 700; color: #fff; }
.user-role { font-size: 11px; color: var(--text-muted); }
.sidebar.collapsed .user-pill { padding: 0; border: none; background: transparent; }
.sidebar.collapsed .user-meta { display: none; }

/* Main Area */
.main-wrapper { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: var(--bg-base); height: calc(100% - 42px); }
.top-header { height: var(--header-height); border-bottom: 1px solid var(--glass-border-default); background: rgba(10, 10, 12, 0.78); backdrop-filter: var(--blur-standard) saturate(180%); -webkit-backdrop-filter: var(--blur-standard) saturate(180%); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; z-index: 15; flex-shrink: 0; }
.header-left { display: flex; align-items: center; gap: 16px; }
.workspace-selector { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border-default); backdrop-filter: var(--blur-subtle); padding: 6px 12px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; color: #fff; cursor: pointer; transition: var(--transition-fast); }
.workspace-selector:hover { background: rgba(255,255,255,0.08); border-color: var(--accent-pink-border); }
.workspace-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-emerald); }

.header-right { display: flex; align-items: center; gap: 12px; }
.plan-badge-pill { display: flex; align-items: center; gap: 6px; background: var(--accent-amber-bg); border: 1px solid var(--accent-amber-border); border-radius: var(--radius-sm); padding: 4px 10px; font-size: 11px; font-weight: 700; color: #fbbf24; cursor: pointer; }
.header-action-btn { width: 34px; height: 34px; border-radius: var(--radius-sm); background: #141414; border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 16px; cursor: pointer; transition: var(--transition-fast); }
.header-action-btn:hover { background: #1e1e1e; color: #fff; border-color: var(--border-strong); }
.btn-quick-create { display: flex; align-items: center; gap: 6px; background: var(--accent-primary); border: 1px solid var(--accent-primary); border-radius: var(--radius-sm); padding: 6px 16px; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: var(--transition-fast); }
.btn-quick-create:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.main-content { flex: 1; overflow-y: auto; padding: 24px 32px 72px; position: relative; min-width: 0; }
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: #242424; border-radius: 3px; }

.view-enter { animation: viewFadeIn 0.2s ease-out forwards; min-width: 0; width: 100%; display: flex; flex-direction: column; gap: 24px; }
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Typography & Layout */
.view-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-title h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: #fff; margin-bottom: 4px; }
.view-title p { color: var(--text-secondary); font-size: 14px; }
.view-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.screen-tabs-bar { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border-default); padding-bottom: 12px; overflow-x: auto; }
.screen-tab { padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; transition: var(--transition-fast); }
.screen-tab:hover { color: #e2e8f0; background: #181818; }
.screen-tab.active { color: #fff; background: var(--accent-bg-subtle); border-color: var(--accent-border-subtle); font-weight: 700; }
.cal-event { background: var(--accent-bg-subtle); color: var(--accent-secondary); font-size: 10px; font-weight: 600; padding: 4px 6px; border-radius: var(--radius-sm); cursor: pointer; border-left: 2px solid var(--accent-primary); border-top: 1px solid var(--accent-border-subtle); border-right: 1px solid var(--accent-border-subtle); border-bottom: 1px solid var(--accent-border-subtle); }

.ph-spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Notification bell */
.notif-btn {
    position: relative;
    background: #141414;
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.notif-btn:hover { color: #fff; background: #1e1e1e; border-color: var(--border-strong); }
.notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 6px; height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* Command Palette */
.cmd-palette-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10001; display: none; align-items: flex-start; justify-content: center;
    padding-top: 18vh;
}
.cmd-palette-overlay.active { display: flex; }
.cmd-palette {
    width: 100%; max-width: 560px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.94) 0%, rgba(10, 10, 14, 0.98) 100%);
    backdrop-filter: var(--blur-deep) saturate(190%);
    -webkit-backdrop-filter: var(--blur-deep) saturate(190%);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
}
.cmd-input {
    width: 100%; padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03); border: none; border-bottom: 1px solid var(--glass-border-default);
    color: #fff; font-size: 15px; font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
}
.cmd-results {
    max-height: 320px; overflow-y: auto; padding: 8px; background: var(--bg-card);
}
.cmd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
    border-left: 2px solid transparent;
    transition: var(--transition-fast);
}
.cmd-item:hover, .cmd-item.selected {
    background: var(--accent-bg-subtle);
    color: #fff;
    border-left: 2px solid var(--accent-primary);
}
.cmd-item i { font-size: 16px; color: var(--text-muted); width: 20px; text-align: center; }
.cmd-item:hover i { color: var(--accent-primary); }
.cmd-shortcut { margin-left: auto; font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #242424; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #383838; }

/* Deep Glassmorphism Architecture Classes */
.glass-panel-deep {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%), var(--bg-card-glass);
    backdrop-filter: var(--blur-standard) saturate(180%);
    -webkit-backdrop-filter: var(--blur-standard) saturate(180%);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid var(--glass-border-top);
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--glass-shadow-card);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-deep:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%), var(--bg-card-glass-hover);
    border-color: var(--accent-pink-border);
    box-shadow: var(--glass-shadow-card-hover);
    transform: translateY(-2px) translateZ(0);
}

.glass-card-pro,
.glass-card-interactive {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), rgba(12, 12, 14, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.glass-card-pro:hover,
.glass-card-interactive:hover {
    border-color: rgba(255, 107, 158, 0.40);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.85), 0 0 24px -4px rgba(255, 107, 158, 0.18), inset 0 1px 0 0 rgba(255, 255, 255, 0.20);
    transform: translateY(-3px) translateZ(0);
}

.glass-modal-deep {
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.92) 0%, rgba(10, 10, 14, 0.96) 100%);
    backdrop-filter: var(--blur-deep) saturate(190%);
    -webkit-backdrop-filter: var(--blur-deep) saturate(190%);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: var(--glass-shadow-modal);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
}

.glass-pill-deep {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px rgba(0,0,0,0.4);
    transform: translateZ(0);
}

.glass-nav-pro,
.glass-nav {
    background: rgba(8, 8, 10, 0.78);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateZ(0);
}

/* Accordion - CSS Grid Row Expansion */
.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.accordion-content.open {
    grid-template-rows: 1fr;
}
.accordion-content > div {
    overflow: hidden;
}
.accordion-btn .chevron-icon {
    transition: transform 0.3s ease;
}

/* Cards & Panels (Enhanced Deep Glassmorphism) */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%), var(--bg-card-glass);
    backdrop-filter: var(--blur-standard) saturate(170%);
    -webkit-backdrop-filter: var(--blur-standard) saturate(170%);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid var(--glass-border-top);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--glass-shadow-card);
    min-width: 0;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
    border-color: var(--accent-pink-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%), var(--bg-card-glass-hover);
    box-shadow: var(--glass-shadow-card-hover);
    transform: translateY(-2px) translateZ(0);
}
.card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.card-title { font-size: 15px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }

/* Buttons & Controls */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
    cursor: pointer; border: 1px solid transparent; white-space: nowrap;
    transition: var(--transition-fast);
}
.btn-primary { 
    background: #FF6B9E; 
    color: #050505; 
    font-weight: 700; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 9999px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    font-size: 14px; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 4px 15px rgba(255, 107, 158, 0.2); 
}
.btn-primary:hover { 
    background: #FF85A2; 
    color: #050505;
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(255, 107, 158, 0.4); 
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 158, 0.2);
}
.btn-secondary {
    background: #181818;
    border-color: var(--border-default);
    color: #e2e8f0;
}
.btn-secondary:hover {
    background: #222222;
    border-color: var(--border-strong);
    color: #ffffff;
}
.btn-admin {
    background: var(--admin-primary);
    border-color: var(--admin-primary);
    color: #050505;
    font-weight: 700;
}
.btn-admin:hover {
    background: #fbbf24;
    border-color: #fbbf24;
}

/* Inputs */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.input-field {
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    outline: none;
    width: 100%;
    transition: border-color var(--transition-fast);
}
.input-field:focus {
    border-color: var(--accent-primary);
    outline: none;
}

/* Status Badges */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-active { background: #141414; color: #fff; border: 1px solid var(--border-default); }
.status-warning { background: var(--accent-bg-subtle); color: var(--accent-secondary); border: 1px solid var(--accent-border-subtle); }

/* Data Tables */
.data-table-wrapper { width: 100%; overflow-x: auto; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-card); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.data-table th { padding: 12px 16px; color: var(--text-muted); font-weight: 700; border-bottom: 1px solid var(--border-default); text-transform: uppercase; font-size: 11px; background: #181818; letter-spacing: 0.5px; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); color: #e2e8f0; vertical-align: middle; }
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: #181818; }

.chart-container { position: relative; height: 300px; width: 100%; min-width: 0; min-height: 220px; }

/* Grid System */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-sidebar { display: grid; grid-template-columns: 3fr 1fr; gap: 24px; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-sidebar { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* KPI Cards */
.kpi-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.kpi-header { display: flex; align-items: center; justify-content: space-between; }
.kpi-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.kpi-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; background: #181818; border: 1px solid var(--border-default); }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; color: #fff; }
.kpi-meta { font-size: 12px; display: flex; align-items: center; gap: 6px; }

/* Kanban System */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; min-height: 500px; }
.kanban-column { flex: 0 0 320px; background: #0d0d0d; border-radius: var(--radius-md); border: 1px solid var(--border-default); display: flex; flex-direction: column; }
.kanban-col-header { padding: 14px 16px; border-bottom: 1px solid var(--border-default); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; background: #121212; }
.kanban-cards { padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; flex: 1; }
.kanban-card { background: #181818; border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: 14px; cursor: grab; box-shadow: var(--shadow-sm); transition: border-color var(--transition-fast); }
.kanban-card:hover { border-color: var(--border-strong); }

/* WhatsApp & Workflow Consoles */
.wa-container { display: flex; height: 600px; border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
.wa-list { width: 320px; background: #0a0a0a; border-right: 1px solid var(--border-default); display: flex; flex-direction: column; }
.wa-main { flex: 1; background: #050505; display: flex; flex-direction: column; }
.wa-copilot-panel { width: 300px; border-left: 1px solid var(--border-default); background: #0a0a0a; display: flex; flex-direction: column; }

.wf-canvas { background: #0a0a0a; border: 1px solid var(--border-default); border-radius: var(--radius-md); height: 500px; position: relative; overflow: hidden; }

/* Calendar Grid */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-header-cell { text-align: center; font-weight: 700; color: var(--text-muted); font-size: 12px; padding: 10px; }
.cal-cell { background: #121212; border: 1px solid var(--border-default); border-radius: var(--radius-sm); min-height: 100px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-date { font-size: 12px; font-weight: 700; color: var(--text-secondary); text-align: right; }

/* AI Studio Grid */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; height: 600px; }
.ai-panel { background: #121212; border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; }

.text-emerald { color: var(--accent-emerald); }
.text-primary { color: var(--accent-primary); }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.text-muted { color: var(--text-muted); }

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal-overlay.active {
    opacity: 1;
}
.modal-content {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.94) 0%, rgba(10, 10, 14, 0.98) 100%);
    backdrop-filter: var(--blur-deep) saturate(190%);
    -webkit-backdrop-filter: var(--blur-deep) saturate(190%);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-modal);
    transform: translateY(12px);
    transition: transform 0.2s ease-out;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-close:hover {
    color: #fff;
}

/* Utility Classes */
.mb-4 { margin-bottom: 16px; }

/* Onboarding Wizard */
.onboarding-phase { 
    border: 1px solid var(--border-default); 
    border-radius: var(--radius-md); 
    overflow: hidden; 
    background: #0e0e0e;
    transition: border-color var(--transition-fast);
}
.onboarding-phase:hover { 
    border-color: var(--border-strong); 
}
.onboarding-phase.complete { 
    border-color: var(--accent-emerald-border); 
}
.onboarding-phase-header {
    display: flex; align-items: center; gap: 12px; 
    padding: 12px 16px; cursor: pointer; transition: var(--transition-fast);
}
.onboarding-phase-header:hover { background: #141414; }
.onboarding-items {
    padding: 4px 16px 12px 48px;
    animation: slideDown 0.2s ease;
}
.onboarding-check {
    display: flex; align-items: center; gap: 10px; 
    padding: 7px 0; cursor: pointer; font-size: 13px;
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
    padding-left: 4px;
    margin: 0 -4px;
}
.onboarding-check:hover { background: #141414; }
.onboarding-checkbox {
    width: 18px; height: 18px; border-radius: 4px; 
    border: 1px solid var(--border-strong); 
    background: #141414;
    display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0; transition: var(--transition-fast);
}
.onboarding-checkbox.checked {
    border-color: var(--accent-emerald); background: var(--accent-emerald-bg);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.phase-complete-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-emerald-bg); color: var(--accent-emerald);
    border: 1px solid var(--accent-emerald-border);
    padding: 4px 10px; border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 700;
}

.confetti-piece {
    position: fixed; width: 8px; height: 8px; z-index: 99999;
    animation: confettiFall 2.5s ease-out forwards;
    pointer-events: none;
}
@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg) scale(0); opacity: 0; }
}

.onboarding-action-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; color: var(--accent-primary); font-weight: 600;
    cursor: pointer; transition: var(--transition-fast); padding: 2px 8px;
    border-radius: var(--radius-sm); border: 1px solid var(--accent-border-subtle);
    background: var(--accent-bg-subtle);
    text-decoration: none;
}
.onboarding-action-link:hover {
    background: #2a1405;
    border-color: var(--accent-primary);
}

/* ==========================================
   TELEPROMPTER STUDIO STYLES
   ========================================== */
.teleprompter-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #050505;
    z-index: 100000;
    display: none;
    flex-direction: column;
    color: #ffffff;
    overflow: hidden;
}
.teleprompter-overlay.active {
    display: flex;
}
.teleprompter-header {
    height: 64px;
    background: #0a0a0a;
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 20;
}
.teleprompter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.teleprompter-body {
    flex: 1;
    position: relative;
    display: flex;
    overflow: hidden;
    background: #050505;
}
.teleprompter-camera-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.35;
    display: none;
    transform: scaleX(-1);
}
.teleprompter-camera-bg.active {
    display: block;
}
.teleprompter-reading-zone {
    flex: 1;
    overflow-y: auto;
    padding: 180px 20% 400px 20%;
    scroll-behavior: auto;
    position: relative;
    z-index: 10;
}
.teleprompter-reading-zone::-webkit-scrollbar {
    width: 6px;
}
.teleprompter-reading-zone::-webkit-scrollbar-thumb {
    background: #242424;
    border-radius: 3px;
}
.teleprompter-reading-zone.mirror-mode {
    transform: scaleX(-1);
}
.teleprompter-guide-line {
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    pointer-events: none;
    z-index: 15;
    box-shadow: none;
}
.teleprompter-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    transition: font-size 0.15s ease;
}
.teleprompter-btn {
    background: #141414;
    border: 1px solid var(--border-default);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}
.teleprompter-btn:hover {
    background: #1e1e1e;
    border-color: var(--border-strong);
}
.teleprompter-btn.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: none;
}
.teleprompter-btn.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.teleprompter-countdown-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    font-weight: 900;
    color: var(--accent-primary);
    z-index: 50;
}

.cmd-action-badge {
    background: var(--accent-bg-subtle);
    color: var(--accent-secondary);
    border: 1px solid var(--accent-border-subtle);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   CLOUDBOT AUTONOMOUS GROWTH SUITE & COMMAND CENTER STYLES
   ========================================================================== */
.cloudbot-command-center {
    --cb-border-subtle: #242424;
}

.cloudbot-kpi-bar .kpi-card {
    border: 1px solid var(--border-default);
    background: var(--bg-card);
    transition: border-color var(--transition-fast);
}
.cloudbot-kpi-bar .kpi-card:hover {
    border-color: var(--border-strong);
}

.tab-pill-count {
    background: #181818;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    margin-left: 4px;
    border: 1px solid var(--border-default);
}
.screen-tab.active .tab-pill-count {
    background: var(--accent-bg-subtle);
    color: var(--accent-secondary);
    border-color: var(--accent-border-subtle);
}

.btn-safety-mode {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}
.btn-safety-mode:hover {
    color: #fff;
    background: #181818;
}
.btn-safety-mode.active.safe {
    background: var(--accent-emerald-bg);
    border-color: var(--accent-emerald-border);
    color: var(--accent-emerald);
    font-weight: 700;
}
.btn-safety-mode.active.normal {
    background: var(--accent-bg-subtle);
    border-color: var(--accent-border-subtle);
    color: var(--accent-secondary);
    font-weight: 700;
}
.btn-safety-mode.active.aggressive {
    background: var(--accent-rose-bg);
    border-color: var(--accent-rose-border);
    color: var(--accent-rose);
    font-weight: 700;
}

.status-emergency-paused {
    background: var(--accent-rose-bg);
    color: #ff4444;
    border: 1px solid var(--accent-rose-border);
}

.status-paused {
    background: #141414;
    color: var(--text-muted);
    border: 1px solid var(--border-default);
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   NAVI GUIDE SYSTEM
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Floating Button */
.navi-btn {
    position: fixed;
    bottom: 140px;
    right: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: width var(--transition-smooth), background var(--transition-fast);
    white-space: nowrap;
}
.navi-btn:hover {
    width: 110px;
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.navi-btn:active {
    background: var(--accent-active);
    border-color: var(--accent-active);
}
.navi-btn__icon {
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    width: 44px;
    text-align: center;
    line-height: 44px;
}
.navi-btn__label {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease, max-width 0.2s ease;
    padding-right: 0;
}
.navi-btn:hover .navi-btn__label {
    opacity: 1;
    max-width: 80px;
    padding-right: 12px;
}

/* Navi Backdrop */
.navi-backdrop {
    position: fixed;
    inset: 0;
    z-index: 8998;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.navi-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in Panel */
.navi-panel {
    position: fixed;
    top: var(--northbound-height);
    right: 0;
    bottom: 0;
    width: 320px;
    z-index: 8999;
    background: #0e0e0e;
    border-left: 1px solid var(--border-default);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    box-shadow: var(--shadow-modal);
}
.navi-panel.open {
    transform: translateX(0);
}

.navi-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
    background: #0a0a0a;
}
.navi-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}
.navi-panel-icon {
    font-size: 18px;
    color: var(--accent-primary);
}
.navi-close-btn {
    background: #181818;
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-fast);
}
.navi-close-btn:hover {
    background: #242424;
    color: #ffffff;
    border-color: var(--border-strong);
}

.navi-panel-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.navi-panel-subtitle .ph { font-size: 13px; color: var(--accent-primary); }

.navi-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    background: #0e0e0e;
}
.navi-panel-body::-webkit-scrollbar { width: 4px; }
.navi-panel-body::-webkit-scrollbar-thumb { background: #242424; border-radius: 2px; }

.navi-panel-footer {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    border-top: 1px solid var(--border-default);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    flex-shrink: 0;
    background: #0a0a0a;
}

/* Feature Items */
.navi-feature-item {
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition-fast);
}
.navi-feature-item:last-child { border-bottom: none; }
.navi-feature-item.expanded {
    background: var(--accent-bg-subtle);
    border-bottom-color: var(--accent-border-subtle);
}

.navi-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    cursor: pointer;
    gap: 12px;
    transition: background var(--transition-fast);
}
.navi-feature-header:hover {
    background: #141414;
}
.navi-feature-info {
    flex: 1;
    min-width: 0;
}
.navi-feature-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navi-feature-item.expanded .navi-feature-label {
    color: var(--accent-primary);
}
.navi-feature-desc {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navi-feature-chevron {
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}
.navi-feature-item.expanded .navi-feature-chevron {
    color: var(--accent-primary);
}

.navi-feature-body {
    padding: 0 20px 16px;
    animation: naviBodySlide 0.2s ease;
}
@keyframes naviBodySlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.navi-start-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition-fast);
}
.navi-start-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.navi-start-btn:active { background: var(--accent-active); border-color: var(--accent-active); }

.navi-no-steps {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 8px 0;
}

/* Step Highlight Frame */
.navi-step-highlight {
    position: absolute;
    display: none;
    z-index: 9100;
    pointer-events: none;
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.3);
}

/* Tooltip Bubble */
.navi-tooltip {
    position: fixed;
    display: none;
    z-index: 9200;
    width: 300px;
    background: #141414;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-modal);
    animation: naviTooltipIn 0.2s ease;
}
@keyframes naviTooltipIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.navi-tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.navi-tooltip-icon {
    font-size: 15px;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.navi-tooltip-step {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.navi-tooltip-close {
    background: #1e1e1e;
    border: 1px solid var(--border-default);
    color: var(--text-muted);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: var(--transition-fast);
    flex-shrink: 0;
}
.navi-tooltip-close:hover { background: #282828; color: #fff; border-color: var(--border-strong); }

.navi-tooltip-text {
    font-size: 13px;
    line-height: 1.55;
    color: #e2e8f0;
    margin-bottom: 14px;
}

.navi-tooltip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.navi-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}
.navi-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.navi-btn-primary:active { background: var(--accent-active); border-color: var(--accent-active); }

.navi-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #181818;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}
.navi-btn-ghost:hover { background: #222222; color: #fff; border-color: var(--border-strong); }

/* Completion State */
.navi-tooltip-completion {
    text-align: center;
    padding: 4px 0;
}
.navi-completion-icon {
    font-size: 40px;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 10px;
}
.navi-completion-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}
.navi-completion-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .navi-panel { width: 100vw; }
    .navi-tooltip { width: calc(100vw - 32px); left: 16px !important; }
    .navi-btn { bottom: 72px; right: 16px; }
}

/* ==========================================================================
   Universal Operational Action System & Operational Modals (Brutalist Dark)
   ========================================================================== */

/* Universal 3-Dots Action Menu Trigger */
.btn-action-menu {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm, 4px);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted, #666666);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition-fast, 0.12s ease-out);
    flex-shrink: 0;
    padding: 0;
    outline: none;
}
.btn-action-menu:hover,
.btn-action-menu.active {
    background: #181818;
    border-color: var(--border-default, #242424);
    color: var(--accent-primary, #FF6B9E);
}
.btn-action-menu:focus-visible {
    border-color: var(--accent-primary, #FF6B9E);
}

/* Floating Action Menu Popover */
.vcm-action-menu-popover {
    position: fixed;
    z-index: 10500;
    min-width: 190px;
    background: #121212;
    border: 1px solid var(--border-default, #242424);
    border-radius: var(--radius-md, 6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95), 0 0 0 1px #1a1a1a;
    padding: 5px 0;
    display: none;
    flex-direction: column;
    animation: vcmActionMenuFadeIn 0.12s ease-out forwards;
}

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

.vcm-action-menu-popover.active {
    display: flex;
}

/* Action Menu Items */
.vcm-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #e5e5e5;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: var(--transition-fast, 0.12s ease-out);
    font-family: inherit;
    outline: none;
}
.vcm-menu-item:hover,
.vcm-menu-item:focus-visible {
    background: #1a0f05;
    color: var(--accent-secondary, #FF85A2);
}
.vcm-menu-item i {
    font-size: 15px;
    color: var(--text-muted, #666666);
    transition: color 0.12s ease-out;
    flex-shrink: 0;
}
.vcm-menu-item:hover i,
.vcm-menu-item:focus-visible i {
    color: var(--accent-primary, #FF6B9E);
}
.vcm-menu-divider {
    height: 1px;
    background: var(--border-default, #242424);
    margin: 4px 0;
}
.vcm-menu-item.danger {
    color: var(--accent-rose, #ef4444);
}
.vcm-menu-item.danger:hover,
.vcm-menu-item.danger:focus-visible {
    background: var(--accent-rose-bg, #1a0707);
    color: #ff4444;
}
.vcm-menu-item.danger i {
    color: var(--accent-rose, #ef4444);
}

/* Brutalist Modal Overlays & Dialogs */
.vcm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: vcmModalOverlayIn 0.15s ease-out forwards;
}

@keyframes vcmModalOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vcm-modal-content {
    background: #121212;
    border: 1px solid var(--border-default, #242424);
    border-radius: var(--radius-lg, 8px);
    width: 100%;
    max-width: 520px;
    padding: 24px;
    box-shadow: var(--shadow-modal, 0 20px 48px rgba(0, 0, 0, 1));
    position: relative;
    animation: vcmModalContentIn 0.15s ease-out forwards;
}

@keyframes vcmModalContentIn {
    from { opacity: 0; transform: scale(0.97) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vcm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-default, #242424);
}

.vcm-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcm-modal-close {
    background: #181818;
    border: 1px solid var(--border-default, #242424);
    color: var(--text-muted, #666666);
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast, 0.12s ease-out);
    padding: 0;
}
.vcm-modal-close:hover {
    background: #242424;
    color: #ffffff;
    border-color: var(--border-strong, #333333);
}

.vcm-modal-body {
    margin-bottom: 20px;
}

.vcm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-default, #242424);
}

/* Radio Selection Cards (Export format picker) */
.vcm-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #0e0e0e;
    border: 1px solid var(--border-default, #242424);
    border-radius: var(--radius-sm, 4px);
    cursor: pointer;
    transition: var(--transition-fast, 0.12s ease-out);
}
.vcm-radio-card:hover {
    background: #161616;
    border-color: var(--border-strong, #333333);
}
.vcm-radio-card input[type="radio"] {
    accent-color: var(--accent-primary, #FF6B9E);
    margin-top: 3px;
    cursor: pointer;
}
.vcm-radio-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}
.vcm-radio-sub {
    font-size: 11px;
    color: var(--text-muted, #666666);
    line-height: 1.35;
}

/* Buttons */
.btn-danger {
    background: var(--accent-rose, #ef4444);
    color: #ffffff;
    border: 1px solid var(--accent-rose-border, #7f1d1d);
    border-radius: var(--radius-sm, 4px);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast, 0.12s ease-out);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #991b1b;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.vcm-toast {
    background: rgba(18, 18, 22, 0.88);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--glass-border-default);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 3px solid var(--accent-primary, #FF6B9E);
    border-radius: var(--radius-md, 6px);
    padding: 12px 16px;
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 107, 158, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 440px;
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.22s ease-out;
}
.vcm-toast.active {
    transform: translateX(0);
}
.vcm-toast-icon {
    font-size: 20px;
    color: var(--accent-primary, #FF6B9E);
    flex-shrink: 0;
}
.vcm-toast-body {
    flex: 1;
    min-width: 0;
}
.vcm-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}
.vcm-toast-msg {
    font-size: 11px;
    color: var(--text-secondary, #a3a3a3);
    line-height: 1.35;
}
.vcm-toast-close {
    background: none;
    border: none;
    color: var(--text-muted, #666666);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.vcm-toast-close:hover {
    color: #ffffff;
}

.vcm-toast-success {
    border-left-color: var(--accent-emerald, #22c55e);
}
.vcm-toast-success .vcm-toast-icon {
    color: var(--accent-emerald, #22c55e);
}

.vcm-toast-warning {
    border-left-color: var(--accent-amber, #f59e0b);
}
.vcm-toast-warning .vcm-toast-icon {
    color: var(--accent-amber, #f59e0b);
}

.vcm-toast-error {
    border-left-color: var(--accent-rose, #ef4444);
}
.vcm-toast-error .vcm-toast-icon {
    color: var(--accent-rose, #ef4444);
}



h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.02em; }



/* Apple Style Text Gradient Animation */
.apple-gradient-text {
    background: linear-gradient(to right, #FFFFFF, #FF6B9E, #FF6B9E, #8B5CF6, #FFFFFF);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: appleShimmer 4s linear infinite;
}
@keyframes appleShimmer {
    to { background-position: -200% center; }
}



/* ── Official Zilla Gradient Utility Classes ── */
.bg-zilla-gradient {
    background: var(--zilla-gradient);
}
.text-zilla-gradient {
    background: var(--zilla-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.border-zilla-gradient {
    border-image: var(--zilla-gradient) 1;
}
