/* ============================================================
   Hajime — Auth UI · screen-specific styles
   Login variants, change-password policy hints, role landing,
   read-only live tracking.
   ============================================================ */

/* ============================================================
   AUTH SHELL (login + change-password) — full viewport
   ============================================================ */
.auth-shell {
  display: none; min-height: 100vh;
  background: var(--bg); color: var(--ink);
}
.auth-shell.is-active { display: block; }

.auth-mini-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 22px;
}
.auth-mini-top .tb-spacer { flex: 1; }
.auth-mini-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 900; letter-spacing: -0.02em; font-size: 15px;
}
.auth-mini-brand .tb-mark { width: 26px; height: 26px; font-size: 15px; border-radius: 6px; }

/* mini theme toggle on auth screens */
.auth-theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); cursor: pointer;
}
.auth-theme-btn:hover { color: var(--ink); border-color: var(--border-strong); }

/* ---- Common login pieces ---- */
.login-card {
  width: 100%; max-width: 400px;
}
.login-logo {
  display: inline-flex; align-items: center; gap: 11px; margin-bottom: 26px;
}
.login-logo .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--gold); color: #16110A; font-weight: 800; font-size: 24px;
}
.login-logo .wm { display: flex; flex-direction: column; gap: 2px; }
.login-logo .wm b { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; }
.login-logo .wm span {
  font: 600 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
}
.login-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.login-lede { color: var(--ink-2); font-size: 14px; margin: 0 0 26px; }
.login-foot {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--ink-muted); line-height: 1.6;
}
.login-foot .invite {
  display: flex; gap: 9px; align-items: flex-start;
}
.login-foot .invite .ico { width: 15px; height: 15px; flex: none; margin-top: 2px; }

/* form-level error (generic message) */
.form-alert {
  display: none; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: 9px; margin-bottom: 18px;
  background: var(--red-bg); border: 1px solid color-mix(in srgb, var(--red) 38%, transparent);
  font-size: 13px; color: var(--ink);
}
.form-alert.show { display: flex; }
.form-alert .ico { width: 17px; height: 17px; flex: none; color: var(--red); margin-top: 1px; }
.form-alert strong { font-weight: 700; }
.form-alert.is-locked { background: var(--amber-bg); border-color: color-mix(in srgb, var(--amber) 42%, transparent); }
.form-alert.is-locked .ico { color: var(--amber); }

/* ---- VARIANT A — centered light/dark card ---- */
.lv-a { display: grid; place-items: center; min-height: 100vh; padding: 76px 20px 40px; }
.lv-a .login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-md);
  padding: 34px 32px;
}

