:root { font-family: system-ui, -apple-system, Segoe UI, sans-serif; color: #172f46; background: #eef5fb; }
body { margin: 0; }
.topbar { background: #1f5d8f; color: white; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-actions form { margin: 0; }
.topbar-actions button { padding: 8px 10px; }
h1 { margin: 0; font-size: 24px; }
h2 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 18px; padding: 18px; }
.single { max-width: 760px; margin: 0 auto; padding: 18px; }
.card { background: white; border: 1px solid #d6e3ed; border-radius: 8px; padding: 18px; box-shadow: 0 4px 18px rgba(31,93,143,.06); }
.wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select { font: inherit; padding: 12px; border: 1px solid #b7c9d8; border-radius: 8px; background: #fbfdff; }
button { font: inherit; border: 0; border-radius: 8px; padding: 12px 14px; background: #1f5d8f; color: white; cursor: pointer; }
button.secondary { background: #496b86; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 8px; padding: 0 14px; background: #496b86; color: white; text-decoration: none; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; }
.stats div { background: #e8f3fb; border: 1px solid #c8e0f2; border-radius: 8px; padding: 14px; }
.stats strong { display:block; font-size: 28px; }
.stats span { color: #5b6777; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
a { color: #0f4c81; }
.reader { width: 100%; max-width: 420px; margin-bottom: 12px; }
.ok { color: #166534; }
.warn { color: #92400e; }
#msg { font-weight: 700; }
code { display: block; background: #eef6fc; padding: 12px; border-radius: 8px; font-size: 18px; word-break: break-all; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } .topbar { align-items: flex-start; flex-direction: column; } }

.flash-area {
  display: grid;
  gap: 10px;
}
.flash-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 750;
}
.flash-error {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
}
.flash-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.login-page {
  min-height: 100vh;
  background: #eef5fb;
  color: #172f46;
}
.login-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 38vh;
  min-height: 250px;
  background: #1f5d8f;
}
.login-shell {
  position: relative;
  display: grid;
  box-sizing: border-box;
  min-height: 100vh;
  place-items: center;
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 32px 0;
}
.login-panel {
  box-sizing: border-box;
  width: 100%;
  padding: 28px;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(23, 47, 70, .18);
}
.login-brand {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}
.login-brand img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: contain;
}
.login-brand h1 {
  margin: 0;
  color: #172f46;
  font-size: 30px;
  line-height: 1.05;
}
.login-brand p:last-child {
  margin: 8px 0 0;
  color: #526b80;
  line-height: 1.45;
}
.login-form {
  display: grid;
  gap: 16px;
}
.login-form label {
  color: #243b4f;
}
.login-form input {
  box-sizing: border-box;
  width: 100%;
  border-color: #b7c9d8;
  border-radius: 8px;
  background: #fbfdff;
}
.login-form input:focus {
  border-color: #2f7fbd;
  outline: 3px solid #d9ecfa;
}
.login-form button {
  min-height: 46px;
  border-radius: 8px;
  background: #1f5d8f;
  font-weight: 750;
}
.login-form button:hover {
  background: #174c77;
}
.login-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
}

.access-page,
.technical-admin,
.token-page {
  min-height: 100vh;
  background: #eef5fb;
  color: #172f46;
}
.access-hero,
.technical-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px clamp(18px, 4vw, 48px);
  background: #1f5d8f;
  color: #ffffff;
}
.access-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.access-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
}
.access-hero h1,
.technical-topbar h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
}
.access-hero .eyebrow,
.technical-topbar .eyebrow {
  color: #c5e3f8;
}
.access-hero p:last-child {
  margin: 7px 0 0;
  color: #d8e9f7;
}
.access-actions form {
  margin: 0;
}
.access-actions button,
.technical-topbar button.secondary {
  background: #496b86;
}
.access-shell {
  display: grid;
  gap: 18px;
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 28px 0 44px;
}
.access-panel {
  padding: 28px;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(31,93,143,.10);
}
.access-panel h2 {
  margin: 0;
  font-size: 32px;
}
.access-panel > p:not(.eyebrow) {
  max-width: 680px;
  margin: 12px 0 0;
  color: #526b80;
  font-size: 18px;
  line-height: 1.55;
}
.access-hint {
  display: grid;
  gap: 4px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #c8e0f2;
  border-radius: 8px;
  background: #e8f3fb;
}
.access-hint span {
  color: #526b80;
}
.technical-topbar .topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.technical-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}
.technical-admin textarea {
  border-color: #b7c9d8;
  border-radius: 8px;
  background: #fbfdff;
}
.technical-admin .small-form {
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f6faff;
}
.token-shell {
  display: grid;
  box-sizing: border-box;
  min-height: 100vh;
  place-items: center;
  width: min(100% - 32px, 620px);
  margin: 0 auto;
  padding: 32px 0;
}
.token-panel {
  box-sizing: border-box;
  width: 100%;
  padding: 30px;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(31,93,143,.10);
  text-align: center;
}
.token-panel img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}
.token-panel h1 {
  margin: 0;
  font-size: 32px;
}
.token-panel > p:not(.eyebrow) {
  margin: 12px auto 0;
  max-width: 500px;
  color: #526b80;
  line-height: 1.55;
}
.token-value {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  text-align: left;
}
.token-value span {
  color: #526b80;
  font-size: 14px;
  font-weight: 750;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 220px) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.75rem;
}
.muted { color: #666; font-size: 0.95rem; }
@media (max-width: 760px) {
  .inline-form { grid-template-columns: 1fr; }
}
textarea { font: inherit; padding: 12px; border: 1px solid #b7c9d8; border-radius: 8px; min-height: 90px; background: #fbfdff; }
.station-create-form { margin-bottom: 1rem; }
.compact-list { margin: 0 0 0.5rem 1rem; padding: 0; }
.compact-list li { margin: 0.15rem 0; }
.small-form { margin-top: 0.75rem; padding: 0.75rem; background: #f8fafc; border-radius: 8px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.value-field input { font-size: 22px; padding: 14px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.search-results {
  display: grid;
  gap: 10px;
}
.search-result {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1.2fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}
.search-result strong,
.search-result span {
  display: block;
}
.search-result p {
  margin: 4px 0 0;
}
.athlete-lookup-results {
  display: grid;
  gap: 8px;
}
.athlete-lookup-results p {
  margin: 0;
}
.athlete-lookup-list {
  display: grid;
  gap: 8px;
}
.athlete-lookup-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f6faff;
  color: #243b4f;
  text-align: left;
}
.athlete-lookup-option:hover,
.athlete-lookup-option:focus-visible {
  border-color: #7ea6c7;
  background: #eef7ff;
  outline: none;
}
.athlete-lookup-option strong,
.athlete-lookup-option span {
  display: block;
}
.athlete-lookup-option span {
  color: #496b86;
  font-size: 0.95rem;
}
.missing-athletes-panel {
  margin-top: 10px;
}
.missing-athletes-panel summary {
  cursor: pointer;
  color: #1f5d8f;
  font-weight: 750;
}
.missing-athletes-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.missing-athletes-list li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f8fafc;
}
.missing-athletes-list span {
  color: #666;
  font-size: 0.92rem;
}
.no-score-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 750;
}
.no-score-toggle input {
  width: auto;
}
.reassign-qr-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}
.reassign-qr-form label {
  font-size: 0.95rem;
}
.certificate-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef6fc;
  color: #1f5f8f;
  font-weight: 750;
  text-decoration: none;
}
.danger-zone {
  border: 1px solid #fecaca;
  background: #fff7f7;
}
button.danger-button,
.friendly-admin button.danger-button {
  background: #b91c1c;
}
.small-button {
  padding: 0.45rem 0.65rem;
  min-height: 0;
  font-size: 0.875rem;
}
.station-delete-form {
  margin: 0;
}

