/* Efze-Express – Schriften liegen auf dem eigenen Server (kein Google) */
@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: 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"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); }
:root {
  --bg: #0E141B; --surface: #17212B; --surface2: #1F2B37; --line: #2A3846; --line2: #3A4A5A;
  --text: #EAF0F5; --text2: #C9D4DE; --muted: #9DABB9; --dim: #6B7B8B;
  --amber: #FBBF24; --amber-ink: #1A1300; --amber-bg: #2A2210; --amber-line: #5A4512;
  --green: #4ADE80; --orange: #FB923C; --red: #F87171; --red-soft: #FCA5A5;
  --sky: #7DD3FC; --sky-bg: #10263A; --sky-line: #1F4A6E; --rain: #60A5FA;
  --F: #7DD3FC; --F-bg: #0F2A3A; --S: #FBBF24; --S-bg: #3A2A08; --N: #A5B4FC; --N-bg: #22244A;
  --nav-h: 68px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); }
.h { font-family: "Space Grotesk", Inter, system-ui, sans-serif; font-weight: 700; letter-spacing: -0.01em; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.page { padding: calc(18px + env(safe-area-inset-top)) 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.page.nonav { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 4px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.center { text-align: center; }
.hidden { display: none !important; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.amber { background: var(--amber-bg); border-color: var(--amber-line); }
.card.sky { background: var(--sky-bg); border-color: var(--sky-line); }
.card.wx { background: #0F2236; border-color: #1F4468; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.amber .label { color: var(--amber); }
.divider { height: 1px; background: var(--line); }

.chip { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface2); color: var(--text2); white-space: nowrap; }
.chip.F { background: var(--F-bg); color: var(--F); } .chip.S { background: var(--S-bg); color: var(--S); } .chip.N { background: var(--N-bg); color: var(--N); }
.chip.hol { background: #3A1518; color: var(--red-soft); }

.av { width: 34px; height: 34px; border-radius: 50%; color: #0E141B; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.av.xl { width: 56px; height: 56px; font-size: 24px; font-family: "Space Grotesk", sans-serif; }
.av.lg { width: 44px; height: 44px; font-size: 19px; }
.av.sm { width: 26px; height: 26px; font-size: 12px; }
.av.xs { width: 22px; height: 22px; font-size: 11px; }

.btn { height: 48px; padding: 0 16px; border-radius: 13px; border: 0; background: var(--amber); color: var(--amber-ink); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text); font-weight: 600; }
.btn.dark { background: var(--surface); border: 1px solid var(--line2); color: var(--text); font-weight: 600; }
.btn.danger { background: transparent; border: 1px solid #6B2A2A; color: var(--red-soft); font-weight: 600; }
.btn.block { width: 100%; }
.btn.sm { height: 40px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn:disabled { opacity: .5; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.iconbtn.sq { border-radius: 12px; border-color: var(--line2); background: transparent; }

.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.seg button { height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--text2); font-weight: 700; font-size: 14px; }
.seg button.on { background: var(--amber); color: var(--amber-ink); }

input.field, select.field { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font-size: 16px; padding: 0 12px; }
input.km { width: 74px; height: 44px; text-align: right; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); font-size: 16px; }
label.toggle { display: flex; align-items: center; gap: 12px; min-height: 48px; }
label.toggle input { width: 22px; height: 22px; accent-color: var(--amber); flex-shrink: 0; }

/* Navigation */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #121A23; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs .in { max-width: 520px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
nav.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 12px; }
nav.tabs a.on { color: var(--amber); font-weight: 600; }

/* Heute */
.hero-name { font-size: 30px; line-height: 1.1; }
.status-dot { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.big { font-size: 20px; font-weight: 700; }
.wx-hours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.wx-h { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; }
.wx-h.rainy { background: #15304D; }
.rainbar { width: 6px; height: 16px; border-radius: 3px; background: #1C3550; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.rainbar i { display: block; width: 6px; background: var(--rain); border-radius: 3px; }
.notice { background: var(--sky-bg); border: 1px solid var(--sky-line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; color: #C6E3F5; font-size: 13px; line-height: 1.45; }
.notice.warn { background: #2A1416; border-color: #6B2A2A; color: #FBD5D5; }

/* Kalender */
.cal-head, .cal-row { display: grid; grid-template-columns: 34px repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head span { font-size: 12px; color: var(--muted); text-align: center; }
.cal-kw { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: var(--muted); }
.cal-kw b { width: 24px; height: 24px; border-radius: 7px; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.cal-kw b.F { background: var(--F-bg); color: var(--F); } .cal-kw b.S { background: var(--S-bg); color: var(--S); } .cal-kw b.N { background: var(--N-bg); color: var(--N); }
.cal-d { height: 66px; padding: 4px 0; border-radius: 10px; border: 1px solid #22303D; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal-d.we { background: #121A23; }
.cal-d.hol { background: #2A1416; }
.cal-d.off { background: #1A1A1A; }
.cal-d.out { opacity: .45; }
.cal-d.sel { border: 2px solid var(--amber); }
.cal-d.today .n { background: var(--text); color: var(--bg); border-radius: 6px; padding: 0 4px; }
.cal-d .n { font-size: 12px; font-weight: 600; }
.cal-d .s { font-size: 11px; line-height: 1; color: var(--muted); }
.cal-d .s.red { color: var(--red-soft); }
.cal-d .q { width: 24px; height: 24px; border-radius: 12px; border: 1.5px dashed var(--red-soft); color: var(--red-soft); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cal-d .me-off { outline: 2px solid var(--red-soft); outline-offset: 1px; }

/* Bereichsauswahl */
.rg-row { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 3px; }
.rg-row .kw { height: 40px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--text2); font-size: 12px; font-weight: 700; padding: 0; }
.rg-row .kw.on { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.rg-d { height: 40px; border-radius: 10px; border: 0; background: transparent; font-size: 14px; padding: 0; color: var(--text); }
.rg-d.we, .rg-d.out { color: var(--dim); }
.rg-d.hol { color: var(--red-soft); }
.rg-d.in { background: var(--S-bg); color: var(--amber); }
.rg-d.in.we { color: #8A7440; }
.rg-d.edge { background: var(--amber); color: var(--amber-ink); font-weight: 700; }
.rg-d.past { opacity: .35; }
.rg-d.abs::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 3px; background: var(--red-soft); margin: -2px auto 0; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--surface2); font-size: 12px; color: #D5DEE6; }

.bar { height: 6px; border-radius: 3px; background: #26333F; overflow: hidden; }
.bar i { display: block; height: 6px; border-radius: 3px; }

.list-item { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.event { font-size: 13px; color: var(--text2); display: flex; gap: 8px; }
.event time { color: var(--muted); white-space: nowrap; }

/* Dialog */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 520px; background: var(--surface); border-radius: 22px 22px 0 0; border: 1px solid var(--line); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow: auto; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); background: #EAF0F5; color: #0E141B; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 40; box-shadow: 0 6px 24px rgba(0,0,0,.4); max-width: 90vw; }
.toast.err { background: #FCA5A5; }

.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--amber); animation: sp 0.8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.skeleton { min-height: 60vh; display: flex; align-items: center; justify-content: center; }

.btns .btn { height: auto; min-height: 48px; padding: 8px 10px; line-height: 1.2; text-align: center; }

.info { width: 30px; height: 30px; border-radius: 15px; border: 1.5px solid var(--amber); background: transparent; color: var(--amber); font: 700 15px/1 Georgia, "Times New Roman", serif; font-style: italic; padding: 0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.stepn { width: 26px; height: 26px; border-radius: 13px; background: var(--amber); color: var(--amber-ink); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- Admin (aufklappbare Bereiche, festes Raster) ---------- */
.field { min-width: 0; }
input[type="date"].field, input[type="time"].field { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; text-align: left; line-height: 46px; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.8); }
select.field { -webkit-appearance: none; appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239DABB9' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iconbtn:disabled { opacity: .3; }
.iconbtn.del { color: var(--red-soft); border-color: #5A2A2A; }

.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sec > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; cursor: pointer; -webkit-user-select: none; user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--surface2); color: var(--amber); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sec .chev { color: var(--muted); transition: transform .2s; flex-shrink: 0; display: flex; }
.sec[open] .chev { transform: rotate(180deg); }
.sec[open] > summary { border-bottom: 1px solid var(--line); }
.sec-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > span { font-size: 12px; color: var(--muted); }
.subbox { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }

.rrow { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.qrow { display: grid; grid-template-columns: 20px 34px minmax(0, 1fr) 44px 44px; gap: 8px; align-items: center; }
.trow { display: grid; grid-template-columns: 46px 26px minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow.today { background: var(--amber-bg); border-radius: 10px; padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
.tdate { display: flex; flex-direction: column; line-height: 1.15; }
.tdate span { font-size: 11px; color: var(--muted); }
.tdate b { font-size: 13px; }

.pchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pchips.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pchip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text2); min-width: 0; }
.pchip.on { border-color: var(--amber); background: var(--amber-bg); color: var(--text); }
.pchip span.xs { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rcard { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); min-height: 60px; }
.rcard.on { border-color: var(--amber); background: var(--amber-bg); }
.rnum { width: 32px; height: 32px; border-radius: 16px; background: var(--surface2); color: var(--text); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rcard.on .rnum { background: var(--amber); color: var(--amber-ink); }

.tgrid { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 10px; align-items: center; }
.numin { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.numin .field { text-align: right; }
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.copyrow code { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; }
/* Uhrzeit-Felder: kein Uhr-Symbol (Antippen öffnet trotzdem die Auswahl), damit 4 Ziffern immer passen */
input[type="time"].field { padding: 0 10px; font-variant-numeric: tabular-nums; }
input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.tgrid { grid-template-columns: 50px minmax(0, 1fr) minmax(0, 1fr); }
.lrow { grid-template-columns: minmax(0, 1fr) 104px; }
.trow .col .xs { line-height: 1.3; }

/* Alleine fahren */
.solo-btn { gap: 10px; }
.solo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.solo-badge { display: inline-flex; align-items: center; gap: 8px; color: #FDE68A; font-size: 14px; font-weight: 600; min-width: 0; }
.solo-badge svg { flex-shrink: 0; }
.solo-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.solo-box.warn { background: var(--amber-bg); border-color: var(--amber-line); }
.cal-d .s .amb, .amb { color: #FDE68A; }
