/* ════════════════════════════════════════════════════════════════
   CLUBGG SOCIAL — Modern SaaS (v6)
   Slate-black surfaces · Near-white text · Restrained gold accent
   Stripe/Linear-grade polish · Casino DNA, professional execution
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ─── Surfaces (cool slate-blacks) ─── */
    --bg-deep:        #08080a;
    --bg-page:        #0c0c10;
    --bg-section:     #131318;
    --bg-card:        #15151b;
    --bg-elevated:    #1a1a22;
    --bg-input:       #0f0f14;
    --bg-hover:       #1f1f28;

    /* ─── Borders (white-alpha for modern look) ─── */
    --border:         rgba(255, 255, 255, 0.07);
    --border-strong:  rgba(255, 255, 255, 0.13);
    --border-focus:   rgba(245, 200, 66, 0.50);

    /* ─── Brand gold (used sparingly) ─── */
    --gold:           #F5C842;
    --gold-bright:    #FCD34D;
    --gold-pale:      #FEF3C7;
    --gold-dark:      #D4A017;
    --gold-deep:      #92710D;
    --gold-soft:      rgba(245, 200, 66, 0.10);
    --gold-line:      rgba(245, 200, 66, 0.20);
    --gold-glow:      rgba(245, 200, 66, 0.30);

    /* ─── Emerald (brand secondary + success) ─── */
    --emerald:        #10B981;
    --emerald-bright: #34D399;
    --emerald-deep:   #047857;
    --emerald-soft:   rgba(16, 185, 129, 0.12);
    --emerald-line:   rgba(52, 211, 153, 0.25);

    /* ─── Status ─── */
    --info:           #3B82F6;
    --info-soft:      rgba(59, 130, 246, 0.12);
    --warn:           #F5C842;
    --warn-soft:      rgba(245, 200, 66, 0.10);
    --err:            #EF4444;
    --err-soft:       rgba(239, 68, 68, 0.10);

    /* ─── Text (near-white for visibility) ─── */
    --text-primary:   #FAFAF9;
    --text-bright:    #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted:     #71717A;
    --text-fade:      #52525B;

    /* ─── Type ─── */
    --font-body:      'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:      'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: -0.005em;
    text-rendering: optimizeLegibility;
}

/* ═══════════════════════════════════════════════════════
   ATMOSPHERIC BACKGROUND — Animated mesh + grain + vignette
   ═══════════════════════════════════════════════════════ */
body {
    background: var(--bg-deep);
    position: relative;
}

/* Animated radial-gradient mesh — purple/red/gold tints with slow hue drift */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(157, 92, 255, 0.10), transparent 60%),
        radial-gradient(ellipse 70% 50% at 90% 20%, rgba(255, 49, 85, 0.08),  transparent 65%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(245, 200, 66, 0.09), transparent 60%),
        linear-gradient(180deg, #060608 0%, #0a0b10 40%, #08080c 100%);
    animation: meshShift 18s ease-in-out infinite alternate;
}
@keyframes meshShift {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(8deg); }
}

/* SVG noise grain — subtle organic texture */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.045;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}

/* Vignette — darken edges for that cinema feel */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}

/* Cursor glow — desktop only, follows mouse */
@media (hover: hover) and (pointer: fine) {
    .cursor-glow {
        position: fixed;
        width: 380px; height: 380px;
        border-radius: 50%;
        pointer-events: none;
        z-index: 3;
        background: radial-gradient(circle, rgba(245, 200, 66, 0.08), transparent 60%);
        left: 0; top: 0;
        transform: translate(-50%, -50%);
        transition: opacity .3s;
        mix-blend-mode: screen;
    }
}
@media (hover: none) {
    .cursor-glow { display: none; }
}

/* Falling chips + confetti — animated below */

a {
    color: var(--gold);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover { color: var(--gold-bright); }

/* ═══════════════════════════════════════════════════════
   TYPOGRAPHY — Clean Inter hierarchy
   ═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    color: var(--text-bright);
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
    font-weight: 700;
}
h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.75rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   NAVBAR — Clean dark with subtle border
   ═══════════════════════════════════════════════════════ */
.navbar {
    background: rgba(8, 8, 10, 0.85) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border) !important;
    padding: 1rem 2rem !important;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-family: var(--font-body) !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.04em !important;
    color: var(--text-bright) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0;
    text-transform: uppercase;
}
.navbar-brand .gg-mark {
    color: var(--emerald-bright);
    font-weight: 900;
    margin: 0 0.05em;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}
.navbar a {
    color: var(--text-secondary) !important;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    position: relative;
    transition: color .15s ease, background .15s ease;
    text-decoration: none !important;
    white-space: nowrap;
}
.navbar a:hover {
    color: var(--text-bright) !important;
    background: rgba(255, 255, 255, 0.04);
}
.navbar a::after { display: none; }

