/*
 * pwa.css — Transii PWA
 * Mobile-first, dark industrial theme.
 * Built for bright sunlight, gloved fingers, bumpy matatu roads.
 */

/* ── CSS Variables ──────────────────────────────────────────────── */
:root {
    --bg:       #0a0a0a;
    --card:     #111111;
    --border:   #222222;
    --text:     #f0f0f0;
    --muted:    #666666;
    --green:    #22c55e;
    --yellow:   #f59e0b;
    --red:      #ef4444;
    --blue:     #3b82f6;
    --purple:   #8b5cf6;
    --mpesa:    #00b300;    /* Safaricom green */
    --header-h: 48px;
    --radius:   12px;
    --radius-sm: 8px;
}

/* ── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    min-height: 100dvh;
    overflow-x: hidden;
    max-width: 100vw;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
    font: inherit;
}

input {
    border: none;
    outline: none;
    background: none;
    color: inherit;
    font: inherit;
}

/* ── Header ─────────────────────────────────────────────────────── */
#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

#hdr-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hdr-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text);
    transition: background 0.15s;
}

.hdr-btn:active { background: var(--border); }

/* ── Connection banner ──────────────────────────────────────────── */
.conn-banner {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: background 0.3s, color 0.3s;
    flex-shrink: 0;
}

.conn-connected {
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.conn-disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

.conn-reconnecting {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yellow);
}

.conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.conn-connected .conn-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Screens ────────────────────────────────────────────────────── */
.screen {
    display: none;
    flex-direction: column;
    min-height: 100dvh;
    padding: calc(var(--header-h) + 12px) 12px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
    width: 100%;
}

.screen-active {
    display: flex !important;
}

/* ── Loading screen ─────────────────────────────────────────────── */
#s-loading {
    align-items: center;
    justify-content: center;
}

.loading-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-brand {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 8px;
}

.loading-sub {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ── Spinner ────────────────────────────────────────────────────── */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 24px;
    height: 24px;
    border-width: 3px;
    flex-shrink: 0;
}

/* ── Landing / Role selection ───────────────────────────────────── */
#s-landing {
    justify-content: flex-start;
    gap: 0;
}

.landing-hero {
    padding: 12px 4px 16px;
    text-align: center;
}

.landing-tagline {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
}

/* ── Demo Banner ─────────────────────────────────────────────────── */
.demo-banner {
    margin: 0 16px 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid var(--purple);
    border-radius: var(--radius);
    text-align: center;
    animation: demoPulse 2s ease-in-out infinite;
}

@keyframes demoPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 12px 2px rgba(139, 92, 246, 0.5); }
}

.demo-badge {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 4px;
}

.demo-text {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 8px;
}

.demo-btn {
    background: var(--purple);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-btn:active {
    transform: scale(0.95);
    background: #7c3aed;
}

.role-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.role-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    min-height: 72px;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    -webkit-user-select: none;
    user-select: none;
    width: 100%;
}

.role-card:active {
    background: #181818;
    border-color: var(--blue);
    transform: scale(0.98);
}

.role-icon {
    font-size: 1.8rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.role-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.role-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.role-desc {
    font-size: 0.8rem;
    color: var(--muted);
}

.role-arrow {
    font-size: 1.4rem;
    color: var(--muted);
    line-height: 1;
}

/* ── PIN Screen ─────────────────────────────────────────────────── */
#s-pin {
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pin-container {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.pin-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.pin-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: -12px;
}

.pin-dots {
    display: flex;
    gap: 16px;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    transition: background 0.15s, border-color 0.15s;
}

.pin-dot.filled {
    background: var(--blue);
    border-color: var(--blue);
}

.pin-error {
    font-size: 0.85rem;
    color: var(--red);
    text-align: center;
}

/* 3×4 grid PIN pad */
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.pin-key {
    height: 72px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, transform 0.08s;
    -webkit-user-select: none;
    user-select: none;
}

.pin-key:active {
    background: #222;
    transform: scale(0.94);
}

.pin-key-ok {
    background: var(--blue);
    border-color: var(--blue);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.pin-key-ok:active { background: #2563eb; }

.pin-key-del { font-size: 1.1rem; }

/* Shake on wrong PIN */
.pin-pad.shake {
    animation: shake 0.4s ease;
}

/* ── Card base ──────────────────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 100%;
}

.card-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 10px;
    margin-top: -8px;
}

.card-info {
    text-align: center;
    padding: 32px 16px;
}

.card-receipt {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

.card-evasion {
    border-color: rgba(239, 68, 68, 0.3);
}

/* ── Seat hero (passenger view) ─────────────────────────────────── */
.seat-hero {
    height: 28dvh;
    min-height: 160px;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: background 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.seat-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 2px solid transparent;
    transition: border-color 0.4s;
}

.seat-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.seat-hero-num {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.seat-hero-status {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Hero status variants */
.seat-hero-empty {
    background: #141414;
    color: var(--muted);
}

.seat-hero-empty::after { border-color: var(--border); }

.seat-hero-seated {
    background: rgba(245, 158, 11, 0.12);
    color: var(--yellow);
    animation: pulse-bg 2.5s ease-in-out infinite;
}

.seat-hero-seated::after { border-color: var(--yellow); }

.seat-hero-paying {
    background: rgba(245, 158, 11, 0.18);
    color: var(--yellow);
}

.seat-hero-paying::after { border-color: var(--yellow); }

.seat-hero-paid-mpesa,
.seat-hero-paid-neighbour {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.seat-hero-paid-mpesa::after,
.seat-hero-paid-neighbour::after { border-color: var(--green); }

.seat-hero-paid-cash {
    background: rgba(34, 197, 94, 0.12);
    color: var(--green);
}

.seat-hero-paid-cash::after { border-color: var(--green); }

.seat-hero-overdue {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    animation: shake-bg 3s ease-in-out infinite;
}

.seat-hero-overdue::after { border-color: var(--red); }

/* ── Fare card ──────────────────────────────────────────────────── */
.fare-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.fare-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.fare-route {
    font-size: 1rem;
    font-weight: 600;
}

.fare-amount-wrap {
    margin-left: auto;
    text-align: right;
}

.fare-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.02em;
}

.peak-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--yellow);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── Pay buttons ────────────────────────────────────────────────── */
.pay-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #161616;
    margin-bottom: 8px;
    text-align: left;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
    -webkit-user-select: none;
    user-select: none;
}

.pay-btn:last-child { margin-bottom: 0; }

.pay-btn:active {
    transform: scale(0.97);
    background: #1c1c1c;
}

.pay-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    line-height: 1;
}

.pay-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.pay-main {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.pay-sub {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.3;
}

/* Button color variants */
.pay-btn-mpesa {
    border-color: rgba(0, 179, 0, 0.35);
    background: rgba(0, 179, 0, 0.06);
}

.pay-btn-mpesa:active { background: rgba(0, 179, 0, 0.12); }

.pay-btn-mpesa-alt {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.06);
}

.pay-btn-mpesa-alt:active { background: rgba(59, 130, 246, 0.12); }

.pay-btn-neighbour {
    border-color: rgba(139, 92, 246, 0.35);
    background: rgba(139, 92, 246, 0.06);
}

.pay-btn-neighbour:active { background: rgba(139, 92, 246, 0.12); }

.pay-btn-cash {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.06);
}

.pay-btn-cash:active { background: rgba(245, 158, 11, 0.12); }

.pay-btn-cancel {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
    justify-content: center;
    min-height: 44px;
}

.pay-btn-danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
    color: var(--red);
}

