/* =====================================================================
   Young Warrior Football Academy: monochrome UI
   Black and white from the crest; red (the helmet's eyes) only as a signal.
   ===================================================================== */
/* Self-hosted fonts (SIL Open Font License), no third-party requests */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/chakra-petch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/chakra-petch-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Light theme (default): white-dominant. Dark values below follow the device setting. */
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --surface-3: #ebebe8;
  --line: #e3e3df;
  --line-strong: #cbcbc6;
  --text: #0b0b0b;
  --text-2: #353535;
  --muted: #676767;
  --placeholder: #9a9a9a;
  --input-bg: #ffffff;
  --input-focus: #ffffff;
  --ink: #0a0a0a;            /* primary fill (buttons, active nav, hero) */
  --on-ink: #ffffff;         /* text on --ink */
  --ink-hover: #2b2b2b;
  --on-ink-muted: #a9a9a9;
  --ink-soft: rgba(10, 10, 10, .12);
  --sidebar-bg: #ffffff;
  --header-bg: rgba(244, 244, 242, .86);
  --shadow: 0 12px 32px rgba(0, 0, 0, .12);
  --red: #d7141a;
  --red-soft: #fdecec;
  --red-text: #b3121a;
  --red-line: #f1c2c4;
  --red-callout: #6e0b10;
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar: 264px;
  --font-display: "Chakra Petch", "Barlow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050505;
    --surface: #0e0e0e;
    --surface-2: #161616;
    --surface-3: #1f1f1f;
    --line: #262626;
    --line-strong: #3a3a3a;
    --text: #f5f5f5;
    --text-2: #c9c9c9;
    --muted: #8f8f8f;
    --placeholder: #6a6a6a;
    --input-bg: #161616;
    --input-focus: #1f1f1f;
    --ink: #ffffff;
    --on-ink: #000000;
    --ink-hover: #dcdcdc;
    --on-ink-muted: #4f4f4f;
    --ink-soft: rgba(255, 255, 255, .18);
    --sidebar-bg: #000000;
    --header-bg: rgba(5, 5, 5, .86);
    --shadow: 0 12px 40px rgba(0, 0, 0, .6);
    --red: #e5141b;
    --red-soft: #2a0809;
    --red-text: #ff6b70;
    --red-line: #5b1416;
    --red-callout: #ffd6d7;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--text-2); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; letter-spacing: .01em; line-height: 1.15; }
h1 { font-size: clamp(26px, 3vw, 34px); }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.upper { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; }
.num { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--ink); color: var(--on-ink); }