.navbar .text-secondary {
    color: var(--text-muted) !important;
    font-style: normal;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
    margin: 0 0.5rem;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    width: 38px; height: 38px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all .15s ease;
}
.nav-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-bright);
}
.nav-toggle span {
    display: block;
    width: 16px; height: 1.5px;
    background: currentColor;
    position: relative;
    transition: all .2s ease;
}
.nav-toggle span::before, .nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%; height: 1.5px;
    background: currentColor;
    transition: all .2s ease;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after  { top: 5px; }

.btn-outline-light {
    border: 1px solid var(--border-strong) !important;
    color: var(--text-primary) !important;
    background: transparent !important;
    font-size: 0.78rem !important;
    letter-spacing: 0 !important;
    text-transform: none;
    font-weight: 500;
    padding: 0.45rem 1rem !important;
    border-radius: 6px !important;
    transition: all .15s ease;
}
.btn-outline-light:hover {
    border-color: var(--text-secondary) !important;
    background: var(--bg-hover) !important;
    color: var(--text-bright) !important;
}

.container {
    position: relative;
    z-index: 5;
    max-width: 1280px;
}

/* ═══════════════════════════════════════════════════════
   CARDS — Clean solid surface, subtle border
   ═══════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    animation: cardRise .4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.row > [class*="col-"]:nth-child(1) .card { animation-delay: .03s; }
.row > [class*="col-"]:nth-child(2) .card { animation-delay: .06s; }
.row > [class*="col-"]:nth-child(3) .card { animation-delay: .09s; }
.row > [class*="col-"]:nth-child(4) .card { animation-delay: .12s; }
.row > [class*="col-"]:nth-child(5) .card { animation-delay: .15s; }
.row > [class*="col-"]:nth-child(6) .card { animation-delay: .18s; }

@keyframes cardRise {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 8px 30px rgba(0, 0, 0, 0.4);
}

.card.p-3 { padding: 1.5rem !important; }
.card.p-4 { padding: 2rem !important; }

/* ═══════════════════════════════════════════════════════
   KPI tiles — Clean numbers, no decorative excess
   ═══════════════════════════════════════════════════════ */
.kpi-card { position: relative; }
.kpi-card .suit {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1rem;
    color: var(--text-fade);
    line-height: 1;
    transition: color .2s ease;
}
.kpi-card:hover .suit {
    color: var(--text-muted);
}

.kpi-label {
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em !important;
    font-weight: 600;
    font-family: var(--font-body);
}
.card .kpi-label::after { display: none; }

.kpi {
    font-family: var(--font-body) !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin-top: 0.5rem;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: var(--text-bright) !important;
}
.kpi.text-info     { color: var(--gold) !important; }
.kpi.text-success  { color: var(--emerald-bright) !important; }
.kpi.text-danger   { color: var(--err) !important; }

/* ═══════════════════════════════════════════════════════
   PAGE HEADER + SECTION TITLES
   ═══════════════════════════════════════════════════════ */
.page-header {
    margin-bottom: 2rem;
    animation: fadeIn .4s ease;
}
.page-header h2 {
    margin-bottom: 0.3rem;
    color: var(--text-bright);
    background: none;
    -webkit-text-fill-color: var(--text-bright);
    text-shadow: none;
}
.page-header .meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin: 0;
}
.page-header .meta::before {
    content: '';
    margin: 0;
}

@keyframes fadeIn {
    0%   { opacity: 0; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
    text-shadow: none;
}
.section-title::before, .section-title::after { display: none; }

/* ═══════════════════════════════════════════════════════
   TABLES — Clean, modern
   ═══════════════════════════════════════════════════════ */
.table {
    color: var(--text-primary) !important;
    font-size: 0.88rem;
    border-color: var(--border) !important;
    margin-bottom: 0;
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    background-color: transparent !important;
}
.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: inherit !important;
    border-color: var(--border) !important;
}
.table thead th {
    color: var(--text-muted) !important;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border) !important;
    padding: 0.85rem 1rem !important;
    background: transparent !important;
    font-family: var(--font-body);
}
.table tbody td {
    border-color: var(--border) !important;
    padding: 0.95rem 1rem !important;
    vertical-align: middle;
    transition: background .15s ease;
}
.table tbody tr:hover > * {
    background: rgba(255, 255, 255, 0.025) !important;
    color: var(--text-bright) !important;
}
.table tbody td a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color .15s ease;
    border: none !important;
}
.table tbody td a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   FORMS — Modern, clear focus states
   ═══════════════════════════════════════════════════════ */
.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: var(--text-primary) !important;
    padding: 0.7rem 0.95rem !important;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px var(--gold-soft) !important;
    background: var(--bg-input) !important;
    color: var(--text-bright) !important;
    outline: none;
}
.form-control::placeholder { color: var(--text-fade); }

