/* =============================================
   MUNDUS CODE COCKPIT DESIGN SYSTEM
   Purple + Gold | Bottom Dock | Editorial
   ============================================= */

:root {
    --bg-base: #08080c;
    --bg-raised: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #13131b;
    --bg-dock: #0c0c12;
    --border: rgba(255,255,255,0.05);
    --border-hover: rgba(255,255,255,0.1);
    --border-active: rgba(168,130,255,0.35);

    --purple: #a882ff;
    --purple-dim: #8b6be0;
    --purple-deep: #6c4dc4;
    --purple-glow: rgba(168,130,255,0.12);
    --purple-glow-strong: rgba(168,130,255,0.25);
    --gold: #e8be6b;
    --gold-dim: #c9a455;
    --gold-glow: rgba(232,190,107,0.12);
    --emerald: #34d399;
    --emerald-glow: rgba(52,211,153,0.12);
    --rose: #f472b6;
    --rose-glow: rgba(244,114,182,0.12);
    --sky: #38bdf8;
    --sky-glow: rgba(56,189,248,0.12);
    --orange: #fb923c;
    --orange-glow: rgba(251,146,60,0.12);
    --red: #f87171;
    --red-glow: rgba(248,113,113,0.12);

    --text-primary: #f0ecf8;
    --text-secondary: #8a849a;
    --text-tertiary: #56506a;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --dock-h: 72px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
}

/* =============================================
   LEGACY VARIABLE COMPATIBILITY LAYER
   Maps old page-specific vars to cockpit palette
   so existing templates render correctly
   ============================================= */

