:root, [data-theme="dark"] {
  --bg: #12121a;
  --bg-accent: #2a2438;
  --card: #1a1a24;
  --card-top: #1e1e2a;
  --border: #2a2a38;
  --text: #f4f4f7;
  --muted: #9a9aab;
  --primary: #e8b923;
  --primary-fg: #1a1400;
  --good: #34d399;
  --bad: #f87171;
  --surface: #101018;
  --header: rgba(26,26,36,.92);
  --ticket-bg: #222230;
  --radius: 1rem;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-accent: #e8ecf4;
  --card: #ffffff;
  --card-top: #ffffff;
  --border: #d7dbe3;
  --text: #171a21;
  --muted: #667085;
  --primary: #c9a227;
  --primary-fg: #1a1400;
  --good: #0f766e;
  --bad: #b91c1c;
  --surface: #eef1f6;
  --header: rgba(255,255,255,.94);
  --ticket-bg: #eef1f6;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 50% -10%, var(--bg-accent) 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  transition: background .25s ease, color .2s ease;
}
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 480px; margin: 0 auto; padding: 0 1rem 5.5rem; }
.wrap-account { padding-bottom: 1rem; }
.site-footer {
  max-width: 480px;
  margin: .5rem auto 5.5rem;
  padding: .25rem 0 1.25rem;
}
.account-footer {
  margin-top: 1.25rem;
}
.site-footer-inner {
  text-align: center;
  padding: 1rem .85rem;
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.footer-links a {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  padding: .25rem .15rem;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.footer-links a:hover,
.footer-links a.active { color: var(--primary); }
.footer-sep { color: var(--muted); opacity: .55; }
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}
.content-page .content-body {
  color: var(--text);
  font-size: .95rem;
  line-height: 1.55;
}
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .85rem 1rem;
  background: var(--header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: .15rem; }
.nav a, .nav button, .theme-toggle {
  color: var(--muted); font-size: .85rem; font-weight: 600;
  background: none; border: 0; cursor: pointer; padding: .35rem .5rem;
  font: inherit;
}
.nav a.active { color: var(--primary); }
.theme-toggle {
  border: 1px solid var(--border);
  border-radius: .65rem;
  min-width: 2.4rem;
}
.lang-switch {
  display: inline-flex; align-items: center; gap: .15rem;
  border: 1px solid var(--border); border-radius: .65rem; padding: .15rem;
  background: var(--surface);
}
.lang-switch a {
  color: var(--muted); font-size: .72rem; font-weight: 800;
  padding: .28rem .42rem; border-radius: .5rem; text-decoration: none;
}
.lang-switch a.active {
  color: var(--primary-fg); background: var(--primary);
}
.card {
  background: linear-gradient(180deg, var(--card-top), var(--card));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + .25rem);
  overflow: hidden;
  margin-top: 1rem;
}
.card .pad { padding: 1rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 700; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: 999px;
  padding: .25rem .65rem; margin: 1rem 1rem 0;
}
.badge.soft { margin: 0 0 .4rem; }
h1 { font-size: 1.75rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 .25rem; }
.muted { color: var(--muted); font-size: .85rem; }
.subtitle { color: var(--good); font-weight: 600; margin: .15rem 0 .75rem; }
.label-caps {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem;
}
.hero-img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  background: var(--surface); display: block;
}
.hero-fallback {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
}
.countdown {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .75rem 0;
}
.countdown div {
  background: var(--surface); border: 1px solid var(--border); border-radius: .75rem;
  text-align: center; padding: .55rem .25rem;
}
.countdown strong { display: block; color: var(--primary); font-size: 1.15rem; }
.countdown span { font-size: .65rem; color: var(--muted); letter-spacing: .06em; }
.bar {
  height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin: .4rem 0;
}
.bar > i { display: block; height: 100%; background: var(--primary); }
.fill-pct { color: var(--good); font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; border: 0; border-radius: .85rem; padding: .85rem 1rem;
  font-weight: 800; font-size: 1rem; cursor: pointer;
  background: var(--primary); color: var(--primary-fg);
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary {
  background: transparent; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
}
.btn.danger { background: #7f1d1d; color: #fecaca; }
[data-theme="light"] .btn.danger { background: #b91c1c; color: #fff; }
.btn.good { background: #065f46; color: #d1fae5; }
[data-theme="light"] .btn.good { background: #0f766e; color: #fff; }
.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.grid-tickets {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem;
}
.ticket {
  aspect-ratio: 1; border-radius: .65rem; border: 1px solid var(--border);
  background: var(--ticket-bg); color: var(--text); font-weight: 700; cursor: pointer;
}
.ticket.available:hover { border-color: var(--primary); }
.ticket.selected { background: color-mix(in srgb, var(--primary) 20%, transparent); border-color: var(--primary); color: var(--primary); }
.ticket.sold, .ticket.locked { background: #3a1d1d; color: #fca5a5; cursor: not-allowed; opacity: .75; }
[data-theme="light"] .ticket.sold,
[data-theme="light"] .ticket.locked { background: #fee2e2; color: #991b1b; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .75rem; color: var(--muted); }
.dot { width: .7rem; height: .7rem; border-radius: .2rem; display: inline-block; margin-right: .3rem; vertical-align: middle; }
.form label { display: block; font-size: .8rem; font-weight: 600; margin: .75rem 0 .3rem; }
.form input, .form textarea, .form select {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: .75rem; padding: .75rem .85rem; font: inherit;
}
.check-row {
  display: flex !important; align-items: center; gap: .55rem;
  margin: .55rem 0 !important; font-weight: 600;
}
.check-row input { width: auto; margin: 0; }
.flash {
  margin: 1rem 0 0; padding: .75rem .9rem; border-radius: .75rem; font-size: .9rem;
}
.flash.ok { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 30%, transparent); }
.flash.err { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: min(480px, 100%);
  display: flex; align-items: center; justify-content: space-around;
  gap: .35rem;
  background: #f8f9fa;
  border-top: 1px solid #e5e7eb;
  padding: .65rem .85rem calc(.7rem + env(safe-area-inset-bottom));
  border-radius: 1.15rem 1.15rem 0 0;
  box-shadow: 0 -6px 20px rgba(16, 24, 40, .06);
}
[data-theme="dark"] .bottom-nav {
  background: #1a1a24;
  border-top-color: var(--border);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .25);
}
.bottom-nav a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #607d8b;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  background: transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
[data-theme="dark"] .bottom-nav a { color: #9aa3b2; }
.bottom-nav a.active {
  color: #b8860b;
  background: #fff8e1;
  border-color: #ffe082;
}
[data-theme="dark"] .bottom-nav a.active {
  color: var(--primary);
  background: rgba(232, 185, 35, .14);
  border-color: rgba(232, 185, 35, .45);
}
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: .65rem .4rem; text-align: left; }
.pill {
  display: inline-block; font-size: .7rem; font-weight: 700; padding: .15rem .5rem;
  border-radius: 999px; border: 1px solid var(--border);
}
.pill.pending { color: #fbbf24; border-color: rgba(251,191,36,.4); }
.pill.approved { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.rejected { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.admin-nav a {
  padding: .45rem .75rem; border-radius: .65rem; border: 1px solid var(--border);
  color: var(--muted); font-size: .85rem; font-weight: 600;
}
.admin-nav a.active { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: .9rem; padding: .9rem;
}
.stat b { display: block; font-size: 1.5rem; }
.blocked-screen {
  min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.25rem;
}
.section-list { margin-top: 1.5rem; }
.section-list > h2 { margin-bottom: .25rem; }
.list-card { display: grid; grid-template-columns: 96px 1fr; gap: 0; align-items: stretch; }
.list-thumb {
  width: 96px; height: 100%; min-height: 96px; object-fit: cover; background: var(--surface);
}
.muted-card { opacity: .92; }
.amount { font-size: 1.6rem; font-weight: 900; color: var(--primary); margin: 0; }
.bank-block {
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.bank-block:last-of-type { border-bottom: 0; }
.bank-number { margin: .2rem 0; font-size: 1.15rem; font-weight: 800; }
.bank-admin-list { display: grid; gap: 1rem; margin: 1rem 0; }
.bank-admin-item {
  border: 1px solid var(--border);
  border-radius: .9rem;
  padding: .85rem;
  background: var(--surface);
}
.form-grid { display: grid; gap: .25rem; }
.nav-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.1rem; height: 1.1rem; margin-left: .25rem; padding: 0 .25rem;
  border-radius: 999px; background: var(--primary); color: var(--primary-fg);
  font-size: .65rem; font-weight: 800;
}
.notif-banners { max-width: 480px; margin: 0 auto; padding: .75rem 1rem 0; }
.notif-banner {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: 1rem; padding: .75rem; margin-bottom: .65rem; overflow: hidden;
}
.notif-banner img {
  width: 64px; height: 64px; object-fit: cover; border-radius: .65rem; background: var(--surface);
}
.notif-banner-body { min-width: 0; }
.notif-banner-body strong { display: block; margin-bottom: .15rem; }
.notif-banner-body p { margin: 0; color: var(--muted); font-size: .85rem; }
.notif-link { display: inline-block; margin-top: .35rem; font-size: .8rem; font-weight: 700; }
.notif-dismiss {
  border: 0; background: transparent; color: var(--muted); font-size: 1.25rem;
  cursor: pointer; line-height: 1; padding: .2rem .35rem;
}
.notif-dismiss.text { font-size: .8rem; font-weight: 700; }
.notif-messages { max-width: 480px; margin: 0 auto; padding: 0 1rem; }
.notif-messages .card { margin-top: .75rem; }
.notif-inbox-item { margin-top: 1rem; }
.notif-inbox-item.unread {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: inset 3px 0 0 var(--primary);
}
.pill.broadcast { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.pill.info { color: var(--muted); }

/* Notification bell + slide-over panel */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: .7rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  z-index: 40;
  padding: 0;
}
.notif-bell-icon { font-size: 1.05rem; line-height: 1; }
.notif-bell-dot {
  position: absolute;
  top: -.15rem;
  right: -.2rem;
  margin: 0;
  pointer-events: none;
}
.notif-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 120;
  display: none;
  pointer-events: none;
}
.notif-overlay.is-open {
  display: block;
  pointer-events: auto;
}
.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100vw, 380px);
  height: 100dvh;
  background: var(--card);
  border-left: 1px solid var(--border);
  z-index: 130;
  display: none;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.28);
  pointer-events: none;
}
.notif-panel.is-open {
  display: flex;
  pointer-events: auto;
  animation: notif-slide .22s ease;
}
.notif-panel[hidden],
.notif-overlay[hidden] {
  display: none !important;
}
@keyframes notif-slide {
  from { transform: translateX(18px); opacity: .6; }
  to { transform: translateX(0); opacity: 1; }
}
body.notif-open { overflow: hidden; }
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--header);
  position: relative;
  z-index: 2;
}
.notif-close, .notif-back {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}
.notif-close:active, .notif-back:active { opacity: .8; }
.notif-back {
  width: auto;
  height: auto;
  min-height: 2.2rem;
  font-size: .9rem;
  font-weight: 700;
  align-self: flex-start;
  margin: .75rem 1rem 0;
  padding: .35rem .75rem;
}
.notif-panel-list {
  flex: 1;
  overflow: auto;
  padding: .5rem;
  -webkit-overflow-scrolling: touch;
}
.notif-empty { padding: 1.25rem .85rem; }
.notif-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: .7rem;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: .85rem;
  padding: .65rem;
  cursor: pointer;
  font: inherit;
}
.notif-item:hover { background: var(--surface); }
.notif-item.unread {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}
.notif-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: .65rem;
  object-fit: cover;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--primary);
}
.notif-item-thumb.placeholder { border: 1px solid var(--border); }
.notif-item-text { min-width: 0; display: grid; gap: .15rem; }
.notif-item-text strong {
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-text small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-hint {
  margin: .35rem .65rem .55rem;
  font-size: .78rem;
}
.notif-open-hint {
  display: inline-block;
  margin-top: .2rem;
  font-size: .72rem;
  font-weight: 800;
  color: var(--primary);
}
.notif-payload { display: none !important; }
.notif-panel-detail {
  flex: 1;
  overflow: auto;
  padding: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
  display: none;
}
.notif-panel-detail.is-visible {
  display: flex !important;
  flex-direction: column;
}
.notif-panel-list.is-hidden { display: none !important; }
.notif-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .75rem 1rem 0;
}
.notif-detail-body {
  padding: 0 1rem 1rem;
  flex: 1;
}
.notif-detail-body h3 { margin: .35rem 0 .25rem; font-size: 1.2rem; }
.notif-detail-message {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: .95rem;
  margin: .75rem 0 1rem;
  word-break: break-word;
}
.notif-detail-image-wrap {
  display: block;
  margin: .85rem 0;
  border-radius: .9rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  z-index: 2;
}
.notif-detail-image {
  display: block;
  width: 100%;
  max-height: min(55vh, 420px);
  object-fit: contain;
  background: #0b0b10;
}
.notif-detail-body .btn { position: relative; z-index: 2; width: 100%; }