.form-label {
    color: var(--text-primary) !important;
    font-size: 0.82rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-family: var(--font-body);
    text-shadow: none;
}
.form-text {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: normal;
    margin-top: 0.4rem;
}
textarea.form-control {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
}

.form-control[type="file"] {
    cursor: pointer;
    padding: 0.35rem !important;
}
.form-control[type="file"]::file-selector-button {
    background: var(--gold) !important;
    color: #0a0a0c !important;
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 0.85rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: background .15s ease;
}
.form-control[type="file"]::file-selector-button:hover {
    background: var(--gold-bright) !important;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS — Modern, no shimmer, clear hover states
   ═══════════════════════════════════════════════════════ */
.btn {
    border-radius: 6px !important;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.82rem;
    padding: 0.6rem 1.1rem;
    transition: all .15s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    font-family: var(--font-body);
}

.btn::before { display: none; }

/* Primary — solid gold, dark text */
.btn-primary {
    background: var(--gold) !important;
    border: 1px solid var(--gold) !important;
    color: #0a0a0c !important;
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
    animation: none;
}
.btn-primary:hover {
    background: var(--gold-bright) !important;
    border-color: var(--gold-bright) !important;
    color: #0a0a0c !important;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 12px rgba(245, 200, 66, 0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-primary {
    background: transparent !important;
    border-color: var(--border-strong) !important;
    color: var(--text-primary) !important;
    font-weight: 500;
}
.btn-outline-primary:hover {
    background: var(--bg-hover) !important;
    border-color: var(--gold-line) !important;
    color: var(--gold) !important;
    transform: translateY(-1px);
}
.btn-outline-secondary {
    background: transparent !important;
    border-color: var(--border-strong) !important;
    color: var(--text-secondary) !important;
}
.btn-outline-secondary:hover {
    background: var(--bg-hover) !important;
    border-color: var(--text-muted) !important;
    color: var(--text-bright) !important;
    transform: translateY(-1px);
}
.btn-outline-secondary.active {
    background: var(--gold-soft) !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
}
.btn-outline-danger {
    background: transparent !important;
    border-color: rgba(239, 68, 68, 0.30) !important;
    color: var(--err) !important;
}
.btn-outline-danger:hover {
    background: var(--err-soft) !important;
    border-color: var(--err) !important;
    transform: translateY(-1px);
}
.btn-warning {
    background: var(--gold) !important;
    border: 1px solid var(--gold) !important;
    color: #0a0a0c !important;
    font-weight: 600;
}
.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.74rem;
}

/* ═══════════════════════════════════════════════════════
   BADGES — Pill-shaped, clean
   ═══════════════════════════════════════════════════════ */
.badge {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3em 0.7em;
    border-radius: 4px;
    font-size: 0.68rem;
    border: 1px solid transparent;
    font-family: var(--font-body);
}
.bg-success {
    background: var(--emerald-soft) !important;
    color: var(--emerald-bright) !important;
    border-color: var(--emerald-line) !important;
}
.bg-danger {
    background: var(--err-soft) !important;
    color: var(--err) !important;
    border-color: rgba(239, 68, 68, 0.30) !important;
}
.bg-warning {
    background: var(--warn-soft) !important;
    color: var(--gold) !important;
    border-color: var(--gold-line) !important;
}
.bg-info {
    background: var(--info-soft) !important;
    color: var(--info) !important;
    border-color: rgba(59, 130, 246, 0.30) !important;
}
.bg-secondary, .bg-light, .bg-dark {
    background: var(--bg-elevated) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

/* Platform pills */
.platform-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid;
    font-family: var(--font-body);
}
.platform-pill.telegram {
    background: rgba(38, 158, 217, 0.10);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.30);
}
.platform-pill.facebook {
    background: rgba(59, 130, 246, 0.10);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.30);
}
.platform-pill.instagram {
    background: linear-gradient(135deg, rgba(220, 39, 67, 0.10), rgba(188, 24, 136, 0.12));
    color: #f472b6;
    border-color: rgba(244, 114, 182, 0.30);
}

/* Alerts */
.alert {
    border-radius: 8px !important;
    border-width: 1px !important;
    font-size: 0.88rem;
    padding: 0.85rem 1.1rem;
    position: relative;
}
.alert::before { display: none; }
.alert-success {
    background: var(--emerald-soft) !important;
    color: var(--emerald-bright) !important;
    border-color: var(--emerald-line) !important;
}
.alert-danger {
    background: var(--err-soft) !important;
    color: var(--err) !important;
    border-color: rgba(239, 68, 68, 0.30) !important;
}

.code-pre {
    background: var(--bg-input) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-family: var(--font-mono) !important;
    font-size: 0.78rem;
    padding: 0.85rem 1rem !important;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════
   LOGIN — Clean modern card with subtle brand presence
   ═══════════════════════════════════════════════════════ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}
