:root {
    --bg: #0a1f18;
    --bg-elev: #12312a;
    --bg-card: #1a3d35;
    --bg-card-hover: #224a41;
    --border: #2a5448;
    --text: #e8f3ef;
    --text-dim: #8aa69b;
    --text-muted: #5e7a71;

    --accent: #d4af37;
    --accent-bright: #f2c94c;
    --primary: #1db884;
    --primary-dark: #159668;
    --danger: #e5484d;
    --live: #ff5a5a;

    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;

    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

    --header-h: 60px;
    --nav-h: 72px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
}

body {
    display: flex;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 0%, rgba(29, 184, 132, 0.08), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(212, 175, 55, 0.05), transparent 50%),
        var(--bg);
    min-height: 100vh;
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 700; }

svg {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
}

/* ---------- HEADER ---------- */

.app-header {
    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(10, 31, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.logo-suit {
    font-size: 22px;
    color: var(--accent);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.accent { color: var(--accent); }

.header-left { display: flex; align-items: center; gap: 12px; }

.back-btn {
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: 50%;
    color: var(--text);
}

.back-btn:active { background: var(--bg-card); }

.header-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 9px;
    border-radius: 50%;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}

.icon-btn:hover, .icon-btn:active {
    background: var(--bg-card);
    color: var(--text);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--live);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.badge:empty { display: none; }

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--accent);
    text-transform: uppercase;
}

/* ---------- CONTENT ---------- */

.content {
    flex: 1;
    padding: 20px;
    padding-bottom: calc(var(--nav-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.greeting { margin-top: 4px; }

.greet-hello {
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 4px;
}

.greet-title {
    font-size: 26px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

/* ---------- SECTIONS ---------- */

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 18px;
    letter-spacing: -0.01em;
}

.section-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
}

/* ---------- CARDS ---------- */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.1s, border-color 0.15s;
}

.card:active { transform: scale(0.99); }

.card-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title {
    font-size: 17px;
    letter-spacing: -0.01em;
}

.card-meta {
    font-size: 13px;
    color: var(--text-dim);
}

/* ---------- BUTTONS ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform 0.1s, background 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(29, 184, 132, 0.35);
}

.btn.accent {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    border-color: transparent;
    color: #1a1000;
}

.btn.danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(229, 72, 77, 0.4);
}

.btn.ghost {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--border);
}

.btn.small {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.btn.block { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---------- FORMS ---------- */

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.15s, background 0.15s;
}

.textarea {
    height: auto;
    min-height: 80px;
    padding: 12px 14px;
    line-height: 1.4;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elev);
}

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

.input-prefix {
    position: relative;
}

.input-prefix .input {
    padding-left: 32px;
}

.input-prefix::before {
    content: '@';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-weight: 600;
    pointer-events: none;
}

.form-error {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(229, 72, 77, 0.12);
    border: 1px solid rgba(229, 72, 77, 0.3);
    color: #ffb5b8;
    font-size: 14px;
}

.form-ok {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(29, 184, 132, 0.12);
    border: 1px solid rgba(29, 184, 132, 0.3);
    color: #a0e8cb;
    font-size: 14px;
}

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- AUTH PAGE ---------- */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 40px 24px 24px;
    justify-content: center;
}

.auth-brand {
    text-align: center;
    margin-bottom: 36px;
}

.auth-brand .logo {
    justify-content: center;
    font-size: 28px;
}

.auth-brand .logo-suit { font-size: 36px; }