.pay-btn-danger:active { background: rgba(239, 68, 68, 0.12); }

/* ── Phone input ────────────────────────────────────────────────── */
.phone-row {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    height: 52px;
}

.phone-row:focus-within {
    border-color: var(--blue);
}

.phone-prefix {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    margin-right: 8px;
    flex-shrink: 0;
}

.phone-input {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: transparent;
    color: var(--text);
    width: 100%;
}

.phone-input::placeholder {
    color: #333;
    font-weight: 400;
}

/* ── Waiting / pending ──────────────────────────────────────────── */
.waiting-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.waiting-msg {
    font-size: 0.9rem;
    color: var(--yellow);
    font-weight: 500;
}

/* ── Receipt card ───────────────────────────────────────────────── */
.receipt-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 14px;
}

.receipt-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    align-items: baseline;
}

.receipt-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.receipt-val {
    font-size: 0.95rem;
    font-weight: 600;
}

.receipt-mono {
    font-family: "SF Mono", "Fira Code", "Courier New", monospace;
    letter-spacing: 0.05em;
    color: var(--green);
}

/* ── Info placeholder ───────────────────────────────────────────── */
.info-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.info-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

/* ── Conductor summary bar ──────────────────────────────────────── */
.summary-bar {
    display: flex;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    width: 100%;
}

.summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    border-right: 1px solid var(--border);
    min-width: 0;
}

.summary-item:last-child { border-right: none; }

.summary-val {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
    letter-spacing: -0.02em;
}

.summary-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-item-money .summary-val { color: var(--green); }
.summary-item-alert .summary-val { color: var(--red); }

/* ── Fare control row (conductor) ───────────────────────────────── */
.fare-control-card {
    padding: 14px;
}

.fare-control-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.fare-route-input {
    flex: 1;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 0.9rem;
    color: var(--text);
    min-width: 0;
}

.fare-route-input:focus { border-color: var(--blue); }

.fare-num-input {
    width: 72px;
    height: 44px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    flex-shrink: 0;
    /* Remove spinner arrows */
    -moz-appearance: textfield;
    appearance: textfield;
}

.fare-num-input::-webkit-outer-spin-button,
.fare-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.fare-num-input:focus { border-color: var(--blue); }

.btn-set-fare {
    height: 44px;
    padding: 0 18px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    transition: background 0.12s, transform 0.08s;
}

.btn-set-fare:active {
    background: #2563eb;
    transform: scale(0.97);
}

.peak-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.peak-indicator {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 20px;
}

.peak-on {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yellow);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.peak-off {
    background: rgba(102, 102, 102, 0.1);
    color: var(--muted);
    border: 1px solid var(--border);
}

.peak-row-label {
    font-size: 0.72rem;
    color: var(--muted);
}

/* ── Seat grid (legacy fallback) ────────────────────────────────── */
.seat-grid {
    /* Now hosts the matatu-map div; no longer a direct grid */
}

/* ── Seat item ───────────────────────────────────────────────────── */
.seat-item {
    position: relative;
    height: 60px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 8px 8px 5px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.1s, border-color 0.2s, background 0.2s;
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

/* Headrest indicator — thin bar at top of each seat */
.seat-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 14%;
    width: 72%;
    height: 4px;
    background: currentColor;
    opacity: 0.22;
    border-radius: 2px;
    pointer-events: none;
}

.seat-item:active { transform: scale(0.92); }

.seat-num {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 4px;
}

.seat-icon {
    font-size: 0.7rem;
    line-height: 1;
}

