/* ── Theme Variables ───────────────────────────── */

/* Dark (default — slash.com fintech dashboard) */
:root, [data-theme="dark"] {
    --bg-primary: #0e0f12;
    --bg-page: #0a0b0d;
    --bg-secondary: #141518;
    --bg-card: #141518;
    --bg-card-hover: #1a1b1f;
    --bg-input: #1a1b1f;
    --bg-sidebar: #0e0f12;
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(255,255,255,0.12);
    --text-primary: #f0f0f0;
    --text-secondary: rgba(255,255,255,0.55);
    --text-muted: rgba(255,255,255,0.35);
    --text-sidebar: rgba(255,255,255,0.85);
    --text-sidebar-muted: rgba(255,255,255,0.45);
    --accent: #e8c97f;
    --accent-hover: #f0d898;
    --accent-glow: rgba(232, 201, 127, 0.06);
    --accent-dim: rgba(232, 201, 127, 0.08);
    --yellow: #e8c97f;
    --yellow-hover: #f0d898;
    --yellow-dim: rgba(232, 201, 127, 0.10);
    --yellow-glow: rgba(232, 201, 127, 0.08);
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.10);
    --red: #f87171;
    --red-dim: rgba(248, 113, 113, 0.10);
    --blue: #60a5fa;
    --blue-dim: rgba(96, 165, 250, 0.10);
    --cyan: #e8c97f;
    --cyan-dim: rgba(232, 201, 127, 0.08);
    --purple: #a78bfa;
    --purple-dim: rgba(167, 139, 250, 0.10);
    --orange: #fb923c;
    --orange-dim: rgba(251, 146, 60, 0.10);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
    --glow-accent: 0 0 20px rgba(232, 201, 127, 0.06);
    --glow-cyan: 0 0 20px rgba(232, 201, 127, 0.06);
    --glow-green: 0 0 15px rgba(74, 222, 128, 0.08);
    --glow-red: 0 0 15px rgba(248, 113, 113, 0.08);
    --glow-yellow: 0 0 15px rgba(232, 201, 127, 0.08);
    --glow-purple: 0 0 15px rgba(167, 139, 250, 0.08);
    --radius: 10px;
    --radius-sm: 8px;
    --radius-lg: 14px;
    --sidebar-width: 240px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
}


/* ── Reset ─────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-page);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ── Sidebar ──────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.jarvis-orb {
    width: 32px;
    height: 32px;
    position: relative;
    flex-shrink: 0;
}

.jarvis-orb .orb-core {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #f5e6c0, #e8c97f 50%, #c4a55a 100%);
    box-shadow: 0 0 10px 2px rgba(232, 201, 127, 0.35), 0 0 20px 4px rgba(232, 201, 127, 0.12);
    animation: orbPulse 4s ease-in-out infinite;
}

.jarvis-orb .orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: rgba(232, 201, 127, 0.45);
    border-right-color: rgba(232, 201, 127, 0.12);
    animation: orbSpin 4s linear infinite;
}

.jarvis-orb .orb-ring-2 {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-bottom-color: rgba(232, 201, 127, 0.25);
    border-left-color: rgba(232, 201, 127, 0.08);
    animation: orbSpin 2.5s linear infinite reverse;
}

@keyframes orbPulse {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(232,201,127,0.35), 0 0 20px 4px rgba(232,201,127,0.12); transform: scale(1); }
    50% { box-shadow: 0 0 14px 4px rgba(232,201,127,0.45), 0 0 28px 8px rgba(232,201,127,0.16); transform: scale(1.04); }
}

@keyframes orbSpin {
    to { transform: rotate(360deg); }
}

.brand-text {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-sidebar);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text .brand-sub {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-sidebar-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 16px;
    position: relative;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 12px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-sidebar-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s;
}

.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-sidebar); }
.nav-item.active { background: rgba(255,255,255,0.06); color: var(--text-primary); font-weight: 500; }
.nav-item.active svg { stroke: var(--text-primary); }

/* Nav sub-items (inside dropdowns) */
.nav-item.nav-sub { padding: 8px 12px 8px 20px; font-size: 13px; gap: 8px; }

/* Nav group (dropdown) */
.nav-group { margin: 0; }

.nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    color: var(--text-sidebar-muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.nav-group-toggle:hover { background: rgba(255,255,255,0.03); color: var(--text-sidebar); }

.nav-group-chevron {
    transition: transform 0.2s;
    opacity: 0.5;
}

.nav-group.open .nav-group-chevron { transform: rotate(180deg); }

.nav-group-items {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 4px;
}

.nav-group.open .nav-group-items { display: flex; }

/* ── Content ──────────────────────────────────── */

.content {
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ── Top bar with theme toggle ────────────────── */

.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
}


/* ── Header ───────────────────────────────────── */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
    letter-spacing: -0.01em;
}

/* ── Stats Grid ───────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--border-light);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.stat-value.green { color: var(--green); }
.stat-value.blue { color: var(--text-primary); }
.stat-value.yellow { color: var(--accent); }

/* ── Brand Cards ──────────────────────────────── */

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.brand-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: block;
    position: relative;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.brand-card:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.brand-card:hover::before { opacity: 1; }

