:root { --fg: #1d1d1f; --muted: #666; --accent: #1f5fbf; --err: #b00020; --line: #d0d4da; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: #f6f7f9; }
nav.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); }
nav.top a { color: var(--accent); text-decoration: none; font-weight: 600; }
nav.top form { margin-left: auto; }
nav.top button { background: none; color: var(--accent); padding: 0; font-weight: 600; }
main { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; }
form.issue { display: grid; gap: 10px; background: #fff; padding: 20px; border: 1px solid var(--line); border-radius: 8px; }
form.issue label { font-weight: 600; }
input, select, button { font: inherit; padding: 6px 8px; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; cursor: pointer; }
.hint { color: var(--muted); font-size: 14px; margin: 0; }
.errors, .errorlist { color: var(--err); }
.errors { background: #fff0f2; border: 1px solid #f3c2ca; padding: 10px 16px; border-radius: 8px; }
#qr-preview { max-width: 160px; border: 1px solid var(--line); }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; font-size: 14px; }
form.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.pager { margin-top: 12px; display: flex; gap: 12px; }
ul.warnings { max-height: 320px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 28px; font-size: 14px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
a.button { display: inline-block; background: var(--accent); color: #fff; border-radius: 6px; padding: 8px 14px; text-decoration: none; font-weight: 600; }
a.button.small { padding: 3px 10px; font-size: 13px; }
td.actions { white-space: nowrap; text-align: right; }
td.actions a { margin-left: 8px; }
.missing { color: var(--err); }
tr.inactive td { color: var(--muted); }
.message { background: #eefaf0; border: 1px solid #b9e2c2; color: #1d5b2c; padding: 8px 14px; border-radius: 8px; margin-bottom: 12px; }
label.check { font-weight: normal; display: flex; gap: 6px; align-items: center; }
form.issue input[type=search] { max-width: 360px; }
.nowrap { white-space: nowrap; }
form.issue { max-width: 760px; }
form.issue input:not([type=checkbox]):not([type=file]), form.issue select { width: 100%; max-width: 100%; min-width: 0; }
form.issue > * { min-width: 0; }
.page-head { flex-wrap: wrap; }
@media (max-width: 700px) {
  main { padding: 0 10px; margin: 12px auto; }
  table.list { display: block; overflow-x: auto; }
  form.issue { padding: 12px; }
}
.combobox { position: relative; min-width: 0; }
.combobox-list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; max-height: 280px; overflow-y: auto; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.combobox-list li { padding: 6px 10px; cursor: pointer; font-size: 14px; }
.combobox-list li.active, .combobox-list li:hover { background: #eaf1fc; }
.combobox-list li.empty { color: var(--muted); cursor: default; }
.combobox input { width: 100%; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f1f5fb; }
table.list td a { color: inherit; text-decoration: none; }
table.list td a:hover { text-decoration: underline; }
table.list td.actions a.button { color: #fff; }
table.list.compact td, table.list.compact th { padding: 5px 6px; }
tr.active-row td { background: #eefaf0; }
.center { text-align: center; }
.badge { display: inline-block; border-radius: 10px; padding: 1px 9px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; }
.badge.yellow { background: #ffd83d; border-color: #e6bd00; color: #4a3b00; }
.badge.white { background: #fff; color: var(--fg); }
.badge.unknown { background: #f1f1f1; color: var(--muted); }
.badge.active { background: #e3f5e7; border-color: #9fd6ab; color: #1d5b2c; }
.head-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
a.button.secondary, summary.button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.button.disabled { display: inline-block; background: #c9cfd8; color: #fff; border-radius: 6px; padding: 8px 14px; font-weight: 600; cursor: not-allowed; }
summary.button { display: inline-block; list-style: none; cursor: pointer; border-radius: 6px; padding: 8px 14px; font-weight: 600; }
summary.button::-webkit-details-marker { display: none; }
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; min-width: 0; }
.panel h2 { font-size: 17px; margin: 0 0 10px; }
dl.props { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0 0 14px; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; }
.qr-thumb { width: 110px; border: 1px solid var(--line); border-radius: 4px; }
.add-driver { margin-top: 12px; }
.add-driver form { margin-top: 10px; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: normal; }
button.link.danger { color: var(--err); }
.car-panel { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; background: #fafbfc; }
.car-panel p { margin: 4px 0 0; }
.car-panel a { font-weight: 600; color: var(--fg); }
.qr-block { display: grid; gap: 8px; }
form.issue #id_body_color { display: flex; flex-wrap: wrap; gap: 6px 18px; }
form.issue #id_body_color label { font-weight: normal; }
@media (max-width: 800px) { .card-grid { grid-template-columns: 1fr; } }
td.doc-buttons { white-space: nowrap; }
td.doc-buttons form { display: inline-block; margin: 2px 2px 2px 0; }
button.small { padding: 3px 9px; font-size: 13px; }
button.secondary-btn { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
tr.wb-soon td { background: #fff4c2; }
tr.wb-expired td { background: #ffd9d6; }
tr.wb-soon td.wb-until, tr.wb-expired td.wb-until { font-weight: 700; }
tr.wb-expired td.wb-until { color: #b3261e; }
.wb-note { font-size: 12px; text-transform: uppercase; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
a.button.small { padding: 3px 9px; font-size: 13px; }
