@font-face { font-family: Inter; src: url('/static/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('/static/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('/static/fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: JetBrains; src: url('/static/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: JetBrains; src: url('/static/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
:root { --navy: #0A1633; --blue: #1E3D6E; --grey-blue: #8294A8; --peach: #EBAE7E; --orange: #E66C27; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f8f6f3; color: var(--navy); font: 16px/1.5 Inter, sans-serif; }
header { background: var(--navy); color: white; display: flex; align-items: center; gap: 1rem; padding: .8rem max(1rem, calc((100% - 72rem) / 2)); }
header h1 { font-size: 1.15rem; margin: 0 auto 0 0; }
header span { overflow-wrap: anywhere; }
header button { background: transparent; color: white; border: 1px solid var(--grey-blue); }
.dusk { height: 5px; background: linear-gradient(90deg, var(--navy), var(--blue), var(--grey-blue), var(--peach), var(--orange)); }
main { max-width: 74rem; margin: 0 auto; padding: 2rem 1rem 4rem; min-width: 0; }
h2 { font-size: 1.6rem; margin: 0 0 1.25rem; }
h3 { margin-top: 0; }
a { color: var(--blue); font-weight: 600; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .btn { min-height: 44px; padding: .6rem 1rem; border: 1px solid var(--grey-blue); border-radius: 5px; cursor: pointer; }
button { background: white; color: var(--blue); font-weight: 600; }
button:hover, .btn-outline:hover { background: #edf1f5; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn-primary:hover { background: var(--navy); }
.btn-outline { background: white; color: var(--blue); border-color: var(--blue); }
.card, .table-card { background: white; border: 1px solid #dce1e6; border-radius: 6px; }
.card { padding: 1.5rem; margin: 0 0 1.25rem; max-width: 48rem; overflow-wrap: anywhere; }
.grounded-card { background: #fbe9da; max-width: none; margin-top: 1.5rem; }
.notice { background: #fbe9da; border-left: 4px solid var(--orange); border-radius: 4px; padding: 1rem; max-width: 48rem; overflow-wrap: anywhere; }
.toolbar { display: flex; align-items: end; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar form { display: flex; align-items: end; gap: .5rem; margin-right: auto; }
label { display: block; font-weight: 600; margin: 0 0 1rem; }
.toolbar label { margin: 0; }
label > input:not([type=radio]), label > select, label > textarea { display: block; width: 100%; max-width: 32rem; margin-top: .35rem; padding: .6rem .75rem; border: 1px solid var(--grey-blue); border-radius: 5px; background: white; color: var(--navy); min-height: 44px; }
textarea { min-height: 7rem; resize: vertical; overflow-wrap: anywhere; }
fieldset { border: 1px solid #dce1e6; border-radius: 5px; min-width: 0; margin: 0 0 1rem; }
fieldset label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0 1rem 0 0; }
fieldset label:last-child { display: block; }
input[type=radio] { width: 1.2rem; height: 1.2rem; accent-color: var(--blue); }
#van-results button { display: block; width: 100%; text-align: left; }
#fleet-status, #selected-van { overflow-wrap: anywhere; }
.table-card { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
/* Plates, dates and day counts never break; the free-text columns take the remaining width. */
td:has(> .mono), td:has(> .days), td.mono { white-space: nowrap; }
th, td { padding: .85rem .75rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; border-bottom: 1px solid #e6eaee; }
th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #596e84; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f3f6f9; }
.table-card > p { padding: 0 1rem; color: #596e84; }
.mono, .days { font-family: JetBrains, monospace; font-variant-numeric: tabular-nums; }
/* An underline through the spaces of a monospace plate reads like underscores; underline on hover only. */
a.mono { text-decoration: none; }
a.mono:hover { text-decoration: underline; }
.days { display: inline-block; font-weight: 600; }
.days-alert, .chip-alert { background: var(--orange); color: var(--navy); }
.days-alert { border-radius: 4px; padding: .1rem .4rem; }
.chip { display: inline-block; border-radius: 4px; padding: .25rem .5rem; font-size: .8rem; font-weight: 600; }
.chip-muted { background: #e6ecf1; color: var(--navy); }
.muted { color: #596e84; }
@media (max-width: 599px) {
    header { flex-wrap: wrap; }
    main { padding-top: 1.5rem; }
    .toolbar form { width: 100%; }
    .toolbar label { flex: 1; min-width: 0; }
    .card { padding: 1rem; }
    .table-card { background: transparent; border: 0; overflow: visible; }
    table, tbody, tr, td { display: block; width: 100%; }
    thead { display: none; }
    tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; background: white; border: 1px solid #dce1e6; border-radius: 6px; padding: .75rem; margin-bottom: .75rem; }
    td { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .5rem; padding: .4rem 0; border: 0; min-width: 0; }
    td:nth-child(1) { grid-column: 1; grid-row: 1; display: block; }
    td:nth-child(5) { grid-column: 2; grid-row: 1; display: block; }
    td:not(:nth-child(1)):not(:nth-child(5)) { grid-column: 1 / -1; }
    td:nth-child(2)::before { content: 'Grund'; }
    td:nth-child(3)::before { content: 'Wo'; }
    td:nth-child(4)::before { content: 'Seit'; }
    td:nth-child(6)::before { content: 'Stand'; }
    td:nth-child(7)::before { content: 'Portal'; }
    td::before { color: #596e84; font-size: .8rem; font-weight: 600; font-family: Inter, sans-serif; }
    /* On a card the day count stands alone in the corner, so it needs its unit; the chip keeps its own width. */
    .days::after { content: ' Tage'; }
    td .chip { justify-self: start; }
}

/* Vehicle search: the matches read as a list, and the picker block keeps its distance from „Grund“. */
#picker,
#manual-fields { margin-bottom: 1rem; }
#van-results button { display: block; width: 100%; text-align: left; border-radius: 0; margin-top: -1px; }
#van-results button:first-child { border-radius: 5px 5px 0 0; }
#van-results button:last-child { border-radius: 0 0 5px 5px; }
#van-results button:only-child { border-radius: 5px; }

/* Change history: one card per save, the changed fields as a plain list inside. */
.history { list-style: none; padding: 0; margin: 0; }
.history > li { margin-bottom: .75rem; }
.history-who { margin: 0 0 .5rem; font-weight: 600; color: var(--navy); }
.history ul { margin: 0; padding-left: 1.1rem; color: #3d4f63; overflow-wrap: anywhere; }

header h1 a { color: inherit; text-decoration: none; }
header h1 a:hover, header h1 a:focus-visible { text-decoration: underline; }
