/*
 * Direction: night-poster editorial. Warm off-white paper, near-black ink and one electric lime.
 * Headings in Bricolage Grotesque (heavy, tight), body in Inter.
 */

:root {
  --canvas: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #efebe0;
  --border: #e2ddd0;
  --border-strong: #b9b3a2;
  --ink: #11110e;
  --muted: #5f5e54;
  --accent: #c6f432;
  --accent-hover: #b6e41c;
  --accent-ink: #11110e;
  --accent-text: #2f6310;
  --accent-strong: #28530e;
  --accent-soft: #e3f0bd;
  --accent-border: #a9c94a;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dcefe2;
  --success-strong: #126b33;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f6e7d3;
  --warning-strong: #92400e;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f6dcdc;
  --danger-strong: #991b1b;
  --chart-1: #2f6310;
  --chart-2: #7c285c;
  --chart-3: #b45309;
  --chart-4: #0b5668;
  --chart-5: #5152a5;
  --chart-6: #66655b;

  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 800;
  --display-tracking: -0.03em;
  --eyebrow-tracking: 0.14em;

  --radius-card: 20px;
  --radius-btn: 999px;
  --radius-input: 12px;
  --card-pad: 1.5rem;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.04);

  --x-night: #0d0d0b;
  --x-on-photo: #ffffff;
  --x-lime: #c6f432;
  --x-valid: #15803d;
  --x-already: #f5a524;
  --x-missing: #dc2626;
}

html[data-theme="dark"] {
  --canvas: #0d0d0b;
  --surface: #171714;
  --surface-2: #20201c;
  --border: #2e2e28;
  --border-strong: #4d4d43;
  --ink: #f6f3ec;
  --muted: #a5a396;
  --accent: #c6f432;
  --accent-hover: #d6fb58;
  --accent-ink: #11110e;
  --accent-text: #c6f432;
  --accent-strong: #daf883;
  --accent-soft: #263119;
  --accent-border: #4b5f1d;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #12261a;
  --success-strong: #70d092;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #33210f;
  --warning-strong: #e3a561;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #3a1819;
  --danger-strong: #ec9090;
  --chart-1: #c6f432;
  --chart-2: #d98ab8;
  --chart-3: #e3a561;
  --chart-4: #5ec2dc;
  --chart-5: #9c9de6;
  --chart-6: #a5a396;
}

/* ---------- base ---------- */
html { scroll-behavior: smooth; }
html.reduced-motion { scroll-behavior: auto; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--x-lime); color: var(--x-night); padding: .75rem 1rem; border-radius: 0 0 12px 0; font-weight: 600; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }
@keyframes pop { from { transform: scale(.97); } to { transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-text) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.rise { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
html.reduced-motion .rise, html.reduced-motion .live-dot, html.reduced-motion .ck-res, html.reduced-motion .menu-pop { animation: none; }
html.reduced-motion .poster, html.reduced-motion .poster-img, html.reduced-motion .hero-track { transition: none; scroll-behavior: auto; }
.on-70 { color: color-mix(in srgb, var(--x-on-photo) 70%, transparent); }
.on-80 { color: color-mix(in srgb, var(--x-on-photo) 80%, transparent); }
.on-85 { color: color-mix(in srgb, var(--x-on-photo) 88%, transparent); }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: .75rem; }
.eyebrow-lime { color: var(--x-lime); }
.empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); }
.empty-ic .icon { width: 24px; height: 24px; }

/* ---------- public bar / footer ---------- */
.site-bar { position: sticky; top: 0; z-index: 40; background: var(--x-night); color: var(--x-on-photo); border-bottom: 1px solid rgb(255 255 255 / .08); }
.site-bar .btn-ghost { color: inherit; }
.site-bar .btn-ghost:hover { background: rgb(255 255 255 / .12); }
.bar-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: background .2s; }
.bar-link:hover { background: rgb(255 255 255 / .12); }
.brand-mark { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--x-lime); color: var(--x-night); }
.brand-mark .icon { width: 18px; height: 18px; }
.site-foot { background: var(--x-night); color: var(--x-on-photo); border-top: 1px solid rgb(255 255 255 / .08); }
.foot-link { transition: color .2s; }
.foot-link:hover { color: var(--x-lime); }
.band-night { background: var(--x-night); color: var(--x-on-photo); }

