
:root {
  --navy: #063b52;
  --blue: #0b5d7a;
  --blue-2: #147fa5;
  --aqua: #e8f6fa;
  --teal: #087f8c;
  --ink: #15242b;
  --muted: #667780;
  --line: #d8e2e7;
  --surface: #ffffff;
  --surface-2: #f4f7f9;
  --success: #1d6f42;
  --warning: #8a5a00;
  --error: #a52828;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(6, 59, 82, 0.08);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-2);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, calc(100% - 28px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--navy); color: white; box-shadow: 0 3px 14px rgba(0,0,0,.16); }
.header-inner { min-height: 66px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-block: 9px; }
.brand { color: white; font-weight: 800; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: white; color: var(--navy); font-size: .9rem; }
.main-nav { display: flex; flex: 1; gap: 3px; flex-wrap: wrap; }
.main-nav a { color: #dcecf2; padding: 8px 10px; border-radius: 9px; font-size: .93rem; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.13); color: white; text-decoration: none; }
.account-menu { display: flex; align-items: center; gap: 10px; color: white; font-size: .9rem; }
.account-menu a, .link-button { color: white; }
.link-button { border: 0; background: transparent; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.page-shell { padding-block: 28px 48px; min-height: calc(100vh - 125px); }
.site-footer { color: var(--muted); font-size: .85rem; padding: 18px 0 30px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.page-header h1 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.25rem); line-height: 1.15; }
.page-header p { margin: 7px 0 0; color: var(--muted); }
.actions { display: flex; gap: 9px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 15px; border-radius: 10px; border: 1px solid transparent; background: var(--blue); color: white; font-weight: 700; cursor: pointer; font-size: .93rem; }
.button:hover { background: var(--navy); color: white; text-decoration: none; }
.button-secondary { background: white; color: var(--blue); border-color: var(--line); }
.button-secondary:hover { background: var(--aqua); color: var(--navy); }
.button-danger { background: white; color: var(--error); border-color: #efcaca; }
.button-danger:hover { background: #fff0f0; color: var(--error); }
.button-small { min-height: 34px; padding: 6px 10px; font-size: .85rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 18px; }
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { border-left: 5px solid var(--teal); }
.kpi-label { color: var(--muted); font-weight: 700; font-size: .88rem; }
.kpi-value { display: block; font-size: 2rem; font-weight: 850; margin-top: 4px; color: var(--navy); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 750; font-size: .91rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #bac9d1; border-radius: 9px; background: white; color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(20,127,165,.17); border-color: var(--blue-2); }
textarea { min-height: 95px; resize: vertical; }
input[type="checkbox"] { width: auto; min-height: auto; }
.checkbox-row { display: flex; align-items: center; gap: 9px; min-height: 43px; }
.checkbox-row label { margin: 0; }
.help { color: var(--muted); font-size: .82rem; margin-top: 5px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.table-wrap { overflow-x: auto; border-radius: 11px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: white; font-size: .91rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf4f7; color: var(--navy); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfc; }
.time { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 750; }
.muted { color: var(--muted); }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 999px; background: #eaf2f5; color: var(--navy); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.badge-success { background: #e2f3e9; color: var(--success); }
.badge-error { background: #fbe8e8; color: var(--error); }
.badge-warning { background: #fff0cd; color: var(--warning); }
.flash-stack { display: grid; gap: 9px; margin-bottom: 18px; }
.flash { border-radius: 10px; padding: 12px 14px; font-weight: 650; border: 1px solid; }
.flash-success { color: var(--success); background: #e8f7ee; border-color: #b9dec9; }
.flash-warning { color: var(--warning); background: #fff5dc; border-color: #ead39d; }
.flash-error { color: var(--error); background: #ffeded; border-color: #efbcbc; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 17px; }
.split-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.split-card { padding: 14px; border-radius: 11px; background: var(--aqua); border: 1px solid #c8e5ee; }
.split-card label { color: var(--navy); }
.detail-list { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.detail-list dt { color: var(--muted); font-weight: 700; }
.detail-list dd { margin: 0; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.login-shell { min-height: calc(100vh - 80px); display: grid; place-items: center; padding-block: 30px; }
.login-card { width: min(440px, 100%); }
.login-logo { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--navy); color: white; font-weight: 900; margin-bottom: 18px; }
.login-card h1 { margin-bottom: 5px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }
.notice { border-left: 5px solid var(--blue-2); background: var(--aqua); padding: 13px 15px; border-radius: 9px; margin-bottom: 18px; }
.inline-form { display: inline; }
@media (max-width: 900px) {
  .header-inner { align-items: flex-start; }
  .main-nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .grid-4, .split-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .container { width: min(100% - 20px, 1180px); }
  .page-shell { padding-top: 20px; }
  .page-header { flex-direction: column; }
  .page-header .actions, .page-header .button { width: 100%; }
  .form-grid, .grid-2, .grid-3, .grid-4, .split-grid, .filters { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 10px; }
  .account-menu { margin-left: auto; }
  .brand span:last-child { display: none; }
  th, td { padding: 9px 10px; }
}

/* Ergänzungen für die eigenständige Browser-Demo */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.role-switcher {
  width: auto;
  min-height: 36px;
  padding: 6px 30px 6px 10px;
  border-color: rgba(255,255,255,.35);
  color: white;
  background-color: rgba(255,255,255,.12);
  font-size: .86rem;
}
.role-switcher option { color: var(--ink); background: white; }
.demo-bar { background: #fff5dc; border-bottom: 1px solid #ead39d; color: #684500; }
.demo-bar-inner { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: .85rem; padding-block: 6px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-link { border: 0; padding: 3px 0; background: transparent; color: #684500; font: inherit; font-weight: 750; cursor: pointer; text-decoration: underline; }
.file-label { display: inline-block; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 15px;
  border-radius: 10px;
  background: var(--navy);
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--error); }
.toast.success { background: var(--success); }
.button[disabled], input[disabled], select[disabled], textarea[disabled] { opacity: .58; cursor: not-allowed; }
.stat-caption { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 17px; }
.toolbar > div { min-width: 180px; flex: 1; }
.toolbar .button { flex: 0 0 auto; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 24px; }
.section-heading h2 { margin: 0; }
.linkish { border: 0; background: none; color: var(--blue); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.danger-zone { border-color: #efcaca; background: #fffafa; }
.readonly-notice { border-left-color: var(--warning); background: #fff5dc; color: #684500; }
.demo-help-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.demo-help-item { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.demo-help-item strong { display: block; color: var(--navy); margin-bottom: 5px; }
.time-preview { display: block; min-height: 22px; margin-top: 5px; color: var(--muted); font-size: .82rem; }
.form-error { color: var(--error); font-weight: 700; font-size: .84rem; margin-top: 5px; }
.table-link { font-weight: 800; }
.mobile-cards { display: none; }
.badge-neutral { background: #eaf2f5; color: var(--navy); }
.best-marker { color: var(--success); font-size: .76rem; font-weight: 800; white-space: nowrap; }
.storage-state { font-weight: 800; }
@media (max-width: 780px) {
  .demo-bar-inner { align-items: flex-start; flex-direction: column; }
  .demo-help-grid { grid-template-columns: 1fr; }
  .role-switcher { max-width: 142px; }
}
@media (max-width: 620px) {
  .demo-actions { width: 100%; justify-content: space-between; }
  .toolbar > div { min-width: 100%; }
  .toolbar .button { width: 100%; }
  .row-actions { justify-content: flex-start; }
}


/* Vereinsrekorde auf der Startseite */
.record-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.record-card { margin: 0; overflow: hidden; }
.record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.record-heading h2 { margin: 2px 0 0; }
.record-gender {
  display: inline-block;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.record-table th:nth-child(2),
.record-table td:nth-child(2) { white-space: nowrap; }
.record-time { font-size: 1.05rem; font-weight: 900; }
.record-date { color: var(--muted); font-size: .76rem; margin-top: 2px; }
.record-empty { color: var(--muted); font-style: italic; }
@media (max-width: 980px) {
  .record-board { grid-template-columns: 1fr; }
}

/* Altersklassen-Staffeln */
.team-preview {
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid #c8e5ee;
  border-radius: 11px;
  background: var(--aqua);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.team-preview strong {
  color: var(--navy);
  font-size: 1.35rem;
  letter-spacing: .01em;
}

/* Version 5: Bestenlisten untereinander und bewusste Staffel-Ausnahmen */
.record-board {
  grid-template-columns: minmax(0, 1fr);
}
.record-discipline {
  width: 23%;
  vertical-align: top;
  background: var(--surface-2);
  border-bottom: 2px solid var(--line);
}
.record-rank {
  width: 58px;
  text-align: center;
  font-weight: 900;
  color: var(--navy);
}
.record-table tr:nth-child(3n) td {
  border-bottom: 2px solid var(--line);
}
.relay-override {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-top: 8px;
}
.relay-override small {
  color: var(--warning);
  font-weight: 700;
}

/* Version 8: feste Disziplinreihenfolge und Line Throw */
.record-subheading {
  margin: 24px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--navy);
}
.record-heading + .record-subheading {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.filters-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1150px) {
  .filters-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .filters-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .filters-wide { grid-template-columns: 1fr; }
}

/* NAS-Anwendung: Konten und Login */
.account-menu { display: flex; align-items: center; gap: 8px; }
.account-identity { display: grid; justify-items: end; line-height: 1.15; color: #fff; }
.account-identity strong { font-size: .9rem; }
.account-identity span { font-size: .72rem; opacity: .78; }
.account-button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  padding: 7px 9px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
}
.account-button:hover { background: rgba(255,255,255,.12); }
.loading-card { margin-top: 24px; }
.password-dialog {
  width: min(92vw, 520px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 22px 70px rgba(0,0,0,.3);
}
.password-dialog::backdrop { background: rgba(3, 28, 39, .68); }
.password-dialog form { padding: 22px; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-header h2 { margin: 0; }
.dialog-close { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.form-error { min-height: 22px; margin-top: 10px; color: #a02c2c; font-weight: 700; }
@media (max-width: 900px) {
  .account-identity { display: none; }
  .account-button { padding: 6px 8px; }
}
@media (max-width: 640px) {
  .account-menu { width: 100%; justify-content: flex-end; }
}


/* Web-only-Demo: klassische Sportler-Dropdowns und Datumsfilter */
.athlete-search-field { display: grid; gap: 0; }
.athlete-search-input { width: 100%; }
.athlete-search-help { margin-top: 4px; }
.filters .athlete-search-help { display: none; }
.personal-best-section h3 { margin-top: 20px; }

/* Web-only-Demo: lokaler Login */
[hidden] { display: none !important; }
.login-view {
  min-height: 100vh;
  background: linear-gradient(150deg, #eaf5f8 0%, #f8fbfc 55%, #dcecf1 100%);
}
.login-view .login-shell { min-height: 100vh; padding: 24px; }
.login-view .login-card { width: min(100%, 540px); padding: clamp(24px, 5vw, 42px); }
.login-brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.login-brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: var(--navy);
  font-weight: 900;
  letter-spacing: .04em;
}
.login-eyebrow { color: var(--blue-2); font-size: .78rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.login-view h1 { margin: 2px 0 0; color: var(--navy); }
.login-view .intro { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.login-message { min-height: 22px; margin-top: 10px; }
.login-submit { width: 100%; margin-top: 8px; }
.demo-access { margin-top: 24px; padding: 12px 14px; border-radius: 10px; background: var(--aqua); }
.demo-access summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.login-access-table { margin-top: 12px; }
.login-access-table table { font-size: .86rem; }
.login-access-table th, .login-access-table td { padding: 8px; }
.security-note { margin: 20px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
@media (max-width: 520px) {
  .login-view .login-shell { padding: 12px; }
  .login-view .login-card { padding: 24px 18px; }
  .login-access-table table, .login-access-table tbody, .login-access-table tr, .login-access-table th, .login-access-table td { display: block; }
  .login-access-table tr { padding: 8px 0; }
  .login-access-table th, .login-access-table td { border: 0; padding: 2px 0; }
}


/* Web-only-Demo v22: Vereinsname, Schwimmsymbol und mobiles Klappmenü */
.swim-icon {
  display: block;
  width: 25px;
  height: 25px;
}
.login-brand-mark .swim-icon {
  width: 36px;
  height: 36px;
}
.brand-title {
  line-height: 1.12;
  white-space: normal;
}
.header-panel {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 18px;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px;
  background: transparent;
  color: white;
  cursor: pointer;
  position: relative;
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255,255,255,.12);
}
.menu-toggle:focus-visible {
  outline: 3px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}
.menu-toggle-bar {
  position: absolute;
  left: 10px;
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: top .18s ease, transform .18s ease, opacity .18s ease;
}
.menu-toggle-bar:nth-child(1) { top: 13px; }
.menu-toggle-bar:nth-child(2) { top: 20px; }
.menu-toggle-bar:nth-child(3) { top: 27px; }
.menu-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,.16);
}
@media (max-width: 1050px) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding-block: 9px;
  }
  .brand {
    min-width: 0;
    white-space: normal;
  }
  .brand-title {
    display: inline !important;
    font-size: .98rem;
    overflow-wrap: anywhere;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .header-panel {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 4px 0 7px;
    border-top: 1px solid rgba(255,255,255,.16);
  }
  .header-panel.open {
    display: flex;
  }
  .main-nav {
    order: initial;
    flex: none;
    flex-basis: auto;
    width: 100%;
    overflow: visible;
    flex-wrap: nowrap;
    flex-direction: column;
    gap: 4px;
    padding: 0;
  }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 11px 12px;
  }
  .account-menu {
    width: 100%;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.16);
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .account-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: auto;
  }
}
@media (max-width: 420px) {
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .brand-mark .swim-icon {
    width: 23px;
    height: 23px;
  }
  .brand-title {
    font-size: .9rem;
  }
}

@media (min-width: 1051px) {
  .header-inner {
    flex-wrap: nowrap;
    gap: 12px;
  }
  .header-panel { gap: 10px; }
  .main-nav {
    flex-wrap: nowrap;
    gap: 1px;
  }
  .main-nav a {
    padding-inline: 7px;
    font-size: .86rem;
  }
  .account-menu { gap: 7px; }
  .account-button { padding: 6px 7px; }
}


/* Wettkampfkalender und Kontoverknüpfung */
.calendar-card { overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.calendar-toolbar h2 { margin: 0; color: var(--navy); }
.calendar-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.calendar-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.calendar-grid { min-width: 760px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekday { padding: 9px 8px; background: #edf4f7; color: var(--navy); font-size: .8rem; font-weight: 850; text-align: center; border-right: 1px solid var(--line); }
.calendar-weekday:nth-child(7) { border-right: 0; }
.calendar-day { min-height: 112px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.other-month { background: #f8fafb; color: #91a0a8; }
.calendar-day.today { box-shadow: inset 0 0 0 2px var(--blue-2); }
.calendar-date { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: .82rem; font-weight: 850; margin-bottom: 6px; }
.calendar-events { display: grid; gap: 5px; }
.calendar-event { display: block; padding: 5px 7px; border-radius: 7px; background: var(--aqua); border-left: 3px solid var(--teal); color: var(--navy); font-size: .74rem; font-weight: 750; line-height: 1.25; }
.calendar-event:hover { text-decoration: none; background: #d8f0f5; }
.account-link { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.account-unlinked { color: var(--muted); font-size: .84rem; }
.profile-notice { border-left-color: var(--teal); }
@media (max-width: 620px) {
  .calendar-toolbar { align-items: stretch; }
  .calendar-toolbar > * { width: 100%; }
  .calendar-controls .button { flex: 1; }
}


/* Web-only-Demo v22: Staffel-Auswahl nach festen Altersklassen, robuste Statusfilter und einheitliche Listen */
.password-intro { margin: 0 0 14px; }
.password-rules { margin: 6px 0 13px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.password-dialog[data-forced="true"] .dialog-close,
.password-dialog[data-forced="true"] [data-action="close-password"] { display: none; }
.password-dialog[data-forced="true"] { border-top: 6px solid var(--warning); }

.athlete-groups { display: grid; gap: 20px; }
.athlete-age-section { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.athlete-age-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--navy); color: white; }
.athlete-age-header h2 { margin: 0; font-size: 1.15rem; }
.athlete-age-header span { font-size: .82rem; opacity: .82; }
.athlete-gender-section { padding: 16px 18px 18px; }
.athlete-gender-section + .athlete-gender-section { border-top: 1px solid var(--line); }
.athlete-gender-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; color: var(--navy); }
.athlete-gender-heading h3 { margin: 0; font-size: 1rem; }
.athlete-gender-heading .badge { min-width: 28px; justify-content: center; }
.athlete-gender-section .table-wrap { width: 100%; }
.athlete-list-table { width: 100%; table-layout: fixed; }
.athlete-list-table.with-account { min-width: 780px; }
.athlete-list-table.with-account th:nth-child(1), .athlete-list-table.with-account td:nth-child(1) { width: 24%; }
.athlete-list-table.with-account th:nth-child(2), .athlete-list-table.with-account td:nth-child(2) { width: 11%; }
.athlete-list-table.with-account th:nth-child(3), .athlete-list-table.with-account td:nth-child(3) { width: 9%; }
.athlete-list-table.with-account th:nth-child(4), .athlete-list-table.with-account td:nth-child(4) { width: 31%; }
.athlete-list-table.with-account th:nth-child(5), .athlete-list-table.with-account td:nth-child(5) { width: 12%; }
.athlete-list-table.with-account th:nth-child(6), .athlete-list-table.with-account td:nth-child(6) { width: 13%; }
.athlete-list-table.without-account { min-width: 590px; }
.athlete-list-table.without-account th:nth-child(1), .athlete-list-table.without-account td:nth-child(1) { width: 42%; }
.athlete-list-table.without-account th:nth-child(2), .athlete-list-table.without-account td:nth-child(2) { width: 15%; }
.athlete-list-table.without-account th:nth-child(3), .athlete-list-table.without-account td:nth-child(3) { width: 12%; }
.athlete-list-table.without-account th:nth-child(4), .athlete-list-table.without-account td:nth-child(4) { width: 15%; }
.athlete-list-table.without-account th:nth-child(5), .athlete-list-table.without-account td:nth-child(5) { width: 16%; }
.athlete-list-table td { overflow-wrap: anywhere; }

.athlete-picker { position: relative; width: 100%; }
.athlete-picker-trigger {
  width: 100%; min-height: 43px; padding: 9px 38px 9px 11px; border: 1px solid #bac9d1; border-radius: 9px;
  background: white; color: var(--ink); font: inherit; text-align: left; cursor: pointer; position: relative;
}
.athlete-picker-trigger::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.athlete-picker-trigger:focus { outline: 3px solid rgba(20,127,165,.17); border-color: var(--blue-2); }
.athlete-picker.open .athlete-picker-trigger::after { margin-top: -2px; transform: rotate(225deg); }
.athlete-picker-value.placeholder { color: var(--muted); }
.athlete-picker-panel {
  position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 5px); padding: 9px;
  background: white; border: 1px solid #aebfc8; border-radius: 10px; box-shadow: 0 16px 38px rgba(6,59,82,.22);
}
.athlete-picker-search { min-height: 40px; margin-bottom: 8px; }
.athlete-picker-options { max-height: 290px; overflow-y: auto; overscroll-behavior: contain; }
.athlete-picker-group { padding: 7px 9px 5px; color: var(--navy); font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; background: #edf4f7; position: sticky; top: 0; z-index: 1; border-top: 1px solid #d8e3e8; }
.athlete-picker-option { width: 100%; border: 0; border-bottom: 1px solid #edf1f3; background: white; color: var(--ink); padding: 10px 9px; text-align: left; font: inherit; cursor: pointer; }
.athlete-picker-option:hover, .athlete-picker-option:focus-visible { background: var(--aqua); outline: none; }
.athlete-picker-option.selected { background: #dff1f6; color: var(--navy); font-weight: 800; }
.athlete-picker-option[disabled] { color: #98a5ab; cursor: not-allowed; background: #f7f8f9; }
.athlete-picker-option small { display: block; margin-top: 2px; color: var(--muted); font-size: .76rem; }
.athlete-picker-empty { padding: 14px 10px; color: var(--muted); text-align: center; }
@media (max-width: 620px) {
  .athlete-age-header, .athlete-gender-section { padding-inline: 13px; }
  .athlete-picker-panel { position: fixed; z-index: 120; left: 10px; right: 10px; top: 76px; max-height: calc(100vh - 96px); }
  .athlete-picker-options { max-height: calc(100vh - 175px); }
}



/* Web-only-Demo v22: einheitliche Profil-Tabellen und statusfreie Ergebnisdarstellung */
.profile-best-table,
.profile-history-table {
  width: 100%;
  table-layout: fixed;
}
.profile-best-table td,
.profile-history-table td {
  overflow-wrap: anywhere;
}
.profile-best-table th:first-child,
.profile-best-table td:first-child {
  text-align: left;
}
.profile-history-table th:first-child,
.profile-history-table td:first-child {
  text-align: left;
  white-space: nowrap;
}
.profile-best-individual { min-width: 680px; }
.profile-best-individual col:nth-child(1) { width: 34%; }
.profile-best-individual col:nth-child(2) { width: 16%; }
.profile-best-individual col:nth-child(3) { width: 20%; }
.profile-best-individual col:nth-child(4) { width: 30%; }
.profile-best-relay { min-width: 900px; }
.profile-best-relay col:nth-child(1) { width: 24%; }
.profile-best-relay col:nth-child(2) { width: 15%; }
.profile-best-relay col:nth-child(3) { width: 13%; }
.profile-best-relay col:nth-child(4) { width: 16%; }
.profile-best-relay col:nth-child(5) { width: 14%; }
.profile-best-relay col:nth-child(6) { width: 18%; }
.profile-history-individual { min-width: 700px; }
.profile-history-individual col:nth-child(1) { width: 20%; }
.profile-history-individual col:nth-child(2) { width: 31%; }
.profile-history-individual col:nth-child(3) { width: 33%; }
.profile-history-individual col:nth-child(4) { width: 16%; }
.profile-history-relay { min-width: 900px; }
.profile-history-relay col:nth-child(1) { width: 16%; }
.profile-history-relay col:nth-child(2) { width: 24%; }
.profile-history-relay col:nth-child(3) { width: 23%; }
.profile-history-relay col:nth-child(4) { width: 17%; }
.profile-history-relay col:nth-child(5) { width: 9%; }
.profile-history-relay col:nth-child(6) { width: 11%; }


/* Web-only-Demo v22: Verwaltungsaktionen nur in Einstellungen, Filter-Reset und Mixed-Staffelregel */
.settings-danger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-danger-card { border: 1px solid #f2c5c5; background: #fffafa; border-radius: 14px; padding: 18px; }
.settings-danger-card h3 { margin-top: 0; }
.settings-danger-card select { width: 100%; }
.filter-button-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) { .settings-danger-grid { grid-template-columns: 1fr; } .filter-button-row .button { flex: 1 1 auto; } }