:root {
    /* === Generic old vars === */
    --accent: var(--purple);
    --accent-color: var(--purple);
    --accent-dark: var(--purple-deep);
    --accent-light: var(--purple);
    --primary: var(--purple);
    --primary-color: var(--purple);
    --primary-dark: var(--purple-deep);
    --primary-hover: var(--purple-dim);
    --primary-light: var(--purple-glow);
    --primary-bg: var(--purple-glow);
    --primary-rgb: 168,130,255;
    --color-primary: var(--purple);
    --color-purple: var(--purple);

    --bg: var(--bg-base);
    --bg-dark: var(--bg-base);
    --bg-light: var(--bg-card);
    --bg-primary: var(--bg-base);
    --bg-secondary: var(--bg-raised);
    --bg-tertiary: var(--bg-card);
    --bg-elevated: var(--bg-card);
    --bg-subtle: var(--bg-raised);
    --bg-hover: var(--bg-card-hover);
    --background-secondary: var(--bg-raised);
    --card-bg: var(--bg-card);
    --input-bg: var(--bg-input);
    --hover-bg: var(--bg-card-hover);

    --border-color: var(--border);
    --border-color-hover: var(--border-hover);
    --light-border: var(--border);
    --border-radius: var(--radius);

    --text: var(--text-primary);
    --text-muted: var(--text-secondary);
    --muted: var(--text-tertiary);
    --light-text-secondary: var(--text-secondary);

    --success: var(--emerald);
    --success-color: var(--emerald);
    --success-dark: #059669;
    --color-success: var(--emerald);
    --warning: var(--orange);
    --color-warning: var(--orange);
    --danger: var(--red);
    --danger-color: var(--red);
    --color-danger: var(--red);
    --info: var(--sky);
    --color-info: var(--sky);
    --light-info: var(--sky-glow);

    --glow: 0 0 20px var(--purple-glow);
    --glow-primary: 0 0 20px var(--purple-glow);
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-soft: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-lifted: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-neon: 0 0 20px var(--purple-glow);
    --light-shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
    --neon-bright: var(--purple);

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --radius-full: 9999px;
    --radius-lg: 16px;
    --radius-md: 12px;

    --sans: var(--font-body);
    --serif: var(--font-display);

    /* === Dashboard page vars (--db-*) === */
    --db-bg-darkest: var(--bg-base);
    --db-bg-dark: var(--bg-raised);
    --db-bg-medium: var(--bg-card);
    --db-bg-light: var(--bg-card-hover);
    --db-bg-card: var(--bg-card);
    --db-accent: var(--purple);
    --db-accent-light: var(--purple);
    --db-accent-dark: var(--purple-deep);
    --db-success: var(--emerald);
    --db-warning: var(--orange);
    --db-danger: var(--red);
    --db-info: var(--sky);
    --db-text: var(--text-primary);
    --db-text-muted: var(--text-secondary);
    --db-border: var(--border);
    --db-glow: 0 0 20px var(--purple-glow);

    /* === Leads page vars (--ld-*) === */
    --ld-bg-darkest: var(--bg-base);
    --ld-bg-dark: var(--bg-raised);
    --ld-bg-medium: var(--bg-card);
    --ld-bg-card: var(--bg-card);
    --ld-accent: var(--purple);
    --ld-accent-dark: var(--purple-deep);
    --ld-border: var(--border);
    --ld-text: var(--text-primary);
    --ld-text-muted: var(--text-secondary);
    --ld-glow: 0 0 20px var(--purple-glow);

    /* === Clients page vars (--cl-*) === */
    --cl-bg-darkest: var(--bg-base);
    --cl-bg-dark: var(--bg-raised);
    --cl-bg-medium: var(--bg-card);
    --cl-bg-light: var(--bg-card-hover);
    --cl-bg-card: var(--bg-card);
    --cl-accent: var(--purple);
    --cl-accent-dark: var(--purple-deep);
    --cl-border: var(--border);
    --cl-text: var(--text-primary);
    --cl-text-muted: var(--text-secondary);
    --cl-success: var(--emerald);
    --cl-warning: var(--orange);
    --cl-danger: var(--red);
    --cl-info: var(--sky);
    --cl-glow: 0 0 20px var(--purple-glow);

    /* === Projects page vars (--pj-*) === */
    --pj-bg-darkest: var(--bg-base);
    --pj-bg-dark: var(--bg-raised);
    --pj-bg-medium: var(--bg-card);
    --pj-bg-light: var(--bg-card-hover);
    --pj-bg-card: var(--bg-card);
    --pj-accent: var(--purple);
    --pj-accent-dark: var(--purple-deep);
    --pj-accent-light: var(--purple);
    --pj-border: var(--border);
    --pj-text: var(--text-primary);
    --pj-text-muted: var(--text-secondary);
    --pj-success: var(--emerald);
    --pj-warning: var(--orange);
    --pj-danger: var(--red);
    --pj-info: var(--sky);
    --pj-glow: 0 0 20px var(--purple-glow);

    /* === Invoices page vars (--iv-*) === */
    --iv-bg-darkest: var(--bg-base);
    --iv-bg-dark: var(--bg-raised);
    --iv-bg-medium: var(--bg-card);
    --iv-bg-light: var(--bg-card-hover);
    --iv-bg-card: var(--bg-card);
    --iv-accent: var(--purple);
    --iv-accent-dark: var(--purple-deep);
    --iv-accent-light: var(--purple);
    --iv-border: var(--border);
    --iv-text: var(--text-primary);
    --iv-text-muted: var(--text-secondary);
    --iv-success: var(--emerald);
    --iv-warning: var(--orange);
    --iv-danger: var(--red);
    --iv-info: var(--sky);
    --iv-glow: 0 0 20px var(--purple-glow);

    /* === Marketing/misc vars (--mc-*) === */
    --mc-accent: var(--purple);
    --mc-primary-soft: var(--purple-glow);
    --mc-text-main: var(--text-primary);
    --mc-text-muted: var(--text-secondary);

    /* === Visual extras === */
    --ink: var(--text-primary);
    --paper: var(--bg-card);
    --cream: var(--bg-raised);
    --progress: var(--purple);
    --bs-light: var(--bg-card);
}

/* === Global overrides for old layout classes === */
body {
    background: var(--bg-base) !important;
    color: var(--text-primary) !important;
}

/* Fix old page wrappers that used negative margins for sidebar */
.dashboard-enterprise,
.leads-container,
.clients-container,
.invoices-container,
.projects-container,
.quotes-container,
.settings-container,
.page-wrapper,
.container-xxl {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    min-height: auto !important;
}

/* Fix old card styles to match cockpit */
.card, .stat-card-modern, .metric-card, .summary-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text-primary);
}

/* Old table styles */
.table, table {
    color: var(--text-primary);
}
.table th, table th {
    color: var(--text-tertiary) !important;
    border-color: var(--border) !important;
}
.table td, table td {
    border-color: var(--border) !important;
}
.table tr:hover, table tbody tr:hover {
    background: var(--bg-card-hover) !important;
}

/* Old form controls */
.form-control, select, input[type="text"], input[type="email"],
input[type="password"], input[type="number"], input[type="search"],
textarea {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-body) !important;
}
.form-control:focus, select:focus, input:focus, textarea:focus {
    border-color: var(--border-active) !important;
    box-shadow: 0 0 12px var(--purple-glow) !important;
    outline: none !important;
}

/* Old button variants */
.btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger,
.btn-secondary, .btn-outline-primary {
    border-radius: var(--radius-xs) !important;
    font-family: var(--font-body) !important;
}