/* ── Matatu map container ────────────────────────────────────────── */
.matatu-map {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #0b0b0b;
    border-radius: 20px 20px 14px 14px;
    padding: 10px 10px 12px;
    border: 1px solid #1a1a1a;
    position: relative;
}

.matatu-dir-label {
    text-align: center;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #2d2d2d;
    text-transform: uppercase;
    padding: 1px 0;
}

/* Front row: driver box + seat 1 */
.matatu-front {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.matatu-driver {
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #0e0e0e;
    border: 1px dashed #1e1e1e;
    border-radius: 8px 8px 5px 5px;
    pointer-events: none;
    flex-shrink: 0;
}

.matatu-driver-icon {
    font-size: 1.1rem;
    opacity: 0.3;
    line-height: 1;
}

.matatu-driver-label {
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #2a2a2a;
    text-transform: uppercase;
}

/* Middle cabin rows */
.matatu-cabin {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.matatu-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

/* Left window seat: rounded left edge */
.matatu-row > .seat-item {
    flex: 1;
    min-width: 0;
    border-radius: 10px 4px 4px 10px;
}

/* Aisle separator */
.matatu-aisle {
    width: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matatu-aisle-line {
    width: 1px;
    height: 70%;
    background: #1e1e1e;
}

/* Right-side pair */
.matatu-pair {
    display: flex;
    gap: 4px;
    flex: 2;
    min-width: 0;
}

.matatu-pair .seat-item {
    flex: 1;
    min-width: 0;
}

.matatu-pair .seat-item:last-child {
    border-radius: 4px 10px 10px 4px;
}

/* Back bench */
.matatu-back {
    margin-top: 2px;
    border-top: 1px dashed #1a1a1a;
    padding-top: 6px;
}

.seat-back-bench {
    width: 100% !important;
    height: 50px !important;
    border-radius: 5px 5px 14px 14px !important;
}

.seat-back-bench::before {
    top: 6px;
    left: 8%;
    width: 84%;
}

/* ── Seat status legend ──────────────────────────────────────────── */
.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 12px 0 0;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--muted);
    text-transform: uppercase;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-dot-empty    { background: #1e1e1e; border: 1px solid #2a2a2a; }
.legend-dot-seated   { background: rgba(245,158,11,0.5); }
.legend-dot-paying   { background: var(--yellow); }
.legend-dot-paid     { background: var(--green); }
.legend-dot-overdue  { background: var(--red); }

/* ── Passenger mini-map ──────────────────────────────────────────── */
.pax-minimap {
    background: #0b0b0b;
    border: 1px solid #1a1a1a;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pax-minimap-left {
    flex: 1;
    min-width: 0;
}

.pax-minimap-heading {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pax-position-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.pax-position-text span {
    color: var(--blue);
}

/* Mini vehicle grid (right side of mini-map card) */
.mini-vehicle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.mini-row {
    display: flex;
    gap: 2px;
    align-items: center;
}

.mini-cell {
    width: 18px;
    height: 14px;
    border-radius: 2px;
    background: #181818;
    border: 1px solid #202020;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.42rem;
    font-weight: 800;
    color: transparent;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.mini-cell.mini-driver {
    background: #0e0e0e;
    border-style: dashed;
}

.mini-cell.mini-aisle {
    background: transparent;
    border: none;
    width: 4px;
}

.mini-cell.mine {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 6px rgba(59,130,246,0.6);
    color: #fff;
}

.mini-cell.occupied {
    background: rgba(245,158,11,0.3);
    border-color: rgba(245,158,11,0.5);
}

.mini-cell.paid {
    background: rgba(34,197,94,0.25);
    border-color: rgba(34,197,94,0.4);
}

.mini-cell.overdue {
    background: rgba(239,68,68,0.3);
    border-color: rgba(239,68,68,0.5);
}

.mini-back {
    width: 100%;
    height: 14px;
    border-radius: 2px 2px 5px 5px;
    background: #181818;
    border: 1px solid #202020;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.42rem;
    font-weight: 800;
    color: transparent;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.mini-back.mine {
    background: var(--blue);
    border-color: var(--blue);
    box-shadow: 0 0 6px rgba(59,130,246,0.6);
    color: #fff;
}

/* Cash badge */
.seat-item .cash-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    background: var(--yellow);
    color: #000;
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Seat status classes */
.seat-empty {
    background: #131313;
    color: #333;
    border-color: #1e1e1e;
}

.seat-seated {
    background: rgba(245, 158, 11, 0.1);
    color: var(--yellow);
    border-color: rgba(245, 158, 11, 0.45);
    animation: pulse-seat 2s ease-in-out infinite;
}

.seat-paying {
    background: rgba(245, 158, 11, 0.16);
    color: var(--yellow);
    border-color: var(--yellow);
}

.seat-paid-mpesa {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.45);
}

.seat-paid-cash {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.45);
}

.seat-paid-neighbour {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
    border-color: rgba(59, 130, 246, 0.45);
}

.seat-overdue {
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.5);
    animation: shake-seat 3s ease-in-out infinite;
}

/* ── Evasion alerts ─────────────────────────────────────────────── */
.evasion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evasion-alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--red);
}

/* ── Revenue hero (owner view) ──────────────────────────────────── */
.revenue-hero {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.rev-hero-inner {
    padding: 20px 16px;
    text-align: center;
}

.rev-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.rev-amount {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--green);
    line-height: 1;
    margin-bottom: 8px;
}

.rev-sub-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rev-sub-item {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

.rev-sep {
    color: var(--border);
}

/* ── Payment split bars ─────────────────────────────────────────── */
.split-item {
    margin-bottom: 14px;
}

.split-item:last-child { margin-bottom: 0; }

.split-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.split-name {
    font-size: 0.82rem;
    font-weight: 700;
}

.split-mpesa { color: var(--mpesa); }
.split-cash  { color: var(--yellow); }
.split-evaded { color: var(--red); }

.split-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.split-track {
    height: 10px;
    background: #1a1a1a;
    border-radius: 20px;
    overflow: hidden;
}

.split-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
    min-width: 0;
}

.split-fill-mpesa  { background: var(--mpesa); }
.split-fill-cash   { background: var(--yellow); }
.split-fill-evaded { background: var(--red); }

/* ── Vehicle status grid ────────────────────────────────────────── */
.veh-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.veh-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #161616;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.veh-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.veh-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.veh-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.veh-val {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Trips list ─────────────────────────────────────────────────── */
.trips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #161616;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}

.trip-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trip-route {
    font-weight: 600;
}

.trip-time {
    font-size: 0.75rem;
    color: var(--muted);
}

.trip-amount {
    font-size: 1rem;
    font-weight: 700;
    color: var(--green);
}

/* ── Evasion stats ──────────────────────────────────────────────── */
.evasion-stats {
    display: flex;
    gap: 12px;
}

.evasion-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-sm);
}