.friendly-admin {
  background: #eef5fb;
  color: #172f46;
}
.viewer-page {
  background: #eef5fb;
  color: #172f46;
}
.station-friendly {
  background: #eef5fb;
  color: #172f46;
}
.station-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px) 22px;
  background: #1f5d8f;
  color: white;
}
.station-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  margin: 2px 0 0;
}
.station-hero .eyebrow {
  color: #c5e3f8;
}
.station-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.station-hero-actions form {
  margin: 0;
}
.station-hero button.secondary {
  background: #496b86;
}
.station-shell {
  display: grid;
  gap: 20px;
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}
.station-panel {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(31,93,143,.06);
}
.station-panel h2 {
  margin: 0;
}
.station-load-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.station-friendly label {
  color: #243b4f;
}
.station-friendly input {
  border-color: #b7c9d8;
  border-radius: 8px;
  background: #fbfdff;
}
.station-friendly button {
  background: #1f5d8f;
}
.station-friendly button.secondary {
  background: #496b86;
}
.station-reader {
  max-width: none;
  margin-bottom: 14px;
}
.station-entry {
  display: grid;
  gap: 14px;
}
.station-entry[hidden] {
  display: none;
}
.station-athlete-card {
  padding: 14px;
  border: 1px solid #c8e0f2;
  border-radius: 8px;
  background: #e8f3fb;
}
.station-athlete-card h2 {
  margin: 0;
}
.station-athlete-card p:last-child {
  margin: 6px 0 0;
  color: #516879;
}
.station-friendly .field-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}
.station-friendly .value-field input {
  border-color: #ffffff;
  font-size: 26px;
}
.signed-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: stretch;
}
.station-friendly .minus-value-button {
  padding: 0;
  min-height: 58px;
  border: 1px solid #ffffff;
  border-radius: 8px;
  background: #496b86;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
}
.friendly-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 48px) 22px;
  background: #1f5d8f;
  color: white;
}
.friendly-topbar h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  margin: 2px 0 10px;
}
.friendly-subtitle {
  max-width: 640px;
  margin: 0;
  color: #d8e9f7;
}
.friendly-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.settings-toggle,
.settings-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
}
.settings-close {
  flex: 0 0 auto;
  background: #496b86;
}
.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  color: white;
  text-decoration: none;
}
.friendly-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}
.overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 540px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(31,93,143,.10);
}
.overview-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}
.overview-copy p {
  margin: 0;
  color: #506678;
}
.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #236fa8;
}
.friendly-topbar .eyebrow {
  color: #c5e3f8;
}
.friendly-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.friendly-stats div {
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: 16px;
  border-radius: 8px;
  background: #e8f3fb;
  border: 1px solid #c8e0f2;
}
.friendly-stats span {
  color: #516879;
  font-weight: 650;
}
.friendly-stats strong {
  margin-top: 8px;
  font-size: 36px;
  line-height: 1;
}
.friendly-layout {
  display: block;
}
.friendly-primary,
.friendly-side {
  display: grid;
  gap: 20px;
}
.friendly-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(31,93,143,.06);
}
.friendly-card.danger-zone {
  background: #fff7f7;
  border-color: #fecaca;
}
.friendly-admin .search-result {
  border-color: #d9e5ee;
  background: #f6faff;
}
.friendly-card h2,
.friendly-card h3 {
  margin: 0;
}
.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 30, 45, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  width: min(420px, 100vw);
  padding: 18px;
  overflow-y: auto;
  background: #eef5fb;
  border-left: 1px solid #c9ddec;
  box-shadow: -14px 0 34px rgba(23, 47, 70, .18);
  transform: translateX(100%);
  transition: transform .22s ease;
}
.settings-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 0 18px;
}
.settings-drawer-header h2 {
  margin: 0;
}
body.settings-open {
  overflow: hidden;
}
body.settings-open .settings-backdrop {
  opacity: 1;
  pointer-events: auto;
}
body.settings-open .settings-drawer {
  transform: translateX(0);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.collapsible-section > summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  list-style: none;
}
.collapsible-section > summary::-webkit-details-marker {
  display: none;
}
.collapsible-section > summary::after {
  content: "Einklappen";
  align-self: flex-start;
  min-height: 32px;
  padding: 7px 10px 0;
  border-radius: 8px;
  background: #eef5fb;
  color: #31546f;
  font-size: 13px;
  font-weight: 750;
}
.collapsible-section:not([open]) > summary {
  margin-bottom: 0;
}
.collapsible-section:not([open]) > summary::after {
  content: "Ausklappen";
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5fb;
  color: #31546f;
  font-weight: 750;
}
.section-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.section-heading-actions .button-link {
  white-space: nowrap;
}
.friendly-admin button {
  background: #1f5d8f;
}
.friendly-admin .button-link {
  background: #496b86;
}
.friendly-admin button.secondary {
  background: #496b86;
}
.friendly-admin .athlete-lookup-option {
  background: #f6faff;
  color: #243b4f;
}
.friendly-admin .athlete-lookup-option:hover,
.friendly-admin .athlete-lookup-option:focus-visible {
  background: #eef7ff;
  color: #243b4f;
}
.friendly-admin .link-button {
  background: transparent;
}
.friendly-form {
  display: grid;
  gap: 12px;
}
.friendly-form label {
  color: #243b4f;
}
.friendly-form input,
.friendly-form select,
.friendly-form textarea {
  border-color: #b7c9d8;
  border-radius: 8px;
  background: #fbfdff;
}
.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.friendly-reader {
  max-width: none;
}
.station-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}
.station-tile {
  display: grid;
  gap: 12px;
  min-height: 178px;
  padding: 16px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #fbfdff;
}
.station-tile-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.station-tile-header p,
.station-meta {
  margin: 4px 0 0;
  color: #637586;
}
.station-tile-header a {
  font-weight: 750;
  white-space: nowrap;
}
.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4edf5;
}
.progress-track span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: #2f7fbd;
}
.recent-list {
  display: grid;
  gap: 10px;
}
.recent-list article {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 8px;
  background: #f6faff;
  border: 1px solid #d9e5ee;
}
.recent-list strong,
.recent-list span,
.recent-list time {
  display: block;
}
.recent-list span,
.recent-list time {
  color: #637586;
  font-size: 14px;
}
.recent-list p {
  margin: 0;
}
.team-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.team-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6faff;
}
.team-list form {
  margin: 0;
}
.link-button {
  padding: 0;
  background: transparent;
  color: #8a3b2f;
  font-weight: 750;
}
.action-list {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.action-list a {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  background: #eef6fc;
  color: #1f5f8f;
  font-weight: 750;
  text-decoration: none;
}
.viewer-shell {
  display: grid;
  gap: 20px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
}
.viewer-scan-panel,
.viewer-athlete-card,
.viewer-status-card,
.viewer-stations-card,
.viewer-error-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(31,93,143,.06);
}
.viewer-scan-panel {
  box-shadow: 0 10px 32px rgba(31,93,143,.10);
}
.viewer-page h2,
.viewer-page h3 {
  margin: 0;
}
.viewer-page button {
  background: #1f5d8f;
}
.viewer-page button.secondary {
  background: #496b86;
}
.viewer-reader {
  max-width: none;
  margin-bottom: 14px;
}
.viewer-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.viewer-page label {
  color: #243b4f;
}
.viewer-page input {
  border-color: #b7c9d8;
  border-radius: 8px;
  background: #fbfdff;
}
.viewer-results {
  display: grid;
  gap: 20px;
}
.viewer-results[hidden],
#error-message[hidden] {
  display: none;
}
.viewer-athlete-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 18px;
  align-items: stretch;
}
.viewer-athlete-card h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}
.viewer-athlete-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.viewer-athlete-meta div {
  display: grid;
  align-content: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid #c8e0f2;
  border-radius: 8px;
  background: #e8f3fb;
}
.viewer-athlete-meta span {
  color: #516879;
  font-weight: 650;
}
.viewer-athlete-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}
.viewer-status-card p:last-child {
  margin: 12px 0 0;
  color: #243b4f;
  font-size: 20px;
  font-weight: 750;
}
.viewer-stations-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}
.viewer-station-result {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e5ee;
  border-left: 5px solid #2f7fbd;
  border-radius: 8px;
  background: #fbfdff;
}
.viewer-station-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.viewer-station-header time {
  color: #637586;
  font-size: 14px;
  white-space: nowrap;
}
.viewer-field-list {
  display: grid;
  gap: 8px;
  margin: 0;
}
.viewer-field-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f0f7fc;
}
.viewer-field-list dt {
  color: #516879;
  font-weight: 650;
}
.viewer-field-list dd {
  margin: 0;
  color: #172f46;
  font-weight: 800;
  text-align: right;
}
.viewer-note {
  margin: 0;
  color: #637586;
  font-style: italic;
}
.viewer-error-card {
  border-color: #fecaca;
  background: #fff7f7;
}
.viewer-error-card .eyebrow,
.viewer-error-card h2,
.viewer-error-card p {
  color: #991b1b;
}

