/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0b0b14;
    --bg2: #111120;
    --bg3: #181830;
    --bg4: #1e1e38;
    --border: #2a2a4a;
    --border2: #3a3a5a;
    --text: #e2e2f0;
    --text2: #9494b8;
    --text3: #5a5a7a;
    --purple: #a855f7;
    --purple-dim: #7c3aed;
    --purple-glow: rgba(168, 85, 247, 0.15);
    --cyan: #22d3ee;
    --cyan-dim: #0891b2;
    --cyan-glow: rgba(34, 211, 238, 0.15);
    --red: #ef4444;
    --red-dim: #dc2626;
    --green: #22c55e;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-dim); }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 60px;
    background: rgba(11, 11, 20, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.badge-admin {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    background: var(--purple-glow);
    border: 1px solid var(--purple-dim);
    border-radius: 4px;
    color: var(--purple);
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: var(--bg3);
    color: var(--text);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.nav-username { font-size: 0.85rem; color: var(--text2); }

.btn-logout {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    background: var(--bg3);
    color: var(--text2);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page-wrapper {
    min-height: calc(100vh - 60px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.container-narrow { max-width: 680px; }
.container-wide { max-width: 1400px; }

/* ── Flash Messages ───────────────────────────────────────────────────────── */
.flash-container {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.4s;
    border: 1px solid;
}

.flash-success { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #4ade80; }
.flash-danger  { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #f87171; }
.flash-info    { background: rgba(34,211,238,0.1); border-color: rgba(34,211,238,0.3); color: #67e8f9; }

.flash-close { background: none; border: none; cursor: pointer; color: inherit; font-size: 1rem; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.page-subtitle { color: var(--text2); margin-top: 0.3rem; font-size: 0.95rem; }

.back-link {
    display: inline-block;
    color: var(--text2);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.back-link:hover { color: var(--purple); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--purple);
    color: #fff;
}
.btn-primary:hover { background: var(--purple-dim); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(168,85,247,0.4); }

.btn-outline {
    background: transparent;
    color: var(--text2);
    border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

.btn-danger {
    background: rgba(239,68,68,0.15);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-sm-text { background: none; border: none; cursor: pointer; padding: 0.2rem 0.5rem; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.form-control:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }
.form-control::placeholder { color: var(--text3); }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-control-file {
    width: 100%;
    padding: 0.5rem 0;
    color: var(--text2);
    font-size: 0.875rem;
}
.form-control-file::-webkit-file-upload-button {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--text2);
    padding: 0.3rem 0.75rem;
    cursor: pointer;
    font-family: inherit;
    margin-right: 0.75rem;
    transition: all 0.2s;
}
.form-control-file::-webkit-file-upload-button:hover { border-color: var(--purple); color: var(--purple); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }

.optional { color: var(--text3); font-weight: 400; font-size: 0.8rem; }

/* ── Auth Screen ──────────────────────────────────────────────────────────── */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(ellipse at top, rgba(168,85,247,0.08) 0%, transparent 60%);
}

.auth-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.auth-logo { text-align: center; margin-bottom: 1rem; }
.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.25rem;
}
.auth-subtitle { color: var(--text2); text-align: center; font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Artist Home Choice ───────────────────────────────────────────────────── */
.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
@media(max-width:600px) { .choice-grid { grid-template-columns: 1fr; } }

.choice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.25s;
    cursor: pointer;
}

.choice-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.choice-vote:hover { border-color: var(--purple); box-shadow: 0 8px 32px var(--purple-glow); }
.choice-record:hover { border-color: var(--cyan); box-shadow: 0 8px 32px var(--cyan-glow); }

.choice-icon { margin-bottom: 1.25rem; }
.choice-card h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; margin-bottom: 0.75rem; }
.choice-card p { color: var(--text2); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.5rem; flex: 1; }
.choice-cta { font-size: 0.875rem; font-weight: 600; color: var(--purple); }

/* ── Voting ───────────────────────────────────────────────────────────────── */
.session-list { display: flex; flex-direction: column; gap: 0.75rem; }

.session-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    transition: border-color 0.2s;
}

.session-card:hover { border-color: var(--border2); }
.session-card.voted { border-left: 3px solid var(--cyan); }

.session-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.session-tracks { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.track-pill {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text2);
}

.vs-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text3);
    letter-spacing: 0.05em;
}

.session-status { display: flex; align-items: center; gap: 0.75rem; }

.badge-voted {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--cyan);
    font-weight: 500;
}

.badge-pending { font-size: 0.8rem; color: var(--text3); }

/* ── Vote Detail ──────────────────────────────────────────────────────────── */
.vote-tracks {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
@media(max-width:640px) { .vote-tracks { grid-template-columns: 1fr; } }

.vote-track-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.vote-track-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--purple);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.vote-track-card h3 { font-size: 1rem; margin-bottom: 1rem; }

.vs-divider {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text3);
    text-align: center;
}

.audio-player {
    width: 100%;
    height: 36px;
    accent-color: var(--purple);
}

audio::-webkit-media-controls-panel { background: var(--bg3); }

.vote-form { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.vote-form-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; }

.vote-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }

.vote-choice {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    overflow: hidden;
}
.vote-choice:hover { border-color: var(--border2); }
.vote-choice.selected { border-color: var(--purple); background: var(--purple-glow); }
.vote-choice input { position: absolute; opacity: 0; pointer-events: none; }
.vote-choice-label { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; font-size: 0.9rem; font-weight: 500; }
.vote-choice-letter {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg3);
    border: 1px solid var(--border2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.vote-choice.selected .vote-choice-letter { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ── Recording Projects ───────────────────────────────────────────────────── */
.project-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.project-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.project-card:hover { border-color: var(--cyan); box-shadow: 0 4px 20px var(--cyan-glow); transform: translateY(-2px); }
.project-card-info { flex: 1; }
.project-card-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.project-card-info p { color: var(--text2); font-size: 0.85rem; }
.project-arrow { color: var(--cyan); font-size: 1.25rem; }
.bpm-badge {
    display: inline-block;
    font-size: 0.75rem;
    background: var(--cyan-glow);
    border: 1px solid rgba(34,211,238,0.2);
    color: var(--cyan);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 0.25rem;
}

/* ── Studio ───────────────────────────────────────────────────────────────── */
.studio-header {
    margin-bottom: 1.5rem;
}
.studio-header h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; }
.studio-header p { color: var(--text2); font-size: 0.9rem; margin-top: 0.25rem; }
.studio-title-block { display: flex; flex-direction: column; gap: 0.25rem; }

.studio-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.transport-card { display: flex; flex-direction: column; gap: 1rem; }

.waveform-container {
    position: relative;
    height: 100px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: crosshair;
}

.waveform-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--cyan);
    pointer-events: none;
    left: 0;
    transition: left 0.05s linear;
    box-shadow: 0 0 6px var(--cyan);
}