.login-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle 600px at 30% 30%, rgba(245, 200, 66, 0.06) 0%, transparent 50%),
        radial-gradient(circle 600px at 70% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    width: 420px;
    max-width: 100%;
    padding: 2.5rem 2.5rem !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    position: relative;
    z-index: 5;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 24px 60px rgba(0, 0, 0, 0.5);
    animation: vaultOpen .5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vaultOpen {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.login-card::before, .login-card::after { display: none; }

.login-brand {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.04em;
    color: var(--text-bright);
    margin-bottom: 0.4rem;
    text-shadow: none;
    text-transform: uppercase;
}
.login-brand .gg-mark {
    color: var(--emerald-bright);
    font-weight: 900;
    text-shadow: none;
}
.login-tagline {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 2rem;
    font-weight: 400;
    padding: 0;
}
.login-tagline::before, .login-tagline::after { display: none; }

/* ═══════════════════════════════════════════════════════
   MISC
   ═══════════════════════════════════════════════════════ */
.text-muted, .text-secondary { color: var(--text-muted) !important; }
hr { border-color: var(--border) !important; opacity: 1 !important; }
small, .small { color: var(--text-muted); }
strong { color: var(--text-bright); font-weight: 600; }

.form-check-input {
    background: var(--bg-input) !important;
    border-color: var(--border-strong) !important;
    border-radius: 4px !important;
    width: 1.1em;
    height: 1.1em;
}
.form-check-input:checked {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
}
.form-check-label { color: var(--text-secondary); font-size: 0.88rem; }

details summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color .15s ease;
}
details summary:hover { color: var(--text-primary); }

.card img {
    border-radius: 6px;
    transition: opacity .2s ease;
}

.media-preview {
    margin-top: 0.8rem;
    padding: 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.95rem;
}
.media-preview img {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.media-preview .info {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.media-preview .info code {
    color: var(--gold);
    background: var(--bg-deep);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.76rem;
    word-break: break-all;
}

.empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: normal;
}
.empty-state::before { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border: 2px solid var(--bg-deep);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-fade);
}

::selection {
    background: var(--gold);
    color: var(--bg-deep);
}

/* ════════════════════════════════════════════════════════════════
   STUDIO PAGE
   ════════════════════════════════════════════════════════════════ */

.studio-section { margin-bottom: 2rem; }

.studio-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.8rem 1rem !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    margin-bottom: 0.95rem;
}
.studio-toolbar > .label {
    color: var(--text-secondary) !important;
    font-size: 0.72rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-right: 0.5rem;
    text-shadow: none !important;
}

.preset-btn {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    font-size: 0.78rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    padding: 0.45rem 0.85rem !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all .15s ease !important;
    font-family: var(--font-body);
    box-shadow: none !important;
}
.preset-btn:hover {
    background: var(--bg-hover) !important;
    border-color: var(--gold-line) !important;
    color: var(--gold) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border-strong) !important;
    border-radius: 10px !important;
    padding: 2.5rem 2rem !important;
    background: var(--bg-card) !important;
    backdrop-filter: none;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease !important;
    box-shadow: none !important;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--gold) !important;
    background: var(--bg-elevated) !important;
    transform: none;
    box-shadow: 0 0 0 4px var(--gold-soft) !important;
}
.drop-zone .icon {
    font-size: 2.2rem !important;
    color: var(--gold) !important;
    margin-bottom: 0.5rem;
    text-shadow: none !important;
    animation: none !important;
}
.drop-zone .primary {
    font-family: var(--font-body) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--text-bright) !important;
    letter-spacing: 0 !important;
}
.drop-zone .secondary {
    color: var(--text-muted) !important;
    font-size: 0.85rem !important;
    margin-top: 0.4rem !important;
}
.drop-zone input[type="file"] { display: none; }

/* Default targets bar */
.default-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    padding: 0.9rem 1rem !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}
.default-targets .label {
    color: var(--text-secondary) !important;
    font-size: 0.72rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em !important;
    font-weight: 600 !important;
    margin-right: 0.5rem;
    text-shadow: none !important;
}
.default-targets label { cursor: pointer; user-select: none; }
.default-targets input[type="checkbox"] { display: none; }
.default-targets .pill {
    padding: 0.35rem 0.8rem;
    font-size: 0.74rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all .15s ease;
    display: inline-block;
}
.default-targets input[type="checkbox"]:checked + .pill {
    background: var(--gold-soft) !important;
    color: var(--gold) !important;
    border-color: var(--gold) !important;
    box-shadow: none !important;
}