.brand-card:nth-child(4n+1)::before { background: linear-gradient(90deg, var(--accent), transparent); }
.brand-card:nth-child(4n+2)::before { background: linear-gradient(90deg, var(--green), transparent); }
.brand-card:nth-child(4n+3)::before { background: linear-gradient(90deg, var(--purple), transparent); }
.brand-card:nth-child(4n+4)::before { background: linear-gradient(90deg, var(--blue), transparent); }

.brand-card:nth-child(4n+1):hover { border-color: rgba(232, 201, 127, 0.2); }
.brand-card:nth-child(4n+2):hover { border-color: rgba(74, 222, 128, 0.2); }
.brand-card:nth-child(4n+3):hover { border-color: rgba(167, 139, 250, 0.2); }
.brand-card:nth-child(4n+4):hover { border-color: rgba(96, 165, 250, 0.2); }

.brand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 14px;
}

.brand-card-header h3 {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.brand-card-header .country {
    background: rgba(255,255,255,0.06);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.brand-card-domain {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.brand-card-stats {
    display: flex;
    gap: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.brand-card-stat { display: flex; flex-direction: column; }

.brand-card-stat .num {
    font-size: 20px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.brand-card-stat .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* ── Table ─────────────────────────────────────── */

.table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.table-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.table-link:hover { color: var(--accent); }

/* ── Badges ────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-cyan { background: var(--accent-dim); color: var(--accent); }

.badge-winner {
    background: var(--green);
    color: #000;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Buttons ───────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
    font-family: var(--font);
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-yellow {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

.btn-yellow:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-pipeline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-pipeline:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.2); }

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--border-light); background: rgba(255,255,255,0.03); }

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ─────────────────────────────────────── */

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 560px;
}

/* ── Ad Detail ─────────────────────────────────── */

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.detail-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.detail-section h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.detail-section.full-width { grid-column: 1 / -1; }

.media-preview {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}

.media-preview video,
.media-preview img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.script-scene {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.script-scene .scene-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.script-scene .scene-num {
    font-weight: 600;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.03em;
}

.script-scene .scene-duration {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.script-scene .scene-visual { color: var(--text-secondary); font-size: 13px; margin-bottom: 6px; }
.script-scene .scene-vo { color: var(--text-primary); font-size: 13px; }
.script-scene .scene-vo::before { content: '\201C'; color: var(--text-muted); }
.script-scene .scene-vo::after { content: '\201D'; color: var(--text-muted); }

.key-value { margin-bottom: 14px; }
.key-value dt {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 3px;
}
.key-value dd { font-size: 13px; color: var(--text-primary); line-height: 1.6; }

/* ── Position chart ────────────────────────────── */

.position-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding: 8px 0;
}

.position-bar {
    flex: 1;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
    min-width: 8px;
    transition: height 0.3s;
    position: relative;
    opacity: 0.6;
}

.position-bar:hover {
    opacity: 1;
}

.position-bar:hover::after {
    content: attr(data-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10;
}

/* ── Tabs ──────────────────────────────────────── */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 500; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Utilities ─────────────────────────────────── */

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ── Empty state ──────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-muted);
}

.empty-state p { margin-bottom: 16px; }

/* ── Form Select ──────────────────────────────── */

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.15s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Assets Grid ─────────────────────────────── */

.assets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.asset-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border);
}

.asset-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-muted);
    font-size: 13px;
}

.asset-upload-area:hover {
    border-color: var(--accent);
    color: var(--text-secondary);
}

.asset-upload-area svg {
    display: block;
    margin: 0 auto 8px;
}

/* ── Click to Copy ────────────────────────────── */

.copyable {
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
}

.copyable:hover {
    background: var(--accent-dim);
}

.copyable::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    opacity: 0.25;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    transition: opacity 0.15s;
}

.copyable:hover::after { opacity: 0.6; }

.copyable.copied {
    background: var(--green-dim);
}

.copyable.copied::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    opacity: 1;
}

/* ── Scrape Status ───────────────────────────── */

.scrape-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--accent-dim);
    border: 1px solid rgba(232, 201, 127, 0.1);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
}

.scrape-status .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── Job Progress ─────────────────────────────── */

.job-progress {
    margin-top: 10px;
    width: 100%;
}

.job-progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.job-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.job-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.filter-media.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.active-jobs-banner {
    background: var(--bg-card);
    border: 1px solid rgba(232, 201, 127, 0.1);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}

.job-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--accent-dim);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ── Status indicator dot ────────────────────── */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.status-dot.offline {
    background: var(--text-muted);
}

/* ── Kanban Board ─────────────────────────────── */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    min-height: 400px;
}

.kanban-column {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.kanban-column-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.kanban-column-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 1px 7px;
    border-radius: 10px;
}

.kanban-add-btn {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.kanban-add-btn:hover { background: var(--bg-primary); color: var(--text-primary); border-color: var(--border-light); }

.kanban-cards {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
    transition: background 0.15s;
}

.kanban-cards.drag-over { background: rgba(232, 201, 127, 0.04); }

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.kanban-card:hover { border-color: var(--border-light); background: var(--bg-card-hover); }

.kanban-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.kanban-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tab-count {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 2px;
}

/* ── Modal ────────────────────────────────────── */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 { font-size: 16px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

/* ── Responsive ────────────────────────────────── */

@media (max-width: 1200px) {
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .content { margin-left: 0; width: 100%; padding: 16px; }
    .detail-grid { grid-template-columns: 1fr; }
    .brands-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .kanban-board { grid-template-columns: 1fr; }
}