.region-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(34,211,238,0.12);
    border-left: 1px solid var(--cyan);
    border-right: 1px solid var(--cyan);
    pointer-events: none;
    display: none;
}

.time-display {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.9rem;
    color: var(--text2);
    text-align: center;
}
.time-sep { margin: 0 0.5rem; opacity: 0.4; }

.transport-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.transport-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    cursor: pointer;
    transition: all 0.2s;
}
.transport-btn:hover { border-color: var(--border2); color: var(--text); }

.transport-play { width: 48px; height: 48px; background: var(--purple-glow); border-color: var(--purple-dim); color: var(--purple); }
.transport-play:hover { background: var(--purple); color: #fff; }

.transport-stop:hover { border-color: var(--text3); }
.transport-record { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.transport-record:hover, .transport-record.recording { background: var(--red); color: #fff; border-color: var(--red); animation: pulse-record 1s infinite; }

@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

.transport-divider { width: 1px; height: 24px; background: var(--border); margin: 0 0.25rem; }

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text2);
    user-select: none;
}
.toggle-label input { display: none; }
.toggle-track {
    width: 36px; height: 20px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 10px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}
.toggle-track::after {
    content: '';
    position: absolute;
    width: 14px; height: 14px;
    background: var(--text3);
    border-radius: 50%;
    top: 2px; left: 2px;
    transition: all 0.2s;
}
.toggle-label input:checked ~ .toggle-track { background: var(--purple-glow); border-color: var(--purple); }
.toggle-label input:checked ~ .toggle-track::after { left: 18px; background: var(--purple); }

.volume-row, .monitor-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.vol-label { font-size: 0.8rem; color: var(--text2); white-space: nowrap; min-width: 80px; }
.vol-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    accent-color: var(--purple);
    cursor: pointer;
}
#beatVolDisplay { font-size: 0.8rem; color: var(--text3); min-width: 36px; }

