/* ==========================================================================
   After Court - back office
   ========================================================================== */
body.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: #c9d4cc; display: flex; flex-direction: column; padding: 20px 14px; gap: 6px; }
.admin-side .brand { color: #fff; padding: 4px 8px 18px; }
.admin-side .brand-copy small { color: #8a9b91; }
.admin-nav-title { font-size: .66rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #6f8277; padding: 16px 12px 6px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #b4c3b9; font-weight: 600; font-size: .92rem; }
.admin-nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav a.active { background: var(--lime); color: var(--ink); }
.admin-nav a.active svg { opacity: 1; }
.admin-nav .count { margin-left: auto; min-width: 22px; text-align: center; padding: 1px 7px; border-radius: 999px; background: #e08a00; color: #fff; font-size: .72rem; font-weight: 800; }
.admin-side .side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 4px; }
.admin-side .side-foot a, .admin-side .side-foot button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: #9fb0a5; background: none; border: 0; font-weight: 600; font-size: .9rem; }
.admin-side .side-foot a:hover, .admin-side .side-foot button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side .who { padding: 8px 12px; font-size: .82rem; color: #8a9b91; word-break: break-all; }

.admin-main { min-width: 0; padding: 28px 32px 64px; }
.admin-top { display: none; }
.admin-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-title h1 { font-size: 1.8rem; margin: 0; }
.admin-title p { margin: 4px 0 0; color: var(--muted); }
.admin-title .actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 80; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .admin-side { padding-top: var(--safe-top); }
  body.side-open .admin-side { transform: none; }
  body.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 75; }
  .admin-top { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 60; padding: calc(10px + var(--safe-top)) 16px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .admin-top strong { font-weight: 800; }
  .admin-main { padding: 20px 16px 56px; }
}

/* KPI + panels */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: block; }
a.kpi:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.kpi small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kpi strong { font-size: 1.9rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.kpi span { display: block; margin-top: 4px; font-size: .82rem; color: var(--muted); }
.kpi.alert { border-color: #e0a84a; background: var(--warn-bg); }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .panel-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.05rem; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.panel-body { padding: 22px; }
.panel .table-wrap { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row small { display: block; color: var(--muted); }

/* Toolbars / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.toolbar input[type=search], .toolbar select { min-height: 40px; width: auto; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.status-tabs a { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .86rem; border: 1px solid var(--line-strong); color: var(--muted); }
.status-tabs a b { font-weight: 800; margin-left: 4px; color: var(--text); }
.status-tabs a.active, .status-tabs a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-tabs a.active b, .status-tabs a:hover b { color: var(--lime); }

/* Registration groups */
.group-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.group-head h3 { margin: 0; font-size: 1.05rem; }
.group-head small { color: var(--muted); }
.group-head .meter { width: 160px; }
.team-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.team-row:last-child { border-bottom: 0; }
.team-row .names strong { display: block; }
.team-row .names small, .team-row .meta small { color: var(--muted); display: block; }
.team-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) { .team-row { grid-template-columns: 1fr; } .team-row .actions { justify-content: flex-start; } }

/* Settings forms */
.settings-grid { display: grid; gap: 20px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.form-card h3 { margin-bottom: 4px; }
.form-card > p.sub { color: var(--muted); margin-bottom: 18px; font-size: .92rem; }
.repeater-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; align-items: end; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; margin-bottom: 10px; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.thumb-row figure { margin: 0; position: relative; width: 92px; }
.thumb-row img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.thumb-row label { display: flex; gap: 6px; align-items: center; font-size: .76rem; margin-top: 4px; color: var(--muted); }
.code-block { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82rem; background: var(--ink); color: #d9e6dd; padding: 14px 16px; border-radius: 12px; overflow-x: auto; white-space: pre; line-height: 1.55; }
.secret-box { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--ink); color: var(--lime); font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.avatar-sm { width: 34px; height: 34px; font-size: .8rem; }
.role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.table td .sub { display: block; color: var(--muted); font-size: .8rem; }
.proof-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 640px) { .form-card, .panel-body { padding: 18px; } .panel-head, .list-row { padding-left: 18px; padding-right: 18px; } }
.panel-grid > .panel { margin-top: 0; }

/* Open Play admin */
.op-days { display: flex; flex-wrap: wrap; gap: 8px; }
.op-days label { position: relative; }
.op-days input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.op-days span { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 44px; padding: 0 10px; border-radius: 999px; border: 1.5px dashed var(--line-strong); font-weight: 700; font-size: .88rem; color: var(--muted); }
.op-days input:checked + span { background: var(--court); border: 1.5px solid var(--court); color: var(--lime); }
.op-days input:focus-visible + span { box-shadow: var(--focus); }
.op-add { margin-top: 16px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); display: grid; gap: 12px; background: var(--surface-2); }

/* Tables that turn into stacked cards on phones. Labels come from the header (app.js). */
@media (max-width: 700px) {
  .table-wrap:has(> .table-cards) { overflow: visible; }
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody { display: block; width: 100%; }
  .table-cards tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 16px; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .table-cards td:first-child, .table-cards td.tc-full, .table-cards td.tc-action, .table-cards td.tc-empty,
  .table-cards td[colspan], .table-cards td.text-right:last-child { grid-column: 1 / -1; }
  .table-cards td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 3px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
  .table-cards td.tc-when strong { display: inline; }
  .table-cards td.tc-when .sub { display: inline; font-size: .86rem; }
  .table-cards td.tc-when .sub::before { content: " · "; }
  .table-cards td.text-right { text-align: left; }
  .table-cards td.text-right:last-child > .btn { width: 100%; justify-content: center; }
  .table-cards td.text-right:last-child .row, .table-cards td.text-right:last-child > form.row { justify-content: flex-start !important; flex-wrap: wrap; }
  .table-cards td.text-right:last-child .row > .btn, .table-cards td.text-right:last-child .row > form { flex: 1 1 auto; }
  .table-cards td.text-right:last-child .row > form .btn { width: 100%; }
  .table-cards td.text-right:last-child:empty { display: none; }
}

/* Open play: date range, search, payments list and detail */
.op-range { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 190px) auto; gap: 10px; align-items: end; margin-bottom: 20px; }
.op-range .btn { min-height: 44px; }
.op-range .field { min-width: 0; }
/* iPhone Safari gives date fields a fixed width that spills out of the grid; make them fill their column. */
.op-range input[type=date] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; min-height: 44px; text-align: left; }
.op-range input[type=date]::-webkit-date-and-time-value { text-align: left; }
.op-search { display: flex; gap: 8px; margin-bottom: 12px; }
.op-search input { flex: 1; min-width: 0; }
.op-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.op-chips::-webkit-scrollbar { display: none; }
.op-chips a { white-space: nowrap; flex: none; }
.op-presets a { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; letter-spacing: .02em; }
.tx-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tx-list > .empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.tx-row { display: flex; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tx-row:last-child { border-bottom: 0; }
.tx-row:hover { background: var(--surface-2); }
.tx-main { min-width: 0; flex: 1; }
.tx-name { display: flex; align-items: center; gap: 8px; }
.tx-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-plus { flex: none; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.tx-sub { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.tx-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.tx-side strong { font-size: 1.02rem; font-weight: 900; }
.tx-side small { font-size: .74rem; color: var(--faint); }
.tx-strike { text-decoration: line-through; color: var(--faint); }
.op-back-admin { display: inline-block; margin-bottom: 10px; font-weight: 700; }
.op-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.op-detail-grid h3 { margin-bottom: 12px; }
.op-dl { margin: 0; display: grid; gap: 12px; }
.op-dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 10px; }
.op-dl dt { font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.op-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.op-dl dd .sub { display: block; color: var(--muted); font-size: .84rem; }
.op-actions-row { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.op-lines { display: grid; }
.op-line-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.op-line-item .sub { display: block; color: var(--muted); font-size: .8rem; }
.op-line-item > span, .op-line-item > strong { flex: none; }
.op-line-total { border-bottom: 0; font-size: 1.05rem; }
.op-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.op-timeline li { position: relative; padding-left: 20px; display: grid; }
.op-timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--court); }
.op-timeline li span { font-size: .84rem; color: var(--muted); }
@media (max-width: 700px) {
  .op-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .op-range .btn { grid-column: 1 / -1; width: 100%; }
  .op-presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .op-presets::-webkit-scrollbar { display: none; }
  .op-presets a { flex: none; }
  .tx-row { padding: 14px; }
  .op-dl > div { grid-template-columns: 1fr; gap: 2px; }
}
.op-row-actions { gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.op-roster .op-email { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi strong { font-size: 1.35rem; overflow-wrap: anywhere; }
}
.table-cards tr[hidden] { display: none !important; }
:root[data-theme="dark"] .status-tabs a.active, :root[data-theme="dark"] .status-tabs a:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
:root[data-theme="dark"] .status-tabs a.active b, :root[data-theme="dark"] .status-tabs a:hover b { color: var(--ink); }
@media (max-width: 700px) {
  .toolbar > input[type=search], .toolbar .grow { flex: 1 1 100%; min-width: 0; }
  .toolbar > select { flex: 1 1 0; min-width: 0; }
}
.op-lock { display: contents; border: 0; margin: 0; padding: 0; min-width: 0; }
.op-lock[disabled] input, .op-lock[disabled] select, .op-lock[disabled] textarea { background: var(--surface-2); color: var(--muted); }
.op-lock[disabled] .switch, .op-lock[disabled] .op-days, .op-lock[disabled] .check { opacity: .6; }
.op-locked { background: var(--surface-2); }
.op-lock-icon { font-size: 1.1rem; line-height: 1.4; }

/* Overview: Open Play "Coming up" rows */
.op-ov-row { color: var(--text); text-decoration: none; }
.op-ov-row:hover { background: var(--surface-2); }
.op-ov-main { min-width: 0; flex: 1; }
.op-ov-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-ov-side { display: flex; align-items: center; gap: 10px; flex: none; }
.op-ov-count { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.op-ov-count b { color: var(--text); }
.op-ov-go { font-size: 1.4rem; line-height: 1; color: var(--faint); }
@media (max-width: 700px) { .op-ov-main strong { font-size: .92rem; } .op-ov-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; } }

/* Open play roster: one compact row per player */
.op-rl { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
/* No overflow clipping (the ⋯ menu must show past the box): round the end rows instead. */
.op-rl > .op-rl-row:first-child { border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.op-rl > .op-rl-row:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.op-rl-more[open] { z-index: 30; }
.op-rl > .empty { padding: 22px; text-align: center; color: var(--muted); }
.op-rl-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto 28px; grid-template-areas: "ph main pay more x" "ph acts acts acts acts"; column-gap: 12px; row-gap: 4px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.op-rl-row:first-child { border-top: 0; }
.op-rl-row.is-guest { padding-left: 30px; background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.op-rl-ph { grid-area: ph; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); font-size: .78rem; font-weight: 800; color: var(--muted); align-self: start; }
.op-rl-ph img { width: 100%; height: 100%; object-fit: cover; }
.op-rl-main { grid-area: main; min-width: 0; }
.op-rl-main strong { display: flex; align-items: center; gap: 6px; font-size: .95rem; min-width: 0; }
.op-rl-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.op-rl-main small { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-rl-dupr { flex: none; font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--info-bg); color: var(--info); }
.op-rl-pay { grid-area: pay; display: grid; justify-items: end; gap: 2px; text-align: right; }
.op-rl-pay small { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.op-rl-acts { grid-area: acts; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; }
.op-rl-acts:not(:has(button)) { display: none; }
.op-rl-btn { border: 0; background: none; padding: 4px 0; font: inherit; font-size: .82rem; font-weight: 700; color: var(--info); cursor: pointer; }
.op-rl-btn:hover { text-decoration: underline; }
.op-rl-remove { color: var(--muted); }
.op-rl-remove:hover { color: var(--bad); }
.op-rl-x { grid-area: x; margin: 0; align-self: start; }
.op-rl-x button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--faint); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.op-rl-x button:hover { background: var(--bad-bg); color: var(--bad); }
.op-rl-row:not(:has(.op-rl-x)) { grid-template-columns: 38px minmax(0, 1fr) auto auto 0; }
.op-rm-dlg { max-width: 420px; }
.op-rm-dlg h3 { margin: 0 0 10px; }
.op-rm-dlg p { margin: 0 0 10px; }
.op-rm-warn { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); }
.op-rm-warn strong { display: block; }
.op-rm-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* Props editor */
.pt-list { display: grid; gap: 8px; margin-top: 12px; }
.pt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; }
.pt-row.is-off input[name^="label_"] { color: var(--faint); text-decoration: line-through; }
.pt-move { display: flex; flex-direction: column; }
.pt-move button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .8rem; line-height: 1.1; padding: 1px 6px; }
.pt-move button:hover { color: var(--text); }
.pt-add { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
@media (max-width: 520px) { .pt-row { grid-template-columns: auto minmax(0, 1fr) auto; } .pt-row select { grid-column: 2; } .pt-row .switch { grid-row: 1; grid-column: 3; } .pt-add { grid-template-columns: 1fr; } }

/* Open play calendar */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cal-head h2 { margin: 0; font-size: 1.3rem; min-width: 9ch; text-align: center; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 1.4rem; color: var(--text); text-decoration: none; }
.cal-nav:hover { background: var(--surface-2); }
.cal-today { margin-left: 6px; font-weight: 700; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-key { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-key.live, .cal-dots i.live { background: var(--lime); }
.cal-key.planned, .cal-dots i.planned { background: transparent; border: 1.5px dashed var(--muted); }
.cal-key.private, .cal-dots i.private { background: var(--info-bg); border: 1.5px solid var(--info); }
.cal-key.free, .cal-dots i.free { background: var(--surface-2); border: 1.5px solid var(--line-strong); }
.cal-key.cancelled, .cal-dots i.cancelled { background: var(--bad-bg); border: 1.5px solid var(--bad); }
.cal-dots i.past { background: var(--line-strong); }
.cal { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-row + .cal-row { border-top: 1px solid var(--line); }
.cal-dow span { padding: 8px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; background: var(--surface-2); }
.cal-day { min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; outline: none; }
.cal-day + .cal-day { border-left: 1px solid var(--line); }
.cal-day.is-other { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cal-day.is-other .cal-dn span { color: var(--faint); }
.cal-day.is-past .cal-s { opacity: .6; }
.cal-dn { display: flex; align-items: center; justify-content: space-between; }
.cal-dn span { font-size: .85rem; font-weight: 800; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-dn span { background: var(--ink); color: var(--lime); }
.cal-add { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); font-weight: 800; text-decoration: none; opacity: 0; transition: opacity .15s; }
.cal-day:hover .cal-add, .cal-day:focus-within .cal-add { opacity: 1; }
.cal-add:hover { background: var(--surface-2); color: var(--text); }
.cal-items { display: grid; gap: 4px; }
.cal-s { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; align-items: center; padding: 3px 6px; border-radius: 7px; font-size: .74rem; line-height: 1.3; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.cal-s b { font-weight: 800; }
.cal-s span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-s em { font-style: normal; font-weight: 700; color: var(--muted); font-size: .7rem; }
.cal-s.live { background: var(--lime); color: var(--ink); }
.cal-s.live em { color: rgba(11, 20, 17, .65); }
.cal-s.planned { border: 1.5px dashed var(--line-strong); background: var(--surface); }
.cal-s.private { background: var(--info-bg); border-color: var(--info); }
.cal-s.free { background: var(--surface-2); border-color: var(--line-strong); }
.cal-s.cancelled { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.cal-s.past { background: var(--surface-2); color: var(--muted); }
.cal-s:hover { filter: brightness(.96); }
.cal-dots { display: none; }
.cal-agenda { display: none; }
@media (max-width: 760px) {
  .cal-day { min-height: 54px; align-items: center; padding: 6px 2px; cursor: pointer; }
  .cal-items, .cal-add { display: none; }
  .cal-dn { justify-content: center; }
  .cal-dots { display: flex; gap: 3px; }
  .cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
  .cal-day.is-picked { background: var(--surface-2); }
  .cal-day.is-picked .cal-dn span { outline: 2px solid var(--court); }
  .cal-agenda { display: block; margin-top: 14px; }
  .cal-ag-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .cal-ag-s { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; margin-bottom: 8px; border-left-width: 5px; }
  .cal-ag-s.live { border-left-color: var(--lime); }
  .cal-ag-s.planned { border-left-style: dashed; border-left-color: var(--muted); }
  .cal-ag-s.private { border-left-color: var(--info); }
  .cal-ag-s.cancelled { border-left-color: var(--bad); }
  .cal-ag-s.cancelled b { text-decoration: line-through; }
  .cal-ag-time { font-size: .8rem; font-weight: 800; width: 76px; flex: none; }
  .cal-ag-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
  .cal-ag-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-ag-t small { color: var(--muted); font-size: .8rem; }
  .cal-ag-go { color: var(--faint); font-size: 1.3rem; }
}

/* Payment uploads to verify (session roster) */
.pv-box { border: 1px solid var(--warn); border-radius: var(--radius-lg); padding: 12px; margin: 12px 0 16px; display: grid; gap: 10px; background: color-mix(in srgb, var(--warn) 7%, transparent); }
.pv-head { display: grid; gap: 2px; }
.pv-head span { color: var(--muted); font-size: .86rem; }
.pv-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 8px; }
.pv-proof { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .75rem; color: var(--muted); }
.pv-proof img { width: 100%; height: 100%; object-fit: cover; }
.pv-main { display: grid; gap: 2px; min-width: 0; }
.pv-main small { color: var(--muted); }
.pv-main .pv-flag { color: var(--bad); font-weight: 600; }
.pv-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .pv-row { grid-template-columns: 56px 1fr; } .pv-acts { grid-column: 1 / -1; justify-content: stretch; } .pv-acts .btn { flex: 1; } }

/* Receipt viewer (pop-up with zoom) */
html.zv-lock { overflow: hidden; }
dialog.zv { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; min-height: 100vh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: rgba(8, 12, 10, .96); color: #fff; overflow: hidden; }
/* (exact screen size: in the installed iPhone app "100%" came out shorter than the screen) */
dialog.zv:not([open]) { display: none; }
dialog.zv::backdrop { background: rgba(8, 12, 10, .96); }
.zv-stage { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; cursor: zoom-in; }
.zv-stage img { max-width: 94vw; max-height: calc(100vh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); object-fit: contain; border-radius: 8px; background: #fff; transform-origin: center; user-select: none; -webkit-user-drag: none; will-change: transform; }
.zv-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.zv-count:empty { visibility: hidden; }
.zv-count { margin-right: auto; background: rgba(16,20,18,.82); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: .9rem; opacity: .85; }
.zv-btn { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(16,20,18,.82); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); z-index: 2; font: inherit; font-weight: 700; font-size: 1.05rem; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; backdrop-filter: blur(6px); }
.zv-btn:hover { background: rgba(40,46,43,.92); }
.zv-top, .zv-bar { z-index: 2; }
.zv-open { font-size: .85rem; }
.zv-x { font-size: 1.6rem; padding: 0; width: 44px; }
.zv-bar { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.zv-pct { min-width: 72px; font-size: .9rem; }
.zv-nav { display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(16,20,18,.82); color: #fff; font-size: 2rem; cursor: pointer; z-index: 2; }
.zv-many .zv-nav { display: block; }
.zv-prev { left: 10px; } .zv-next { right: 10px; }

/* Shop orders: item filter summary and changing items on an order */
.so-sum { margin-bottom: 16px; }
.so-sum > div { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.so-sum strong { flex-basis: 100%; }
.so-sum small { flex-basis: 100%; color: var(--muted); }
.so-hit { background: color-mix(in srgb, var(--lime) 35%, transparent); border-radius: 6px; padding: 0 4px; margin-left: -4px; font-weight: 700; }
dialog.modal.so-dlg { overflow-y: auto; }
dialog.modal.so-dlg .modal-body { overflow: visible; flex: none; }
dialog.modal.so-dlg .so-scroll { padding-bottom: 0; }
dialog.modal.so-dlg .modal-foot { position: sticky; bottom: 0; }
.oi-box { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; display: grid; gap: 8px; }
.oi-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.oi-row { display: grid; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.oi-row:first-of-type { border-top: 0; }
.oi-main { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.oi-main .sub { margin-left: auto; }
.oi-edit > summary { cursor: pointer; font-weight: 700; font-size: .86rem; color: var(--court, var(--ok)); list-style: none; display: inline-block; }
.oi-edit > summary::-webkit-details-marker { display: none; }
.oi-add > summary { padding: 8px 0 2px; }
.oi-form { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; align-items: end; margin-top: 8px; padding: 12px; background: var(--surface-2); border-radius: var(--radius); }
.oi-form .check, .oi-acts { grid-column: 1 / -1; }
.oi-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.oi-balance { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); }
.oi-balance div { display: grid; gap: 2px; }
.oi-balance small { color: var(--muted); }
.oi-balance.is-owe { background: color-mix(in srgb, var(--warn) 14%, transparent); }
.oi-balance.is-refund { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.oi-log summary { cursor: pointer; font-size: .84rem; color: var(--muted); }
.oi-log ul { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; color: var(--muted); display: grid; gap: 2px; }

/* Memberships: clickable KPI tiles, highlighted row */
.kpi-btn { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.kpi-btn:hover { border-color: var(--line-strong); }
.row-flash td { background: color-mix(in srgb, var(--lime) 22%, transparent) !important; }

/* Rewards admin */
.rw-tabs { margin-bottom: 16px; }
.rw-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-filter select { min-height: 44px; }
.rw-admin-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-top: 12px; }
.rw-row + .rw-row { border-top: 1px solid var(--line); }
.rw-row > summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto auto; align-items: center; gap: 10px 16px; padding: 12px 16px; cursor: pointer; list-style: none; }
.rw-row > summary::-webkit-details-marker { display: none; }
.rw-row > summary:hover, .rw-row[open] > summary { background: var(--surface-2); }
.rw-who, .rw-what { display: flex; flex-direction: column; min-width: 0; }
.rw-who small, .rw-what small { color: var(--muted); font-size: .8rem; }
.rw-detail { padding: 6px 16px 16px; background: var(--surface-2); display: grid; gap: 14px; }
.rw-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end; }
.rw-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.rw-inline label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 700; color: var(--muted); gap: 3px; }
.rw-inline input[type=number] { width: 90px; }
.rw-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.rw-log { font-size: .82rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.rw-log > b { color: var(--text); }
.rw-log i { font-style: normal; color: var(--faint); }
.rw-issue { margin-top: 16px; }
.rw-issue summary { cursor: pointer; }
.rw-settings h3 { margin: 0; }
.rw-row3 { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rw-tier { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.rw-tier > b { align-self: center; min-width: 46px; }
.rw-tier label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 700; color: var(--muted); gap: 3px; }
.rw-tier input[type=number] { width: 80px; }
@media (max-width: 720px) {
  .rw-row > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .rw-what { grid-column: 1 / -1; grid-row: 2; }
}
.op-search.rw-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.op-search.rw-filter > select { flex: 0 1 200px; width: auto; }
.op-search.rw-filter > input { flex: 1 1 220px; width: auto; }
.op-search.rw-filter > button { flex: none; }

/* Backups */
.bk-alert { background: #fff3cd; color: #5c4400; border: 1px solid #f0d78c; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; }
.bk-alert a { color: inherit; text-decoration: underline; }
.kpi.bk-bad { border-color: #e5a3a3; }
.kpi strong { overflow-wrap: anywhere; }
.bk-list { display: flex; flex-direction: column; }
.bk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 14px; padding: 12px 22px; }
.bk-row + .bk-row { border-top: 1px solid var(--line); }
.bk-row > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.bk-row small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.bk-err { color: #b42318 !important; }
.bk-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.bk-steps code { font-size: .85em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; overflow-wrap: anywhere; }
.bk-restore { margin-top: 20px; }
.bk-restore > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.bk-restore > summary::-webkit-details-marker { display: none; }
.bk-restore[open] > summary { border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .bk-row { padding: 12px 16px; } }

/* Move / replace a booking */
.op-owes { display: block; color: var(--warn, #b45309); font-weight: 700; font-size: .78rem; }
.op-rl-log { display: block; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.op-mv-dlg .modal-body { display: grid; gap: 12px; }
.op-mv-dlg label.fld { display: grid; gap: 6px; font-weight: 700; font-size: .86rem; }
.op-mv-dlg select, .op-mv-dlg input[type=text] { width: 100%; min-height: 44px; }
.op-mv-dlg .op-rm-acts { margin-top: 4px; }
.op-rl-more { grid-area: more; position: relative; align-self: start; margin-right: -8px; }
.op-rl-more > summary { list-style: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--muted); font-size: 1.1rem; font-weight: 800; line-height: 1; }
.op-rl-more > summary::-webkit-details-marker { display: none; }
.op-rl-more > summary:hover, .op-rl-more[open] > summary { background: var(--surface-2); color: var(--text); }
.op-rl-menu { position: absolute; right: 0; top: 32px; z-index: 20; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 6px; display: grid; }
.op-rl-menu button { text-align: left; border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; color: var(--text); padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.op-rl-menu button:hover { background: var(--surface-2); }
.op-rl-main .op-rl-log { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 640px) {
  .op-rl-row { grid-template-columns: 38px minmax(0, 1fr) auto 28px; grid-template-areas: "ph main pay x" "ph main pay more" "ph acts acts acts"; row-gap: 0; }
  .op-rl-row:not(:has(.op-rl-x)) { grid-template-columns: 38px minmax(0, 1fr) auto 28px; }
  .op-rl-more { margin-right: 0; }
  .op-rl-acts { margin-top: 4px; }
  .op-rl-main .op-rl-log { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .op-rl-main .op-rl-log.is-open { white-space: normal; }
}
/* Open play chat: transfers between players, reported messages */
.tr-box { margin: 12px 0 0; border: 1px solid var(--lime-deep); background: var(--lime-soft); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.tr-row b { display: block; } .tr-row small { color: var(--muted); }
.rp-box { margin: 12px 0 0; border: 1px solid #f3c5c0; background: var(--bad-bg); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; }
.rp-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.rp-row > div { flex: 1; min-width: 220px; font-size: .88rem; }
.rp-row q { display: block; color: var(--text); margin-top: 2px; quotes: none; overflow-wrap: anywhere; }
.rp-row form { margin: 0; }

/* Site activity (Overview, super admin) */
.sa-note { font-size: .8rem; color: var(--muted); }
.sa-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1fae5b; margin-right: 6px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(31, 174, 91, .18); }
.sa-online strong { color: var(--ok); }
.sa-panel { padding: 16px 18px; }
.sa-who { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sa-chip { display: inline-flex; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: .84rem; font-weight: 700; color: var(--text); text-decoration: none; }
.sa-chip small { margin-left: 6px; font-weight: 600; color: var(--muted); }
.sa-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 8px; }
.sa-chart-head span { color: var(--muted); font-size: .78rem; display: inline-flex; align-items: center; gap: 6px; }
.sa-chart-head i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.k-v { background: var(--line-strong); } .k-p { background: var(--court-2); margin-left: 6px; }
.sa-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; height: 140px; align-items: end; }
.sa-col { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 4px; min-width: 0; }
.sa-col small { font-size: .62rem; color: var(--muted); text-align: center; height: 12px; line-height: 12px; }
.sa-bar { align-self: end; background: var(--line-strong); border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; min-height: 2px; overflow: hidden; }
.sa-bar-p { width: 100%; background: var(--court-2); }
.sa-foot { margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
.ph-group + .ph-group { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ph-name { display: block; margin-bottom: 8px; font-size: .9rem; }
.acc-member { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.acc-member .field small { display: block; margin-top: 6px; color: var(--muted); }
/* Member search dropdown (Add player / Replace) */
.ps-wrap { position: relative; display: block; }
.ps-wrap input { width: 100%; }
.ps-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; padding: 4px; }
.ps-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.ps-item b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-item em { font-style: normal; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--lime); color: var(--ink); align-self: center; }
.ps-item small { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-item:hover, .ps-item.on { background: var(--surface-2); }
.ps-none { margin: 0; padding: 10px 12px; color: var(--muted); font-size: .85rem; }
/* Session page: summary, tabs and folding Details */
.st-sum { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; margin: 0 0 12px; }
.st-when { font-weight: 800; }
.st-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.st-bar i { display: block; height: 100%; background: var(--court-2); border-radius: 99px; }
.st-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.st-meta span { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); }
.st-meta .st-warn { background: var(--warn-bg); color: var(--warn); }
.st-meta .st-bad { background: var(--bad-bg); color: var(--bad); }
.st-meta .st-live { background: #c0392b; color: #fff; }
.st-meta .st-dark { background: var(--ink); color: var(--lime); }
.st-tabs { position: sticky; top: calc(8px + var(--safe-top)); z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
@media (max-width: 960px) { .st-tabs { top: calc(var(--admin-top-h, 64px) + 6px); } }
.st-tabs button { border: 0; background: none; padding: 10px 6px; border-radius: 10px; font: inherit; font-weight: 800; font-size: .9rem; color: var(--muted); cursor: pointer; }
.st-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.st-tabs em { font-style: normal; margin-left: 6px; font-size: .7rem; background: #ff6b4a; color: #fff; border-radius: 99px; padding: 1px 7px; }
[data-st-panel][hidden] { display: none !important; }
[data-st-panel] { margin-top: 0 !important; }
[data-st-panel="status"] { margin-top: 0 !important; }
.st-fold > h3 { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0; user-select: none; }
.st-fold > h3::after { content: "▾"; font-size: .9rem; color: var(--muted); transition: transform .15s; }
.st-fold.folded > h3::after { transform: rotate(-90deg); }
.st-fold:not(.folded) > h3 { margin-bottom: 14px; }
.st-fold.folded > :not(h3) { display: none !important; }
form.st-folds .form-actions { position: sticky; bottom: 0; z-index: 4; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 35%); }

/* Long settings pages split into tabs (uses the shared .tabs / .tab-panel). */
@media (max-width: 960px) { :root { --admin-top-h: calc(64px + var(--safe-top)); } }
.tab-panel.active.panel-stack { display: grid; gap: 20px; }
.tabs.page-tabs { margin: 0 0 18px; }
form.save-bar .form-actions { position: sticky; bottom: 0; z-index: 4; margin-top: 4px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.tab em { font-style: normal; margin-left: 6px; font-size: .7rem; background: #ff6b4a; color: #fff; border-radius: 99px; padding: 1px 7px; }
form.save-bar:has(> .tab-panel):not(:has(> .tab-panel.active)) { display: none; }


/* Admin -> Notifications (broadcast) */
.bc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .bc-grid { grid-template-columns: 1fr; } .bc-preview { order: -1; } }
.bc-preview { position: sticky; top: calc(16px + var(--safe-top)); }
.bc-pv-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.bc-phone { border-radius: 28px; padding: 18px 12px; background: linear-gradient(160deg, #1f3a32, #0b1411); }
.bc-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .88); color: #111; backdrop-filter: blur(10px); }
.bc-note img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.bc-note > div { min-width: 0; flex: 1; }
.bc-top { display: flex; justify-content: space-between; font-size: .72rem; color: #555; }
.bc-top b { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.bc-note strong { display: block; font-size: .9rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-note p { margin: 2px 0 0; font-size: .86rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-row { display: flex; justify-content: space-between; gap: 14px; }
.bc-row small { display: block; color: var(--muted); }
.bc-meta { text-align: right; flex: none; }
/* Memberships: "Added by <admin>" on members an admin added by hand (admins only) */
.added-by { display: inline-block; margin: 4px 0 2px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 700; }
.modal-head p .added-by { display: table; margin: 0 0 4px; }


/* Loyalty card admin */
.ly-players { display: flex; flex-direction: column; gap: 10px; }
.ly-player { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr); gap: 10px 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.ly-who { display: flex; flex-direction: column; }
.ly-who small { color: var(--muted); }
.ly-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ly-mini i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); }
.ly-mini i.gift { border-color: var(--lime-deep); }
.ly-mini i.on { background: var(--lime-deep); border-color: var(--lime-deep); }
.ly-mini i.half { background: linear-gradient(90deg, var(--lime-deep) 50%, transparent 50%); border-color: var(--lime-deep); }
.ly-mini span { margin-left: 6px; font-size: .85rem; color: var(--muted); }
.ly-form, .ly-item { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ly-form label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 700; color: var(--muted); gap: 3px; }
.ly-form input[type=number] { width: 80px; }
.ly-form .ly-reason { flex: 1; min-width: 200px; }
.ly-item { align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface); }
.ly-log { display: flex; flex-direction: column; gap: 4px; }
.ly-log-row { display: flex; align-items: baseline; gap: 12px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ly-log-row > b { flex: none; width: 34px; font-weight: 900; color: var(--ok); }
.ly-log-row > b.neg { color: var(--bad); }
.ly-log-row > span { flex: 1; min-width: 0; }
.ly-past { display: flex; flex-direction: column; gap: 12px; }
.ly-past .check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; line-height: 1.35; }
.ly-past .check input { margin-top: 2px; flex: none; }
.ly-range { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ly-range legend { font-size: .75rem; font-weight: 800; color: var(--muted); padding: 0 4px; }
.ly-range input[type=date] { max-width: 220px; }
.ly-find { display: flex; gap: 8px; }
.ly-find input { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .ly-player { grid-template-columns: 1fr; }
  .ly-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ly-kpis .kpi { padding: 12px; }
  .ly-kpis .kpi strong { font-size: 1.4rem; }
  .ly-kpis .kpi small { font-size: .62rem; letter-spacing: .06em; }
  .ly-kpis .kpi span { display: none; }
  .ly-ms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
  .ly-ms > b { grid-column: 1 / -1; }
  .ly-ms label { min-width: 0; width: 100%; }
  .ly-ms label input, .ly-ms label select { width: 100%; min-width: 0; }
  .ly-ms label:nth-of-type(1) { order: 1; }
  .ly-ms label:nth-of-type(5) { order: 2; }
  .ly-ms label:nth-of-type(2) { order: 3; grid-column: 1 / -1; }
  .ly-ms label:nth-of-type(3) { order: 4; }
  .ly-ms label:nth-of-type(4) { order: 5; }
  .ly-log-row { flex-wrap: wrap; row-gap: 2px; }
  .ly-log-row > small { width: 100%; padding-left: 46px; }
}

/* Reports: insights */
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.rp-grid h4 { margin: 0 0 8px; }
.rp-t { font-size: .86rem; }
.rp-t th, .rp-t td { padding: 6px 8px; }
.rp-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; counter-reset: rp; }
.rp-list li { display: flex; gap: 8px; align-items: baseline; }
.rp-list li > b { margin-left: auto; }
ol.rp-list li::before { counter-increment: rp; content: counter(rp) "."; color: var(--muted); min-width: 20px; font-size: .8rem; }
.rp-list a { color: inherit; font-weight: 600; }
.rp-d { font-style: normal; font-weight: 800; }
.rp-d.up { color: var(--ok); }
.rp-d.down { color: var(--bad); }

/* Payment check */
.pc-block.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.pc-block h3 { display: flex; align-items: center; }

/* Invite a friend history */
.rf-row { align-items: center; }
.rf-row > span { flex: 1; min-width: 0; line-height: 1.45; }
.rf-ok { color: var(--ok); font-weight: 700; font-size: .86rem; }

/* Admin -> DUPR and DUPR matches (dupr.html, dupr_matches.html) */
.dx-section { margin-top: 22px; }
.dx-h .todo-n { margin-left: 0; }
.dx-h { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.dx-stack { display: grid; gap: 10px; }
.dx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.dx-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dx-card-top > div { min-width: 0; }
.dx-card-top .pill { flex: none; }
.dx-meta { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; overflow-wrap: anywhere; }
.dx-help { font-size: .82rem; margin: 10px 2px 0; }
.dx-club { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 700; font-size: .86rem; max-width: 100%; }

/* Open play picker */
.dx-tabs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.dx-tabs::-webkit-scrollbar { display: none; }
.dx-tab { flex: none; scroll-snap-align: start; width: 168px; display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.dx-tab b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-tab small { color: var(--muted); font-size: .76rem; }
.dx-tab .dx-count { font-weight: 700; }
.dx-progress { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.dx-progress i { display: block; height: 100%; background: var(--info); border-radius: 4px; }
.dx-tab.all-sent .dx-progress i { background: var(--ok); }
.dx-tab:hover { border-color: var(--line-strong); }
.dx-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dx-tab.on small { color: rgba(255,255,255,.7); }
.dx-tab.on .dx-progress { background: rgba(255,255,255,.18); }
.dx-tab.on .dx-progress i { background: var(--lime); }
:root[data-theme="dark"] .dx-tab.on { background: var(--lime); border-color: var(--lime); color: var(--ink); }
:root[data-theme="dark"] .dx-tab.on small { color: rgba(0,0,0,.65); }
:root[data-theme="dark"] .dx-tab.on .dx-progress { background: rgba(0,0,0,.15); }
:root[data-theme="dark"] .dx-tab.on .dx-progress i { background: var(--ink); }

/* Session summary */
.dx-sess-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dx-sess-head h2 { margin: 0; font-size: 1.3rem; }
.dx-sess-head p { margin: 2px 0 0; font-size: .86rem; }
.dx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.dx-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 4px; }
.dx-stat { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; }
.dx-stat b { font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dx-stat .dx-stat-txt { font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-stat small { color: var(--muted); font-size: .74rem; font-weight: 700; }
.dx-stat-note { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--bad); }
.dx-stat.is-info b { color: var(--info); }
.dx-stat.is-ok b { color: var(--ok); }
.dx-stat.is-warn b { color: var(--warn); }
a.dx-stat:hover { border-color: var(--line-strong); }

/* A game */
.dx-no { font-size: .95rem; }
.dx-score { display: grid; gap: 6px; margin-top: 10px; }
.dx-team { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.dx-team b { text-align: right; font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.dx-team.win { background: var(--ok-bg); }
.dx-team.win b { color: var(--ok); }
.dx-team.win .dx-names span { font-weight: 700; }
.dx-names { display: flex; flex-wrap: wrap; gap: 2px 14px; min-width: 0; }
.dx-names span { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.dx-names small { font: 700 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); letter-spacing: .02em; font-weight: 600; }
.dx-names .dx-noid { font-family: inherit; color: var(--bad); }
.dx-probs { margin: 10px 0 0; padding: 8px 10px 8px 28px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .85rem; font-weight: 600; }
.dx-game .dm-flag, .dx-game .dm-err { margin-top: 10px; }
.dx-game.is-void { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.dx-game:target { box-shadow: 0 0 0 2px var(--lime); }
.dx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dx-foot .dx-meta { margin: 0; }
.dx-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.dx-btns-left { justify-content: flex-start; margin: 14px 0 0; }
.dx-btns-in { margin-left: 0; }
.dx-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--info-bg); max-width: 420px; }
.dx-edit[hidden] { display: none; }
.dx-edit label { display: grid; gap: 4px; min-width: 0; }
.dx-edit label span { font-size: .74rem; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-edit input { width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: 800 1.2rem/1 inherit; text-align: center; }

/* Reports */
.dx-report { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.dx-report.is-done { opacity: .65; border-color: var(--line); }
.dx-quote { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid var(--warn); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.dx-resolve { display: flex; gap: 8px; flex: 1 1 260px; justify-content: flex-end; }
.dx-resolve input { flex: 1; min-width: 0; max-width: 300px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; }

/* DUPR page */
.dx-ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dx-plist { padding: 0; }
.dx-player { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 16px; }
.dx-player + .dx-player { border-top: 1px solid var(--line); }
.dx-pmain { min-width: 0; }
.dx-rates { display: flex; gap: 6px; }
.dx-rates span { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums; }
.dx-rates small { color: var(--muted); font-size: .66rem; font-weight: 800; }
.dx-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 0; }
.dx-facts dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.dx-facts dd { margin: 2px 0 0; font-weight: 700; }
.dx-tech summary { cursor: pointer; font-weight: 800; color: var(--muted); font-size: .86rem; padding: 6px 2px; list-style-position: inside; }
.dx-tech[open] summary { margin-bottom: 8px; }
.dx-event { padding: 8px 0; border-top: 1px solid var(--line); }
.dx-event code { display: block; margin-top: 4px; font-size: .74rem; word-break: break-all; color: var(--muted); }

@media (max-width: 640px) {
  .dx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dx-stats-3 { grid-template-columns: 1fr 1fr; }
  .dx-stats-3 .dx-stat:first-child { grid-column: 1 / -1; }
  .dx-sess-head form, .dx-sess-head .btn { width: 100%; }
  .dx-player { grid-template-columns: minmax(0, 1fr) auto; }
  .dx-player .dx-rates { grid-row: 2; }
  .dx-player > .pill { grid-row: 1; grid-column: 2; }
  .dx-player .dx-rates { grid-column: 1 / -1; }
  .dx-ident .dupr-badge { display: none; }
  .dx-resolve { flex-basis: 100%; }
  .dx-resolve input { max-width: none; }
  .dx-foot > .dx-btns { width: 100%; }
  .dx-foot .dx-btns .btn, .dx-foot .dx-btns-in { flex: 1; }
  .dx-edit { max-width: none; }
}

/* Accounts: contact number and the Details card */
.acc-phone { color: var(--text); text-decoration: none; font-weight: 600; display: block; }
.acc-btns { display: inline-flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.acc-det-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acc-det-who .avatar { width: 48px; height: 48px; flex: none; }
.acc-contact { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.acc-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.acc-dl dt { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.acc-dl dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.acc-plays { display: grid; gap: 6px; margin-top: 16px; }
.acc-plays a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; font-weight: 600; }
.acc-plays small { color: var(--muted); flex: none; }
.acc-dl .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .acc-contact .btn { flex: 1; } }

/* Accounts on phones: one compact block per player (name, contact, buttons on top; small chips below) */
.acc-mlab { display: none; }
@media (max-width: 760px) {
  .acc-table tr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px 14px; }
  .acc-table td { flex: none; }
  .acc-table td::before { display: none !important; }
  .acc-table td:first-child { flex: 1 1 calc(100% - 110px); min-width: 0; order: 0; }
  .acc-table td:first-child .avatar { width: 36px; height: 36px; }
  .acc-table td:first-child strong { font-size: .95rem; }
  .acc-table td:first-child .sub { font-size: .8rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .acc-table td.acc-act { order: 1; flex: none; grid-column: auto; }
  .acc-table .acc-btns { flex-direction: column; gap: 4px; }
  .acc-table .acc-btns .btn { min-height: 36px; padding: 6px 14px; font-size: .82rem; width: auto !important; }
  .acc-table td.acc-dupr, .acc-table td.acc-prof, .acc-table td.acc-mem, .acc-table td.acc-roles { order: 2; }
  .acc-table .acc-dupr, .acc-table .acc-prof, .acc-table .acc-mem { display: inline-flex !important; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: .76rem; font-weight: 800; white-space: nowrap; }
  .acc-table .acc-dupr .sub, .acc-table .acc-missing, .acc-table .acc-mem .sub { display: none !important; }
  .acc-table .acc-mlab { display: inline; color: var(--muted); }
  .acc-table .acc-dupr.is-none, .acc-table .acc-mem.is-none { display: none !important; }
  .acc-table .acc-prof .pc-mini { font-size: .76rem; }
  .acc-table .acc-mem .pill { padding: 0; background: none; font-size: .76rem; }
  .acc-table .acc-roles .role-chips { gap: 4px; }
  .acc-table .acc-roles .pill { padding: 3px 9px; font-size: .72rem; }
}

/* Admin -> Messages (players' direct messages, super admins) */
.dmx-search { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.dmx-search input { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; font: inherit; background: var(--surface); }
.dmx-pair { display: flex; flex: none; }
.dmx-pair .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.ib-thread.dmx-reported { border-color: #f5b5ae; box-shadow: inset 3px 0 0 #e5484d; }
.dmx-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0; }
.dmx-foot { font-size: .82rem; text-align: center; margin-top: 14px; }
.dmx-head h1 { margin: 6px 0 4px; font-size: 1.35rem; }
.dmx-head p { margin: 0 0 10px; font-size: .86rem; }
.dmx-people { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; }
.dmx-people span { display: grid; } .dmx-people small { color: var(--muted); font-size: .8rem; }
.dmx-reports { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid #f5b5ae; background: #fff4f2; border-radius: 14px; margin-bottom: 14px; }
.dmx-report { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .86rem; }
.dmx-reports form { margin-top: 4px; }
.dmx-list { max-height: none; }
.dmx-views { display: grid; gap: 4px; margin-top: 14px; font-size: .82rem; color: var(--muted); }
.dmx-views strong { color: var(--text); }
:root[data-theme="dark"] .dmx-reports { background: rgba(229, 72, 77, .12); }

/* Admin -> Sponsors: posts (Courtside) */
.spp { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.spp-h { display: flex; align-items: baseline; gap: 8px; } .spp-h small { color: var(--muted); font-size: .8rem; }
.spp-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.spp-row.is-expired { opacity: .55; }
.spp-row > img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.spp-main { flex: 1; min-width: 0; display: grid; gap: 2px; justify-items: start; }
.spp-main b { font-size: .9rem; } .spp-main small { color: var(--muted); font-size: .78rem; }
.spp-main code { background: var(--ink); color: var(--lime); padding: 0 6px; border-radius: 5px; font-weight: 800; }
.spp-tag { display: inline-block; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 99px; margin-right: 4px; }
.spp-tag.deal { background: var(--lime); color: var(--ink); } .spp-tag.show { background: #e8eef9; color: #2457c5; } .spp-tag.gone { background: #eee; color: #777; }
.spp-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; max-width: 60%; }
.spp-acts form { display: inline-flex; }
.spp-add { width: 100%; }
.spp-edit { width: auto; }
.spp-edit[open] { width: 100%; }
.spp-edit summary, .spp-add summary { list-style: none; display: inline-flex; cursor: pointer; }
.spp-edit summary::-webkit-details-marker, .spp-add summary::-webkit-details-marker { display: none; }
.spp-edit[open] { flex-basis: 100%; }
.spp-form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.spp-none { font-size: .84rem; margin: 0; }
@media (max-width: 640px) { .spp-row { flex-wrap: wrap; } .spp-acts { width: 100%; justify-content: flex-start; } }

/* Admin -> Sponsors: list, sponsor page */
.sx-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sx-top h1 { margin: 0 0 4px; } .sx-top p { margin: 0; color: var(--muted); max-width: 62ch; }
.sx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sx-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.sx-kpi small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sx-kpi b { font-size: 1.4rem; } .sx-kpi em { font-style: normal; font-size: .78rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sx-tabs a { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .84rem; color: var(--text); text-decoration: none; }
.sx-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sx-list { display: grid; gap: 10px; }
.sx-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; color: var(--text); text-decoration: none; }
.sx-row:hover { border-color: var(--text); }
.sx-row.feat { border-color: #c8e600; box-shadow: inset 4px 0 0 var(--lime); }
.sx-row > img, .sx-nologo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.sx-nologo { display: grid; place-items: center; font-weight: 900; color: var(--muted); }
.sx-row b { font-size: 1rem; } .sx-row small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.sx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.sx-chip { font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text); }
.sx-chip.live, .sx-chip.paid { background: #dcfce7; color: #166534; } .sx-chip.soon { background: #fff1d6; color: #9a5b00; }
.sx-chip.sched { background: #e0ecff; color: #1d4ed8; } .sx-chip.ended { background: #eee; color: #666; } .sx-chip.unpaid { background: #fee2e2; color: #b91c1c; }
.sx-chip.feat { background: var(--ink); color: var(--lime); } .sx-chip.deal { background: var(--lime); color: var(--ink); } .sx-chip.show { background: #e8eef9; color: #2457c5; }
.sx-right { text-align: right; font-size: .8rem; color: var(--muted); } .sx-right b { display: block; color: var(--text); font-size: 1rem; }
.sx-head { display: flex; gap: 16px; align-items: center; margin: 6px 0 16px; flex-wrap: wrap; }
.sx-head > img { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; background: #fff; }
.sx-head h1 { margin: 0; font-size: 1.5rem; }
.sx-head .btn { margin-left: auto; }
.sx-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.sx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.sx-card h3 { margin: 0 0 4px; font-size: 1.02rem; display: flex; gap: 8px; align-items: center; }
.sx-card h3 i { width: 22px; height: 22px; border-radius: 7px; background: var(--lime); color: var(--ink); font-style: normal; font-size: .75rem; display: grid; place-items: center; font-weight: 900; }
.sx-card > p { margin: 0 0 12px; color: var(--muted); font-size: .84rem; }
.sx-f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sx-f .full { grid-column: 1 / -1; }
.sx-fld { display: grid; gap: 4px; font-size: .8rem; font-weight: 700; align-content: start; }
.sx-fld input:not([type=file]):not([type=checkbox]):not([type=radio]) { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; font-weight: 500; font-size: .92rem; background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
.sx-fld small { font-weight: 500; color: var(--muted); }
.sx-up { position: relative; display: flex; gap: 12px; align-items: center; border: 2px dashed var(--line); border-radius: 14px; padding: 10px; cursor: pointer; font-weight: 500; }
.sx-up:hover { border-color: var(--text); }
.sx-up input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sx-up img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #fff; }
.sx-up.round img { border-radius: 50%; }
.sx-up img[hidden] { display: none; }
.sx-up small { color: var(--muted); display: block; }
.sx-toggle { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; margin-top: 8px; cursor: pointer; }
.sx-toggle small { display: block; color: var(--muted); font-size: .76rem; }
.sx-time { position: relative; height: 10px; border-radius: 99px; background: var(--surface-2); margin: 12px 0 6px; overflow: hidden; }
.sx-time i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9be15d, #c8e600); border-radius: 99px; }
.sx-time-l { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 4px; }
.sx-remind { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.sx-post { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.sx-post.is-ended { opacity: .6; }
.sx-post > img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.sx-post-main { min-width: 0; }
.sx-post b { font-size: .93rem; }
.sx-post .meta { font-size: .78rem; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.sx-post .meta code { background: var(--ink); color: var(--lime); padding: 0 6px; border-radius: 5px; font-weight: 800; }
.sx-post-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; align-items: flex-start; }
.sx-post-acts form { display: inline-flex; }
.sx-edit { display: contents; } .sx-edit[open] { display: block; width: 100%; }
.sx-edit summary, .sx-add summary { list-style: none; display: inline-flex; cursor: pointer; }
.sx-edit summary::-webkit-details-marker, .sx-add summary::-webkit-details-marker { display: none; }
.sx-add { margin-top: 6px; }
.sx-postform { display: grid; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.sx-type { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; font-size: .82rem; font-weight: 800; background: var(--surface); justify-self: start; }
.sx-type label { cursor: pointer; } .sx-type input { position: absolute; opacity: 0; pointer-events: none; }
.sx-type span { display: block; padding: 7px 14px; }
.sx-type input:checked + span { background: var(--lime); color: var(--ink); }
.sx-postform:has(input[value=show]:checked) .only-deal, .sx-postform:has(input[value=show]:checked) .only-deal-t { display: none; }
.sx-postform:has(input[value=deal]:checked) .only-show-t { display: none; }
.sx-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sx-stat div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; } .sx-stat b { display: block; font-size: 1.3rem; } .sx-stat small { color: var(--muted); font-size: .72rem; }
.sx-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin-top: 12px; }
.sx-bars i { flex: 1; background: #c8e600; border-radius: 3px 3px 0 0; min-height: 2px; }
.sx-contact-acts { display: flex; gap: 8px; margin-top: 10px; }
.sx-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0; margin-top: 4px;
  background: linear-gradient(transparent, var(--bg, #f3f4ef) 30%); }
.sx-savebar form { margin-right: auto; }
@media (max-width: 900px) {
  .sx-grid, .sx-f { grid-template-columns: minmax(0, 1fr); }
  .sx-kpis { grid-template-columns: 1fr 1fr; }
  .sx-row { grid-template-columns: 48px minmax(0, 1fr); } .sx-row > img, .sx-nologo { width: 48px; height: 48px; } .sx-right { grid-column: 2; text-align: left; }
  .sx-head .btn { margin-left: 0; }
}

/* Admin -> Tournament leads */
.ld-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ld-kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ld-kpis small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; } .ld-kpis b { display: block; font-size: 1.4rem; }
.ld-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.ld-tabs a { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: .84rem; color: var(--text); text-decoration: none; }
.ld-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ld-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; color: var(--text); text-decoration: none; }
.ld-row:hover { border-color: var(--text); }
.ld-row b { font-size: .98rem; } .ld-row small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.ld-st { font-size: .7rem; font-weight: 800; padding: 4px 9px; border-radius: 99px; align-self: start; white-space: nowrap; }
.ld-st.new { background: #fee2e2; color: #b91c1c; } .ld-st.contacted { background: #e0ecff; color: #1d4ed8; } .ld-st.quoted { background: #fff1d6; color: #9a5b00; }
.ld-st.won { background: #dcfce7; color: #166534; } .ld-st.lost { background: #eee; color: #666; }
.ld-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; } .ld-chips span { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); }
.ld-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 6px 0 14px; }
.ld-head h1 { margin: 0; font-size: 1.5rem; } .ld-head small { color: var(--muted); }
.ld-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ld-notes { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin: 6px 0 0; }
.ld-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 10px 0; }
.hp-photo { border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 4px; }
.hp-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; } .hp-photo small { color: var(--muted); font-size: .76rem; min-height: 1em; }
.hp-photo form { display: flex; gap: 2px; flex-wrap: wrap; }
.hp-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hp-add input[name=caption] { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
@media (max-width: 900px) { .ld-kpis { grid-template-columns: 1fr 1fr; } .ld-grid { grid-template-columns: 1fr; } }

/* Host page settings: page text */
.hp-text details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; margin-top: 8px; }
.hp-text summary { cursor: pointer; font-weight: 800; padding: 8px 0; }
.hp-f { display: grid; gap: 4px; margin: 6px 0 12px; }
.hp-f > span { font-weight: 700; font-size: .88rem; }
.hp-f input, .hp-f textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; background: var(--surface); color: var(--text); box-sizing: border-box; }
.hp-f textarea { line-height: 1.45; font-size: .9rem; }
.hp-f small { color: var(--muted); font-size: .78rem; }
.hp-ch { font-style: normal; font-size: .7rem; font-weight: 800; background: var(--lime, #d7f25c); color: #12210f; padding: 1px 7px; border-radius: 999px; margin-left: 4px; }

/* Admin -> Reports (reports.py) */
.rx-bar { display: grid; gap: 10px; margin-bottom: 18px; }
.rx-periods { margin-bottom: 0; }
.rx-custom-btn { padding: 7px 14px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .86rem; border: 1px solid var(--line-strong); background: none; color: var(--muted); cursor: pointer; }
.rx-custom-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.rx-custom { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.rx-custom label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.rx-custom input { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; background: var(--surface); color: var(--text); }
.rx-secs { margin-bottom: 0; }
.rx-d { font-style: normal; font-weight: 800; font-size: .78rem; }
.rx-d.up { color: var(--ok); } .rx-d.down { color: var(--bad, #c2412d); } .rx-d.flat { color: var(--muted); }
.rx-sum { margin-bottom: 26px; }
.rx-sum-head { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; align-items: flex-end; }
.rx-sum-head small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rx-sum-head strong { display: block; font-size: 2.3rem; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0; }
.rx-sum-head > div > span { font-size: .86rem; color: var(--muted); }
.rx-split { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(120px, auto)); gap: 6px 22px; font-size: .88rem; }
.rx-split li { display: flex; justify-content: space-between; gap: 12px; } .rx-split span { color: var(--muted); }
.rx-chart { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 18px; }
.rx-chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .7rem; color: var(--muted); padding-bottom: 20px; text-align: right; }
.rx-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; height: 170px; border-bottom: 1px solid var(--line); }
.rx-col { position: relative; display: grid; grid-template-rows: 1fr 20px; outline: none; }
.rx-bar-wrap { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--line); }
.rx-bar-fill { display: block; width: min(70%, 26px); min-height: 0; background: #1f7a3d; border-radius: 4px 4px 0 0; }
.rx-col:hover .rx-bar-fill, .rx-col:focus .rx-bar-fill { background: #155c2d; }
.rx-x { font-size: .64rem; color: var(--muted); text-align: center; white-space: nowrap; padding-top: 4px; overflow: visible; }
.rx-tip { display: none; position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%); z-index: 5; min-width: 150px;
  background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 10px; font-size: .78rem; box-shadow: var(--shadow); pointer-events: none; }
.rx-tip b, .rx-tip span, .rx-tip small { display: block; } .rx-tip span { font-weight: 900; font-size: .95rem; } .rx-tip small { opacity: .8; }
.rx-col:hover .rx-tip, .rx-col:focus .rx-tip { display: block; }
.rx-col:first-child .rx-tip, .rx-col:nth-child(2) .rx-tip { left: 0; transform: none; }
.rx-col:last-child .rx-tip, .rx-col:nth-last-child(2) .rx-tip { left: auto; right: 0; transform: none; }
.rx-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.rx-sec { margin-bottom: 30px; }
.rx-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rx-sec-head h2 { margin: 0; font-size: 1.35rem; }
.rx-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.rx-kpis .kpi strong { font-size: 1.6rem; }
.rx-sec .rp-grid .form-card { margin: 0; }
:root[data-theme="dark"] .rx-bar-fill { background: var(--lime); } :root[data-theme="dark"] .rx-col:hover .rx-bar-fill { background: #b6db00; }
:root[data-theme="dark"] .rx-custom-btn.active { background: var(--lime); color: var(--ink); border-color: var(--lime); }
@media (max-width: 640px) { .rx-split { grid-template-columns: 1fr 1fr; width: 100%; } .rx-sum-head strong { font-size: 2rem; } .rx-bars { height: 140px; } }
@media print {
  .admin-side, .admin-top, .rx-noprint, .flash-stack, .notice, .bk-alert { display: none !important; }
  .admin-shell, .admin-main { display: block !important; margin: 0 !important; padding: 0 !important; }
  body.admin-body { background: #fff !important; }
  .form-card, .kpi { break-inside: avoid; box-shadow: none !important; }
  .rx-sec { break-inside: auto; }
  .rx-tip { display: none !important; }
}

/* Reports: PayMongo commission (super admins only) */
.rx-comm { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rx-comm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rx-comm-t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rx-comm-t th { text-align: right; font-size: .74rem; color: var(--muted); font-weight: 700; padding: 4px 6px; }
.rx-comm-t td { text-align: right; padding: 7px 6px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rx-comm-t td:first-child, .rx-comm-t th:first-child { text-align: left; }
.rx-comm-t tfoot td { font-weight: 800; }
.rx-comm .sub { display: block; margin-top: 6px; }

/* Payment fees > Report: fees − commission = profit */
.pf-profit { margin-bottom: 18px; }
.pf-calc { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; }
.pf-calc > div { background: var(--surface-2, rgba(0,0,0,.03)); border: 1px solid var(--line); border-radius: 14px; padding: 12px; min-width: 0; }
.pf-calc small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pf-calc strong { display: block; font-size: 1.25rem; margin: 4px 0 2px; }
.pf-calc span { font-size: .78rem; color: var(--muted); }
.pf-calc .pf-net { background: rgba(212,255,0,.2); border-color: rgba(150,190,0,.6); }
.pf-calc .pf-net.neg { background: rgba(180,35,24,.08); border-color: rgba(180,35,24,.35); }
.pf-op { font-size: 1.3rem; color: var(--muted); text-align: center; }
.pf-neg { color: #b42318; }
.pf-area-t { width: 100%; font-size: .9rem; }
.pf-area-t td, .pf-area-t th { padding: 8px 6px; text-align: right; }
.pf-area-t td:first-child, .pf-area-t th:first-child { text-align: left; }
.pf-area-t tfoot td { border-top: 2px solid var(--line); font-weight: 700; }
@media (max-width: 640px) {
  .pf-calc { grid-template-columns: 1fr; }
  .pf-op { line-height: 1; }
}
@media (max-width: 640px) {
  .pf-area-t { font-size: .8rem; table-layout: fixed; }
  .pf-area-t td, .pf-area-t th { padding: 7px 3px; white-space: nowrap; }
  .pf-area-t th { font-size: .66rem; }
  .pf-area-t td:first-child { white-space: normal; width: 30%; }
  .pf-area-t td:first-child small { display: block; }
}

/* ==========================================================================
   Phone clean-up (menu sections, swipe rows, compact headers)
   ========================================================================== */
button.admin-nav-title { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 8px; }
button.admin-nav-title span { flex: 1; }
button.admin-nav-title b { font-size: 1rem; line-height: 1; transition: transform .15s ease; color: #6f8277; }
button.admin-nav-title.is-open b { transform: rotate(90deg); }
button.admin-nav-title.is-open .todo-n { display: none; }
button.admin-nav-title:hover { color: #c9d4cc; }
button.admin-nav-title .todo-n { font-style: normal; letter-spacing: 0; }
.admin-nav-group[hidden] { display: none; }

.swipe-row { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.swipe-row::-webkit-scrollbar { display: none; }
.swipe-row > * { flex: none; white-space: nowrap; }
.status-tabs.swipe-row { padding-bottom: 2px; }
.swipe-row:not(.at-end) { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }

.cal-dow .dow-s { display: none; }
.act-menu { position: relative; }
.act-menu > summary { list-style: none; cursor: pointer; }
.act-menu > summary::-webkit-details-marker { display: none; }
.act-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: grid; }
.act-menu-list a { padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--text); }
.act-menu-list a:hover { background: var(--surface-2); }

/* Needs attention (Overview) */
.na-card { margin-bottom: 22px; }
.na-list { display: grid; gap: 8px; }
.na-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.na-item:hover { border-color: var(--line-strong); }
.na-item b { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--lime); color: var(--ink); font-weight: 900; font-size: .9rem; }
.na-item span { flex: 1; min-width: 0; }
.na-item i { font-style: normal; color: var(--muted); font-size: 1.2rem; }
.na-item.warn b { background: #e08a00; color: #fff; }
.na-done { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); font-weight: 600; }

@media (max-width: 700px) {
  .admin-title { margin-bottom: 16px; gap: 10px; }
  .admin-title h1 { font-size: 1.55rem; }
  .admin-title > div > p { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; cursor: pointer; }
  .admin-title > div > p.is-full { -webkit-line-clamp: unset; display: block; }
  .admin-title .actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
  .admin-title .actions::-webkit-scrollbar { display: none; }
  .admin-title .actions > * { flex: none; }
  .admin-title .actions .act-menu { position: static; }
  .act-menu-list { left: 16px; right: 16px; top: auto; margin-top: 6px; position: absolute; }
  .bk-alert { font-size: .85rem; padding: 8px 12px; }
  .status-tabs { margin-bottom: 14px; }
  .status-tabs a { padding: 8px 13px; }
  /* Filter bars: search on its own line, dropdowns share the next */
  .toolbar { gap: 8px; }
  .toolbar input[type=search], .toolbar input[type=text], .toolbar .grow { flex: 1 1 100%; min-width: 0; width: 100%; }
  .toolbar select { flex: 1 1 0; min-width: 0; width: auto; }
  .toolbar form { width: 100%; }
  /* Comfortable taps */
  .btn-sm { min-height: 38px; padding-top: 8px; padding-bottom: 8px; }
  .cal-dow .dow-l { display: none; }
  .cal-dow .dow-s { display: inline; }
  .cal-dow span { padding: 8px 2px; letter-spacing: .02em; }
}
@media (max-width: 700px) {
  .admin-title { position: relative; }
  .admin-title .actions .act-menu-list { left: 0; right: 0; top: 100%; }
}

/* QR Ph refund claim link */
.rf-link { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 4px; }
.rf-link input { flex: 1 1 200px; min-width: 0; font-size: .8rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }

/* Paid on Reclub amount */
.op-rc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); width: 100%; }
.op-rc-form[hidden] { display: none; }
.op-rc-form label { display: grid; gap: 4px; flex: 1 1 150px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.op-rc-form input { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 1rem; }
.op-add .op-rc-amt { flex: 1 1 100%; max-width: 260px; margin: 0; }
.op-add .op-rc-amt[hidden] { display: none; }
.op-rl-row .op-rc-form { grid-column: 2 / -1; grid-row: auto; box-sizing: border-box; }
@media (max-width: 700px) { .op-rl-row .op-rc-form { grid-column: 1 / -1; } }