.evasion-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--red);
    letter-spacing: -0.02em;
}

.evasion-loss {
    font-size: 1rem;
}

.evasion-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

/* ── Action sheet ───────────────────────────────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 201;
    background: #141414;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
    max-height: 88dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUp 0.25s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.action-sheet-handle {
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin: 0 auto 16px;
}

.action-sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.action-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-close-sheet {
    display: block;
    width: 100%;
    height: 48px;
    background: #1c1c1c;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    margin-top: 8px;
    transition: background 0.12s;
}

.btn-close-sheet:active { background: #252525; }

/* ── Toast ──────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    max-width: calc(100vw - 40px);
    padding: 12px 20px;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6);
    pointer-events: none;
}

.toast-success {
    background: rgba(34, 197, 94, 0.18);
    color: var(--green);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.toast-error {
    background: rgba(239, 68, 68, 0.18);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.toast-info {
    background: rgba(59, 130, 246, 0.18);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.toast-show {
    animation: fadeIn 0.2s ease forwards;
}

.toast-hide {
    animation: fadeOut 0.3s ease forwards;
}

/* ── Utility ────────────────────────────────────────────────────── */
.muted-text {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    padding: 8px 0;
}

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.75; }
}

@keyframes pulse-seat {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50%       { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-6px); }
    30%       { transform: translateX(6px); }
    45%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px); }
    75%       { transform: translateX(-3px); }
    90%       { transform: translateX(3px); }
}

@keyframes shake-seat {
    0%, 88%, 100% { transform: translateX(0); }
    90%            { transform: translateX(-3px); }
    93%            { transform: translateX(3px); }
    96%            { transform: translateX(-2px); }
}

