/* ══════════════════════════════════════════════════════════════
   AURORA THEME — Dark glass, stage-tinted columns, gradient-lit edges
   Visual-only overrides keyed off [data-theme="aurora"]; no layout or
   behavior changes. Blur is budgeted to the two fixed surfaces
   (sidebar + header) and disabled entirely on html[data-perf="low"].
   ══════════════════════════════════════════════════════════════ */

[data-theme="aurora"] {
    --au-bg: #05070f;
    --au-panel: rgba(14, 19, 34, 0.72);
    --au-card-top: rgba(17, 22, 38, 0.88);
    --au-card-bot: rgba(14, 19, 32, 0.88);
    --au-stroke: rgba(255, 255, 255, 0.09);
    --au-hairline: rgba(255, 255, 255, 0.06);
    --au-text: #f0f3fa;
    --au-text-2: #9aa5bd;
    --au-text-3: #5c6780;
    --au-cyan: #22d3ee;
    --au-indigo: #6366f1;
    background: var(--au-bg) !important;
    color: var(--au-text) !important;
}

/* ── Aurora backdrop — one static paint, zero animation ── */
[data-theme="aurora"] body {
    background:
        radial-gradient(1000px 480px at 18% -12%, rgba(99, 102, 241, 0.34), transparent 58%),
        radial-gradient(900px 420px at 78% -18%, rgba(34, 211, 238, 0.20), transparent 58%),
        radial-gradient(700px 480px at 100% 68%, rgba(160, 122, 245, 0.09), transparent 60%),
        radial-gradient(800px 420px at -8% 90%, rgba(59, 130, 246, 0.07), transparent 55%),
        var(--au-bg) !important;
    color: var(--au-text) !important;
}
/* Luminous horizon line across the very top of the viewport */
[data-theme="aurora"] body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 1px;
    z-index: 40;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(140, 150, 255, 0.5), rgba(80, 220, 220, 0.4), transparent);
}

/* Typography: kill italics, display font for heavy text */
[data-theme="aurora"] * { font-style: normal !important; }
[data-theme="aurora"] .font-black {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    font-weight: 700 !important;
}

/* Let the aurora show through page containers */
[data-theme="aurora"] .bg-slate-950 { background: transparent !important; }

/* Generic dark surfaces → translucent glass panels */
[data-theme="aurora"] .bg-slate-900 {
    background: var(--au-panel) !important;
    border-color: var(--au-hairline) !important;
}
[data-theme="aurora"] .bg-slate-800 {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--au-hairline) !important;
}
[data-theme="aurora"] .border-slate-800,
[data-theme="aurora"] .border-slate-700,
[data-theme="aurora"] .border-slate-700\/50 {
    border-color: var(--au-hairline) !important;
}

/* Soften the giant radii */
[data-theme="aurora"] .rounded-\[4rem\],
[data-theme="aurora"] .rounded-\[3rem\],
[data-theme="aurora"] .rounded-\[2\.5rem\] { border-radius: 20px !important; }
[data-theme="aurora"] .rounded-3xl { border-radius: 16px !important; }
[data-theme="aurora"] .rounded-2xl { border-radius: 14px !important; }

/* ── SIDEBAR — frosted glass (blur budget surface #1) ── */
[data-theme="aurora"] aside {
    background: rgba(13, 18, 32, 0.72) !important;
    border-color: var(--au-stroke) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}
[data-theme="aurora"] aside nav button {
    color: #8d97ad !important;
    border-radius: 9px !important;
}
[data-theme="aurora"] aside nav button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--au-text) !important;
}
/* Active nav — gradient-edged glass pill */
[data-theme="aurora"] aside nav button.bg-violet-600,
[data-theme="aurora"] aside nav button.bg-blue-600 {
    border: 1px solid transparent !important;
    background:
        linear-gradient(rgba(22, 28, 48, 0.92), rgba(22, 28, 48, 0.92)) padding-box,
        linear-gradient(120deg, rgba(99, 102, 241, 0.8), rgba(34, 211, 238, 0.5)) border-box !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(80, 100, 240, 0.25) !important;
}

/* ── HEADER — frosted glass (blur budget surface #2) ── */
[data-theme="aurora"] header {
    background: rgba(10, 14, 26, 0.6) !important;
    border-color: var(--au-stroke) !important;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}
[data-theme="aurora"] header h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    letter-spacing: -0.02em !important;
    color: var(--au-text) !important;
}

/* ── STAGE COLORS — one CSS var per column border class.
   Both dispatch (.dispatch-tab-col) and production (.kanban-column)
   carry their stage color as a Tailwind border-*-500 class, so the
   var cascades to the column and every card inside it. ── */
[data-theme="aurora"] .border-blue-500    { --sc-rgb: 91, 140, 255; }
[data-theme="aurora"] .border-cyan-500    { --sc-rgb: 55, 210, 196; }
[data-theme="aurora"] .border-yellow-500  { --sc-rgb: 242, 193, 78; }
[data-theme="aurora"] .border-pink-500    { --sc-rgb: 239, 111, 174; }
[data-theme="aurora"] .border-red-500     { --sc-rgb: 255, 107, 94; }
[data-theme="aurora"] .border-amber-500   { --sc-rgb: 245, 158, 11; }
[data-theme="aurora"] .border-emerald-500 { --sc-rgb: 52, 211, 153; }
[data-theme="aurora"] .border-purple-500  { --sc-rgb: 160, 122, 245; }
[data-theme="aurora"] .border-rose-500    { --sc-rgb: 244, 63, 94; }
[data-theme="aurora"] .border-orange-500  { --sc-rgb: 249, 115, 22; }
[data-theme="aurora"] .border-slate-500   { --sc-rgb: 148, 163, 184; }
[data-theme="aurora"] .border-gray-500    { --sc-rgb: 156, 163, 175; }