.analysis-page {
  min-height: 100vh;
  background: #eef5fb;
  color: #172f46;
}
.analysis-shell {
  display: grid;
  gap: 20px;
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 40px;
}
.analysis-intro,
.analysis-filter-card,
.analysis-section,
.analysis-empty {
  padding: 22px;
  border: 1px solid #d6e3ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(31,93,143,.06);
}
.analysis-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.analysis-intro h2,
.analysis-filter-card h2,
.analysis-section h2,
.analysis-empty h2 {
  margin: 0;
}
.analysis-intro p {
  margin: 8px 0 0;
  color: #526b80;
}
.analysis-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}
.analysis-method-note {
  max-width: 650px;
  padding: 12px 14px;
  border: 1px solid #c8e0f2;
  border-radius: 8px;
  background: #f0f7fc;
  line-height: 1.45;
}
.analysis-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.analysis-filter-form input,
.analysis-filter-form select {
  box-sizing: border-box;
  width: 100%;
}
.analysis-filter-form button {
  min-height: 46px;
  white-space: nowrap;
}
.analysis-filter-result {
  margin: 14px 0 0;
  color: #526b80;
}
.analysis-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
}
.analysis-kpis article {
  min-height: 118px;
  padding: 17px;
  border: 1px solid #c8e0f2;
  border-radius: 8px;
  background: #e8f3fb;
}
.analysis-kpis span,
.analysis-kpis small {
  display: block;
  color: #526b80;
}
.analysis-kpis span {
  font-weight: 700;
}
.analysis-kpis strong {
  display: block;
  margin: 10px 0 7px;
  font-size: 36px;
  line-height: 1;
}
.analysis-funfacts {
  padding: 22px;
  border: 1px solid #bad9ee;
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fcff 0%, #e8f3fb 100%);
  box-shadow: 0 4px 18px rgba(31,93,143,.06);
}
.analysis-funfacts-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 16px;
}
.analysis-funfacts-heading h2 {
  margin: 0;
}
.analysis-funfacts-heading > p {
  max-width: 580px;
  margin: 0;
  color: #526b80;
  line-height: 1.45;
}
.analysis-funfact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.analysis-funfact-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(47,127,189,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}
.analysis-funfact-card > span,
.analysis-funfact-card > small {
  display: block;
  color: #526b80;
}
.analysis-funfact-card > span {
  min-height: 40px;
  font-weight: 750;
}
.analysis-funfact-card strong {
  display: block;
  margin: 8px 0;
  color: #174c77;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}
.analysis-funfact-card strong small {
  font-size: .55em;
}
.analysis-funfact-card p {
  min-height: 42px;
  margin: 0 0 9px;
  color: #31546f;
  line-height: 1.4;
}
.analysis-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.analysis-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f8fbfe;
}
.analysis-card h3 {
  margin: 0 0 12px;
}
.analysis-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
.analysis-table {
  min-width: 680px;
  background: #ffffff;
  font-size: 14px;
}
.analysis-table th,
.analysis-table td {
  padding: 9px 10px;
  white-space: nowrap;
}
.analysis-table thead th {
  background: #eef6fc;
  color: #31546f;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.analysis-table tbody th {
  color: #243b4f;
}
.analysis-table th small,
.analysis-table td small,
.analysis-results-table td strong {
  display: block;
}
.analysis-table th small,
.analysis-table td small {
  margin-top: 3px;
  color: #6b7f91;
  font-weight: 500;
  text-transform: none;
}
.analysis-results-table {
  min-width: 1120px;
}
.analysis-progress {
  width: 100%;
  min-width: 90px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe8f2;
}
.analysis-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f7fbd;
}
.analysis-stations {
  display: grid;
  gap: 12px;
}
.analysis-station-card {
  overflow: hidden;
  border: 1px solid #c9ddec;
  border-radius: 8px;
  background: #ffffff;
}
.analysis-station-card > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 300px);
  gap: 18px;
  align-items: center;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
  background: #f6faff;
}
.analysis-station-card > summary::-webkit-details-marker {
  display: none;
}
.analysis-station-card > summary::after {
  content: "Öffnen";
  position: absolute;
  right: 18px;
  color: #1f5d8f;
  font-size: 13px;
  font-weight: 800;
}
.analysis-station-card[open] > summary::after {
  content: "Schließen";
}
.analysis-station-card > summary {
  position: relative;
  padding-right: 90px;
}
.analysis-station-card > summary h3 {
  margin: 0;
  font-size: 22px;
}
.analysis-station-card > summary p {
  margin: 6px 0 0;
  color: #526b80;
}
.analysis-coverage {
  display: grid;
  gap: 7px;
  padding-right: 12px;
  color: #31546f;
  font-size: 13px;
  font-weight: 700;
}
.analysis-station-content {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid #d9e5ee;
}
.analysis-station-content h4 {
  margin: 0;
  font-size: 18px;
}
.analysis-breakdowns {
  display: grid;
  gap: 8px;
}
.analysis-breakdowns > details {
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #fbfdff;
}
.analysis-breakdowns > details > summary {
  padding: 12px 14px;
  cursor: pointer;
  color: #1f5d8f;
  font-weight: 800;
}
.analysis-breakdowns .analysis-table-wrap {
  padding: 0 12px 12px;
}
.analysis-empty p:last-child {
  margin-bottom: 0;
  color: #526b80;
}