.rec-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: #f87171;
}
.rec-dot {
    width: 10px; height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: blink 1s infinite;
    flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
#recTimer { margin-left: auto; font-family: monospace; }

.mic-level-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mic-meter-bg {
    flex: 1;
    height: 6px;
    background: var(--bg3);
    border-radius: 3px;
    overflow: hidden;
}
.mic-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), #facc15 70%, var(--red));
    border-radius: 3px;
    transition: width 0.05s;
    width: 0%;
}

.take-label-row { align-items: center; }

/* ── Takes Sidebar ────────────────────────────────────────────────────────── */
.takes-card { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.takes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.takes-header h3 { font-size: 0.95rem; font-weight: 600; }
.takes-count {
    font-size: 0.75rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2px 8px;
    color: var(--text2);
}

.takes-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.takes-empty { color: var(--text3); font-size: 0.85rem; text-align: center; padding: 2rem 0; }

.take-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}
.take-item:hover { border-color: var(--border2); }
.take-item-info { flex: 1; min-width: 0; }
.take-item-label { font-size: 0.85rem; font-weight: 500; truncate overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.take-item-meta { font-size: 0.75rem; color: var(--text3); margin-top: 0.1rem; }
.take-item-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

.icon-btn {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text3);
    cursor: pointer;
    transition: all 0.2s;
}
.icon-btn:hover { background: var(--bg4); color: var(--text); }
.icon-btn-danger:hover { color: var(--red); }

.monitor-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; }

/* ── Admin Tables ─────────────────────────────────────────────────────────── */
.table-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text3);
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg3); }

.actions-cell { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.empty-row { text-align: center; color: var(--text3); padding: 2.5rem !important; }

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}
.status-badge.active { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.status-badge.inactive { background: var(--bg3); color: var(--text3); border: 1px solid var(--border); }

.audio-player-sm { width: 200px; height: 28px; }

/* ── Stats Grid ───────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--purple);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label { font-size: 0.8rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Quick Actions ────────────────────────────────────────────────────────── */
.quick-actions { margin-top: 1rem; }
.quick-actions h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.qa-grid { display: flex; gap: 1rem; flex-wrap: wrap; }

.qa-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.qa-card:hover { border-color: var(--purple); color: var(--purple); transform: translateY(-2px); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-wide { max-width: 700px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 1.1rem; padding: 0.2rem; transition: color 0.2s; }
.modal-close:hover { color: var(--text); }

/* ── Results ──────────────────────────────────────────────────────────────── */
.results-summary { margin-bottom: 2rem; }
.result-bar-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.result-track { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.9rem; font-weight: 500; }
.result-count { color: var(--text2); }
.result-bar-bg {
    height: 12px;
    background: var(--bg3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.result-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.result-a { background: linear-gradient(90deg, var(--purple), var(--purple-dim)); }
.result-b { background: linear-gradient(90deg, var(--cyan), var(--cyan-dim)); }
.result-total { font-size: 0.85rem; color: var(--text3); text-align: center; margin-top: 0.5rem; }

.vote-choice-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}
.choice-a { background: var(--purple-glow); color: var(--purple); border: 1px solid rgba(168,85,247,0.3); }
.choice-b { background: var(--cyan-glow); color: var(--cyan); border: 1px solid rgba(34,211,238,0.3); }

/* ── Error Pages ──────────────────────────────────────────────────────────── */
.error-screen {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}
.error-code { font-size: 6rem; font-weight: 700; color: var(--text3); line-height: 1; }

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: var(--text3);
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media(max-width: 768px) {
    .navbar-links { gap: 0 }
    .nav-link { padding: 0.4rem 0.5rem; font-size: 0.8rem; }
    .nav-username { display: none; }
    .page-header { flex-direction: column; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .data-table th, .data-table td { padding: 0.6rem 0.6rem; }
    .actions-cell { flex-direction: column; align-items: flex-start; }
    .transport-controls { gap: 0.3rem; }
}