/* Old badge styles */
.badge-secondary { background: rgba(255,255,255,0.06) !important; color: var(--text-secondary) !important; }
.badge-primary, .badge-purple { background: var(--purple-glow) !important; color: var(--purple) !important; }

/* Old page header */
.page-header {
    background: transparent !important;
    border: none !important;
    padding: 0 0 16px 0 !important;
}
.page-header h1 {
    font-family: var(--font-display) !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
}

/* Fix any old main-content/page-content margins (sidebar is gone) */
.main-content, .page-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Old alert styles */
.alert {
    border-radius: var(--radius-sm) !important;
    padding: 12px 20px !important;
    font-size: 13px !important;
}
.alert-success { background: rgba(52,211,153,0.12) !important; color: var(--emerald) !important; border: 1px solid rgba(52,211,153,0.2) !important; }
.alert-danger, .alert-error { background: rgba(248,113,113,0.12) !important; color: var(--red) !important; border: 1px solid rgba(248,113,113,0.2) !important; }
.alert-warning { background: rgba(251,146,60,0.12) !important; color: var(--orange) !important; border: 1px solid rgba(251,146,60,0.2) !important; }
.alert-info { background: rgba(56,189,248,0.12) !important; color: var(--sky) !important; border: 1px solid rgba(56,189,248,0.2) !important; }

/* Old modal styles */
.modal, .modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    color: var(--text-primary) !important;
}
.modal-header {
    border-bottom: 1px solid var(--border) !important;
}
.modal-footer {
    border-top: 1px solid var(--border) !important;
}
.modal-backdrop, .modal-overlay {
    background: rgba(0,0,0,0.6) !important;
}

/* Typography override */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* Links */
a { color: var(--purple); }
a:hover { color: var(--purple-dim); }

/* Old nav styles from removed sidebar - hide any remnants */
.sidebar:not(.dock) { display: none !important; }
.sidebar-backdrop { display: none !important; }

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; }
body {
    font-family: var(--font-body);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding-bottom: calc(var(--dock-h) + 20px);
}

a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }

/* ===== COCKPIT TOP BAR ===== */
.cockpit-bar {
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid var(--border);
    padding: 0 28px; height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    backdrop-filter: blur(16px);
    background: rgba(17,17,24,0.88);
}
.cockpit-left { display: flex; align-items: center; gap: 16px; }
.cockpit-brand { display: flex; align-items: center; gap: 10px; }
.cockpit-brand .logo {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--purple), var(--purple-deep));
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #fff;
    box-shadow: 0 0 20px var(--purple-glow);
}
.cockpit-brand .brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.3px; }
.cockpit-brand .brand-name span { color: var(--purple); }

.cockpit-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 7px 14px; width: 340px;
    transition: all 0.2s;
}
.cockpit-search:focus-within { border-color: var(--border-active); box-shadow: 0 0 16px var(--purple-glow); }
.cockpit-search i { color: var(--text-tertiary); font-size: 13px; }
.cockpit-search input {
    background: none; border: none; color: var(--text-primary);
    font-family: var(--font-body); font-size: 13px; width: 100%; outline: none;
}
.cockpit-search input::placeholder { color: var(--text-tertiary); }

.cockpit-right { display: flex; align-items: center; gap: 6px; }
.cockpit-btn {
    width: 36px; height: 36px; border-radius: var(--radius-xs);
    border: 1px solid var(--border); background: transparent;
    color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; position: relative; font-size: 14px;
}
.cockpit-btn:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-active); }
.cockpit-btn .dot {
    position: absolute; top: 7px; right: 7px;
    width: 6px; height: 6px; background: var(--rose); border-radius: 50%;
}
.cockpit-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--gold));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; color: #fff; cursor: pointer;
    margin-left: 4px;
}

/* ===== BOTTOM DOCK ===== */
.dock {
    position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 200;
    background: var(--bg-dock);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px; padding: 8px 12px;
    display: flex; align-items: center; gap: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 60px var(--purple-glow);
    backdrop-filter: blur(20px);
}
.dock-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 56px; height: 52px; border-radius: 14px;
    color: var(--text-tertiary); transition: all 0.25s; cursor: pointer; position: relative;
}
.dock-item i { font-size: 18px; margin-bottom: 2px; transition: all 0.25s; }
.dock-item span { font-size: 9px; font-weight: 600; letter-spacing: 0.3px; }
.dock-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.dock-item:hover i { transform: translateY(-2px); }
.dock-item.active { color: var(--purple); background: var(--purple-glow); }
.dock-item.active::after {
    content: ''; position: absolute; bottom: 4px;
    width: 16px; height: 3px; background: var(--purple); border-radius: 2px;
}
.dock-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.06); margin: 0 4px; }
.dock-item .dock-badge {
    position: absolute; top: 4px; right: 8px;
    background: var(--rose); color: #fff;
    font-size: 8px; font-weight: 700;
    min-width: 14px; height: 14px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.dock-aurora {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--purple-deep));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 24px var(--purple-glow-strong);
    cursor: pointer; transition: all 0.3s; margin: 0 4px;
}
.dock-aurora:hover { transform: scale(1.1); box-shadow: 0 0 32px var(--purple-glow-strong); }