/* Admin helpers */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  overflow-x: hidden;
}
.admin-shell .card { max-width: 100%; }
.admin-shell .form {
  max-height: none;
}
.admin-settings-scroll {
  max-height: min(70vh, 640px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: .25rem;
}
.detail-list {
  display: grid;
  gap: .65rem;
  margin: 0;
}
.detail-list > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: .5rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--border);
}
.detail-list dt {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}
.detail-list dd { margin: 0; font-weight: 600; word-break: break-word; }
.screenshot-frame {
  display: block;
  border: 1px solid var(--border);
  border-radius: .9rem;
  overflow: hidden;
  background: var(--surface);
}
.screenshot-frame img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #0b0b10;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: .45rem 0;
  font-size: .9rem;
  line-height: 1.35;
}
.check-row input { margin-top: .2rem; }
@media (max-width: 720px) {
  .admin-shell { padding: .75rem .75rem 2.5rem; }
  .admin-nav { gap: .35rem; }
  .admin-nav a { padding: .4rem .55rem; font-size: .78rem; }
  .detail-list > div { grid-template-columns: 1fr; gap: .15rem; }
  .table { font-size: .78rem; }
  .table th, .table td { padding: .55rem .3rem; }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .grid-tickets { grid-template-columns: repeat(8, 1fr); }
  .form-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .list-card { grid-template-columns: 140px 1fr; }
  .list-thumb { width: 140px; }
}
