/* Rising North Festival — Ticket Tracker
   Palette and type lifted from risingnorthfestival.com */

:root {
  --bg-0: #0d0d0d;
  --bg-1: #111111;
  --bg-2: #171717;
  --bg-3: #1e1e1e;
  --red: #c8392b;
  --red-hover: #a82e22;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.5);
  --faint: rgba(255, 255, 255, 0.32);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --good: #4c9a5e;
  --good-dim: rgba(76, 154, 94, 0.14);
  --bad: #d0473a;
  --bad-dim: rgba(208, 71, 58, 0.14);
  --amber: #c98a2b;
  --amber-dim: rgba(201, 138, 43, 0.14);
  --radius: 6px;
  --max: 1180px;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-0);
  color: var(--white);
  font-family: 'Satoshi', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Clash Display', 'Satoshi', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { display: block; color: var(--red); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: 'Clash Display', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.header-nav { display: flex; align-items: center; gap: 8px; }

.pill {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px;
  white-space: nowrap;
}
.pill.live { color: var(--white); border-color: var(--border-strong); }
.pill.live b { color: var(--red); font-weight: 600; }

.btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--bg-3); }
.btn-primary { background: var(--red); border-color: var(--red); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--white); background: var(--bg-2); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ---------- layout blocks ---------- */

main { padding: 28px 0 72px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; max-width: 62ch; }

.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { min-width: 0; }
.section-head h2 { font-size: 15px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--white); }
.section-head .hint { font-size: 12.5px; color: var(--faint); }

.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.grid { display: grid; gap: 12px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.two-col { grid-template-columns: 1.35fr 1fr; align-items: start; }

/* ---------- KPI ---------- */

.kpi { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 16px; }
.kpi .label { font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.kpi .value {
  font-family: 'Clash Display', sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
.kpi .sub { font-size: 12px; color: var(--faint); margin-top: 4px; }
.kpi.accent .value { color: var(--red); }
.kpi .value.good { color: var(--good); }
.kpi .value.bad { color: var(--bad); }
.kpi .value.small { font-size: 19px; letter-spacing: 0; }

/* ---------- total sales / track cards ---------- */

.sales-cards { grid-template-columns: 1.25fr repeat(4, 1fr); }

.tcard {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tcard .thead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 15px;
}
.tcard .tlabel {
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tcard .ttarget { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tcard .tvalue {
  font-family: 'Clash Display', sans-serif;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.tcard .tmoney {
  font-size: 13px;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.tcard .trow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--faint);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 9px;
  font-variant-numeric: tabular-nums;
}
.tcard .trow + .trow { border-top: 0; margin-top: 4px; padding-top: 0; }
.tcard .tsub { font-size: 11.5px; margin-top: 2px; }
.tcard .tmoney { margin-bottom: 11px; }
.tcard .tsub + .trow, .tcard .tmoney + .trow { margin-top: auto; }
.tcard .tsub { margin-bottom: 11px; }
.tcard .tmoney:has(+ .tsub) { margin-bottom: 0; }
.tcard .trow b { color: var(--white); font-weight: 500; }
.tcard.total { background: var(--bg-2); }
.tcard.total .tvalue { font-size: 33px; color: var(--red); }
.tcard .swatch { display: inline-block; width: 14px; border-top: 2px solid; margin-right: 6px; vertical-align: middle; }
.tvalue.good, .tmoney.good, .trow .good { color: var(--good); }
.tvalue.bad, .tmoney.bad, .trow .bad { color: var(--bad); }

/* ---------- banners ---------- */

.banner {
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 13.5px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  background: var(--bg-2);
  margin-bottom: 14px;
}
.banner strong { font-weight: 600; }
.banner.alert { border-color: rgba(208, 71, 58, 0.5); background: var(--bad-dim); }
.banner.ok { border-color: rgba(76, 154, 94, 0.4); background: var(--good-dim); }
.banner.info { border-color: var(--border-strong); }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; margin-top: 7px; }
.banner.alert .dot { background: var(--bad); }
.banner.ok .dot { background: var(--good); }
.banner.info .dot { background: var(--muted); }

/* ---------- chart ---------- */

.chart-card { padding: 18px 18px 10px; }
.chart-box { position: relative; height: 380px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 8px; font-size: 12px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 16px; height: 0; border-top-width: 2px; border-top-style: solid; display: inline-block; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: right;
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
thead th:first-child, tbody td:first-child { text-align: left; }
tbody td {
  text-align: right;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr.is-today td { background: rgba(200, 57, 43, 0.08); }
tbody tr.is-future td { color: var(--faint); }
tbody tr.total-row td { border-top: 1px solid var(--border-strong); font-weight: 600; }
td.pos { color: var(--good); }
td.neg { color: var(--bad); }
td.name { color: var(--white); }
.tag {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}
.tag.good { color: var(--good); border-color: rgba(76, 154, 94, 0.45); }
.tag.ok { color: var(--amber); border-color: rgba(201, 138, 43, 0.45); }
.tag.bad { color: var(--bad); border-color: rgba(208, 71, 58, 0.45); }

/* ---------- progress bars ---------- */

.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 14px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-row .bar-label { font-size: 13px; }
.bar-row .bar-num { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 100px; background: var(--bg-3); overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--red); border-radius: 100px; }
.bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--white); opacity: 0.55; }

/* ---------- forms ---------- */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field .help { font-size: 12px; color: var(--faint); margin-top: 6px; }
input[type='text'], input[type='number'], input[type='password'], input[type='date'], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 14.5px;
  color: var(--white);
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop:hover, .drop.over { border-color: var(--red); background: rgba(200, 57, 43, 0.05); }
.drop strong { color: var(--white); display: block; font-size: 15px; margin-bottom: 4px; font-family: 'Clash Display', sans-serif; }

.toast { font-size: 13px; }
.toast.good { color: var(--good); }
.toast.bad { color: var(--bad); }

/* ---------- login ---------- */

.login-shell { min-height: 78vh; display: grid; place-items: center; padding: 40px 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 21px; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

/* ---------- misc ---------- */

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.note { font-size: 12.5px; color: var(--faint); margin-top: 12px; line-height: 1.5; }
.stack > * + * { margin-top: 14px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: sk 1.4s ease infinite; border-radius: 4px; color: transparent !important; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty { text-align: center; padding: 34px 16px; color: var(--faint); font-size: 13.5px; }

.site-footer { border-top: 1px solid var(--border); padding: 22px 0 40px; font-size: 12px; color: var(--faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (max-width: 1080px) {
  .sales-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-cards .tcard.total { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 23px; }
  .chart-box { height: 300px; }
}
@media (max-width: 620px) {
  .header-nav .pill { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .label { font-size: 10px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 3px; }
  .kpi .value { font-size: 25px; }
  .sales-cards { grid-template-columns: 1fr; }
  .tcard .tvalue { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
  main { padding-top: 20px; }
}