/* Staged cards */
.staged-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.95rem;
}
.staged-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: 0;
    overflow: hidden;
    transition: all .2s ease !important;
    position: relative;
    backdrop-filter: none;
    box-shadow: 0 1px 0 rgba(255,255,255,.03) inset !important;
}
.staged-card:hover {
    border-color: var(--border-strong) !important;
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255,255,255,.04) inset,
        0 6px 20px rgba(0, 0, 0, 0.35) !important;
}
.staged-card.selected {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 1px var(--gold), 0 0 0 4px var(--gold-soft) !important;
}
.staged-card .thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-deep);
    display: block;
    border-bottom: 1px solid var(--border);
}
.staged-card .body {
    padding: 0.85rem 1rem 1rem;
}
.staged-card textarea {
    width: 100%;
    min-height: 70px;
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    border-radius: 5px !important;
    color: var(--text-primary) !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.85rem !important;
    font-family: var(--font-body);
    resize: vertical;
    line-height: 1.5;
}
.staged-card textarea:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 2px var(--gold-soft) !important;
    outline: none;
}
.staged-card input[type="datetime-local"] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-family: var(--font-body);
    margin-top: 0.6rem;
}
.staged-card input[type="datetime-local"]:focus {
    border-color: var(--border-focus);
    outline: none;
    box-shadow: 0 0 0 2px var(--gold-soft);
}
.staged-card .targets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.6rem;
}
.staged-card .targets label { cursor: pointer; user-select: none; }
.staged-card .targets input[type="checkbox"] { display: none; }
.staged-card .targets .pill {
    display: inline-block;
    padding: 0.22rem 0.6rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all .15s ease;
}
.staged-card .targets input[type="checkbox"]:checked + .pill {
    background: var(--gold-soft) !important;
    color: var(--gold) !important;
    border-color: var(--gold) !important;
    box-shadow: none !important;
}
.staged-card .controls {
    position: absolute;
    top: 8px; right: 8px;
    display: flex;
    gap: 0.35rem;
    z-index: 5;
}
.staged-card .icon-btn {
    width: 28px; height: 28px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all .15s ease;
}
.staged-card .icon-btn:hover { color: var(--gold); border-color: var(--gold); }
.staged-card .icon-btn.del:hover { color: var(--err); border-color: var(--err); }

.staged-card .select-corner {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 5;
}
.staged-card .select-corner input {
    width: 18px; height: 18px;
    cursor: pointer;
    accent-color: var(--gold);
}

.staged-card .meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

/* Timeline */
.timeline-day {
    margin-bottom: 0.95rem;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: none !important;
    transition: all .2s ease;
}
.timeline-day:hover {
    border-color: var(--border-strong) !important;
}
.timeline-day-header {
    padding: 0.9rem 1.2rem !important;
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.timeline-day-name {
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    color: var(--text-bright) !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
}
.timeline-day-name.today {
    color: var(--emerald-bright) !important;
    text-shadow: none !important;
    animation: none !important;
}
.timeline-day-name.today::before {
    content: '•';
    color: var(--emerald-bright);
    margin-right: 0.45rem;
    font-size: 1.2rem;
    line-height: 0;
    vertical-align: middle;
}
.timeline-day-name .date-sub {
    font-family: var(--font-body) !important;
    font-size: 0.8rem;
    color: var(--text-muted) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    margin-left: 0.55rem;
    font-weight: 400;
}
.timeline-day-count {
    font-size: 0.78rem !important;
    color: var(--text-muted) !important;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500 !important;
}
.timeline-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    padding: 0.95rem 1.2rem;
}
.timeline-slot {
    flex: 1 1 220px;
    min-width: 220px;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 0.7rem 0.9rem !important;
    transition: all .15s ease !important;
    position: relative;
}
.timeline-slot:hover {
    border-color: var(--gold-line) !important;
    background: var(--bg-hover) !important;
    transform: none !important;
    box-shadow: none !important;
}
.timeline-slot .time {
    color: var(--gold) !important;
    font-family: var(--font-mono) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}
.timeline-slot .preview {
    color: var(--text-primary) !important;
    font-size: 0.82rem;
    margin-top: 0.3rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.timeline-slot .platforms {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.timeline-slot .mini-pill {
    font-size: 0.6rem;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}
.timeline-slot .cancel-btn {
    position: absolute;
    top: 4px; right: 4px;
    width: 22px; height: 22px;
    background: transparent;
    border: none;
    color: var(--text-fade);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0;
    transition: all .15s ease;
    border-radius: 4px;
}
.timeline-slot:hover .cancel-btn { opacity: 1; }
.timeline-slot .cancel-btn:hover { color: var(--err); background: var(--err-soft); }
.timeline-day-empty {
    padding: 1.5rem 1.2rem !important;
    color: var(--text-fade) !important;
    font-style: normal !important;
    font-family: var(--font-body) !important;
    font-size: 0.88rem !important;
}

/* Pool grid */
.pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.85rem;
}
.pool-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s ease !important;
    position: relative;
    box-shadow: none !important;
}
.pool-card:hover {
    border-color: var(--gold-line) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}