@media (max-width: 1100px) {
  .overview-panel {
    grid-template-columns: 1fr;
  }
  .viewer-athlete-card {
    grid-template-columns: 1fr;
  }
  .analysis-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analysis-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analysis-funfact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analysis-group-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .login-shell {
    align-items: start;
    padding-top: 24px;
  }
  .login-panel {
    padding: 22px;
  }
  .login-brand {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
  }
  .login-brand img {
    width: 70px;
    height: 70px;
  }
  .login-brand h1 {
    font-size: 27px;
  }
  .access-hero,
  .technical-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .access-brand {
    align-items: flex-start;
  }
  .access-brand img {
    width: 62px;
    height: 62px;
  }
  .access-hero h1,
  .technical-topbar h1,
  .access-panel h2,
  .token-panel h1 {
    font-size: 27px;
  }
  .access-actions,
  .access-actions form,
  .access-actions button,
  .technical-topbar .topbar-actions,
  .technical-topbar .topbar-actions form {
    width: 100%;
  }
  .technical-topbar .ghost-link,
  .technical-topbar button {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }
  .access-panel,
  .token-panel {
    padding: 22px;
  }
  .friendly-topbar,
  .station-hero,
  .section-heading,
  .station-tile-header,
  .viewer-station-header {
    flex-direction: column;
  }
  .station-hero-actions,
  .station-hero-actions form,
  .station-hero-actions button,
  .station-load-form,
  .viewer-manual-form,
  .viewer-manual-form button {
    width: 100%;
  }
  .station-load-form,
  .station-friendly .field-grid,
  .viewer-manual-form {
    grid-template-columns: 1fr;
  }
  .friendly-topbar-actions,
  .friendly-topbar-actions form,
  .ghost-link {
    width: 100%;
  }
  .section-heading-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .settings-toggle {
    width: 44px;
  }
  .friendly-stats,
  .station-board,
  .two-columns,
  .recent-list article,
  .search-result,
  .viewer-athlete-meta,
  .viewer-stations-list {
    grid-template-columns: 1fr;
  }
  .friendly-shell,
  .viewer-shell,
  .analysis-shell {
    width: min(100% - 24px, 1440px);
  }
  .viewer-station-header time {
    white-space: normal;
  }
  .analysis-intro,
  .analysis-station-card > summary {
    grid-template-columns: 1fr;
  }
  .analysis-intro {
    flex-direction: column;
  }
  .analysis-filter-form,
  .analysis-kpis,
  .analysis-funfact-grid {
    grid-template-columns: 1fr;
  }
  .analysis-funfacts-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .analysis-filter-form button {
    width: 100%;
  }
  .analysis-station-card > summary {
    padding-right: 18px;
  }
  .analysis-station-card > summary::after {
    position: static;
    justify-self: start;
  }
}