/* ---------- hero carousel ---------- */
.hero { position: relative; background: var(--x-night); color: var(--x-on-photo); }
.hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: flex-end; min-height: clamp(580px, 84vh, 880px); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .86) 0%, rgb(0 0 0 / .4) 42%, rgb(0 0 0 / .18) 100%); }
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 80rem; margin: 0 auto; padding: 5rem 1.25rem 7rem; }
@media (min-width: 640px) { .hero-inner { padding-left: 2rem; padding-right: 2rem; } }
.hero-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 8.5vw, 7rem); line-height: .9; letter-spacing: -.045em; max-width: 14ch; text-wrap: balance; }
.hero-empty { min-height: 420px; display: flex; align-items: flex-end; }
.hero-ctrl { position: absolute; z-index: 2; right: 1.25rem; bottom: 1.5rem; display: flex; align-items: center; gap: .75rem; }
@media (min-width: 640px) { .hero-ctrl { right: 2rem; bottom: 2rem; } }
.hero-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .4); background: rgb(0 0 0 / .3); color: var(--x-on-photo); backdrop-filter: blur(8px); transition: background .2s, color .2s, transform .15s; }
.hero-btn:hover { background: var(--x-lime); color: var(--x-night); border-color: var(--x-lime); }
.hero-btn:active { transform: scale(.94); }
.hero-dot { width: 10px; height: 10px; padding: 0; border-radius: 999px; background: rgb(255 255 255 / .45); transition: width .3s, background .3s; }
.hero-dot[aria-selected="true"] { width: 30px; background: var(--x-lime); }
.ev-cover { position: relative; display: flex; min-height: clamp(520px, 74vh, 780px); background: var(--x-night); overflow: hidden; }
.ev-cover > .mx-auto { position: relative; z-index: 1; width: 100%; }

/* ---------- date stamp & tags ---------- */
.stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 62px; padding: .55rem .7rem .5rem; border-radius: 14px; background: var(--x-lime); color: var(--x-night); line-height: 1; flex: none; }
.stamp-day { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -.04em; }
.stamp-mon { margin-top: .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.stamp-lg { min-width: 96px; padding: .9rem 1rem .8rem; border-radius: 20px; }
.stamp-lg .stamp-day { font-size: 4.2rem; }
.stamp-lg .stamp-mon { font-size: .85rem; }
.tag-dark, .tag-lime, .tag-sold, .tag-lime-soft { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; padding: .3rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.tag-dark { background: rgb(0 0 0 / .55); color: var(--x-on-photo); backdrop-filter: blur(6px); }
.tag-lime { background: var(--x-lime); color: var(--x-night); }
.tag-lime-soft { background: var(--accent-soft); color: var(--accent-strong); }
.tag-sold { background: var(--x-missing); color: var(--x-on-photo); }

/* ---------- poster cards ---------- */
.poster { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-card); overflow: hidden; background: var(--surface-2); isolation: isolate; box-shadow: 0 1px 2px rgb(0 0 0 / .06); transition: box-shadow .3s, transform .3s; }
.poster:hover { box-shadow: 0 22px 44px rgb(0 0 0 / .2); transform: translateY(-4px); }
.poster:active { transform: translateY(-1px) scale(.99); }
.poster-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.poster:hover .poster-img { transform: scale(1.07); }
.poster-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .9) 0%, rgb(0 0 0 / .1) 58%, rgb(0 0 0 / .3) 100%); }
.poster-top { position: absolute; inset: 1rem 1rem auto; display: flex; justify-content: space-between; align-items: flex-start; }
.poster-body { position: absolute; inset: auto 1.1rem 1.1rem; color: var(--x-on-photo); }
.poster-title { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; letter-spacing: -.03em; text-wrap: balance; }
.poster-meta { display: flex; align-items: center; gap: .4rem; margin-top: .65rem; font-size: .875rem; color: color-mix(in srgb, var(--x-on-photo) 85%, transparent); }
.poster-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; min-height: 40px; }
.poster-price { font-weight: 600; font-size: .95rem; }
.poster-go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--x-lime); color: var(--x-night); transition: transform .3s; }
.poster:hover .poster-go { transform: scale(1.12); }
#filters.htmx-request + #grid .poster { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%) 0 0 / 200% 100%; animation: shimmer 1.1s linear infinite; }
#filters.htmx-request + #grid .poster > * { visibility: hidden; }

