:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #17263c;
  background: #f1f4f9;
  --blue: #143979;
  --line: #dbe2ee;
  --muted: #53647c;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #165fcc; outline-offset: 3px; }
.site-head { min-height: 72px; padding: 15px max(16px, calc((100vw - 1200px)/2)); background: white; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.brand, .identity { display: flex; align-items: center; gap: 16px; }
.brand { color: inherit; text-decoration: none; font-weight: 700; }
.brand img { max-width: min(28vw, 166px); height: auto; object-fit: contain; }
.identity small, .status small { display: block; color: var(--muted); }
.identity { min-width: 0; }
.profile-name { min-width: 0; overflow-wrap: anywhere; }
main { width: min(100% - 32px, 1200px); margin: 20px auto 48px; }
.pilot-note { color: #6f3e00; background: #fff0d6; border: 1px solid #efcf96; border-radius: 7px; padding: 8px 14px; margin-bottom: 18px; font-size: .93rem; font-weight: 600; }
.layout { display: grid; grid-template-columns: minmax(270px, 355px) minmax(0, 1fr); align-items: start; gap: 18px; }
.workspace { min-width: 0; display: grid; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.access { max-width: 430px; margin: 45px auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.section-top, .actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.section-top h1, .section-top h2 { margin-bottom: 0; }
.section-top { margin-bottom: 13px; }
.actions { justify-content: flex-start; flex-wrap: wrap; }
.segments { display: flex; gap: 8px; margin-bottom: 12px; }
.segments a { text-decoration: none; padding: 5px 11px; border-radius: 6px; }
.segments [aria-current] { color: #fff; background: var(--blue); }
.queue ul, .event-list { list-style: none; padding: 0; margin: 0; }
.order-row { color: inherit; text-decoration: none; padding: 11px 6px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; align-items: center; overflow-wrap: anywhere; }
.order-row.selected, .order-row:hover { background: #eef5ff; }
.order-row span:not(.badge), .sub { display: block; font-size: .88rem; color: var(--muted); }
.status { text-align: right; flex-shrink: 0; }
.badge { font-size: .75rem; background: #e8edf6; font-weight: 700; padding: 4px 7px; border-radius: 5px; display: inline-block; }
.badge.loading, .badge.booked { color: #154982; background: #dfeeff; }
.badge.complete { color: #185139; background: #deefe5; }
.badge.cancelled, .badge.closed_short { color: #79312a; background: #faeae6; }
.flash { border-radius: 7px; padding: 9px 12px; color: #185139; background: #e4f1e8; }
.flash.error { color: #862b21; background: #fcebe8; }
.empty { color: var(--muted); padding: 14px 4px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 18px; gap: 11px; overflow-wrap: anywhere; }
.facts dt { color: var(--muted); font-size: .86rem; }
.facts dd { margin: 1px 0 0; font-weight: 650; }
form:not(.inline) { display: grid; gap: 11px; }
form.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; }
input, select, button { font: inherit; }
input:not([type=checkbox]), select { width: 100%; border-radius: 6px; border: 1px solid #a5b2c6; min-height: 43px; padding: 7px 8px; color: inherit; background: white; }
button, a.quiet { display: inline-block; justify-self: start; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--blue); font-size: .93rem; font-weight: 650; background: var(--blue); color: white; cursor: pointer; text-decoration: none; }
.quiet, a.quiet { background: white; color: var(--blue); border-color: #9aa9c3; }
.check { display: flex; align-items: center; gap: 8px; }
input[type=checkbox] { width: 18px; height: 18px; }
article section, details { margin-top: 17px; border-top: 1px solid var(--line); padding-top: 14px; }
summary { color: var(--blue); cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: 10px; }
.profile-menu { position: relative; flex: none; margin: 0; padding: 0; border: 0; }
.profile-menu > summary { display: grid; place-items: center; list-style: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 7px; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.profile-menu[open] > summary { margin: 0; background: #eef5ff; }
.profile-menu[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.profile-options { position: absolute; z-index: 2; right: 0; top: calc(100% + 6px); min-width: 155px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px #17263c24; background: white; }
.profile-menu:not([open]) > .profile-options { display: none; }
.profile-options a, .profile-options button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: white; color: var(--blue); text-align: left; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.profile-options a:hover, .profile-options button:hover, .profile-options [aria-current] { background: #eef5ff; }
.logistics-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 325px), 1fr)); gap: 18px; align-items: start; }
.logistics-board time { font-size: .86rem; }
.event-list li { padding-bottom: 9px; overflow-wrap: anywhere; }
.bol { max-width: 680px; margin: 20px auto; }
.test-label { color: #8f2017; font-weight: 800; }
.user-actions { margin-top: 11px; }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-list li { border-top: 1px solid var(--line); padding: 13px 0; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: start; gap: 12px; overflow-wrap: anywhere; }
.user-list .sub { margin-bottom: 4px; }
.user-list details { margin: 0; padding: 0; border: 0; }
.user-list .remove-user { color: #862b21; }
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .brand, .identity { gap: 8px; }
  .brand span { line-height: 1.12; font-size: .83rem; }
  .identity { font-size: .8rem; }
  .identity small { font-size: .72rem; }
  .card { padding: 14px; }
}
@media (max-width: 430px) { form.grid { grid-template-columns: 1fr; } }
@media print {
  body { background: white; }
  .site-head, .pilot-note, .no-print { display: none; }
  .bol { border: 0; margin: 0; max-width: none; }
}
