/* Lightweight design system — no Tailwind on this app, just a small subset of
   utility classes plus the bespoke ticket-card design. */

:root {
    --bg: #f1f5f9;
    --ink: #0f172a;
    --muted: #475569;
    --border: #e2e8f0;
    --primary: #0b1d3a;
    --accent: #10b981;
    --gold: #f59e0b;
    --radius: 14px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a.hover\:underline:hover { text-decoration: underline; }
a.hover\:no-underline:hover { text-decoration: none; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}
input[type="text"], input[type="password"], input[type="email"], input[type="datetime-local"],
select, textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    line-height: 1.4;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 29, 58, 0.12);
}
button {
    cursor: pointer;
    border: none;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ===== Utility classes used in admin views ===== */
.bg-slate-50 { background: var(--bg); }
.bg-slate-900 { background: var(--primary); }
.bg-white { background: #fff; }
.bg-white\/10 { background: rgba(255, 255, 255, 0.1); }
.bg-emerald-500 { background: var(--accent); }
.bg-emerald-400 { background: #34d399; }
.text-white { color: #fff; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: var(--muted); }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: var(--ink); }
.text-emerald-300 { color: #6ee7b7; }
.text-emerald-800 { color: #065f46; }
.text-emerald-900 { color: #064e3b; }
.text-amber-600 { color: #d97706; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.bg-emerald-100 { background: #d1fae5; }
.bg-emerald-50 { background: #ecfdf5; }
.bg-red-50 { background: #fef2f2; }
.bg-slate-50 { background: var(--bg); }
.border { border: 1px solid var(--border); }
.border-slate-200 { border-color: var(--border); }
.border-slate-300 { border-color: #cbd5e1; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-red-200 { border-color: #fecaca; }
.border-dashed { border-style: dashed; }
.border-t { border-top: 1px solid var(--border); }
.border-slate-100 { border-color: #f1f5f9; }
.rounded { border-radius: 6px; }
.rounded-md { border-radius: 8px; }
.rounded-xl { border-radius: 14px; }
.shadow-sm { box-shadow: 0 1px 2px rgba(15,23,42,0.06); }
.overflow-hidden { overflow: hidden; }

.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 24rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-0\.5 { margin-top: 2px; }
.mb-1 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mr-3 { margin-right: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-10 { padding: 40px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }

.flex { display: flex; }
.grid { display: grid; }
.inline-block { display: inline-block; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.col-span-2 { grid-column: span 2 / span 2; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
    .sm\:col-span-1 { grid-column: span 1 / span 1; }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-2xl { font-size: 24px; }
.text-xl { font-size: 18px; }
.text-\[10px\] { font-size: 10px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.01em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.whitespace-nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }

.w-full { width: 100%; }
.space-y-3 > * + * { margin-top: 12px; }
.hover\:bg-slate-800:hover { background: #1e293b; }
.hover\:bg-slate-50:hover { background: #f8fafc; }
.hover\:bg-white\/20:hover { background: rgba(255,255,255,0.2); }
.hover\:bg-emerald-400:hover { background: #34d399; }
.hover\:text-slate-700:hover { color: #334155; }
.hover\:text-slate-900:hover { color: var(--ink); }
.hover\:text-white:hover { color: #fff; }
.hover\:text-red-800:hover { color: #991b1b; }
.hover\:underline:hover { text-decoration: underline; }

table { border-collapse: collapse; width: 100%; }

code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.font-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ===== Ticket card (the marquee design) ===== */
.ticket-body {
    background: linear-gradient(180deg, #0b1d3a 0%, #0a1530 100%);
    color: #fff;
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ticket-shell {
    max-width: 430px;
    width: 100%;
}
.ticket-card {
    background: #ffffff;
    color: var(--ink);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 12px 24px rgba(0,0,0,0.2);
    transition: box-shadow 0.5s ease, transform 0.5s ease;
}
.ticket-card.ticket-flash {
    box-shadow: 0 0 0 4px rgba(16,185,129,0.55), 0 30px 80px rgba(0,0,0,0.45);
    transform: scale(1.008);
}

.ticket-strip {
    background: linear-gradient(135deg, #0b1d3a 0%, #1d4ed8 100%);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ticket-strip-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
}
.ticket-strip-cat {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fcd34d;
    text-align: right;
    max-width: 60%;
}

.ticket-body-inner {
    padding: 24px 22px 18px;
}

.ticket-event-eyebrow {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
}
.ticket-event-name {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.ticket-event-date {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 4px;
}
.ticket-event-venue {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.ticket-seat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 18px;
}
.ticket-seat-cell {
    background: #f8fafc;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ticket-seat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--muted);
}
.ticket-seat-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
}

/* Perforation strip */
.ticket-perforation {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 22px 12px;
    background: #fff;
}
.ticket-perforation::before,
.ticket-perforation::after {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0a1530;
    top: 50%;
    transform: translateY(-50%);
}
.ticket-perforation::before { left: -14px; }
.ticket-perforation::after { right: -14px; }
.ticket-perforation span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
}

.ticket-barcode-area {
    padding: 18px 22px 26px;
    background: #fff;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-pending {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 4px;
}
.ticket-pending-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(245,158,11,0.18);
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.18); }
}
.ticket-pending-title { font-weight: 700; font-size: 14px; }
.ticket-pending-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

#barcode-area {
    width: 100%;
    text-align: center;
}
.ticket-barcode-format {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}
#barcode-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}
#barcode-svg { width: 100%; max-width: 340px; height: auto; }
#barcode-canvas { max-width: 100%; height: auto; }
.ticket-barcode-value {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    color: var(--muted);
    margin-top: 10px;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.ticket-footnote {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-live  { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.25); }
.status-idle  { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.25); }
.status-error { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.25); }