/* ---------- filter chips ---------- */
.chip-opt { position: relative; }
.chip-opt input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .9rem; font-weight: 600; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.chip-opt:hover span { border-color: var(--ink); }
.chip-opt:active span { transform: scale(.97); }
.chip-opt input:checked + span { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chip-opt input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ---------- event page ---------- */
.info-card { display: flex; gap: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.info-card dt { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.info-card dd { margin-top: .15rem; font-weight: 600; }
.info-card dd.text-muted { font-weight: 400; font-size: .92rem; }
.info-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); }
.ticket-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 1.5rem; box-shadow: 0 16px 44px rgb(0 0 0 / .08); }
.tt-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.stepper { display: inline-flex; align-items: center; flex: none; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--canvas); }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; transition: background .2s, transform .15s; }
.stepper button:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.stepper button:active:not(:disabled) { transform: scale(.92); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper input { width: 2.2rem; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 1.05rem; padding: 0; color: var(--ink); }
.sold-out { margin-top: 1.25rem; padding: 1.5rem 0 .25rem; text-align: center; }
.sold-out-word { display: inline-block; padding: .35rem 1rem; border: 4px solid var(--x-missing); border-radius: 12px; color: var(--x-missing); font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; text-transform: uppercase; transform: rotate(-3deg); }
.step-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .8rem; font-weight: 700; }
.step-on { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.prose h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }

/* ---------- ticket shape ---------- */
.tk-wrap { filter: drop-shadow(0 0 .6px var(--muted)) drop-shadow(0 14px 22px rgb(0 0 0 / .1)); }
.tk { --r: 14px; --stub: 15rem; --stubh: 15.5rem; display: grid; grid-template-columns: 1fr var(--stub); border-radius: 22px; background: var(--surface); color: var(--ink);
  -webkit-mask: radial-gradient(circle var(--r) at calc(100% - var(--stub)) 0, transparent 97%, currentColor) top / 100% 51% no-repeat, radial-gradient(circle var(--r) at calc(100% - var(--stub)) 100%, transparent 97%, currentColor) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--r) at calc(100% - var(--stub)) 0, transparent 97%, currentColor) top / 100% 51% no-repeat, radial-gradient(circle var(--r) at calc(100% - var(--stub)) 100%, transparent 97%, currentColor) bottom / 100% 51% no-repeat; }
.tk-main { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.75rem; min-width: 0; }
.tk-org { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-type { padding: .25rem .7rem; border-radius: 999px; background: var(--ink); color: var(--canvas); font-size: .75rem; font-weight: 700; }
.tk-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.tk-when { display: flex; align-items: center; gap: 1rem; }
.tk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding-top: 1.1rem; border-top: 1px dashed var(--border-strong); }
.tk-k { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tk-v { display: block; margin-top: .15rem; font-weight: 600; overflow-wrap: anywhere; }
.tk-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1.5rem; border-left: 2px dashed var(--border-strong); }
.tk-code { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; letter-spacing: .1em; }
.qr { width: 168px; height: 168px; padding: 8px; border-radius: 12px; background: var(--x-on-photo); border: 1px solid var(--border); }
.qr svg { display: block; width: 100%; height: 100%; }
@media (max-width: 680px) {
  .tk { grid-template-columns: 1fr; grid-template-rows: auto var(--stubh);
    -webkit-mask: radial-gradient(circle var(--r) at 0 calc(100% - var(--stubh)), transparent 97%, currentColor) left / 51% 100% no-repeat, radial-gradient(circle var(--r) at 100% calc(100% - var(--stubh)), transparent 97%, currentColor) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--r) at 0 calc(100% - var(--stubh)), transparent 97%, currentColor) left / 51% 100% no-repeat, radial-gradient(circle var(--r) at 100% calc(100% - var(--stubh)), transparent 97%, currentColor) right / 51% 100% no-repeat; }
  .tk-stub { border-left: 0; border-top: 2px dashed var(--border-strong); padding: 1rem; }
  .tk-main { padding: 1.4rem; }
  .qr { width: 148px; height: 148px; }
}
@media print {
  .site-bar, .site-foot, .no-print, .skip-link, .toasts { display: none !important; }
  body { background: var(--x-on-photo); }
  .tk-wrap { break-inside: avoid; filter: none; margin-bottom: 1rem; }
  .rise { animation: none; }
  * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- sign in ---------- */
.login-art { position: relative; display: none; overflow: hidden; background: var(--x-night); min-height: 100%; }
@media (min-width: 1024px) { .login-art { display: block; } }
.demo-box { border: 1px dashed var(--accent-border); background: var(--accent-soft); border-radius: var(--radius-card); padding: 1rem 1.1rem; }
.demo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .9rem; padding: .5rem 1rem; background: var(--x-lime); color: var(--x-night); font-size: .85rem; font-weight: 500; text-align: center; }

