:root {
    color-scheme: light;
    --forest: #1c3429;
    --pine: #263d31;
    --olive: #cbd2b5;
    --ink: #202b24;
    --quiet: #536156;
    --paper: #f8f6ef;
    --white: #fffefa;
    --line: #dedfd2;
    --radius: 14px;
    font: 16px/1.52 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--forest); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #667e47; outline-offset: 3px; }
h1, h2, p { margin: 0 0 .65rem; }
h1 { font: 600 clamp(2.2rem, 5vw, 3.55rem)/1.05 Georgia, serif; letter-spacing: -.065em; overflow-wrap: anywhere; }
h2 { font: 600 clamp(1.45rem, 2.5vw, 2rem)/1.15 Georgia, serif; letter-spacing: -.038em; overflow-wrap: anywhere; }
small, .small { font-size: .83rem; }
.muted { color: var(--quiet); }
.eyebrow { font-size: .76rem; font-weight: 750; letter-spacing: .115em; text-transform: uppercase; }
.skip { position: absolute; z-index: 2; left: 1rem; top: -6rem; background: var(--white); padding: 1rem; }
.skip:focus { top: .5rem; }
.workspace-body, .auth-body { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar, .auth-intro { color: #f8f7e9; background: var(--forest); display: flex; flex-direction: column; }
.sidebar { padding: 1.55rem 1rem; min-height: 100vh; position: sticky; top: 0; align-self: start; }
.brand { display: block; width: 100%; border-radius: 9px; overflow: hidden; background: white; }
.brand img { display: block; width: 100%; height: auto; }
.sidebar .brand { max-width: 216px; }
.sidebar nav { display: grid; gap: .22rem; margin-block: 2.1rem; }
.sidebar nav a { display: block; padding: .66rem .72rem; border-radius: 7px; text-decoration: none; color: #e1e7d7; font-size: .92rem; font-weight: 580; }
.sidebar nav a:hover, .sidebar nav [aria-current] { color: white; background: #354c3d; }
.account-footer { margin-top: auto; border-top: 1px solid #5c6b5b; padding: 1.1rem .6rem 0; color: #e1e7d7; }
.account-name { font-weight: 650; overflow-wrap: anywhere; }
.signout { background: transparent; color: inherit; text-decoration: underline; border: 0; padding: .35rem 0; }
.workspace { width: 100%; max-width: 1450px; padding: clamp(1.25rem, 4vw, 3.85rem); margin-inline: auto; min-width: 0; }
.auth-body { grid-template-columns: minmax(310px, .95fr) minmax(0, 1fr); }
.auth-intro { padding: clamp(1.4rem, 5vw, 4.8rem); justify-content: space-between; min-height: 100vh; }
.auth-intro .brand { max-width: 32rem; }
.auth-intro .eyebrow { color: var(--olive); }
.auth-headline { font: 500 clamp(3.1rem, 6vw, 6.5rem)/.99 Georgia, serif; letter-spacing: -.07em; margin: 0 0 1.4rem; }
.auth-caption { color: #dbe0ce; font-size: 1.08rem; max-width: 31ch; }
.auth-main { align-self: center; padding: clamp(1.4rem, 5vw, 4.5rem); display: grid; justify-content: center; grid-template-columns: minmax(0, 420px); }
.auth-panel .fields { margin-top: 1.5rem; }
.auth-links { display: grid; gap: .5rem; margin-top: 1.5rem; font-size: .9rem; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.4rem; gap: 1rem; flex-wrap: wrap; }
.page-heading h1, .page-heading p:last-child { margin-bottom: 0; }
.back { display: inline-block; margin-bottom: .55rem; font-size: .88rem; }
.dashboard-banner { padding: clamp(1.35rem, 3.5vw, 2.6rem); min-height: 155px; border-radius: var(--radius); background: var(--pine); color: #fffef5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.dashboard-banner .eyebrow { color: var(--olive); }
.dashboard-banner h2 { font-size: clamp(1.9rem, 4vw, 3.05rem); }
.dashboard-banner p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.2rem; }
.stat { border: 1px solid var(--line); border-radius: 11px; background: var(--white); padding: .9rem 1.05rem; display: grid; color: var(--quiet); font-size: .83rem; }
.stat strong { margin-top: .5rem; font: 600 2.25rem/1 Georgia, serif; color: var(--forest); }
.panel, .paper { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.6vw, 1.7rem); margin: 0 0 1rem; min-width: 0; }
.narrow { max-width: 650px; }
.split, .input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.rows { list-style: none; margin: .7rem 0 1rem; padding: 0; }
.rows li { border-top: 1px solid var(--line); }
.rows a, .row-static { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: .82rem 0; text-decoration: none; overflow-wrap: anywhere; }
.rows a:hover strong { text-decoration: underline; }
.rows time { font-variant-numeric: tabular-nums; font-size: .83rem; white-space: nowrap; }
.rows small { display: block; color: var(--quiet); }
.row-main { flex: 1; }
.badge { display: inline-block; border-radius: 99px; padding: .25rem .62rem; background: #e9ebe2; color: #38493e; font-size: .78rem; line-height: 1.25; }
.badge.confirmed, .badge.accepted { background: #dbe9d8; color: #25462a; }
.badge.draft, .badge.pending { background: #f6ead0; color: #57431f; }
.badge.declined { background: #f1e1dd; color: #652f23; }
.fields { display: grid; gap: .88rem; }
.fields > .button { justify-self: start; }
.auth-panel .fields > .button { justify-self: stretch; }
.field { display: grid; gap: .28rem; font-size: .87rem; font-weight: 650; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #b4bfad; border-radius: 7px; background: white; color: var(--ink); padding: .64rem .7rem; }
textarea { resize: vertical; }
button { cursor: pointer; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.button { display: inline-flex; text-align: center; align-items: center; justify-content: center; min-height: 42px; border: 1px solid var(--forest); border-radius: 7px; background: var(--forest); color: white; padding: .53rem .9rem; font-weight: 680; font-size: .91rem; text-decoration: none; }
.button:hover { filter: brightness(1.15); }
.button-outline { color: var(--forest); background: var(--white); border-color: #9da99b; }
.button-light { color: var(--forest); background: #f4f4e8; border-color: #f4f4e8; }
.button-small { min-height: 33px; padding: .34rem .55rem; font-size: .82rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .2rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .6rem .13rem; text-decoration: none; border-bottom: 2px solid transparent; font-size: .9rem; }
.tabs a[aria-current] { border-color: var(--forest); font-weight: 720; }
.details { margin: 0; overflow-wrap: anywhere; }
.details > div { border-top: 1px solid var(--line); padding: .6rem 0; }
.details dt { font-size: .82rem; font-weight: 710; color: var(--quiet); }
.details dd { margin: .15rem 0 0; white-space: pre-wrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; overflow-wrap: anywhere; }
th, td { padding: .55rem .45rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { font-size: .83rem; color: var(--quiet); }
.message { margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 8px; }
.message.error { background: #f1dfd9; color: #6b2819; }
.message.success { background: #e2ebdb; color: #284727; }
.message.note { background: #efe6cf; color: #3f3a2a; }
.auth-panel form + form { margin-top: .75rem; }
.paper { max-width: 210mm; margin-inline: auto; padding: clamp(1rem, 5vw, 3rem); }
.paper header { border-bottom: 2px solid currentcolor; margin-bottom: 1rem; }
.paper footer { display: flex; flex-wrap: wrap; gap: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: 1rem; font-size: .84rem; }
.preview-domain { margin-inline-start: auto; }
.print-domain { display: none; }
.draft-feedback [hidden] { display: none; }
.contact-lines { white-space: pre-line; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: .8rem 1rem 1rem; }
legend { font-size: .91rem; font-weight: 700; }
.checklist { display: flex; flex-wrap: wrap; gap: .7rem 1.15rem; }
.checklist label { display: flex; gap: .35rem; align-items: baseline; }
.checklist label[hidden] { display: none; }
.checklist input { width: auto; }
.arrival-map { position: relative; height: clamp(340px, 59vh, 620px); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #e9ebe2; }
.arrival-toolbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: .8rem; }
.arrival-panel { margin-top: 1rem; }
.arrival-print-title { display: none; }
.arrival-map.is-placing-marker .ol-viewport { cursor: crosshair; }
[data-remove-point][hidden], [data-remove-area][hidden], [data-finish-area][hidden] { display: none; }
.panel details > summary { cursor: pointer; font-weight: 650; }
.panel details > form { margin-top: .8rem; }
.vehicle-paper { text-align: center; }
.vehicle-number { font: 800 clamp(5rem, 20vw, 12rem)/1 system-ui, sans-serif; margin: 2rem 0; }
@media (max-width: 930px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .workspace-body, .auth-body { display: block; }
    .sidebar, .auth-intro { position: static; min-height: 0; padding: 1rem 1.2rem; }
    .auth-intro .brand { max-width: 22rem; align-self: center; }
    .sidebar nav { display: flex; flex-wrap: wrap; margin-block: .75rem .25rem; }
    .sidebar nav a { padding: .42rem .5rem; font-size: .83rem; }
    .account-footer { border-top: 0; margin-top: .35rem; padding: 0; display: flex; gap: 1rem; align-items: center; font-size: .79rem; }
    .auth-intro > div { display: none; }
    .split, .input-grid { grid-template-columns: minmax(0, 1fr); }
}
@page { size: A4; margin: 14mm 14mm 21mm; }
@media print {
    :root { background: white; color: black; font-size: 11pt; }
    .sidebar, .skip, .no-print, .preview-domain { display: none !important; }
    .print-domain { display: block; position: fixed; right: 0; bottom: 0; font-weight: 700; }
    .workspace-body, .workspace { display: block; min-height: 0; margin: 0; padding: 0; }
    .paper {
        margin: 0;
        border: 0;
        border-radius: 0;
        padding: 0 0 8mm;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
        color: black;
    }
    .paper + .paper { break-before: page; }
    .paper table { table-layout: fixed; }
    .paper th, .paper td { color: black; border-color: #aaa; }
    .paper thead { display: table-header-group; }
    .paper tr, .paper header { break-inside: avoid; }
    .vehicle-number { font-size: 130pt; }
    .arrival-print-title { display: revert; }
    .arrival-heading { margin-bottom: 4mm; }
    .arrival-sheet { padding: 0; border: 0; background: white; }
    .arrival-sheet .table-scroll { overflow: visible; }
    .arrival-sheet table { table-layout: fixed; }
    .arrival-sheet thead { display: table-header-group; }
    .arrival-sheet tr { break-inside: avoid; }
    .arrival-map { height: 104mm; break-inside: avoid; print-color-adjust: exact; }
    .arrival-map .ol-zoom, .arrival-map .ol-rotate { display: none; }
}

.full-only { display: contents; }
[data-full-only][hidden] { display: none !important; }
.legal-links { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .8rem 0 0; }
.legal-links a { color: inherit; opacity: .8; }
.legal-body { min-height: 100vh; }
.legal-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); }
.legal-top .brand { width: 200px; }
.legal-top nav { display: flex; gap: 1rem; }
.legal { max-width: 800px; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 2rem) 4rem; }
.legal h2 { font-size: 1.2rem; margin: 1.8rem 0 .4rem; }
.legal p, .legal li { max-width: 70ch; }
.invoice-table { margin: 1.2rem 0; }
.invoice-table td:last-child, .invoice-table th:last-child { text-align: right; white-space: nowrap; }

/* Zwei-Faktor-Einrichtung */
.qr-box { width: 14rem; max-width: 100%; margin: 1rem 0; border: 1px solid #c9d0c7; border-radius: .5rem; overflow: hidden; background: #fff; }
.qr-box svg { display: block; width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .4rem .8rem; padding: 0; list-style: none; }
.recovery-codes code { font-size: 1.05rem; letter-spacing: .04em; }
