/* ============================================================
   Booking Kelas — macOS-style Light Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- CSS Variables — Light (default) ---- */
:root {
    --bg:           #f2f2f7;
    --surface:      #ffffff;
    --surface-2:    #f7f7f9;
    --surface-3:    #ebebf0;
    --accent:       #007aff;
    --accent-light: #3395ff;
    --accent-bg:    rgba(0,122,255,0.08);
    --green:        #34c759;
    --green-bg:     rgba(52,199,89,0.1);
    --orange:       #ff9500;
    --orange-bg:    rgba(255,149,0,0.1);
    --red:          #ff3b30;
    --red-bg:       rgba(255,59,48,0.1);
    --text:         #1c1c1e;
    --text-2:       #3a3a3c;
    --text-muted:   #8e8e93;
    --border:       rgba(0,0,0,0.08);
    --border-mid:   rgba(0,0,0,0.12);
    --radius:       14px;
    --radius-sm:    10px;
    --radius-xs:    7px;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:       0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
    --font:         'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    --topbar-bg:    rgba(242,242,247,0.85);
}

/* ---- CSS Variables — Dark ---- */
[data-theme="dark"] {
    --bg:           #1c1c1e;
    --surface:      #2c2c2e;
    --surface-2:    #3a3a3c;
    --surface-3:    #48484a;
    --accent:       #0a84ff;
    --accent-light: #409cff;
    --accent-bg:    rgba(10,132,255,0.15);
    --green:        #30d158;
    --green-bg:     rgba(48,209,88,0.12);
    --orange:       #ff9f0a;
    --orange-bg:    rgba(255,159,10,0.12);
    --red:          #ff453a;
    --red-bg:       rgba(255,69,58,0.12);
    --text:         #f2f2f7;
    --text-2:       #ebebf0;
    --text-muted:   #8e8e93;
    --border:       rgba(255,255,255,0.08);
    --border-mid:   rgba(255,255,255,0.12);
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow:       0 4px 16px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
    --topbar-bg:    rgba(28,28,30,0.85);
}

[data-theme="dark"] body { background: #000; }
[data-theme="dark"] .app-shell,
[data-theme="dark"] .admin-shell { background: #000; }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---- Layout ---- */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    body { background: #e5e5ea; }
    .app-shell {
        min-height: 100vh;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 32px 16px;
    }
    .container {
        max-width: 560px;
        background: var(--bg);
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        overflow: hidden;
    }
    .admin-shell {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 32px 16px;
    }
}

/* ---- Top Navigation Bar ---- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--topbar-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 13px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar .logo {
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
    letter-spacing: -0.3px;
}
.topbar .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface-3);
    border: none;
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}
.topbar .back-btn:hover { background: var(--border-mid); }
.topbar h2 { font-size: 17px; font-weight: 600; flex: 1; letter-spacing: -0.2px; }

/* ---- Theme Toggle Button ---- */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border-mid);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}
.theme-toggle-btn:hover {
    background: var(--surface-3);
    color: var(--text);
    transform: rotate(15deg);
}
/* Jika ada elemen lain di kanan, jangan dobel margin */
.topbar > *:last-child:not(.theme-toggle-btn) + .theme-toggle-btn { margin-left: 0; }

/* ---- Hero / Page Header ---- */
.page-hero {
    padding: 24px 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.page-hero h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.6px;
    color: var(--text);
}
.page-hero p { color: var(--text-muted); font-size: 14px; margin-top: 5px; }

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
    flex-shrink: 0;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
}
.filter-chip:hover:not(.active) {
    background: var(--surface-3);
    color: var(--text);
}

/* ============================================================
   Calendar Filter
   ============================================================ */
.calendar-wrap {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 0;
    user-select: none;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cal-month {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
    text-transform: capitalize;
}
.cal-nav {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.cal-nav:hover { background: var(--surface-3); }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 50%;
    cursor: default;
    transition: background 0.12s, color 0.12s;
    flex-direction: column;
    gap: 1px;
}
.cal-day.empty { visibility: hidden; }
.cal-day.past  { color: var(--text-muted); }

.cal-day.today {
    font-weight: 700;
    color: var(--accent);
}
.cal-day.today::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.cal-day.has-class {
    cursor: pointer;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-bg);
}
.cal-day.has-class:hover { background: rgba(0,122,255,0.15); }