/* ---------------------------------------------------------------- splash */
.splash {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  background: #000; color: #fff; overflow: hidden; position: relative;
}
.splash::before {
  content: ""; position: absolute; inset: -50%;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.025) 46px 48px);
  animation: drift 14s linear infinite;
}
.splash-inner { position: relative; display: grid; justify-items: center; gap: 28px; padding: 24px; }
.splash-logo {
  width: min(62vw, 340px); opacity: 0; transform: scale(.86);
  animation: logo-in 1s var(--ease) .15s forwards;
}
.splash-logo-wrap { position: relative; }
.splash-logo-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  mix-blend-mode: overlay; transform: translateX(-120%);
  animation: shine 1.4s ease-in-out 1s forwards;
}
.splash-bar { width: 180px; height: 2px; background: #262626; border-radius: 2px; overflow: hidden; opacity: 0; animation: fade-in .4s ease .7s forwards; }
.splash-bar span { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); animation: load 1.7s var(--ease) .8s forwards; }
.splash-tag { font-family: var(--font-display); letter-spacing: .4em; font-size: 12px; color: #8f8f8f; opacity: 0; animation: fade-in .6s ease 1.1s forwards; text-transform: uppercase; }
.splash.is-leaving .splash-inner { animation: leave .45s ease forwards; }
@keyframes logo-in { to { opacity: 1; transform: scale(1); } }
@keyframes shine { to { transform: translateX(120%); } }
@keyframes load { to { transform: scaleX(1); } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes leave { to { opacity: 0; transform: scale(1.04); } }
@keyframes drift { to { transform: translateX(96px); } }

/* ---------------------------------------------------------------- auth pages */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.auth-brand {
  position: relative; display: grid; place-items: center; padding: 48px; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 40%, #171717 0%, #000 70%);
}
.auth-brand::before {
  content: ""; position: absolute; inset: -40%;
  background: repeating-linear-gradient(115deg, transparent 0 46px, rgba(255,255,255,.03) 46px 48px);
}
.auth-brand-inner { position: relative; display: grid; justify-items: center; gap: 28px; text-align: center; animation: rise .7s var(--ease) both; }
.auth-brand img { width: min(80%, 380px); }
.auth-motto { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.auth-motto em { font-style: normal; color: #8f8f8f; }
.auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 22px; animation: rise .6s var(--ease) .1s both; }
.auth-card h1 { font-size: 32px; text-transform: uppercase; }
.auth-mobile-logo { display: none; }
.auth-foot { color: var(--muted); font-size: 13px; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--sidebar-bg);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; text-decoration: none; }
.brand img { width: 50px; height: 50px; object-fit: contain; padding: 5px; border-radius: 12px; background: #000; }
.brand-text { display: grid; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; }
.brand-text span { font-size: 11px; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }
.nav { display: grid; gap: 2px; margin-top: 6px; }
.nav-label { color: var(--muted); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; padding: 16px 12px 6px; font-weight: 600; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px;
  color: var(--text-2); text-decoration: none; border-radius: var(--radius-sm); font-weight: 500;
  transition: background .2s, color .2s;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { background: var(--ink); color: var(--on-ink); font-weight: 600; }
.nav a.is-active::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.me-text { display: grid; line-height: 1.2; min-width: 0; }
.me-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 14px clamp(16px, 3vw, 36px); background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .menu-toggle { display: none; }
.content { padding: clamp(16px, 3vw, 36px); display: grid; gap: 24px; align-content: start; flex: 1; animation: rise .45s var(--ease) both; }
.bottom-nav { display: none; }
.scrim { display: none; }

/* ---------------------------------------------------------------- page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { font-size: 18px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 18px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 4px; position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s; }
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 14px; }
.stat-note { font-size: 13px; color: var(--text-2); }
.stat-invert { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.stat-invert .stat-label, .stat-invert .stat-note { color: var(--on-ink-muted); }
.delta-up { color: var(--ink); }
.delta-down { color: var(--red-text); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-hover); color: var(--on-ink); border-color: var(--ink-hover); }
.btn-danger { border-color: var(--red-line); color: var(--red-text); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------------------------------------------------------------- forms */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; align-content: start; }
.field label, .label { font-weight: 600; font-size: 14px; color: var(--text-2); }
.hint { font-size: 13px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--input-bg); border: 1px solid var(--line-strong); color: var(--text);
  font: 400 16px/1.4 var(--font-body); transition: border-color .2s, background .2s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); background: var(--input-focus); box-shadow: 0 0 0 3px var(--ink-soft); }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.is-invalid { border-color: var(--red) !important; }
.field-error { color: var(--red-text); font-size: 13px; }
.input-group { position: relative; }
.input-group .input { padding-right: 52px; }
.input-group .btn-icon { position: absolute; right: 2px; top: 1px; border: 0; min-height: 44px; color: var(--muted); }
.input-group .btn-icon:hover { color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding-top: 4px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 16px; margin: 0; }
.fieldset legend { font-family: var(--font-display); font-weight: 700; padding: 0 8px; text-transform: uppercase; letter-spacing: .05em; font-size: 15px; }

/* rating pills (radio) */
.rating { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label {
  display: grid; place-items: center; min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-weight: 700; font-size: 20px; cursor: pointer; color: var(--text-2);
  transition: all .18s var(--ease); user-select: none;
}
.rating label:hover { border-color: var(--ink); color: var(--ink); }
.rating input:checked + label { background: var(--ink); color: var(--on-ink); border-color: var(--ink); transform: translateY(-2px); }
.rating input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.rating-sm label { min-height: 40px; font-size: 17px; }

/* chips (checkbox / radio) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: all .18s; user-select: none;
}
.chip span:hover { border-color: var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip-danger input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .t-actions { text-align: right; white-space: nowrap; }
.table .t-actions form { display: inline; }
.cell-person { display: flex; align-items: center; gap: 12px; }
.cell-person a { text-decoration: none; font-weight: 600; }
.cell-person small { display: block; color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 160px; flex: 1 1 160px; max-width: 280px; }
.search { position: relative; flex: 2 1 220px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; color: var(--muted); }
.search .input { padding-left: 42px; max-width: none; }

/* ---------------------------------------------------------------- badges, avatars */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; border: 1px solid transparent; }
.badge-ok { background: var(--ink); color: var(--on-ink); }
.badge-warn { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.badge-danger { background: var(--red-soft); color: var(--red-text); border-color: var(--red-line); }
.badge-muted { color: var(--muted); border-color: var(--line-strong); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); border: 1px solid var(--line-strong); font-family: var(--font-display); font-weight: 700; font-size: 14px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-xl { width: 104px; height: 104px; font-size: 34px; border-width: 2px; border-color: var(--ink); }
.avatar-invert { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* ---------------------------------------------------------------- lists */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s; }
.list-item:first-child { border-top: 0; }
a.list-item:hover { background: var(--surface-2); color: inherit; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.list-item .sub { color: var(--muted); font-size: 14px; }
.chev { width: 18px; height: 18px; color: var(--muted); flex: none; }

/* session card */
.session-card { display: grid; gap: 14px; position: relative; overflow: hidden; }
.session-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid var(--line); }
.session-time { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
.session-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.progress { display: grid; gap: 6px; }
.bar { width: 100%; height: 6px; }
.bar-track { fill: var(--surface-3); }
.bar-fill { fill: var(--ink); transition: width .6s var(--ease); }
.bar-red .bar-fill { fill: var(--red); }

/* score rows (report) */
.score-row { display: grid; gap: 6px; }
.score-row .row { justify-content: space-between; }
.score-big { font-family: var(--font-display); font-size: 56px; font-weight: 700; line-height: .9; }
.indicator { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.indicator:first-child { border-top: 0; }
.indicator .reason { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-strong); }
.dots i.on { background: var(--ink); border-color: var(--ink); }

/* evaluation form indicator row */
.ind-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr); gap: 10px 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.ind-row:first-of-type { border-top: 0; }
.ind-row .reason-field { grid-column: 2; }
.ind-row .reason-field[hidden] { display: none; }
.ind-prev { font-size: 13px; color: var(--muted); }
.scale-legend { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.scale-legend b { color: var(--ink); font-family: var(--font-display); margin-right: 6px; }

/* attendance grid */
.att-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.att-row:first-child { border-top: 0; }
.att-row .chips { flex-wrap: nowrap; gap: 6px; }
.att-row .chip span { min-height: 36px; padding: 0 12px; }

/* charts */
.chart { width: 100%; height: auto; overflow: visible; }
.chart-radar { max-width: 440px; margin: 0 auto; }
.chart-trend { max-height: 260px; }
.slot { visibility: hidden; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-grid-outer { stroke: var(--line-strong); }
.radar-axis { stroke: var(--line); stroke-width: 1; }
.radar-value { fill: var(--ink-soft); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; animation: radar-in .9s var(--ease) both; transform-origin: 160px 140px; }
.radar-compare { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.radar-dot { fill: var(--ink); }
.radar-label { fill: var(--text-2); font: 600 13px var(--font-body); }
.radar-num { fill: var(--ink); font-family: var(--font-display); font-weight: 700; }
@keyframes radar-in { from { transform: scale(.3); opacity: 0; } }
.trend-grid { stroke: var(--line); stroke-width: 1; }
.trend-axis { fill: var(--muted); font: 500 12px var(--font-body); }
.trend-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.4s var(--ease) .1s forwards; }
.trend-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.trend-val { fill: var(--ink); font: 700 12px var(--font-display); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-ring { width: 108px; }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.ring-fill { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.ring-num { fill: var(--ink); font: 700 20px var(--font-display); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink); vertical-align: middle; margin-right: 6px; }
.legend i.dash { border-top: 2px dashed var(--muted); }

/* hero (parent / profile) */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 24px; border-radius: var(--radius); background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 36px, color-mix(in srgb, var(--on-ink) 6%, transparent) 36px 38px); pointer-events: none; }
.hero h1 { font-size: clamp(26px, 3.4vw, 38px); text-transform: uppercase; }
.hero .muted { color: var(--on-ink-muted); }
.hero .avatar { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-left: auto; position: relative; z-index: 1; }
.hero-stats div { display: grid; }
.hero-stats .num { font-size: 34px; line-height: 1; }
.hero-stats span:last-child { font-size: 13px; color: var(--on-ink-muted); }

/* notes */
.note { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 6px; }
.note-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.callout { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); display: flex; gap: 12px; align-items: flex-start; }
.callout svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.callout-danger { border-color: var(--red-line); background: var(--red-soft); color: var(--red-callout); }

/* empty state */
.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--line-strong); }