/* ── KANBAN COLUMNS — stage-tinted glass (no blur: cheap to scroll) ── */
[data-theme="aurora"] .dispatch-tab-col,
[data-theme="aurora"] .kanban-column {
    background:
        linear-gradient(180deg, rgba(var(--sc-rgb, 124, 140, 255), 0.10), rgba(255, 255, 255, 0.02) 130px),
        rgba(13, 18, 32, 0.55) !important;
    border: 1px solid var(--au-hairline) !important;
    border-top: 3px solid rgb(var(--sc-rgb, 124, 140, 255)) !important;
    border-radius: 16px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
/* Column header strip: transparent, stage-tinted title */
[data-theme="aurora"] .dispatch-tab-col > div:first-child,
[data-theme="aurora"] .kanban-column > div:first-child {
    background: transparent !important;
    border-color: var(--au-hairline) !important;
}
[data-theme="aurora"] .dispatch-tab-col > div:first-child > span:first-child,
[data-theme="aurora"] .kanban-column > div:first-child span.font-black:first-child {
    color: rgb(var(--sc-rgb, 154, 165, 189)) !important;
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
}

/* ── LEAD / PROJECT CARDS — gradient-lit top edge glass ── */
[data-theme="aurora"] [draggable="true"] {
    border: 1px solid transparent !important;
    background:
        linear-gradient(var(--au-card-top), var(--au-card-bot)) padding-box,
        linear-gradient(170deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 45%) border-box !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(2, 6, 20, 0.25) !important;
}
/* Hover: the edge ignites in the column's stage color */
[data-theme="aurora"] [draggable="true"]:hover {
    background:
        linear-gradient(rgba(20, 26, 44, 0.92), rgba(16, 21, 36, 0.92)) padding-box,
        linear-gradient(170deg, rgba(var(--sc-rgb, 124, 140, 255), 0.65), rgba(255, 255, 255, 0.06) 55%) border-box !important;
}
[data-theme="aurora"] [draggable="true"] h3 {
    text-transform: none !important;
    letter-spacing: -0.01em !important;
}

/* ── PRIMARY ACTIONS — indigo→cyan signature gradient ── */
[data-theme="aurora"] button.bg-blue-600,
[data-theme="aurora"] a.bg-blue-600 {
    background: linear-gradient(135deg, #5b6cf0, #22a6ee) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(60, 140, 240, 0.3) !important;
}
[data-theme="aurora"] button.bg-blue-600:hover,
[data-theme="aurora"] a.bg-blue-600:hover { filter: brightness(1.08); }
[data-theme="aurora"] button.bg-violet-600:not(aside nav button) {
    background: linear-gradient(135deg, #7c6cf0, #5a48d6) !important;
    color: #fff !important;
}

/* ── INPUTS ── */
[data-theme="aurora"] input,
[data-theme="aurora"] select,
[data-theme="aurora"] textarea {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--au-stroke) !important;
    color: var(--au-text) !important;
}
[data-theme="aurora"] input:focus,
[data-theme="aurora"] select:focus,
[data-theme="aurora"] textarea:focus {
    border-color: rgba(34, 211, 238, 0.55) !important;
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.12) !important;
    outline: none !important;
}

/* ── MODALS — darker overlay, near-opaque glass panel ── */
[data-theme="aurora"] .bg-black\/95,
[data-theme="aurora"] .bg-black\/80 { background-color: rgba(3, 6, 14, 0.78) !important; }
[data-theme="aurora"] .fixed.inset-0 .bg-slate-900 {
    background: rgba(13, 17, 29, 0.97) !important;
    border-color: var(--au-stroke) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 60px rgba(0, 0, 0, 0.55) !important;
}

/* ── TABLES ── */
[data-theme="aurora"] thead tr {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--au-hairline) !important;
}
[data-theme="aurora"] tbody tr:hover { background: rgba(255, 255, 255, 0.03) !important; }
[data-theme="aurora"] .divide-slate-800\/50 > :not([hidden]) ~ :not([hidden]),
[data-theme="aurora"] .divide-slate-800 > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--au-hairline) !important;
}

/* ── TEXT ── */
[data-theme="aurora"] .text-slate-400,
[data-theme="aurora"] .text-slate-500 { color: var(--au-text-2) !important; }
[data-theme="aurora"] .text-slate-600 { color: var(--au-text-3) !important; }

/* ── SCROLLBARS ── */
[data-theme="aurora"] .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.10) !important;
}
[data-theme="aurora"] .custom-scrollbar::-webkit-scrollbar-track { background: transparent !important; }

/* ── SHADOWS — flatter, glass-appropriate ── */
[data-theme="aurora"] .shadow-2xl { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 32px rgba(2, 6, 20, 0.4) !important; }
[data-theme="aurora"] .shadow-xl { box-shadow: 0 8px 22px rgba(2, 6, 20, 0.35) !important; }

/* ── LOW-PERF DEVICES — drop every blur; solid panels, same look ── */
html[data-perf="low"][data-theme="aurora"] aside,
html[data-perf="low"][data-theme="aurora"] header {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
html[data-perf="low"][data-theme="aurora"] aside { background: #0d1322 !important; }
html[data-perf="low"][data-theme="aurora"] header { background: #0a0e1a !important; }
