/* Erscheinungsbild wie Einsatzkarte und Übungsobjekte */
:root{--red:#991b1b;--red2:#c51f24;--bg:#f1f5f9;--card:#fff;--line:#dbe3ee;--text:#0f172a;--muted:#64748b;--ok:#15803d;--warn:#b45309;--err:#b91c1c;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}
html{overflow-y:scroll}
body{margin:0;background:var(--bg);color:var(--text);overflow-x:hidden}
.hidden{display:none!important}
.muted{color:var(--muted);font-size:13px}
button,input,select,textarea{font-family:inherit;font-size:15px}
header.app-header{background:linear-gradient(135deg,#7f1d1d,#dc2626);color:#fff;padding:16px}
.header-inner{max-width:1180px;margin:auto;display:grid;grid-template-columns:1fr minmax(240px,420px) 1fr;align-items:center;gap:18px}
.header-title h1{margin:0;font-size:25px;font-weight:700;line-height:1.2}
.header-title p{margin:2px 0;font-size:16px;color:#fee2e2}
.header-logo img{display:block;width:100%;max-height:92px;object-fit:contain}
.user{text-align:right;font-size:13px}
.user-name{display:block;margin-bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-actions{display:grid;grid-template-columns:auto auto;gap:7px;justify-content:end}
.user-actions .app-switch{grid-column:1/-1;justify-self:end}
.btn{border:0;border-radius:11px;padding:10px 14px;background:var(--red2);color:#fff;font-weight:700;cursor:pointer;min-height:42px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2}
.btn:hover{background:#b01c20}
.btn.alt,.btn.secondary{background:#fff;color:var(--text);border:1px solid var(--line)}
.btn.alt:hover,.btn.secondary:hover{background:#f8fafc}
.btn.small{min-height:34px;padding:6px 10px;font-size:14px}
.btn.danger{background:#fff;color:var(--err);border:1px solid #fecaca}
.btn:disabled{opacity:.5;cursor:default}
.user-actions .btn{min-height:0;padding:9px 14px;font-size:14px;white-space:nowrap}
.wrap{max-width:1180px;margin:0 auto;padding:14px 16px 40px}
.tabs{display:flex;gap:6px;overflow-x:auto;padding:10px 16px 0;max-width:1180px;margin:0 auto;scrollbar-width:thin}
.tabs button{border:1px solid var(--line);border-bottom:0;background:#e8edf4;color:var(--muted);border-radius:12px 12px 0 0;padding:10px 16px;font-weight:700;cursor:pointer;white-space:nowrap;min-height:42px}
.tabs button.on{background:#fff;color:var(--red);}
.card{background:var(--card);border:1px solid var(--line);border-radius:0 16px 16px 16px;padding:16px;box-shadow:0 3px 12px #0000000b}
.card+.card{margin-top:14px;border-radius:16px}
.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:12px}
.toolbar .grow{flex:1}
.toolbar select,.toolbar input,.field input,.field select,.field textarea{padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);min-height:40px}
.field{display:block;margin:10px 0;font-weight:700;font-size:14px}
.field input,.field select,.field textarea{display:block;width:100%;margin-top:4px;font-weight:400}
.field.inline{display:flex;gap:8px;align-items:center}.field.inline input{width:auto;margin:0}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.badge{display:inline-block;border-radius:99px;padding:2px 9px;font-size:12px;font-weight:700;background:#e2e8f0;color:#334155}
.badge.ok{background:#dcfce7;color:#166534}.badge.warn{background:#fef3c7;color:#92400e}.badge.err{background:#fee2e2;color:#991b1b}.badge.pub{background:#dbeafe;color:#1e40af}
.msg{padding:10px 12px;border-radius:10px;margin:10px 0;font-size:14px}.msg.err{background:#fee2e2;color:#991b1b}.msg.ok{background:#dcfce7;color:#166534}.msg.info{background:#e0f2fe;color:#075985}
.msg.dirty{background:#fef3c7;color:#92400e;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.tablewrap{overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:12px;background:#fff;-webkit-overflow-scrolling:touch}
table{border-collapse:collapse;width:100%}
th,td{padding:7px 9px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}
th{background:#f8fafc;color:#475569;font-size:13px;white-space:nowrap}
tr:last-child td{border-bottom:0}
.matrix{width:auto;min-width:100%}
.matrix th,.matrix td{padding:0;text-align:center;border:1px solid var(--line)}
.matrix thead th{position:sticky;top:0;z-index:2;padding:5px 4px;font-size:12px;line-height:1.2}
.matrix th.nm,.matrix td.nm{position:sticky;left:0;z-index:1;background:#fff;text-align:left;padding:6px 8px;min-width:150px;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;border-right:2px solid #cbd5e1}
.matrix thead th.nm{background:#f8fafc;z-index:3}
.matrix td.cnt{padding:4px 6px;font-size:13px;font-weight:700;min-width:46px}
.matrix td.c{min-width:48px;height:34px;cursor:default;font-size:12px;font-weight:700}
.matrix.edit td.c{cursor:pointer}.matrix.edit td.c:hover{outline:2px solid var(--red2);outline-offset:-2px}
.matrix td.c.un{background:repeating-linear-gradient(45deg,#f1f5f9,#f1f5f9 4px,#e2e8f0 4px,#e2e8f0 8px);color:#94a3b8}
.matrix th.cx,.matrix td.cx{background:#f1f5f9;text-decoration:line-through;color:#94a3b8}
.matrix tfoot td{background:#f8fafc;font-weight:700;border-top:2px solid #cbd5e1}
.matrix tr.grp td{background:#f8fafc;text-align:left;font-weight:800;padding:5px 8px;font-size:13px;color:#475569}
.matrix td.c.lk::after{content:"•";color:#0f172a;font-size:10px;margin-left:2px;vertical-align:super}
.matrix td.c.fehlt{background-image:linear-gradient(135deg,transparent 45%,#b91c1c 45%,#b91c1c 55%,transparent 55%)}
.matrix td.c.me,.matrix td.nm.me{box-shadow:inset 0 0 0 2px #0f172a}
.v0{background:#fecaca}.v1{background:#fed7aa}.v2{background:#fef08a}.v3{background:#bbf7d0}.v4{background:#a5f3fc}.v5{background:#bfdbfe}.v6{background:#ddd6fe}.v7{background:#fbcfe8}
.legend{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0;font-size:12px}
.legend span{padding:2px 8px;border-radius:8px;font-weight:700}
.eve s{color:#b91c1c}
.evenings{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.eve{border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}
.eve.cx{opacity:.55}
.eve h3{margin:0 0 6px;font-size:16px}
.team{display:flex;gap:8px;align-items:flex-start;padding:6px 0;border-top:1px solid var(--line);font-size:14px}
.team .tag{flex:0 0 auto;border-radius:8px;padding:2px 8px;font-weight:800;font-size:13px}
.team.me{background:#fef9c3;margin:0 -6px;padding:6px}
.warnlist{max-height:260px;overflow:auto;margin:8px 0 0;padding:0;list-style:none;font-size:14px}
.warnlist li{padding:5px 0;border-top:1px solid var(--line)}
.warnlist .lv{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px}
.lv.fehler{background:var(--err)}.lv.warnung{background:#f59e0b}.lv.info{background:#60a5fa}
.modal{position:fixed;inset:0;background:#0f172acc;z-index:50;display:flex;align-items:flex-end;justify-content:center;padding:0}
.sheet{background:#fff;width:100%;max-width:640px;max-height:92vh;overflow:auto;border-radius:22px 22px 0 0;padding:18px}
.sheet h2{margin:0 0 10px;font-size:20px}
.sheet .row{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}
.checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:4px 10px;margin:4px 0}
.checks label{font-weight:400;display:flex;gap:6px;align-items:center;min-height:32px}
.pairrow{display:flex;gap:6px;align-items:center;margin:4px 0}
.loginbox{max-width:380px;margin:12vh auto;background:#fff;border-radius:22px;padding:24px;box-shadow:0 10px 40px #0002}
.loginbox img{display:block;width:100%;max-height:110px;object-fit:contain;background:linear-gradient(135deg,#7f1d1d,#dc2626);border-radius:14px;padding:10px;margin-bottom:12px}
.pw-overlay{position:fixed;inset:0;background:#0f172acc;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px}
.pw-sheet{background:#fff;border-radius:18px;padding:18px;width:100%;max-width:420px}
.pw-head{display:flex;justify-content:space-between;align-items:center}.pw-head h2{margin:0;font-size:20px}
.pw-close{border:0;background:none;font-size:28px;cursor:pointer}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:8px;margin:10px 0}
.kpi{background:#f8fafc;border:1px solid var(--line);border-radius:12px;padding:10px}.kpi b{display:block;font-size:22px}
@media(min-width:720px){.modal{align-items:center;padding:24px}.sheet{border-radius:22px}}
@media(max-width:800px){
 .header-inner{grid-template-columns:1fr;gap:10px;text-align:center}
 .header-logo{order:1}.header-title{order:2}.user{order:3;text-align:center}.user-actions{justify-content:center}.user-actions .app-switch{justify-self:center}
 .header-logo img{max-height:80px}
 .wrap{padding:10px 12px 40px}.tabs{padding:10px 12px 0}
 .card{padding:12px}.grid2{grid-template-columns:1fr}
 input,select,textarea{font-size:16px!important}
 .toolbar>*{flex:1 1 auto}
}
@media print{
 header.app-header,.tabs,.toolbar,.noprint,.msg,.legend+.noprint{display:none!important}
 body{background:#fff}.wrap{padding:0;max-width:none}.card{border:0;box-shadow:none;padding:0}
 .tablewrap{overflow:visible;border:0}.matrix th.nm,.matrix td.nm{position:static}.matrix thead th{position:static}
 .matrix td,.matrix th{font-size:9px}
 @page{size:A4 landscape;margin:10mm}
}

.fs{border:1px solid var(--line);border-radius:12px;margin:0 0 12px;padding:6px 12px 10px;min-width:0}
.fs legend{font-weight:700;font-size:13px;padding:0 6px;color:var(--muted,#555)}
.checks{display:flex;flex-wrap:wrap;gap:6px}
.checks.wide{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.chip{display:inline-flex;align-items:center;gap:7px;font-weight:400;font-size:14px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;cursor:pointer;min-height:34px}
.chip input[type=checkbox]{width:auto;min-height:0;margin:0;flex:none}
.chip:has(input:checked){border-color:var(--brand,#c00);background:#fdf0f0}
.chip .muted{font-size:12px}
.chk2{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.field input[type=checkbox]{width:auto;min-height:0;display:inline-block;margin:0}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 12px}
.ferien td{background:#fff7e0}
