/* Zeiterfassung – Gestaltung nach den Layout-Entwürfen (Farben aus dem GOES-Intranet).
   Systemschriften statt Google Fonts: keine Anfrage an Dritte beim Seitenaufruf. */
:root {
  --primary: #004380;
  --primary-dark: #002d57;
  --industrial: #0F5BA6;
  --surface: #f8f9fa;
  --card: #ffffff;
  --container: #edeeef;
  --outline: #c2c6d3;
  --field: #8a8f9a;
  --text: #191c1d;
  --muted: #424751;
  --faint: #5d6270;
  --ok-bg: #e1efe2; --ok: #1f5a22;
  --warn-bg: #fdf0d5; --warn: #7a4d00;
  --err-bg: #f9dedc; --err: #8c1d18;
  --danger: #9b2c2c;
  --tint: #e8eff8;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: "Segoe UI Variable Display", "SF Pro Display", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--surface); font-size: 15px; line-height: 1.4; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { font-family: var(--head); margin: 0; }
.icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Kopf, Inhalt, Navigation */
.top { background: var(--primary); color: #fff; min-height: 64px; padding: 8px 16px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 19px; font-weight: 700; flex-grow: 1; }
.top .sub { font-size: 12px; color: #d6e2f0; display: block; font-family: var(--font); font-weight: 400; }
.top .avatar { width: 44px; height: 44px; border-radius: 22px; border: 1px solid #5b86b5; background: var(--industrial); color: #fff; font-weight: 600; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.top form { margin: 0; }
.top .iconbtn { background: transparent; border: 0; color: #fff; }
main { padding: 16px 16px 104px; display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto; }
main.wide { max-width: 1320px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: 76px; padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--outline); display: flex; justify-content: space-around; align-items: center; z-index: 5; }
.nav a { min-width: 64px; min-height: 52px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500; position: relative; }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.badge { position: absolute; top: 0; right: 10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
@media (min-width: 900px) {
  .nav { position: sticky; top: 64px; bottom: auto; height: 52px; justify-content: flex-start; gap: 4px; padding: 0 16px; border-top: 0; border-bottom: 1px solid var(--outline); }
  .nav a { flex-direction: row; gap: 8px; font-size: 14px; padding: 0 12px; min-height: 52px; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--primary); }
  .badge { position: static; }
  main { padding-bottom: 32px; }
}

/* Bausteine */
.card { background: var(--card); border: 1px solid var(--outline); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 16px; font-weight: 700; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex-grow: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { font-size: 11px; color: var(--faint); margin: -4px 4px 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--outline); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.tile span { font-size: 12px; color: var(--muted); }
.tile strong { font-family: var(--head); font-size: 20px; }
.pos { color: var(--ok); } .neg { color: var(--err); }
.big { font-family: var(--head); font-size: 48px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 5px; background: #7a7f89; }
.dot.on { background: #2f7d32; } .dot.pause { background: #b7791f; }
.list { display: flex; flex-direction: column; }
.list > * { padding: 10px 0; border-bottom: 1px solid var(--container); }
.list > *:last-child { border-bottom: 0; }
.time { width: 48px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Buttons und Formulare */
.btn { min-height: 48px; border-radius: 12px; border: 1px solid var(--outline); background: #fff; color: var(--primary); font: 600 15px var(--font); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.huge { min-height: 64px; font: 700 20px var(--head); border-radius: 14px; width: 100%; }
.btn.small { min-height: 38px; font-size: 13px; padding: 0 12px; }
.btn:disabled { opacity: .55; cursor: default; }
.btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.link { background: none; border: 0; color: var(--primary); font: 600 14px var(--font); min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0; cursor: pointer; text-decoration: none; }
label.l { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
input, select, textarea { font: 16px var(--font); color: var(--text); }
.field { width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--field); background: #fff; padding: 0 14px; }
textarea.field { padding: 12px 14px; resize: vertical; min-height: 64px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice { min-height: 64px; border-radius: 12px; border: 1px solid var(--outline); background: #fff; color: var(--text); font: 500 13px var(--font); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; cursor: pointer; }
.choice[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--tint); color: var(--primary-dark); font-weight: 700; }
.seg { display: flex; gap: 8px; }
.seg button { flex-grow: 1; min-height: 44px; border-radius: 22px; border: 1px solid var(--field); background: #fff; font: 500 14px var(--font); color: var(--text); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.info { background: var(--tint); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.info .row { justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; min-height: 50px; border-radius: 12px; border: 1px solid var(--field); background: #fff; padding: 0 14px; }
.search input { flex-grow: 1; border: 0; outline: none; background: transparent; min-height: 46px; }
.orderbtn { min-height: 60px; border-radius: 14px; border: 1px solid var(--outline); background: #fff; padding: 10px 14px; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.running { background: var(--industrial); color: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.running .muted { color: #dbe7f5; }
.running .btn { background: transparent; color: #fff; border-color: #fff; min-height: 44px; }

/* Chips */
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; background: var(--container); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.err { background: var(--err-bg); color: var(--err); }
.chip.pending { background: #fff; color: var(--primary); border: 1.5px dashed var(--industrial); }
.t-U { background: #d6e4f5; color: #0b3f73; } .t-HO { background: #e3e8d2; color: #3e4a1c; }
.t-K { background: #f8dcc8; color: #7a3a0c; } .t-GZ { background: #e6def2; color: #4b2f73; }
.t-BS { background: #fbe9a8; color: #5c4600; } .t-DR { background: #d3ecec; color: #12494a; }
.t-X { background: #e2e4e8; color: #33373f; }

/* Hinweise */
.toast { position: fixed; left: 16px; right: 16px; bottom: 92px; margin: 0 auto; max-width: 560px; padding: 14px 16px; border-radius: 12px; background: #1f2328; color: #fff; font-size: 14px; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.toast.err { background: var(--err); }
.banner { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 14px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.alert { background: var(--err-bg); color: var(--err); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Login */
.login { max-width: 420px; margin: 0 auto; padding: 56px 24px 32px; display: flex; flex-direction: column; gap: 24px; min-height: 100vh; }
.logo { width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.logo .icon { width: 32px; height: 32px; }
.login h1 { font-size: 30px; letter-spacing: -.5px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 44px; }
.check input { width: 20px; height: 20px; }

/* Team-Kalender */
.cal { overflow-x: auto; background: #fff; border: 1px solid var(--outline); border-radius: var(--radius); padding: 8px 12px; }
.cal table { border-collapse: separate; border-spacing: 1px; font-size: 11px; }
.cal th { font-weight: 600; color: var(--muted); padding: 2px 0; width: 26px; text-align: center; line-height: 1.2; }
.cal th.name, .cal td.name { width: auto; min-width: 150px; text-align: left; font-size: 13px; font-weight: 500; padding-right: 8px; white-space: nowrap; }
.cal td { height: 30px; width: 26px; text-align: center; border-radius: 5px; font-weight: 700; font-size: 10px; }
.cal td.off, .cal th.off { background: var(--container); color: var(--field); }
.cal td.req { background: #fff !important; outline: 2px dashed currentColor; outline-offset: -2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Ergänzungen */
a.card, a.banner { text-decoration: none; color: inherit; }
.card.row { flex-direction: row; align-items: center; }
.stack, .card-form { display: flex; flex-direction: column; gap: 16px; }
fieldset.plain { border: 0; margin: 0; padding: 0; }
.top h1.center { text-align: center; }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.top .btn.small { background: transparent; color: #fff; border-color: #8fb3dc; }
.avatar-s { width: 40px; height: 40px; border-radius: 20px; background: var(--container); color: var(--muted); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.daycol { width: 44px; display: flex; flex-direction: column; }
meter.bar { width: 100%; height: 12px; }
.big-order { font-family: var(--head); font-size: 20px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { margin-bottom: 4px; }
.list-orders { display: flex; flex-direction: column; gap: 8px; }

/* Schichtplan */
.cal td.shiftcell { padding: 0; }
.cellbtn { width: 26px; height: 30px; border: 0; border-radius: 5px; background: transparent; font: 700 11px var(--font); color: var(--field); cursor: pointer; padding: 0; }
.cellbtn:hover { outline: 2px solid var(--industrial); outline-offset: -2px; }
.cellbtn.err { outline: 2px solid var(--err); outline-offset: -2px; }
.s-0 { background: #d6e4f5; color: #0b3f73; } .s-1 { background: #2b3a55; color: #ffffff; }
.s-2 { background: #e3e8d2; color: #3e4a1c; } .s-3 { background: #edeeef; color: #424751; }
.s-4 { background: #fbe9a8; color: #5c4600; } .s-5 { background: #e6def2; color: #4b2f73; }
.cal td.shiftonly { color: var(--muted); font-weight: 600; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
code { background: var(--container); padding: 1px 5px; border-radius: 4px; }

/* Korrektur */
.hrgrid { align-items: start; }
@media (max-width: 899px) { .hrgrid { grid-template-columns: minmax(0, 1fr); } }
.hrrow { flex-wrap: wrap; gap: 8px; }
.hrrow .tfield { width: 110px; min-height: 40px; padding: 0 8px; }
.hrrow.cancelled .time, .hrrow.cancelled input { text-decoration: line-through; opacity: .6; }
