/* Terralia App, Klick-Prototyp. Tokens aus dem Claude-Design-Export (HANDOFF.md). */

@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/dm-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/dm-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/dm-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/dm-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --font: 'DM Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --page: #E3E7D7; --bg: #F7F8F2; --surface: #FFFFFF; --surface-2: #EDF0E4;
  --text: #1B2414; --text-2: #4D5646; --line: #D9DDCD;
  --accent: #507916; --accent-press: #41630F; --accent-soft: #E7EED8; --accent-text: #41630F; --on-accent: #FFFFFF; --brand: #7AB821;
  --st-offen-bg: #FBEFD5; --st-offen-fg: #7A4F00; --st-geplant-bg: #EDF0E4; --st-geplant-fg: #4D5646;
  --st-unterwegs-bg: #DDEBF7; --st-unterwegs-fg: #1E4F7C; --st-erledigt-bg: #E3EFD2; --st-erledigt-fg: #3B5F0E;
  --danger: #A3261B;
  --shadow: 0 1px 2px rgba(27, 36, 20, .06), 0 10px 30px rgba(27, 36, 20, .08);
  --seg-shadow: 0 1px 3px rgba(0, 0, 0, .14);
  --r-s: 8px; --r-m: 14px; --r-l: 20px;
  --nav-w: 232px; --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page: #0A0D08; --bg: #12170E; --surface: #1A2114; --surface-2: #242D1C;
  --text: #EEF2E6; --text-2: #A7B09C; --line: #313B27;
  --accent: #7AB821; --accent-press: #8FCB38; --accent-soft: #25331A; --accent-text: #9BD24A; --on-accent: #10150B; --brand: #7AB821;
  --st-offen-bg: #3A2E12; --st-offen-fg: #F2C870; --st-geplant-bg: #2A3322; --st-geplant-fg: #B9C2AE;
  --st-unterwegs-bg: #16314A; --st-unterwegs-fg: #9CC8F0; --st-erledigt-bg: #26391A; --st-erledigt-fg: #A8D86A;
  --danger: #FF8A7A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.has-sheet { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.3; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.accent { color: var(--accent); }
.center { text-align: center; }
.grow { flex: 1; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.boot { padding: 40px 20px; color: var(--text-2); text-align: center; }

/* ---------- Grundgerüst ---------- */
.app { min-height: 100vh; min-height: 100dvh; }
.col { min-width: 0; }
.main { min-width: 0; }
.rolebar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: calc(var(--safe-t) + 6px) 16px 2px; }
.rolebar-label { font-size: 13px; color: var(--text-2); }
.is-mobile.has-nav .main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }
.is-mobile.no-nav .main { padding-bottom: calc(var(--safe-b) + 24px); }
.is-desk.has-nav { padding-inline-start: var(--nav-w); }
.is-desk .rolebar { padding: 14px 40px 0; }

.sidenav { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--nav-w); display: flex; flex-direction: column; gap: 4px; padding: 24px 16px; background: var(--surface); border-inline-end: 1px solid var(--line); z-index: 5; }
.sidenav-brand { padding: 0 12px 28px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--text); font-size: 16px; font-weight: 500; width: 100%; }
.nav-item .ic { font-size: 22px; color: var(--text-2); }
.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-current="page"] { background: var(--accent-soft); font-weight: 600; }
.nav-item[aria-current="page"] .ic { color: var(--accent); }
.nav-more { color: var(--text-2); font-size: 15px; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 12px; }
.nav-user-t { display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }

.tabbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 10; display: flex; padding: 6px 8px calc(6px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.tab .ic { font-size: 24px; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.brand-mark { width: 30px; height: auto; }
.brand-sm .brand-mark { width: 28px; }

/* ---------- Bausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: var(--r-m); font-size: 17px; font-weight: 600; text-align: center; border: 1px solid transparent; text-decoration: none; }
.btn .ic { font-size: 22px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-press); }
.btn-primary:disabled { opacity: .4; }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-muted { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.btn-muted:disabled { opacity: 1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; }
.btn-xl { min-height: 60px; font-size: 18px; }
.btn-text { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 4px; font-size: 16px; font-weight: 500; color: var(--text); }
.btn-text.accent { color: var(--accent-text); }
.btn-text.muted { color: var(--text-2); }
.btn-text.strong { font-weight: 600; }
.btn-text.small { font-size: 14px; font-weight: 600; min-height: 32px; padding: 0; }
.btn-text .ic { font-size: 18px; }
.center-self { align-self: center; }
.more-btn { min-width: 48px; justify-content: center; font-size: 15px; }
.icon-btn { width: 48px; height: 48px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-2); flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn-soft { background: var(--surface-2); color: var(--text); font-size: 20px; }
.icon-btn-accent { background: var(--accent); color: var(--on-accent); }
.icon-btn-accent:hover { background: var(--accent-press); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; }
.chip .dot { width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.chip-xs { height: 20px; padding: 0 8px; font-size: 11px; gap: 4px; }
.chip-xs .dot { width: 5px; height: 5px; }
.st-offen { --st-bg: var(--st-offen-bg); --st-fg: var(--st-offen-fg); }
.st-geplant { --st-bg: var(--st-geplant-bg); --st-fg: var(--st-geplant-fg); }
.st-unterwegs { --st-bg: var(--st-unterwegs-bg); --st-fg: var(--st-unterwegs-fg); }
.st-erledigt { --st-bg: var(--st-erledigt-bg); --st-fg: var(--st-erledigt-fg); }
.chip.st-offen, .chip.st-geplant, .chip.st-unterwegs, .chip.st-erledigt { background: var(--st-bg); color: var(--st-fg); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: var(--r-m); background: var(--surface-2); }
.seg-opt { min-height: 44px; padding: 0 12px; border-radius: 11px; color: var(--text-2); font-size: 15px; font-weight: 600; text-align: center; }
.seg-opt[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--seg-shadow); }
.seg-sm { padding: 3px; border-radius: 12px; }
.seg-sm .seg-opt { min-height: 42px; border-radius: 9px; padding: 0 12px; font-size: 14px; }
.seg-role .seg-opt { min-height: 40px; font-size: 13px; font-weight: 500; padding: 0 10px; }
.seg-2 .seg-opt { min-height: 48px; font-size: 16px; }
.seg-3 { flex: 0 1 320px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.card-tight { padding: 8px 20px 12px; gap: 0; }
.card-tight .card-head { padding: 12px 0 4px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head h2 { font-size: 20px; }
.card-tight .card-head h2 { font-size: 17px; }
.rule { height: 1px; background: var(--line); }
.label, legend { font-size: 14px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.sub { font-size: 15px; color: var(--text-2); margin-top: 4px; }
.lead { font-size: 17px; }
.note-box { padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.extra-box { padding: 12px 14px; border-radius: var(--r-m); background: var(--st-offen-bg); color: var(--st-offen-fg); font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.banner-done { padding: 16px; border-radius: var(--r-m); background: var(--st-erledigt-bg); color: var(--st-erledigt-fg); font-size: 16px; font-weight: 600; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 16px; text-align: center; }
.empty-ic { font-size: 40px; color: var(--text-2); }
.empty-title { font-size: 17px; font-weight: 500; max-width: 320px; }
.empty-text { font-size: 15px; color: var(--text-2); max-width: 300px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; }

.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.field legend { padding: 0; margin-bottom: 8px; }
.input { width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 17px; outline: none; }
.input:focus { border-color: var(--accent); }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input::placeholder { color: var(--text-2); opacity: .85; }
.textarea { min-height: 108px; padding: 14px 16px; line-height: 1.45; resize: vertical; }
.textarea-lg { min-height: 150px; }
.input-sm { min-height: 48px; padding: 0 12px; border-radius: 10px; background: var(--bg); font-size: 16px; }
select.input-sm { padding: 0 8px; }

.choice { min-height: 48px; padding: 0 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; text-align: center; }
.choice[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-inline { padding: 0 16px; }
.choice-time { min-width: 64px; padding: 0 10px; }
.choice-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; text-align: start; font-size: 16px; }

.check-row { display: flex; align-items: center; gap: 14px; min-height: 56px; width: 100%; font-size: 17px; text-align: start; }
.check-row .box { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: var(--surface); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.check-row .box .ic { visibility: hidden; }
.check-row.is-done .box { background: var(--accent); border-color: var(--accent); }
.check-row.is-done .box .ic { visibility: visible; }
.check-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.check-row.is-done .check-label { color: var(--text-2); text-decoration: line-through; }
.req { flex: none; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; }

.photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; display: block; }
.thumb-lg { width: 96px; height: 96px; }
.thumb-wrap { position: relative; }
.thumb-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 32px; height: 32px; border-radius: 16px; background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.thumb-x::after { content: ''; position: absolute; inset: -8px; }
.photo-add { width: 96px; height: 96px; border-radius: var(--r-m); border: 1px dashed var(--text-2); background: var(--surface); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 14px; font-weight: 600; }
.photo-add .ic { font-size: 26px; }

/* ---------- Seiten ---------- */
.pane { padding: 8px 20px 40px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.is-desk .pane { padding: 24px 40px 48px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 4px; }
.back { align-self: flex-start; margin-bottom: -8px; }

/* Aufträge */
.auf.is-split { display: flex; min-height: calc(100vh - 60px); }
.auf.is-split .pane-list { flex: none; width: 380px; border-inline-end: 1px solid var(--line); }
.auf.is-split .pane-form, .auf.is-split .pane-detail, .auf.is-split .pane-empty { flex: 1; max-width: 760px; }
.pane-empty { justify-content: center; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.filters::-webkit-scrollbar { display: none; }
.fchip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 500; white-space: nowrap; }
.fchip-n { font-size: 13px; color: var(--text-2); }
.fchip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.fchip[aria-pressed="true"] .fchip-n { color: var(--bg); }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.list li + li { border-top: 1px solid var(--line); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px 16px; text-align: start; }
.row:hover, .row.is-sel { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 14px; color: var(--text-2); }

.form-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: -8px; }
.pos { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); margin-bottom: 4px; }
.pos-top { display: flex; gap: 8px; align-items: center; }
.pos-name { flex: 1; min-width: 0; min-height: 48px; padding: 0 2px; border: 0; border-bottom: 1px solid transparent; background: transparent; font-size: 17px; font-weight: 500; outline: none; }
.pos-name:focus { border-bottom-color: var(--accent); }
.pos-name::placeholder { color: var(--text-2); opacity: .85; font-weight: 400; }
.pos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini { display: flex; flex-direction: column; gap: 4px; }
.mini > span { font-size: 13px; color: var(--text-2); }
.pos-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--text-2); }
.pos-foot strong { color: var(--text); font-weight: 600; }
.sum-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; color: var(--text-2); }
.sum-line strong { font-size: 22px; font-weight: 600; color: var(--text); }