/* ---------- app shell ---------- */
.app { --sbw: 16rem; display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; width: min(18rem, 86vw); padding: 1rem .75rem; background: var(--x-night); color: var(--x-on-photo); transform: translateX(-100%); transition: transform .25s ease, width .25s ease; border-right: 1px solid rgb(255 255 255 / .08); overflow-y: auto; }
.sidebar.is-open { transform: none; }
.sb-brand { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; padding: 0 .4rem; }
.sb-brand .btn-ghost { color: inherit; }
.sb-nav { display: grid; gap: .25rem; margin-top: 1.5rem; }
.sb-foot { margin-top: auto; padding-top: 1rem; }
.sb-link { display: flex; align-items: center; gap: .8rem; min-height: 46px; padding: 0 .85rem; border-radius: 12px; color: rgb(255 255 255 / .74); font-size: .93rem; font-weight: 500; transition: background .2s, color .2s, transform .15s; }
.sb-link:hover { background: rgb(255 255 255 / .09); color: var(--x-on-photo); }
.sb-link:active { transform: scale(.98); }
.sb-link.is-active { background: var(--x-lime); color: var(--x-night); font-weight: 700; }
.sb-link .icon { flex: none; width: 20px; height: 20px; }
.sb-scrim { position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / .55); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sidebar.is-open ~ .sb-scrim { opacity: 1; pointer-events: auto; }
.app-main { display: flex; flex: 1; flex-direction: column; min-width: 0; transition: margin .25s ease; }
@media (min-width: 1024px) {
  .sidebar { width: var(--sbw); transform: none; }
  .sb-scrim { display: none; }
  .app-main { margin-left: var(--sbw); }
  .app.is-collapsed { --sbw: 4.75rem; }
  .app.is-collapsed .sb-label { display: none; }
  .app.is-collapsed .sb-brand { justify-content: center; }
  .app.is-collapsed .sb-link { justify-content: center; padding: 0; }
}
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .5rem; height: 64px; padding: 0 .75rem; background: var(--canvas); border-bottom: 1px solid var(--border); }
@media (min-width: 640px) { .topbar { padding: 0 1.5rem; } }
.topbar-search { position: relative; flex: 1; min-width: 0; max-width: 26rem; margin-left: .25rem; }
.page { width: 100%; max-width: 84rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
@media (min-width: 768px) { .page { padding: 2.25rem 2rem 5rem; } }
.page-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }
@media (min-width: 640px) { .page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.page-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.02; letter-spacing: -.035em; }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.user-btn { display: flex; align-items: center; gap: .5rem; height: 46px; padding: 0 .5rem 0 .4rem; border-radius: 999px; cursor: pointer; transition: background .2s; }
.user-btn:hover, .menu[open] .user-btn { background: var(--surface-2); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 15.5rem; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 44px rgb(0 0 0 / .16); animation: pop .15s ease-out; }
.menu-item { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 .75rem; border-radius: 10px; font-size: .9rem; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s; }
.menu-item:hover { background: var(--surface-2); }
.menu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--x-lime); color: var(--x-night); font-size: .75rem; font-weight: 800; }

