/* ─────────────────────────────────────────────
   NightRequest — design system
   Theme: noir profond + or
   Mobile-first, 60fps animations
   ───────────────────────────────────────────── */

:root {
    --bg: #0a0a0a;
    --bg-soft: #141414;
    --bg-card: #1c1c1c;
    --bg-elevated: #242424;

    --gold: #d4af37;
    --gold-soft: #b8941f;
    --gold-bright: #f0c850;
    --gold-glow: rgba(212, 175, 55, 0.35);

    --text: #f5f5f5;
    --text-muted: #888;
    --text-dim: #555;

    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;

    --border: rgba(255, 255, 255, 0.06);
    --border-gold: rgba(212, 175, 55, 0.3);

    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 22px;

    --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.4);
    --shadow-gold: 0 8px 30px var(--gold-glow);

    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    --header-h: 60px;
    --safe-bottom: env(safe-area-inset-bottom, 0);
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold-bright); }

.gold { color: var(--gold); }
.muted { color: var(--text-muted); font-size: 0.9em; }
.link { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

.app-shell {
    min-height: 100vh;
    padding-bottom: var(--safe-bottom);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t);
    user-select: none;
    min-height: 44px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.97); }

.btn--gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
    color: #1a1a1a;
    box-shadow: var(--shadow-gold);
}
.btn--gold:hover { background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 100%); color: #1a1a1a; }

.btn--ghost {
    background: transparent;
    border: 1px solid var(--border-gold);
    color: var(--gold);
}
.btn--ghost:hover { background: rgba(212, 175, 55, 0.08); }

.btn--danger {
    background: rgba(255, 71, 87, 0.12);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}
.btn--danger:hover { background: rgba(255, 71, 87, 0.2); }

.btn--lg { padding: 16px 28px; font-size: 17px; min-height: 54px; }
.btn--sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.btn--block { width: 100%; }

/* ─── FORMS ─── */
.form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 13px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px; text-transform: uppercase; }

.field input,
.field textarea,
.field select {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border var(--t-fast), background var(--t-fast);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--bg-elevated);
}

/* ─── FLASH ─── */
.flash {
    position: fixed;
    top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 100;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-card);
    animation: flashIn 0.25s ease-out, flashOut 0.3s ease-in 4s forwards;
    max-width: 90%;
}
.flash--success { background: rgba(46, 213, 115, 0.15); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.3); }
.flash--error   { background: rgba(255, 71, 87, 0.15); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.3); }

@keyframes flashIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes flashOut { to { opacity: 0; transform: translate(-50%, -10px); } }

/* ─── HERO (landing) ─── */
.hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at top, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        var(--bg);
}
.hero__container { max-width: 880px; width: 100%; text-align: center; }

.hero__brand { margin-bottom: 48px; animation: riseIn 0.6s ease-out; }
.hero__monogram {
    width: 88px; height: 88px;
    margin: 0 auto 28px;
    border: 1.5px solid var(--gold);
    border-radius: 18px;
    display: grid; place-items: center;
    font-family: inherit;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--gold);
    background: transparent;
    transition: box-shadow 1.5s ease-in-out;
    animation: monogramPulse 4s ease-in-out infinite;
}
@keyframes monogramPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
    50%      { box-shadow: 0 0 0 12px transparent; }
}
.hero__title { font-size: clamp(38px, 8vw, 64px); font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.hero__tagline { font-size: clamp(16px, 3vw, 19px); color: var(--text-muted); font-weight: 400; }

.hero__cta {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 64px;
    animation: riseIn 0.6s 0.15s ease-out backwards;
}

.hero__features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; animation: riseIn 0.6s 0.3s ease-out backwards; }

.feature {
    padding: 28px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform var(--t), border var(--t);
    text-align: left;
}
.feature:hover { transform: translateY(-4px); border-color: var(--border-gold); }
.feature__num {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 18px;
    opacity: 0.85;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); font-weight: 700; }
.feature p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }

@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── AUTH (login/register) ─── */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth__card {
    width: 100%; max-width: 440px;
    padding: 36px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    animation: riseIn 0.4s ease-out;
}
.auth__header { text-align: center; margin-bottom: 28px; }
.auth__title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.auth__sub { color: var(--text-muted); font-size: 14px; }
.auth__footer { margin-top: 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ─── TOPBAR (admin/dj) ─── */
.topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__brand { font-weight: 700; font-size: 17px; }
.topbar__divider { color: var(--text-dim); }
.topbar__user { color: var(--text-muted); font-size: 14px; }

.badge {
    padding: 3px 8px;
    background: var(--gold);
    color: #1a1a1a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.badge--dj { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; }

/* ─── DASHBOARD (mobile-first) ─── */
.dashboard {
    padding: 16px;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
@media (min-width: 720px) { .dashboard { padding: 24px; } }
.dashboard__title { font-size: 22px; font-weight: 700; margin: 8px 0 4px; }
.section-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin: 8px 0 4px; }

/* ─── CLUB-CARD (top of dashboard) ─── */
.club-card {
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.club-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.club-card__label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; display: block; margin-bottom: 4px; }
.club-card__name { font-size: 22px; font-weight: 800; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.club-card__body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* ─── METRIC ROW (3-4 mini stats) ─── */
.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}
.metric {
    padding: 14px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.metric__value { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.metric__label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

/* ─── BIG NAV (gros boutons clairs mobile) ─── */
.big-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.big-nav--compact { grid-template-columns: 1fr 1fr; }
.big-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
    min-height: 88px;
    position: relative;
}
.big-nav__item:hover { transform: translateY(-2px); border-color: var(--border-gold); background: var(--bg-elevated); }
.big-nav__item:active { transform: scale(0.98); }
.big-nav__item svg { color: var(--gold); }
.big-nav__item span { font-size: 13px; font-weight: 600; }
.big-nav__item em {
    position: absolute;
    top: 8px; right: 10px;
    font-style: normal;
    font-size: 11px;
    color: var(--gold);
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.big-nav--compact .big-nav__item { min-height: 56px; flex-direction: row; gap: 8px; padding: 12px; }

/* ─── REQCARD (queue items, mobile-first) ─── */
.reqlist { display: flex; flex-direction: column; gap: 8px; }
.reqcard {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 3px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.reqcard:hover { background: var(--bg-elevated); }
.reqcard--small { padding: 10px; grid-template-columns: 40px 1fr auto; gap: 10px; }
.reqcard--small .reqcard__cover { width: 40px; height: 40px; }
.reqcard--new {
    border-left-color: var(--gold);
    background: rgba(212, 175, 55, 0.06);
    animation: highlightNew 0.6s ease-out;
}
@keyframes highlightNew {
    0% { background: rgba(212, 175, 55, 0.2); }
    100% { background: rgba(212, 175, 55, 0.06); }
}

.reqcard__cover {
    width: 56px; height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
}
.reqcard__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.reqcard__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reqcard__title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reqcard__artist { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reqcard__note { font-size: 12px; font-style: italic; color: var(--gold-soft); margin-top: 4px; line-height: 1.4; }
.reqcard__meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; font-variant-numeric: tabular-nums; }
.reqcard__pos { font-size: 12px; font-weight: 700; color: var(--gold); padding: 4px 8px; background: rgba(212, 175, 55, 0.1); border-radius: 6px; font-variant-numeric: tabular-nums; }

.reqcard__actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

/* ─── ICONBTN (action buttons compact mobile) ─── */
.iconbtn {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}
.iconbtn:hover { background: var(--bg-soft); border-color: var(--border-gold); }
.iconbtn:active { transform: scale(0.92); }
.iconbtn:disabled { opacity: 0.35; cursor: not-allowed; }
.iconbtn--gold {
    background: var(--gold);
    color: #1a1a1a;
    border-color: var(--gold);
}
.iconbtn--gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.iconbtn--danger { color: var(--danger); border-color: rgba(255, 71, 87, 0.25); }
.iconbtn--danger:hover { background: rgba(255, 71, 87, 0.1); border-color: var(--danger); }

/* ─── EMPTY STATE ─── */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.empty-state svg { color: var(--text-dim); margin-bottom: 8px; }
.empty-state p { font-size: 15px; color: var(--text); font-weight: 600; }
.empty-state span { font-size: 13px; }

/* ─── DETAILS COLLAPSE (manual entry fallback) ─── */
.details-collapse {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
}
.details-collapse summary {
    padding: 12px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}
.details-collapse summary:hover { color: var(--gold); }
.details-collapse[open] { padding-bottom: 14px; }
.details-collapse .field { margin-top: 8px; }

/* ─── PICKED ─── */
.picked {
    padding: 10px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.picked .muted { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── COVER THUMB ─── */
.cover-thumb {
    width: 40px; height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
}
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── FIELD HINTS ─── */
.field__hint {
    font-size: 12px;
    margin-top: 4px;
    color: var(--text-muted);
}
.field__hint--ok { color: var(--success); }
.field__hint--err { color: var(--danger); }

.session-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
}
.session-bar__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.session-bar__left .muted { font-size: 13px; }

.session-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
}
.session-bar__left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.session-bar__left .muted { font-size: 13px; }

.dashboard__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dashboard__grid--2col { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform var(--t), border var(--t);
}
.card:hover { transform: translateY(-2px); border-color: var(--border-gold); }
.card__title { font-size: 16px; margin-bottom: 12px; color: var(--gold); }
.card--note {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--border-gold);
    color: var(--gold);
    font-size: 14px;
    margin-bottom: 16px;
}

/* ─── LIST ─── */
.list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.list__item {
    padding: 12px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.list__item--row { flex-direction: row; align-items: center; justify-content: space-between; }
.list__item small { font-size: 12px; }

/* ─── QR PAGE ─── */
.qr-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 880px) {
    .qr-page { grid-template-columns: 1fr; }
}

.qr-page__meta { padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.qr-page__title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.qr-page__sub { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

.qr-page__info { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.qr-page__info > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qr-page__info dt { color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.qr-page__info dd { font-weight: 600; font-size: 14px; }

.qr-page__actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.qr-page__hint { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--ok { background: var(--success); box-shadow: 0 0 8px rgba(46, 213, 115, 0.5); }
.dot--off { background: var(--text-dim); box-shadow: none; opacity: 0.6; }

.qr-page__visual { display: flex; align-items: center; justify-content: center; }

.qr-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-card);
}
.qr-card__header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.qr-card__brand { font-weight: 700; color: var(--gold); letter-spacing: 0.3px; }
.qr-card__club { color: var(--text-muted); font-size: 14px; }
.qr-card__image { padding: 28px; background: #f5f5f5; display: grid; place-items: center; }
.qr-card__image img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.qr-card__footer { padding: 20px 24px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.qr-card__footer strong { font-size: 16px; color: var(--text); }
.qr-card__footer span { font-size: 13px; color: var(--text-muted); }

/* ─── CLIENT (mobile-first) ─── */
.topbar--client { background: rgba(10, 10, 10, 0.95); }

.client {
    padding: 16px;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.client__counter {
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.counter { display: flex; justify-content: space-between; align-items: baseline; }
.counter__label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.counter__value { font-size: 26px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.counter__hint { font-size: 13px; color: var(--text-muted); }
.counter__hint--full { color: var(--warning); }

.client__form textarea {
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: border var(--t-fast);
}
.client__form textarea:focus { outline: none; border-color: var(--gold); }

.client__msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    animation: riseIn 0.25s ease-out;
}
.client__msg--ok  { background: rgba(46, 213, 115, 0.12); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.3); }
.client__msg--err { background: rgba(255, 71, 87, 0.12); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.3); }

/* ─── QUEUE (shared client + DJ) ─── */
.queue { display: flex; flex-direction: column; gap: 8px; }

.queue__item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.queue__item:hover { background: var(--bg-elevated); }

.queue__item--dj {
    grid-template-columns: 36px 1fr auto auto;
    align-items: center;
}
@media (max-width: 600px) {
    .queue__item--dj {
        grid-template-columns: 36px 1fr auto;
        grid-template-areas: "pos info wait" "actions actions actions";
        gap: 10px;
    }
    .queue__item--dj .queue__pos { grid-area: pos; }
    .queue__item--dj .queue__info { grid-area: info; }
    .queue__item--dj .queue__wait { grid-area: wait; }
    .queue__item--dj .queue__actions { grid-area: actions; justify-content: flex-end; }
}

.queue__item--new {
    border-left-color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    animation: highlightNew 0.6s ease-out;
}
@keyframes highlightNew {
    0% { background: rgba(212, 175, 55, 0.25); }
    100% { background: rgba(212, 175, 55, 0.08); }
}

.queue__pos {
    font-weight: 800;
    color: var(--gold);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}
.queue__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.queue__info strong { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue__info .muted { font-size: 13px; }
.queue__note {
    margin-top: 4px;
    font-size: 13px;
    font-style: italic;
    color: var(--gold-soft);
    line-height: 1.4;
}
.queue__wait {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.queue__actions { display: flex; gap: 6px; }
.queue__actions .btn { min-height: 36px; padding: 6px 10px; font-size: 12px; }

/* ─── STATS PAGE ─── */
.stats-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stats-tab {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
}
.stats-tab:hover { color: var(--text); background: var(--bg-elevated); }
.stats-tab.is-active { background: var(--gold); color: #1a1a1a; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-card__label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card__value { font-size: 32px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1; }

.ranking { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ranking__item {
    display: grid;
    grid-template-columns: 28px 40px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}
.ranking__pos { font-weight: 800; color: var(--gold); font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.ranking__info { display: flex; flex-direction: column; min-width: 0; }
.ranking__info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking__info .muted { font-size: 12px; }
.ranking__count { font-weight: 700; color: var(--gold); font-size: 14px; font-variant-numeric: tabular-nums; }

.hourly-chart {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
    height: 180px;
    align-items: end;
    padding: 8px 0;
}
.hourly-chart__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 4px;
}
.hourly-chart__bar {
    width: 100%;
    background: linear-gradient(to top, var(--gold-soft), var(--gold));
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    transition: opacity var(--t-fast);
}
.hourly-chart__col:hover .hourly-chart__bar { opacity: 0.7; }
.hourly-chart__label {
    font-size: 9px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* ─── ERROR PAGES ─── */
.errpage {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
        var(--bg);
}
.errpage__inner { text-align: center; max-width: 480px; }
.errpage__code { font-size: 96px; font-weight: 800; color: var(--gold); line-height: 1; letter-spacing: -4px; margin-bottom: 12px; }
.errpage__title { font-size: 22px; margin-bottom: 8px; }
.errpage__msg { color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }

/* ─── PLAYLISTS (grid + cards) ─── */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.playlist-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--t), border-color var(--t);
    text-decoration: none;
    color: inherit;
}
.playlist-card:hover { transform: translateY(-3px); border-color: var(--border-gold); }
.playlist-card--link { cursor: pointer; }

.playlist-card__cover {
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated);
    overflow: hidden;
    position: relative;
}
.playlist-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-card__cover--empty {
    background:
        repeating-linear-gradient(45deg, transparent 0 12px, rgba(212, 175, 55, 0.06) 12px 24px),
        var(--bg-elevated);
}

.playlist-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.playlist-card__body strong { font-size: 15px; font-weight: 600; }
.playlist-card__body .muted { font-size: 12px; }

.playlist-card__actions {
    padding: 0 14px 14px;
    display: flex;
    gap: 8px;
}
.playlist-card__actions .btn { flex: 1; }

/* ─── PLAYLIST DETAIL (client) ─── */
.playlist-detail {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    align-items: center;
}
@media (max-width: 600px) {
    .playlist-detail { grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; }
}
.playlist-detail__cover {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-elevated);
}
.playlist-detail__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-detail__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.playlist-detail__name { font-size: 22px; font-weight: 700; line-height: 1.2; }
.playlist-detail__actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }

/* ─── LIKE BUTTON ─── */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--t-fast);
    min-height: 36px;
    font-variant-numeric: tabular-nums;
}
.like-btn:hover { border-color: var(--border-gold); color: var(--text); }
.like-btn:active { transform: scale(0.94); }
.like-btn.is-liked {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}
.like-btn--sm { padding: 4px 8px; min-height: 28px; }
.like-btn--sm svg { width: 12px; height: 12px; }

/* ─── MODAL (playlist editor) ─── */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 16px;
    animation: fadeIn 0.2s ease-out;
}
.modal__inner {
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: riseIn 0.25s ease-out;
}
.modal__head {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.modal__head strong { font-size: 16px; }
.modal__body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── PLAYER (floating bottom bar + expanded panel) ─── */
.player {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: rgba(20, 20, 20, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-gold);
    transition: transform var(--t), height var(--t-slow);
    transform: translateY(0);
    padding-bottom: var(--safe-bottom);
}
.player--hidden { transform: translateY(110%); pointer-events: none; }

.player__bar {
    display: grid;
    grid-template-columns: 48px 1fr auto auto auto;
    gap: 14px;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    min-height: 64px;
}
@media (max-width: 600px) {
    .player__bar { grid-template-columns: 44px 1fr auto auto; gap: 10px; }
    .player__viz { display: none; }
}

.player__cover {
    width: 48px; height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
}
.player__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player__cover-fallback {
    display: block; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-soft));
    border: 1px solid var(--border-gold);
    border-radius: 8px;
}

.player__info { display: flex; flex-direction: column; min-width: 0; }
.player__info strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__info .muted { font-size: 12px; }

.player__viz { width: 80px; height: 36px; }

.player__controls { display: flex; align-items: center; gap: 6px; }

.player__btn {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
    flex-shrink: 0;
}
.player__btn:hover { background: var(--bg-elevated); border-color: var(--border-gold); }
.player__btn:active { transform: scale(0.92); }
.player__btn--ghost { border: none; color: var(--text-muted); }
.player__btn--ghost.is-active { color: var(--gold); background: rgba(212, 175, 55, 0.12); }
.player__btn--main {
    width: 44px; height: 44px;
    background: var(--gold);
    color: #1a1a1a;
    border: none;
}
.player__btn--main:hover { background: var(--gold-bright); }
.player__btn--big {
    width: 64px; height: 64px;
    background: var(--gold);
    color: #1a1a1a;
    border: none;
}

.player__panel {
    padding: 24px 20px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 80vh;
    overflow-y: auto;
}
.player__panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 4px;
}
.player__panel-header strong { font-size: 16px; }

.player__big-cover {
    width: 220px; height: 220px;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 auto;
    background: var(--bg-elevated);
}
.player__big-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.player__big-info { text-align: center; }
.player__big-info strong { display: block; font-size: 18px; margin-bottom: 4px; }

.player__progress { display: flex; flex-direction: column; gap: 4px; }
.player__progress input[type="range"] { width: 100%; }
.player__times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.player__big-controls { display: flex; justify-content: center; align-items: center; gap: 18px; }

.player__settings { display: flex; flex-direction: column; gap: 10px; }
.player__slider { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.player__slider input[type="range"] { width: 100%; }
.player__slider em { font-style: normal; color: var(--gold); font-size: 12px; min-width: 30px; text-align: right; }

/* EQ */
.player__eq { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; border-top: 1px solid var(--border); }
.player__eq-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.player__preset {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--t-fast);
}
.player__preset:hover { border-color: var(--border-gold); color: var(--text); }
.player__preset.is-active { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }

.player__eq-bands { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; padding-top: 4px; }
.player__band { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.player__band input[type="range"] {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: bt-lr;
    width: 18px;
    height: 90px;
    accent-color: var(--gold);
}
.player__band-label { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Range slider native styling */
input[type="range"] {
    accent-color: var(--gold);
}

/* Push body content above the player when present */
body.has-player .app-shell { padding-bottom: calc(80px + var(--safe-bottom)); }

/* ─── AUTOCOMPLETE (search dropdown) ─── */
.autocomplete { position: relative; }
.autocomplete__results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    z-index: 30;
    max-height: 320px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 4px;
}
.autocomplete__item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--t-fast);
}
.autocomplete__item:hover, .autocomplete__item.is-active { background: var(--bg-elevated); }
.autocomplete__cover {
    width: 40px; height: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-soft);
}
.autocomplete__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.autocomplete__info { display: flex; flex-direction: column; min-width: 0; }
.autocomplete__title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete__artist { font-size: 12px; color: var(--text-muted); }
.autocomplete__hint { padding: 8px 10px; font-size: 12px; color: var(--text-dim); text-align: center; }

/* ─── PWA install prompt ─── */
.pwa-prompt {
    position: fixed;
    bottom: calc(16px + var(--safe-bottom));
    left: 16px; right: 16px;
    z-index: 200;
    animation: riseIn 0.35s ease-out;
}
.pwa-prompt[hidden] { display: none; }
.pwa-prompt__inner {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow-card);
    max-width: 480px;
    margin: 0 auto;
}
.pwa-prompt__inner strong { color: var(--gold); display: block; margin-bottom: 4px; font-size: 15px; }
.pwa-prompt__inner p { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.pwa-prompt__actions { display: flex; gap: 8px; }
.pwa-prompt__actions .btn { flex: 1; }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
    .topbar { padding: 0 12px; }
    .topbar__divider { display: none; }
    .dashboard { padding: 16px; }
    .auth__card { padding: 28px 20px; }
}

/* ─── SCROLLBAR (dark) ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-soft); }