@keyframes shake-bg {
    0%, 90%, 100% { background-color: rgba(239, 68, 68, 0.12); }
    92%           { background-color: rgba(239, 68, 68, 0.22); }
    95%           { background-color: rgba(239, 68, 68, 0.08); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to   { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

/* ── Responsive tweaks ──────────────────────────────────────────── */
@media (min-width: 480px) {
    .matatu-map {
        max-width: 420px;
        margin: 0 auto;
    }

    .veh-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-height: 600px) {
    .seat-hero {
        height: 30dvh;
        min-height: 140px;
    }

    .seat-hero-num { font-size: 3.5rem; }
}

/* ── Stop picker ── */
.stop-list { display: flex; flex-direction: column; gap: 8px; }
.stop-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; transition: border-color 0.15s;
    font-size: 15px;
}
.stop-item:active { border-color: var(--blue); background: #0d1117; }
.stop-item .stop-name { font-weight: 500; }
.stop-item .stop-fare { color: var(--yellow); font-weight: 700; font-size: 16px; }
.stop-loading { color: var(--muted); text-align: center; padding: 20px; }
.fare-distance { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Receipt QR ──────────────────────────────────────────────────── */
.receipt-qr { display: block; width: 160px; height: 160px; margin: 16px auto 0; border-radius: 8px; }

/* ── Conductor payment verification panel ────────────────────────── */
.payment-info-card {
    background: #0d1a0d; border: 1px solid var(--green);
    border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.payment-info-status {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.pi-badge {
    background: var(--green); color: #000; font-weight: 700;
    font-size: 13px; padding: 4px 10px; border-radius: 20px;
}
.pi-method {
    font-size: 15px; font-weight: 600; color: var(--text);
}
.payment-info-rows { display: flex; flex-direction: column; gap: 8px; }
.pi-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px;
}
.pi-label { color: var(--muted); }
.pi-value { color: var(--text); font-weight: 500; }
.pi-value.mono { font-family: monospace; letter-spacing: 0.5px; color: var(--green); }

/* ── Small utility button ────────────────────────────────────────── */
.btn-small {
    height: 34px; padding: 0 12px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 700;
    color: var(--text); cursor: pointer; flex-shrink: 0;
    transition: background 0.12s, transform 0.08s;
}
.btn-small:active { background: #222; transform: scale(0.97); }

/* Route name input (stop manager) */
.route-input {
    width: 100%; height: 44px;
    background: #1a1a1a; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0 12px;
    font-size: 0.9rem; color: var(--text);
}
.route-input:focus { border-color: var(--blue); }

/* ── Driver view ─────────────────────────────────────────────────── */
.drv-next-hero {
    background: linear-gradient(135deg, #0d1a2e 0%, #0a1628 100%);
    border: 2px solid var(--blue); border-radius: 16px;
    padding: 24px; text-align: center; margin-bottom: 12px;
}
.drv-next-label { font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-bottom: 8px; }
.drv-next-name  { font-size: 28px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.drv-next-count { font-size: 16px; color: var(--blue); font-weight: 600; margin-bottom: 8px; }
.drv-next-seats { font-size: 13px; color: var(--muted); }

.drv-stops-list { display: flex; flex-direction: column; gap: 8px; }
.drv-stop-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; background: var(--bg); border-radius: 8px;
    border-left: 3px solid var(--border);
}
.drv-stop-row.next { border-left-color: var(--blue); }
.drv-stop-name  { font-size: 15px; font-weight: 600; }
.drv-stop-count { background: var(--blue); color: white; border-radius: 12px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.drv-stop-seats { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drv-route-card { display: flex; justify-content: space-between; align-items: center; }
.drv-route-name { font-size: 14px; color: var(--muted); }
.drv-speed      { font-size: 18px; font-weight: 700; color: var(--text); }

/* ── Stop manager ────────────────────────────────────────────────── */
.stop-manager-route-row { margin-bottom: 12px; }
.sm-stop-list   { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sm-stop-row    {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    background: var(--bg); border-radius: 8px; border: 1px solid var(--border);
}
.sm-stop-row .sm-stop-name { flex: 1; font-size: 14px; }
.sm-stop-row .sm-stop-coords { font-size: 11px; color: var(--muted); }
.sm-order-btn {
    background: none; border: 1px solid var(--border); color: var(--muted);
    border-radius: 4px; width: 26px; height: 26px; cursor: pointer; font-size: 12px;
}
.sm-del-btn {
    background: none; border: none; color: var(--red); font-size: 18px; cursor: pointer; padding: 0 4px;
}
.sm-add-row     { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.sm-stop-input  { flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.btn-gps        { background: var(--blue) !important; color: white !important; }
.btn-add        { background: var(--green) !important; color: #000 !important; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* ── Owner / SACCO view ──────────────────────────────────────────── */

/* Occupancy bar in revenue hero */
.own-occ-row  { margin-top: 12px; }
.own-occ-text { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.own-occ-track {
    height: 8px; background: #222; border-radius: 4px; overflow: hidden;
}
.own-occ-bar {
    height: 100%; background: var(--green); border-radius: 4px;
    transition: width 0.4s ease;
}

/* Read-only seat map in owner view */
.own-seat-map { pointer-events: none; user-select: none; }

/* Vehicle card header row (heading + badge side by side) */
.veh-card-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 8px;
}

/* Online / offline badge */
.veh-status-badge {
    font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
    padding: 3px 10px; border-radius: 20px;
    line-height: 1; white-space: nowrap;
}
.veh-status-online  { background: rgba(34,197,94,0.18);  color: var(--green); }
.veh-status-offline { background: rgba(239,68,68,0.18);  color: var(--red);   }
.veh-status-stale   { background: rgba(245,158,11,0.18); color: var(--yellow);}

/* GPS link */
.veh-gps-link { color: var(--blue); text-decoration: none; }
.veh-gps-link:hover { text-decoration: underline; }

/* Last-seen footer */
.own-last-seen {
    font-size: 12px; color: var(--muted); text-align: right;
    margin-top: 6px; padding: 0 2px;
}

/* ══════════════════════════════════════════════════════════════════
   MUSIC / ENTERTAINMENT — Futuristic neon dark theme
   ══════════════════════════════════════════════════════════════════ */

:root {
    --neon-cyan:    #00f0ff;
    --neon-magenta: #ff00c8;
    --neon-purple:  #a855f7;
    --neon-gold:    #fbbf24;
    --neon-green:   #22ff88;
    --glow-sm:  0 0 8px;
    --glow-md:  0 0 16px;
    --glow-lg:  0 0 32px;
    --minibar-h: 56px;
    --bottomnav-h: 56px;
}

/* ── Now-Playing Hero ──────────────────────────────────────────── */
.mu-now-hero {
    position: relative;
    border-radius: var(--radius);
    padding: 24px 16px 16px;
    margin-bottom: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #0c0018 0%, #0a0a0a 60%, #001a1a 100%);
    border: 1px solid rgba(0, 240, 255, 0.15);
    transition: border-color 0.4s;
}

.mu-now-hero:not(.mu-now-idle) {
    border-color: rgba(0, 240, 255, 0.35);
}

.mu-now-bg-glow {
    position: absolute;
    inset: -30% -10%;
    background: radial-gradient(ellipse at 30% 30%, rgba(0, 240, 255, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 70%, rgba(255, 0, 200, 0.04) 0%, transparent 60%);
    pointer-events: none;
    animation: glow-drift 8s ease-in-out infinite alternate;
}

@keyframes glow-drift {
    0%   { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(10px, -10px) rotate(3deg); }
}

/* ── Equalizer bars ────────────────────────────────────────────── */
.mu-eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
    margin-bottom: 16px;
    justify-content: center;
}

.mu-eq-bar {
    width: 4px;
    border-radius: 2px;
    background: var(--neon-cyan);
    box-shadow: var(--glow-sm) var(--neon-cyan);
    animation: eq-idle 1.5s ease-in-out infinite;
    transform-origin: bottom;
}

.mu-now-hero:not(.mu-now-idle) .mu-eq-bar {
    animation: eq-dance 0.6s ease-in-out infinite alternate;
}

.mu-eq-bar:nth-child(1) { height: 40%; animation-delay: 0s;     }
.mu-eq-bar:nth-child(2) { height: 70%; animation-delay: 0.15s;  }
.mu-eq-bar:nth-child(3) { height: 50%; animation-delay: 0.3s;   }
.mu-eq-bar:nth-child(4) { height: 85%; animation-delay: 0.1s;   }
.mu-eq-bar:nth-child(5) { height: 35%; animation-delay: 0.25s;  }

@keyframes eq-idle {
    0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
    50%      { transform: scaleY(0.5); opacity: 0.5; }
}

@keyframes eq-dance {
    0%   { transform: scaleY(0.3); }
    100% { transform: scaleY(1);   }
}

/* ── Now-playing info ──────────────────────────────────────────── */
.mu-now-info {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.mu-now-art {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.mu-now-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.mu-now-title {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.mu-now-artist {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Progress bar ──────────────────────────────────────────────── */
.mu-now-progress { margin-bottom: 10px; }

.mu-progress-track {
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.mu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 2px;
    transition: width 0.3s linear;
    box-shadow: var(--glow-sm) var(--neon-cyan);
}

.mu-now-times {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 4px;
}

/* ── Now-playing vote display ──────────────────────────────────── */
.mu-now-votes {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--muted);
}

.mu-vote-count {
    font-weight: 700;
    color: var(--neon-gold);
    font-size: 0.95rem;
}

.mu-tip-badge {
    background: rgba(251, 191, 36, 0.12);
    color: var(--neon-gold);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: auto;
}

/* ── Mood selector strip ───────────────────────────────────────── */
.mu-mood-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 12px;
    scrollbar-width: none;
    max-width: 100%;
    width: 100%;
}
.mu-mood-strip::-webkit-scrollbar { display: none; }

.mu-mood-chip {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.mu-mood-chip:active { transform: scale(0.95); }

.mu-mood-active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-sm) rgba(0, 240, 255, 0.2);
}

/* ── Search card ───────────────────────────────────────────────── */
.mu-search-card {
    border-color: rgba(0, 240, 255, 0.1);
    transition: border-color 0.3s;
}

.mu-search-card:focus-within {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.1);
}

.mu-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mu-search-icon { color: var(--muted); flex-shrink: 0; }

.mu-search-input {
    flex: 1;
    font-size: 0.95rem;
    padding: 8px 0;
    background: transparent;
    color: var(--text);
}

.mu-search-input::placeholder { color: var(--muted); }

/* ── Search results ────────────────────────────────────────────── */
.mu-search-results {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.mu-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 6px;
}

.mu-result-item:active { background: rgba(255,255,255,0.04); }

.mu-result-art {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--border);
    flex-shrink: 0;
}

.mu-result-meta { flex: 1; min-width: 0; }

.mu-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mu-result-artist {
    font-size: 0.78rem;
    color: var(--muted);
    display: block;
}

.mu-result-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.15s;
}

.mu-result-add:active {
    background: var(--neon-cyan);
    color: #000;
    transform: scale(0.9);
}

/* ── Queue list ────────────────────────────────────────────────── */
.mu-queue-count {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.mu-queue-list { display: flex; flex-direction: column; gap: 2px; }

.mu-queue-empty { text-align: center; padding: 24px 0; }
.mu-empty-icon  { font-size: 2.5rem; margin-bottom: 8px; }
.mu-empty-text  { font-weight: 600; margin-bottom: 4px; }
.mu-empty-sub   { font-size: 0.8rem; color: var(--muted); }

.mu-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    position: relative;
}

.mu-queue-item:nth-child(1) {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.mu-queue-rank {
    width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--muted);
    flex-shrink: 0;
}

.mu-queue-item:nth-child(1) .mu-queue-rank { color: var(--neon-cyan); }
.mu-queue-item:nth-child(2) .mu-queue-rank { color: var(--neon-gold); }
.mu-queue-item:nth-child(3) .mu-queue-rank { color: var(--neon-magenta); }

.mu-queue-art {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--border);
    flex-shrink: 0;
}

.mu-queue-meta { flex: 1; min-width: 0; }

.mu-queue-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mu-queue-artist {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mu-spotlight-tag {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.2);
    color: var(--neon-purple);
    line-height: 1.4;
}

/* ── Vote button in queue ──────────────────────────────────────── */
.mu-queue-vote-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.mu-vote-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.mu-vote-btn:active {
    transform: scale(0.85);
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
}

.mu-vote-btn.mu-voted {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-sm) rgba(0, 240, 255, 0.15);
}

/* Vote particle burst */
.mu-vote-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--neon-cyan) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.mu-vote-btn.mu-vote-burst::after {
    animation: vote-burst 0.5s ease-out forwards;
}

@keyframes vote-burst {
    0%   { opacity: 0.6; transform: scale(0.3); }
    100% { opacity: 0;   transform: scale(2.5); }
}

.mu-vote-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}

.mu-voted + .mu-vote-num { color: var(--neon-cyan); }

/* ── Super-vote / tip button in queue ──────────────────────────── */
.mu-super-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--neon-gold);
    transition: all 0.2s;
    flex-shrink: 0;
}

.mu-super-btn:active {
    transform: scale(0.85);
    background: var(--neon-gold);
    color: #000;
    box-shadow: var(--glow-sm) var(--neon-gold);
}

/* ── Tip card ──────────────────────────────────────────────────── */
.mu-tip-card {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.02);
}

.mu-tip-artist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mu-tip-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.mu-tip-amounts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mu-tip-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.15s;
}

.mu-tip-btn:active,
.mu-tip-btn.mu-tip-selected {
    background: rgba(251, 191, 36, 0.15);
    border-color: var(--neon-gold);
    color: var(--neon-gold);
}

.mu-tip-btn-hot {
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--neon-gold);
}

.mu-tip-custom-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mu-tip-custom {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

.mu-tip-send-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--neon-gold);
    color: #000;
    transition: all 0.15s;
    white-space: nowrap;
}

.mu-tip-send-btn:active {
    transform: scale(0.95);
    box-shadow: var(--glow-md) rgba(251, 191, 36, 0.3);
}

/* ── Play history ──────────────────────────────────────────────── */
.mu-history-list { display: flex; flex-direction: column; gap: 2px; }

.mu-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    opacity: 0.7;
}