.pool-card .thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
}
.pool-card .body { padding: 0.6rem 0.75rem 0.75rem; }
.pool-card .name {
    font-size: 0.82rem !important;
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pool-card .cat {
    font-size: 0.66rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted) !important;
    font-weight: 600;
}
.pool-card .add-btn {
    position: absolute;
    top: 6px; right: 6px;
    width: 26px; height: 26px;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-strong) !important;
    border-radius: 5px;
    color: var(--text-primary) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    transition: all .15s ease;
    z-index: 5;
    box-shadow: none !important;
}
.pool-card .add-btn:hover {
    background: var(--gold) !important;
    color: #0a0a0c !important;
    border-color: var(--gold) !important;
    box-shadow: none !important;
}

/* Schedule footer */
.schedule-footer {
    position: sticky;
    bottom: 0;
    background: rgba(8, 8, 10, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    border-top: 1px solid var(--border) !important;
    padding: 1rem 1.3rem !important;
    margin: 2rem -1rem -2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 30;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.4) !important;
}
.schedule-footer::before { display: none; }
.schedule-footer .summary {
    color: var(--text-secondary) !important;
    font-size: 0.85rem;
}
.schedule-footer .summary .count {
    color: var(--text-bright) !important;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 1.05rem;
    text-shadow: none !important;
}
.schedule-footer .actions {
    display: flex;
    gap: 0.55rem;
}

/* Toast */
.studio-toast {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: var(--bg-card) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong) !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    padding: 0.85rem 1.15rem;
    font-size: 0.88rem;
    z-index: 100;
    animation: toastIn .3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5) !important;
    max-width: 360px;
}
.studio-toast.error {
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: var(--err) !important;
}
@keyframes toastIn {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.upload-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    background: var(--gold);
    width: 0;
    transition: width .3s ease;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .navbar { padding: 0.85rem 1.3rem !important; }
    .nav-links { gap: 0.15rem; }
    .navbar a { font-size: 0.78rem; padding: 0.45rem 0.7rem !important; }
    .navbar .text-secondary { display: none; }
    .container { padding: 0 1.3rem; }
    .kpi { font-size: 2.1rem !important; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .navbar { padding: 0.8rem 1rem !important; flex-wrap: nowrap !important; }
    .navbar-brand { font-size: 0.95rem !important; }
    .nav-toggle { display: inline-flex !important; }
    .nav-links {
        position: fixed;
        top: 60px; left: 0; right: 0;
        background: rgba(8, 8, 10, 0.97);
        backdrop-filter: blur(24px) saturate(180%);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height .3s ease, opacity .25s ease, padding .25s ease;
        pointer-events: none;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }
    .nav-links.open { max-height: 600px; opacity: 1; pointer-events: auto; }
    .navbar a {
        padding: 0.85rem 0.75rem !important;
        border-radius: 6px;
        font-size: 0.88rem;
    }
    .navbar a::after { display: none; }
    .navbar .text-secondary { display: none; }
    .btn-outline-light { margin-top: 0.4rem; width: 100%; text-align: center; }

    .container { padding: 0 1rem; max-width: 100%; }
    .container.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }

    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }

    .page-header { margin-bottom: 1.5rem; }
    .page-header .meta { font-size: 0.8rem; }

    .card.p-3 { padding: 1.1rem !important; }
    .card.p-4 { padding: 1.3rem !important; }

    .row { --bs-gutter-x: 0.7rem; --bs-gutter-y: 0.7rem; }

    .kpi-card .suit { font-size: 0.95rem; top: 0.8rem; right: 1rem; }
    .kpi-label { font-size: 0.7rem !important; }
    .kpi { font-size: 1.8rem !important; margin-top: 0.3rem; }

    .section-title { font-size: 0.72rem; }

    .table { font-size: 0.8rem; }
    .table thead th { padding: 0.65rem 0.5rem !important; font-size: 0.68rem; }
    .table tbody td { padding: 0.7rem 0.5rem !important; }

    .form-control, .form-select { font-size: 16px; padding: 0.7rem 0.85rem !important; }
    .form-label { font-size: 0.8rem; }

    .btn { padding: 0.65rem 1rem; font-size: 0.78rem; }
    .btn-sm { padding: 0.4rem 0.8rem; font-size: 0.72rem; }

    .alert { padding: 0.8rem 1rem; font-size: 0.85rem; }

    .login-card { padding: 2rem 1.5rem !important; }
    .login-brand { font-size: 1.3rem; }

    .media-preview { flex-direction: column; align-items: stretch; }
    .media-preview img { width: 100%; height: 160px; }

    .drop-zone { padding: 1.8rem 1rem !important; }
    .drop-zone .primary { font-size: 1rem !important; }
    .drop-zone .icon { font-size: 1.8rem !important; }
}