.auth-subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 8px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.auth-tab {
    height: 40px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
    background: var(--bg-elev);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------- EMPTY STATE ---------- */

.empty {
    padding: 32px 20px;
    text-align: center;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.empty-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 50%;
    background: var(--bg-elev);
    color: var(--text-dim);
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.empty-text {
    font-size: 14px;
    color: var(--text-dim);
    max-width: 280px;
}

/* ---------- LISTS ---------- */

.list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-elev), var(--bg-card-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    flex-shrink: 0;
    text-transform: uppercase;
}

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

.list-name {
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.list-action {
    flex-shrink: 0;
}

/* ---------- BADGES ---------- */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg-elev);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pill.admin {
    background: rgba(212, 175, 55, 0.15);
    color: var(--accent-bright);
}

.pill.live {
    background: rgba(255, 90, 90, 0.15);
    color: var(--live);
}

.pill.scheduled {
    background: rgba(29, 184, 132, 0.15);
    color: var(--primary);
}

.pill.finished {
    background: var(--bg-elev);
    color: var(--text-muted);
}

.pill.playing {
    background: rgba(212, 175, 55, 0.18);
    color: var(--accent-bright);
}

.pill.waiting {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.pill.declined {
    background: rgba(229, 72, 77, 0.15);
    color: #ffb5b8;
}

/* ---------- MATCH / SESSION ---------- */

.session-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.1s, border-color 0.15s;
}

.session-card:active { transform: scale(0.99); }

.session-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    justify-content: space-between;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--live);
    box-shadow: 0 0 0 3px rgba(255, 90, 90, 0.25);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.session-title {
    font-size: 17px;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.session-meta {
    font-size: 13px;
    color: var(--text-dim);
}

.session-foot {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.foot-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.foot-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.foot-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.foot-value.positive { color: var(--primary); }
.foot-value.negative { color: var(--danger); }

.foot-time {
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

#match-times .foot-item {
    text-align: center;
}

/* ---------- POKER TABLE ---------- */

.poker-table {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.25;
    max-width: 360px;
    margin: 0 auto;
    background:
        radial-gradient(ellipse at center, #1a5c48, #0d3a2b 70%, #072219);
    border: 4px solid #3a2411;
    border-radius: 50%;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 0 0 6px #5c3a1e,
        0 8px 30px rgba(0, 0, 0, 0.5);
}

.dealer-slot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 64px;
    height: 34px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--bg-elev), var(--bg-card));
    border: 2px solid var(--accent);
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text);
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-center-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    font-weight: 600;
}

.table-center-value {
    font-size: 22px;
    color: var(--accent-bright);
    letter-spacing: -0.01em;
}

.seat {
    position: absolute;
    width: 72px;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.seat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-elev);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 16px;
    text-transform: uppercase;
}

.seat.occupied .seat-avatar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--accent);
    color: #fff;
}

.seat.empty .seat-avatar {
    border-style: dashed;
    background: rgba(0, 0, 0, 0.3);
}

.seat.you .seat-avatar {
    box-shadow: 0 0 0 3px var(--accent-bright);
}

.seat.clickable { cursor: pointer; }
.seat.clickable:active { transform: translate(-50%, -50%) scale(0.95); }

.seat-rebuys {
    color: var(--live);
    margin-left: 2px;
}

.seat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 8px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seat-buyin {
    font-size: 10px;
    font-weight: 700;
    color: #1a1000;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    padding: 1px 6px;
    border-radius: 8px;
    letter-spacing: -0.01em;
}

.match-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    gap: 12px;
}

.match-total-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.match-total-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.match-total-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-bright);
    letter-spacing: -0.02em;
}

.match-total.entries {
    background: rgba(29, 184, 132, 0.10);
    border-color: rgba(29, 184, 132, 0.35);
}

.match-total.entries .match-total-value {
    color: var(--primary);
}

.match-entries {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
}

.match-entries-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.match-entries-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-bright);
    letter-spacing: -0.01em;
}

.match-times-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.match-times-row > #match-times {
    flex: 1;
    min-width: 0;
    padding-top: 0;
    border-top: none;
}

.match-times-row > #match-times-action {
    flex-shrink: 0;
}

.match-times-row > #match-times-action:empty {
    display: none;
}

.result-stack {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-bright);
    letter-spacing: -0.01em;
}

.pending-cashout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 4px;
}

