:root {
  color-scheme: dark;
  --pine: #0B2118; --grass: #1E5A3D; --glass: #D9F3E4; --lime: #C8F36A;
  --mist: #EDF4EE; --graphite: #16221C; --white: #F8FFF9; --muted: #A7BCAF;
  --line: rgb(217 243 228 / 16%); --glass-soft: rgb(217 243 228 / 7%); --glass-mid: rgb(217 243 228 / 11%);
  --amber: #E7C978; --amber-soft: rgb(231 201 120 / 13%); --red: #FF9B8C; --red-soft: rgb(255 155 140 / 12%);
  --shadow: 0 24px 70px rgb(0 8 4 / 34%);
  --font-ui: "Segoe UI Variable", Aptos, "Segoe UI", system-ui, sans-serif;
  --font-score: "Bahnschrift SemiCondensed", Bahnschrift, "Segoe UI Variable", sans-serif;
  font-family: var(--font-ui); color: var(--mist); background: var(--pine);
  font-synthesis: none; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--pine); }
body {
  position: relative; min-width: 320px; min-height: 100vh; margin: 0; color: var(--mist);
  background:
    radial-gradient(circle at 79% 13%, transparent 0 13rem, rgb(200 243 106 / 5%) 13.08rem 13.14rem, transparent 13.22rem),
    radial-gradient(circle at 79% 13%, transparent 0 25rem, rgb(217 243 228 / 4%) 25.08rem 25.14rem, transparent 25.22rem),
    radial-gradient(ellipse at 16% -12%, rgb(30 90 61 / 58%), transparent 42%),
    linear-gradient(145deg, #0B2118, #10281D 58%, #0A1A13);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
a { color: var(--glass); }
[hidden], .hidden { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 20; padding: 11px 15px; transform: translateY(-150%); border: 1px solid var(--line); border-radius: 12px; color: var(--pine); background: var(--lime); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.app-shell { min-height: 100vh; }

/* Shared liquid-glass chrome */
.topbar, .top {
  position: sticky; top: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: min(100% - 32px, 1500px); min-height: 76px; margin: 12px auto 0; padding: 12px clamp(16px, 2.5vw, 32px);
  border: 1px solid rgb(217 243 228 / 20%); border-radius: 24px; color: var(--white);
  background: linear-gradient(112deg, rgb(18 57 39 / 86%), rgb(9 31 21 / 78%));
  box-shadow: 0 16px 44px rgb(0 8 4 / 25%), inset 0 1px 0 rgb(255 255 255 / 13%);
  backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%);
}
.brand { display: inline-flex; min-width: max-content; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.crest { display: grid; width: 42px; height: 48px; flex: 0 0 42px; place-items: center; color: var(--lime); }
.crest svg { width: 100%; height: 100%; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { color: var(--white); font-size: 1rem; font-weight: 800; letter-spacing: -.035em; }
.brand-copy span { color: rgb(237 244 238 / 68%); font-size: .72rem; }
.topbar-tools { display: flex; min-width: 0; flex: 1; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
#team-admin-export[data-export-permitted="false"] { display: none !important; }
.account-name { color: var(--glass); font-size: .8rem; font-weight: 700; }
.team-switcher { display: inline-flex; align-items: center; gap: 8px; color: rgb(237 244 238 / 78%); font-size: .76rem; font-weight: 700; }
.team-switcher select { width: auto; min-width: 160px; max-width: 240px; min-height: 40px; padding: 0 34px 0 12px; border: 1px solid rgb(217 243 228 / 24%); border-radius: 14px; color: var(--white); background: rgb(217 243 228 / 8%); }
.team-switcher option { color: var(--graphite); background: var(--mist); }
.team-switcher select:disabled { opacity: .65; }
.save-state { color: rgb(237 244 238 / 72%); font-size: .72rem; }
.button, .top button, .top a, .text-button, .primary, .secondary, .save-response { transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-size: .82rem; font-weight: 750; text-decoration: none; }
.button:hover, .top button:hover, .top a:hover, .text-button:hover, .primary:hover, .secondary:hover, .save-response:hover { transform: translateY(-1px); }
.button-primary, button.primary, .save-response { border-color: var(--lime); color: var(--pine); background: var(--lime); box-shadow: 0 7px 20px rgb(200 243 106 / 15%); }
.button-primary:hover, button.primary:hover, .save-response:hover { background: #D4F889; }
.button-outline, button.secondary { border-color: rgb(217 243 228 / 24%); color: var(--glass); background: rgb(217 243 228 / 5%); }
.button-outline:hover, button.secondary:hover { border-color: rgb(217 243 228 / 42%); background: rgb(217 243 228 / 11%); }
.button-subtle { border-color: rgb(217 243 228 / 17%); color: var(--mist); background: rgb(217 243 228 / 6%); }
.button-subtle:hover { border-color: rgb(217 243 228 / 30%); background: rgb(217 243 228 / 12%); }
.button-small { min-height: 39px; padding: 0 12px; font-size: .75rem; }
.top a, .top button { min-height: 42px; padding: 0 15px; border: 1px solid rgb(217 243 228 / 20%); border-radius: 14px; color: var(--mist); background: rgb(217 243 228 / 6%); font-size: .82rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.top a:hover, .top button:hover { background: rgb(217 243 228 / 13%); }

/* Team dashboard */
.main-content { display: grid; grid-template-columns: 166px minmax(0, 1fr); align-items: start; gap: clamp(24px, 3.5vw, 52px); width: min(100% - 48px, 1450px); margin: 0 auto; padding: 38px 0 46px; }
.view-tabs { position: sticky; top: 108px; display: grid; align-content: start; gap: 7px; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 22px; background: rgb(217 243 228 / 5%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%); backdrop-filter: blur(20px); }
.view-tab { display: flex; min-height: 46px; align-items: center; gap: 10px; padding: 0 13px; border: 0; border-left: 3px solid transparent; border-radius: 14px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: .84rem; font-weight: 750; }
.view-tab:hover { color: var(--mist); background: rgb(217 243 228 / 7%); }
.view-tab.is-active { border-left-color: var(--lime); color: var(--white); background: linear-gradient(90deg, rgb(200 243 106 / 12%), rgb(217 243 228 / 4%)); }
.tab-count { display: inline-grid; min-width: 23px; height: 23px; place-items: center; padding: 0 6px; border: 1px solid rgb(200 243 106 / 26%); border-radius: 9px; color: var(--lime); background: rgb(200 243 106 / 9%); font-family: var(--font-score); font-size: .74rem; font-variant-numeric: tabular-nums; }
.view-panel { min-width: 0; grid-column: 2; }
.next-event { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; min-height: 222px; overflow: hidden; padding: clamp(25px, 4vw, 44px); border: 1px solid rgb(217 243 228 / 25%); border-radius: 32px 20px 32px 20px; color: var(--white); background: linear-gradient(118deg, rgb(30 90 61 / 88%), rgb(11 43 28 / 87%)); box-shadow: 0 25px 60px rgb(0 8 4 / 28%), inset 0 1px 0 rgb(255 255 255 / 18%); backdrop-filter: blur(22px) saturate(145%); animation: feature-in .45s ease-out both; }
.next-event::before, .next-event::after { position: absolute; content: ""; pointer-events: none; }
.next-event::before { inset: 14% 4% 14% 48%; border: 1px solid rgb(217 243 228 / 12%); border-radius: 46% 0 0 46%; }
.next-event::after { top: 50%; right: 20%; width: 190px; height: 190px; border: 1px solid rgb(217 243 228 / 12%); border-radius: 50%; transform: translateY(-50%); box-shadow: 0 0 0 52px rgb(217 243 228 / 2%); }
.next-copy, .next-action { position: relative; z-index: 1; }
.next-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; color: var(--glass); font-size: .8rem; font-weight: 750; }
.next-kicker::before { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 18px rgb(200 243 106 / 70%); content: ""; }
.next-title { max-width: 680px; margin: 0; color: var(--white); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -.06em; }
.next-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 17px 0 0; color: rgb(237 244 238 / 82%); font-size: .86rem; line-height: 1.55; }
.next-action { display: grid; justify-items: end; gap: 13px; }
.next-date { text-align: right; }
.next-date strong { display: block; color: var(--lime); font-family: var(--font-score); font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.06em; line-height: .95; }
.next-date span { display: block; max-width: 140px; margin-top: 8px; color: rgb(237 244 238 / 78%); font-size: .75rem; }
.next-action button { min-height: 44px; padding: 0 16px; border: 1px solid rgb(217 243 228 / 60%); border-radius: 14px; color: var(--pine); background: var(--mist); cursor: pointer; font-size: .8rem; font-weight: 800; }
.next-action button:hover { background: var(--white); }
.next-action .next-edit { min-height: 36px; border-color: rgb(217 243 228 / 26%); color: var(--glass); background: rgb(217 243 228 / 7%); font-size: .75rem; }
.next-action .next-edit:hover { background: rgb(217 243 228 / 13%); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 36px 0 17px; }
.section-heading h1, .section-heading h2 { margin: 0; color: var(--white); font-size: clamp(1.7rem, 3vw, 2.15rem); line-height: 1.12; letter-spacing: -.05em; }
.section-kicker { margin: 0 0 6px; color: var(--lime); font-size: .75rem; font-weight: 700; }
.filter-group { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgb(217 243 228 / 5%); backdrop-filter: blur(16px); }
.filter-button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; cursor: pointer; font-size: .76rem; font-weight: 750; }
.filter-button:hover { color: var(--mist); background: rgb(217 243 228 / 7%); }
.filter-button.is-selected { color: var(--pine); background: var(--lime); box-shadow: 0 4px 14px rgb(200 243 106 / 15%); }
.connection-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 13px 15px; border: 1px solid rgb(255 155 140 / 30%); border-radius: 16px; color: #FFDAD3; background: var(--red-soft); font-size: .84rem; line-height: 1.45; }
.connection-alert button { min-height: 42px; padding: 0 13px; border: 1px solid rgb(255 155 140 / 35%); border-radius: 12px; color: #FFDAD3; background: rgb(255 255 255 / 5%); cursor: pointer; font-weight: 750; }
.event-list { position: relative; display: grid; gap: 10px; }
.event-row { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 106px; padding: 15px 19px; border: 1px solid var(--line); border-left: 3px solid var(--grass); border-radius: 20px; background: linear-gradient(110deg, rgb(217 243 228 / 8%), rgb(217 243 228 / 4%)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%); backdrop-filter: blur(16px); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.event-row:hover { transform: translateY(-1px); border-color: rgb(217 243 228 / 27%); background: linear-gradient(110deg, rgb(217 243 228 / 11%), rgb(217 243 228 / 5%)); }
.event-row[data-type="partido"] { border-left-color: var(--lime); }
.event-date { display: grid; justify-items: center; gap: 2px; padding: 8px 3px; border-right: 1px solid var(--line); }
.event-date span { color: var(--muted); font-size: .68rem; font-weight: 750; text-transform: capitalize; }
.event-date strong { color: var(--white); font-family: var(--font-score); font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.event-info { min-width: 0; }
.event-title-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.event-title { margin: 0; color: var(--mist); font-size: .98rem; font-weight: 800; letter-spacing: -.02em; }
.type-pill, .role-chip { display: inline-flex; min-height: 24px; align-items: center; padding: 0 9px; border: 1px solid rgb(217 243 228 / 15%); border-radius: 8px; color: var(--glass); background: rgb(217 243 228 / 7%); font-size: .68rem; font-weight: 750; }
.type-pill[data-type="partido"] { border-color: rgb(200 243 106 / 26%); color: var(--lime); background: rgb(200 243 106 / 8%); }
.event-details { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 8px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.event-attendance { display: grid; justify-items: end; gap: 7px; }
.attendance-count { color: var(--glass); font-size: .72rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 5px; }
.text-button { min-height: 37px; padding: 0 11px; border: 1px solid rgb(217 243 228 / 19%); border-radius: 12px; color: var(--glass); background: rgb(217 243 228 / 4%); cursor: pointer; font-size: .73rem; font-weight: 750; }
.text-button:hover { border-color: rgb(217 243 228 / 33%); background: rgb(217 243 228 / 10%); }
.danger-button, button.danger { border-color: rgb(255 155 140 / 25%); color: #FFC3B9; background: rgb(255 155 140 / 5%); }
.danger-button:hover, button.danger:hover { background: var(--red-soft); }
.empty-state, .empty { padding: 26px 22px; border: 1px dashed rgb(217 243 228 / 24%); border-radius: 20px; color: var(--muted); background: rgb(217 243 228 / 4%); text-align: center; line-height: 1.55; }
.roster-heading { align-items: center; margin-top: 0; }
.heading-note { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }
.roster-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 14px; }
.summary-chip { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: rgb(217 243 228 / 5%); font-size: .74rem; }
.summary-chip strong { color: var(--lime); font-family: var(--font-score); font-size: .95rem; font-variant-numeric: tabular-nums; }
.people-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.person-card { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(120deg, rgb(217 243 228 / 8%), rgb(217 243 228 / 4%)); backdrop-filter: blur(16px); }
.person-avatar { display: grid; flex: 0 0 43px; width: 43px; height: 43px; place-items: center; border: 1px solid rgb(200 243 106 / 22%); border-radius: 15px; color: var(--lime); background: rgb(200 243 106 / 9%); font-family: var(--font-score); font-size: .86rem; font-weight: 750; }
.person-main { min-width: 0; flex: 1; }
.person-name { overflow: hidden; margin: 0; color: var(--mist); font-size: .9rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.person-contact { overflow: hidden; margin: 4px 0 0; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.role-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.role-chip { min-height: 22px; padding: 0 8px; color: var(--glass); font-size: .64rem; }
.person-actions { display: flex; gap: 5px; }
.person-actions button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid transparent; border-radius: 12px; color: var(--muted); background: transparent; cursor: pointer; font-size: 1rem; }
.person-actions button:hover { border-color: var(--line); color: var(--mist); background: var(--glass-soft); }
.mobile-nav { display: none; }

/* Shared dialogs and forms */
.sheet { width: min(100% - 32px, 650px); max-width: 650px; max-height: min(90dvh, 840px); padding: 0; overflow: hidden; border: 1px solid rgb(217 243 228 / 24%); border-radius: 26px; color: var(--mist); background: linear-gradient(145deg, rgb(17 48 33 / 96%), rgb(8 29 20 / 97%)); box-shadow: 0 30px 90px rgb(0 0 0 / 48%), inset 0 1px 0 rgb(255 255 255 / 13%); backdrop-filter: blur(28px); }
.sheet::backdrop { background: rgb(2 12 7 / 70%); backdrop-filter: blur(8px); }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: rgb(11 33 24 / 88%); backdrop-filter: blur(18px); }
.sheet-top h2 { margin: 0; color: var(--white); font-size: 1.2rem; letter-spacing: -.035em; }
.icon-button { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--mist); background: var(--glass-soft); cursor: pointer; font-size: 1.35rem; }
.icon-button:hover { background: var(--glass-mid); }
.sheet-content { max-height: calc(min(90dvh, 840px) - 82px); padding: 20px 22px 26px; overflow: auto; }
.form-grid, .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; color: var(--mist); font-size: .8rem; font-weight: 750; }
.field-full, .field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea, input, select, textarea { min-height: 45px; padding: 10px 12px; border: 1px solid rgb(217 243 228 / 22%); border-radius: 13px; color: var(--white); background: rgb(217 243 228 / 6%); font-weight: 500; }
.field input::placeholder, input::placeholder, textarea::placeholder { color: rgb(167 188 175 / 78%); }
.field select option, select option { color: var(--graphite); background: var(--mist); }
.field textarea { min-height: 88px; resize: vertical; }
.field-hint { color: var(--muted); font-size: .72rem; font-weight: 500; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus { border-color: rgb(200 243 106 / 65%); }
.role-fieldset { margin: 0; padding: 0; border: 0; }
.role-fieldset legend { margin-bottom: 8px; padding: 0; color: var(--mist); font-weight: 750; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.button-subtle { color: var(--mist); }
.button-subtle:hover { color: var(--white); }
.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-option { display: flex; min-height: 45px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 13px; color: var(--mist); background: rgb(217 243 228 / 4%); cursor: pointer; font-size: .78rem; font-weight: 600; }
.role-option:has(input:checked) { border-color: rgb(200 243 106 / 48%); background: rgb(200 243 106 / 8%); }
.role-option input { width: 17px; height: 17px; min-height: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; accent-color: var(--lime); }
.attendance-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 15px; }
.attendance-stat { padding: 7px 10px; border: 1px solid rgb(200 243 106 / 18%); border-radius: 10px; color: var(--lime); background: rgb(200 243 106 / 7%); font-size: .72rem; font-weight: 750; }
.attendance-stat[data-state="duda"], .attendance-stat[data-state="pendiente"] { border-color: rgb(231 201 120 / 25%); color: var(--amber); background: var(--amber-soft); }
.attendance-stat[data-state="no-viene"] { border-color: rgb(255 155 140 / 25%); color: #FFC3B9; background: var(--red-soft); }
.attendance-columns, .attendance-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(120px, .8fr) minmax(130px, .8fr); align-items: center; gap: 10px; }
.attendance-columns { padding: 0 0 8px; color: var(--muted); font-size: .69rem; font-weight: 750; }
.attendance-row { min-height: 68px; padding: 10px 0; border-bottom: 1px solid rgb(217 243 228 / 10%); }
.attendance-person { min-width: 0; }
.attendance-person strong { display: block; overflow: hidden; color: var(--mist); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.attendance-person span, .attendance-person small { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.attendance-person small { margin-top: 5px; font-size: .65rem; }
.history-button { margin-top: 5px; padding: 0; border: 0; color: var(--lime); background: transparent; cursor: pointer; font-size: .7rem; text-decoration: underline; text-underline-offset: 3px; }
.attendance-row select { width: 100%; min-height: 42px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 12px; color: var(--mist); background: rgb(217 243 228 / 6%); font-size: .75rem; }
.attendance-row select:disabled { color: var(--muted); background: rgb(217 243 228 / 3%); }
.event-modal-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; margin: -3px 0 16px; color: var(--muted); font-size: .77rem; }
.convocation-state { color: var(--lime); font-weight: 750; }
.attendance-real-summary { margin: -4px 0 13px; color: var(--muted); font-size: .75rem; }
.attendance-actions { flex-wrap: wrap; align-items: end; }
.local-profile-note { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border: 1px solid rgb(231 201 120 / 21%); border-radius: 14px; color: #F6E7BB; background: var(--amber-soft); font-size: .76rem; line-height: 1.5; }
.audit-history { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.audit-history li { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--mist); background: rgb(217 243 228 / 4%); font-size: .8rem; }
.audit-history small { color: var(--muted); }
.form-error, .error { min-height: 22px; margin: 10px 0 0; color: #FFC3B9; font-size: .8rem; line-height: 1.45; }
.hint { color: var(--muted); font-size: .76rem; line-height: 1.55; }
.local-note { width: min(100% - 48px, 1200px); margin: 0 auto 20px; color: rgb(167 188 175 / 78%); font-size: .7rem; line-height: 1.5; text-align: center; }
.toast { position: fixed; z-index: 30; right: 20px; bottom: 20px; max-width: min(90vw, 380px); padding: 13px 16px; transform: translateY(12px); border: 1px solid rgb(217 243 228 / 20%); border-radius: 15px; color: var(--mist); background: rgb(11 33 24 / 92%); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; backdrop-filter: blur(22px); }
.toast.is-visible { transform: translateY(0); opacity: 1; }

/* Family agenda */
.family-page .top, .accounts-page .top { width: min(100% - 32px, 1220px); }
.family-page .top strong { color: var(--white); font-size: 1rem; letter-spacing: -.025em; }
.family-page .top span { color: var(--muted); font-size: .72rem; }
.family-page .top > div:last-child { display: flex; flex-wrap: wrap; gap: 7px; }
.family-page main, .accounts-page main { width: min(100% - 40px, 1120px); margin: 38px auto 72px; }
.family-page .heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.family-page h1, .accounts-page h1 { margin: 0 0 8px; color: var(--white); font-size: clamp(1.9rem, 4vw, 2.65rem); line-height: 1.08; letter-spacing: -.055em; }
.family-page .muted, .accounts-page > main > .muted { max-width: 760px; margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.55; }
.family-page .heading label { display: grid; gap: 6px; color: var(--muted); font-size: .75rem; font-weight: 750; }
.family-selectors { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.family-page .heading select { min-width: 220px; }
.status { min-height: 24px; margin: 0 0 12px; color: var(--muted); font-size: .79rem; }
.status.error { color: #FFC3B9; }
.event { margin: 13px 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(120deg, rgb(217 243 228 / 9%), rgb(217 243 228 / 4%)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%); backdrop-filter: blur(18px); }
.event-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.event h2 { margin: 0 0 7px; color: var(--white); font-size: 1.08rem; letter-spacing: -.025em; }
.date { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.pill { display: inline-flex; min-height: 28px; align-items: center; padding: 4px 10px; border: 1px solid rgb(217 243 228 / 16%); border-radius: 10px; color: var(--glass); background: rgb(217 243 228 / 7%); font-size: .69rem; line-height: 1.3; }
.child { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgb(217 243 228 / 12%); }
.child strong { color: var(--mist); font-size: .85rem; }
.availability-field { display: grid; gap: 6px; min-width: min(100%, 220px); color: var(--muted); font-size: .7rem; font-weight: 750; }
.availability-field select { min-height: 42px; padding: 8px 11px; }
.save-response { align-self: end; min-height: 42px; padding: 0 15px; border-radius: 13px; cursor: pointer; font-size: .77rem; font-weight: 800; }
.save-response:disabled { border-color: var(--line); color: var(--muted); background: rgb(217 243 228 / 5%); box-shadow: none; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.actions button { min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--glass); background: var(--glass-soft); cursor: pointer; font-size: .78rem; font-weight: 750; }
.actions button:hover { background: var(--glass-mid); }

/* Accounts and team administration */
.accounts-page .top { min-height: 66px; }
.accounts-page .top a { margin-right: auto; }
.accounts-page h2 { margin: 0 0 18px; color: var(--white); font-size: 1.16rem; letter-spacing: -.03em; }
.accounts-page .panel { margin: 18px 0; padding: clamp(18px, 3vw, 27px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, rgb(217 243 228 / 9%), rgb(217 243 228 / 4%)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%), 0 18px 40px rgb(0 8 4 / 12%); backdrop-filter: blur(18px); }
.accounts-page .panel:nth-of-type(2) { border-color: rgb(200 243 106 / 18%); }
.accounts-page .hint { margin: 11px 0; }
.accounts-page .panel > .hint { padding: 12px 14px; border: 1px solid rgb(217 243 228 / 10%); border-radius: 14px; background: rgb(217 243 228 / 4%); }
.accounts-page .grid { gap: 15px; }
.accounts-page .field { gap: 7px; font-size: .77rem; }
.accounts-page button.primary, .accounts-page button.secondary { min-height: 43px; padding: 0 14px; border-radius: 13px; font-size: .76rem; font-weight: 750; cursor: pointer; }
.accounts-page button.primary { border: 1px solid var(--lime); }
.accounts-page button.secondary { border: 1px solid var(--line); }
.accounts-page button.danger { min-height: 38px; padding: 0 10px; border: 1px solid rgb(255 155 140 / 20%); border-radius: 11px; cursor: pointer; font-size: .72rem; }
.team-row, .account { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 16px 0; border-top: 1px solid rgb(217 243 228 / 12%); }
.team-row:first-child, .account:first-child { border-top: 0; }
.team-row strong, .account strong { display: block; color: var(--mist); font-size: .87rem; }
.team-row small, .account small { display: block; margin-top: 5px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.team-actions, .account-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.team-actions button, .account-actions button { min-height: 39px; padding: 0 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--glass); background: rgb(217 243 228 / 5%); cursor: pointer; font-size: .71rem; font-weight: 750; }
.grant-list { display: grid; gap: 6px; margin-top: 8px; }
.grant-entry { display: flex; align-items: center; gap: 10px; color: var(--glass); font-size: .72rem; }
.grant-entry button { margin-left: auto; }
.account .guardian-form, .grant-form { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 9px; }
.grant-form { grid-template-columns: 1fr 1fr auto; }
.grant-form select { min-width: 0; }
.grant-form .grant-member-field, .grant-member-field { display: grid; gap: 6px; color: var(--muted); font-size: .7rem; font-weight: 750; }
.grant-form .error, .guardian-form .error { grid-column: 1 / -1; }
.grant-form button { white-space: nowrap; }
.account-actions { grid-column: 1 / -1; }
.account code, #setup-code { overflow-wrap: anywhere; color: var(--lime); font-family: var(--font-score); font-size: 1rem; font-weight: 750; user-select: all; }
#setup-code-panel { border-color: rgb(200 243 106 / 34%); background: linear-gradient(135deg, rgb(200 243 106 / 11%), rgb(217 243 228 / 5%)); }
#setup-code-message { color: var(--glass); }

/* Access, setup, and offline screens */
.auth-page, .offline-page { display: grid; min-height: 100vh; place-items: center; padding: 28px 16px; }
.auth-card, .offline-card { position: relative; width: min(100%, 490px); overflow: hidden; padding: clamp(25px, 6vw, 42px); padding-bottom: 30px; border: 1px solid rgb(217 243 228 / 24%); border-radius: 30px 18px 30px 18px; background: linear-gradient(145deg, rgb(217 243 228 / 12%), rgb(217 243 228 / 5%)); box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 14%); backdrop-filter: blur(26px) saturate(140%); }
.auth-card::before, .offline-card::before { position: absolute; top: -128px; right: -98px; width: 260px; height: 260px; border: 1px solid rgb(200 243 106 / 15%); border-radius: 50%; box-shadow: 0 0 0 35px rgb(217 243 228 / 2%), 0 0 0 75px rgb(217 243 228 / 2%); content: ""; pointer-events: none; }
.auth-card > *, .offline-card > * { position: relative; z-index: 1; }
.auth-card .crest, .offline-mark { display: grid; width: 54px; height: 62px; place-items: center; clip-path: polygon(50% 0, 93% 12%, 88% 66%, 50% 100%, 12% 66%, 7% 12%); color: var(--pine); background: var(--lime); font-size: 1rem; font-weight: 900; letter-spacing: -.06em; }
.auth-card h1, .offline-card h1 { margin: 25px 0 9px; color: var(--white); font-size: clamp(1.75rem, 5vw, 2.15rem); letter-spacing: -.055em; line-height: 1.08; }
.auth-card > p, .offline-card > p { margin: 0 0 22px; color: var(--muted); font-size: .83rem; line-height: 1.6; }
.auth-card .field { margin: 17px 0; }
.auth-card .hint { margin-top: 17px; padding: 12px 14px; border: 1px solid rgb(217 243 228 / 12%); border-radius: 14px; background: rgb(217 243 228 / 5%); }
.auth-card button, .offline-card button { width: 100%; min-height: 48px; margin-top: 10px; padding: 0 18px; border: 1px solid var(--lime); border-radius: 14px; color: var(--pine); background: var(--lime); cursor: pointer; font-size: .82rem; font-weight: 850; }
.auth-card button:hover, .offline-card button:hover { background: #D4F889; }
.auth-card a { color: var(--glass); text-decoration-color: rgb(217 243 228 / 40%); text-underline-offset: 3px; }
.auth-card .error { min-height: 22px; margin-top: 14px; color: #FFC3B9; }
.auth-card .success { min-height: 22px; margin-top: 14px; color: var(--lime); }
.offline-card { width: min(100%, 560px); text-align: left; }
.offline-mark { width: 58px; height: 66px; margin-bottom: 24px; font-size: 1.3rem; }
.offline-card h1 { margin-top: 0; }
.offline-card button { width: auto; min-width: 170px; }

@keyframes feature-in { from { opacity: .6; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 960px) {
  .main-content { grid-template-columns: 1fr; gap: 18px; width: min(100% - 40px, 800px); padding-top: 28px; }
  .view-tabs { position: static; display: flex; flex-direction: row; gap: 4px; width: fit-content; margin-bottom: 2px; padding: 5px; }
  .view-tab { border-left: 0; border-bottom: 2px solid transparent; }
  .view-tab.is-active { border-bottom-color: var(--lime); border-left-color: transparent; }
  .view-panel { grid-column: 1; }
  .local-note { width: min(100% - 40px, 800px); }
}
@media (max-width: 700px) {
  body { padding-bottom: 76px; background-attachment: scroll; }
  .topbar, .top { position: relative; top: 0; width: calc(100% - 20px); min-height: 0; margin: 10px auto 0; padding: 11px 13px; border-radius: 20px; }
  .topbar { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .crest { width: 35px; height: 40px; flex-basis: 35px; }
  .brand { gap: 9px; }
  .brand-copy strong { font-size: .87rem; }
  .brand-copy span { font-size: .64rem; }
  .topbar-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1 0 100%; gap: 6px; }
  .team-switcher { grid-column: 1 / -1; justify-content: space-between; padding: 2px 2px 4px; }
  .team-switcher select { min-width: 0; max-width: 70%; min-height: 39px; flex: 1; }
  .account-name { grid-column: 1 / -1; align-self: center; padding-left: 3px; font-size: .68rem; }
  .topbar-tools .button, .topbar-tools button { width: 100%; min-width: 0; min-height: 41px; padding: 0 7px; border-radius: 12px; font-size: .67rem; white-space: nowrap; }
  .view-tabs { display: none; }
  .topbar-tools #add-event { grid-column: auto; width: 100%; }
  .save-state { display: none; }
  .main-content { width: calc(100% - 24px); padding: 18px 0 26px; }
  .next-event { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 188px; padding: 20px 17px; border-radius: 24px 14px 24px 14px; }
  .next-event::before { inset: 16% 0 16% 48%; }
  .next-event::after { right: 11%; width: 125px; height: 125px; }
  .next-kicker { margin-bottom: 9px; font-size: .72rem; }
  .next-title { font-size: clamp(1.55rem, 7vw, 2rem); }
  .next-meta { display: grid; gap: 5px; margin-top: 10px; font-size: .72rem; }
  .next-action { align-self: end; gap: 9px; }
  .next-date strong { font-size: 2.15rem; }
  .next-date span { max-width: 90px; font-size: .65rem; }
  .next-action button { min-height: 41px; padding-inline: 10px; border-radius: 12px; font-size: .68rem; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin: 26px 0 13px; }
  .section-heading h1, .section-heading h2 { font-size: 1.7rem; }
  .filter-group { width: 100%; }
  .filter-button { min-width: 0; flex: 1; padding-inline: 6px; font-size: .69rem; }
  .event-list { gap: 8px; }
  .event-row { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; min-height: 96px; padding: 11px 10px; border-radius: 17px; }
  .event-date { min-height: 55px; }
  .event-date strong { font-size: 1.45rem; }
  .event-title { font-size: .85rem; }
  .event-details { display: grid; gap: 4px; font-size: .69rem; }
  .event-attendance { grid-column: 2; align-items: start; justify-items: start; gap: 7px; margin-top: -2px; }
  .event-actions { justify-content: start; gap: 4px; }
  .attendance-count { font-size: .66rem; }
  .text-button { min-height: 37px; padding-inline: 8px; font-size: .66rem; }
  .roster-heading { align-items: stretch; }
  .roster-heading .button { width: 100%; }
  .people-list { grid-template-columns: 1fr; gap: 8px; }
  .person-card { padding: 11px; border-radius: 17px; }
  .mobile-nav { position: fixed; z-index: 12; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); left: 10px; display: grid; grid-template-columns: 1fr 1fr; min-height: 62px; padding: 5px 10px; border: 1px solid rgb(217 243 228 / 22%); border-radius: 20px; background: rgb(9 31 21 / 90%); box-shadow: 0 15px 36px rgb(0 8 4 / 34%), inset 0 1px 0 rgb(255 255 255 / 12%); backdrop-filter: blur(24px); }
  .mobile-nav-item { display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 14px; color: var(--muted); background: transparent; cursor: pointer; font-size: .66rem; font-weight: 750; }
  .mobile-nav-item svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
  .mobile-nav-item.is-active { color: var(--lime); background: rgb(200 243 106 / 8%); }
  .sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: none; max-height: min(92dvh, 860px); margin: 0; border-radius: 25px 25px 0 0; }
  .sheet[open] { animation: sheet-up .2s ease-out; }
  .sheet-content { max-height: calc(min(92dvh, 860px) - 78px); padding: 16px 16px max(22px, env(safe-area-inset-bottom)); }
  .sheet-top { padding: 15px 16px; }
  .form-grid, .grid { grid-template-columns: 1fr; gap: 12px; }
  .field-full, .field.full { grid-column: auto; }
  .attendance-columns { display: none; }
  .attendance-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .attendance-person { grid-column: 1 / -1; }
  .toast { right: 12px; bottom: 88px; }
  .family-page .top, .accounts-page .top { min-height: 62px; }
  .family-page .top > div:last-child { justify-content: flex-end; }
  .family-page .top button { min-height: 38px; padding: 0 10px; font-size: .68rem; }
  .family-page main, .accounts-page main { width: calc(100% - 28px); margin: 27px auto 44px; }
  .family-page .heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .family-selectors { width: 100%; }
  .family-page .heading select { min-width: 0; width: 100%; }
  .event { padding: 16px 14px; border-radius: 19px; }
  .event-head { flex-direction: column; }
  .child { align-items: stretch; flex-direction: column; }
  .availability-field { min-width: 100%; }
  .save-response { width: 100%; }
  .account, .team-row { grid-template-columns: 1fr; }
  .team-actions { justify-content: flex-start; }
  .account .guardian-form, .grant-form { grid-template-columns: 1fr; }
  .grant-form .error, .guardian-form .error { grid-column: auto; }
  .grant-form button { justify-self: start; }
  .team-row, .account { padding: 14px 0; }
  .accounts-page .panel { border-radius: 19px; }
  .account-actions { grid-column: auto; }
  .auth-page, .offline-page { padding: 16px 12px; }
  .auth-card, .offline-card { padding: 25px 20px; border-radius: 24px 15px 24px 15px; }
  .auth-card h1, .offline-card h1 { font-size: 1.75rem; }
  .offline-card button { width: 100%; }
}
@media (max-width: 390px) {
  .topbar-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-tools #add-event { grid-column: auto; }
  .team-switcher, .account-name { grid-column: 1 / -1; }
  .section-heading h1, .section-heading h2 { font-size: 1.55rem; }
  .next-event { grid-template-columns: 1fr; }
  .next-action { display: flex; align-items: end; justify-content: space-between; }
  .next-date { text-align: left; }
  .next-date span { max-width: none; }
  .next-action .next-edit { justify-self: end; }
  .role-picker { grid-template-columns: 1fr; }
}
@keyframes sheet-up { from { transform: translateY(20px); opacity: .85; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Platform administration: a club ledger with visible capacity and access controls */
.platform-page main { width: min(100% - 48px, 1450px); margin: 34px auto 72px; }
.platform-hero { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: end; gap: 28px; margin: 0 0 26px; }
.platform-kicker { margin: 0 0 8px; color: var(--lime); font-size: .73rem; font-weight: 800; }
.platform-hero h1 { margin: 0; color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.065em; line-height: .98; }
.platform-hero .muted { max-width: 700px; margin: 12px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.platform-snapshot { display: grid; gap: 3px; padding: 4px 0 5px 18px; border-left: 2px solid var(--lime); }
.platform-snapshot strong { color: var(--white); font-family: var(--font-score); font-size: 2.55rem; font-variant-numeric: tabular-nums; letter-spacing: -.06em; line-height: 1; }
.platform-snapshot span { color: var(--muted); font-size: .72rem; }
.platform-operator-note { margin: 0 0 18px; color: var(--glass); font-size: .82rem; line-height: 1.55; }
.platform-layout { display: grid; grid-template-columns: minmax(275px, 350px) minmax(0, 1fr); align-items: start; gap: 22px; }
.platform-rail { display: grid; gap: 15px; align-content: start; }
.platform-page .panel { margin: 0; }
.platform-create { padding: 17px 19px; }
.platform-create summary { color: var(--white); cursor: pointer; font-size: .85rem; font-weight: 800; list-style-position: outside; }
.platform-create details[open] summary { margin-bottom: 17px; }
.platform-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px; }
.platform-create .platform-form { grid-template-columns: 1fr; }
.platform-form .field-wide, .platform-form .error { grid-column: 1 / -1; }
.platform-form .field input, .platform-form .field select, .platform-search input { min-height: 41px; }
.platform-create .hint { margin: 0; font-size: .7rem; }
.platform-section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.platform-section-title h2, .platform-empty h2 { margin: 0; color: var(--white); font-size: 1.1rem; letter-spacing: -.035em; }
.platform-section-title .hint { margin: 6px 0 0; font-size: .7rem; }
.platform-tenant-list { padding: 18px; }
.platform-search { margin: 16px 0 8px; font-size: .72rem !important; }
.platform-search input { min-height: 39px; }
.platform-tenant-option { display: grid; width: 100%; gap: 4px; margin-top: 7px; padding: 12px 12px 12px 14px; border: 1px solid transparent; border-left: 2px solid rgb(217 243 228 / 20%); border-radius: 11px; color: var(--mist); background: transparent; cursor: pointer; text-align: left; }
.platform-tenant-option:hover { border-color: var(--line); background: rgb(217 243 228 / 5%); }
.platform-tenant-option.is-selected { border-color: rgb(200 243 106 / 22%); border-left-color: var(--lime); background: linear-gradient(100deg, rgb(200 243 106 / 10%), rgb(217 243 228 / 3%)); }
.tenant-option-name { overflow: hidden; color: var(--white); font-size: .81rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.tenant-option-meta { overflow: hidden; color: var(--muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.tenant-option-bottom { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .65rem; text-transform: capitalize; }
.tenant-plan-tag { margin-left: auto; padding: 3px 7px; border: 1px solid rgb(217 243 228 / 13%); border-radius: 99px; color: var(--glass); font-size: .62rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.status-dot.status-activo { background: var(--lime); }
.status-dot.status-suspendido, .status-dot.status-cerrado { background: var(--red); }
.platform-detail { display: grid; gap: 15px; min-width: 0; }
.platform-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 5px 2px 9px; border-bottom: 1px solid var(--line); }
.platform-detail-head h2 { overflow-wrap: anywhere; margin: 0; color: var(--white); font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.05em; }
.platform-detail-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 9px; }
.status-pill { display: inline-flex; align-items: center; min-height: 29px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--glass); font-size: .68rem; text-transform: capitalize; }
.status-pill.status-activo { border-color: rgb(200 243 106 / 30%); color: var(--lime); }
.status-pill.status-suspendido, .status-pill.status-cerrado { border-color: rgb(255 155 140 / 25%); color: var(--red); }
.platform-detail-actions button, .platform-form button, .platform-add-account button { min-height: 40px; padding: 0 13px; border-radius: 12px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.platform-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.platform-meter { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px 15px 15px 5px; background: rgb(217 243 228 / 4%); }
.platform-meter.is-near { border-color: rgb(231 201 120 / 38%); }
.platform-meter.is-full { border-color: rgb(255 155 140 / 40%); }
.platform-meter.is-over { border-color: rgb(255 155 140 / 45%); }
.platform-meter-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .66rem; }
.platform-meter-top strong { color: var(--white); font-family: var(--font-score); font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.platform-meter-top small { color: var(--muted); font-family: var(--font-ui); font-size: .66rem; }
.meter-track { height: 5px; overflow: hidden; margin: 11px 0 7px; border-radius: 99px; background: rgb(217 243 228 / 10%); }
.meter-track span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.is-near .meter-track span { background: var(--amber); }
.is-full .meter-track span { background: var(--red); }
.is-over .meter-track span { background: var(--red); }
.platform-meter > small { color: var(--muted); font-size: .61rem; }
.platform-license, .platform-accounts, .platform-audit { padding: clamp(16px, 2.2vw, 23px); }
.license-code { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgb(200 243 106 / 20%); border-radius: 99px; color: var(--lime); font-size: .67rem; text-transform: capitalize; }
.platform-license-form { margin-top: 17px; }
.platform-license-form > .field { font-size: .72rem; }
.platform-license-form input, .platform-license-form select { font-size: .76rem; }
.platform-history { margin-top: 13px; color: var(--muted); font-size: .67rem; }
.platform-license-history-row { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 4px 10px; padding: 9px 0; border-top: 1px solid rgb(217 243 228 / 9%); }
.platform-license-history-row span { color: var(--muted); }
.platform-license-history-row strong { color: var(--glass); font-weight: 700; text-transform: capitalize; }
.platform-license-history-row small { grid-column: 2; color: var(--muted); line-height: 1.4; }
.platform-add-account { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; margin: 17px 0 4px; }
.platform-add-account .field { font-size: .72rem; }
.platform-add-account .error { grid-column: 1 / -1; }
.platform-user-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; padding: 15px 0; border-top: 1px solid rgb(217 243 228 / 12%); }
.platform-user-main { min-width: 0; }
.platform-user-main strong { color: var(--white); font-size: .8rem; }
.platform-user-main small { display: block; overflow-wrap: anywhere; margin-top: 4px; color: var(--muted); font-size: .65rem; line-height: 1.45; }
.platform-user-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 5px 9px; }
.platform-user-actions .text-button { padding: 4px 1px; border: 0; color: var(--glass); background: none; cursor: pointer; font-size: .64rem; text-decoration: underline; text-decoration-color: rgb(217 243 228 / 30%); text-underline-offset: 3px; }
.platform-user-actions .text-button:hover { color: var(--lime); }
.platform-user-actions .text-button:disabled { cursor: not-allowed; opacity: .4; }
.platform-user-actions .danger-text { color: var(--red); }
.platform-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid rgb(217 243 228 / 10%); color: var(--muted); font-size: .67rem; }
.platform-pagination button { min-height: 35px; padding: 0 10px; border-radius: 10px; font-size: .67rem; cursor: pointer; }
.platform-audit-row { display: grid; grid-template-columns: minmax(110px, 170px) minmax(120px, 1fr) minmax(120px, .8fr); align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid rgb(217 243 228 / 10%); font-size: .65rem; }
.platform-audit-row:first-child { margin-top: 10px; }
.platform-audit-row time, .platform-audit-row small { color: var(--muted); }
.platform-audit-row strong { color: var(--mist); font-weight: 700; text-transform: capitalize; }
.platform-empty { min-height: 180px; padding: 25px; border-left: 2px solid var(--grass) !important; }
.platform-empty .hint { max-width: 430px; }
.platform-code-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px !important; border-color: rgb(200 243 106 / 35%) !important; }
.platform-code-panel h2 { margin: 0; color: var(--white); font-size: 1rem; }
.platform-code-panel code { display: inline-block; overflow-wrap: anywhere; margin-top: 7px; color: var(--lime); font-size: .85rem; user-select: all; }
.platform-code-actions { display: flex; align-items: center; gap: 10px; }
.platform-code-actions button { min-height: 39px; padding: 0 11px; border-radius: 11px; font-size: .68rem; cursor: pointer; }
.platform-dialog { width: min(100% - 32px, 430px); padding: 0; border: 1px solid rgb(217 243 228 / 22%); border-radius: 22px; color: var(--mist); background: #10281D; box-shadow: 0 28px 80px rgb(0 0 0 / 50%); }
.platform-dialog::backdrop { background: rgb(0 8 4 / 68%); backdrop-filter: blur(4px); }
.platform-dialog form { display: grid; gap: 12px; padding: 23px; }
.platform-dialog h2 { margin: 0; color: var(--white); font-size: 1.35rem; letter-spacing: -.04em; }
.platform-dialog .hint { margin: 0; font-size: .76rem; line-height: 1.5; }
.platform-dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 7px; }
.platform-dialog-actions button { min-height: 40px; padding: 0 13px; border-radius: 12px; cursor: pointer; font-size: .73rem; font-weight: 800; }
.platform-user { margin-left: auto; color: var(--glass); font-size: .75rem; }
@media (max-width: 900px) {
  .platform-layout { grid-template-columns: 1fr; }
  .platform-rail { grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); align-items: start; }
  .platform-detail { grid-row: 2; }
}
@media (max-width: 620px) {
  .platform-page main { width: calc(100% - 28px); margin: 25px auto 48px; }
  .platform-hero { grid-template-columns: 1fr auto; align-items: end; gap: 16px; }
  .platform-snapshot { padding-left: 11px; }
  .platform-snapshot strong { font-size: 1.9rem; }
  .platform-snapshot span { max-width: 75px; line-height: 1.35; }
  .platform-rail { grid-template-columns: 1fr; }
  .platform-meters { grid-template-columns: 1fr; }
  .platform-detail-head { align-items: start; flex-direction: column; }
  .platform-detail-actions { justify-content: start; }
  .platform-form, .platform-add-account { grid-template-columns: 1fr; }
  .platform-form .field-wide, .platform-form .error, .platform-add-account .error { grid-column: auto; }
  .platform-user-row { grid-template-columns: 1fr; }
  .platform-user-actions { justify-content: start; }
  .platform-audit-row { grid-template-columns: 1fr 1fr; }
  .platform-audit-row small { grid-column: 1 / -1; }
  .platform-code-panel { align-items: start; flex-direction: column; }
  .platform-code-actions { justify-content: start; }
  .platform-user { margin-left: 0; }
}


/* Club workspace navigation */
.platform-detail [data-view][hidden] { display: none; }
.platform-view-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.platform-view-nav button { flex: 0 0 auto; padding: 13px 17px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.platform-view-nav button:hover { color: var(--white); }
.platform-view-nav button.is-active { border-bottom-color: var(--lime); color: var(--white); }
.platform-view-nav button:focus-visible { outline: 2px solid var(--lime); outline-offset: -3px; }
@media (min-width: 901px) {
  .platform-tenant-list #tenants { max-height: 48vh; overflow-y: auto; }
}

/* On a phone, choosing a club opens its workspace. */
.platform-back-to-clubs { display: none; }
@media (max-width: 620px) {
  .platform-page:not(.platform-mobile-detail) .platform-detail,
  .platform-page:not(.platform-mobile-detail) #operator-detail { display: none; }
  .platform-mobile-detail .platform-hero,
  .platform-mobile-detail .platform-operator-note,
  .platform-mobile-detail .platform-rail { display: none; }
  .platform-mobile-detail .platform-back-to-clubs { display: inline-flex; justify-self: start; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--lime); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
  .platform-mobile-detail .platform-detail { grid-row: auto; }
  .platform-mobile-detail .platform-layout { gap: 8px; }
  .platform-mobile-detail .platform-detail-head { padding-top: 8px; }
  .platform-back-to-clubs:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
}

/* Compact platform workspace */
.platform-page main { margin-top: 22px; }
.platform-hero { margin-bottom: 18px; }
.platform-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.platform-layout { gap: 16px; }
.platform-rail, .platform-detail { gap: 10px; }
.platform-license, .platform-accounts, .platform-audit { padding: 16px; }
.platform-license-form, .platform-add-account { margin-top: 12px; }
.platform-search { margin-top: 12px; }
.platform-form { gap: 10px; }
.platform-meter { padding: 10px 12px; }
.meter-track { margin: 8px 0 5px; }
.platform-user-row { padding: 11px 0; }
@media (max-width: 620px) {
  .platform-page main { margin-top: 16px; }
  .platform-hero { margin-bottom: 14px; }
  .platform-view-nav button { padding: 11px 12px; }
  .platform-meters { gap: 6px; }
  .platform-detail-head { gap: 9px; }
  .platform-license, .platform-accounts, .platform-audit { padding: 14px; }
}

.platform-page .top > a { display: inline-flex; align-items: center; justify-content: center; text-align: center; }

.platform-create-button { min-height: 46px; padding: 0 16px; border: 1px solid var(--lime); border-radius: 13px; font: inherit; font-size: .82rem; font-weight: 800; cursor: pointer; }
.platform-create-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.platform-create-dialog .platform-form { grid-template-columns: 1fr; }
.platform-create-dialog .platform-dialog-actions { display: flex; flex-wrap: wrap; }
.platform-create-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.platform-created-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.platform-created-content { display: grid; gap: 12px; padding: 23px; }
.platform-created-content code { overflow-wrap: anywhere; color: var(--lime); font-size: .9rem; user-select: all; }
.platform-created-content code:empty, .platform-created-content #club-copy-status:empty { display: none; }
.platform-created-content .platform-dialog-actions { flex-wrap: wrap; }

/* Confirmation after creating a club */
.platform-created-dialog { width: min(430px, calc(100vw - 32px)); max-width: calc(100vw - 32px); margin: auto; }
.platform-created-content { min-width: 0; padding: 22px; }
.platform-created-content h2 { line-height: 1.2; }
.platform-created-content code:not(:empty) { display: block; min-width: 0; padding: 13px; border: 1px solid rgb(200 243 106 / 28%); border-radius: 10px; background: rgb(0 0 0 / 18%); line-height: 1.5; word-break: break-all; }
.platform-created-content .platform-dialog-actions button { min-height: 44px; }
@media (max-width: 420px) {
  .platform-created-content { padding: 18px; }
  .platform-created-content .platform-dialog-actions { display: flex; flex-direction: column-reverse; }
  .platform-created-content .platform-dialog-actions button { width: 100%; }
}

.agenda-loading { display: flex; align-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--mist); background: rgb(217 243 228 / 4%); font-weight: 700; }
.agenda-loading-mark { width: 20px; height: 20px; flex: 0 0 20px; border: 2px solid rgb(217 243 228 / 25%); border-top-color: var(--lime); border-radius: 50%; animation: agenda-loading-spin .8s linear infinite; }
@keyframes agenda-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .agenda-loading-mark { animation: none; } }

.agenda-search-controls { display: grid; grid-template-columns: minmax(160px, 2fr) repeat(3, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.agenda-search-controls .field { font-size: .75rem; }
.agenda-search-controls input, .agenda-search-controls select { min-width: 0; width: 100%; }
.agenda-pages { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; color: var(--muted); font-size: .8rem; }
.agenda-pages button { min-height: 42px; padding: 0 14px; cursor: pointer; }
@media (max-width: 700px) { .agenda-search-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