.mu-history-idx {
    font-size: 0.75rem;
    color: var(--muted);
    width: 20px;
    text-align: center;
}

.mu-history-meta { flex: 1; min-width: 0; }

.mu-history-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.mu-history-artist {
    font-size: 0.72rem;
    color: var(--muted);
    display: block;
}

.mu-history-stats {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   GAMIFICATION — Njia Points
   ══════════════════════════════════════════════════════════════════ */

/* ── Points hero ───────────────────────────────────────────────── */
.gm-hero {
    position: relative;
    border-radius: var(--radius);
    padding: 32px 16px 24px;
    margin-bottom: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0a2e 0%, #0a0a0a 50%, #0a1a0a 100%);
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-align: center;
}

.gm-hero-glow {
    position: absolute;
    inset: -20% 10%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: glow-drift 10s ease-in-out infinite alternate;
}

.gm-hero-inner { position: relative; z-index: 1; }

.gm-hero-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--neon-purple);
    display: block;
    margin-bottom: 8px;
}

.gm-points {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 8px;
}

.gm-level-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.gm-level-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-purple);
}

.gm-level-dot { color: var(--muted); }

.gm-level-num {
    font-size: 0.8rem;
    color: var(--muted);
}

/* XP progress bar */
.gm-xp-bar-wrap { max-width: 280px; margin: 0 auto; }