@media (max-width: 480px) {
    .container { padding: 0 0.85rem; }
    .card.p-3 { padding: 0.95rem !important; }
    .kpi { font-size: 1.55rem !important; }
}

/* ════════════════════════════════════════════════════════════════
   LIGHT THEME — Overrides via [data-theme="light"]
   ════════════════════════════════════════════════════════════════ */

html { transition: background .25s ease; }
body { transition: background .25s ease, color .25s ease; }
.card, .navbar, .timeline-day, .staged-card, .pool-card,
.studio-toolbar, .default-targets, .drop-zone, .schedule-footer,
.form-control, .form-select, .preset-btn, .timeline-slot,
.btn, .badge, .alert {
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}

[data-theme="light"] {
    /* Surfaces */
    --bg-deep:        #ffffff;
    --bg-page:        #fafafa;
    --bg-section:     #f4f4f5;
    --bg-card:        #ffffff;
    --bg-elevated:    #f8f9fa;
    --bg-input:       #ffffff;
    --bg-hover:       #f1f3f5;

    /* Borders — neutral black-alpha */
    --border:         rgba(0, 0, 0, 0.08);
    --border-strong:  rgba(0, 0, 0, 0.15);
    --border-focus:   rgba(184, 134, 11, 0.50);

    /* Gold — darker shades for legibility on white */
    --gold:           #B8860B;
    --gold-bright:    #D4A017;
    --gold-pale:      #92710D;
    --gold-dark:      #6B4F08;
    --gold-deep:      #4A3804;
    --gold-soft:      rgba(184, 134, 11, 0.08);
    --gold-line:      rgba(184, 134, 11, 0.25);
    --gold-glow:      rgba(184, 134, 11, 0.25);

    /* Emerald — darker for white-bg readability */
    --emerald:        #047857;
    --emerald-bright: #059669;
    --emerald-deep:   #064E3B;
    --emerald-soft:   rgba(16, 185, 129, 0.10);
    --emerald-line:   rgba(5, 150, 105, 0.30);

    /* Status */
    --info:           #1D4ED8;
    --info-soft:      rgba(29, 78, 216, 0.08);
    --warn:           #B8860B;
    --warn-soft:      rgba(184, 134, 11, 0.08);
    --err:            #DC2626;
    --err-soft:       rgba(220, 38, 38, 0.08);

    /* Text — dark slate for visibility */
    --text-primary:   #18181B;
    --text-bright:    #09090B;
    --text-secondary: #52525B;
    --text-muted:     #71717A;
    --text-fade:      #A1A1AA;
}

/* Light-theme-specific overrides for hardcoded dark colors */
[data-theme="light"] body {
    background:
        radial-gradient(ellipse 900px 600px at 10% 0%, rgba(184, 134, 11, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 900px 600px at 90% 100%, rgba(5, 150, 105, 0.04) 0%, transparent 50%),
        #fafafa;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid var(--border) !important;
}

[data-theme="light"] .card {
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.02) inset,
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 4px 12px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .card:hover {
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.03) inset,
        0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.97) !important;
}

[data-theme="light"] .nav-toggle:hover { background: var(--bg-hover); }

[data-theme="light"] .btn-primary {
    color: #ffffff !important;
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .btn-primary:hover {
    background: var(--gold-bright) !important;
    border-color: var(--gold-bright) !important;
    color: #ffffff !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        0 4px 12px rgba(184, 134, 11, 0.30);
}
[data-theme="light"] .btn-warning {
    color: #ffffff !important;
    background: var(--gold) !important;
    border-color: var(--gold) !important;
}

[data-theme="light"] .form-control[type="file"]::file-selector-button {
    color: #ffffff !important;
}

[data-theme="light"] .pool-card .add-btn,
[data-theme="light"] .staged-card .icon-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(6px);
}
[data-theme="light"] .pool-card .add-btn:hover {
    background: var(--gold) !important;
    color: #ffffff !important;
}

[data-theme="light"] .schedule-footer {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .studio-toast {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10) !important;
}

[data-theme="light"] .login-wrap::before {
    background:
        radial-gradient(circle 600px at 30% 30%, rgba(184, 134, 11, 0.10) 0%, transparent 50%),
        radial-gradient(circle 600px at 70% 70%, rgba(5, 150, 105, 0.08) 0%, transparent 50%);
}

[data-theme="light"] ::-webkit-scrollbar-track { background: #f4f4f5; }
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-color: #f4f4f5;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #a1a1aa; }

[data-theme="light"] ::selection {
    background: var(--gold);
    color: #ffffff;
}

/* GG mark stays emerald in both themes */
[data-theme="light"] .navbar-brand .gg-mark,
[data-theme="light"] .login-brand .gg-mark {
    color: var(--emerald);
}

/* ───── Theme toggle button ───── */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    width: 38px; height: 38px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all .15s ease;
    margin-right: 0.4rem;
}
.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--gold);
    border-color: var(--gold-line);
}
.theme-toggle svg {
    width: 16px; height: 16px;
}

