:root {
  color-scheme: light;
  --navy: #10233f;
  --blue: #1e5aa8;
  --red: #d6383f;
  --paper: #f4f7fb;
  --ink: #182235;
  --muted: #637086;
  --line: #dfe5ee;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
.shell { min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 1fr) minmax(360px, 560px); }
.brand-panel { padding: clamp(3rem, 8vw, 8rem); display: flex; flex-direction: column; justify-content: center; color: white; background: linear-gradient(145deg, var(--navy), #173e71 70%, var(--blue)); }
.brand-panel h1 { margin: .5rem 0 1.25rem; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .94; letter-spacing: -.06em; }
.brand-panel p { max-width: 40rem; margin: 0; font-size: 1.15rem; line-height: 1.6; color: #dce8f8; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7da8dd; }
.card { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 35px rgba(23, 44, 76, .07); }
.login-card { align-self: center; margin: 2rem clamp(2rem, 6vw, 5rem); padding: clamp(2rem, 5vw, 3.5rem); }
.login-card h2 { margin: 0 0 2rem; font-size: 2rem; }
label { display: block; margin: 1rem 0 .45rem; font-weight: 700; }
input { width: 100%; padding: .9rem 1rem; border: 1px solid #bcc7d6; border-radius: 10px; background: #fff; }
select, textarea { width: 100%; padding: .8rem 1rem; border: 1px solid #bcc7d6; border-radius: 10px; background: #fff; }
input:focus { outline: 3px solid rgba(30, 90, 168, .18); border-color: var(--blue); }
button { margin-top: 1.5rem; width: 100%; padding: .9rem 1.2rem; border: 0; border-radius: 10px; color: white; background: var(--blue); font-weight: 800; cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
button.secondary { width: auto; margin: 0; color: var(--navy); background: white; border: 1px solid var(--line); }
.help { margin: 1rem 0 0; color: var(--muted); font-size: .9rem; }
.error { padding: .8rem; border-radius: 8px; color: #8e2025; background: #fdebec; }
.dashboard { max-width: 1200px; margin: auto; padding: clamp(1.5rem, 4vw, 4rem); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.topbar h1 { margin: .25rem 0 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.notice { margin-bottom: 1.5rem; padding: 1rem 1.2rem; border-left: 4px solid #d99000; border-radius: 8px; background: #fff5d9; }
.muted { color: var(--muted); }
.notifications-panel { margin-bottom: 1.5rem; padding: 1rem 1.25rem; border: 1px solid #e9d28c; border-radius: 14px; background: #fffaf0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2 { margin: 0; font-size: 1rem; }
button.text-button { width: auto; margin: 0; padding: .3rem; color: var(--blue); background: transparent; font-size: .85rem; }
.notification-list { display: grid; gap: .5rem; margin-top: .8rem; }
.notification-item { display: flex; justify-content: space-between; gap: .8rem; padding: .7rem; border-radius: 8px; background: white; }
.notification-item.urgent { border-left: 3px solid var(--red); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stats .card, .grid .card { padding: 1.5rem; }
.stats span { display: block; color: var(--muted); }
.stats strong { display: block; margin-top: .35rem; font-size: 2.5rem; color: var(--navy); }
.grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-top: 1rem; }
.grid h2 { margin-top: 0; }
.calendar-card { margin-top: 1rem; padding: 1.5rem; overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.calendar-toolbar h2 { margin: .25rem 0 0; }
.calendar-actions { display: flex; align-items: center; gap: .75rem; }
.calendar-actions strong { min-width: 10rem; text-align: center; text-transform: capitalize; }
.calendar-view-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
button.small-button { width: auto; margin: 0; padding: .52rem .78rem; border: 1px solid var(--line); color: var(--navy); background: white; font-size: .83rem; }
button.primary-small { color: white; background: var(--blue); border-color: var(--blue); }
button.icon-button { width: 2.6rem; height: 2.6rem; margin: 0; padding: 0; border: 1px solid var(--line); color: var(--navy); background: white; }
.calendar-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.25rem 0; }
.calendar-filters label { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); font-size: .9rem; cursor: pointer; }
.calendar-filters input { width: auto; }
.dot { width: .65rem; height: .65rem; border-radius: 50%; }
.dot.training, .event.training { background: #dcecff; color: #174f92; border-color: #9dc2ef; }
.dot.competition, .event.competition { background: #ffe0e1; color: #9c252b; border-color: #efabb0; }
.dot.activity, .event.activity { background: #e2f4e8; color: #25633c; border-color: #a9d7b7; }
.calendar-scroll { overflow-x: auto; }
.calendar-weekdays, .calendar-grid { min-width: 720px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: .55rem; text-align: center; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.calendar-day { min-height: 118px; padding: .45rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 1px solid var(--line); }
.calendar-day:nth-last-child(-n+7) { border-bottom: 1px solid var(--line); }
.calendar-day.outside { background: #f8fafc; color: #a6afbc; }
.calendar-day.today .day-number { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; color: white; background: var(--blue); }
.day-number { display: block; margin: 0 0 .35rem auto; font-size: .8rem; font-weight: 800; }
button.event { display: block; width: 100%; margin: .25rem 0 0; padding: .35rem .45rem; overflow: hidden; border: 1px solid; border-radius: 6px; text-align: left; white-space: nowrap; text-overflow: ellipsis; font-size: .73rem; font-weight: 750; }
button.event.cancelled { text-decoration: line-through; opacity: .65; }
button.event.pending::after { content: ' · pendent'; }
.event-list-view, .upcoming-list { display: grid; gap: .65rem; }
.list-event { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; margin: 0; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: white; text-align: left; }
.list-event strong, .list-event span { display: block; }
.list-event span { margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.list-event .dot { flex: 0 0 .75rem; height: .75rem; }
.empty-state { padding: 1rem 0; color: var(--muted); }
.event-dialog { width: min(92vw, 520px); padding: 2rem; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(5, 18, 38, .3); }
.event-dialog::backdrop { background: rgba(10, 25, 47, .58); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: .75rem; right: .75rem; width: 2.4rem; height: 2.4rem; margin: 0; padding: 0; color: var(--navy); background: #f0f3f7; font-size: 1.4rem; }
.event-badge { display: inline-block; padding: .3rem .55rem; border-radius: 99px; background: #e8eef7; color: var(--navy); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.event-dialog h2 { margin: .7rem 2rem 1.25rem 0; }
.event-dialog dl { display: grid; grid-template-columns: 7rem 1fr; gap: .65rem; margin: 0; }
.event-dialog dt { color: var(--muted); font-weight: 700; }
.event-dialog dd { margin: 0; white-space: pre-wrap; }
.dialog-section { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.dialog-section h3 { margin: 0 0 .7rem; font-size: 1rem; }
.action-row { display: flex; flex-wrap: wrap; gap: .55rem; }
.action-row button { width: auto; margin: 0; padding: .55rem .8rem; }
.action-row button.danger { background: #b8333a; }
.action-row button.success { background: #267645; }
.status-pill { display: inline-block; padding: .28rem .55rem; border-radius: 99px; font-size: .77rem; font-weight: 800; }
.status-pill.pending { color: #795400; background: #fff1bc; }
.status-pill.approved { color: #225b35; background: #dbf2e2; }
.status-pill.rejected { color: #942b30; background: #fde3e4; }
.document-link { display: block; padding: .55rem 0; color: var(--blue); }
.editor-dialog { max-height: 88vh; overflow-y: auto; }
.planning-dialog { width: min(96vw, 820px); max-height: 94vh; overflow-y: auto; }
.planning-card { margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.planning-card h3 { margin: 0 0 .8rem; color: var(--navy); }
.planning-card button { width: auto; }
.individual-planning-card { border-left: 4px solid var(--blue); }
.planning-status { margin: .65rem 0 0; font-size: .86rem; }
.planning-message { position: sticky; bottom: 0; margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 10px; font-weight: 750; }
.planning-message.success { color: #225b35; background: #dbf2e2; }
.planning-message.error { color: #942b30; background: #fde3e4; }
.consent-dialog { width: min(94vw, 760px); max-height: 92vh; overflow-y: auto; }
.consent-text { max-height: 18rem; margin: 1rem 0; padding: 1rem 1.2rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; white-space: pre-wrap; line-height: 1.55; }
.consent-option { display: flex; align-items: flex-start; gap: .7rem; margin: 1rem 0; line-height: 1.45; }
.consent-option input, .consent-dialog .inline-option input { width: auto; margin-top: .25rem; flex: 0 0 auto; }
.consent-dialog fieldset { margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.consent-dialog .inline-option { display: flex; align-items: flex-start; gap: .7rem; margin-top: .8rem; }
.weights-dialog { width: min(94vw, 680px); max-height: 92vh; overflow-y: auto; }
.weights-history { display: grid; gap: .5rem; }
.weight-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.weight-row strong { overflow-wrap: anywhere; }
.weight-row .weight-value { grid-row: span 2; align-self: center; color: var(--navy); font-size: 1.1rem; }
.weight-row .weight-date { color: var(--muted); font-size: .82rem; }
.athlete-file-dialog { width: min(96vw, 1040px); max-height: 94vh; overflow-y: auto; }
.athlete-file-header h3 { margin-bottom: .2rem; font-size: 1.35rem; }
.athlete-file-header p { margin-top: 0; }
.athlete-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: 1.2rem 0; }
.athlete-kpis article { padding: .9rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.athlete-kpis span { display: block; color: var(--muted); font-size: .78rem; }
.athlete-kpis strong { display: block; margin-top: .25rem; color: var(--navy); font-size: 1.55rem; }
.athlete-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.athlete-chart-grid section { min-width: 0; }
.athlete-chart { min-height: 230px; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.athlete-chart svg { display: block; width: 100%; height: auto; }
.athlete-chart .chart-grid-line { stroke: #e4e9f0; stroke-width: 1; }
.athlete-chart .chart-axis-text { fill: var(--muted); font-size: 11px; }
.athlete-chart .chart-line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.athlete-chart .chart-point { fill: var(--blue); stroke: #fff; stroke-width: 2; }
.athlete-table-wrap { overflow-x: auto; }
.athlete-data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.athlete-data-table th, .athlete-data-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.athlete-data-table th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.attendance-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid #edf0f4; }
fieldset { margin: 1rem 0; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
legend { padding: 0 .35rem; font-size: .9rem; font-weight: 750; }
.selection-list { max-height: 12rem; overflow-y: auto; }
.selection-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.selection-list label, label.inline-option { display: flex; align-items: center; gap: .5rem; margin: .5rem 0; font-weight: 500; }
.selection-list input, label.inline-option input { width: auto; }
@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; }
  .brand-panel { min-height: 38vh; padding: 2.5rem 1.5rem; }
  .brand-panel h1 { font-size: 3.2rem; }
  .login-card { margin: 1.5rem; }
  .stats, .grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; }
  .calendar-actions { width: 100%; justify-content: space-between; }
  .athlete-kpis, .athlete-chart-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .athlete-kpis, .athlete-chart-grid { grid-template-columns: 1fr; }
}