/* ---- VARIANT B — split: charcoal panel + form ---- */
.lv-b { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.lv-b__brandpanel {
  position: relative; overflow: hidden;
  background: #16110A; color: #F2EBE0;
  padding: 56px clamp(40px, 5vw, 76px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.lv-b__brandpanel::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 78% 8%, rgba(217,164,65,0.14), transparent 60%),
    repeating-linear-gradient(135deg, rgba(242,235,224,0.022) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.lv-b__brandpanel > * { position: relative; z-index: 1; }
.lv-b .bp-logo { display: inline-flex; align-items: center; gap: 12px; }
.lv-b .bp-logo .mark {
  width: 46px; height: 46px; border-radius: 11px; background: var(--gold);
  color: #16110A; font-weight: 800; font-size: 25px;
  display: inline-flex; align-items: center; justify-content: center;
}
.lv-b .bp-logo b { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.lv-b .bp-logo .jp { color: rgba(242,235,224,0.7); font-weight: 700; font-size: 14px; display:block; margin-top:2px; letter-spacing:0.1em; }
.lv-b .bp-pitch h2 {
  font-size: clamp(26px, 2.6vw, 38px); font-weight: 800;
  letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 16px; max-width: 16ch;
}
.lv-b .bp-pitch p { color: rgba(242,235,224,0.62); font-size: 15px; line-height: 1.6; max-width: 38ch; margin: 0; }
.lv-b .bp-meta {
  display: flex; gap: 22px; font: 600 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.1em; text-transform: uppercase; color: rgba(242,235,224,0.4);
}
.lv-b__formpanel { display: grid; place-items: center; padding: 60px 20px; background: var(--bg); }
.lv-b__formpanel .login-card { max-width: 380px; }
@media (max-width: 860px) {
  .lv-b { grid-template-columns: 1fr; }
  .lv-b__brandpanel { display: none; }
}

/* ---- VARIANT C — full dark, centered, framed ---- */
.lv-c {
  display: grid; place-items: center; min-height: 100vh; padding: 76px 20px 40px;
  background: #16110A;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -8%, rgba(217,164,65,0.10), transparent 62%);
}
.lv-c .login-card {
  background: #211C15; border: 1px solid #34302A; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); padding: 36px 34px;
  --ink: #F2EBE0; --ink-2: rgba(242,235,224,0.64); --ink-muted: rgba(242,235,224,0.44);
  --ink-faint: rgba(242,235,224,0.26); --border: rgba(242,235,224,0.13);
  --border-strong: rgba(242,235,224,0.28); --surface: #2A2620; --surface-2: #332E26;
  color: var(--ink);
}
.lv-c .login-lede { color: rgba(242,235,224,0.6); }
.lv-c .input { background: #1B1711; }

/* login variant visibility */
.lv-a, .lv-b, .lv-c { display: none; }
.auth-shell[data-login="a"] #login-screen .lv-a { display: grid; }
.auth-shell[data-login="b"] #login-screen .lv-b { display: grid; }
.auth-shell[data-login="c"] #login-screen .lv-c { display: grid; }

/* ============================================================
   CHANGE PASSWORD — policy hints
   ============================================================ */
.cp-wrap { display: grid; place-items: center; min-height: 100vh; padding: 80px 20px 40px; }
.cp-card {
  width: 100%; max-width: 760px;
  display: grid; grid-template-columns: 1fr 300px; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md);
}
.cp-form { padding: 34px 32px; }
.cp-aside {
  padding: 30px 26px; background: var(--surface-2);
  border-left: 1px solid var(--border);
}
@media (max-width: 740px) {
  .cp-card { grid-template-columns: 1fr; }
  .cp-aside { border-left: 0; border-top: 1px solid var(--border); }
}
.cp-forced {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: 9px; margin-bottom: 22px;
  background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  font-size: 13px; color: var(--ink); line-height: 1.5;
}
.cp-forced .ico { width: 17px; height: 17px; flex: none; color: var(--amber); margin-top: 1px; }

.policy-title {
  font: 600 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px;
}
.policy-role {
  font-size: 13px; color: var(--ink-2); margin-bottom: 18px;
}
.policy-role b { color: var(--ink); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.policy-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.policy-list li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 13px; color: var(--ink-2); line-height: 1.35;
}
.policy-list li .chk {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--border-strong); margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent; transition: all .15s;
}
.policy-list li .chk svg { width: 11px; height: 11px; }
.policy-list li.met { color: var(--ink); }
.policy-list li.met .chk { background: var(--running); border-color: var(--running); color: #fff; }

/* strength meter */
.strength { margin: 22px 0 4px; }
.strength-bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.strength-bar i {
  display: block; height: 100%; width: 0%; border-radius: 4px;
  background: var(--red); transition: width .25s, background .25s;
}
.strength.s1 i { width: 25%; background: var(--red); }
.strength.s2 i { width: 50%; background: var(--amber); }
.strength.s3 i { width: 75%; background: #6CB47D; }
.strength.s4 i { width: 100%; background: var(--running); }
.strength-label { margin-top: 7px; font-size: 12px; color: var(--ink-muted); display:flex; justify-content:space-between; }

/* pwned warning inline */
.pwned-warn {
  display: none; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 12.5px; color: var(--red);
}
.pwned-warn.show { display: flex; }
.pwned-warn .ico { width: 15px; height: 15px; flex: none; }

/* ============================================================
   ROLE LANDING (generic, parameterized)
   ============================================================ */
.landing-hero {
  display: flex; align-items: center; gap: 18px; margin-bottom: 24px;
}
.landing-hero .glyph {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.landing-hero .glyph svg { width: 28px; height: 28px; }
.landing-hero h1 { margin: 0 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.landing-hero .role-line { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 13.5px; }

.soon-card {
  border: 1px dashed var(--border-strong); background: var(--surface);
  border-radius: 12px; padding: 30px 28px; text-align: left;
}
.soon-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.soon-card p { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; line-height: 1.6; max-width: 60ch; }
.caps { display: flex; flex-direction: column; gap: 10px; }
.cap {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px;
}
.cap .ico { width: 17px; height: 17px; color: var(--ink-muted); flex: none; }
.cap .when {
  margin-left: auto; font: 600 10.5px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em; color: var(--ink-muted);
  padding: 4px 8px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border);
}

/* ============================================================
   READ-ONLY LIVE TRACKING (club_read_only / coach)
   ============================================================ */
.ro-banner {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 15px; border-radius: 10px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--ink-2);
}
.ro-banner .badge { margin-left: auto; }
.ro-banner .ico { width: 17px; height: 17px; color: var(--ink-muted); }

.live-list { display: flex; flex-direction: column; gap: 12px; }
.live-card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center;
  padding: 15px 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.live-card.is-now { border-color: color-mix(in srgb, var(--running) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--running) 30%, transparent), var(--shadow-sm); }
.live-card.is-soon { border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.live-tatami {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 0; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}
.live-tatami .t-num { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-tatami .t-lbl { font: 600 8.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.live-judoka { min-width: 0; }
.live-judoka .nm { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.live-judoka .cat { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.live-judoka .cat .mono { color: var(--ink-muted); }
.live-status { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.live-eta { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.live-eta b { color: var(--ink); }

/* simple count chips on read-only header */
.ro-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.ro-stat {
  display: flex; align-items: baseline; gap: 7px;
  padding: 8px 13px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border);
}
.ro-stat .n { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ro-stat .l { font-size: 12px; color: var(--ink-2); }

/* ============================================================
   TWEAKS PANEL (login variant + theme demo)
   ============================================================ */
.proto-dock {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.proto-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 15px; border-radius: 11px;
  background: #16110A; color: #F2EBE0; border: 1px solid #34302A;
  font: 600 12.5px/1 'Inter', sans-serif; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.proto-toggle:hover { background: #211C15; }
.proto-toggle .ico { width: 15px; height: 15px; color: var(--gold); }
.proto-panel {
  display: none; width: 290px; padding: 16px;
  background: #1C1812; color: #F2EBE0; border: 1px solid #34302A;
  border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.proto-panel.open { display: block; }
.proto-panel h4 {
  margin: 0 0 3px; font-size: 13px; font-weight: 700;
}
.proto-panel .psub { margin: 0 0 16px; font-size: 11.5px; color: rgba(242,235,224,0.5); }
.proto-grp { margin-bottom: 16px; }
.proto-grp > label {
  display: block; margin-bottom: 8px;
  font: 600 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(242,235,224,0.5);
}
.seg { display: flex; gap: 4px; background: #14110C; padding: 4px; border-radius: 9px; }
.seg button {
  flex: 1; height: 30px; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; color: rgba(242,235,224,0.62);
  font: 600 12px/1 'Inter', sans-serif;
}
.seg button:hover { color: #F2EBE0; }
.seg button.on { background: var(--gold); color: #16110A; }
.proto-jump { display: flex; flex-direction: column; gap: 4px; }
.proto-jump button {
  display: flex; align-items: center; gap: 9px; justify-content: flex-start;
  height: 34px; padding: 0 11px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: rgba(242,235,224,0.78);
  font: 500 12.5px/1 'Inter', sans-serif; text-align: left;
}
.proto-jump button:hover { background: #14110C; border-color: #34302A; color: #F2EBE0; }
.proto-jump button .rt {
  margin-left: auto; font: 600 9px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.06em; color: var(--gold);
}

/* ============================================================
   CLUB PORTAL — data tables (sort/filter) + modal forms (spec 030)
   ============================================================ */
/* tools row above a table: filter on the left, "add" button on the right */
.section-tools {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.tbl-filter {
  flex: 1; min-width: 0; max-width: 320px; height: 34px;
  padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-size: 13px;
}
.tbl-filter::placeholder { color: var(--ink-faint); }
.tbl-filter:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent);
}
.section-tools .grow { flex: 1; }

/* sortable header cells */
.tbl th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th.sortable:hover { color: var(--ink); }
.tbl th.sortable::after { content: "↕"; margin-left: 6px; opacity: 0.4; font-size: 10px; }
.tbl th.sortable[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.tbl th.sortable[aria-sort="descending"]::after { content: "↓"; opacity: 1; }

.tbl td .block { display: block; font-size: 12px; color: var(--ink-muted); }
.tbl tbody td form { display: inline; margin: 0; }
/* bulk-select checkbox column (ADR-0066 bulk-activate) */
.tbl th.chk-col, .tbl td.chk-col { width: 34px; text-align: center; padding-right: 0; }
.tbl .chk-col input { cursor: pointer; }

/* KPI dashboard tiles (ADR-0066 #7 — tournament status card) */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpi {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.kpi-num {
  font-size: 21px; font-weight: 700; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.kpi-lbl {
  font-size: 11px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Grouped categories (panel v3): one box per age x gender, 2 items per line */
/* Each division (age x gender) is its own bordered card, like the execution
   blocks, so one division reads apart from the next. */
.cat-box { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cat-box-head {
  font-weight: 700; font-size: 11.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-muted);
  padding: 8px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.cat-box-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; padding: 10px 12px;
}
/* Each weight class is a bordered pill so it reads as belonging to its
   category box: weight + duration grouped left, actions pushed right. A
   stronger border + faint shadow make each one read as its own container. */
.cat-item {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.cat-item-w { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; }
.cat-item-dur {
  font-size: 11.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.cat-item-sp { flex: 1; min-width: 6px; }
.cat-item form { display: inline; margin: 0; }
.cat-item .btn-ico { width: 26px; height: 26px; }
.cat-item:hover { background: var(--surface-2); border-color: var(--border-strong); }
/* Gender accent on the inscription bases boxes so the F and M groups read
   apart instead of a flat white stack (mirrors the catalog g-F / g-M). */
.bases-catlist .cat-box { border-left: 3px solid transparent; }
.cat-box--f {
  border-left-color: var(--accent-2, #b5468a);
  background: color-mix(in srgb, var(--accent-2, #b5468a) 5%, transparent);
}
.cat-box--m {
  border-left-color: var(--accent-3, #3a6ea5);
  background: color-mix(in srgb, var(--accent-3, #3a6ea5) 5%, transparent);
}
.cat-box--f .cat-box-head { color: var(--accent-2, #b5468a); }
.cat-box--m .cat-box-head { color: var(--accent-3, #3a6ea5); }
@media (max-width: 1100px) {
  .cat-box-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cat-box-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .cat-box-grid { grid-template-columns: 1fr; } }

/* Club-grouped judokas (panel v3): a header row per club tbody */
.club-head-row > td {
  background: var(--surface-2);
  padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--border);
}
.club-head-row b { color: var(--ink); font-size: 15px; font-weight: 700; }
.club-head-row .muted { font-size: 12px; }

/* Bulk action bar under the judokas table (Activar / Retirar / Reinscribir) */
.bulk-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.bulk-lbl { font-size: 12px; color: var(--ink-muted); margin-right: 2px; }
.bulk-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.bulk-actions .btn svg { flex: none; }

/* Floating tournament-status card (panel v3): sticky on wide viewports,
   sitting just below the 56px sticky topbar. The column stretches to the
   row height so the card has room to travel as the page scrolls. */
@media (min-width: 901px) {
  .status-col { align-self: stretch; }
  .tourn-status-sticky { position: sticky; top: 72px; }
}
.tbl-empty { padding: 18px; font-size: 13.5px; color: var(--ink-muted); }
/* horizontal-scroll safety so a wide table never breaks the card layout */
.table-host { overflow-x: auto; }

/* club blocks (system panel): a row + collapsible people preview */
.club-block { border-top: 1px solid var(--border); }
.club-block:first-child { border-top: 0; }
.club-block-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; cursor: pointer; }
.club-block-head:hover { background: var(--surface-2); }
.club-block-head .row-actions { margin-left: auto; }
.club-block-head .ct-name { font-weight: 700; }
.club-block-head .ct-meta { display: block; color: var(--ink-muted); font-size: 12px; margin-top: 2px; }
.club-toggle {
  display: inline-flex; padding: 3px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); border-radius: 6px;
}
.club-toggle:hover { color: var(--ink); background: var(--surface-2); }
.club-toggle svg { transition: transform .15s; }
.club-block-head[aria-expanded="true"] .club-toggle svg { transform: rotate(90deg); }
.club-people {
  padding: 4px 18px 14px 48px; display: flex; flex-direction: column; gap: 9px;
  background: var(--surface-2); border-top: 1px solid var(--border);
}
.club-people .cp { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.club-people .cp .role-tag { margin-left: auto; }
.club-people .empty { color: var(--ink-muted); font-size: 13px; }
/* judoka rows inside a collapsible club block (tournament panel) */
.club-people .jk .jk-name { font-weight: 600; color: var(--ink); }
.club-people .jk .jk-cat { color: var(--ink-muted); font-size: 12.5px; }
.club-people .jk .badge { margin-left: auto; }
.club-people .jk .row-actions { display: inline-flex; gap: 6px; }
.club-people .jk form { display: inline; margin: 0; }

/* category catalog management (ADR-0067) */
.wchip {
  font-size: 12px; padding: 2px 8px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.cat-edit-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; align-items: end; margin-top: 6px;
}
.cat-edit-form .field { margin-bottom: 0; }
@media (max-width: 640px) { .cat-edit-grid { grid-template-columns: 1fr; } }

/* weight-class editor: dynamic rows feeding weight_code/min/max (ADR-0067) */
.wt-form { margin: 2px 0 16px; }
.wt-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.wt-title { font-weight: 700; font-size: 13px; color: var(--ink); }
.wt-hint { font-size: 11.5px; }
.wrows { display: flex; flex-direction: column; gap: 6px; }
.wrow {
  display: grid; gap: 8px; align-items: center;
  grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}
.wrow .input { margin: 0; }
.wrow-off .wr-code, .wrow-off .wr-kg { opacity: 0.45; text-decoration: line-through; }
.wr-code { font-weight: 600; font-variant-numeric: tabular-nums; }
.wr-kg { font-variant-numeric: tabular-nums; }
.wr-del, .wr-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--ink-muted);
}
.wr-del:hover { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.wr-del svg { width: 15px; height: 15px; }
/* weight on/off toggle: green eye when active, muted eye-off when inactive */
.wr-toggle svg { width: 16px; height: 16px; }
.wr-toggle .i-off { display: none; }
.wr-toggle[aria-pressed="true"] { color: var(--running); border-color: color-mix(in srgb, var(--running) 45%, var(--border)); }
.wr-toggle[aria-pressed="false"] .i-on { display: none; }
.wr-toggle[aria-pressed="false"] .i-off { display: block; }
.wt-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.wt-add { border: 1px dashed var(--border); color: var(--ink-2); background: transparent; }
.wt-add:hover { border-color: var(--gold, #e6b455); color: var(--ink); }
@media (max-width: 640px) {
  .wrow { grid-template-columns: auto 1fr 1fr auto; }
  .wr-code { grid-column: 2 / -1; }
}

/* /admin/categories layout: paired F|M catalog + floating dashboard (ADR-0067) */
.cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.cat-aside { position: sticky; top: 72px; }
.cat-toolbar { margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.cat-toolbar .btn { flex: none; white-space: nowrap; }
.cat-search { position: relative; flex: 1 1 auto; }
.cat-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-muted); pointer-events: none; }
.cat-search .input { margin: 0; padding-left: 34px; width: 100%; }

/* admin section nav: 3 flat sections in the topbar (ADR-0063) */
.admin-nav { display: flex; gap: 4px; align-items: center; }
.anav-link {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); text-decoration: none; border: 1px solid transparent;
}
.anav-link svg { width: 16px; height: 16px; }
.anav-link:hover { color: var(--ink); background: var(--surface-2); }
.anav-link.is-active {
  color: var(--ink); background: var(--surface-2); border-color: var(--border);
}
@media (max-width: 760px) { .anav-link span { display: none; } }
/* System-admin club drill-in: a light context strip under the dark topbar
   naming the club being inspected + its sections (ADR-0063). The sys_admin
   keeps their own section nav in the topbar above. */
.context-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.context-bar .ctx-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--ink-2);
}
.context-bar .ctx-label svg { width: 15px; height: 15px; flex: none; }
.context-bar .ctx-label b { color: var(--ink); font-weight: 700; }

/* tournament bases (read-only) on the inscription page (ADR-0063) */
.bases-card { margin-bottom: 18px; }
.bases-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 22px; }
.bi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bi-k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 6px; }
.bi-v { font-size: 14px; color: var(--ink); font-weight: 600; }
.bases-cats { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.bc-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.bases-catlist { max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
/* judokas the tournament has no category for — collapsed box, 3 per row */
.nocat-details { padding: 0; }
.nocat-details > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 10px; padding: 14px 18px; font-size: 13px;
}
.nocat-details > summary::-webkit-details-marker { display: none; }
.nocat-details > summary .nd-title { font-weight: 700; color: var(--ink); }
.nocat-details > summary .nd-meta { font-size: 12px; color: var(--ink-muted); }
.nocat-details > summary .nd-chev { width: 16px; height: 16px; color: var(--ink-muted); transition: transform 0.15s; }
.nocat-details[open] > summary { border-bottom: 1px solid var(--border); }
.nocat-details[open] > summary .nd-chev { transform: rotate(90deg); }
.nocat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 18px; }
.nocat-cell {
  display: flex; align-items: flex-start; gap: 8px; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2);
}
.nocat-cell .cell-avatar { margin-top: 1px; }
.nocat-cell .meta { min-width: 0; }
.nocat-cell .nm { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nocat-cell .rsn { font-size: 11px; color: var(--ink-muted); margin-top: 1px; }
.nocat-cell .rsn .would-be { display: block; font-weight: 600; color: var(--ink-2); }
.nocat-cell .rsn .rsn-note { display: block; font-size: 10.5px; color: var(--ink-faint); }
.nocat-cell.is-incomplete { border-color: color-mix(in srgb, var(--amber) 35%, var(--border)); }
.nocat-cell.is-incomplete .rsn { color: var(--amber); }
@media (max-width: 720px) { .nocat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .nocat-grid { grid-template-columns: 1fr; } }
.cat-groups { display: flex; flex-direction: column; gap: 12px; }
.cat-group { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.cat-group-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.cgh-label { font-size: 16px; font-weight: 700; color: var(--ink); }
.cgh-age { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-muted); }
.cgh-age svg { width: 13px; height: 13px; }
.cgh-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; margin-left: auto; }
.cat-pair { display: grid; grid-template-columns: 1fr 1fr; }
.cat-pair > .cat-cell:first-child { border-right: 1px solid var(--border); }
.cat-cell { min-width: 0; }
.cat-cell-empty { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 12.5px; }
.cc-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; }
.cc-head:hover { background: var(--surface-2); }
.cc-gender { font-weight: 600; font-size: 13px; }
.g-F { color: var(--accent-2, #b5468a); }
.g-M { color: var(--accent-3, #3a6ea5); }
.cc-summary { font-size: 12px; color: var(--ink-muted); }
.cat-cell-off .cc-head { opacity: 0.6; }
.cc-body { padding: 4px 12px 14px; border-top: 1px solid var(--border); }
.cc-grade-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 12px; }
/* full grade path: each step pairs a belt swatch with its label */
.grade-step { display: inline-flex; align-items: center; gap: 4px; }
.grade-sep { margin: 0 -2px 0 -4px; color: var(--ink-muted); }
/* belt swatches by colour (FDN/IJF) */
.belt { display: inline-block; width: 13px; height: 13px; border-radius: 3px; border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.belt-white { background: #f4f4f2; }
.belt-yellow { background: #f2d544; }
.belt-orange { background: #e8842a; }
.belt-green { background: #3f9b52; }
.belt-blue { background: #3a6ea5; }
.belt-brown { background: #7a4b2b; }
.belt-black { background: #1d1d20; }
.belt-red { background: #c0392b; }
.belt-red_white { background: linear-gradient(135deg, #c0392b 0 50%, #f4f4f2 50% 100%); }
/* grade as a belt-coloured pill in the club roster (reuses the .belt-* fills) */
.grade-chip { display: inline-flex; align-items: center; height: 21px; padding: 0 9px; border-radius: 6px; font: 600 11px/1 'Inter', sans-serif; white-space: nowrap; border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
.grade-chip.belt-white, .grade-chip.belt-yellow, .grade-chip.belt-orange { color: #1d1d20; }
.grade-chip.belt-green, .grade-chip.belt-blue, .grade-chip.belt-brown, .grade-chip.belt-black, .grade-chip.belt-red, .grade-chip.belt-red_white { color: #f4f4f2; }
/* red-and-white pill: solid red so the label stays legible, with a white foot
   stripe as the second-colour cue (the split gradient would sit under the text) */
.grade-chip.belt-red_white { background: #c0392b; box-shadow: inset 0 -3px 0 #f4f4f2; }
/* club roster belt distribution (ADR-0060): a tinted belt icon + count per
   colour, white -> black. The icon's faint stroke keeps it visible on both
   themes (white on light, black on dark). */
.belt-summary { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.belt-summary-label { font: 600 11px/1 'Inter', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.belt-tally-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; }
.belt-tally { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); }
.belt-tally.is-zero { opacity: 0.38; }
.belt-tally b { font-weight: 700; color: var(--ink); }
.belt-ico { width: 44px; height: 30px; display: block; stroke: color-mix(in srgb, var(--ink) 32%, transparent); stroke-width: 0.8; }
/* Author: sorteo dashboard belts ~1.5× — the colour belt needs no title. */
.insc-dash .ic-kpi--belts .belt-ico { width: 66px; height: 45px; }
.insc-dash .ic-kpi--belts .belt-tally { font-size: 15px; gap: 6px; }
.insc-dash .ic-kpi--belts .belt-tally-row { gap: 8px 18px; }
/* Projected medals KPI (author R7c): place medallions + per-metal counts. */
.insc-dash .ic-kpi--medals .medal-tally {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  width: 100%; margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--border);
}
.insc-dash .ic-kpi--medals .medal-tally__c { display: inline-flex; align-items: center; gap: 5px; }
.insc-dash .ic-kpi--medals .medal-tally__c b { font: 700 16px/1 'Inter', sans-serif; color: var(--ink); }
.belt-ink-white { color: #f4f4f2; }
.belt-ink-yellow { color: #f2d544; }
.belt-ink-orange { color: #e8842a; }
.belt-ink-green { color: #3f9b52; }
.belt-ink-blue { color: #3a6ea5; }
.belt-ink-brown { color: #7a4b2b; }
.belt-ink-black { color: #1d1d20; }
.belt-ink-red { color: #c0392b; }
.belt-ink-red_white { color: #c0392b; --belt-stripe: #f4f4f2; }
/* belt-icon side panels: transparent except on red-and-white (6-8 dan) */
.belt-stripe { fill: var(--belt-stripe, transparent); }
.cat-empty { padding: 16px; text-align: center; color: var(--ink-muted); font-size: 13px; }
/* dashboard card */
.kpi-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px; }
.kpi-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); margin-bottom: 10px; }
.kpi-card .kpi svg { width: 17px; height: 17px; color: var(--ink-muted); margin-bottom: 3px; }
.kpi-note { font-size: 11.5px; color: var(--ink-muted); margin-top: 10px; line-height: 1.45; }
@media (max-width: 900px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-aside { position: static; order: -1; }
}
@media (max-width: 560px) {
  .cat-pair { grid-template-columns: 1fr; }
  .cat-pair > .cat-cell:first-child { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* owner picker: searchable list of eligible owners (spec 033 create modal) */
.owner-picker { display: flex; flex-direction: column; gap: 8px; }
.owner-options {
  max-height: 196px; overflow-y: auto; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
}
.owner-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 11px; background: none; border: 0;
  border-bottom: 1px solid var(--border); cursor: pointer; color: var(--ink);
}
.owner-opt:last-child { border-bottom: 0; }
.owner-opt:hover { background: var(--surface-2); }
.owner-opt.is-selected { background: var(--running-bg); }
.owner-opt .cell-avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.owner-opt .meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.owner-opt .meta .nm { font-weight: 600; font-size: 13px; }
.owner-opt .meta .em { font-size: 11.5px; color: var(--ink-muted); }
.owner-empty {
  padding: 16px 12px; text-align: center; color: var(--ink-muted); font-size: 13px;
}

/* ============================================================
   Tournament owner view (spec 033 / ADR-0063 T4) — homologated to
   the admin_* system; no new color/size tokens.
   ============================================================ */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.tourn-title { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.tourn-title h1 { margin: 0; }
.tourn-meta {
  display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap;
  margin-top: 10px; color: var(--ink-2); font-size: 13.5px;
}
.tourn-meta .mi { display: inline-flex; align-items: center; gap: 7px; }
.tourn-meta .mi .ico { width: 15px; height: 15px; color: var(--ink-muted); }
.tourn-meta .mi.missing, .tourn-meta .mi.missing .ico { color: var(--amber); }

/* bases editor */
.bases-grid { display: grid; gap: 18px; }
.bases-block > .blk-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font: 600 11px/1 'IBM Plex Mono', monospace; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
}
.bases-block > .blk-label .ico { width: 15px; height: 15px; }

/* open-inscription gate */
.open-gate { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.open-gate.is-ready { border-color: color-mix(in srgb, var(--running) 42%, transparent); }
.open-gate .og-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
}
.og-head .og-ttl { font-size: 14px; font-weight: 700; }
.og-head .og-state {
  margin-left: auto; font: 600 11px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.05em; color: var(--ink-muted);
}
.og-checklist {
  list-style: none; margin: 0; padding: 10px 18px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
/* Read-only status rows (not controls): a flat dot/check + a status pill, so
   they don't read as a clickable checkbox. */
.og-checklist li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; font-size: 13.5px; color: var(--ink-2); cursor: default;
}
.og-checklist li .og-dot {
  width: 16px; height: 16px; flex: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.og-checklist li .og-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-strong);
}
.og-checklist li .og-dot svg { display: none; width: 15px; height: 15px; color: var(--running); }
.og-checklist li .og-name { flex: 1 1 auto; }
.og-checklist li.met { color: var(--ink); }
.og-checklist li.met .og-dot::before { display: none; }
.og-checklist li.met .og-dot svg { display: inline; }
.og-checklist li .og-status {
  margin-left: auto; flex: none;
  font: 600 9.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  color: var(--ink-faint); background: var(--surface-2);
}
.og-checklist li.met .og-status {
  color: var(--running); background: var(--running-bg);
}
.og-foot {
  padding: 15px 18px; border-top: 1px solid var(--border);
  background: var(--surface-2); display: flex; align-items: center; gap: 13px;
}
.og-foot .og-hint { font-size: 12.5px; color: var(--ink-muted); line-height: 1.45; }
.og-foot form, .og-foot .btn { margin-left: auto; flex: none; }

/* Embedded in the status card (unified box, ADR-0065): drop the standalone
   box chrome so the open-inscription gate reads as one card section, not a
   box-in-box. The status card already supplies the border, padding and head. */
.open-gate.og-embed {
  border: 0; border-radius: 0; background: none; overflow: visible;
}
.open-gate.og-embed .og-head {
  padding: 0 0 2px; border-bottom: 0;
}
.open-gate.og-embed .og-head .og-ttl { font-size: 12.5px; color: var(--ink-muted); }
.open-gate.og-embed .og-checklist { padding: 0; }
.open-gate.og-embed .og-foot {
  padding: 12px 0 0; border-top: 0; background: none; display: block;
}

/* Region scope checklist grouped by macro-zone (north -> south, ADR-0072). */
.scope-zone + .scope-zone { margin-top: 12px; }
.scope-zone-hd {
  font: 700 10px/1 'IBM Plex Mono', monospace; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px;
}

/* inscription open (registration) */
.open-live {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px; border-radius: 12px;
  background: var(--running-bg);
  border: 1px solid color-mix(in srgb, var(--running) 38%, transparent);
}
.open-live .ico { width: 22px; height: 22px; flex: none; color: var(--running); }
.open-live .ol-txt b { display: block; color: var(--ink); font-size: 14px; }
.open-live .ol-txt span { font-size: 12.5px; color: var(--ink-2); }
.open-live .badge { margin-left: auto; }

/* read-only edge banner (En curso / Finalizado) */
.ro-edge {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 15px; border-radius: 10px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; color: var(--ink-2);
}
.ro-edge .ico { width: 17px; height: 17px; color: var(--ink-muted); flex: none; }
.ro-edge .badge { margin-left: auto; }

/* multi-tournament picker */
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .picker-grid { grid-template-columns: 1fr; } }
.picker-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: border-color .12s, box-shadow .12s, transform .08s; color: var(--ink);
}
.picker-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.picker-card:active { transform: translateY(1px); }
.picker-card .pc-top { display: flex; align-items: center; gap: 10px; }
.picker-card .pc-top h3 { margin: 0; font-size: 16px; font-weight: 700; flex: 1; }
.picker-card .pc-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--ink-2); }
.picker-card .pc-meta .pm { display: inline-flex; align-items: center; gap: 8px; }
.picker-card .pc-meta .pm .ico { width: 14px; height: 14px; color: var(--ink-muted); }
.picker-card .pc-meta .pm.missing, .picker-card .pc-meta .pm.missing .ico { color: var(--amber); }
.picker-card .pc-cta {
  margin-top: 2px; display: inline-flex; align-items: center; gap: 7px;
  font: 600 12.5px/1 'Inter', sans-serif; color: var(--gold);
}
.picker-card .pc-cta .ico { width: 15px; height: 15px; }

/* categories list (owner view) */
.cat-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.cat-row {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 16px;
  align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.cat-row:last-child { border-bottom: 0; }
.cat-row:hover { background: var(--surface-2); }
.cat-name { font-weight: 600; font-size: 14px; }
.cat-dur {
  font: 600 12.5px/1 'IBM Plex Mono', monospace; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.cat-tatami {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2);
}
.cat-tatami .t-chip {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1px solid var(--border);
  font: 700 12px/1 'IBM Plex Mono', monospace; color: var(--ink);
}
.cat-empty {
  padding: 30px 18px; text-align: center; color: var(--ink-muted);
  font-size: 13.5px; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
}
.cat-empty .ico { width: 26px; height: 26px; color: var(--ink-faint); }

/* club dashboard: dominant judokas (left) + controlled column (right) */
.club-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
/* the right column (summary + administration) floats with the scroll, like the
   other dashboards' asides (sits below the 56px topbar). Static once stacked. */
.club-aside { position: sticky; top: 72px; }
@media (max-width: 980px) { .club-grid { grid-template-columns: 1fr; } .club-aside { position: static; } }
.club-name { text-transform: uppercase; }

/* metrics panel (right column): 3 KPI tiles in one row, each with an icon */
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric {
  padding: 14px 8px; border-radius: 11px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.metric .ico-kpi { display: block; width: 20px; height: 20px; margin: 0 auto 7px; color: var(--gold); }
.metric .n { font-size: 23px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.metric .l { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); line-height: 1.25; }

/* stacked info notes (one per line, each with its own icon) */
.note-list { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.note-line { display: flex; align-items: flex-start; gap: 8px; }
.note-line svg { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--ink-muted); }

/* compact icon action buttons (roster + administration rows) */
.btn-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2);
}
.btn-ico svg { width: 14px; height: 14px; }
.btn-ico:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface-2); }
.btn-ico.danger { color: var(--red); }
.btn-ico.danger:hover { border-color: var(--red); background: var(--red-bg); }
.btn-ico:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ico:disabled:hover {
  color: var(--ink-2); border-color: var(--border); background: var(--surface);
}

/* compact row-action buttons */
.btn-xs {
  display: inline-flex; align-items: center; justify-content: center;
  height: 27px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink-2); font: 600 12px/1 'Inter', sans-serif;
}
.btn-xs:hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface-2); }
.btn-xs-danger { color: var(--red); }
.btn-xs-danger:hover { background: var(--red-bg); border-color: var(--red); }

/* ---- Modal dialog (native <dialog>) ---- */
.modal {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 0;
  border-radius: 16px; background: transparent; color: var(--ink);
}
.modal::backdrop { background: rgba(16, 12, 6, 0.5); }
.modal.modal-sm { width: min(420px, calc(100vw - 32px)); }
.modal.modal-lg { width: min(680px, calc(100vw - 32px)); }
.modal-body p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.modal-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-md); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); cursor: pointer;
}
.modal-close:hover { color: var(--ink); background: var(--surface-2); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-2);
}

/* ============================================================
   Club inscription (spec 030 H5 / ADR-0064) — from the claude/design
   concept. New structural pieces only; reuses --gold / --running /
   --amber / --ink / --surface tokens (no new tokens).
   ============================================================ */

/* §4.1 — «Inscripciones» entry table cells */
.tbl td .tt-name { font-weight: 700; color: var(--ink); }
.tbl td .tt-place {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-size: 13px;
}
.tbl td .tt-place .ico { width: 14px; height: 14px; color: var(--ink-muted); flex: none; }
.tbl td .tt-date { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
/* icon-only action buttons keep to one row; the date no longer gets squeezed */
.tt-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
/* «Inscritos del club» hub column: a Pendiente + Aceptada chip pair (ADR-0066)
   over the eligible total. Colours homologated with the inscribe page pills
   (.cat-pill): «Pendiente» = amber (waiting on the owner), «Aceptada» = green
   (in the draw). */
.club-count {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px;
  font-variant-numeric: tabular-nums;
}
.club-count .cc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px;
}
.club-count .cc-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.club-count .cc-chip .ico { width: 13px; height: 13px; flex: none; }
.club-count .cc-pending { color: var(--amber); background: var(--amber-bg); }
.club-count .cc-accepted { color: var(--running); background: var(--running-bg); }
.club-count .cc-none { font-size: 12.5px; color: var(--ink-muted); }
.club-count .cc-of { font-size: 11.5px; color: var(--ink-muted); }

/* empty state (no open tournaments / no judokas) */
.insc-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 40px 22px; color: var(--ink-muted);
}
.insc-empty .ico { width: 30px; height: 30px; color: var(--ink-faint); margin-bottom: 4px; }
.insc-empty b { color: var(--ink-2); font-size: 14px; font-weight: 700; }
.insc-empty span { font-size: 13px; max-width: 42ch; line-height: 1.5; }

/* §4.2 — inscription numeric dashboard (KPI tiles, no progress bar) */
.insc-counter {
  display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.insc-counter .ic-kpi {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 104px; padding: 8px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.insc-counter .ic-kpi .num {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink);
}
.insc-counter .ic-kpi .cap { font-size: 12px; color: var(--ink-2); }
.insc-counter .ic-kpi--primary {
  background: color-mix(in srgb, var(--gold) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
}
.insc-counter .ic-kpi--on .num { color: var(--running); }
.insc-counter .ic-kpi--muted { opacity: 0.9; }
.insc-counter .ic-kpi--muted .num { color: var(--ink-muted); }
.insc-counter .ic-total {
  margin-left: auto; align-self: center;
  font-size: 12.5px; color: var(--ink-muted);
}

/* §4.2c — two-column inscription: content + floating dashboard aside.
   The dashboard sits on the right and stays in view while the list scrolls. */
.insc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px; align-items: start;
}
.insc-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.insc-aside { position: sticky; top: 72px; }
@media (max-width: 980px) {
  .insc-layout { grid-template-columns: 1fr; }
  .insc-aside { position: static; }
}
.insc-dash { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.insc-dash .ic-kpi {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  align-items: center; text-align: center;
}
.insc-dash .ic-kpi .num {
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1; color: var(--ink);
}
.insc-dash .ic-kpi .cap {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--ink);
  /* reset the global .cap box (icon + label only, no gray pill) */
  padding: 0; border: 0; background: none; border-radius: 0;
}
.insc-dash .ic-kpi .cap .ico { width: 15px; height: 15px; flex: none; color: var(--ink-muted); }
.insc-dash .ic-kpi .sub { font-size: 11.5px; color: var(--ink-muted); }
.insc-dash .ic-kpi--primary {
  background: color-mix(in srgb, var(--gold) 13%, var(--surface));
  border-color: color-mix(in srgb, var(--gold) 42%, transparent);
}
.insc-dash .ic-kpi--on .num { color: var(--running); }
.insc-dash .ic-kpi--on .cap .ico { color: var(--running); }
.insc-dash .ic-kpi--warn .num { color: var(--amber); }
.insc-dash .ic-kpi--warn .cap .ico { color: var(--amber); }
.insc-dash .ic-kpi--info .num { color: var(--pending); }
.insc-dash .ic-kpi--info .cap .ico { color: var(--pending); }
.insc-dash .ic-kpi--primary .cap .ico { color: var(--gold); }
.insc-dash .ic-kpi--muted .num { color: var(--ink-muted); }
/* Estimated combats per system (author R5): one line per system, dot + share */
/* colour mirror the a1 .sys-* chips. data-sys avoids the global .sys-* bg. */
.insc-dash .ic-kpi--systems { align-items: stretch; gap: 5px; padding: 9px 14px; }
.insc-dash .ic-kpi--systems .cap { justify-content: center; margin-bottom: 2px; }
.insc-dash .sys-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink);
}
.insc-dash .sys-row b { font-weight: 600; }
.insc-dash .sys-row .sys-dot {
  width: 11px; height: 11px; border-radius: 3px; flex: none;
  background: var(--sys-c, var(--ink-muted));
}
.insc-dash .sys-row__n {
  margin-left: auto; color: var(--ink-2); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.insc-dash .sys-row[data-sys="bo3"] { --sys-c: #D9483A; }
.insc-dash .sys-row[data-sys="rr"] { --sys-c: #4D8BE8; }
.insc-dash .sys-row[data-sys="pool"] { --sys-c: #6CB47D; }
.insc-dash .sys-row[data-sys="elim"] { --sys-c: #E89148; }
/* Belt tally of the participants (author R5 #4): same swatches as admin/club, */
/* shrunk to fit the narrow dashboard column. */
.insc-dash .ic-kpi--belts { align-items: stretch; gap: 4px; padding: 9px 14px; }
.insc-dash .ic-kpi--belts .cap { justify-content: center; margin-bottom: 3px; }
/* author R6: two belts per row, balanced 2-column grid (no 3+1 wrap). */
.insc-dash .ic-kpi--belts .belt-tally-row {
  display: grid; grid-template-columns: repeat(2, max-content);
  justify-content: center; gap: 6px 18px;
}
.insc-dash .ic-kpi--belts .belt-tally { font-size: 12px; gap: 4px; }
.insc-dash .ic-kpi--belts .belt-ico { width: 32px; height: 22px; }
.insc-dash .ic-total { font-size: 12px; color: var(--ink-muted); text-align: center; margin-top: 2px; }
.insc-dash .ic-foot {
  margin: 6px 0 0; font-size: 11px; color: var(--ink-muted); line-height: 1.4;
  border-top: 1px solid var(--border); padding-top: 9px;
}
/* bases field labels + section headers carry an icon */
.bi-k .ico { width: 14px; height: 14px; flex: none; color: var(--ink-muted); }
.card-head h2 .ico { width: 17px; height: 17px; vertical-align: -3px; margin-right: 7px; color: var(--ink-muted); }
/* non-inscribable: would-be categories one per line */
.rsn-cats { display: flex; flex-direction: column; gap: 2px; }
.rsn-cats .would-be { display: block; font-weight: 600; color: var(--ink-2); }

/* per-judoka rows */
.insc-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.insc-toolbar .hint {
  font-size: 12.5px; color: var(--ink-muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.insc-toolbar .hint .ico { width: 15px; height: 15px; color: var(--ink-muted); flex: none; }

.insc-list { display: flex; flex-direction: column; }
.insc-row {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) minmax(280px, 1.6fr);
  gap: 18px; align-items: center;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.insc-row:last-child { border-bottom: 0; }
.insc-row:hover { background: var(--surface-2); }
.insc-row.is-incomplete { background: color-mix(in srgb, var(--amber-bg) 60%, transparent); }
.insc-row.is-incomplete:hover { background: var(--amber-bg); }
.insc-row.is-nocat { opacity: 0.72; }
@media (max-width: 720px) {
  .insc-row { grid-template-columns: 1fr; gap: 12px; }
  .insc-row .insc-act { justify-self: start; align-items: flex-start; }
}

.insc-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.insc-who .cell-avatar { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.insc-who .meta { min-width: 0; }
.insc-who .meta .nm {
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.insc-who .meta .dl {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  margin-top: 3px; font-size: 12px; color: var(--ink-muted);
}
.insc-who .meta .dl .pip { font-variant-numeric: tabular-nums; }
.insc-who .meta .dl .pip.mono { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }
.insc-who .meta .dl .pip .age { color: var(--ink-muted); }
.insc-who .meta .dl .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.insc-who .insc-check { width: 16px; height: 16px; flex: none; cursor: pointer; }

/* batch bar: select-all + bulk inscribe/withdraw toolbar (ADR-0068) */
.insc-bulkbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.insc-selall {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}

/* per-category inscribe/withdraw rows (one explicit button per category) */
.insc-cats-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.insc-catrow {
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 5px 10px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface);
}
/* flexible spacers center the category name in the space before the action */
.insc-catrow .cat-fill { flex: 1 1 0; min-width: 4px; }
.insc-catrow .cat-name {
  font-weight: 600; font-size: 13px; color: var(--ink); text-align: center;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cat-principal-tag {
  font: 700 9.5px/1 'Inter', sans-serif; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--gold, #b8860b);
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
  padding: 2px 6px; border-radius: 5px; flex: none;
}
.insc-catrow .cat-state {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 11.5px; color: var(--ink-muted);
}
.insc-catrow .cat-state .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong);
}
.insc-catrow .cat-state.on { color: var(--running); }
.insc-catrow .cat-state.on .dot { background: var(--running); }
/* the button itself is the state (ADR-0068): Inscribir -> Inscrito / Activo */
.cat-act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex: none; min-width: 120px;
  height: 30px; padding: 0 13px; border-radius: 8px; cursor: pointer;
  font: 600 12.5px/1 'Inter', sans-serif; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.cat-act .ico { width: 14px; height: 14px; flex: none; }
.cat-act.is-add { color: var(--running); border-color: color-mix(in srgb, var(--running) 45%, transparent); }
.cat-act.is-add:hover { background: var(--running-bg); border-color: var(--running); }
.cat-act.is-reg {
  color: var(--amber); background: var(--amber-bg);
  border-color: color-mix(in srgb, var(--amber) 42%, transparent);
}
.cat-act.is-reg:hover { background: color-mix(in srgb, var(--amber) 18%, var(--surface)); border-color: var(--amber); }
.cat-act.is-act {
  color: var(--running); background: var(--running-bg);
  border-color: color-mix(in srgb, var(--running) 46%, transparent);
}
.cat-act.is-act:hover { background: color-mix(in srgb, var(--running) 16%, var(--surface)); border-color: var(--running); }
.cat-act:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 28%, transparent); }
/* Aceptada = locked (the club can no longer retire it): a non-interactive
   indicator, not a button (ADR-0066). */
.cat-act.is-locked { cursor: default; }
.cat-act.is-act.is-locked:hover {
  background: var(--running-bg);
  border-color: color-mix(in srgb, var(--running) 46%, transparent);
}
/* read-only state pill (coach view) */
.cat-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex: none; min-width: 110px;
  font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
}
.cat-pill.is-reg { color: var(--amber); background: var(--amber-bg); }
.cat-pill.is-act { color: var(--running); background: var(--running-bg); }
.cat-pill.is-off { color: var(--ink-muted); background: var(--surface-2); }

/* bases categories, Femenino | Masculino paired (theme 1, mirrors catalog) */
.cat-pairs { display: flex; flex-direction: column; }
.cat-pair { border-bottom: 1px solid var(--border); padding: 10px 14px; }
.cat-pair:last-child { border-bottom: 0; }
.cat-pair-head { font-weight: 700; font-size: 12px; color: var(--ink); margin-bottom: 8px; }
.cat-pair-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.cat-col { border-left: 3px solid transparent; padding-left: 10px; }
.cat-col--f { border-left-color: var(--accent-2, #b5468a); }
.cat-col--m { border-left-color: var(--accent-3, #3a6ea5); }
.cat-col-g {
  font-weight: 700; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 6px;
}
.cat-col--f .cat-col-g { color: var(--accent-2, #b5468a); }
.cat-col--m .cat-col-g { color: var(--accent-3, #3a6ea5); }
.cat-col .cat-item { margin-bottom: 5px; }
.cat-col-empty { font-size: 12px; color: var(--ink-faint); padding: 2px 0; }
@media (max-width: 560px) { .cat-pair-cols { grid-template-columns: 1fr; } }

/* categories cell + selectable chips */
.insc-cats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cat-chip-form { display: inline-flex; margin: 0; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 33px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--ink); font: 600 12.5px/1 'Inter', sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.cat-chip .lead {
  width: 16px; height: 16px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; color: var(--ink-muted);
  transition: color .12s;
}
.cat-chip .lead svg { width: 14px; height: 14px; }
.cat-chip:hover {
  border-color: var(--gold); background: var(--amber-bg);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.12);
}
.cat-chip:hover .lead { color: var(--amber); }
.cat-chip:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.28); }
.cat-chip.is-on {
  background: var(--running-bg);
  border-color: color-mix(in srgb, var(--running) 46%, transparent);
}
.cat-chip.is-on .lead { color: var(--running); }
.cat-chip.is-on:hover {
  background: var(--running-bg); border-color: var(--running);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--running) 18%, transparent);
}
/* enrolled chip: check by default, x on hover (the remove affordance) */
.cat-chip.is-on .lead .ic-check { display: inline-flex; }
.cat-chip.is-on .lead .ic-x { display: none; }
.cat-chip.is-on:hover .lead .ic-check { display: none; }
.cat-chip.is-on:hover .lead .ic-x { display: inline-flex; color: var(--red); }
/* read-only (coach): static pills */
.cat-chip.is-ro { cursor: default; }
.cat-chip.is-ro:hover { border-color: var(--border-strong); background: var(--surface); box-shadow: none; }
.cat-chip.is-on.is-ro { background: var(--running-bg); border-color: color-mix(in srgb, var(--running) 40%, transparent); }
.cat-chip.is-ro:hover .lead { color: var(--running); }

/* per-judoka flags (incomplete / no category) */
.insc-flag {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--ink-2); line-height: 1.4;
}
.insc-flag .ico { width: 16px; height: 16px; flex: none; }
.insc-flag.amber { color: var(--ink); }
.insc-flag.amber .ico { color: var(--amber); }
.insc-flag.muted { color: var(--ink-muted); }
.insc-flag.muted .ico { color: var(--ink-faint); }
.insc-flag a {
  color: var(--amber); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; white-space: nowrap;
}

/* status / action column */
.insc-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-self: end; }
.insc-act .badge { white-space: nowrap; }
.insc-act .multi-tag {
  font: 600 9.5px/1 'IBM Plex Mono', monospace; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--running);
  display: inline-flex; align-items: center; gap: 5px;
}
.insc-act .multi-tag .ico { width: 12px; height: 12px; }

/* content back-link (above a detail page header) — from the concept */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 12.5px/1 'Inter', sans-serif; color: var(--ink-2);
  text-decoration: none; margin-bottom: 14px; cursor: pointer;
  padding: 6px 10px 6px 7px; border-radius: 8px; border: 1px solid transparent;
}
.back-link:hover { color: var(--ink); background: var(--surface-2); border-color: var(--border); }
.back-link .ico { width: 15px; height: 15px; }

/* --- ADR-0065: numeric stepper (+/-) over a hidden input ----------------- */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.step-btn {
  width: 38px; height: 38px; border: 0; background: var(--surface-2);
  color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer;
}
.step-btn:hover { background: var(--surface-3); }
.step-val {
  min-width: 66px; text-align: center; font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 16px; padding: 0 8px; color: var(--ink);
}

/* --- ADR-0065: category multi-select checklist (bulk add) ---------------- */
.cat-pick {
  max-height: 46vh; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 10px; padding: 4px 8px;
}
.cat-grp { border-bottom: 1px solid var(--border); padding: 8px 2px; }
.cat-grp:last-child { border-bottom: 0; }
.cat-grp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cat-grp-title {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; font-size: 12.5px; color: var(--ink);
}
.stepper-sm .step-btn { width: 30px; height: 30px; font-size: 17px; }
.stepper-sm .step-val { min-width: 52px; font-size: 14px; }

/* --- ADR-0065 #3: two native date inputs as one connected range --------- */
.date-range { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.date-range .input { flex: 1 1 140px; min-width: 140px; }
/* the time picker sizes to its content (HH:MM + clock), it should not grow */
.date-range .input-time { flex: 0 0 auto; min-width: 0; width: auto; }
.date-range-sep { color: var(--ink-muted); font-weight: 600; }
.cat-grp-opts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px; margin: 7px 0 0 24px;
}
.cat-opt {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--ink-2); cursor: pointer;
}
.cat-free { margin-top: 12px; }
.cat-free > summary {
  cursor: pointer; font-size: 13px; color: var(--ink-muted); margin-bottom: 10px;
}

/* ===== Tournament planning (ADR-0075 / spec 035) ===== */
.input-sm { height: 32px; padding: 0 9px; font-size: 13px; }
.chip-stat { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2); }
.sc-start { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.sc-start__form { display: flex; align-items: flex-end; gap: 8px; }
.sc-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.sc-start__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sc-newblock { display: flex; gap: 6px; align-items: center; }
.sc-blocks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.sc-block-row { display: flex; align-items: center; gap: 9px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); }
.sc-block-row__n { font: 700 11px/1 'IBM Plex Mono', ui-monospace, monospace; color: var(--ink-faint); flex: none; }
.sc-block-row__name { font: 600 13.5px/1.2 'Inter', sans-serif; }
.sc-col-h { font: 700 11px/1 'Inter', sans-serif; color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 9px; }
.sc-divs { display: flex; flex-direction: column; gap: 7px; }
.sc-div { display: flex; align-items: center; gap: 10px; }
.sc-div__name { font: 500 13.5px/1.2 'Inter', sans-serif; flex: 1 1 auto; min-width: 0; }
.sc-div__n { font-size: 11.5px; color: var(--ink-faint); flex: none; }
.sc-div select { flex: none; min-width: 180px; }
/* block-centric editor (blocks with division chips) */
.sc-block { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sc-block + .sc-block { margin-top: 10px; }
.sc-block__head { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: var(--surface-2); }
.sc-block__head .grow, .sc-block__tools .grow { flex: 1; }
.sc-block__name { font: 600 13.5px/1.2 'Inter', sans-serif; }
.sc-block__meta { font-size: 11.5px; color: var(--ink-faint); }
.sc-block__body { display: flex; flex-direction: column; gap: 11px; padding: 11px 12px; }
.sc-block__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-block__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px dashed var(--border); padding-top: 11px; }
/* Punto de partida: hora de inicio + receso share one height (34px). */
.sc-bases-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sc-time { height: 34px; min-width: 116px; }
.sc-recess-set { display: flex; align-items: center; gap: 7px; }
.sc-step .step-btn { width: 34px; height: 32px; font-size: 16px; }
.sc-step .step-val { min-width: 44px; font-size: 13.5px; }
.sc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 11px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); font-size: 12.5px; }
.sc-chip__n { font-size: 11px; color: var(--ink-faint); }
.sc-chip__x { border: none; background: none; padding: 0; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-faint); cursor: pointer; border-radius: 50%; font-size: 10px; line-height: 1; }
.sc-chip__x:hover { background: var(--surface-2); color: var(--red); }
.sc-chip--empty { color: var(--ink-faint); border-style: dashed; }
.sc-chip--warn { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.sc-add { min-width: 140px; height: 30px; }
.sc-add-form { display: inline-flex; align-items: center; }
.sc-orphans { margin-top: 14px; border: 1px dashed color-mix(in srgb, var(--amber) 50%, transparent); border-radius: 10px; background: var(--amber-bg); padding: 11px 12px; }
.sc-orphans__h { font-size: 12px; color: var(--amber); font-weight: 600; margin-bottom: 9px; }
.sc-orph-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; }
.sc-orph { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 6px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.sc-orph__n { font-size: 11px; color: var(--ink-faint); flex: none; }
/* computed program */
.sc-prog-block { margin-top: 16px; }
.sc-prog-block:first-of-type { margin-top: 4px; }
.sc-prog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sc-prog-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.sc-prog-name { font: 600 14px/1.2 'Inter', sans-serif; }
.sc-prog-time { font: 700 12px/1 'IBM Plex Mono', ui-monospace, monospace; color: var(--gold); }
.sc-prog-end { font-size: 11.5px; color: var(--ink-faint); }
.sc-prog-divs { font-size: 11.5px; color: var(--ink-faint); }
.sc-mats { display: flex; gap: 22px; flex-wrap: wrap; }
.sc-mat { flex: 1 1 0; min-width: 150px; }
.sc-mat__h { font: 700 10.5px/1 'Inter', sans-serif; letter-spacing: .08em; color: var(--ink-faint); padding-bottom: 2px; }
.sc-row { display: flex; align-items: baseline; gap: 9px; padding: 6px 0; border-top: 1px solid var(--border); }
.sc-row__t { font: 700 12px/1 'IBM Plex Mono', ui-monospace, monospace; flex: none; width: 44px; color: var(--ink); }
.sc-row__c { font-size: 13px; color: var(--ink-2); }
.sc-row--empty { color: var(--ink-faint); }
.sc-recess { text-align: center; font-size: 11.5px; color: var(--ink-faint); margin: 13px 0 2px; padding-top: 9px; border-top: 1px dashed var(--border); }
.sc-unsched { margin-top: 16px; font-size: 12px; color: var(--amber); }