.cal-day.selected {
    background: var(--accent) !important;
    color: #fff !important;
}
.cal-day.selected .cal-dot { background: rgba(255,255,255,0.7); }

.cal-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.cal-day.has-class.today .cal-dot { background: var(--accent); }

.cal-footer {
    padding: 10px 0 12px;
    text-align: center;
}
.cal-all-btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    padding: 4px 12px;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
}
.cal-all-btn:hover,
.cal-all-btn.active {
    color: var(--accent);
    background: var(--accent-bg);
}

/* ---- Class Card ---- */
.class-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.class-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    display: block;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.class-card:not(.has-cover) { padding: 14px 16px; }
.class-card:hover  { box-shadow: var(--shadow); transform: translateY(-1px); }
.class-card:active { transform: scale(0.99); box-shadow: var(--shadow-sm); }

/* Cover image */
.card-cover {
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--surface-2);
}
.card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.class-card:hover .card-cover img { transform: scale(1.03); }
.card-body { padding: 14px 16px; }
.card-desc  { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }

/* Hero image di halaman booking detail */
.class-hero-img {
    width: 100%;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    background: var(--surface-2);
}
.class-hero-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.class-card .topic {
    font-weight: 800;
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.25;
}

/* Info grid — seperti publish preview */
.card-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}
.ci-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 8px 10px;
}
.ci-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.ci-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.ci-price { color: var(--accent); font-size: 14px; }

/* Seat info bar */
.card-seat-info {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}
.card-seat-info.available { background: var(--green-bg);  border-color: rgba(52,199,89,0.2); }
.card-seat-info.limited   { background: var(--orange-bg); border-color: rgba(255,149,0,0.2); }
.card-seat-info.full      { background: var(--red-bg);    border-color: rgba(255,59,48,0.2); }

.seat-info-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.seat-info-label {
    font-size: 12px;
    font-weight: 700;
}
.card-seat-info.available .seat-info-label { color: var(--green); }
.card-seat-info.limited   .seat-info-label { color: var(--orange); }
.card-seat-info.full      .seat-info-label { color: var(--red); }

.seat-info-count {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}
.seat-info-count strong { color: var(--text); font-size: 14px; }

.seat-bar {
    height: 5px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.seat-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}
.seat-bar-fill.available { background: var(--green); }
.seat-bar-fill.limited   { background: var(--orange); }
.seat-bar-fill.full      { background: var(--red); }

/* Hapus style lama yang tidak dipakai */
.price-tag { font-size: 15px; font-weight: 700; color: var(--accent); }

/* ---- Class Detail Info Box ---- */
.class-info-box {
    margin: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.class-info-box .info-header {
    background: linear-gradient(135deg, var(--accent) 0%, #0055d4 100%);
    padding: 16px;
    color: #fff;
}
.class-info-box .info-header h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.class-info-box .info-header p  { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.class-info-box .info-body      { padding: 4px 16px 8px; }
.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-row .icon { font-size: 17px; width: 24px; text-align: center; }
.info-row .val  { font-weight: 600; color: var(--text); }
.info-row .lbl  { color: var(--text-muted); font-size: 12px; }

/* ---- Seat Picker ---- */
.seat-section { padding: 16px; }
.seat-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.seat-legend {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.legend-dot {
    width: 14px; height: 14px;
    border-radius: 4px;
}

/* Cinema-style seat grid */
.seat-grid {
    overflow-x: auto;
    padding-bottom: 8px;
}
.cinema-screen {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 7px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-xs);
    margin-bottom: 14px;
}
.col-numbers {
    display: flex;
    gap: 5px;
    margin-bottom: 4px;
}
.col-numbers span {
    width: 32px;
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.col-numbers span:first-child { width: 22px; }

.seat-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}
.row-label {
    width: 22px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}
.seat-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1.5px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.12s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.seat-btn:hover:not(.booked) {
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
    transform: scale(1.1);
}
.seat-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,122,255,0.35);
}
.seat-btn.booked {
    background: var(--red-bg);
    border-color: rgba(255,59,48,0.15);
    color: rgba(255,59,48,0.4);
    cursor: not-allowed;
}

.selected-seat-info {
    text-align: center;
    margin-top: 14px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-muted);
}
.selected-seat-info strong { color: var(--accent); font-size: 18px; }

