/* MOVEO Teamdiagnostik – Stylesheet (mobile first, Physio-Bereich auch für Desktop) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
  --primary: #1F4659; --primary-dark: #163444; --text: #18242B; --bg: #F4F6F7; --card: #FFFFFF;
  --muted: #4A5862; --muted2: #5A6872; --line: #E2E7EA; --line2: #CBD3D8;
  --rose: #E8A598; --red: #B8433A; --red-text: #9C3830; --green: #2E7D5B; --green-text: #25694C; --orange: #A35A00;
  --green-bg: #E6F2EC; --orange-bg: #FFF4E5; --blue-bg: #E8EEF1; --red-bg: #FBEDE9; --pos: #4F7FA0;
  --radius: 16px; --gutter: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #4F7FA0; outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--primary); font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { background: #F7F9FA; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--red-text); border-color: #E3B7AF; }
.btn.ghost { border-color: transparent; background: none; padding: 8px 4px; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { background: #E2E7EA; border-color: #E2E7EA; color: #4A5862; cursor: not-allowed; }
.btn.small { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; }
.back { background: none; border: 0; padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 15px; font-weight: 600; cursor: pointer; align-self: flex-start; }

/* ---------- Header ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand img.mark { height: 34px; width: auto; display: block; }
.brand img.word { height: 18px; width: auto; display: block; }
.brand .area { font-size: 12px; font-weight: 600; color: var(--muted2); border-left: 1px solid var(--line); padding-left: 8px; white-space: nowrap; }
.seg { display: inline-flex; background: #EEF1F3; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; min-height: 38px; min-width: 44px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--muted); border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.seg.light { background: rgba(255,255,255,.15); }
.seg.light button { color: #fff; }
.seg.light button[aria-pressed="true"] { background: #fff; color: var(--primary); }
.demo-banner { background: #FFF4E5; color: #6B3B00; font-size: 13px; padding: 6px var(--gutter); text-align: center; border-bottom: 1px solid #F3D9B5; }

/* ---------- Layout ---------- */
.page { max-width: 560px; margin: 0 auto; padding: 18px var(--gutter) 96px; }
.page.wide { max-width: 1200px; }
.physio-shell { display: block; }
.side-nav { display: flex; gap: 6px; overflow-x: auto; padding: 8px var(--gutter); background: #fff; border-bottom: 1px solid var(--line); }
.side-nav button { border: 0; background: none; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.side-nav button[aria-current="page"] { background: var(--blue-bg); color: var(--primary); }
@media (min-width: 900px) {
  .physio-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 57px); }
  .side-nav { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--line); padding: 16px 12px; overflow: visible; }
  .side-nav button { text-align: left; }
  .physio-shell .page { padding-bottom: 40px; }
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card.dark { background: var(--primary); color: #fff; border-color: var(--primary); }
.card h2 + p { margin-top: 4px; }
.label-up { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted2); }
.card.dark .label-up { color: #C9D6DD; }
.step-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red-text); }
.listrow { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #EEF1F3; }
.listrow:last-child { border-bottom: 0; }
.hr { height: 1px; background: #EEF1F3; border: 0; margin: 4px 0; }

/* ---------- Chips / Tags ---------- */
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.band-wb, .band-b { background: var(--orange-bg); color: var(--orange); }
.band-av { background: var(--blue-bg); color: var(--primary); }
.band-a, .band-wa { background: var(--green-bg); color: var(--green-text); }
.band-none { background: #EEF1F3; color: var(--muted); }
.tag-s { background: var(--green-bg); color: var(--green-text); }
.tag-c { background: var(--blue-bg); color: var(--primary); }
.tag-e { background: var(--orange-bg); color: var(--orange); }
.tag-n { background: #EEF1F3; color: var(--muted); }
.chip.small { font-size: 11px; padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.pick[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tagpill { display: inline-flex; align-items: center; gap: 4px; background: var(--blue-bg); color: var(--primary); border-radius: 999px; padding: 2px 4px 2px 12px; font-size: 13px; font-weight: 600; }
.tagpill button { border: 0; background: none; color: var(--primary); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
.status-ok { color: var(--green-text); font-weight: 700; }
.status-warn { color: var(--orange); font-weight: 700; }
.status-bad { color: var(--red-text); font-weight: 700; }

/* ---------- Forms ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
input[type=text], input[type=email], input[type=number], input[type=date], select, textarea { min-height: 44px; border-radius: 10px; border: 1px solid var(--line2); padding: 8px 12px; font-size: 16px; background: #fff; width: 100%; }
textarea { min-height: 72px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.check.on { border-color: var(--primary); }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--primary); }
.switch { width: 52px; height: 32px; border-radius: 999px; border: 0; background: #8A97A0; position: relative; flex: none; cursor: pointer; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch span { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] span { left: 24px; }
.filebox { border: 2px dashed var(--line2); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: #FAFBFC; }

/* ---------- Tabellen (Physio) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #EEF1F3; vertical-align: top; }
table.t th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted2); background: #F8FAFB; white-space: nowrap; }
table.t tr.warn td { background: #FFFBF5; }
table.t tr.bad td { background: #FDF3F1; }
table.t td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.issue { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--orange-bg); font-size: 14px; }
.issue.err { background: #FDF0EE; }
.issue .grow { min-width: 0; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.steps .st { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.steps .st b { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #E2E7EA; color: var(--muted); font-size: 12px; }
.steps .st.done { background: var(--green-bg); color: var(--green-text); border-color: var(--green-bg); }
.steps .st.done b { background: var(--green); color: #fff; }
.steps .st.cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.steps .st.cur b { background: #fff; color: var(--primary); }
.trial { display: grid; grid-template-columns: 34px minmax(70px, auto) 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #F0F3F5; font-size: 14px; }
.trial:last-child { border-bottom: 0; }
.trial .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.trial.invalid .v { color: var(--muted2); text-decoration: line-through; }
details.acc { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
details.acc > summary { list-style: none; cursor: pointer; padding: 12px 14px; min-height: 44px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-weight: 700; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc[open] > summary { border-bottom: 1px solid #EEF1F3; }
details.acc .acc-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Spieler:in: Ergebnisse ---------- */
.pbar { position: relative; padding: 5px 0; }
.pbar .scale { display: flex; height: 14px; border-radius: 7px; overflow: hidden; }
.pbar .scale span:nth-child(1) { width: 10%; background: #F1D3CB; }
.pbar .scale span:nth-child(2) { width: 15%; background: #F8E7E2; }
.pbar .scale span:nth-child(3) { width: 50%; background: #E3EAEE; }
.pbar .scale span:nth-child(4) { width: 15%; background: #D9ECE2; }
.pbar .scale span:nth-child(5) { width: 10%; background: #BFE0CF; }
.pbar .mk { position: absolute; }
.pbar .you { top: 0; width: 8px; height: 24px; margin-left: -4px; border-radius: 3px; background: var(--text); border: 2px solid #fff; }
.pbar .team { top: 6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--muted2); background: #fff; }
.pbar .posm { top: 7px; width: 10px; height: 10px; margin-left: -5px; background: var(--pos); transform: rotate(45deg); }
.pbar.lr { padding: 16px 0 4px; }
.pbar.lr .you { top: 13px; height: 20px; }
.pbar.lr .you.r { background: var(--red); }
.pbar.lr .lbl { top: 0; width: 16px; margin-left: -8px; text-align: center; font-size: 11px; font-weight: 700; }
.pbar.lr .team { top: 20px; } .pbar.lr .posm { top: 21px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-you { width: 6px; height: 16px; border-radius: 3px; background: var(--text); display: inline-block; }
.lg-team { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--muted2); background: #fff; display: inline-block; }
.lg-pos { width: 9px; height: 9px; background: var(--pos); transform: rotate(45deg); display: inline-block; }
.explain { font-size: 13px; line-height: 1.5; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.ref { font-size: 12px; line-height: 1.4; color: var(--muted2); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 13px; }
.three b { font-size: 15px; }
.stand { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.stand.old { color: var(--orange); }
.bigbtn { text-align: left; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; cursor: pointer; width: 100%; }
.bigbtn.dark { background: var(--primary); color: #fff; border-color: var(--primary); flex-direction: column; align-items: stretch; }
.icon-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-bg); display: flex; align-items: center; justify-content: center; flex: none; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.hbar { height: 8px; border-radius: 4px; background: #EEF1F3; overflow: hidden; }
.hbar span { display: block; height: 8px; border-radius: 4px; }

/* ---------- Tab-Leiste (mobil) ---------- */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.tabs .inner { display: flex; width: 100%; max-width: 560px; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 6px 0; min-height: 56px; color: var(--muted2); font-size: 11px; font-weight: 600; cursor: pointer; }
.tabs button[aria-current="page"] { color: var(--primary); font-weight: 700; }
.tabs svg { width: 22px; height: 22px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; background: var(--primary); color: #fff; display: flex; justify-content: center; }
.login .inner { width: 100%; max-width: 440px; padding: 20px var(--gutter) 32px; display: flex; flex-direction: column; }
.login .logo { margin: 40px auto 0; width: 230px; max-width: 70%; height: auto; display: block; }
.login p.sub { color: #D5E0E6; }
.login label { color: #fff; font-size: 13px; font-weight: 600; }
.login input { border: 0; height: 52px; color: var(--text); caret-color: var(--primary); }
.login input::placeholder { color: #8796A0; }
.login .btn.white { background: #fff; color: var(--primary); border-color: #fff; min-height: 52px; }
.login .panel { background: rgba(255,255,255,.1); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.login .demo { background: #fff; color: var(--text); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.login .foot { margin-top: auto; padding-top: 28px; font-size: 12px; color: #C9D6DD; display: flex; gap: 8px; align-items: center; }

/* ---------- Dialog / Toast ---------- */
dialog.dlg { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.dlg::backdrop { background: rgba(24, 36, 43, .55); }
dialog.dlg .dlg-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.dlg .dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.recipients { border: 1px solid var(--line); border-radius: 12px; max-height: 320px; overflow-y: auto; }
.recipients div { padding: 8px 12px; border-bottom: 1px solid #F0F3F5; font-size: 14px; }
.recipients div:last-child { border-bottom: 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 76px; background: var(--text); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 32px); z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.ranking .rk { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #EEF1F3; width: 100%; background: #fff; border-left: 0; border-right: 0; border-top: 0; text-align: left; cursor: pointer; min-height: 56px; }
.ranking .rk:last-child { border-bottom: 0; }
.flag { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; color: var(--red-text); }

@media print {
  .topbar, .tabs, .no-print, .demo-banner { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
}
input[type=file] { max-width: 100%; min-height: 44px; font-size: 14px; }
.filebox { min-width: 0; max-width: 100%; }
.page, .card, .stack > * { min-width: 0; }
.physio-shell > main { min-width: 0; }
.brand { overflow: hidden; }
@media (max-width: 420px) { .brand .area { display: none; } .brand img.word { height: 15px; } }
.bigbtn.dark .label-up { color: #C9D6DD; }