.gm-xp-track {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.gm-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: var(--glow-sm) var(--neon-purple);
}

.gm-xp-label {
    font-size: 0.7rem;
    color: var(--muted);
    display: block;
    text-align: center;
    margin-top: 6px;
}

/* ── Stats grid ────────────────────────────────────────────────── */
.gm-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.gm-stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    text-align: center;
}

.gm-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.gm-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Badge grid ────────────────────────────────────────────────── */
.gm-badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gm-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    transition: all 0.3s;
    text-align: center;
}

.gm-badge-locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.gm-badge-earned {
    opacity: 1;
    filter: none;
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.08);
}

/* Badge unlock animation */
.gm-badge-new {
    animation: badge-unlock 0.6s ease-out;
}

@keyframes badge-unlock {
    0%   { transform: scale(0.5) rotate(-15deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(3deg);  opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

.gm-badge-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.gm-badge-name {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.gm-badge-earned .gm-badge-name { color: var(--text); }

/* ── Challenges ────────────────────────────────────────────────── */
.gm-challenge-list { display: flex; flex-direction: column; gap: 8px; }
.gm-challenge-empty { padding: 16px 0; text-align: center; }

.gm-challenge-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    align-items: center;
}

.gm-challenge-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(168, 85, 247, 0.1);
    flex-shrink: 0;
}

.gm-challenge-info { flex: 1; min-width: 0; }

.gm-challenge-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.gm-challenge-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-challenge-track {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.gm-challenge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-green));
    border-radius: 2px;
    transition: width 0.4s ease;
}

.gm-challenge-label {
    font-size: 0.7rem;
    color: var(--muted);
    white-space: nowrap;
}

.gm-challenge-reward {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-gold);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Leaderboard ───────────────────────────────────────────────── */
.gm-board-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.gm-board-tabs::-webkit-scrollbar { display: none; }

.gm-board-tab {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
    transition: all 0.2s;
    white-space: nowrap;
}

.gm-board-tab-active {
    background: rgba(168, 85, 247, 0.12);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

.gm-leaderboard { display: flex; flex-direction: column; gap: 2px; }
.gm-lb-empty    { text-align: center; padding: 16px 0; }

.gm-lb-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
}

.gm-lb-item:nth-child(1) { background: rgba(251, 191, 36, 0.06); }
.gm-lb-item:nth-child(2) { background: rgba(192, 192, 192, 0.04); }
.gm-lb-item:nth-child(3) { background: rgba(205, 127, 50, 0.04); }