.det-head { display: flex; flex-direction: column; gap: 8px; }
.det-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.det-plan { font-size: 15px; font-weight: 500; }
.offer-row { display: flex; justify-content: space-between; gap: 12px; }
.offer-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 16px; }
.offer-r { font-size: 16px; font-weight: 500; white-space: nowrap; }
.offer-sum { display: flex; justify-content: space-between; font-size: 15px; color: var(--text-2); margin-top: -8px; }
.offer-sum:first-of-type { margin-top: 0; }
.offer-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; font-weight: 600; }
.offer-total strong { font-size: 24px; font-weight: 600; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 160px; }

.report .rp-block { display: flex; flex-direction: column; gap: 4px; }
.rp-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.rp-text { font-size: 16px; overflow-wrap: anywhere; }
.rp-sub { font-size: 14px; color: var(--text-2); }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-list li { display: flex; gap: 10px; align-items: center; min-height: 30px; font-size: 16px; }
.rp-check { color: var(--accent); }
.rp-open li { color: var(--text-2); }
.report .btn { align-self: flex-start; }

/* Planung */
.plan-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.pnav { display: flex; align-items: center; gap: 2px; }
.plabel { font-size: 16px; font-weight: 600; min-width: 150px; text-align: center; }
.summary { font-size: 17px; }
.staff-block { display: flex; flex-direction: column; gap: 8px; }
.staff-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.staff-head .hint { flex: 1; }
.staff-pool { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.staff-pool::-webkit-scrollbar { display: none; }
.staff { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; padding: 4px 0; }
.staff-name { font-size: 13px; }
.staff-team { font-size: 12px; font-weight: 600; color: var(--text-2); }
.staff-team.is-free { color: var(--st-offen-fg); }
.staff.is-sel .avatar { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tray { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-l); border: 1px dashed var(--text-2); background: var(--surface-2); }
.tray.drop-over { border-color: var(--accent); background: var(--accent-soft); }
.tray-cards { display: flex; gap: 8px; flex-wrap: wrap; }
.tcard { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tcard-title { font-size: 15px; font-weight: 600; }
.tcard-meta { font-size: 13px; color: var(--text-2); }
.plan-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.plan-grid { display: flex; min-width: min-content; }
.hours { flex: none; width: 52px; padding-top: 73px; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 2; border-inline-end: 1px solid var(--line); }
.hour { height: 60px; font-size: 12px; color: var(--text-2); text-align: end; padding-inline-end: 8px; padding-top: 4px; }
.tcol { flex: 1 0 172px; min-width: 172px; display: flex; flex-direction: column; }
.tcol + .tcol { border-inline-start: 1px solid var(--line); }
.tcol-head { height: 73px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); width: 100%; text-align: start; }
.tcol-head.is-target { background: var(--accent-soft); }
.tcol-name { font-size: 15px; font-weight: 600; display: flex; gap: 6px; align-items: baseline; }
.tcol-name .muted { font-size: 13px; font-weight: 400; }
.tcol-mem { display: flex; gap: 4px; align-items: center; min-height: 26px; flex-wrap: wrap; }
.tcol-none { font-size: 12px; color: var(--st-offen-fg); }
.tcol-hint { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.tcol-body { position: relative; background-image: repeating-linear-gradient(to bottom, transparent 0 59px, var(--line) 59px 60px); }
.tcol-body.drop-over { background-color: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.pcard { position: absolute; inset-inline: 6px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow: hidden; cursor: grab; }
.pcard.is-hl { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pcard.st-erledigt { opacity: .75; }
.pc-time { font-size: 12px; font-weight: 600; color: var(--text-2); }
.pc-title { font-size: 14px; font-weight: 600; line-height: 1.25; }
.pc-type { font-size: 12px; color: var(--text-2); }
.pcard .chip { align-self: flex-start; margin-top: 2px; }
.drop-preview { position: absolute; inset-inline: 6px; border-radius: 10px; border: 2px dashed var(--accent); background: var(--accent-soft); pointer-events: none; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--accent-text); z-index: 1; }

.week { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.is-desk .week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wday { min-height: 64px; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--line); }
.is-desk .wday { min-height: 380px; }
.wday.is-today { border-color: var(--accent); }
.wday.is-today .wday-head > span:first-child { color: var(--accent-text); }
.wday.drop-over { background: var(--accent-soft); border-color: var(--accent); }
.wday-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; width: 100%; text-align: start; }
.wchip { padding: 7px 9px; border-radius: 8px; background: var(--surface-2); font-size: 13px; line-height: 1.3; display: flex; flex-direction: column; cursor: grab; }
.wchip-head { font-weight: 600; }
.wchip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wchip.is-done, .mchip.is-done { opacity: .65; }

.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mhead { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px; }
.mcell { min-height: 76px; min-width: 0; padding: 3px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; overflow: hidden; cursor: pointer; }
.is-desk .mcell { min-height: 112px; padding: 4px; }
.mcell.is-out { opacity: .5; }
.mcell.is-today { border-color: var(--accent); }
.mcell.drop-over { background: var(--accent-soft); border-color: var(--accent); }
.mday { align-self: flex-start; min-width: 28px; min-height: 28px; padding: 0 4px; border-radius: 6px; font-size: 12px; font-weight: 500; text-align: start; }
.mcell.is-today .mday { color: var(--accent-text); font-weight: 700; }
.mchip { padding: 3px 5px; border-radius: 4px; background: var(--surface-2); font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; min-height: 22px; }
.mmore { font-size: 11px; color: var(--text-2); padding: 0 2px; }

[data-drag-job] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.is-dragged { opacity: .35; }
.drag-ghost { position: fixed !important; top: 0 !important; left: 0 !important; inset-inline: auto !important; z-index: 100; pointer-events: none; opacity: .95; box-shadow: var(--shadow); border-color: var(--accent) !important; background: var(--surface) !important; transition: none; }
html.dragging, html.dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }

/* Mein Tag */
.my { padding: 8px 20px 32px; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.is-desk .my { padding: 24px 40px 48px; }
.my-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.my-title { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.my-title .sub { font-size: 17px; }
.my-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-top: 4px; }
.my-hello { min-width: 0; }
.my-hello .sub { margin: 0; }
.my-date-h { font-size: 24px; margin-top: 2px; }
.my-date { font-size: 15px; color: var(--text-2); }
.my-tools { display: flex; gap: 2px; align-items: center; flex: none; }
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 4px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); }
.who:hover { border-color: var(--accent); }
.who-name { font-size: 16px; font-weight: 500; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.pin-who { display: flex; align-items: center; gap: 12px; }
.pin-name { font-size: 20px; font-weight: 600; }
.pin-dots { display: flex; gap: 16px; }
.pin-dot { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--text); }
.pin-dot.is-on { background: var(--text); }
.keypad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.key { width: 76px; height: 76px; border-radius: 38px; background: var(--surface); font-size: 26px; font-weight: 500; text-align: center; }
.key:active { background: var(--accent-soft); }
.key-del { background: transparent; }
.info { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.info-line { display: flex; gap: 12px; font-size: 16px; line-height: 1.4; }
.info-line dt { flex: none; width: 112px; color: var(--text-2); }
.info-line dd { margin: 0; min-width: 0; }
.hints { display: flex; flex-direction: column; gap: 8px; }
.hints .note-box { font-size: 15px; }
.pack-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 4px; }
.pack .check-row { min-height: 52px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; }
.my-jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.my-job { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); width: 100%; text-align: start; }
.my-job:hover { border-color: var(--accent); }
.mj-clock { flex: none; font-size: 20px; font-weight: 600; min-width: 56px; }
.mj-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mj-main .muted { font-size: 15px; }
.mj-title { font-size: 17px; font-weight: 600; }
.mj-foot { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.mj-head { display: flex; flex-direction: column; gap: 6px; }
.mj-head h1 { font-size: 26px; }
.mj-range { font-size: 16px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 14px; font-weight: 600; padding: 8px 4px; text-align: center; line-height: 1.25; }
.tile .ic { font-size: 26px; color: var(--accent); }
.tile:hover { background: var(--surface-2); }
.timer { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--st-unterwegs-fg); background: var(--st-unterwegs-bg); padding: 10px 14px; border-radius: var(--r-m); margin-top: -8px; }
.finish { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

/* Chat */
.my.is-chat { min-height: calc(100dvh - 60px); }
.chat { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 86%; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-radius: 18px; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble.me { background: var(--accent); color: var(--on-accent); }
.bubble.bot { background: var(--surface); border: 1px solid var(--line); }
.pre { white-space: pre-line; }
.job-bubble { gap: 4px; min-width: 240px; }
.jb-top { display: flex; align-items: center; gap: 8px; }
.jb-time { font-weight: 600; }
.jb-title { font-weight: 600; }
.job-bubble .muted { font-size: 15px; }
.bubble-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.bchip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 600; }
.chat-bar { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 0 calc(4px + var(--safe-b)); background: var(--bg); }
.is-mobile.has-nav .chat-bar { bottom: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: 8px; }
.chat-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.chat-chips::-webkit-scrollbar { display: none; }
.qchip { flex: none; white-space: nowrap; }
.qchip { min-height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent-text); font-size: 16px; font-weight: 600; }
.qchip:hover { background: var(--accent-soft); }
.chat-input { display: flex; gap: 8px; align-items: center; }
.chat-input .input { min-height: 48px; border-radius: 24px; }

