@font-face { font-family: "Manrope"; src: url("/static/fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
/* SC Sports Admin — design tokens, light + dark. Brand: forest greens + lime. */
:root {
  --forest: #0F3D2E;
  --forest-deep: #0A2A20;
  --forest-soft: #1C5A44;
  --lime: #9ED729;
  --lime-soft: #EDF7D9;
  --bg: #F4F6F1;
  --surface: #FFFFFF;
  --surface-2: #F8FAF6;
  --ink: #14211B;
  --muted: #64746D;
  --line: #E2E8E0;
  --line-strong: #CFD8CC;
  --accent: #0F3D2E;
  --accent-ink: #FFFFFF;
  --focus: #6BA81E;
  --danger: #C93C3C;
  --danger-soft: #FBEAEA;
  --amber: #A86A12;
  --amber-soft: #FDF3E1;
  --blue: #2F6F8F;
  --blue-soft: #E5F0F5;
  --green-soft: #E3F3D0;
  --green-ink: #2D5A0C;
  --sidebar: #0F3D2E;
  --sidebar-ink: #DCE8E1;
  --sidebar-muted: #8FB3A3;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .05), 0 4px 16px rgba(16, 40, 30, .04);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1612;
    --surface: #13201A;
    --surface-2: #172720;
    --ink: #E7EEE9;
    --muted: #93A59C;
    --line: #233A2F;
    --line-strong: #2E4A3D;
    --accent: #9ED729;
    --accent-ink: #0A2A20;
    --lime-soft: #1E3318;
    --danger: #EF6B6B;
    --danger-soft: #3A1E1E;
    --amber: #E3A853;
    --amber-soft: #3A2C14;
    --blue: #79B6D4;
    --blue-soft: #1A2E38;
    --green-soft: #1F3417;
    --green-ink: #B8E27A;
    --sidebar: #08130E;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 16px; font-weight: 750; }
h3 { font-size: 14px; font-weight: 750; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; max-width: 560px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.icon { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ── shell ── */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--sidebar); color: var(--sidebar-ink); padding: 18px 12px 12px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none !important; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--lime); color: var(--forest-deep); font-weight: 900; font-size: 13px; letter-spacing: .5px; }
.brand-mark.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 18px; }
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 15px; line-height: 1.15; }
.brand-text small { font-weight: 600; color: var(--sidebar-muted); font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; }
.nav { flex: 1; }
.nav-group { margin-bottom: 14px; }
.nav-section { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--sidebar-muted); padding: 0 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--sidebar-ink); font-weight: 600; text-decoration: none !important; }
.nav-item:hover { background: rgba(255,255,255,.07); }
.nav-item.active { background: rgba(158,215,41,.16); color: #fff; box-shadow: inset 3px 0 0 var(--lime); }
.nav-item.active .icon { color: var(--lime); }
.nav-item.soon { opacity: .5; cursor: default; }
.nav-item.soon:hover { background: none; }
.nav-item em { margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 0 6px; }
.sidebar-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.sidebar-foot .btn-icon { color: var(--sidebar-muted); }
.sidebar-foot .btn-icon:hover { color: #fff; background: rgba(255,255,255,.08); }
.me { flex: 1; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--sidebar-ink); text-decoration: none !important; min-width: 0; }
.me:hover, .me.active { background: rgba(255,255,255,.07); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.me-text small { color: var(--sidebar-muted); font-size: 11.5px; }
.main { min-width: 0; }
.topbar { display: none; }
.content { padding: 28px 32px 48px; max-width: 1240px; }
.scrim { display: none; }

/* ── primitives ── */
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: var(--forest-deep); font-weight: 800; font-size: 12px; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; background: var(--lime-soft); color: var(--forest); }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
@media (prefers-color-scheme: dark) { .avatar.sm { color: var(--lime); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-block { width: 100%; height: 44px; }
.btn-small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); filter: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); filter: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.btn-icon:hover { background: var(--surface-2); color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.badge-green { background: var(--green-soft); color: var(--green-ink); border-color: transparent; }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.chip { display: inline-block; margin: 3px 4px 0 0; padding: 2px 9px; border-radius: 99px; background: var(--lime-soft); color: var(--forest); font-size: 12px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .chip { color: var(--lime); } }
.dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.dot-green { color: var(--ink); }
.dot-green::before { background: #4CAF50; }

/* ── cards & layout ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head.sub { margin: 22px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.narrow { max-width: 560px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; max-width: 680px; }
.page-actions { display: flex; gap: 8px; }
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); font-weight: 600; font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.profile-head p { margin: 2px 0 0; }

.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; color: inherit; text-decoration: none !important; transition: border-color .15s; }
a.stat:hover { border-color: var(--line-strong); }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lime-soft); color: var(--forest); }
@media (prefers-color-scheme: dark) { .stat-icon { color: var(--lime); } }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 42px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li.done:not(:last-child)::after { background: var(--lime); }
.tl-dot { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; font-weight: 800; color: var(--muted); }
.timeline li.done .tl-dot { background: var(--lime); border-color: var(--lime); color: var(--forest-deep); }
.timeline li.current .tl-dot { border: 2px solid var(--amber); color: var(--amber); }
.timeline strong { margin-right: 8px; }
.timeline p { margin: 2px 0 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li > div { flex: 1; min-width: 0; }
.list li p { margin: 1px 0 0; }
.list li > .icon { color: var(--muted); }
.list.compact li { padding: 7px 0; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.action-row:last-child { border-bottom: 0; }
.action-row p { margin: 2px 0 0; }
.danger-zone { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 0; padding-top: 16px; }
.perm-group { margin: 0 0 10px; }
.perm-group strong { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }

/* ── forms ── */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 650; font-size: 13px; }
.field input, .field select, .field textarea, .toolbar select, .date-field input {
  font: inherit; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); height: 40px; padding: 0 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.field textarea { height: auto; padding: 10px 12px; min-height: 96px; }
.field input:focus, .field select:focus, .toolbar select:focus, .search:focus-within { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(158, 215, 41, .25); }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.hint { font-weight: 500; color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--forest-soft); }
.code-input { font-size: 26px !important; font-weight: 800 !important; letter-spacing: 10px; text-align: center; height: 56px !important; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar select { width: auto; height: 38px; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); flex: 1; max-width: 360px; }
.search input { border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); width: 100%; }
.date-field { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.date-field input { height: 38px; width: auto; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--muted); font-weight: 650; font-size: 13px; text-decoration: none !important; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ── tables ── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table details summary { cursor: pointer; color: var(--muted); margin-top: 4px; }
.row-end { text-align: right; width: 48px; }
.person { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.person small { display: block; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

/* ── roles matrix ── */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.role-card { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none !important; padding: 16px; }
.role-card:hover { border-color: var(--line-strong); }
.role-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-card p { margin: 0; flex: 1; }
.matrix-scroll { overflow: auto; max-height: calc(100vh - 220px); }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 12px 10px; font-size: 12.5px; text-align: center; border-bottom: 1px solid var(--line-strong); }
.matrix thead th a { color: var(--ink); font-weight: 750; }
.matrix .perm-col { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 9px 16px; min-width: 260px; font-weight: 600; }
.matrix thead .perm-col { z-index: 3; }
.matrix .perm-col code { display: block; margin-top: 2px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 11px; }
.matrix .role-col { text-align: center; min-width: 108px; }
.matrix .group-row th { position: sticky; left: 0; background: var(--surface-2); text-align: left; padding: 8px 16px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.matrix tbody tr:not(.group-row):hover td, .matrix tbody tr:not(.group-row):hover .perm-col { background: var(--surface-2); }
.matrix .cell { display: grid; place-items: center; height: 40px; cursor: pointer; }
.matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--forest-soft); cursor: pointer; }
.matrix input[type=checkbox]:disabled { cursor: not-allowed; }
.matrix .lock { color: var(--muted); margin-left: 4px; }
.matrix-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.matrix-card.dirty .matrix-foot { background: var(--amber-soft); }
.matrix-card.dirty [data-dirty-note] { color: var(--amber); font-weight: 700; }

/* ── empty, alerts, toast, dialog ── */
.empty { text-align: center; padding: 48px 24px; }
.empty h2 { margin: 12px 0 6px; }
.empty .btn { margin-top: 12px; }
.empty-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--lime-soft); color: var(--forest); }
@media (prefers-color-scheme: dark) { .empty-icon { color: var(--lime); } }
.empty.card { max-width: 520px; margin: 40px auto; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; gap: 10px; align-items: flex-start; max-width: min(460px, calc(100vw - 32px)); padding: 14px 14px 14px 16px; border-radius: 12px; background: var(--forest-deep); color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.22); font-weight: 600; animation: toast-in .25s ease-out; }
.toast-error { background: #7A1F1F; }
.toast .btn-icon { color: rgba(255,255,255,.7); width: 28px; height: 28px; }
.toast .btn-icon:hover { background: rgba(255,255,255,.1); color: #fff; }
.toast-body { flex: 1; min-width: 0; }
.secret { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; }
.secret code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; padding: 6px 8px; font-size: 12px; }
.toast .muted { color: rgba(255,255,255,.65); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.dialog { border: 0; border-radius: 16px; padding: 22px; width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.dialog::backdrop { background: rgba(8, 20, 15, .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }

/* ── auth pages ── */
.auth-body { min-height: 100vh; display: grid; place-items: center; background:
  radial-gradient(1200px 600px at 10% -10%, rgba(158,215,41,.18), transparent 60%),
  linear-gradient(160deg, var(--forest-soft), var(--forest-deep)); padding: 24px 16px; }
.auth-wrap { width: min(420px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-bottom: 18px; }
.auth-brand div { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand strong { font-size: 19px; font-weight: 800; }
.auth-brand small { color: rgba(255,255,255,.7); font-weight: 600; }
.auth-card { background: var(--surface); border-radius: 18px; padding: 28px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-card > p { margin: 0 0 18px; }
.auth-card .stack { margin-top: 6px; }
.auth-link { display: inline-block; margin-top: 16px; font-weight: 650; font-size: 13.5px; color: var(--accent); }
.inline-form { display: inline; }
.auth-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--lime-soft); color: var(--forest); margin-bottom: 12px; }
.auth-foot { text-align: center; color: rgba(255,255,255,.6); font-size: 12px; margin-top: 18px; }

/* ── responsive ── */
@media (max-width: 1080px) {
  .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .22s ease; }
  .nav-open .sidebar { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(8,20,15,.45); }
  .topbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20; height: 56px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar-title { font-weight: 800; }
  .content { padding: 18px 16px 40px; }
  .grid.two { grid-template-columns: 1fr; }
  h1 { font-size: 21px; }
  .toolbar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; }
}
@media (max-width: 640px) {
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { grid-template-columns: 1fr; }
  .stat-icon { display: none; }
  .hide-sm { display: none; }
  /* Tables become stacked cards on phones. */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 16px; border-bottom: 1px solid var(--line); position: relative; }
  .table td { border: 0; padding: 3px 0; }
  .table td[data-label]:not([data-label="Name"])::before { content: attr(data-label); display: inline-block; min-width: 92px; color: var(--muted); font-size: 12px; font-weight: 700; }
  .table .row-end { position: absolute; right: 8px; top: 12px; width: auto; }
  .action-row { flex-direction: column; align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
.toolbar.wrap .search { flex: 1 1 220px; min-width: 200px; }

/* ───────────── P1: facilities & schedule ───────────── */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.align-start { align-items: start; }
.narrow-lg { max-width: 760px; }
.stack-lg { display: flex; flex-direction: column; gap: 16px; }
.form-section { margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; padding-top: 2px; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input-prefix, .input-suffix { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.input-prefix input, .input-suffix input { border: 0 !important; box-shadow: none !important; }
.input-prefix span, .input-suffix span { padding: 0 12px; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--surface-2); align-self: stretch; display: flex; align-items: center; }
.input-suffix input { max-width: 120px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; }
.switch-row > span { display: flex; flex-direction: column; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch:checked { background: var(--forest-soft); }
.switch:checked::after { transform: translateX(18px); }
.image-pick { display: flex; gap: 14px; align-items: center; }
.image-preview { flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 12px; border: 1px dashed var(--line-strong); background: var(--surface-2); }
.image-pick.wide .image-preview { width: 168px; height: 96px; }
.image-pick.square .image-preview { width: 84px; height: 84px; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-pick.square .image-preview img { object-fit: contain; padding: 8px; }
.image-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.image-actions .btn { cursor: pointer; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; }
.tabs a { padding: 9px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.tabs a.on { color: var(--ink); border-color: var(--lime); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.group-title { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 22px 0 10px; }
.group-title:first-of-type { margin-top: 0; }

.park-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.park-card { padding: 0; overflow: hidden; color: inherit; text-decoration: none !important; display: flex; flex-direction: column; }
.park-card:hover { border-color: var(--line-strong); }
.park-photo { height: 150px; display: grid; place-items: center; background: linear-gradient(135deg, var(--forest-soft), var(--forest-deep)); color: var(--lime); }
.park-photo img { width: 100%; height: 100%; object-fit: cover; }
.park-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.park-body p { margin: 0; }
.inactive { opacity: .6; }
.add-closure { margin-top: 12px; }
.add-closure summary { list-style: none; width: fit-content; }
.add-closure summary::-webkit-details-marker { display: none; }
.add-closure[open] summary { margin-bottom: 14px; }
.add-closure form { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }

.sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.sport-card { display: flex; gap: 14px; align-items: flex-start; color: inherit; text-decoration: none !important; padding: 16px; }
.sport-card:hover { border-color: var(--line-strong); }
.sport-icon { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--lime-soft); color: var(--forest); overflow: hidden; }
.sport-icon img { width: 40px; height: 40px; object-fit: contain; }
.sport-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sport-body p { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }

.template-layout { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.card-head.pad { padding: 18px 20px 0; }
.day-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick span { display: inline-grid; place-items: center; width: 42px; height: 36px; border-radius: 9px; border: 1px solid var(--line-strong); font-weight: 700; font-size: 12.5px; cursor: pointer; background: var(--surface); }
.day-pick input:checked + span { background: var(--forest); color: #fff; border-color: var(--forest); }
.day-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.quick-days { margin-top: 6px; color: var(--muted); }
.quick-days .linkish { color: var(--accent); font-weight: 650; }
.week-template { display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 0; overflow-x: auto; margin-top: 12px; border-top: 1px solid var(--line); }
.wt-day { border-right: 1px solid var(--line); padding: 10px 8px 14px; min-width: 92px; }
.wt-day:last-child { border-right: 0; }
.wt-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-height: 28px; }
.wt-head .muted { margin-right: auto; }
.wt-slot { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 4px 5px 8px; margin-bottom: 5px; border-radius: 8px; background: var(--lime-soft); font-size: 12.5px; font-weight: 700; color: var(--forest); }
@media (prefers-color-scheme: dark) { .wt-slot { color: var(--lime); } }
.wt-slot small { font-weight: 600; opacity: .7; }
.wt-slot .btn-icon, .btn-icon.sm { width: 24px; height: 24px; }
.wt-empty { margin: 4px 0 0; }

/* Schedule grid */
.sched-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sched-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sched-filters select { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; padding: 0 10px; }
.date-nav { display: flex; align-items: center; gap: 4px; }
.date-nav input { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; padding: 0 10px; }
.date-nav .btn-icon { font-size: 22px; line-height: 1; text-decoration: none !important; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.lg::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--line-strong)); }
.sched-title { font-size: 17px; margin: 4px 0 12px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--amber-soft); color: var(--amber); font-weight: 600; font-size: 13.5px; }
.sched-scroll { overflow: auto; max-height: calc(100vh - 290px); }
.sched { border-collapse: separate; border-spacing: 0; width: 100%; }
.sched th, .sched td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px; }
.sched thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 10px 8px; font-size: 12.5px; font-weight: 750; text-align: left; border-bottom: 1px solid var(--line-strong); }
.sched thead th a { color: var(--ink); }
.sched thead th small { color: var(--muted); font-weight: 600; }
.sched thead th.is-today { box-shadow: inset 0 -3px 0 var(--lime); }
.sched .time-col { position: sticky; left: 0; z-index: 1; background: var(--surface); width: 84px; min-width: 84px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: right; padding-right: 10px; white-space: nowrap; }
.sched thead .time-col { z-index: 3; }
.sched td { min-width: 128px; }
.sched-sport { display: inline-flex; align-items: center; gap: 6px; }
.sched-sport img { width: 18px; height: 18px; object-fit: contain; }
.slot-cell { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; min-height: 46px; font-size: 12px; text-decoration: none !important; color: var(--ink); border: 1px solid transparent; background: var(--c-bg); border-left: 3px solid var(--c); transition: transform .1s, box-shadow .1s; }
a.slot-cell:hover { box-shadow: 0 0 0 2px var(--c); }
.slot-cell .sc-time { font-weight: 800; }
.slot-cell .sc-state { font-weight: 650; color: var(--c-ink); }
.slot-cell .sc-note { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.slot-cell.past { opacity: .45; }
.slot-cell.s-none { background: repeating-linear-gradient(45deg, transparent 0 6px, var(--surface-2) 6px 12px); border: 0; }
.s-open { --c: #5BAA1E; --c-bg: var(--green-soft); --c-ink: var(--green-ink); }
.s-reserved { --c: #D4911C; --c-bg: var(--amber-soft); --c-ink: var(--amber); }
.s-blocked { --c: #8A9590; --c-bg: var(--surface-2); --c-ink: var(--muted); }
.s-closed { --c: var(--danger); --c-bg: var(--danger-soft); --c-ink: var(--danger); }
.state-picks { display: flex; flex-direction: column; gap: 8px; }
.state-pick { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-sm); cursor: pointer; }
.state-pick:has(input:checked) { background: var(--c-bg); border-color: var(--c); }
.state-pick input { margin-top: 3px; accent-color: var(--forest-soft); }
.state-pick span { display: flex; flex-direction: column; }
.state-pick small { color: var(--muted); font-weight: 500; }

@media (max-width: 1080px) { .template-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
  .image-pick { flex-direction: column; align-items: flex-start; }
  .sched-scroll { max-height: none; }
  .sched td { min-width: 112px; }
}
.field input[type=radio], .field input[type=checkbox] { width: 18px; height: 18px; padding: 0; flex: none; box-shadow: none; }
.state-pick span strong { font-weight: 750; }
.row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field input, .field select { min-width: 0; }
@media (max-width: 640px) { .row-2, .row-3 { grid-template-columns: minmax(0, 1fr); } }

/* ───────────── P2: bookings, members, check-in, dashboard ───────────── */
.center { text-align: center; }
.pad-b { padding: 0 20px 18px; }
.seg button { padding: 5px 14px; border-radius: 7px; color: var(--muted); font: inherit; font-weight: 650; font-size: 13px; background: none; border: 1px solid transparent; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); border-color: var(--line); }
.sport-seg { flex-wrap: wrap; }
.booking-pick { padding: 12px 14px; }
.slot-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.slot-pick input { position: absolute; opacity: 0; pointer-events: none; }
.slot-pick > span { display: flex; flex-direction: column; padding: 9px 11px; border: 1px solid var(--line-strong); border-left: 3px solid var(--c, var(--line-strong)); border-radius: 10px; cursor: pointer; background: var(--surface); }
.slot-pick small { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-pick input:checked + span { background: var(--forest); border-color: var(--forest); color: #fff; }
.slot-pick input:checked + span small { color: var(--lime); }
.slot-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.slot-pick.disabled > span { opacity: .45; cursor: not-allowed; background: var(--surface-2); }
.s-booked { --c: var(--blue); --c-bg: var(--blue-soft); --c-ink: var(--blue); }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 8px; margin: 0; }

.ac { position: relative; }
.ac-list { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 12px 32px rgba(0,0,0,.12); max-height: 280px; overflow: auto; padding: 4px; }
.ac-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.ac-item small { color: var(--muted); font-weight: 500; }
.ac-item:hover, .ac-item.on { background: var(--surface-2); }
.ac-item.warn small { color: var(--amber); }
.ac-empty { padding: 10px; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip.removable { display: inline-flex; align-items: center; gap: 4px; padding-right: 4px; }
.chip.removable button { border: 0; background: rgba(0,0,0,.08); color: inherit; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; font-size: 13px; }

.booking-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.booking-head h1 { margin: 2px 0; }
.booking-head p { margin: 2px 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.booking-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted-notice { background: var(--surface-2); color: var(--muted); }
.profile-head { flex-wrap: wrap; }
.profile-head p { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-cta { margin-left: auto; }
.action-details summary { list-style: none; cursor: pointer; }
.action-details summary::-webkit-details-marker { display: none; }
.action-details[open] summary .btn { visibility: hidden; }
.inset { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 8px; }
.table.bookings td { vertical-align: top; }

.checkin-box { margin-bottom: 16px; }
.checkin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.checkin-form input { flex: 1 1 220px; height: 52px; font: inherit; font-size: 22px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.checkin-form .btn { height: 52px; }
.scanner { position: relative; margin-top: 14px; border-radius: 14px; overflow: hidden; background: #000; max-width: 420px; }
.scanner video { width: 100%; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid var(--lime); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); pointer-events: none; }
.scanner .btn { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); }
.checkin-result:empty { display: none; }
.checkin-result { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; }
.checkin-result.ok { background: var(--green-soft); color: var(--green-ink); }
.checkin-result.bad { background: var(--danger-soft); color: var(--danger); }
.checkin-list li { padding: 12px 20px; }
.checkin-list li.done { opacity: .6; }
.checkin-time { display: flex; flex-direction: column; width: 70px; flex: none; }
.checkin-time small { color: var(--forest-soft); font-weight: 800; font-size: 11px; text-transform: uppercase; }
@media (prefers-color-scheme: dark) { .checkin-time small { color: var(--lime); } }

.grid.dash { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bars li { display: grid; grid-template-columns: 130px 1fr 52px; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; }
.bars li > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--forest-soft), var(--lime)); border-radius: 99px; }
.trend { width: 100%; height: 140px; }
.trend rect { fill: var(--line-strong); }
.trend rect.today { fill: var(--lime); }
.trend rect:hover { fill: var(--forest-soft); }
.trend text { font-size: 9px; fill: var(--muted); font-family: var(--font); }
.notice-card { display: flex; align-items: center; gap: 10px; color: var(--amber); background: var(--amber-soft); border-color: transparent; text-decoration: none !important; padding: 14px 16px; }
.notice-card span { flex: 1; }
.rollout summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.rollout summary::-webkit-details-marker { display: none; }
.rollout[open] summary { margin-bottom: 12px; }
@media (max-width: 1080px) { .grid.dash { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .profile-cta { margin-left: 0; width: 100%; }
  .bars li { grid-template-columns: 96px 1fr 44px; }
  .booking-actions { width: 100%; }
  .booking-actions form, .booking-actions .btn { flex: 1; }
}

/* ───────────── P3: engagement ───────────── */
.pad { padding: 0 20px 18px; }
.pad-t { margin-top: 12px; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.notice-card.info { color: var(--blue); background: var(--blue-soft); }
.card.flush > .list.compact li, .feedback-list li { padding: 10px 20px; }
.prose p { margin: 0 0 10px; line-height: 1.6; }
.prose p:last-child { margin-bottom: 0; }
.prose.small p { font-size: 13.5px; margin-bottom: 6px; }
.mono-ish { font-size: 14px; line-height: 1.55; }

/* News */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; text-decoration: none !important; color: inherit; }
.news-row:hover { border-color: var(--line-strong); }
.news-thumb { width: 72px; height: 48px; flex: none; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.news-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.grid.preview-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.app-preview { position: sticky; top: 16px; }
.app-phone { border: 8px solid #1A2420; border-radius: 30px; background: var(--bg); overflow: hidden; min-height: 420px; box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.app-bar { background: var(--forest); color: #fff; font-weight: 800; padding: 14px 16px; font-size: 15px; }
.app-post { margin: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.app-post-img { aspect-ratio: 16 / 9; background: var(--surface-2); display: grid; place-items: center; }
.app-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-post-body { padding: 12px 14px 14px; }
.app-post-body h3 { margin: 2px 0 8px; font-size: 17px; overflow-wrap: anywhere; }
.app-post-meta { margin: 0; font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.app-post-text { font-size: 13.5px; max-height: 260px; overflow: auto; overflow-wrap: anywhere; }
.app-post-text p { margin: 0 0 8px; line-height: 1.5; }

/* Pages: version compare */
.diff { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.55; max-height: 560px; overflow: auto; padding: 10px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.diff span { display: block; }
.diff .d-add { background: var(--green-soft); color: var(--green-ink); }
.diff .d-del { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; text-decoration-thickness: 1px; }

/* Complaints */
.grid.complaint-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.attachment { display: inline-block; margin-top: 12px; }
.attachment img { max-width: 260px; max-height: 200px; border-radius: var(--radius-sm); border: 1px solid var(--line); display: block; }
.thread { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.thread li { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.thread li.t-reply { background: var(--blue-soft); border-color: transparent; }
.thread li.t-event { background: none; border: 0; padding: 0 14px; border-left: 2px solid var(--line-strong); border-radius: 0; }
.thread li.t-event .t-head { display: none; }
.thread li.t-event p { margin: 0; }
.t-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 4px; }
.thread-form { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }

/* Announcements */
.badge.sev-info { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.badge.sev-warning { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.badge.sev-critical { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.app-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; }
.app-banner div { display: flex; flex-direction: column; gap: 2px; }
.app-banner span { font-size: 13px; }
.app-banner.sev-info { background: var(--blue-soft); color: var(--blue); }
.app-banner.sev-warning { background: var(--amber-soft); color: var(--amber); }
.app-banner.sev-critical { background: var(--danger); color: #fff; }

/* Ratings */
.stars { color: #E2A720; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line-strong); }
.rating-bars li a { font-weight: 700; color: var(--ink); }
.rating-bars li.on a { color: var(--accent); text-decoration: underline; }
.feedback-comment { margin: 6px 0 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; overflow-wrap: anywhere; }

/* Reports */
.heat-scroll { overflow-x: auto; }
.heatmap { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; font-size: 11px; }
.heatmap th { color: var(--muted); font-weight: 700; padding: 2px 4px; }
.heatmap thead th { text-align: center; }
.heatmap tbody th { text-align: left; width: 40px; }
.heatmap td { height: 30px; border-radius: 4px; text-align: center; font-weight: 700; color: var(--ink); }
.heatmap td span { opacity: .85; }
.hm-none { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--line) 4px, var(--line) 5px); }
.hm-0 { background: var(--surface-2); color: var(--muted) !important; }
.hm-1 { background: color-mix(in srgb, var(--forest-soft) 14%, var(--surface)); }
.hm-2 { background: color-mix(in srgb, var(--forest-soft) 32%, var(--surface)); }
.hm-3 { background: color-mix(in srgb, var(--forest-soft) 52%, var(--surface)); }
.hm-4 { background: color-mix(in srgb, var(--forest-soft) 76%, var(--surface)); color: #fff !important; }
.hm-5 { background: var(--forest); color: #fff !important; }
.hm-legend { display: flex; align-items: center; gap: 3px; margin-top: 10px; font-size: 11.5px; color: var(--muted); font-weight: 600; flex-wrap: wrap; }
.hm-legend i { width: 22px; height: 12px; border-radius: 3px; display: inline-block; }
.hm-legend span { margin: 0 4px; }
@media (prefers-color-scheme: dark) {
  .hm-1 { background: color-mix(in srgb, var(--lime) 14%, var(--surface)); }
  .hm-2 { background: color-mix(in srgb, var(--lime) 30%, var(--surface)); }
  .hm-3 { background: color-mix(in srgb, var(--lime) 44%, var(--surface)); color: #fff !important; }
  .hm-4 { background: color-mix(in srgb, var(--lime) 74%, var(--surface)); color: var(--forest-deep) !important; }
  .hm-5 { background: var(--lime); color: var(--forest-deep) !important; }
}
.report-bars { height: 160px; }
.util-cell { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.util-cell .bar { flex: 1; }
.grid.stats.inner { margin-bottom: 10px; }
.grid.stats.inner .stat { box-shadow: none; background: var(--surface-2); }

/* Settings */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.setting { display: flex; flex-direction: column; gap: 4px; }
.setting-meta { font-size: 11.5px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; z-index: 2; }

@media (max-width: 1080px) {
  .grid.preview-layout, .grid.complaint-layout { grid-template-columns: minmax(0, 1fr); }
  .app-preview { position: static; max-width: 360px; }
}
@media (max-width: 640px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .news-row { flex-wrap: wrap; }
  .news-meta { align-items: flex-start; text-align: left; width: 100%; }
}
.report-chart .report-bars { height: 140px; display: block; }
.chart-labels { display: flex; margin-top: 4px; }
.chart-labels span { flex: 1; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: visible; min-width: 0; }
.rating-bars li { grid-template-columns: 44px 1fr 84px; }
@media (max-width: 640px) { .seg { max-width: 100%; overflow-x: auto; } .seg a { white-space: nowrap; } }