/* ---------- FINISH WARNING BOX ---------- */

.warning-box {
    background: rgba(229, 72, 77, 0.08);
    border: 2px solid rgba(229, 72, 77, 0.45);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: pulseWarn 1.6s ease-in-out infinite;
}

@keyframes pulseWarn {
    0%, 100% { border-color: rgba(229, 72, 77, 0.45); }
    50% { border-color: rgba(229, 72, 77, 0.85); }
}

.warning-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffb5b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.warning-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

.warning-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(229, 72, 77, 0.25);
}

/* ---------- REPORT ROWS ---------- */

.report-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.report-rank {
    grid-row: 1 / 3;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-elev);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.report-row:first-child .report-rank {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    color: #1a1000;
}

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

.report-name {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-handle {
    font-size: 12px;
    color: var(--text-muted);
}

.report-nums {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

.report-num {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-num-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.report-num-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.report-num-value.positive { color: var(--primary); }
.report-num-value.negative { color: var(--danger); }

/* ---------- ACTION CARD (match controls) ---------- */

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.action-text {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.45;
}

.table-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--accent);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    z-index: 3;
    text-align: center;
}

.table-prompt-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-bright);
    letter-spacing: -0.01em;
}

.table-prompt-sub {
    font-size: 12px;
    color: var(--text-dim);
}

.table-prompt-cancel {
    margin-top: 4px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.seat.empty.available .seat-avatar {
    border-color: var(--primary);
    background: rgba(29, 184, 132, 0.18);
    color: var(--primary);
    animation: pulseSeat 1.4s ease-in-out infinite;
}

@keyframes pulseSeat {
    0%, 100% { box-shadow: 0 0 0 0 rgba(29, 184, 132, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(29, 184, 132, 0); }
}

/* ---------- BOTTOM NAV ---------- */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-h);
    background: rgba(10, 31, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.nav-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.15s;
    padding-top: 6px;
    position: relative;
}

.nav-item svg {
    width: 22px;
    height: 22px;
}

.nav-item.active { color: var(--primary); }
.nav-item:active { color: var(--text); }

.nav-badge {
    position: absolute;
    top: 6px;
    right: 22%;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--live);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg);
}

.nav-badge:empty { display: none; }

/* ---------- MODAL ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal {
    width: 100%;
    max-width: 480px;
    background: var(--bg-elev);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.25s ease;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

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

.modal-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}

.modal-title {
    font-size: 17px;
    letter-spacing: -0.01em;
}

.modal-close {
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 50%;
    color: var(--text-dim);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 14px 20px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.modal-footer .btn { flex: 1; }

/* ---------- CHECKBOX / SELECTABLE LIST ---------- */

.selectable {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.selectable.selected {
    background: rgba(29, 184, 132, 0.12);
    border-color: var(--primary);
}

.selectable input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--bg-elev);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.selectable input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.selectable input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---------- TOAST ---------- */

.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px);
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: var(--shadow);
    z-index: 300;
    animation: toastIn 0.25s ease;
}

.toast.error { border-color: rgba(229, 72, 77, 0.4); color: #ffb5b8; }
.toast.success { border-color: rgba(29, 184, 132, 0.4); color: #a0e8cb; }

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

/* ---------- UTIL ---------- */

.hidden { display: none !important; }
.spacer { flex: 1; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-small { font-size: 13px; }
.positive { color: var(--primary); }
.negative { color: var(--danger); }

.row { display: flex; gap: 10px; }
.row.between { justify-content: space-between; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 360px) {
    .content { padding: 16px; padding-bottom: calc(var(--nav-h) + 16px); }
    .greet-title { font-size: 22px; }
}

@media (min-width: 481px) {
    body { padding: 20px 0; }
    .app {
        min-height: calc(100vh - 40px);
        border-radius: 28px;
        overflow: hidden;
    }
    .bottom-nav { border-radius: 0 0 28px 28px; }
}
