/* =====================================================================
   Bilitchi — design system (hand-written, no build step needed on cPanel)
   Direction: "stage at night" — ink-dark stage areas, warm paper surfaces,
   one disciplined accent (spotlight amber). Persian-first, RTL via logical props.
   ===================================================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn.woff2') format('woff2-variations'), url('../fonts/Vazirmatn.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink: #15121f;            /* stage / header */
    --ink-2: #221d31;
    --ink-3: #2f2943;
    --paper: #f6f4f0;          /* page background */
    --surface: #ffffff;
    --surface-2: #faf8f5;
    --border: #e7e2da;
    --border-strong: #d6cfc4;
    --text: #1d1a27;
    --text-muted: #6c6779;
    --text-faint: #9a95a6;
    --on-ink: #f3f0fa;
    --on-ink-muted: #aaa3bd;

    --accent: #ffb224;         /* spotlight amber */
    --accent-hover: #f5a30a;
    --accent-ink: #2a1d00;     /* text on accent */
    --accent-soft: #fff3db;

    --violet: #7c6cff;
    --success: #18936a;  --success-soft: #e3f5ee;
    --warning: #c27a06;  --warning-soft: #fdf1dc;
    --danger: #d23f3f;   --danger-soft: #fbe7e7;
    --info: #3f6ad2;     --info-soft: #e7eefb;

    --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
    --sh-1: 0 1px 2px rgba(21, 18, 31, .06), 0 1px 1px rgba(21, 18, 31, .04);
    --sh-2: 0 6px 18px -6px rgba(21, 18, 31, .16), 0 2px 4px rgba(21, 18, 31, .05);
    --sh-3: 0 22px 48px -18px rgba(21, 18, 31, .35);

    --font: 'Vazirmatn', Tahoma, system-ui, sans-serif;
    --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.85; color: var(--text);
    background: var(--paper); font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.alert .ico, .toast .ico { width: 20px; height: 20px; margin-top: 3px; }
.badge .ico { width: 13px; height: 13px; }
.empty .ico.empty-ico { width: 56px; height: 56px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.45; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, white); outline-offset: 2px; border-radius: 6px; }