/* ---- Form ---- */
.form-section { padding: 16px; }
.form-section h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.2px;
}

.form-group { margin-bottom: 12px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 13px;
    background: var(--surface);
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input.error { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.form-group textarea {
    resize: vertical;
    min-height: 72px;
}

/* ---- Buttons ---- */
.btn {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    letter-spacing: -0.1px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,122,255,0.25);
}
.btn-primary:hover  { background: #0066d6; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,122,255,0.3); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ---- Success / Confirmation ---- */
.success-box {
    margin: 20px 12px;
    background: var(--surface);
    border: 1px solid rgba(52,199,89,0.2);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.success-icon { font-size: 52px; margin-bottom: 12px; }
.success-box h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.4px; }
.success-box p  { color: var(--text-muted); font-size: 14px; }
.booking-code {
    margin: 18px 0;
    padding: 14px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-mid);
}
.booking-code .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.booking-code .code  { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: 2px; margin-top: 4px; }

/* ---- Loading & Empty States ---- */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}
.spinner {
    width: 28px; height: 28px;
    border: 2.5px solid var(--border-mid);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state .icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(28,28,30,0.92);
    backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    max-width: 90vw;
}
.toast.show  { transform: translateX(-50%) translateY(0); }
.toast.green { background: rgba(52,199,89,0.92); }
.toast.red   { background: rgba(255,59,48,0.92); }

/* ---- Bottom Safe Area ---- */
.bottom-padding { height: env(safe-area-inset-bottom, 16px); min-height: 16px; }

/* ---- Multi-seat selection summary ---- */
.seat-selection-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.seat-count-badge {
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.seat-ids {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
}
.seat-name-group label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ---- Preview Page ---- */
.preview-intro {
    padding: 12px 16px;
    background: var(--accent-bg);
    border-bottom: 1px solid rgba(0,122,255,0.1);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.ticket-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Ticket Card */
.ticket-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.ticket-cover {
    width: 100%;
    aspect-ratio: 16 / 5;
    overflow: hidden;
    background: var(--surface-2);
}
.ticket-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.ticket-body { padding: 16px; }

.ticket-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.ticket-class {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.ticket-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    padding: 2px 10px;
    background: var(--accent-bg);
    border-radius: 999px;
    flex-shrink: 0;
}

/* Dashed divider like a real ticket */
.ticket-divider {
    display: flex;
    align-items: center;
    margin: 12px -16px;
    position: relative;
}
.ticket-div-left,
.ticket-div-right  { display: block; width: 12px; height: 12px; background: var(--bg); border-radius: 50%; flex-shrink: 0; }
.ticket-div-circle { display: block; width: 10px; height: 10px; background: var(--bg); border-radius: 50%; flex-shrink: 0; }
.ticket-div-line   { flex: 1; border-top: 2px dashed var(--border-mid); }

.ticket-details { margin-bottom: 16px; }
.ticket-row {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
}
.ticket-field { flex: 1; min-width: 0; }
.ticket-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.ticket-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}
.ticket-value.seat-large {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

/* QR Section */
.ticket-qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    gap: 6px;
}
.ticket-code-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.ticket-code {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
}
.ticket-qr {
    margin: 8px 0 4px;
    background: white;
    padding: 8px;
    border-radius: var(--radius-xs);
    display: inline-flex;
}
.ticket-qr canvas,
.ticket-qr img { display: block; }
.ticket-scan-hint {
    font-size: 11px;
    color: var(--text-muted);
}

/* Seat strip on the right */
.ticket-seat-strip {
    position: absolute;
    top: 0; right: 0;
    width: 32px;
    height: 100%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    opacity: 0.85;
}

/* Preview Action Buttons */
.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}
.btn-outline {
    background: var(--surface);
    border: 1.5px solid var(--border-mid);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    padding: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.btn-outline:hover { background: var(--surface-2); }

/* ============================================================
   Admin Panel
   ============================================================ */

.admin-shell {
    min-height: 100vh;
    background: var(--bg);
}
.admin-container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .admin-container {
        background: var(--bg);
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
        overflow: hidden;
    }
}