.gm-lb-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    background: rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.gm-lb-item:nth-child(1) .gm-lb-rank { background: rgba(251,191,36,0.2); color: var(--neon-gold); }
.gm-lb-item:nth-child(2) .gm-lb-rank { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.gm-lb-item:nth-child(3) .gm-lb-rank { background: rgba(205,127,50,0.15); color: #cd7f32; }

.gm-lb-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-lb-score {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--neon-purple);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════
   PERSISTENT UI — Mini-bar & Bottom Nav
   ══════════════════════════════════════════════════════════════════ */

/* ── Now-Playing mini bar ──────────────────────────────────────── */
.mu-minibar {
    position: fixed;
    bottom: var(--bottomnav-h);
    left: 0;
    right: 0;
    height: var(--minibar-h);
    background: rgba(15, 15, 15, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 240, 255, 0.15);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    z-index: 90;
    transition: transform 0.3s ease;
}

.mu-minibar-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
}

.mu-eq-bar-sm {
    width: 3px;
    border-radius: 1.5px;
    background: var(--neon-cyan);
    animation: eq-dance 0.5s ease-in-out infinite alternate;
}

.mu-eq-bar-sm:nth-child(1) { height: 40%; animation-delay: 0s; }
.mu-eq-bar-sm:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.mu-eq-bar-sm:nth-child(3) { height: 50%; animation-delay: 0.2s; }

.mu-minibar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mu-mini-title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mu-mini-artist {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mu-minibar-votes {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--neon-gold);
    font-size: 0.8rem;
    font-weight: 700;
}

.mu-minibar-open {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color 0.15s;
}

.mu-minibar-open:active { color: var(--neon-cyan); }

/* ── Bottom navigation ─────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottomnav-h);
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 16px;
    color: var(--muted);
    transition: color 0.2s;
    position: relative;
}

.nav-tab:active { transform: scale(0.92); }

.nav-tab-active {
    color: var(--neon-cyan);
}

/* Active tab glow dot */
.nav-tab-active::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--neon-cyan);
    border-radius: 1px;
    box-shadow: var(--glow-sm) var(--neon-cyan);
}

.nav-icon { stroke: currentColor; fill: none; }
.nav-tab-active .nav-icon { filter: drop-shadow(var(--glow-sm) var(--neon-cyan)); }

.nav-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Adjust screen padding when bottom nav is visible ──────────── */
/* Ensure screens scroll and have room for bottom nav + minibar */
.has-bottomnav .screen {
    padding-bottom: calc(var(--bottomnav-h) + var(--minibar-h) + 24px);
}

.has-bottomnav.no-minibar .screen {
    padding-bottom: calc(var(--bottomnav-h) + 24px);
}

/* Mobile touch targets: ensure vote/tip buttons are at least 44px */
@media (max-width: 480px) {
    .mu-vote-btn { width: 44px; height: 44px; }
    .mu-super-btn { width: 36px; height: 36px; }
    .mu-tip-btn { padding: 10px 14px; min-height: 44px; }
    .mu-mood-chip { padding: 8px 14px; min-height: 36px; }
    .nav-tab { padding: 8px 12px; min-height: 44px; }
    .gm-board-tab { padding: 8px 12px; min-height: 36px; }
    .mu-now-hero { padding: 20px 12px 12px; }
    .gm-hero { padding: 24px 12px 20px; }
    .gm-badge-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .gm-badge { padding: 10px 4px; }
    .gm-badge-icon { font-size: 1.5rem; }
    .gm-stats-grid { gap: 6px; }
}

/* ── DJ of Trip celebration overlay ────────────────────────────── */
.gm-dj-celebration {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: dj-fade-in 0.4s ease;
}

@keyframes dj-fade-in {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

.gm-dj-inner {
    text-align: center;
    animation: dj-pop 0.5s ease-out;
}

@keyframes dj-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.gm-dj-emoji {
    font-size: 4rem;
    display: block;
    margin-bottom: 12px;
}

.gm-dj-title {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--neon-gold), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.gm-dj-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.gm-dj-stat {
    font-size: 0.85rem;
    color: var(--muted);
}

.gm-dj-points {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-gold);
    margin-top: 8px;
}

/* ── Pulse animation (reused) ──────────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ── Points pop animation ──────────────────────────────────────── */
.gm-points-pop {
    animation: pts-pop 0.4s ease-out;
}

@keyframes pts-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ── Tip confirmation toast glow ───────────────────────────────── */
/* ── Seat reservation ───────────────────────────────────────────── */
.seat-hero-reserved {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), var(--bg));
}
.seat-hero-reserved::after { border-color: var(--neon-purple); }

.legend-dot-reserved {
    background: var(--neon-purple);
    box-shadow: 0 0 6px var(--neon-purple);
}

/* WiFi detection banner */
.wifi-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(139, 92, 246, 0.06));
    border: 1px solid rgba(0, 240, 255, 0.2);
    margin-bottom: 12px;
    animation: wifi-pulse 2s ease-in-out infinite;
}

@keyframes wifi-pulse {
    0%, 100% { border-color: rgba(0, 240, 255, 0.2); }
    50%      { border-color: rgba(0, 240, 255, 0.5); }
}

.wifi-banner-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.wifi-banner-text { flex: 1; }

.wifi-banner-title {
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
}

.wifi-banner-sub {
    font-size: 0.75rem;
    color: var(--muted);
    display: block;
}

/* Reservation card */
.reserve-card {
    border-color: rgba(139, 92, 246, 0.25);
    background: rgba(139, 92, 246, 0.03);
}

.reserve-seat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.reserve-seat-btn {
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.15s;
    border: 1px solid var(--border);
    background: var(--card);
}

.reserve-seat-btn:active { transform: scale(0.93); }

.reserve-seat-btn.rs-empty {
    border-color: rgba(0, 240, 255, 0.2);
    color: var(--neon-cyan);
}
.reserve-seat-btn.rs-empty:active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
}

.reserve-seat-btn.rs-taken {
    opacity: 0.3;
    pointer-events: none;
}

.reserve-seat-btn.rs-reserved {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

.reserve-seat-btn.rs-mine {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.reserve-seat-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.reserve-timer {
    text-align: center;
    font-size: 0.85rem;
    color: var(--neon-purple);
    font-weight: 600;
    margin-top: 8px;
}

.toast-tip {
    background: rgba(251, 191, 36, 0.15) !important;
    border-color: var(--neon-gold) !important;
    color: var(--neon-gold) !important;
    box-shadow: var(--glow-md) rgba(251, 191, 36, 0.1);
}