/* Blätter */
#sheet-root:empty { display: none; }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(12, 16, 8, .42); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 20px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 20px; box-shadow: var(--shadow); }
.grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); flex: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-titles { min-width: 0; }
.sheet-titles .sub { font-size: 14px; margin-top: 2px; }
.sheet-body { display: flex; flex-direction: column; gap: 20px; }
.more-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 16px; }
@media (min-width: 1024px) {
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet { max-width: 520px; border-radius: var(--r-l); padding-bottom: 28px; }
  .sheet-wide { max-width: 720px; }
  .grab { display: none; }
}

#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); z-index: 60; width: max-content; max-width: min(440px, calc(100vw - 32px)); padding: 14px 18px; border-radius: var(--r-m); background: var(--text); color: var(--bg); font-size: 15px; font-weight: 500; line-height: 1.4; text-align: center; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast:empty { display: none; }
@media (min-width: 1024px) { #toast { bottom: 24px; } }

/* Papier-Vorschau im Blatt */
.paper { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #1B2414; padding: 20px; box-shadow: var(--shadow); font-size: 12px; overflow-x: auto; }

/* ---------- Dokument (Angebot, Bericht) ---------- */
.doc { font-family: var(--font); color: #1B2414; font-size: 11pt; line-height: 1.45; }
.paper .doc { font-size: 12px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.doc-logo { width: 150px; height: auto; }
.paper .doc-logo { width: 120px; }
.doc-sender { font-size: 9pt; color: #4D5646; text-align: end; }
.paper .doc-sender { font-size: 11px; }
.doc-addr { display: flex; flex-direction: column; margin-bottom: 8px; }
.doc-small { display: block; font-size: 9pt; color: #4D5646; }
.paper .doc-small { font-size: 11px; }
.doc-date { text-align: end; color: #4D5646; margin-bottom: 20px; }
.doc-title { font-size: 18pt; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 2px; }
.paper .doc-title { font-size: 18px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.doc-table th { font-size: 9pt; font-weight: 600; color: #4D5646; text-align: start; padding: 6px 0; border-bottom: 1px solid #1B2414; }
.paper .doc-table th { font-size: 11px; }
.doc-table td { padding: 7px 0; border-bottom: 1px solid #D9DDCD; vertical-align: top; }
.doc-table .r { text-align: end; padding-inline-start: 12px; white-space: nowrap; }
.doc-table tfoot td { border: 0; padding: 3px 0; }
.doc-total td { font-weight: 700; font-size: 12pt; padding-top: 6px !important; }
.paper .doc-total td { font-size: 13px; }
.doc-note { margin-bottom: 12px; }
.doc-foot { margin-top: 32px; padding-top: 10px; border-top: 1px solid #D9DDCD; font-size: 8.5pt; color: #4D5646; }
.paper .doc-foot { font-size: 10px; }
.doc-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; margin: 20px 0; }
.doc-dl dt { color: #4D5646; }
.doc-dl dd { margin: 0; }
.doc-sec { margin-top: 18px; }
.doc-sec h2 { font-size: 12pt; font-weight: 700; margin-bottom: 4px; }
.doc-sec ul { margin: 0; padding-inline-start: 18px; }
.doc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

#print-root { display: none; }
@media print {
  @page { size: A4; margin: 16mm 18mm; }
  html, body { background: #fff !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .doc { color: #000; }
  .doc-photos, .doc-sec { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