.admin-section {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 8px;
}
.admin-section:last-child { margin-bottom: 0; }

.admin-section h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

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

.seat-preview-wrap {
    background: var(--surface-2);
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-sm);
    padding: 14px;
    overflow-x: auto;
}
.seat-preview-wrap .cinema-screen { font-size: 10px; padding: 5px; margin-bottom: 10px; }
.seat-preview-wrap .seat-row { gap: 4px; margin-bottom: 4px; }
.seat-preview-wrap .seat-btn  { width: 26px; height: 26px; font-size: 9px; pointer-events: none; }
.seat-preview-wrap .col-numbers span { width: 26px; font-size: 9px; }
.seat-preview-wrap .row-label { font-size: 10px; width: 18px; }

.class-list-admin { display: flex; flex-direction: column; gap: 8px; }

.class-item-admin {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.class-item-admin .info { flex: 1; min-width: 0; }
.class-item-admin .info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.class-item-admin .info span { font-size: 12px; color: var(--text-muted); }

.btn-danger {
    padding: 6px 13px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255,59,48,0.25);
    background: var(--red-bg);
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-danger:hover { background: rgba(255,59,48,0.18); }

.btn-sm {
    display: inline-block;
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

/* ============================================================
   Dev Footer Nav
   ============================================================ */
.dev-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    background: rgba(28,28,30,0.92);
    backdrop-filter: blur(12px);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.dev-footer-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.dev-footer-links {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}
.dev-footer-links::-webkit-scrollbar { display: none; }
.dev-footer-links a {
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.dev-footer-links a:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
/* Jaga jarak konten dari footer */
.bottom-padding { padding-bottom: 56px !important; min-height: 56px !important; }

/* ============================================================
   Status System
   ============================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.status-draft     { background: rgba(142,142,147,0.15); color: #8e8e93; border: 1px solid rgba(142,142,147,0.25); }
.status-published { background: var(--accent-bg);       color: var(--accent);  border: 1px solid rgba(0,122,255,0.2); }
.status-ongoing   { background: var(--green-bg);        color: var(--green);   border: 1px solid rgba(52,199,89,0.25); }
.status-done      { background: var(--surface-3);       color: var(--text-muted); border: 1px solid var(--border-mid); }

.live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    margin-left: 4px;
    animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* Status Tabs */
.status-tabs {
    display: flex;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 8px;
}
.status-tabs::-webkit-scrollbar { display: none; }
.status-tab {
    padding: 12px 16px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.status-tab:hover  { color: var(--text); }
.status-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   Admin Class Grid Cards
   ============================================================ */
.admin-class-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 600px) { .admin-class-grid { grid-template-columns: 1fr 1fr; } }

.admin-class-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.admin-class-card:hover:not(.done-card) {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.admin-class-card.done-card { cursor: default; opacity: 0.75; }

.acc-image {
    width: 100%;
    aspect-ratio: 16 / 6;
    overflow: hidden;
    background: var(--surface-2);
    flex-shrink: 0;
}
.acc-image img { width:100%; height:100%; object-fit:cover; display:block; }
.acc-image.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

/* DONE overlay */
.done-overlay {
    position: absolute;
    top: 0; left: 0; right: 0;
    aspect-ratio: 16 / 6;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.done-overlay span {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 4px;
    color: rgba(255,255,255,0.9);
    border: 2px solid rgba(255,255,255,0.6);
    padding: 4px 16px;
    border-radius: 4px;
}

.acc-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.acc-top  { display: flex; align-items: center; gap: 6px; }
.acc-topic { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.acc-meta {
    display: flex; flex-wrap: wrap; gap: 6px;
    font-size: 12px; color: var(--text-muted);
}
.acc-stats {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 8px; border-top: 1px solid var(--border);
    margin-top: auto;
}
.done-stats { font-size: 12px; }

.acc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}
.action-btn {
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid var(--border-mid);
    background: var(--surface);
    color: var(--text-2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.action-btn:hover { background: var(--surface-3); }
.publish-btn { background: var(--accent-bg); color: var(--accent); border-color: rgba(0,122,255,0.25); }
.publish-btn:hover { background: rgba(0,122,255,0.15); }
.absensi-btn { background: var(--green-bg); color: var(--green); border-color: rgba(52,199,89,0.25); }
.done-btn    { background: var(--green-bg); color: var(--green); border-color: rgba(52,199,89,0.25); }
.del-btn     { background: var(--red-bg);   color: var(--red);   border-color: rgba(255,59,48,0.2);  }
.peserta-btn { background: var(--accent-bg); color: var(--accent); border-color: rgba(0,122,255,0.2); }

/* Topbar buttons */
.btn-new-class {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-new-class:hover { background: #0066d6; }
.topbar-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    transition: color 0.15s;
}
.topbar-link:hover { color: var(--text); }

/* Kelas Baru form */
.required-mark { color: var(--red); margin-left: 2px; }
.field-hint    { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.kelas-baru-actions {
    display: flex;
    gap: 10px;
}
.btn-draft {
    flex: 1;
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.btn-draft:hover { background: var(--surface-3); }
.btn-primary { flex: 1; }

/* Publish preview grid */
.publish-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}
.pp-item { padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-xs); }
.pp-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 3px; }
.pp-val   { font-size: 13px; font-weight: 600; color: var(--text); }

/* Time window banner */
.time-window-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: var(--red-bg);
    border: 1px solid rgba(255,59,48,0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
    margin-bottom: 12px;
}

/* ============================================================
   Absensi / Scanner Page
   ============================================================ */
.scanner-section { padding: 16px; }

.scanner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 360px;
    margin: 0 auto;
}
#scannerVideo {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.scanner-frame {
    position: relative;
    width: 55%;
    aspect-ratio: 1;
}
.scanner-frame span {
    position: absolute;
    width: 22px; height: 22px;
    border-color: #fff;
    border-style: solid;
    opacity: 0.9;
}
.sf-tl { top:0; left:0;  border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.sf-tr { top:0; right:0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.sf-bl { bottom:0; left:0;  border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.sf-br { bottom:0; right:0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scanner-hint {
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    text-align: center;
    background: rgba(0,0,0,0.45);
    padding: 5px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.scanner-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}
.btn-cam {
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-mid);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
}
.btn-cam:hover { background: var(--surface-2); }
.btn-cam-switch {
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
}

/* Result Card */
.result-card {
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    margin-bottom: 4px;
}
.result-card.valid   { background: var(--green-bg);   border-color: rgba(52,199,89,0.25); }
.result-card.already { background: var(--orange-bg);  border-color: rgba(255,149,0,0.25); }
.result-card.not-found { background: var(--red-bg);   border-color: rgba(255,59,48,0.2); }
.result-card.success { background: var(--green-bg);   border-color: rgba(52,199,89,0.4); }

.result-icon   { font-size: 40px; margin-bottom: 6px; }
.result-status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px; }
.result-name   { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 8px; }
.result-meta   { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.result-seat   { font-size: 14px; }
.result-sub    { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.result-code   { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 14px; font-family: monospace; }
.result-btn    { max-width: 260px; margin: 0 auto; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}
.history-icon { font-size: 16px; flex-shrink: 0; }
.history-info { flex: 1; min-width: 0; }
.history-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.history-label {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}
.history-label.hadir     { background: var(--green-bg);  color: var(--green); }
.history-label.already   { background: var(--orange-bg); color: var(--orange); }
.history-label.not-found { background: var(--red-bg);    color: var(--red); }

/* Attendance chips in peserta table */
.attend-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.attend-chip.hadir { background: var(--green-bg); color: var(--green); }
.attend-chip.belum { background: var(--surface-3); color: var(--text-muted); }

/* Attendance progress bar in peserta page */
.attend-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
}
.attend-progress-wrap {
    flex: 1;
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}
.attend-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 0;
}
.attend-pct { font-weight: 700; color: var(--green); font-size: 13px; flex-shrink: 0; }

/* ---- Config Page ---- */
.config-preview {
    padding: 12px 14px;
    background: var(--accent-bg);
    border: 1px solid rgba(0,122,255,0.15);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-2);
    margin-top: 4px;
}
.config-preview strong { color: var(--accent); }

.toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background 0.2s;
}
.toggle-card.active {
    background: var(--green-bg);
    border-color: rgba(52,199,89,0.25);
}
.toggle-info { flex: 1; }
.toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.toggle-desc { font-size: 12px; color: var(--text-muted); }

.toggle-btn {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: var(--surface-3);
    cursor: pointer;
    transition: background 0.25s;
    flex-shrink: 0;
}
.toggle-btn.on { background: var(--green); }
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.toggle-btn.on .toggle-thumb { transform: translateX(20px); }

.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent-bg);
    color: var(--accent);
    border: 1px solid rgba(0,122,255,0.15);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Image Uploader ---- */
.image-uploader {
    position: relative;
    border: 2px dashed var(--border-mid);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
    min-height: 120px;
    background: var(--surface-2);
}
.image-uploader:hover,
.image-uploader.drag-over {
    border-color: var(--accent);
    background: var(--accent-bg);
}
.image-uploader.has-image { border-style: solid; border-color: var(--border-mid); }

.uploader-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 16px;
    color: var(--text-muted);
    text-align: center;
    /* pointer-events dibiarkan aktif agar klik jalan */
}
.uploader-placeholder span  { font-size: 14px; font-weight: 500; color: var(--text-2); }
.uploader-placeholder small { font-size: 12px; }
.uploader-placeholder svg   { opacity: 0.5; }

.uploader-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}
.uploader-remove {
    display: block;
    width: 100%;
    padding: 8px;
    background: var(--red-bg);
    border: none;
    border-top: 1px solid var(--border);
    color: var(--red);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
}
.uploader-remove:hover { background: rgba(255,59,48,0.18); }

/* Thumbnail di class list admin */
.class-item-thumb {
    width: 52px;
    height: 40px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.class-item-thumb.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid var(--border);
}

/* Edit button */
.btn-edit {
    padding: 6px 13px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-edit:hover { background: var(--surface-3); }

.btn-peserta {
    padding: 6px 13px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(0,122,255,0.25);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-peserta:hover { background: rgba(0,122,255,0.15); }

/* Ticket button in peserta page */
.btn-ticket {
    padding: 5px 12px;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(0,122,255,0.25);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-ticket:hover { background: rgba(0,122,255,0.15); }

.btn-resend {
    padding: 5px 9px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-mid);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-resend:hover { background: var(--accent-bg); color: var(--accent); border-color: rgba(0,122,255,0.25); }

/* Peserta Summary Bar */
.peserta-summary {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    gap: 8px;
}
.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.summary-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}
.summary-val.accent { color: var(--accent); }
.summary-val.green  { color: var(--green); }
.summary-lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.summary-divider {
    width: 1px;
    height: 32px;
    background: var(--border-mid);
}

/* ============================================================
   Modal Daftar Peserta
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}
@media (min-width: 640px) {
    .modal-overlay { align-items: center; }
}

.modal-box {
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
    transform: translateY(40px);
    transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
    overflow: hidden;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
@media (min-width: 640px) {
    .modal-box {
        border-radius: 20px;
        max-height: 85vh;
        box-shadow: 0 16px 64px rgba(0,0,0,0.25);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text);
}
.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.modal-close {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    margin-left: 12px;
}
.modal-close:hover { background: var(--red-bg); color: var(--red); }

.modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    flex-shrink: 0;
    gap: 10px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-download:hover { background: #0066d6; transform: translateY(-1px); }

.modal-body {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* ---- Tabel Peserta ---- */
.table-wrap {
    overflow-x: auto;
    padding: 0;
}
.peserta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 580px;
}
.peserta-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
}
.peserta-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-mid);
    white-space: nowrap;
}
.peserta-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
.peserta-table tbody tr:last-child td { border-bottom: none; }
.peserta-table tbody tr:hover td { background: var(--surface-2); }

.td-num { color: var(--text-muted); font-size: 12px; width: 32px; }
.td-seat { width: 60px; }

.seat-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    background: var(--accent-bg);
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.status-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-3);
    color: var(--text-muted);
}
.status-chip.confirmed {
    background: var(--green-bg);
    color: var(--green);
}