/* ===== CONTENT AREA ===== */
.content { max-width: 1360px; margin: 0 auto; padding: 24px 28px; }

/* ===== PAGE BANNER ===== */
.page-banner {
    background: linear-gradient(135deg, #13111f 0%, #18142a 40%, #151320 100%);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px 36px; margin-bottom: 24px;
    position: relative; overflow: hidden;
}
.page-banner::before {
    content: ''; position: absolute; top: -60%; right: -5%;
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--purple-glow-strong) 0%, transparent 60%);
    pointer-events: none;
}
.page-banner::after {
    content: ''; position: absolute; bottom: -50%; left: 20%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    pointer-events: none;
}
.page-banner-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.page-banner-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.page-banner-desc { color: var(--text-secondary); font-size: 14px; max-width: 600px; position: relative; }
.page-banner-actions { display: flex; gap: 10px; position: relative; }

/* ===== SECTION HEADERS ===== */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color 0.3s;
}
.card:hover { border-color: var(--border-hover); }
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.card-header h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.3px; }
.card-body { padding: 20px; }

/* ===== STAT CARDS ===== */
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    cursor: pointer; transition: all 0.25s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.stat-icon {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; margin-bottom: 14px;
}
.stat-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; margin: 2px 0; }
.stat-sub { font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.stat-sub.up { color: var(--emerald); }
.stat-sub.down { color: var(--red); }
.stat-sub.warn { color: var(--orange); }

/* ===== STATS ROW (mini) ===== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-mini {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 20px;
    display: flex; align-items: center; gap: 14px;
}
.stat-mini-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.stat-mini-value { font-size: 20px; font-weight: 700; }
.stat-mini-label { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== BUTTONS ===== */
.btn {
    padding: 9px 18px; border-radius: var(--radius-xs);
    font-size: 13px; font-weight: 600; font-family: var(--font-body);
    cursor: pointer; border: none;
    display: inline-flex; align-items: center; gap: 7px;
    transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--purple), var(--purple-dim));
    color: #fff; box-shadow: 0 2px 12px var(--purple-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--purple-glow-strong); }
.btn-gold { background: var(--gold); color: var(--bg-base); }
.btn-gold:hover { background: var(--gold-dim); }
.btn-success { background: var(--emerald); color: var(--bg-base); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); border-color: var(--border-hover); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== TABS ===== */
.tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 4px; width: fit-content;
}
.tab {
    padding: 8px 18px; border-radius: var(--radius-xs);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s; border: none; background: none;
    font-family: var(--font-body);
}
.tab:hover { color: var(--text-primary); }
.tab.active { background: var(--purple-glow); color: var(--purple); font-weight: 600; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table thead th {
    padding: 10px 14px; text-align: left;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-tertiary);
    border-bottom: 1px solid var(--border);
}
table tbody td {
    padding: 12px 14px; font-size: 13px;
    border-bottom: 1px solid var(--border); vertical-align: middle;
}
table tbody tr { transition: background 0.15s; }
table tbody tr:hover { background: var(--bg-card-hover); }
table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.badge-success { background: var(--emerald-glow); color: var(--emerald); }
.badge-warning { background: var(--orange-glow); color: var(--orange); }
.badge-danger { background: var(--red-glow); color: var(--red); }
.badge-info { background: var(--sky-glow); color: var(--sky); }
.badge-purple { background: var(--purple-glow); color: var(--purple); }
.badge-gold { background: var(--gold-glow); color: var(--gold); }
.badge-neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.badge-rose { background: var(--rose-glow); color: var(--rose); }