/* Show only the icon for the current state */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) {
    .theme-toggle { margin: 0 0.3rem 0 0; }
}

/* ════════════════════════════════════════════════════════════════
   ATMOSPHERIC BACKGROUND — light theme overrides
   ════════════════════════════════════════════════════════════════ */
[data-theme="light"] .bg-mesh {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(157, 92, 255, 0.06), transparent 60%),
        radial-gradient(ellipse 70% 50% at 90% 20%, rgba(255, 49, 85, 0.05), transparent 65%),
        radial-gradient(ellipse 90% 70% at 50% 100%, rgba(245, 200, 66, 0.07), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #fafafa 40%, #f4f4f5 100%);
}

[data-theme="light"] .grain {
    opacity: 0.025;
    mix-blend-mode: multiply;
}

[data-theme="light"] .vignette {
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.08) 100%);
}

[data-theme="light"] .cursor-glow {
    background: radial-gradient(circle, rgba(184, 134, 11, 0.07), transparent 60%);
    mix-blend-mode: multiply;
}

/* ════════════════════════════════════════════════════════════════
   FALLING CHIPS + CONFETTI — atmospheric particle shower
   Sits between bg-mesh (z:-1) and grain (z:1)
   ════════════════════════════════════════════════════════════════ */
.bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Poker chip — radial pattern with dashed border */
.chip {
    position: absolute;
    top: -60px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 0, transparent 25%, currentColor 26%, currentColor 30%, transparent 31%, transparent 38%, currentColor 39%, currentColor 42%, transparent 43%);
    border: 3px dashed currentColor;
    animation: chipFall linear infinite;
    opacity: 0;
    box-shadow: 0 0 14px currentColor;
    will-change: transform, opacity;
}
.chip::before {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}
.chip.gold      { color: rgba(245, 200, 66, 0.50); }
.chip.gold-deep { color: rgba(184, 134, 11, 0.45); }
.chip.emerald   { color: rgba(52, 211, 153, 0.45); }
.chip.purple    { color: rgba(157, 92, 255, 0.35); }
.chip.red       { color: rgba(255, 49, 85, 0.32); }

/* Paper confetti — rectangular flutter */
.confetti {
    position: absolute;
    top: -30px;
    width: 7px;
    height: 14px;
    animation: confettiFall linear infinite;
    opacity: 0;
    will-change: transform, opacity;
}
.confetti.t1 { background: linear-gradient(180deg, #FCD34D, #B8860B); box-shadow: 0 0 6px rgba(245, 200, 66, 0.55); }
.confetti.t2 { background: linear-gradient(180deg, #34D399, #047857); box-shadow: 0 0 6px rgba(52, 211, 153, 0.50); }
.confetti.t3 { background: linear-gradient(180deg, #FFE9A8, #F5C842); box-shadow: 0 0 6px rgba(255, 233, 168, 0.55); }
.confetti.t4 { background: linear-gradient(180deg, #FFFFFF, #F5E6B3); box-shadow: 0 0 5px rgba(255, 255, 255, 0.45); }
.confetti.t5 { background: linear-gradient(180deg, #C084FC, #5B22B8); box-shadow: 0 0 6px rgba(157, 92, 255, 0.42); }

@keyframes chipFall {
    0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
    8%   { opacity: 0.75; }
    92%  { opacity: 0.75; }
    100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

@keyframes confettiFall {
    0%   { transform: translateY(0) rotateZ(0deg) rotateY(0deg);     opacity: 0; }
    8%   { opacity: 0.90; }
    92%  { opacity: 0.90; }
    100% { transform: translateY(105vh) rotateZ(720deg) rotateY(540deg); opacity: 0; }
}

/* Light theme — softer hues so chips don't glare on white */
[data-theme="light"] .chip.gold      { color: rgba(184, 134, 11, 0.40); }
[data-theme="light"] .chip.gold-deep { color: rgba(107, 79, 8, 0.35); }
[data-theme="light"] .chip.emerald   { color: rgba(4, 120, 87, 0.35); }
[data-theme="light"] .chip.purple    { color: rgba(91, 34, 184, 0.28); }
[data-theme="light"] .chip.red       { color: rgba(196, 21, 57, 0.28); }
[data-theme="light"] .confetti       { mix-blend-mode: multiply; }
[data-theme="light"] .confetti.t4    { background: linear-gradient(180deg, #71717A, #18181B); box-shadow: 0 0 4px rgba(0, 0, 0, 0.15); }

/* Trim particle count on small screens for performance */
@media (max-width: 768px) {
    .chip:nth-child(n+6)      { display: none; }
    .confetti:nth-child(n+13) { display: none; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .chip, .confetti { display: none; }
}
