:root {
  --bg: #0f1115; --card: #181b22; --line: #2a2f3a; --text: #f2f3f5; --muted: #9aa1ad;
  --accent: #f5b800; --danger: #ff5a5f; --ok: #22c55e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
.wrap { max-width: 460px; margin: 0 auto; padding: 20px 16px 40px; }
.wrap.wide { max-width: 980px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
h1 { font-size: 1.35rem; margin: 0 0 10px; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.warn { color: var(--accent); }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #111; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; }
.brand-club { font-weight: 800; }
.brand-sub { color: var(--muted); font-size: .85rem; }
.match-line { margin-bottom: 14px; color: var(--muted); }
.match-line strong { color: var(--text); }

label { display: block; font-size: .9rem; color: var(--muted); margin: 0 0 6px; }
input[type=tel], input[type=text], input[type=password], input[type=datetime-local], input:not([type]), select {
  width: 100%; padding: 14px; font-size: 1.1rem; border-radius: 12px; border: 1px solid var(--line);
  background: #0c0e12; color: var(--text); margin-bottom: 14px;
}
input.code { letter-spacing: .5em; text-align: center; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
input[type=file] { margin: 6px 0 12px; color: var(--muted); max-width: 100%; }
button { width: 100%; padding: 15px; font-size: 1.05rem; font-weight: 700; border: 0; border-radius: 12px; background: var(--accent); color: #111; cursor: pointer; }
button.link { background: none; color: var(--muted); width: auto; padding: 6px 0; font-weight: 500; font-size: .9rem; text-decoration: underline; }
button.link.danger { color: var(--danger); }
form.inline { text-align: center; margin-top: 8px; }
.alert { background: rgba(255,90,95,.12); border: 1px solid rgba(255,90,95,.4); color: #ffb3b5; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.note { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.35); color: #b9f5cf; padding: 12px; border-radius: 10px; margin-bottom: 14px; }
.dev { background: #3b2f00; border: 1px dashed var(--accent); padding: 10px; border-radius: 10px; margin-bottom: 14px; font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); margin: 6px 0 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.rules { padding-left: 18px; color: var(--muted); }
.photo.preview { width: 160px; height: 160px; object-fit: cover; border-radius: 14px; display: block; margin: 0 auto 12px; }

/* ---------- Propustka ---------- */
.pass-page { background: #000; }
.pass { --mc: #e63946; max-width: 440px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: #fff; color: #111; position: relative; overflow: hidden; }
.pass-band { position: relative; height: 128px; background: var(--mc); overflow: hidden; }
.stripes { position: absolute; inset: -40px; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.22) 0 14px, transparent 14px 28px); animation: slide 1.6s linear infinite; }
@keyframes slide { to { transform: translateX(39.6px); } }
.band-text { position: relative; display: flex; flex-direction: column; padding: 16px 20px 0; color: var(--mink, #fff); font-weight: 900; letter-spacing: .04em; }
.band-text span:first-child { font-size: 1.25rem; }
.band-text span:last-child { font-size: .8rem; opacity: .95; }
.pass-body { padding: 0 20px 24px; text-align: center; }
.photo-wrap { position: relative; width: 220px; height: 220px; margin: -52px auto 14px; }
.photo { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; border: 6px solid #fff; box-shadow: 0 6px 24px rgba(0,0,0,.25); background: #ddd; }
.nophoto { display: grid; place-items: center; color: #777; }
.pulse { position: absolute; inset: -6px; border-radius: 24px; border: 4px solid var(--mc); animation: pulse 2s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 50% { transform: scale(1.04); opacity: .35; } }
.pname { font-size: 1.7rem; margin: 6px 0 2px; line-height: 1.15; }
.pcat { color: #555; font-weight: 600; margin-bottom: 14px; }
.clock { display: inline-block; font-size: 3rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1; background: var(--mc); color: var(--mink, #fff); padding: 10px 20px; border-radius: 16px; }
.pmatch { color: #444; margin: 8px 0 16px; font-weight: 600; }
.timer-bar { height: 10px; border-radius: 6px; background: #eee; overflow: hidden; }
.timer-bar div { height: 100%; background: var(--mc); transition: width .25s linear; }
.timer-text { margin-top: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pfoot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; text-align: left; }
.pfoot .muted { color: #777; }
.pno { font-size: 1.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.qr { width: 96px; height: 96px; }
.qr img, .qr canvas { width: 96px; height: 96px; }
.qr-fallback { display: grid; place-items: center; width: 100%; height: 100%; border: 2px dashed #bbb; border-radius: 10px; font-weight: 800; letter-spacing: .1em; color: #555; }
.void { display: none; }
.expired .pass-band, .expired .pass-body { filter: grayscale(1); opacity: .75; }
.expired .stripes, .expired .pulse { animation: none; }
.expired .void { display: grid; place-items: center; position: absolute; inset: 0; font-size: 3.4rem; font-weight: 900; color: #e00000; transform: rotate(-24deg); text-shadow: 0 0 6px #fff, 0 0 2px #fff; pointer-events: none; letter-spacing: .05em; }

/* ---------- Kontrola ---------- */
.verify .verdict { font-size: 2.4rem; font-weight: 900; }
.verify.ok .verify-card { border-color: var(--ok); }
.verify.ok .verdict { color: var(--ok); }
.verify.expired .verdict, .verify.old .verdict, .verify.bad .verdict { color: var(--danger); }
.verify-card { text-align: center; border-width: 3px; }
.vphoto { width: 200px; height: 200px; margin: 10px auto; display: block; }

/* ---------- Admin ---------- */
.admin-top { display: flex; justify-content: space-between; align-items: center; }
.admin-top .brand { margin: 0; }
.tabs { display: flex; gap: 6px; margin: 16px 0; }
.tabs a { padding: 10px 16px; border-radius: 10px; background: var(--card); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.tabs a.on { background: var(--accent); color: #111; font-weight: 700; border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; }
.grid label { margin: 0; }
.grid input { margin: 6px 0 0; font-size: 1rem; padding: 10px; }
.grid.tight { grid-template-columns: 2fr 1.3fr 1fr auto auto; gap: 6px; align-items: center; }
.grid.tight input { margin: 0; }
.grid.tight .check { margin: 0; white-space: nowrap; }
.grid button, .small-btn { padding: 10px 14px; font-size: .95rem; width: auto; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input[type=file] { margin: 0; }
.row select { width: auto; flex: 1; margin: 0; font-size: 1rem; padding: 10px; }
.btn-sec { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
details { margin-top: 14px; }
summary { cursor: pointer; color: var(--muted); }
.plist { display: flex; flex-direction: column; gap: 10px; }
.pitem { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.pitem.inactive { opacity: .5; }
.pthumb { position: relative; width: 72px; height: 72px; flex: none; border-radius: 10px; overflow: hidden; background: #0c0e12; display: grid; place-items: center; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb .nophoto { font-size: .7rem; color: var(--accent); text-align: center; }
.lock { position: absolute; right: 2px; bottom: 0; font-size: .8rem; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
@media (max-width: 640px) {
  .grid.tight { grid-template-columns: 1fr 1fr; }
  .grid.tight input[name=name] { grid-column: 1 / -1; }
}
.filters { margin-bottom: 12px; }
.filters a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: .9rem; }
.filters a.on { border-color: var(--accent); color: var(--accent); }
.badge { position: absolute; right: 3px; bottom: 3px; font-size: .65rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.badge.ok { background: var(--ok); color: #04210f; }
.badge.new { background: var(--accent); color: #111; }
.danger-btn { background: var(--danger); color: #fff; }
