/* EJB Sportlerdatenbank – Eisbären-Farben: Dunkelblau / Weiß / Rot */
:root {
  --blue: #003366;
  --blue-light: #0a4f8f;
  --red: #c8102e;
  --bg: #f4f6f9;
  --border: #d8dee7;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: #1a1a2e; }
main { max-width: 1100px; margin: 0 auto; padding: 20px; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; } h2 { font-size: 18px; margin-top: 28px; }
.muted { color: #667; } .error { color: var(--red); font-weight: 600; }

/* Navigation */
.topnav { display: flex; align-items: center; gap: 18px; background: var(--blue); color: #fff; padding: 5px 20px; }
.topnav a { color: #fff; }
.topnav .brand { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-logo { height: 28px; width: auto; }
.topnav .spacer { flex: 1; }
.topnav .who { font-size: 13px; opacity: .85; }
.inline { display: inline; }
button.link { background: none; border: none; color: #fff; cursor: pointer; text-decoration: underline; font-size: 14px; }

/* Login */
.login-box { max-width: 380px; margin: 80px auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.login-box h1 { margin-top: 0; color: var(--blue); }
.login-logo { display: block; height: 100px; width: auto; margin: 0 auto 14px; }
.login-box { text-align: center; }
.login-box form { text-align: left; }
.login-box label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
.login-box input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; }
.login-box button[type=submit] { width: 100%; margin-top: 20px; }

/* Buttons */
.btn, button[type=submit] {
  display: inline-block; background: var(--blue); color: #fff; border: none;
  padding: 9px 16px; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.btn:hover, button[type=submit]:hover { background: var(--blue-light); text-decoration: none; }
.btn-muted { background: #8a94a6; }
.btn-danger { background: var(--red); }

/* KPI-Kacheln */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 20px 0; }
.kpi { background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--blue); border-radius: 10px; padding: 16px; color: inherit; }
.kpi:hover { box-shadow: 0 3px 10px rgba(0,0,0,.08); text-decoration: none; }
.kpi .num { display: block; font-size: 28px; font-weight: 700; color: var(--blue); }
.kpi-warn { border-left-color: #e6a700; } .kpi-warn .num { color: #b58300; }
.kpi-bad { border-left-color: var(--red); } .kpi-bad .num { color: var(--red); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); margin: 12px 0; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
th { background: var(--blue); color: #fff; font-weight: 600; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f0f4fa; }
td.c, th.c { text-align: center; } td.r, th.r { text-align: right; }
table.plain { box-shadow: none; } table.plain td { border-bottom: 1px solid #eee; }

/* Status-Tags */
.tag { padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-aktiv { background: #d9efd9; color: #1e6b1e; }
.tag-inaktiv { background: #eee; color: #666; }
.tag-archiviert { background: #f4dede; color: #8b2020; }
.tag-pay-bezahlt { background: #d9efd9; color: #1e6b1e; }
.tag-pay-offen, .tag-pay-teilweisebezahlt { background: #fdf1d2; color: #9a7400; }
.tag-pay-berfllig { background: #f4dede; color: var(--red); }
.tag-pay-storniert { background: #eee; color: #666; }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-ok { background: #2e9e2e; } .dot-warn { background: #e6a700; } .dot-bad { background: var(--red); }

/* Seitenkopf, Suche */
.page-head { display: flex; justify-content: space-between; align-items: center; }
.searchbar { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.searchbar input { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; width: 260px; }

/* Profil */
.profile-head { display: flex; gap: 18px; align-items: center; background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.05); flex-wrap: wrap; }
.profile-head h1 { margin: 0 0 4px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Detail-Listen */
.grid-dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; background: #fff; padding: 16px; border-radius: 10px; margin: 12px 0; }
.grid-dl dt { font-weight: 600; color: #445; } .grid-dl dd { margin: 0; }

/* Formulare */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; background: #fff; padding: 20px; border-radius: 12px; }
.form-grid label { font-size: 13px; font-weight: 600; color: #445; }
.form-grid input, .form-grid select { display: block; width: 100%; margin-top: 4px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 8px; }

/* DEB-Logo neben Überschriften */
.mit-logo { display: flex; align-items: center; gap: 10px; }
.deb-logo { height: 36px; width: auto; }

/* Datei-Upload-Zeilen (Spielerpass/Einzellizenz) */
.datei-zeile { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; padding: 12px 16px; border-radius: 10px; margin: 0 0 8px; }
.upload-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.upload-form input[type=file] { font-size: 13px; max-width: 220px; }
.upload-inline { margin: 6px 0 0; }
.upload-inline input[type=file] { max-width: 170px; font-size: 12px; }
.btn-klein { padding: 5px 10px; font-size: 12px; }

/* Direkt in der Tabelle bearbeitbare Zellen (Material) */
.zellen-input { width: 100%; min-width: 70px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; box-sizing: border-box; }
.zellen-kurz { min-width: 45px; max-width: 70px; }
.aktionen-zelle { white-space: nowrap; }
.checkbox-zeile { display: flex; align-items: center; gap: 8px; font-size: 14px !important; padding-top: 22px; }
.checkbox-zeile input { width: 17px; height: 17px; margin: 0; }

/* CSS-Tabs (Radio-basiert, ohne JS) */
.tabs { margin-top: 20px; }
.tabs > input[type=radio] { display: none; }
.tabs > label {
  display: inline-block; padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: #556; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs > label:hover { color: var(--blue); }
.tabs > section { display: none; padding-top: 8px; border-top: 1px solid var(--border); }

#tab-stammdaten:checked ~ label[for=tab-stammdaten],
#tab-adressen:checked ~ label[for=tab-adressen],
#tab-eltern:checked ~ label[for=tab-eltern],
#tab-dokumente:checked ~ label[for=tab-dokumente],
#tab-pass:checked ~ label[for=tab-pass],
#tab-gesundheit:checked ~ label[for=tab-gesundheit],
#tab-notfall:checked ~ label[for=tab-notfall],
#tab-einverstaendnis:checked ~ label[for=tab-einverstaendnis],
#tab-material:checked ~ label[for=tab-material],
#tab-schlaeger:checked ~ label[for=tab-schlaeger],
#tab-zuzahlungen:checked ~ label[for=tab-zuzahlungen],
#tab-historie:checked ~ label[for=tab-historie] {
  color: var(--blue); border-bottom-color: var(--red);
}

#tab-stammdaten:checked ~ #panel-stammdaten,
#tab-adressen:checked ~ #panel-adressen,
#tab-eltern:checked ~ #panel-eltern,
#tab-dokumente:checked ~ #panel-dokumente,
#tab-pass:checked ~ #panel-pass,
#tab-gesundheit:checked ~ #panel-gesundheit,
#tab-notfall:checked ~ #panel-notfall,
#tab-einverstaendnis:checked ~ #panel-einverstaendnis,
#tab-material:checked ~ #panel-material,
#tab-schlaeger:checked ~ #panel-schlaeger,
#tab-zuzahlungen:checked ~ #panel-zuzahlungen,
#tab-historie:checked ~ #panel-historie {
  display: block;
}