/* ---------- admin widgets ---------- */
.kpi { display: grid; gap: .5rem; padding: 1.25rem 1.35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: 0 1px 2px rgb(0 0 0 / .04); transition: box-shadow .25s, transform .25s; }
.kpi:hover { box-shadow: 0 12px 28px rgb(0 0 0 / .08); transform: translateY(-2px); }
.kpi-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-strong); }
.kpi-v { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; letter-spacing: -.04em; }
.tbl-wrap { overflow: auto; max-height: 72vh; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.card .tbl-wrap { border: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.tbl th { position: sticky; top: 0; z-index: 1; padding: .8rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl th.text-right { text-align: right; }
.tbl td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.row-actions { display: inline-flex; gap: .1rem; }
@media (max-width: 720px) {
  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; max-width: none !important; min-width: 0 !important; }
  .tbl-cards tr { padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
  .tbl-cards tbody tr:last-child { border-bottom: 0; }
  .tbl-cards td { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem 0; border: 0; text-align: right; }
  .tbl-cards td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left; }
  .tbl-cards td:first-child { justify-content: flex-start; text-align: left; padding-bottom: .6rem; }
  .tbl-cards td:first-child::before { display: none; }
  .tbl-cards tbody tr:hover td { background: transparent; }
  .tbl-cards td .meter { min-width: 7rem; }
}
.b-green { background: var(--accent-soft); color: var(--accent-strong); }
.b-amber { background: var(--warning-soft); color: var(--warning-strong); }
.b-gray { background: var(--surface-2); color: var(--muted); }
.meter { height: 6px; min-width: 5rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent-text); transition: width .6s ease; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--accent-text); animation: pulse-ring 1.6s ease-out infinite; }
#live.htmx-request { opacity: .85; }
.chart { display: block; width: 100%; height: auto; }
.chart .grid-l { stroke: var(--border); stroke-dasharray: 3 5; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .bar { fill: var(--accent-text); opacity: .88; transition: opacity .2s, fill .2s; }
.chart .bar-hit { fill: transparent; }
.chart .bar-g:hover .bar { fill: var(--ink); opacity: 1; }
dialog.modal { max-height: 92vh; overflow: auto; }
dialog.modal::backdrop { background: rgb(0 0 0 / .55); }

/* ---------- check-in ---------- */
.ck { display: flex; flex-direction: column; min-height: 100dvh; max-width: 34rem; margin: 0 auto; padding: 0 1rem 1.5rem; }
.ck-top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.ck-exit { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding-right: .75rem; font-weight: 600; }
.ck-cam { position: relative; flex: 1; min-height: 340px; max-height: 62vh; border-radius: 26px; overflow: hidden; background: var(--x-night); }
.ck-cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ck-frame { position: absolute; inset: 20% 15%; border: 3px solid var(--x-lime); border-radius: 26px; box-shadow: 0 0 0 999px rgb(0 0 0 / .35); opacity: 0; transition: opacity .3s; pointer-events: none; }
.ck-cam.is-live .ck-frame { opacity: 1; }
.ck-cam-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: inherit; }
.ck-cam.is-live .ck-cam-off { display: none; }
.ck-form { display: flex; gap: .6rem; margin-top: 1rem; }
.ck-input { flex: 1; min-width: 0; height: 56px; font-family: var(--font-mono); font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; }
.ck-form .btn { height: 56px; }
.ck-res { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: 2rem; text-align: center; animation: pop .22s ease-out; }
.ck-valid { background: var(--x-valid); color: var(--x-on-photo); }
.ck-already { background: var(--x-already); color: var(--x-night); }
.ck-missing { background: var(--x-missing); color: var(--x-on-photo); }
.ck-ic .icon { width: 7rem; height: 7rem; stroke-width: 1.6; }
.ck-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 13vw, 5rem); line-height: .92; letter-spacing: -.04em; text-wrap: balance; }
.ck-name { margin-top: 1rem; font-size: 1.8rem; font-weight: 700; }
.ck-sub { font-size: 1.05rem; opacity: .88; }
.ck-next { margin-top: 2rem; min-height: 58px; padding: 0 2.25rem; border-radius: 999px; background: var(--x-night); color: var(--x-on-photo); font-size: 1.05rem; font-weight: 700; transition: transform .15s; }
.ck-next:active { transform: scale(.96); }