/* ---------- layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.section { padding-block: 40px; }
@media (min-width: 768px) { .section { padding-block: 64px; } }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; } .text-end { text-align: end; }
.w-full { width: 100%; }
.hide-sm { display: none; } @media (min-width: 768px) { .hide-sm { display: initial; } .show-sm { display: none; } }

/* ---------- buttons ---------- */
.btn {
    --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
    padding: 8px 18px; border-radius: var(--r-sm); border: 1px solid var(--b-bd); background: var(--b-bg);
    color: var(--b-fg); font-weight: 700; font-size: .95rem; cursor: pointer; white-space: nowrap;
    transition: background .18s, border-color .18s, transform .12s, box-shadow .18s; text-align: center;
}
.btn:hover { border-color: var(--text-faint); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-bd: var(--accent); box-shadow: 0 6px 16px -8px rgba(245, 163, 10, .8); }
.btn-primary:hover { --b-bg: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { --b-bg: var(--ink); --b-fg: var(--on-ink); --b-bd: var(--ink); }
.btn-dark:hover { --b-bg: var(--ink-3); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; }
.btn-ghost:hover { --b-bg: rgba(0, 0, 0, .04); }
.btn-danger { --b-bg: var(--surface); --b-fg: var(--danger); --b-bd: color-mix(in srgb, var(--danger) 35%, white); }
.btn-danger:hover { --b-bg: var(--danger-soft); border-color: var(--danger); }
.btn-success { --b-bg: var(--success); --b-fg: #fff; --b-bd: var(--success); }
.btn-sm { min-height: 34px; padding: 4px 12px; font-size: .85rem; }
.btn-lg { min-height: 54px; padding: 10px 28px; font-size: 1.05rem; border-radius: var(--r-md); }
.btn-block { display: flex; width: 100%; }
.btn .ico { width: 18px; height: 18px; }
.link { color: var(--info); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.card-body { padding: 20px; }
@media (min-width: 768px) { .card-body { padding: 24px; } }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); border-color: #ffe0a3; color: #8a5a00; }
.badge-success { background: var(--success-soft); border-color: #bfe6d6; color: var(--success); }
.badge-warning { background: var(--warning-soft); border-color: #f5dcae; color: var(--warning); }
.badge-danger { background: var(--danger-soft); border-color: #f2c5c5; color: var(--danger); }
.badge-info { background: var(--info-soft); border-color: #c9d7f5; color: var(--info); }
.badge-dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: .9rem; }
.hint { font-size: .8rem; color: var(--text-muted); }
.input, .select, .textarea {
    width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
    background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .82rem; font-weight: 600; }
.input-lg { min-height: 56px; font-size: 1.15rem; }
.input-otp { letter-spacing: .6em; text-align: center; font-size: 1.5rem; font-weight: 800; direction: ltr; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--accent-hover); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.form-grid .span-all { grid-column: 1 / -1; }
.input-color { width: 56px; min-height: 46px; padding: 4px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); }
fieldset { border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 20px; margin: 0; }
legend { font-weight: 800; padding-inline: 8px; }

/* ---------- alerts / flash ---------- */
.alert { padding: 12px 16px; border-radius: var(--r-sm); border: 1px solid; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--success-soft); border-color: #bfe6d6; color: #0f6b4c; }
.alert-error { background: var(--danger-soft); border-color: #f2c5c5; color: #9b2525; }
.alert-info { background: var(--info-soft); border-color: #c9d7f5; color: #2c4f9e; }
.alert-warning { background: var(--warning-soft); border-color: #f5dcae; color: #8a5600; }
.alert ul { margin: 0; padding-inline-start: 18px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-size: .78rem; color: var(--text-muted); font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fdfcfa; }
.table .actions { text-align: end; white-space: nowrap; }
.empty { text-align: center; padding: 48px 16px; color: var(--text-muted); }
.empty .empty-ico { width: 56px; height: 56px; margin: 0 auto 12px; opacity: .35; }

/* ---------- pagination (Laravel default views) ---------- */
nav[role="navigation"] { margin-top: 20px; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; padding: 0; margin: 20px 0 0; }
.pagination li > * { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 700; font-size: .9rem; }
.pagination .active > * { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pagination .disabled > * { opacity: .45; }

/* =====================================================================
   PUBLIC SITE
   ===================================================================== */
.site-header { background: var(--ink); color: var(--on-ink); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.site-header .container { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.3rem; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.nav { display: none; gap: 4px; margin-inline-start: 12px; }
.nav a { padding: 6px 12px; border-radius: var(--r-sm); color: var(--on-ink-muted); font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a.active { color: var(--on-ink); background: rgba(255, 255, 255, .06); }
@media (min-width: 900px) { .nav { display: flex; } }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.site-header .btn-ghost { --b-fg: var(--on-ink); }
.site-header .btn-ghost:hover { --b-bg: rgba(255, 255, 255, .08); }
.mobile-nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.mobile-nav a { padding: 4px 12px; border-radius: var(--r-pill); color: var(--on-ink-muted); font-size: .85rem; font-weight: 600; white-space: nowrap; background: rgba(255, 255, 255, .05); }
@media (min-width: 900px) { .mobile-nav { display: none; } }

.hero { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.hero::before { /* spotlight */
    content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 178, 36, .22), transparent 70%); pointer-events: none;
}
.hero .container { position: relative; padding-block: 40px 56px; }
@media (min-width: 900px) { .hero .container { padding-block: 64px 80px; } }
.hero h1 { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.1rem); font-weight: 900; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { color: var(--on-ink-muted); font-size: 1.08rem; max-width: 46ch; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--on-ink-muted); font-size: .9rem; }
.hero-trust span { display: inline-flex; gap: 8px; align-items: center; }
.hero-trust svg { width: 18px; height: 18px; color: var(--accent); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }

.search-bar { display: flex; gap: 8px; background: var(--surface); border-radius: var(--r-md); padding: 6px; max-width: 520px; margin-top: 24px; box-shadow: var(--sh-3); }
.search-bar input { border: 0; flex: 1; min-width: 0; padding: 8px 12px; background: transparent; color: var(--text); }
.search-bar input:focus { outline: none; }

/* featured stack in hero */
.feature-tickets { display: grid; gap: 14px; }
.feature-ticket { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .06); transition: transform .2s, border-color .2s; }
.feature-ticket:hover { transform: translateY(-2px); border-color: rgba(255, 178, 36, .4); }
.feature-ticket img { width: 88px; height: 110px; object-fit: cover; border-radius: 10px; }
.feature-ticket .t { font-weight: 800; line-height: 1.5; }
.feature-ticket .m { color: var(--on-ink-muted); font-size: .85rem; }

/* event cards */
.event-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1); transition: transform .2s, box-shadow .2s; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.event-card .poster { aspect-ratio: 4 / 5; background: var(--ink-2); position: relative; overflow: hidden; }
.event-card .poster img { width: 100%; height: 100%; object-fit: cover; }
.event-card .poster .badge { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; }
.event-card .date-chip { position: absolute; inset-block-end: 12px; inset-inline-end: 12px; background: var(--surface); border-radius: 10px; text-align: center; padding: 4px 10px; line-height: 1.3; box-shadow: var(--sh-2); }
.event-card .date-chip b { display: block; font-size: 1.25rem; font-weight: 900; }
.event-card .date-chip span { font-size: .75rem; color: var(--text-muted); font-weight: 700; }
.event-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.event-card .title { font-weight: 800; font-size: 1.02rem; line-height: 1.55; }
.event-card .meta { color: var(--text-muted); font-size: .85rem; }
.event-card .foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--border); }
.price-from { font-size: .8rem; color: var(--text-muted); }
.price-from b { font-size: 1rem; color: var(--text); font-weight: 800; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); font-weight: 700; font-size: .88rem; color: var(--text-muted); }
.chip.active, .chip:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* features strip */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.feature { padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.feature .ico-wrap { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: #8a5a00; margin-bottom: 12px; }
.feature .ico-wrap svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 4px; }
.feature p { color: var(--text-muted); margin: 0; font-size: .92rem; }

/* event page */
.event-hero { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.event-hero .backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) saturate(1.2); opacity: .35; transform: scale(1.2); }
.event-hero .container { position: relative; padding-block: 28px 36px; display: grid; gap: 24px; }
@media (min-width: 900px) { .event-hero .container { grid-template-columns: 280px 1fr; align-items: end; padding-block: 48px; } }
.event-hero .poster { width: 200px; border-radius: var(--r-md); box-shadow: var(--sh-3); aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 900px) { .event-hero .poster { width: 280px; } }
.event-hero .crumbs { color: var(--on-ink-muted); font-size: .85rem; }
.event-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--on-ink-muted); margin-top: 8px; }
.event-facts span { display: inline-flex; align-items: center; gap: 8px; }
.event-facts svg { width: 18px; height: 18px; color: var(--accent); }
.event-layout { display: grid; gap: 24px; }
@media (min-width: 1000px) { .event-layout { grid-template-columns: 1fr 380px; align-items: start; } .event-layout .side { position: sticky; top: 84px; } }
.prose { line-height: 2; }
.prose p { margin-bottom: 1em; }

.show-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.show-item:last-child { border-bottom: 0; }
.show-date { width: 58px; text-align: center; border-radius: 12px; background: var(--ink); color: var(--on-ink); padding: 6px 0; line-height: 1.25; }
.show-date b { display: block; font-size: 1.3rem; font-weight: 900; }
.show-date span { font-size: .72rem; color: var(--on-ink-muted); }
@media (max-width: 520px) { .show-item { grid-template-columns: auto 1fr; } .show-item .btn { grid-column: 1 / -1; } }

.zone-list { list-style: none; padding: 0; margin: 0; }
.zone-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.zone-list li:last-child { border-bottom: 0; }

/* ---------- seat map / buy page ---------- */
.buy-layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .buy-layout { grid-template-columns: 1fr 360px; align-items: start; } .buy-layout .side { position: sticky; top: 84px; } }
.seatmap-card { background: var(--ink); border-radius: var(--r-lg); overflow: hidden; position: relative; }
.seatmap-toolbar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; color: var(--on-ink-muted); font-size: .85rem; flex-wrap: wrap; }
.seatmap-toolbar .btn { --b-bg: var(--ink-2); --b-fg: var(--on-ink); --b-bd: var(--ink-3); }
.seatmap-viewport { position: relative; height: min(70vh, 640px); touch-action: none; cursor: grab; overflow: hidden; }
.seatmap-viewport.dragging { cursor: grabbing; }
.seatmap-viewport svg { width: 100%; height: 100%; display: block; user-select: none; }
.seat { cursor: pointer; transition: opacity .15s; }
.seat.taken { cursor: not-allowed; }
.seat-tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: .82rem; box-shadow: var(--sh-3); white-space: nowrap; transform: translate(50%, -120%); z-index: 3; display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); color: var(--on-ink); font-size: .85rem; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.cart-line:last-child { border-bottom: 0; }
.cart-total { display: flex; justify-content: space-between; font-weight: 900; font-size: 1.15rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--surface-2); cursor: pointer; font-size: 1.2rem; font-weight: 800; }
.qty output { min-width: 36px; text-align: center; font-weight: 800; }
.ga-card { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }

.timer { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--ink); color: var(--accent); border-radius: var(--r-pill); font-weight: 800; font-variant-numeric: tabular-nums; }
.timer.low { color: #ff7b72; }

/* queue */
.queue-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.queue-card { max-width: 520px; width: 100%; }
.queue-num { font-size: 3.4rem; font-weight: 900; line-height: 1.2; color: var(--ink); }
.progress { height: 10px; background: var(--border); border-radius: var(--r-pill); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffd27a); border-radius: inherit; transition: width .6s ease; }

/* ---------- tickets ---------- */
.ticket { display: grid; grid-template-columns: 1fr; background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--sh-1); position: relative; }
@media (min-width: 640px) { .ticket { grid-template-columns: 1fr 150px; } }
.ticket .stub { background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; position: relative; }
@media (min-width: 640px) {
    .ticket .stub::before, .ticket .stub::after { content: ""; position: absolute; inset-inline-start: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); }
    .ticket .stub::before { top: -10px; } .ticket .stub::after { bottom: -10px; }
}
.ticket .main { padding: 18px 20px; display: grid; gap: 4px; }
.ticket .seat-label { font-weight: 900; font-size: 1.05rem; }
.ticket.is-void { opacity: .6; }
.qr-box { background: #fff; border-radius: var(--r-md); padding: 14px; display: grid; place-items: center; }
.qr-box canvas, .qr-box img, .qr-box svg { width: 100%; height: auto; max-width: 280px; image-rendering: pixelated; }
.qr-ring { --p: 100; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) calc(var(--p) * 1%), var(--border) 0); }
.ticket-full { max-width: 460px; margin-inline: auto; }
.ticket-full .head { background: var(--ink); color: var(--on-ink); padding: 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.ticket-full .body { background: var(--surface); padding: 20px; border-radius: 0 0 var(--r-lg) var(--r-lg); border: 1px solid var(--border); border-top: 0; }
.holder-strip { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.watermark { font-size: .75rem; color: var(--text-faint); text-align: center; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* account */
.account-layout { display: grid; gap: 20px; }
@media (min-width: 960px) { .account-layout { grid-template-columns: 240px 1fr; align-items: start; } }
.side-menu { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.side-menu a { padding: 8px 14px; border-radius: var(--r-sm); font-weight: 700; color: var(--text-muted); white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.side-menu a svg { width: 18px; height: 18px; }
.side-menu a.active { background: var(--ink); color: var(--on-ink); }
.side-menu a:hover:not(.active) { background: rgba(0, 0, 0, .04); color: var(--text); }
@media (min-width: 960px) { .side-menu { flex-direction: column; position: sticky; top: 84px; } }
.stat { padding: 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.stat .k { font-size: .82rem; color: var(--text-muted); font-weight: 700; }
.stat .v { font-size: 1.5rem; font-weight: 900; line-height: 1.5; }
.stat .d { font-size: .8rem; color: var(--text-muted); }

/* auth */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 420px; }

/* footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); margin-top: 64px; font-size: .9rem; }
.site-footer .container { padding-block: 36px; display: grid; gap: 24px; }
@media (min-width: 800px) { .site-footer .container { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: var(--on-ink); font-size: 1rem; }
.site-footer a:hover { color: var(--on-ink); }
.site-footer .copy { border-top: 1px solid rgba(255, 255, 255, .06); padding-block: 14px; font-size: .8rem; }

/* toast */
.toast-stack { position: fixed; inset-block-end: 16px; inset-inline: 16px; z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 520px; width: 100%; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--on-ink); box-shadow: var(--sh-3); font-weight: 600; display: flex; gap: 10px; align-items: center; animation: toast-in .25s ease; }
.toast.error { background: #3a1416; color: #ffd9d9; }
.toast.success { background: #0d3427; color: #c8f3e2; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* modal (native dialog) */
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(520px, calc(100% - 24px)); box-shadow: var(--sh-3); color: var(--text); }
dialog.modal::backdrop { background: rgba(21, 18, 31, .55); backdrop-filter: blur(2px); }
dialog.modal .modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
dialog.modal .modal-head h3 { margin: 0; }
dialog.modal .modal-body { padding: 20px; }

/* =====================================================================
   PANELS (organizer + admin)
   ===================================================================== */
.panel-shell { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .panel-shell { grid-template-columns: 260px 1fr; } }
.panel-side { background: var(--ink); color: var(--on-ink-muted); display: flex; flex-direction: column; position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 60; transform: translateX(100%); transition: transform .25s; }
[dir="rtl"] .panel-side { transform: translateX(100%); }
[dir="ltr"] .panel-side { transform: translateX(-100%); }
.panel-side.open { transform: none !important; }
@media (min-width: 1024px) { .panel-side { position: sticky; top: 0; height: 100vh; transform: none !important; width: auto; } }
.panel-side .brand { color: var(--on-ink); padding: 18px 20px; }
.panel-side .ctx { margin: 0 14px 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ink-2); font-size: .85rem; color: var(--on-ink); }
.panel-side .ctx small { color: var(--on-ink-muted); display: block; }
.panel-nav { flex: 1; overflow-y: auto; padding: 4px 10px 20px; }
.panel-nav .grp { font-size: .72rem; font-weight: 800; color: #6f6888; padding: 14px 12px 6px; letter-spacing: .02em; }
.panel-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-sm); font-weight: 600; font-size: .93rem; position: relative; }
.panel-nav a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.panel-nav a:hover { background: rgba(255, 255, 255, .05); color: var(--on-ink); }
.panel-nav a.active { background: rgba(255, 178, 36, .12); color: var(--accent); }
.panel-nav a.active::before { content: ""; position: absolute; inset-inline-start: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px; background: var(--accent); }
.panel-side .side-foot { padding: 14px 20px; font-size: .75rem; color: #6f6888; border-top: 1px solid rgba(255, 255, 255, .06); line-height: 1.7; }
.panel-main { min-width: 0; display: flex; flex-direction: column; }
.panel-top { position: sticky; top: 0; z-index: 30; background: rgba(246, 244, 240, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.panel-top .inner { display: flex; align-items: center; gap: 12px; min-height: 60px; padding-inline: 16px; }
@media (min-width: 768px) { .panel-top .inner { padding-inline: 28px; } }
.panel-content { padding: 20px 16px 48px; width: 100%; max-width: 1280px; }
@media (min-width: 768px) { .panel-content { padding: 28px 28px 64px; } }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.45rem; margin: 0; }
.page-head .sub { color: var(--text-muted); font-size: .92rem; margin-top: 2px; }
.burger { display: inline-flex; }
@media (min-width: 1024px) { .burger { display: none; } }
.scrim { position: fixed; inset: 0; background: rgba(21, 18, 31, .5); z-index: 55; display: none; }
.scrim.show { display: block; }
@media (min-width: 1024px) { .scrim { display: none !important; } }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.filters .input, .filters .select { min-height: 40px; padding: 6px 12px; width: auto; min-width: 160px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--text); border-color: var(--accent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: .92rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 600; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.bar-chart .b { flex: 1; background: linear-gradient(180deg, var(--accent), #ffd889); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.bar-chart .b:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); font-size: .75rem; padding: 2px 8px; border-radius: 6px; white-space: nowrap; margin-bottom: 4px; }
.bar-labels { display: flex; gap: 6px; font-size: .7rem; color: var(--text-faint); }
.bar-labels span { flex: 1; text-align: center; }
.meter { height: 8px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--success); }

/* seat builder (admin / organizer zone painter) */
.builder { display: grid; gap: 16px; }
@media (min-width: 1100px) { .builder { grid-template-columns: 1fr 340px; align-items: start; } }
.builder-canvas { background: var(--ink); border-radius: var(--r-md); overflow: hidden; }
.builder-canvas svg { width: 100%; height: auto; display: block; max-height: 72vh; }
.builder-canvas .seat-b { cursor: pointer; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-sm); border: 2px solid var(--border); cursor: pointer; font-weight: 700; font-size: .88rem; background: var(--surface); }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }

/* scanner app */
.scanner-body { background: #0d0b14; color: var(--on-ink); min-height: 100vh; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .no-print { display: none !important; } body { background: #fff; } }
