:root {
  --bg: #e9eef3;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --text: #1e2832;
  --muted: #687684;
  --line: #c8d2dc;
  --line-soft: #e2e8ee;
  --blue: #1e65a7;
  --blue-dark: #174b7b;
  --blue-soft: #dbeaf7;
  --green: #218449;
  --red: #cc3b3b;
  --amber: #b17912;
  --ribbon: #d81f2a;
  --ribbon-dark: #b71722;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 13px;
}

.main {
  min-height: 100vh;
  padding: 14px 20px 30px;
}
.module-ribbon {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-height: 96px;
  margin: -14px -20px 0;
  padding: 8px 20px;
  background: linear-gradient(90deg, #c91420, #e42531);
  border-bottom: 1px solid var(--ribbon-dark);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.18);
  overflow-x: auto;
  scrollbar-width: thin;
}
.module-ribbon a {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 104px;
  min-height: 78px;
  padding: 6px 9px 7px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(174,189,202,.9);
  border-radius: 6px;
  color: #172432;
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(15, 34, 52, .14);
  transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.module-ribbon a:hover,
.module-ribbon a.active {
  background: #ffffff;
  border-color: #f0c24d;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 34, 52, .20);
}
.module-ribbon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #1d4f80;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.module-ribbon a.active svg,
.module-ribbon a:hover svg {
  stroke: #b71722;
}
.module-ribbon .ribbon-icon {
  display: block;
  width: 78px;
  height: 58px;
  object-fit: contain;
}
.portal-ribbon {
  display: none;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin: 0 -20px 18px;
  padding: 9px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar strong { display: block; font-size: 14px; }
.topbar span { color: var(--muted); font-size: 12px; }
.topbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px 10px;
  flex-wrap: wrap;
  max-width: 68%;
}
.topbar-actions a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.app-frame {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.context-sidebar {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 10px;
}
.app-content {
  min-width: 0;
}
.portal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  padding: 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff, #f2f7fb);
  border: 1px solid var(--line);
  border-left: 6px solid var(--ribbon);
  border-radius: 7px;
}
.portal-kicker {
  display: block;
  color: var(--ribbon-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.portal-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.portal-dashboard div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 7px;
  padding: 11px 12px;
}
.portal-dashboard div:nth-child(1) { border-top-color: var(--green); }
.portal-dashboard div:nth-child(2) { border-top-color: var(--amber); }
.portal-dashboard div:nth-child(3),
.portal-dashboard div:nth-child(4),
.portal-dashboard div:nth-child(6) { border-top-color: var(--red); }
.portal-dashboard div:nth-child(5) { border-top-color: var(--blue); }
.portal-dashboard span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.portal-dashboard strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}
.portal-alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.portal-alerts article {
  padding: 12px;
  border: 1px solid #f0d28d;
  border-radius: 7px;
  background: #fff8e7;
}
.kyu-submit-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px;
  border: 2px solid #b00020;
  border-radius: 8px;
  background: #fff7f7;
}
.kyu-submit-callout.is-empty {
  border-color: var(--line);
  background: var(--panel-soft);
}
.kyu-submit-callout span {
  display: block;
  color: var(--ribbon-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.kyu-submit-callout strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}
.kyu-submit-callout p {
  margin: 6px 0 0;
  color: var(--muted);
}
.kyu-submit-button {
  min-height: 56px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 900;
  background: #b00020;
  border-color: #8f001a;
}
.portal-menu h3 {
  color: #7f1720;
}
.table-actions {
  margin-bottom: 8px;
}
.state-pill,
.verify-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
  white-space: nowrap;
}
.state-ok { background: #e7f7ec; color: var(--green); }
.state-bad { background: #fff0f0; color: var(--red); }
.state-info { background: #e6f1ff; color: var(--blue-dark); }
.state-pending { background: #fff5d8; color: var(--amber); }
.state-muted { background: #eef1f4; color: #66717c; }
.coverage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.coverage-dot {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 31, 56, .08);
  font-size: 11px;
  font-weight: 900;
}
.coverage-row.coverage-full td,
.athlete-card.coverage-full {
  background: #f0fbf4;
}
.coverage-row.coverage-school td,
.athlete-card.coverage-school {
  background: #fff9e8;
}
.coverage-row.coverage-pending td,
.athlete-card.coverage-pending {
  background: #eef6ff;
}
.coverage-row.coverage-none td,
.athlete-card.coverage-none {
  background: #fff3f1;
}
.coverage-row.coverage-expired td,
.coverage-row.coverage-muted td,
.athlete-card.coverage-expired,
.athlete-card.coverage-muted {
  background: #f4f6f8;
}
.coverage-row.coverage-full td:first-child { box-shadow: inset 4px 0 0 #2f8a4b; }
.coverage-row.coverage-school td:first-child { box-shadow: inset 4px 0 0 #d4a019; }
.coverage-row.coverage-pending td:first-child { box-shadow: inset 4px 0 0 #1a64b7; }
.coverage-row.coverage-none td:first-child { box-shadow: inset 4px 0 0 #b00020; }
.coverage-row.coverage-expired td:first-child,
.coverage-row.coverage-muted td:first-child { box-shadow: inset 4px 0 0 #8b97a3; }
.athlete-card.coverage-full,
.coverage-dot.coverage-full { border-left: 4px solid #2f8a4b; }
.athlete-card.coverage-school,
.coverage-dot.coverage-school { border-left: 4px solid #d4a019; }
.athlete-card.coverage-pending,
.coverage-dot.coverage-pending { border-left: 4px solid #1a64b7; }
.athlete-card.coverage-none,
.coverage-dot.coverage-none { border-left: 4px solid #b00020; }
.athlete-card.coverage-expired,
.coverage-dot.coverage-expired,
.athlete-card.coverage-muted { border-left: 4px solid #8b97a3; }
.avatar-mini {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 900;
}
.belt {
  display: inline-flex;
  min-width: 48px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #9aa7b2;
  font-weight: 900;
}
.belt-white { background: #fff; color: #1e2832; }
.belt-white-yellow { background: linear-gradient(90deg, #fff 0 50%, #ffd84a 50%); color: #1e2832; }
.belt-yellow { background: #ffd84a; color: #1e2832; }
.belt-yellow-orange { background: linear-gradient(90deg, #ffd84a 0 50%, #f59a2e 50%); color: #1e2832; }
.belt-orange { background: #f59a2e; color: #1e2832; }
.belt-orange-green { background: linear-gradient(90deg, #f59a2e 0 50%, #2f9d58 50%); color: #1e2832; }
.belt-green { background: #2f9d58; color: #fff; }
.belt-green-blue { background: linear-gradient(90deg, #2f9d58 0 50%, #2b6fba 50%); color: #fff; }
.belt-blue { background: #2b6fba; color: #fff; }
.belt-blue-brown { background: linear-gradient(90deg, #2b6fba 0 50%, #7b4a2a 50%); color: #fff; }
.belt-brown { background: #7b4a2a; color: #fff; }
.belt-black { background: #111; color: #fff; }
.belt-red-white {
  background: linear-gradient(90deg, #b51f2a 0 50%, #fff 50% 100%) !important;
  color: #111 !important;
  border-color: #8f1720;
}
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}
.icon-action.disabled {
  color: #9aa7b2;
  background: #f2f4f6;
}
.field-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
}
.finiquito-tabs {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.finiquito-tabs summary {
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px 10px;
}
.sticky-total-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 18px;
  padding: 12px 14px;
  background: #fff7d6;
  border: 1px solid #e3bd40;
  border-radius: 8px;
  box-shadow: 0 -8px 18px rgba(15, 23, 42, 0.08);
}
.fin-person-check {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
}
.fin-event-form {
  grid-template-columns: minmax(260px, 1fr) 150px 180px auto;
}
.verify-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #eef3f7;
}
.verify-card {
  width: min(560px, calc(100% - 28px));
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(18, 39, 61, .16);
}
.verify-card dl {
  margin-top: 18px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}
h1 { margin: 0 0 4px; font-size: 23px; letter-spacing: 0; line-height: 1.12; }
h2 { margin: 0 0 10px; font-size: 16px; letter-spacing: 0; }
p { margin: 0; color: var(--muted); line-height: 1.45; }
a { color: var(--blue); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

.command-bar, .search {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}
input, select, textarea, button, .button {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}
input, select, textarea {
  background: #fff;
  min-width: 170px;
}
textarea {
  min-height: 84px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(30, 101, 167, .22);
  border-color: var(--blue);
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.button.secondary {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--line);
}
.button.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
button:hover, .button:hover {
  background: var(--blue-dark);
  color: #fff;
  text-decoration: none;
}
.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}
.link-button:hover {
  background: transparent;
  color: var(--blue-dark);
  text-decoration: underline;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stats.compact {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 7px;
}
.stat span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}
.stat strong {
  display: block;
  font-size: 23px;
  margin-top: 6px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.module-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 7px;
  padding: 14px;
}
.module-card p { min-height: 38px; margin-bottom: 12px; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: 18px;
  align-items: stretch;
  min-height: 218px;
  margin-bottom: 16px;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.98), rgba(255,255,255,.88)),
    url("/assets/logo_fcj.png") right 28px center / 190px auto no-repeat,
    #ffffff;
  border: 1px solid var(--line);
  border-left: 8px solid var(--ribbon);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(21, 38, 55, .10);
}
.landing-brand {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 780px;
}
.landing-brand img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}
.landing-brand span {
  display: block;
  color: var(--ribbon-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.landing-brand h1 {
  margin-top: 5px;
  font-size: 34px;
  line-height: 1.05;
}
.landing-brand p {
  max-width: 620px;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
}
.landing-actions {
  display: grid;
  gap: 10px;
  align-content: center;
}
.landing-actions a,
.landing-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  font-weight: 900;
  text-decoration: none;
}
.landing-actions a::after {
  content: ">";
  color: var(--muted);
}
.landing-actions .landing-primary {
  background: var(--ribbon);
  border-color: var(--ribbon-dark);
  color: #fff;
}
.landing-actions .landing-primary::after { color: #fff; }
.landing-status {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.landing-status-item,
.landing-modules a,
.flow-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.landing-status-item {
  display: block;
  min-height: 92px;
  padding: 13px 14px;
  border-top: 5px solid var(--blue);
}
.landing-status-item span,
.landing-modules small,
.flow-step small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.landing-status-item span {
  min-height: 30px;
  text-transform: uppercase;
  font-size: 11px;
}
.landing-status-item strong {
  display: block;
  margin-top: 7px;
  font-size: 30px;
}
.landing-status-item.urgent {
  border-top-color: var(--red);
  background: #fff4f3;
}
.landing-status-item.money {
  border-top-color: var(--green);
  background: #f1fbf5;
}
.landing-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.flow-step {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 16px;
}
.flow-step span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff4df;
  border: 1px solid #e2c27a;
  border-radius: 50%;
  color: #8a5b00;
  font-weight: 900;
}
.flow-step strong {
  font-size: 18px;
}
.landing-modules {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.landing-modules a {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 13px;
  border-bottom: 4px solid var(--blue);
}
.landing-modules span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-radius: 8px;
  font-weight: 900;
}
.landing-modules svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.landing-modules strong {
  font-size: 15px;
}
.landing-bottom {
  margin-top: 4px;
}

.two-columns, .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.athlete-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.athlete-photo-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 226px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}
.athlete-photo-card span {
  color: var(--muted);
  font-weight: 700;
}
.athlete-photo-card small {
  color: var(--muted);
  font-weight: 700;
}
.athlete-photo {
  width: 112px;
  height: 138px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
}
.photo-placeholder {
  display: grid;
  place-items: center;
  width: 104px;
  height: 128px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 34px;
  font-weight: 900;
}
.photo-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #b7c0c9;
  background: #e5e7eb;
}
.photo-dot.ok {
  border-color: #37a169;
  background: #48bb78;
  box-shadow: 0 0 0 3px rgba(72, 187, 120, .16);
}
.split {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 8px;
}
.section-title span {
  color: var(--muted);
}
.license-section-title > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.license-section-title .command-bar {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.portal-success-callout {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid #bfe5cf;
  border-left: 6px solid #14804a;
  border-radius: 8px;
  background: #eefaf3;
  box-shadow: var(--shadow);
}
.portal-success-callout span {
  display: block;
  color: #0f6b3d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.portal-success-callout strong {
  display: block;
  margin-top: 4px;
  color: #064d2b;
  font-size: 22px;
}
.portal-success-callout p {
  margin: 6px 0 0;
  color: #355244;
}
.license-search-panel {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(260px, 2fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.license-search-panel label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.license-search-panel input {
  margin: 0;
}
.license-search-panel span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.muted-inline {
  color: var(--muted);
  font-weight: 700;
}

.table-wrap {
  width: 100%;
  max-height: 560px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.table-wrap.tall { max-height: calc(100vh - 176px); }
.table-wrap.small { max-height: 296px; }
.table-wrap.event-master { max-height: 44vh; border-radius: 0; }
.table-wrap.event-detail { max-height: 39vh; border-radius: 0; }
.event-view-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.event-view-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}
.event-view-strip a.active {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(30, 101, 167, .18);
}
.event-view-strip span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}
.event-view-strip strong {
  font-size: 22px;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
}
th, td {
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #d9e7f1;
  color: #172432;
  font-size: 12px;
  font-weight: 800;
}
thead tr:first-child th {
  z-index: 4;
}
thead tr.column-filter-row th {
  top: 31px;
  z-index: 3;
  padding: 4px 6px;
  background: #eef5fa;
}
.column-filter-row input {
  width: 118px;
  min-width: 86px;
  padding: 5px 6px;
  font-size: 12px;
  border-radius: 5px;
}
.column-filter-row select {
  width: 118px;
  min-width: 86px;
  padding: 5px 6px;
  font-size: 12px;
  border-radius: 5px;
}
.column-filter-row .filter-submit-cell {
  min-width: 166px;
}
.column-filter-row .filter-submit-cell input {
  width: 94px;
}
.column-filter-row .filter-submit-cell select {
  width: 94px;
}
.column-filter-row .filter-submit-cell button {
  margin-left: 4px;
  min-height: 27px;
}
tbody tr:nth-child(even) { background: #f3f6f8; }
tbody tr:hover { background: #fff5d8; }
tbody tr.row-ok { background: #e7f7ec; }
tbody tr.row-warn { background: #fff4df; }
tbody tr.row-escolar { background: #fff5d8; }
tbody tr.row-seguro { background: #edf8ef; }
tbody tr.selected-row { background: #ffdede; }
tbody tr.row-off { color: #7c8792; text-decoration: line-through; }
tbody tr.click-row { cursor: default; }
.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}
.mini-action.danger {
  border-color: #e4b5b5;
  background: #fff0f0;
  color: var(--red);
}
.mini-action:hover {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}
.row-actions form {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.mini-select {
  min-width: 118px;
  width: 118px;
  padding: 4px 6px;
  font-size: 11px;
}

.dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: middle;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}
.dot.ok { background: var(--green); }
.dot.off { background: var(--red); }
.badge, .status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 12px;
}
.badge.ok {
  background: #e8f5ea;
  color: var(--green);
}
.badge.danger {
  background: #fff0f0;
  color: var(--red);
}
.status {
  background: #fff0d7;
  color: var(--amber);
}
.status.status-ok {
  background: #e8f5ea;
  color: var(--green);
}
.status.status-off {
  background: #fff0f0;
  color: var(--red);
}
button.secondary {
  background: #fff;
  color: var(--blue-dark);
  border-color: var(--line);
}
button.warn,
.mini-action.warn {
  background: #fff4df;
  color: #8a5b00;
  border-color: #e2c27a;
}
.mini-action.ok {
  background: #e8f6ef;
  color: var(--green);
  border-color: #bdddc9;
}
.club-batch-main td {
  vertical-align: middle;
  background: #fff;
}
.club-batch-detail td {
  padding: 0 12px 14px;
  background: #f8fafc;
  border-top: 0;
}
.club-batch-detail span {
  display: block;
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.club-batch-detail p {
  margin: 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  line-height: 1.45;
}
.batch-accept-button {
  min-height: 46px;
  min-width: 150px;
  padding: 0 18px;
  font-weight: 900;
  background: var(--green);
  border-color: var(--green);
}
button.mini-action {
  min-width: 0;
  min-height: 24px;
  padding: 3px 7px;
  background: #fff;
  color: var(--blue);
  font-size: 11px;
}

.finance-head {
  border-left: 6px solid var(--ribbon);
}
.finance-stats .stat,
.finance-stats.stat {
  border-top: 4px solid var(--blue);
}
.finance-stats .stat-link {
  color: inherit;
  text-decoration: none;
}
.finance-stats .is-paid,
.stat.is-paid {
  border-top-color: var(--green);
  background: linear-gradient(180deg, #ffffff, #eefaf2);
}
.finance-stats .is-pending,
.stat.is-pending {
  border-top-color: var(--red);
  background: linear-gradient(180deg, #ffffff, #fff0ef);
}
.finance-toolbar {
  margin-bottom: 12px;
}
.finance-search {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.finance-search input[name="q"] {
  min-width: min(420px, 100%);
}
.finance-workbench {
  margin-bottom: 16px;
}
.finance-legend p {
  margin: 6px 0;
  color: var(--muted);
  font-weight: 700;
}
.finance-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: -1px;
}
.finance-dot.green { background: var(--green); }
.finance-dot.red { background: var(--red); }
.finance-dot.amber { background: var(--amber); }
.finance-panel {
  margin-bottom: 18px;
}
.finance-table-wrap {
  border-radius: 6px;
}
.finance-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}
.finance-table thead,
.finance-table thead tr {
  background: #24394e;
}
.finance-table th {
  background: #24394e;
  color: #fff;
  border-bottom-color: #18293b;
}
.finance-table tbody tr.finance-paid {
  background: #e8f6ef;
  color: #145b34;
}
.finance-table tbody tr.finance-pending {
  background: #fdecea;
  color: #932520;
}
.finance-table tbody tr.finance-draft {
  background: #fff6df;
  color: #7b5408;
}
.finance-table tbody tr.finance-paid:nth-child(even) {
  background: #dff1e7;
}
.finance-table tbody tr.finance-pending:nth-child(even) {
  background: #fff5f3;
}
.finance-table tbody tr:hover {
  outline: 2px solid #f2c94c;
  outline-offset: -2px;
}
.finance-table form {
  margin: 0;
}
.finance-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}
.finance-status.paid {
  background: #cfead8;
  color: #145b34;
}
.finance-status.pending {
  background: #ffd7d3;
  color: #8e211c;
}
.finance-status.draft {
  background: #ffe9b1;
  color: #745007;
}
.finance-actions {
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.finance-actions form {
  margin: 0;
}
.money {
  text-align: right;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.finance-detail-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.finance-detail-hero > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px 16px;
}
.finance-detail-hero span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.finance-detail-hero strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}
.finance-detail-hero.paid > div:first-child {
  background: #e8f6ef;
  color: var(--green);
  border-color: #bdddc9;
}
.finance-detail-hero.pending > div:first-child {
  background: #fdecea;
  color: var(--red);
  border-color: #efc3be;
}
.finance-detail-hero.draft > div:first-child {
  background: #fff4df;
  color: var(--amber);
  border-color: #e2c27a;
}
.finance-flow {
  margin-bottom: 14px;
}

.module-shell {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.module-sidebar {
  display: grid;
  gap: 10px;
}
.module-block {
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.module-block h3 {
  margin: 0;
  padding: 8px 10px;
  background: #e8edf2;
  color: var(--blue-dark);
  font-size: 13px;
}
.module-block a,
.module-block span,
.module-block form {
  display: block;
  padding: 8px 10px;
  border-top: 1px solid var(--line-soft);
}
.module-block a:hover {
  background: #eef6fb;
  text-decoration: none;
}
.module-block .link-button {
  width: 100%;
  text-align: left;
}
.module-workspace {
  min-width: 0;
}
.compact-head {
  align-items: center;
  margin-bottom: 10px;
}
.stacked-table {
  display: grid;
  gap: 8px;
}
.wide-form {
  max-width: 1180px;
}
.check-line {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
.check-line input,
.tiny-check input {
  width: auto;
  min-width: 0;
}
.inline-mini {
  display: flex;
  gap: 6px;
  align-items: center;
}
.inline-mini input {
  min-width: 84px;
  width: 94px;
}
.tiny-check {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 700;
}

.info-panel, .panel-form, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}
.panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.panel-form {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}
.panel-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}
.panel-form input, .panel-form select, .panel-form textarea {
  width: 100%;
  min-width: 0;
}
.form-grid,
.inline-edit-grid {
  display: grid;
  gap: 10px;
  align-items: end;
}
.form-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}
.inline-edit-grid {
  grid-template-columns: repeat(6, minmax(118px, 1fr));
}
.form-grid label,
.inline-edit-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 800;
}
.form-grid input,
.form-grid select,
.inline-edit-grid input,
.inline-edit-grid select {
  width: 100%;
  min-width: 0;
}
.full-span {
  grid-column: 1 / -1;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.check-grid.compact {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}
.check-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--ink);
}
.check-grid input {
  width: auto;
  min-width: 0;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.muted {
  color: var(--muted);
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 150px minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.stack-form {
  display: grid;
  gap: 10px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
}
.stack-form button {
  justify-self: start;
}
dl {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 12px;
  margin: 0;
}
dt {
  color: var(--muted);
  font-weight: 800;
}
dd { margin: 0; }
.action-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.action-list span {
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  font-weight: 700;
}
.action-list a {
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 10px;
  font-weight: 700;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  margin-bottom: 14px;
}
.stats > article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.stats > article span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.stats > article strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}
.stats > article small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}
.compact-title {
  margin-top: 0;
}
.compact-table th,
.compact-table td {
  padding: 6px 7px;
}

.deportistas-head {
  align-items: start;
  margin-bottom: 10px;
}
.deportistas-head p {
  max-width: 620px;
}
.deportistas-search {
  justify-content: flex-end;
}
.deportistas-search input[name="q"] {
  min-width: 230px;
}
.deportistas-search select[name="estado"] {
  min-width: 160px;
}
.deportistas-search select[name="f_deporte"] {
  min-width: 150px;
}
.deportistas-search select[name="f_sexo"],
.deportistas-search select[name="f_grado"],
.deportistas-search select[name="f_temporada"] {
  min-width: 128px;
}
.excel-filter {
  position: relative;
  min-width: 250px;
}
.excel-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}
.excel-filter summary::-webkit-details-marker {
  display: none;
}
.excel-filter summary::after {
  content: "v";
  color: var(--blue);
  font-weight: 900;
}
.excel-filter[open] summary::after {
  content: "^";
}
.excel-filter summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.excel-filter summary strong {
  color: var(--blue-dark);
  font-size: 12px;
}
.excel-filter-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(360px, 88vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 34, 52, .2);
}
.excel-filter-search {
  width: 100%;
  min-width: 0;
}
.excel-filter-actions {
  display: flex;
  gap: 6px;
}
.excel-filter-actions .mini-action {
  flex: 1;
  min-height: 30px;
}
.excel-filter-options {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}
.excel-filter-options label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 30px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.excel-filter-options label:hover {
  background: var(--panel-soft);
}
.excel-filter-options input {
  width: 16px;
  height: 16px;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.excel-filter-options span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deportistas-wrap {
  max-height: calc(100vh - 214px);
}
.column-filter-hint {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.deportistas-table {
  font-size: 12px;
}
.deportistas-table th,
.deportistas-table td {
  padding: 5px 7px;
}
.deportistas-table th {
  font-size: 11px;
}
.deportistas-table .sort-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.deportistas-table .sort-link small {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  min-height: 18px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: rgba(255,255,255,.62);
  font-size: 10px;
  font-weight: 900;
}
.deportistas-table th.sorted {
  background: #eef6ff;
  color: var(--blue-dark);
  box-shadow: inset 0 -3px 0 var(--blue);
}
.deportistas-table th.sorted .sort-link small {
  background: var(--blue);
  color: var(--blue-dark);
  color: #ffffff;
}
.deportistas-table .column-filter-row th {
  top: 27px;
  padding: 3px 5px;
}
.deportistas-table .column-filter-row input,
.deportistas-table .column-filter-row select {
  width: 100%;
  min-width: 72px;
  padding: 4px 5px;
  font-size: 11px;
}
.deportistas-table th:nth-child(1),
.deportistas-table td:nth-child(1) { min-width: 42px; width: 42px; text-align: center; }
.deportistas-table th:nth-child(2),
.deportistas-table td:nth-child(2) { min-width: 82px; }
.deportistas-table th:nth-child(3),
.deportistas-table td:nth-child(3) { min-width: 78px; }
.deportistas-table th:nth-child(4),
.deportistas-table td:nth-child(4),
.deportistas-table th:nth-child(5),
.deportistas-table td:nth-child(5),
.deportistas-table th:nth-child(6),
.deportistas-table td:nth-child(6) { min-width: 112px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.deportistas-table th:nth-child(7),
.deportistas-table td:nth-child(7) { min-width: 88px; }
.deportistas-table th:nth-child(8),
.deportistas-table td:nth-child(8) { min-width: 76px; }
.deportistas-table th:nth-child(9),
.deportistas-table td:nth-child(9) { min-width: 150px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.deportistas-table th:nth-child(10),
.deportistas-table td:nth-child(10) { min-width: 62px; }
.deportistas-table th:nth-child(11),
.deportistas-table td:nth-child(11) { min-width: 98px; }
.deportistas-table th:nth-child(12),
.deportistas-table td:nth-child(12) { min-width: 74px; }
.deportistas-table th:nth-child(13),
.deportistas-table td:nth-child(13) { min-width: 86px; }

.seguro-search input[name="q"] {
  min-width: 240px;
}
.seguro-search input[name="temporada"] {
  min-width: 118px;
  width: 118px;
}
.seguro-search select[name="vista"] {
  min-width: 170px;
}
.seguro-search select[name="club_id"] {
  min-width: 220px;
}
.seguro-search select[name="categoria"],
.seguro-search select[name="orden"] {
  min-width: 150px;
}
.seguro-wrap {
  max-height: calc(100vh - 250px);
}
.seguro-table {
  font-size: 12px;
}
.seguro-table th,
.seguro-table td {
  padding: 6px 7px;
}
.seguro-table th {
  font-size: 11px;
}

.tec-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(260px, auto);
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #bfd4e5;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff, #edf6fb);
}
.tec-hero h1 {
  font-size: 26px;
}
.tec-logo-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}
.tec-logo-panel img {
  max-width: 112px;
  max-height: 58px;
  object-fit: contain;
}
.tec-season {
  display: flex;
  align-items: end;
  gap: 8px;
}
.tec-season label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}
.tec-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.tec-flow span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.tec-flow .done {
  background: #e8f5ea;
  border-color: #a7d7b0;
  color: var(--green);
}
.tec-actions-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(280px, 1fr) minmax(260px, .9fr);
  gap: 14px;
}
.tec-action-card {
  min-height: 190px;
}
.tec-upload {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}
.tec-upload label {
  display: grid;
  gap: 5px;
  flex: 1;
  color: var(--muted);
  font-weight: 800;
}
.mini-log {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.tec-main-grid {
  display: grid;
  grid-template-columns: minmax(380px, .95fr) minmax(420px, 1.05fr);
  gap: 14px;
}
.tec-place-row {
  display: grid;
  grid-template-columns: 130px minmax(150px, 1fr) 88px;
  gap: 8px;
  align-items: center;
}
.tec-place-row strong {
  color: var(--blue-dark);
}
.tec-baremo-list {
  display: grid;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.tec-baremo-list span {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 110px;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.tec-session-form {
  display: grid;
  grid-template-columns: 142px minmax(170px, 1fr) 120px 130px auto;
  gap: 8px;
  margin-bottom: 12px;
}
.tec-table {
  max-height: 58vh;
}
.tec-inline-review {
  display: grid;
  grid-template-columns: 58px 130px auto 72px;
  gap: 6px;
  align-items: center;
  min-width: 340px;
}
.tec-inline-review input,
.tec-state-form select {
  min-width: 0;
}
.tec-inline-review label {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}
.tec-state-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.event-summary, .portal-hero {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.event-summary div, .portal-hero div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
}
.event-summary span, .portal-hero span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.event-summary strong, .portal-hero strong {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}

.flash {
  background: #e8f5ea;
  border: 1px solid #a7d7b0;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.flash p { color: #155b2b; font-weight: 700; }

@media (max-width: 1100px) {
  .stats, .work-grid, .event-summary, .portal-hero, .portal-dashboard, .kyu-submit-callout, .tec-flow, .tec-actions-grid, .finance-detail-hero, .landing-status, .landing-flow, .landing-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-columns, .detail-grid, .split, .athlete-layout, .inline-form, .form-row, .module-shell, .app-frame, .tec-hero, .tec-main-grid, .tec-session-form, .landing-hero { grid-template-columns: 1fr; }
  .app-content, .module-workspace { order: 1; }
  .context-sidebar, .module-sidebar { order: 2; position: static; }
  .toolbar-stack { justify-items: stretch; }
  .topbar-actions { max-width: 100%; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .main { padding: 14px 16px; }
  .module-ribbon { margin: -14px -16px 0; padding: 7px 16px; min-height: 88px; }
  .module-ribbon a { min-width: 96px; min-height: 72px; }
  .module-ribbon .ribbon-icon { width: 70px; height: 52px; }
  .topbar { margin: 0 -16px 14px; padding: 9px 16px; align-items: flex-start; }
  .page-head, .topbar { display: block; }
  .command-bar, .search { margin-top: 12px; }
  .license-section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .license-section-title .command-bar {
    width: 100%;
  }
  .license-section-title .command-bar button,
  .license-section-title .command-bar .button {
    width: 100%;
  }
  .license-search-panel {
    grid-template-columns: 1fr;
  }
  .license-search-panel span {
    white-space: normal;
  }
  input, select { width: 100%; }
  .search button { width: 100%; }
  .portal-head { display: block; }
  .stats, .work-grid, .event-summary, .portal-hero, .portal-dashboard, .kyu-submit-callout, .field-picker, .tec-flow, .tec-actions-grid, .finance-detail-hero, .landing-status, .landing-flow, .landing-modules { grid-template-columns: 1fr; }
  .event-view-strip { grid-template-columns: 1fr; }
  .landing-hero { padding: 16px; background-position: right 12px top 12px; background-size: 104px auto; }
  .landing-brand { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .landing-brand img { width: 72px; height: 72px; }
  .landing-brand h1 { font-size: 28px; }
  .landing-actions a, .landing-primary { min-height: 42px; }
  .login-panel-wide {
    width: min(620px, calc(100vw - 24px));
  }
  .login-hero {
    min-height: 0;
    padding: 20px;
  }
  .login-hero-main {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 13px;
  }
  .login-hero-main img {
    width: 74px;
    height: 74px;
    border-radius: 12px;
  }
  .login-hero-main h1 {
    font-size: 29px;
  }
  .login-hero-main p {
    font-size: 14px;
  }
  .login-panel .panel-form {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }
  .login-actions {
    grid-column: auto;
  }
  .login-access-note {
    padding: 0 20px 16px;
  }
  .tec-season, .tec-upload, .tec-state-form { display: grid; grid-template-columns: 1fr; }
  .tec-place-row, .tec-inline-review { grid-template-columns: 1fr; }
}

.print-body {
  background: #fff;
  font-size: 12px;
}
.print-sheet {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 24px;
}
.print-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 2px solid #172432;
}
.print-code {
  display: grid;
  align-content: center;
  justify-items: end;
}
.print-code strong {
  font-size: 20px;
}
.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}
@media print {
  .print-sheet { padding: 0; }
  .print-body table { break-inside: auto; }
  .print-body tr { break-inside: avoid; }
}
/* Autenticacion */
.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
}

.login-panel {
  width: min(460px, calc(100vw - 32px));
}

.login-panel-wide {
  width: min(920px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(23, 54, 80, .18);
  border-radius: 10px;
  box-shadow: 0 22px 52px rgba(15, 34, 52, .18);
}

.login-hero {
  position: relative;
  min-height: 236px;
  padding: 30px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(23,54,80,.98), rgba(30,101,167,.92)),
    #173650;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--ribbon-dark), var(--ribbon), #f0c24d);
}

.login-hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  max-width: 760px;
}

.login-hero-main img {
  width: 112px;
  height: 112px;
  max-width: 112px;
  min-width: 0;
  object-fit: contain;
  padding: 9px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(5, 16, 28, .25);
}

.login-hero-main span {
  display: block;
  color: rgba(255,255,255,.88);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-hero-main h1 {
  margin: 7px 0 0;
  color: #ffffff;
  font-size: 38px;
  line-height: 1.05;
}

.login-hero-main p {
  max-width: 600px;
  margin: 12px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 16px;
  line-height: 1.5;
}

.login-panel .panel-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 20px;
  align-items: end;
  padding: 24px 30px 22px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.login-form-head {
  align-self: center;
}

.login-form-head h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 22px;
}

.login-form-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.login-fields {
  display: grid;
  gap: 12px;
}

.login-panel input {
  width: 100%;
}

.login-actions {
  grid-column: 2;
}

.login-actions button {
  width: 100%;
  min-height: 46px;
}

.login-access-note {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 30px 18px;
  background: #ffffff;
}

.login-access-note span {
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.checkline input {
  width: auto;
  margin: 0;
}

.mobile-club-nav,
.mobile-card-list {
  display: none;
}

.vendor-signature {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  margin: 18px 0 0;
  color: #7c8792;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vendor-signature img {
  width: 58px;
  height: auto;
  opacity: .72;
}

.vendor-signature img.ocrsoft-logo {
  width: 150px;
  max-width: min(150px, 55vw);
  max-height: 50px;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
}

.login-vendor {
  justify-content: center;
  margin-top: 16px;
}

.auth-main .login-vendor {
  margin-bottom: 18px;
}

.choice-field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice-field legend {
  color: var(--muted);
  font-weight: 800;
}
.field-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
[data-competitor-fields] {
  display: grid;
  gap: 12px;
}
[data-competitor-fields][hidden] {
  display: none;
}
.weight-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}
.weight-choice-grid label {
  display: block;
  min-width: 0;
}
.weight-choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.weight-choice-grid span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--blue-dark);
  font-weight: 900;
  text-align: center;
}
.weight-choice-grid small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.weight-choice-grid input:checked + span {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 2px rgba(30,101,167,.16);
}
.form-step h2 {
  display: none;
}
.license-renewal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.renewal-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.renewal-card input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.renewal-card strong,
.renewal-card small {
  display: block;
}
.renewal-card small {
  margin: 3px 0 6px;
  color: var(--muted);
}
.renewal-card em {
  font-style: normal;
}
.attendance-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.attendance-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.attendance-card strong,
.attendance-card small {
  display: block;
}
.attendance-card small {
  margin: 3px 0 8px;
  color: var(--muted);
}
.attendance-card input[type="text"],
.attendance-card input:not([type]) {
  width: 100%;
}
.attendance-toggle {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid #a7d7b0;
  border-radius: 7px;
  background: #e8f5ea;
  color: var(--green);
  font-weight: 900;
}
.attendance-toggle input {
  width: 22px;
  height: 22px;
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .main {
    padding: 10px 12px 82px;
  }
  .auth-main {
    padding: 12px;
  }
  .portal-ribbon {
    display: none;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -10px -12px 12px;
    padding: 10px 12px;
  }
  .topbar strong {
    font-size: 15px;
  }
  .topbar-actions {
    display: none;
  }
  .app-frame {
    display: block;
  }
  .context-sidebar {
    display: none;
  }
  .portal-head {
    margin-bottom: 12px;
    padding: 14px;
    border-left-width: 5px;
  }
  .portal-head h1 {
    margin: 2px 0 6px;
    font-size: 24px;
    line-height: 1.1;
  }
  .portal-head p {
    font-size: 14px;
  }
  .portal-head .command-bar,
  .portal-head form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .portal-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .portal-dashboard div {
    padding: 10px;
  }
  .portal-dashboard strong {
    font-size: 24px;
  }
  .panel-form,
  .panel-form.form-row,
  .form-row,
  .form-grid,
  .inline-edit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .panel-form label,
  .choice-field legend {
    font-size: 13px;
  }
  input,
  select,
  textarea,
  button,
  .button {
    min-height: 46px;
    font-size: 16px;
  }
  textarea {
    min-height: 96px;
  }
  button,
  .button {
    display: inline-grid;
    place-items: center;
    width: 100%;
    padding: 10px 14px;
  }
  .table-wrap {
    display: none;
  }
  .table-wrap.users-table {
    display: block;
    overflow-x: auto;
  }
  .check-grid,
  .check-grid.compact {
    grid-template-columns: 1fr;
  }
  .form-actions {
    justify-content: stretch;
  }
  .mobile-card-list {
    display: grid;
    gap: 10px;
  }
  .mobile-record-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 7px;
  }
  .mobile-record-card strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
  }
  .mobile-record-card span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.25;
  }
  .mobile-actions-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
  .mobile-actions-row form {
    display: grid;
  }
  .mobile-actions-row .button,
  .mobile-actions-row button {
    min-height: 42px;
    padding: 8px;
    font-size: 13px;
  }
  .license-renewal-list {
    grid-template-columns: 1fr;
  }
  .renewal-card {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 78px;
  }
  .renewal-card input {
    width: 24px;
    height: 24px;
  }
  .attendance-card {
    grid-template-columns: 1fr;
  }
  .attendance-toggle {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 54px;
    font-size: 16px;
  }
  .attendance-toggle input {
    width: 26px;
    height: 26px;
  }
  .athlete-card-main {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }
  .athlete-card .state-pill {
    justify-self: start;
  }
  .event-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .weight-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .weight-choice-grid span {
    min-height: 54px;
    font-size: 16px;
  }
  .mobile-step-form {
    gap: 14px;
  }
  .form-step {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
  }
  .form-step h2 {
    display: block;
    margin: 0;
    color: var(--blue-dark);
    font-size: 16px;
  }
  .mobile-club-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 6px 5px max(6px, env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(15,34,52,.16);
  }
  .mobile-club-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 0;
    min-height: 50px;
    color: var(--blue-dark);
    font-size: 10px;
    font-weight: 900;
    text-decoration: none;
  }
  .mobile-club-nav svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-club-nav a.active {
    color: var(--ribbon-dark);
  }
  .vendor-signature {
    justify-content: center;
    margin: 18px 0 74px;
  }
  .vendor-signature img {
    width: 52px;
  }
  .vendor-signature img.ocrsoft-logo {
    width: 136px;
    max-height: 45px;
  }
  .auth-main {
    min-height: 100svh;
    align-content: start;
    padding: 10px;
  }
  .login-panel,
  .login-panel-wide {
    width: 100%;
    border-radius: 8px;
  }
  .login-hero {
    padding: 16px;
  }
  .login-hero-main {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
  }
  .login-hero-main img {
    width: 64px;
    height: 64px;
    max-width: 64px;
    padding: 5px;
    border-radius: 10px;
  }
  .login-hero-main span {
    font-size: 10px;
    line-height: 1.25;
  }
  .login-hero-main h1 {
    margin-top: 4px;
    font-size: 25px;
    line-height: 1.08;
  }
  .login-hero-main p {
    grid-column: 1 / -1;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.35;
  }
  .login-panel .panel-form {
    padding: 16px;
    gap: 14px;
  }
  .login-form-head h2 {
    font-size: 19px;
  }
  .login-form-head p {
    font-size: 13px;
  }
  .login-access-note {
    justify-content: flex-start;
    padding: 0 16px 14px;
  }
  .login-access-note span {
    font-size: 10px;
    padding: 5px 8px;
  }
  .auth-main .login-vendor {
    margin: 10px 0 14px;
  }
  .auth-main .login-vendor img {
    width: 46px;
  }
  .auth-main .login-vendor img.ocrsoft-logo {
    width: 150px;
    max-height: 50px;
  }
}

@media (max-width: 560px) {
  :root {
    --mobile-login-pad: 14px;
  }
  body {
    overflow-x: hidden;
    background: #ffffff;
  }
  .auth-main {
    display: block;
    min-height: 100svh;
    padding: 0;
    background: #ffffff;
  }
  .login-panel-wide {
    width: 100%;
    max-width: 100%;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-hero {
    padding: 18px var(--mobile-login-pad) 16px;
    border-radius: 0;
  }
  .login-hero-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    justify-items: center;
    text-align: center;
    max-width: none;
  }
  .login-hero-main img {
    width: 72px;
    height: 72px;
    max-width: 72px;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(5, 16, 28, .2);
  }
  .login-hero-main span {
    max-width: 240px;
    font-size: 9px;
    line-height: 1.25;
    letter-spacing: .02em;
  }
  .login-hero-main h1 {
    margin: 2px 0 0;
    font-size: 22px;
    line-height: 1.08;
  }
  .login-hero-main p {
    max-width: 280px;
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.3;
  }
  .login-panel .panel-form {
    display: grid;
    grid-template-columns: 1fr;
    padding: 18px var(--mobile-login-pad) 14px;
    gap: 14px;
    background: #ffffff;
  }
  .login-form-head {
    text-align: center;
  }
  .login-form-head h2 {
    font-size: 18px;
    line-height: 1.15;
  }
  .login-form-head p {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.35;
  }
  .login-fields {
    gap: 10px;
  }
  .login-panel label {
    gap: 5px;
    font-size: 12px;
  }
  .login-panel input {
    min-height: 44px;
    font-size: 16px;
    border-radius: 7px;
  }
  .login-actions button {
    min-height: 46px;
    font-size: 15px;
    border-radius: 7px;
  }
  .login-access-note {
    display: none;
  }
  .auth-main .login-vendor {
    display: grid;
    justify-items: center;
    gap: 3px;
    margin: 4px 0 0;
    padding: 0 var(--mobile-login-pad) 14px;
    font-size: 9px;
  }
  .auth-main .login-vendor img.ocrsoft-logo {
    width: min(118px, 46vw);
    max-height: 40px;
    opacity: .64;
  }
}

@media (max-width: 380px) {
  .login-hero {
    padding-top: 14px;
  }
  .login-hero-main img {
    width: 64px;
    height: 64px;
    max-width: 64px;
  }
  .login-hero-main h1 {
    font-size: 20px;
  }
  .login-hero-main p {
    display: none;
  }
  .login-panel .panel-form {
    padding-top: 16px;
  }
}