/* toasts */
.toasts { position: fixed; right: 20px; top: 20px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); animation: toast-in .35s var(--ease) both; font-weight: 500; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 0 0 8px; }
.toast.is-hiding { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* confirm dialog */
.dialog { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 24px; width: min(420px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.dialog[open] { animation: rise .25s var(--ease); }
.dialog h2 { margin-bottom: 8px; }
.dialog p { color: var(--text-2); }
.dialog .form-actions { margin-top: 20px; }

/* tabs */
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px; min-height: 38px; display: inline-flex; align-items: center; }
.tabs a.is-active { background: var(--ink); color: var(--on-ink); }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 16px; }

/* print (report) */
@media print {
  body { background: #fff; color: #000; }
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .card, .stat { border-color: #ccc; background: #fff; color: #000; break-inside: avoid; }
  .hero { border: 1px solid #000; background: #fff; color: #000; }
  .hero .avatar { background: #000; color: #fff; }
  .muted, .indicator .reason { color: #444; }
  .radar-value { fill: rgba(0,0,0,.12); stroke: #000; }
  .radar-dot, .radar-num { fill: #000; }
  .radar-label { fill: #222; }
  .dots i.on { background: #000; border-color: #000; }
  .bar-fill { fill: #000; }
  .bar-track { fill: #ddd; }
  .badge-ok { border-color: #000; }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0; width: 288px; transform: translateX(-102%);
    transition: transform .3s var(--ease); box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); }
  .topbar .menu-toggle { display: inline-flex; }
  .content { padding-bottom: 104px; }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; min-height: 52px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a.is-active { color: var(--ink); }
  .bottom-nav a.is-active svg { transform: translateY(-1px); }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: block; width: 176px; margin: 0 auto 4px; padding: 18px; border-radius: 28px; background: #000; box-shadow: var(--shadow); }
  .auth-card h1 { text-align: center; }
  .auth-card > p { text-align: center; }
  .grid-2, .span-2 { grid-template-columns: minmax(0, 1fr); grid-column: auto; }
  .ind-row { grid-template-columns: minmax(0, 1fr); }
  .ind-row .reason-field { grid-column: 1; }
}
@media (max-width: 640px) {
  .form-grid, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 28px; }
  .card { padding: 16px; }
  .hero { padding: 20px; }
  .hero-stats { margin-left: 0; gap: 22px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .filters .input, .filters .select, .search { max-width: none; flex: 1 1 100%; }
  /* tables become cards */
  .table-responsive thead { display: none; }
  .table-responsive tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table-responsive tr:last-child { border-bottom: 0; }
  .table-responsive td { padding: 0; border: 0; }
  .table-responsive td[data-label]:not(.t-main)::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .table-responsive td.t-main { grid-column: 1 / -1; }
  .table-responsive td.t-actions { grid-column: 1 / -1; text-align: left; padding-top: 6px; }
  .att-row { grid-template-columns: minmax(0, 1fr); }
  .att-row .chips { flex-wrap: wrap; }
  .rating label { min-height: 52px; }
  .toasts { top: auto; bottom: 96px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .splash-logo, .splash-bar, .splash-tag { opacity: 1; transform: none; }
  .trend-line { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- utilities added for views */
.grow { flex: 1; min-width: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); align-items: center; }
.att-help { padding: 0 20px 14px; }
.list-card { text-decoration: none; color: inherit; transition: border-color .2s, transform .25s var(--ease); }
.list-card:hover { border-color: var(--ink); color: inherit; transform: translateY(-2px); }
details.card summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
details.card summary::after { content: "+"; font-family: var(--font-display); font-size: 20px; }
details.card[open] summary::after { content: "–"; }
details.card[open] .scale-legend { margin-top: 14px; }
details.card summary::-webkit-details-marker { display: none; }
[hidden] { display: none !important; }
.is-loading { pointer-events: none; opacity: .7; }

/* ---------------------------------------------------------------- light-theme refinements */
.card, .stat { box-shadow: 0 1px 0 rgba(0,0,0,.02); }
@media (prefers-color-scheme: light) {
  .card, .stat { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.03); }
  .session-card::after { border-color: var(--surface-3); }
}

/* ---------------------------------------------------------------- PWA install banner */
.install-banner {
  position: fixed; z-index: 90; left: 0; right: 0; margin: 0 auto; bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 24px)); display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); animation: rise .4s var(--ease) both;
}
.install-banner img { width: 44px; height: 44px; border-radius: 11px; background: #000; padding: 4px; flex: none; }
.install-banner p { font-size: 14px; line-height: 1.35; }
.install-banner .grow strong { display: block; font-size: 15px; }
.install-banner .ios-share { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.install-close { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; min-width: 32px; min-height: 32px; }
@media (max-width: 900px) { .has-bottom-nav .install-banner { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* Standalone (installed) app: respect the notch / home indicator */
@media (display-mode: standalone) {
  .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
  .sidebar { padding-top: calc(20px + env(safe-area-inset-top)); }
  .splash, .auth-form-wrap { padding-top: env(safe-area-inset-top); }
}
.offline-page { min-height: 100vh; min-height: 100dvh; }
.offline-page .auth-mobile-logo { display: block; }
.list-divider { padding: 10px 20px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }
.list-divider:first-child { border-top: 0; }
.list-divider + .list-item { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .card-flush { padding: 0; }
  .list-item { flex-wrap: wrap; row-gap: 8px; padding: 14px 16px; }
  .list-item .grow { flex: 1 1 calc(100% - 64px); }
  .list-item > .avatar + .grow ~ .badge:first-of-type,
  .list-item > .avatar + .grow ~ :not(.chev):nth-child(3) { margin-left: 54px; }
  .list-item .chev { display: none; }
  .list-divider { padding: 10px 16px; }
}
/* edit locks */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain:disabled .rating label, fieldset.plain:disabled .chip span, .att-row.is-locked .chip span { opacity: .55; cursor: not-allowed; }
fieldset.plain:disabled .rating input:checked + label, .att-row.is-locked .chip input:checked + span { opacity: 1; }
.att-row.is-locked { background: var(--surface-2); }
.callout-lock { background: var(--surface-2); }
.callout .small { margin-top: 2px; }
.lock-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-weight: 600; }
.lock-tag svg { width: 12px; height: 12px; }
.reopen-form { margin-top: 14px; }
details.card summary .row svg { width: 18px; height: 18px; }
/* "Lainnya" free-text field under a dropdown */
.other-field { display: none; margin-top: 8px; }
.other-field.is-open, .field:has(select option[value="__other"]:checked) .other-field { display: block; }
optgroup { font-weight: 600; }

/* ---------------------------------------------------------------- billing & notifications */
.text-red { color: var(--red-text); }
.stat-value.money { font-size: clamp(20px, 2.2vw, 28px); }
.money-lg { font-family: var(--font-display); font-size: 24px; font-weight: 700; line-height: 1.1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.on-ink-link { color: var(--on-ink); }
.hero-bill h1 { font-size: clamp(28px, 4vw, 44px); }
.callout.list-card { text-decoration: none; color: inherit; align-items: center; }
.callout .chev svg { width: 18px; height: 18px; }
.generate-form { margin-top: 14px; display: grid; gap: 12px; }
.generate-form .input { max-width: 220px; }
.chip-group { margin: 14px 0 8px; }
.chip[hidden] { display: none; }

.bill h3 { font-size: 17px; margin-bottom: 4px; }
.bill-late { border-color: var(--red-line); }
.bill .small svg { width: 15px; height: 15px; vertical-align: -3px; }

.pay-box { display: grid; gap: 6px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.pay-big { font-family: var(--font-display); font-size: 24px; letter-spacing: .02em; overflow-wrap: anywhere; }
.pay-big mark { background: var(--ink); color: var(--on-ink); padding: 0 4px; border-radius: 4px; }

.proof-drop { position: relative; display: grid; place-items: center; min-height: 160px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; overflow: hidden; text-align: center; padding: 16px; transition: border-color .2s; }
.proof-drop:hover, .proof-drop:focus-within { border-color: var(--ink); }
.proof-drop.is-invalid { border-color: var(--red); }
.proof-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.proof-drop span { display: grid; gap: 4px; justify-items: center; color: var(--text-2); }
.proof-drop span svg { width: 28px; height: 28px; }
.proof-drop small { color: var(--muted); }
.proof-drop img { max-height: 240px; width: auto; border-radius: 8px; }
.proof-drop.has-file span { display: none; }

.proof { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.proof-img { flex: 0 0 200px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.proof-img img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.proof-none { display: grid; place-items: center; gap: 6px; min-height: 140px; color: var(--muted); font-size: 13px; }
.proof-none svg { width: 28px; height: 28px; }
.proof .callout { padding: 10px 12px; }
details.reject summary { cursor: pointer; color: var(--red-text); font-weight: 600; font-size: 14px; }
details.reject[open] summary { margin-bottom: 10px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* bell + unread counters */
.topbar .bell { position: relative; }
.dot-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 700 11px/18px var(--font-body); text-align: center; }
.bottom-nav a { position: relative; }
.bottom-nav .dot-count { top: 4px; right: calc(50% - 22px); }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }

.push-card { display: flex; align-items: center; gap: 14px; position: relative; padding-right: 44px; flex-wrap: wrap; }
.push-card .install-close { position: absolute; top: 8px; right: 8px; }
.push-card[hidden], [data-push-ios][hidden] { display: none; }
[data-push-ios] svg { width: 15px; height: 15px; vertical-align: -3px; }
.notif.is-unread .title { font-weight: 700; }
.notif.is-unread { background: var(--surface-2); }
.notif .sub { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .proof-img { flex-basis: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .pay-big { font-size: 21px; }
  .push-card .btn { width: 100%; }
}
.hero-bill h1.num { text-transform: none; }
.bill p.small { display: flex; align-items: center; gap: 6px; }
.list-item .avatar svg, .push-card .avatar svg, .push-settings .avatar svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- Nov 2026: announcements, leave, tournaments, QR, reports, registration */
.grid-wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ann h3 { font-size: 18px; }
.ann-full h1 { font-size: clamp(24px, 3vw, 32px); }
.ann-callout .small.muted { font-weight: 400; }
.src-tag, .lock-tag { display: inline-flex; align-items: center; gap: 3px; }
.src-tag svg { width: 13px; height: 13px; }
.leave-note { display: flex; align-items: center; gap: 5px; color: var(--text-2); margin-top: 2px; }
.leave-note svg { width: 14px; height: 14px; flex: none; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-actions .btn { flex: 1 1 140px; }

/* tournaments */
.tour-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.tour-stats > div { display: grid; text-align: center; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--surface-2); }
.tour-stats .num { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.tour-stats span:last-child { font-size: 12px; color: var(--muted); }
.tour-stats.pad { padding: 0 20px 16px; }
.list-card.is-past { opacity: .78; }
.score { font-family: var(--font-display); font-size: 20px; font-weight: 700; white-space: nowrap; }
.squad-row { position: relative; }
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; font-size: 18px; line-height: 1; }
details.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.menu-pop .link-btn { text-align: left; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.menu-pop .link-btn:hover { background: var(--surface-2); }
.add-match { margin-top: 12px; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 12px; }
.scoreboard .team strong { font-family: var(--font-display); font-size: clamp(16px, 2.4vw, 24px); text-transform: uppercase; }
.scoreboard .full-row { grid-column: 1 / -1; position: relative; z-index: 1; }
.score-inputs { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.score-inputs .input { width: 74px; height: 64px; text-align: center; font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.score-inputs span { font-size: 28px; font-weight: 700; }
.input-xs { width: 64px; min-height: 38px; padding: 0 8px; }
select.input-xs { width: 64px; }
.stats-table td, .stats-table th { white-space: nowrap; vertical-align: middle; }
.stats-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ink); }
.tour-card .small svg { width: 15px; height: 15px; vertical-align: -3px; }
.match-list { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.respond { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }

/* QR */
.scan-view { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #000; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; display: none; }
.scanner.is-live .scan-view video { display: block; }
.scanner.is-live .scan-idle { display: none; }
.scan-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: #aaa; }
.scan-idle svg { width: 36px; height: 36px; }
.scan-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); display: none; }
.scanner.is-live .scan-frame { display: block; }
.scan-result { padding: 12px 14px; border-radius: var(--radius-sm); font-weight: 600; border: 1px solid var(--line-strong); }
.scan-result.is-ok { background: #e7f6ec; border-color: #9fd6b0; color: #0f5b2c; }
.scan-result.is-warn { background: #fff5dc; border-color: #f0d48a; color: #6d4c00; }
.scan-result.is-err { background: var(--red-soft); border-color: var(--red-line); color: var(--red-callout); }
.scan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 360px; overflow: auto; }
.scan-list li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.qr-phone { max-width: 420px; margin: 0 auto; text-align: center; justify-items: center; }
.qr-phone h1 { font-size: 26px; }
.qr-box { width: min(78vw, 320px); aspect-ratio: 1; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-code { font-size: 18px; letter-spacing: .08em; }

/* finance report chart */
.chart-money { width: 100%; height: auto; display: block; }
.bar-billed { fill: var(--surface-3); stroke: var(--line-strong); stroke-width: 1; }
.bar-paid { fill: var(--ink); }
.cash-line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.trend-axis.is-current { font-weight: 700; fill: var(--ink); }
.legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px 0 10px; vertical-align: -1px; }
.lg-billed { background: var(--surface-3); border: 1px solid var(--line-strong); }
.lg-paid { background: var(--ink); }
.lg-cash { background: var(--red); height: 3px !important; vertical-align: 3px !important; }

/* public registration page */
body.public { background: var(--bg); }
.public-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px; background: var(--header-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.public-head .brand { margin: 0; padding: 0; }
.public-main { max-width: 1120px; margin: 0 auto; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.check.is-invalid span { color: var(--red-text); }

@media (max-width: 900px) {
  .grid-wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .scoreboard { grid-template-columns: 1fr; }
  .score-inputs { justify-content: center; }
  .tour-stats { grid-template-columns: repeat(4, 1fr); }
  .tour-stats.pad { grid-template-columns: repeat(5, 1fr); padding: 0 12px 12px; }
}
@media (prefers-color-scheme: dark) {
  .scan-result.is-ok { background: #0f2a19; border-color: #1f6b3b; color: #a6e3b8; }
  .scan-result.is-warn { background: #2b2209; border-color: #6d5413; color: #f3d88a; }
}
.cell-person .leave-note { display: flex; }
.tour-card p.small svg, .bill p.small svg { display: inline-block; }
.cash-dot { fill: var(--red); stroke: var(--surface); stroke-width: 2; }
.lg-cash { border-radius: 50% !important; height: 10px !important; width: 10px !important; vertical-align: 0 !important; }

/* Sidebar: logo and account stay fixed, the menu scrolls when it is taller than the screen */
.sidebar { overflow: hidden; }
.sidebar .brand, .sidebar-foot { flex-shrink: 0; }
.sidebar .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; align-content: start;
  margin-right: -8px; padding-right: 8px; padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.sidebar .nav::-webkit-scrollbar { width: 6px; }
.sidebar .nav::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.sidebar-foot { margin-top: 0; }
@media (max-height: 640px) {
  .sidebar { padding-top: 12px; padding-bottom: 10px; }
  .sidebar .brand { padding-bottom: 10px; }
  .sidebar .nav a { min-height: 38px; }
  .sidebar .me { display: none; }
}
.stack > fieldset.plain { display: grid; gap: 14px; }
form.is-disabled .btn-primary { opacity: .45; cursor: not-allowed; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.grid > .card.stack { align-content: start; }