/* ===== PROGRESS BARS ===== */
.progress-track { height: 5px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.progress-fill.purple { background: linear-gradient(90deg, var(--purple-deep), var(--purple)); }
.progress-fill.emerald { background: var(--emerald); }
.progress-fill.gold { background: var(--gold); }
.progress-fill.sky { background: var(--sky); }
.progress-fill.rose { background: var(--rose); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-tertiary); margin-bottom: 8px;
}
.form-group label .required { color: var(--rose); }
.form-control {
    width: 100%; padding: 10px 14px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-family: var(--font-body); font-size: 13.5px;
    transition: border-color 0.2s; outline: none;
}
.form-control:focus { border-color: var(--border-active); box-shadow: 0 0 12px var(--purple-glow); }
.form-control::placeholder { color: var(--text-tertiary); }
select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-hint { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }

/* ===== ACTIVITY FEED ===== */
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.activity-text { font-size: 13px; }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 10px; color: var(--text-tertiary); margin-top: 1px; }

/* ===== TUTORIAL / INFO BANNERS ===== */
.tutorial-banner {
    background: linear-gradient(135deg, var(--purple-glow) 0%, rgba(232,190,107,0.05) 100%);
    border: 1px solid rgba(168,130,255,0.15);
    border-radius: var(--radius); padding: 18px 22px;
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.tutorial-banner .tut-icon { font-size: 28px; color: var(--purple); flex-shrink: 0; }
.tutorial-banner .tut-body { flex: 1; }
.tutorial-banner .tut-title { font-weight: 600; font-size: 14px; }
.tutorial-banner .tut-desc { font-size: 12.5px; color: var(--text-secondary); }

/* ===== WIZARD / MODAL ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 300; justify-content: center; align-items: center; padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 18px; max-width: 640px; width: 100%;
    max-height: 90vh; overflow-y: auto;
}
.modal-lg { max-width: 800px; }
.modal-header { padding: 28px 32px 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 4px; }
.modal-header p { color: var(--text-secondary); font-size: 13px; }
.modal-body { padding: 24px 32px; }
.modal-footer { padding: 16px 32px 24px; display: flex; justify-content: space-between; border-top: 1px solid var(--border); }

.wizard-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard-step { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.06); }
.wizard-step.active { background: var(--purple); }
.wizard-step.done { background: var(--emerald); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-tertiary);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin-bottom: 20px; }

/* ===== GRIDS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.grid-2-1 { display: grid; grid-template-columns: 5fr 3fr; gap: 18px; margin-bottom: 24px; }
.grid-1-2 { display: grid; grid-template-columns: 3fr 5fr; gap: 18px; margin-bottom: 24px; }

/* ===== KANBAN ===== */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; min-height: 400px; }
.kanban-col {
    min-width: 280px; max-width: 320px; flex-shrink: 0;
    background: var(--bg-raised); border: 1px solid var(--border);
    border-radius: var(--radius); display: flex; flex-direction: column;
}
.kanban-col-header {
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.kanban-col-title { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.kanban-col-count {
    background: rgba(255,255,255,0.06); padding: 2px 8px;
    border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--text-tertiary);
}
.kanban-col-body { padding: 10px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px;
    cursor: pointer; transition: all 0.2s;
}
.kanban-card:hover { border-color: var(--border-active); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.kanban-card-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.kanban-card-sub { font-size: 11px; color: var(--text-tertiary); }
.kanban-card-meta { display: flex; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--text-tertiary); }

/* ===== SERVER BADGE ===== */
.server-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-xs);
    font-family: var(--font-mono); font-size: 12px; color: var(--text-secondary);
}

/* ===== AVATAR ===== */
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; color: #fff; flex-shrink: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 10px; }
.avatar-lg { width: 42px; height: 42px; font-size: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .kanban { flex-wrap: nowrap; }
}
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .cockpit-search { width: 180px; }
    .content { padding: 16px; }
    .page-banner { padding: 24px; }
    .page-banner-top { flex-direction: column; gap: 12px; }
    .dock { padding: 6px 8px; gap: 2px; }
    .dock-item { width: 44px; height: 44px; }
    .dock-item span { display: none; }
    .dock-aurora { width: 44px; height: 44px; font-size: 18px; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.anim { animation: fadeUp 0.5s ease both; }
.anim-fade { animation: fadeIn 0.4s ease both; }
.d1{animation-delay:.04s}.d2{animation-delay:.08s}.d3{animation-delay:.12s}
.d4{animation-delay:.16s}.d5{animation-delay:.2s}.d6{animation-delay:.24s}
.d7{animation-delay:.28s}.d8{animation-delay:.32s}.d9{animation-delay:.36s}

/* ===== UTILITY ===== */
.text-muted { color: var(--text-secondary); }
.text-dim { color: var(--text-tertiary); }
.text-purple { color: var(--purple); }
.text-gold { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }
.text-sky { color: var(--sky); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: 12px; }
.fs-xs { font-size: 11px; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.chart-wrap { position: relative; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
</style>
