/* Werkplan – Gestaltung. Farben als Variablen, hell und dunkel. */
:root {
  --bg: #f4f5f7; --surface: #fff; --surface-2: #f8f9fb; --ink: #151922; --muted: #646d7e; --line: #e3e6ec; --line-2: #eef0f4;
  --navy: #1b2a4a; --navy-2: #24365d; --accent: #2456e6; --accent-soft: #e9efff; --warm: #ff8a3d;
  --danger: #d43d3d; --ok: #12915a; --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, .22);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f131a; --surface: #171c26; --surface-2: #1c2230; --ink: #e9ecf2; --muted: #98a1b3; --line: #2a3142; --line-2: #222938;
    --navy: #121826; --navy-2: #1d2740; --accent: #6f95ff; --accent-soft: #1f2b4d; --danger: #ff6b6b; --ok: #3ecf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.45 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }
a { color: inherit; text-decoration: none; }
small { color: var(--muted); font-size: 12.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.ic { display: inline-flex; flex: none; }
.boot { padding: 40px; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; color: var(--muted); font-size: 13px; white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .strong { font-weight: 650; } .block { display: block; } .grow { flex: 1; min-width: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--danger); } .pos { color: var(--ok); }
.link { color: var(--accent); background: none; border: 0; padding: 0; } .link:hover { text-decoration: underline; }
.pre { white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Schaltflächen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.btn:active { transform: translateY(1px); } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.square { width: 36px; padding: 0; } .btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn.danger-ghost { border-color: transparent; color: var(--danger); background: transparent; }
.btn.wide { width: 100%; } .btn.left { margin-right: auto; }
.btn.big { height: 52px; font-size: 15.5px; border-radius: 14px; padding: 0 18px; }

/* Abzeichen */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; --t: #64748b; background: color-mix(in srgb, var(--t) 14%, var(--surface)); color: color-mix(in srgb, var(--t) 78%, var(--ink)); }
.tone-gray { --t: #64748b; } .tone-amber { --t: #c98a04; } .tone-orange { --t: #e8650c; } .tone-blue { --t: #2456e6; } .tone-violet { --t: #7c3aed; }
.tone-pink { --t: #d6336c; } .tone-teal { --t: #0d9488; } .tone-green { --t: #16a34a; } .tone-slate { --t: #475569; } .tone-red { --t: #d43d3d; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.type { display: inline-flex; align-items: center; gap: 6px; }
.flag { color: var(--danger); margin-left: 6px; vertical-align: -2px; display: inline-flex; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12.5px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; } .avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.avatar.ghost { background: transparent !important; border: 1.5px dashed var(--muted); color: var(--muted); }
.avatars { display: inline-flex; gap: 3px; flex-wrap: wrap; } .person { display: inline-flex; align-items: center; gap: 9px; }

/* Rahmen Büro */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #c9d3ea; display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: #fff; } .brand strong { display: block; font-size: 16px; letter-spacing: -.01em; } .brand small { color: #9fb0d6; }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; color: var(--navy); font-weight: 800; font-size: 18px; position: relative; flex: none; }
.logo::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--warm); border: 2px solid var(--navy); }
.side nav { display: grid; gap: 2px; } .side nav a, .navbtn { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; font-weight: 600; color: inherit; background: none; border: 0; width: 100%; text-align: left; }
.side nav a:hover, .navbtn:hover { background: var(--navy-2); color: #fff; } .side nav a.on { background: #fff; color: var(--navy); }
.side-foot { margin-top: auto; display: grid; gap: 10px; } .me { display: flex; align-items: center; gap: 9px; padding: 10px 8px 2px; border-top: 1px solid rgba(255, 255, 255, .12); color: #fff; }
.me span:nth-child(2) { flex: 1; min-width: 0; } .me strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me small { color: #9fb0d6; } .me .btn { color: #c9d3ea; } .me .btn:hover { background: var(--navy-2); color: #fff; }
.main { min-width: 0; } .page { padding: 26px 30px 60px; max-width: 1500px; margin: 0 auto; display: grid; gap: 18px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; } .page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub { color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; width: fit-content; } .back:hover { color: var(--ink); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 0 11px; height: 36px; min-width: 260px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; height: 100%; color: var(--ink); }
select, .field input, .field textarea { height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 10px; max-width: 100%; }
.seg { display: inline-flex; } .seg .btn { border-radius: 0; margin-left: -1px; } .seg .btn:first-child { border-radius: 9px 0 0 9px; margin-left: 0; } .seg .btn:last-child { border-radius: 0 9px 9px 0; }
.seg.toggle .btn.on { background: var(--navy); color: #fff; border-color: var(--navy); } .range { font-size: 15px; font-variant-numeric: tabular-nums; }

/* Karten, Listen, Tabellen */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card p + p { margin-top: 8px; } .stack { display: grid; gap: 16px; align-content: start; min-width: 0; } .cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.list { display: grid; } .row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border: 0; border-top: 1px solid var(--line-2); background: none; text-align: left; width: 100%; border-radius: 8px; }
.list .row:first-child { border-top: 0; } a.row:hover, button.row:hover { background: var(--surface-2); } .row strong, .row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; white-space: nowrap; font-weight: 600; }
.empty { padding: 26px 12px; text-align: center; color: var(--muted); display: grid; gap: 4px; } .empty strong { color: var(--ink); font-weight: 600; }
.addr { display: flex; gap: 8px; align-items: flex-start; } .addr .ic { margin-top: 2px; color: var(--muted); }
.hint-box { background: color-mix(in srgb, var(--warm) 13%, var(--surface)); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--ink); display: block; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; } .table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; } .table tbody tr:last-child td { border-bottom: 0; } .table td small { display: block; }
.table.clickable tbody tr, .clickrow { cursor: pointer; } .table.clickable tbody tr:hover, .clickrow:hover { background: var(--surface-2); }
.table.compact th { background: none; padding: 6px 8px; } .table.compact td { padding: 7px 8px; } .table tfoot td { font-weight: 700; border-top: 1px solid var(--line); padding: 8px; }
.table th:has(+ th:empty), .table .num { text-align: right; } tr.sub td { background: var(--surface-2); padding: 12px 18px 16px; max-width: 0; }
.daybox { margin-top: 10px; } .daybox h3 { margin-bottom: 4px; } .trow { display: flex; align-items: center; gap: 12px; padding: 6px 0; border: 0; border-top: 1px solid var(--line-2); background: none; width: 100%; text-align: left; } .trow.pending { opacity: .65; }
.kind { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 6px; background: var(--line-2); min-width: 92px; text-align: center; }
.k-anwesenheit { background: color-mix(in srgb, #16a34a 15%, var(--surface)); } .k-pause { background: color-mix(in srgb, #c98a04 18%, var(--surface)); } .k-arbeit { background: color-mix(in srgb, #2456e6 15%, var(--surface)); } .k-fahrt { background: color-mix(in srgb, #7c3aed 15%, var(--surface)); } .k-ruest { background: color-mix(in srgb, #0d9488 16%, var(--surface)); }
.trow .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .trow .num { flex: none; }
.table.clickable td:nth-child(2) { min-width: 190px; }
.is-mobile .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
.note { max-width: 70ch; }
.plan-section { padding: 7px 12px; background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; position: sticky; left: 0; border-bottom: 1px solid var(--line-2); border-top: 1px solid var(--line); }
.avatar.resicon { background: var(--line-2); color: var(--ink); border-radius: 8px; }
.appt small.res { display: flex; align-items: center; gap: 4px; font-weight: 600; color: color-mix(in srgb, var(--c) 55%, var(--ink)); }
.section-title { margin-top: 8px; font-size: 16px; }
.form-actions.wrap { flex-wrap: wrap; } .rep { color: var(--muted); margin-left: 6px; vertical-align: -2px; display: inline-flex; }
.later { border-top: 1px solid var(--line); padding-top: 8px; display: grid; gap: 8px; } .later summary { cursor: pointer; font-weight: 650; color: var(--muted); font-size: 13px; } .later[open] summary { margin-bottom: 4px; }

.page, .stack, .list, .m-page, .m-card, .form, .events, .unplanned { grid-template-columns: minmax(0, 1fr); }

/* Übersicht */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; box-shadow: var(--shadow); border-top: 3px solid var(--t, #64748b); }
.tile:hover { background: var(--surface-2); } .tile-num { font-size: 30px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; } .tile-label { font-weight: 650; } .tile-hint { color: var(--muted); font-size: 12.5px; }

/* Auftragsakte */
.status-select { font-weight: 650; background: color-mix(in srgb, var(--t, #64748b) 14%, var(--surface)); border-color: color-mix(in srgb, var(--t, #64748b) 40%, var(--line)); }
.events { display: grid; gap: 10px; max-height: 460px; overflow: auto; padding: 2px 4px 2px 0; } .events.flat { max-height: none; }
.ev { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; display: grid; gap: 5px; } .ev.pending { border-style: dashed; opacity: .8; }
.ev.sys { background: none; border: 0; padding: 0 4px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; }
.ev.defect { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, var(--line)); }
.ev-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ev time, .audit time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.ev-photo img { max-width: 240px; max-height: 180px; border-radius: 8px; display: block; object-fit: cover; }
.ev-file { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; padding: 4px 0; }
.composer { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; } .composer textarea { flex: 1; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px 10px; resize: vertical; min-height: 40px; }
.audit summary { cursor: pointer; font-weight: 650; } .audit p { font-size: 12.5px; color: var(--muted); margin-top: 8px; } .audit time { margin: 0; }

/* Plantafel */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 16px; align-items: start; }
.plan-scroll { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.plan-grid { display: grid; min-width: 900px; } .plan-grid > * { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.plan-corner, .plan-day { padding: 10px 12px; background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 650; position: sticky; top: 0; z-index: 2; }
.plan-day strong { color: var(--ink); font-size: 13.5px; display: block; } .plan-day.today strong { color: var(--accent); } .plan-day.holiday small { color: var(--danger); }
.plan-user { padding: 10px 12px; display: flex; gap: 9px; align-items: center; background: var(--surface); position: sticky; left: 0; z-index: 1; min-width: 0; } .plan-user strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .plan-user small { display: block; } .plan-user.open strong { color: var(--muted); }
.plan-cell { padding: 6px; min-height: 76px; display: grid; gap: 6px; align-content: start; transition: background .1s; }
.plan-cell.today { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); } .plan-cell.holiday { background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.plan-cell.absent, .day-track.absent { background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--line-2) 8px 16px); }
.plan-cell.over, .day-track.over { background: var(--accent-soft); outline: 2px dashed var(--accent); outline-offset: -3px; }
.absence { border: 0; background: var(--surface); border-radius: 6px; font-size: 12px; font-weight: 650; color: var(--muted); padding: 3px 8px; justify-self: start; box-shadow: var(--shadow); }
.appt { --c: #64748b; background: color-mix(in srgb, var(--c) 11%, var(--surface)); border-left: 3px solid var(--c); border-radius: 7px; padding: 6px 8px; display: grid; gap: 1px; cursor: pointer; min-width: 0; overflow: hidden; }
.appt[draggable=true] { cursor: grab; } .appt:hover { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.appt strong { font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .appt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-time { font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; justify-content: space-between; }
.appt.conflict { outline: 2px solid var(--danger); outline-offset: -2px; } .appt.conflict .appt-time { color: var(--danger); }
.unplanned { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow); position: sticky; top: 16px; } .unplanned .card-head { margin-bottom: 2px; } .appt.job .badge { justify-self: start; margin-top: 4px; }
.day-grid { min-width: 900px; } .day-row { display: grid; grid-template-columns: 168px 1fr; border-bottom: 1px solid var(--line-2); } .day-row .plan-user { border-right: 1px solid var(--line-2); }
.day-track { position: relative; min-height: 70px; background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px); background-size: calc(100% / 14) 100%; }
.day-row.head .day-track { min-height: 34px; background: var(--surface-2); } .tick { position: absolute; top: 9px; font-size: 11.5px; color: var(--muted); padding-left: 5px; font-variant-numeric: tabular-nums; }
.day-track .appt { position: absolute; top: 6px; bottom: 6px; align-content: start; grid-auto-rows: max-content; }
.day-track .appt .avatars { display: none; } .day-track .appt-time { white-space: nowrap; }

/* Dialoge und Formulare */
.overlay { position: fixed; inset: 0; background: rgba(12, 18, 32, .5); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 16px; width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .16s; } .modal.wide { width: min(720px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; } .modal header h2 { font-size: 17px; } .modal-body { padding: 8px 20px 20px; overflow: auto; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.form { display: grid; gap: 14px; } .form-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; } .field { grid-column: span 6; display: grid; gap: 5px; min-width: 0; } .field.half { grid-column: span 3; } .field.third { grid-column: span 2; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; } .req { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; height: 40px; } .field textarea { height: auto; padding: 9px 10px; resize: vertical; } .field input[type=color] { padding: 3px; }
.field input:focus, .field select:focus, .field textarea:focus, .composer textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form-intro { color: var(--muted); font-weight: 600; } .form-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); border-radius: 8px; padding: 9px 12px; font-weight: 600; font-size: 13.5px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; } .confirm-text { margin: 4px 0 18px; font-size: 15px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; } .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; justify-items: center; pointer-events: none; }
.toast { background: #151922; color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lg); animation: pop .16s; } .toast.err { background: var(--danger); }

/* Anmeldung */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-brand { background: linear-gradient(160deg, var(--navy), #0f1830); color: #fff; padding: 9vh 7vw; display: grid; align-content: center; gap: 16px; } .login-brand h1 { font-size: 44px; } .login-brand p { color: #b8c5e4; font-size: 17px; max-width: 34ch; }
.logo.big { width: 60px; height: 60px; font-size: 32px; border-radius: 17px; } .logo.big::after { width: 16px; height: 16px; border-width: 3px; }
.login-card { padding: 9vh 7vw; display: grid; align-content: center; gap: 18px; max-width: 560px; width: 100%; } .login-card h2 { font-size: 22px; }
.demo { border-top: 1px solid var(--line); padding-top: 16px; display: grid; } .demo h3 { color: var(--muted); margin-bottom: 6px; }

/* Monteur-App */
.m-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); position: relative; }
.is-mobile { background: color-mix(in srgb, var(--navy) 10%, var(--bg)); }
.m-head { position: sticky; top: 0; z-index: 10; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
.m-head .brand { padding: 0; gap: 9px; } .m-head .logo { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.syncpill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 650; background: rgba(255, 255, 255, .14); color: #fff; }
.syncpill.ok { color: #9ff0c6; } .syncpill.wait { background: #ffd27a; color: #4a3200; } .syncpill.off { background: var(--warm); color: #3a1a00; } .syncpill.bad { background: var(--danger); }
.m-main { flex: 1; padding-bottom: 86px; } .m-page { padding: 16px 14px 24px; display: grid; gap: 12px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 100%); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; color: var(--muted); font-size: 11.5px; font-weight: 650; } .tabbar a.on { color: var(--accent); background: var(--accent-soft); }
.m-hello h1 { font-size: 22px; } .m-hello p { color: var(--muted); }
.m-title { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 6px; }
.count { margin-left: auto; font-weight: 700; color: var(--ink); font-size: 12.5px; background: var(--line-2); border-radius: 999px; padding: 1px 9px; text-transform: none; letter-spacing: 0; }
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; display: grid; gap: 6px; box-shadow: var(--shadow); min-width: 0; }
.m-card h3 { display: flex; align-items: center; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; margin: 4px 0 2px; }
.appt-link { border-left: 4px solid var(--c, var(--line)); } .appt-link strong { font-size: 16px; line-height: 1.25; } .m-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-jobhead { display: grid; gap: 4px; } .m-jobhead h1 { font-size: 22px; } .m-jobhead p { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.m-actions { display: grid; gap: 8px; } .m-actions.two { grid-template-columns: 1fr 1fr; margin-top: 4px; } .m-actions.three { grid-template-columns: 1.4fr 1fr 1fr; } .m-actions.four { grid-template-columns: repeat(4, 1fr); }
.m-actions .btn { height: 44px; } .m-actions .btn.big { height: 52px; padding: 0 8px; }
.tilebtn { display: grid; justify-items: center; gap: 5px; padding: 13px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 12.5px; box-shadow: var(--shadow); } .tilebtn:active { background: var(--surface-2); } .tilebtn .ic { color: var(--accent); }
.clock { background: linear-gradient(150deg, var(--navy), #2a3f6e); color: #fff; border-radius: 18px; padding: 16px; display: grid; gap: 12px; box-shadow: var(--shadow-lg); }
.clock.running { background: linear-gradient(150deg, #0f6b47, #128a5b); } .clock.paused { background: linear-gradient(150deg, #9a5a00, #c97a08); }
.clock-top { display: flex; justify-content: space-between; align-items: flex-start; } .clock-label { font-size: 13px; opacity: .85; font-weight: 600; display: block; }
.clock-num { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; } .clock-num small { font-size: 15px; color: inherit; opacity: .8; font-weight: 600; letter-spacing: 0; }
.clock-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .35); } .clock.running .clock-dot { background: #7dffbf; animation: pulse 1.6s infinite; } @keyframes pulse { 50% { opacity: .35; } }
.clock-job { display: flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .14); border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.clock-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.btn.light { background: #fff; color: #10203f; border-color: #fff; } .btn.glass { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); color: #fff; } .btn.light:hover { background: #f1f4fb; border-color: #f1f4fb; } .btn.glass:hover { background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .4); }
.m-card.timer { grid-template-columns: 1fr; } .m-card.timer.running { grid-template-columns: 1fr auto; align-items: center; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); } .timer .clock-label { color: var(--muted); } .timer .clock-num { font-size: 30px; }
/* Berichtsformulare */
.rep-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); } .rep-list .add { justify-self: start; }
.pick .row small { white-space: normal; } .pick .row { padding: 14px 6px; }
.checkrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.checkrow.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); } .checkrow.is-mangel { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); } .checkrow.is-na { opacity: .7; }
.check-label { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; } .tri button { border: 0; background: var(--surface); padding: 10px 6px; font-weight: 650; font-size: 12.5px; color: var(--muted); border-left: 1px solid var(--line); } .tri button:first-child { border-left: 0; }
.tri-ok.on { background: var(--ok); color: #fff; } .tri-mangel.on { background: var(--danger); color: #fff; } .tri-na.on { background: var(--muted); color: #fff; }
.rowcard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.rownum { width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 20px; }
.rowfields { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; } .rowfields label { display: grid; gap: 3px; min-width: 0; } .rowfields.measure { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rowfields .full { grid-column: 1 / -1; }
.measure-out { grid-column: 1 / -1; color: var(--accent); font-variant-numeric: tabular-nums; min-height: 20px; } .measure-total { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .rowfields { grid-template-columns: minmax(0, 1fr); } .rowfields.measure { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sigpad { width: 100%; height: 170px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; display: block; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Schmale Bildschirme */
@media (max-width: 1100px) { .detail, .cols, .plan { grid-template-columns: minmax(0, 1fr); } .unplanned { position: static; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 60px 1fr; } .side { padding: 14px 8px; } .side nav a span:last-child, .navbtn span:last-child, .brand span:last-child, .me span:nth-child(2), .me .avatar { display: none; }
  .side nav a, .navbtn { justify-content: center; } .brand { padding: 4px 4px 16px; justify-content: center; } .me { justify-content: center; padding: 10px 0 0; }
  .page { padding: 18px 16px 50px; } .login { grid-template-columns: 1fr; } .login-brand { padding: 36px 24px; } .login-brand h1 { font-size: 32px; } .login-card { padding: 28px 24px; }
}
@media (max-width: 640px) {
  .overlay { padding: 0; place-items: end stretch; } .modal, .modal.wide { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .field input, .field select, .field textarea { font-size: 16px; height: 46px; } .field textarea { height: auto; } .form-actions .btn { height: 46px; flex: 1; } .search { min-width: 0; flex: 1; }
}
