@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --navy: #16324f;
  --navy-deep: #10263b;
  --navy-soft: #eaf0f5;
  --amber: #f2a900;
  --amber-soft: #fff5d8;
  --green: #20815b;
  --green-soft: #e9f6ef;
  --ink: #192a3b;
  --muted: #6c7b89;
  --muted-light: #9aa7b2;
  --line: #e3e9ee;
  --surface: #ffffff;
  --canvas: #f3f6f8;
  --red: #b84b43;
  --shadow: 0 8px 28px rgba(21, 42, 62, .055);
  font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 360px; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.topbar { height: 74px; padding: 0 max(26px, calc((100vw - 1460px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: #fff; box-shadow: 0 3px 12px rgba(12, 31, 49, .18); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--navy); background: var(--amber); border-radius: 7px 7px 7px 2px; }
.brand-mark svg { width: 29px; height: 29px; }
.brand-copy { display: grid; line-height: 1; gap: 5px; }
.brand-copy strong { font-size: 20px; letter-spacing: .095em; font-weight: 700; }
.brand-copy strong span { color: var(--amber); }
.brand-copy small { color: #afc2d2; font-size: 9px; letter-spacing: .19em; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 31px; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #cfdae3; font-weight: 600; font-size: 11px; letter-spacing: .13em; }
.live-indicator i, .next-label i { width: 7px; height: 7px; border-radius: 50%; background: #61d397; box-shadow: 0 0 0 4px rgba(97, 211, 151, .12); }
.today-block { min-width: 105px; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.19); display: grid; gap: 3px; text-align: right; }
.today-block span { color: #c0ced9; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; }
.today-block strong { color: #fff; font-size: 17px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.main-content { width: min(1460px, calc(100% - 52px)); margin: 0 auto; padding: 35px 0 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 25px; }
.eyebrow { margin: 0 0 8px; color: #718395; font-size: 10px; letter-spacing: .16em; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.eyebrow-line { width: 19px; height: 2px; background: var(--amber); display: inline-block; }
.eyebrow-sep { color: #b1bdc7; }
h1, h2, p { margin-top: 0; }
.page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(32px, 3.5vw, 42px); line-height: .98; letter-spacing: -.025em; }
.page-subtitle { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.button { border: 0; border-radius: 5px; min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 13px; letter-spacing: .025em; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(242,169,0,.42); outline-offset: 2px; }
.button-primary { background: var(--amber); color: #172d41; box-shadow: 0 4px 10px rgba(242,169,0,.18); }
.button-primary:hover { background: #ffc02b; box-shadow: 0 5px 14px rgba(242,169,0,.26); }
.button-primary svg { height: 18px; width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.button-secondary { background: var(--navy); color: #fff; }
.button-secondary:hover { background: var(--navy-deep); }
.button-quiet { background: #eef2f5; color: #425566; }
.button-quiet:hover { background: #e3e9ee; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 123px; padding: 16px 18px 14px; background: var(--surface); border: 1px solid #e8edf1; border-radius: 7px; box-shadow: 0 3px 12px rgba(22,50,79,.025); overflow: hidden; }
.metric-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy); opacity: .85; }
.metric-waiting::before { background: var(--amber); }
.metric-service::before { background: var(--green); }
.metric-done::before { background: #82909c; }
.metric-label { color: #778796; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.metric-value-row { display: flex; align-items: center; justify-content: space-between; margin: 5px 0 3px; }
.metric-value-row strong { color: var(--navy); font-size: 32px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-card small { color: #8b98a3; font-size: 11px; }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; }
.metric-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-navy { background: var(--navy-soft); color: var(--navy); }
.icon-amber { background: var(--amber-soft); color: #a86c00; }
.icon-green { background: var(--green-soft); color: var(--green); }
.icon-slate { background: #eff2f4; color: #647482; }
.operations-layout { display: grid; grid-template-columns: minmax(0, 1fr) 298px; gap: 17px; align-items: start; }
.panel { background: var(--surface); border: 1px solid #e4eaf0; border-radius: 7px; box-shadow: var(--shadow); }
.queue-panel { min-width: 0; overflow: hidden; }
.panel-heading { padding: 19px 20px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-title-row { display: flex; align-items: center; gap: 10px; }
.section-index { color: #c48b08; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.panel-title-row h2, .history-heading h2 { margin: 0; color: var(--navy); font-size: 19px; letter-spacing: -.01em; }
.panel-description { margin: 5px 0 0 25px; color: #84919c; font-size: 11px; }
.count-pill { margin-top: 1px; padding: 6px 9px; border-radius: 3px; background: #f0f3f6; color: #6c7b89; font-size: 9px; letter-spacing: .1em; font-weight: 700; white-space: nowrap; }
.count-pill span { color: var(--navy); font-size: 12px; margin-right: 3px; }
.table-tools { padding: 0 20px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.search-box { height: 35px; width: min(330px, 65%); padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #dfe6eb; border-radius: 4px; background: #fbfcfd; }
.search-box:focus-within { border-color: #9cb2c6; box-shadow: 0 0 0 2px rgba(22,50,79,.06); }
.search-box svg { flex: none; width: 16px; height: 16px; fill: none; stroke: #8998a5; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #a0abb4; }
.filter-wrap { display: flex; align-items: center; gap: 8px; }
.filter-wrap span { color: #91a0ac; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.filter-wrap select { max-width: 150px; border: 1px solid #dfe6eb; border-radius: 4px; background: #fff; padding: 7px 25px 7px 9px; color: #455867; font-size: 11px; font-weight: 600; }
.table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid #e9eef2; }
.queue-table { width: 100%; min-width: 1090px; border-collapse: collapse; text-align: left; }
.queue-table thead { background: #f7f9fa; }
.queue-table th { height: 34px; padding: 0 10px; color: #7d8c98; font-size: 9px; font-weight: 700; letter-spacing: .11em; white-space: nowrap; }
.queue-table th:first-child, .queue-table td:first-child { padding-left: 20px; }
.queue-table th:last-child, .queue-table td:last-child { padding-right: 17px; }
.queue-table td { height: 62px; padding: 8px 10px; border-top: 1px solid #edf1f4; color: #435665; font-size: 12px; vertical-align: middle; white-space: nowrap; }
.queue-table tbody tr { transition: background .15s ease; }
.queue-table tbody tr:hover { background: #fafbfd; }
.queue-table tbody tr.is-next { background: #fff8e5; }
.queue-table tbody tr.is-next:hover { background: #fff3d2; }
.queue-table tbody tr.is-service { background: #f1faf5; }
.col-position { width: 56px; }
.position-cell { color: #758695 !important; font-size: 13px !important; font-weight: 700; font-variant-numeric: tabular-nums; }
.is-next .position-cell { color: #986500 !important; }
.driver-cell { min-width: 130px; }
.driver-name { color: #22384a; font-weight: 700; font-size: 13px; }
.driver-plate { margin-top: 3px; color: #83919d; font-size: 10px; letter-spacing: .06em; }
.data-primary { color: #3b5162; font-weight: 600; font-variant-numeric: tabular-nums; }
.data-secondary { margin-top: 3px; color: #8c9aa5; font-size: 10px; }
.arrival-date, .start-date { color: #516576; font-variant-numeric: tabular-nums; }
.arrival-time, .start-time { color: #30485d; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.muted-dash { color: #adb8c0; }
.row-status { min-width: 118px; border: 1px solid #dfe6eb; border-radius: 4px; padding: 6px 22px 6px 8px; background-color: #fff; color: #40586a; font-weight: 600; font-size: 11px; }
.row-status.status-waiting { border-color: #f0d68a; background-color: #fff9e8; color: #8b6500; }
.row-status.status-service { border-color: #b8dfca; background-color: #f1faf5; color: #226f51; }
.row-action { border: 1px solid #dfe6eb; border-radius: 4px; min-height: 29px; padding: 0 8px; background: #fff; color: #4d6374; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.row-action:hover { border-color: var(--navy); color: var(--navy); }
.row-action.call-action { border-color: var(--amber); background: var(--amber); color: #1d3447; }
.row-action.call-action:hover { background: #ffc02b; }
.row-action.complete-action { border-color: #c3e0cf; color: #23704f; background: #f5fbf7; }
.col-actions { text-align: right; }
.queue-cell-actions { display: flex; justify-content: flex-end; gap: 5px; }
.empty-state { min-height: 255px; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-icon { width: 50px; height: 50px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 50%; color: #9cabb6; background: #f1f4f6; }
.empty-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-state strong { color: #43586a; font-size: 15px; }
.empty-state p { max-width: 300px; margin: 5px 0 14px; color: #8997a2; font-size: 12px; line-height: 1.5; }
.empty-state .button { min-height: 35px; font-size: 11px; }
.panel-footnote { min-height: 36px; padding: 0 20px; border-top: 1px solid #edf1f4; display: flex; align-items: center; gap: 7px; color: #778793; font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-next { background: var(--amber); }
.legend-service { margin-left: 7px; background: var(--green); }
.legend-divider { height: 13px; margin: 0 2px; border-left: 1px solid #dce3e8; }
.footnote-note { margin-left: auto; color: #a1adb6; font-size: 9px; }
.side-column { display: grid; gap: 13px; }
.next-card { min-height: 229px; padding: 15px 16px 12px; position: relative; overflow: hidden; color: #fff; background: var(--navy); border-radius: 7px; box-shadow: 0 8px 20px rgba(22,50,79,.14); }
.next-card::before { content: ''; position: absolute; right: -44px; top: 34px; width: 154px; height: 154px; border: 1px solid rgba(255,255,255,.075); border-radius: 50%; box-shadow: 0 0 0 19px rgba(255,255,255,.025), 0 0 0 39px rgba(255,255,255,.02); }
.next-card-top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; }
.next-label { display: inline-flex; align-items: center; gap: 8px; color: #d9e2e9; font-weight: 700; font-size: 10px; letter-spacing: .12em; }
.next-label i { background: var(--amber); box-shadow: 0 0 0 4px rgba(242,169,0,.17); }
.next-number { color: rgba(255,255,255,.42); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.next-content { min-height: 142px; position: relative; z-index: 1; }
.next-empty { padding: 21px 2px 16px; }
.next-empty-mark { color: rgba(255,255,255,.23); font-size: 30px; line-height: 1; font-weight: 700; }
.next-empty h2 { margin: 6px 0 5px; color: #fff; font-size: 20px; }
.next-empty p { max-width: 210px; margin: 0; color: #b7c6d1; font-size: 11px; line-height: 1.5; }
.next-driver-name { margin: 18px 0 2px; color: #fff; font-size: 23px; font-weight: 700; line-height: 1.05; }
.next-driver-plate { color: #c1d0db; font-size: 12px; letter-spacing: .08em; }
.next-driver-meta { margin-top: 12px; padding-top: 10px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.15); gap: 10px; }
.next-driver-meta span { display: block; color: #9fb3c2; font-size: 9px; letter-spacing: .1em; }
.next-driver-meta strong { display: block; margin-top: 3px; color: #fff; font-size: 12px; font-weight: 600; }
.next-card-foot { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.next-card-foot span { color: #9fb3c2; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.next-card-foot strong { color: #e6edf2; font-size: 9px; letter-spacing: .07em; }
.next-card-foot b { color: var(--amber); margin: 0 2px; }
.service-panel { overflow: hidden; }
.compact-panel-heading { min-height: 57px; padding: 11px 13px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #edf1f4; }
.service-pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #e7f5ed; }
.compact-panel-heading h2 { margin: 0; color: #30495d; font-size: 14px; }
.compact-panel-heading p { margin: 2px 0 0; color: #97a4ae; font-size: 10px; }
.compact-count { margin-left: auto; min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: #edf7f1; color: var(--green); font-size: 11px; font-weight: 700; }
.service-list { padding: 0 13px; }
.service-item { padding: 10px 0; border-bottom: 1px solid #edf1f4; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-item:last-child { border-bottom: 0; }
.service-item-name { color: #3c5365; font-weight: 700; font-size: 12px; }
.service-item-plate { margin-top: 3px; color: #91a0ab; font-size: 10px; letter-spacing: .06em; }
.service-item-time { text-align: right; color: #62806f; font-size: 10px; font-weight: 600; white-space: nowrap; }
.service-empty { padding: 14px 0; color: #98a5af; font-size: 11px; text-align: center; }
.storage-note { padding: 12px 13px; display: flex; gap: 9px; align-items: flex-start; border: 1px solid #e2e8ed; background: #f8fafb; border-radius: 6px; }
.storage-lock { color: #8394a1; }
.storage-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.storage-note strong { display: block; color: #617483; font-size: 11px; }
.storage-note p { margin: 3px 0 0; color: #94a1ab; font-size: 10px; line-height: 1.45; }
.history-panel { margin-top: 16px; overflow: hidden; }
.history-heading { padding: 15px 19px 11px; display: flex; align-items: flex-start; justify-content: space-between; }
.section-index-muted { color: #9aa9b4; }
.history-heading .panel-description { margin-left: 25px; }
.history-count { margin-top: 4px; color: #8997a2; font-size: 10px; }
.history-list { border-top: 1px solid #eef2f5; }
.history-item { min-height: 42px; padding: 8px 20px; display: grid; grid-template-columns: minmax(130px, 1.1fr) minmax(90px, .75fr) minmax(130px, 1fr) minmax(150px, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #f0f3f5; color: #71818d; font-size: 11px; }
.history-item:last-child { border-bottom: 0; }
.history-driver { color: #485e6e; font-weight: 700; }
.history-plate { color: #9aa6ae; font-size: 10px; letter-spacing: .05em; }
.history-status { justify-self: end; padding: 4px 7px; border-radius: 3px; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.history-status.done { color: #287254; background: #eaf6ef; }
.history-status.cancelled { color: #9f514c; background: #fbefee; }
.history-empty { padding: 15px 20px; border-top: 1px solid #eef2f5; color: #9aa6af; font-size: 11px; }
.app-footer { margin-top: 18px; display: flex; justify-content: space-between; color: #9aa6af; font-size: 9px; letter-spacing: .08em; }
.app-footer i { margin: 0 5px; color: var(--amber); font-style: normal; }
.footer-strong { color: #536b7d; font-weight: 700; }
.driver-dialog { width: min(570px, calc(100vw - 28px)); max-width: none; max-height: calc(100vh - 30px); padding: 0; overflow: auto; border: 1px solid #dce4ea; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px rgba(8,26,42,.28); }
.driver-dialog::backdrop { background: rgba(10, 25, 38, .58); backdrop-filter: blur(2px); }
.driver-dialog form { padding: 21px 23px 20px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid #edf1f4; }
.dialog-header h2 { margin: 0; color: var(--navy); font-size: 25px; line-height: 1; }
.dialog-header .eyebrow { margin-bottom: 7px; font-size: 9px; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 4px; background: #f1f4f6; color: #677a89; font-size: 24px; line-height: 1; }
.icon-button:hover { background: #e7edf1; }
.form-grid { padding: 17px 0 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 13px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: #526575; font-size: 11px; font-weight: 700; }
.field > span, .field-group-title { color: #526575; font-weight: 700; font-size: 11px; }
.field b, .field-group-title b { color: #c27600; }
.field-wide, .field-group { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #dce4e9; border-radius: 4px; min-height: 36px; padding: 8px 10px; outline: 0; background: #fbfcfd; color: #334a5d; font-size: 12px; font-weight: 400; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8ea7bb; background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #a8b3bc; }
.field textarea { resize: vertical; min-height: 58px; }
.field-group-title { display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px; }
.field-group-title small { color: #95a2ad; font-size: 10px; font-weight: 400; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 13px; border-top: 1px solid #edf1f4; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 32px)); padding: 11px 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; background: var(--navy-deep); color: #fff; box-shadow: 0 8px 25px rgba(10,25,38,.23); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1200px) {
  .operations-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .metrics { gap: 9px; }
  .metric-card { padding-left: 14px; padding-right: 14px; }
  .panel-footnote { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .footnote-note { width: 100%; margin-left: 14px; }
}
@media (max-width: 900px) {
  .main-content { width: min(100% - 32px, 760px); padding-top: 26px; }
  .operations-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; align-items: start; }
  .next-card { grid-row: span 2; }
  .storage-note { grid-column: 2; }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-card { min-height: 112px; }
}
@media (max-width: 600px) {
  body { min-width: 360px; }
  .topbar { height: 62px; padding: 0 15px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-mark svg { width: 25px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 8px; }
  .topbar-right { gap: 12px; }
  .live-indicator { font-size: 0; }
  .live-indicator i { width: 8px; height: 8px; }
  .today-block { min-width: 70px; padding-left: 11px; }
  .today-block span { font-size: 8px; }
  .today-block strong { font-size: 15px; }
  .main-content { width: calc(100% - 28px); padding-top: 23px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 34px; }
  .page-subtitle { max-width: 330px; font-size: 12px; line-height: 1.45; }
  .page-heading .button { width: 100%; }
  .metrics { gap: 8px; margin-bottom: 12px; }
  .metric-card { min-height: 104px; padding: 12px 11px; }
  .metric-label { font-size: 8px; letter-spacing: .1em; }
  .metric-value-row strong { font-size: 28px; }
  .metric-icon { width: 29px; height: 29px; }
  .metric-card small { max-width: 120px; display: block; font-size: 9px; line-height: 1.25; }
  .panel-heading { padding: 15px 13px 12px; }
  .panel-title-row h2, .history-heading h2 { font-size: 16px; }
  .panel-description { margin-left: 22px; font-size: 10px; }
  .table-tools { align-items: stretch; flex-direction: column; padding: 0 13px 11px; gap: 8px; }
  .search-box { width: 100%; }
  .filter-wrap { justify-content: space-between; }
  .filter-wrap select { flex: 1; max-width: none; }
  .queue-table { min-width: 1040px; }
  .queue-table th:first-child, .queue-table td:first-child { padding-left: 13px; }
  .panel-footnote { padding-left: 13px; padding-right: 13px; font-size: 9px; }
  .side-column { grid-template-columns: 1fr; }
  .next-card { grid-row: auto; min-height: 216px; }
  .storage-note { grid-column: auto; }
  .history-heading { padding-left: 13px; padding-right: 13px; }
  .history-item { padding-left: 13px; padding-right: 13px; grid-template-columns: 1fr auto; gap: 4px 8px; }
  .history-item .history-date { text-align: right; }
  .history-item .history-details { grid-column: 1 / 2; }
  .history-status { grid-column: 2; grid-row: 2; }
  .history-empty { padding-left: 13px; }
  .app-footer { flex-direction: column; gap: 6px; font-size: 8px; }
  .driver-dialog form { padding: 17px 16px 15px; }
  .form-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .field input, .field select, .field textarea { padding: 7px 8px; font-size: 11px; }
  .dialog-header h2 { font-size: 22px; }
  .dialog-actions .button { flex: 1; padding-left: 10px; padding-right: 10px; }
  .toast { right: 14px; bottom: 14px; }
}


/* Áreas separadas por tipo de veículo */
.queue-switch { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: rgba(8,25,40,.2); }
.queue-link { min-width: 106px; padding: 6px 10px; display: grid; gap: 2px; border: 1px solid transparent; border-radius: 4px; color: #b9c8d3; text-decoration: none; transition: .15s ease; }
.queue-link strong { font-size: 12px; letter-spacing: .09em; }
.queue-link small { font-size: 8px; letter-spacing: .1em; }
.queue-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.queue-link.is-active { border-color: rgba(242,169,0,.62); background: rgba(242,169,0,.13); color: #fff; }
.queue-link.is-active strong { color: var(--amber); }
.page-heading h1 { letter-spacing: .005em; }
.unassigned-banner { margin: -8px 0 16px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #f0d68a; border-radius: 6px; background: #fff9e8; color: #705300; }
.unassigned-mark { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f3d981; color: #705300; font-weight: 700; }
.unassigned-copy { flex: 1; }
.unassigned-copy strong { display: block; font-size: 12px; }
.unassigned-copy p { margin: 3px 0 0; color: #8a6b14; font-size: 10px; }
.unassigned-banner .button { min-height: 34px; padding: 0 11px; font-size: 10px; white-space: nowrap; }
.field-hint { color: #8f9da8; font-size: 10px; font-weight: 400; }

/* Página inicial de seleção das duas filas */
.portal-main { width: min(900px, calc(100% - 48px)); margin: 0 auto; padding: 83px 0 28px; }
.portal-main h1 { margin: 0; color: var(--navy); font-size: clamp(38px, 6vw, 54px); line-height: .98; letter-spacing: -.025em; }
.portal-intro { max-width: 520px; margin: 12px 0 30px; color: #71818e; font-size: 15px; line-height: 1.5; }
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.portal-card { min-height: 332px; position: relative; padding: 21px 22px 19px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #dce5eb; border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; box-shadow: 0 8px 25px rgba(22,50,79,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.portal-card:hover { transform: translateY(-3px); border-color: #a9bac8; box-shadow: 0 15px 34px rgba(22,50,79,.12); }
.portal-duplo { border-top: 4px solid var(--navy); }
.portal-impar { border-top: 4px solid var(--amber); }
.portal-card-top { display: flex; align-items: center; justify-content: space-between; }
.portal-code { color: #8c9ba7; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.portal-arrow { color: #93a2ad; font-size: 20px; transition: transform .18s ease; }
.portal-card:hover .portal-arrow { transform: translate(2px, -2px); }
.portal-symbol { height: 39px; margin-top: 19px; display: flex; align-items: center; gap: 5px; }
.portal-symbol span { width: 19px; height: 30px; border: 2px solid var(--navy); border-radius: 2px; background: var(--navy-soft); }
.portal-symbol-single span { border-color: #bd8500; background: var(--amber-soft); }
.portal-card h2 { margin: 9px 0 0; color: var(--navy); font-size: 32px; line-height: 1; letter-spacing: .06em; }
.portal-impar h2 { color: #9b6d00; }
.portal-capacity { margin: 5px 0 0; color: #a17a1d; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.portal-duplo .portal-capacity { color: #667f93; }
.portal-description { max-width: 290px; margin: 12px 0 18px; color: #788793; font-size: 12px; line-height: 1.55; }
.portal-enter { margin-top: auto; padding-top: 12px; border-top: 1px solid #edf1f4; color: var(--navy); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.portal-enter b { margin-left: 4px; color: #b98000; font-size: 14px; }
.portal-note { margin-top: 18px; display: flex; align-items: center; gap: 8px; color: #84939e; font-size: 11px; }
.portal-footer { margin-top: 75px; color: #a2adb5; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.portal-footer span { color: #5d7384; }
.portal-footer i { margin: 0 5px; color: var(--amber); font-style: normal; }

@media (max-width: 900px) {
  .queue-switch { margin-left: auto; }
  .queue-link { min-width: 90px; padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 600px) {
  .topbar { gap: 8px; }
  .queue-switch { gap: 2px; padding: 3px; }
  .queue-link { min-width: auto; padding: 6px 7px; }
  .queue-link strong { font-size: 10px; }
  .queue-link small { font-size: 7px; }
  .unassigned-banner { align-items: flex-start; flex-wrap: wrap; padding: 10px; }
  .unassigned-copy { min-width: calc(100% - 42px); }
  .unassigned-banner .button { margin-left: 34px; }
  .portal-main { width: calc(100% - 30px); padding-top: 45px; }
  .portal-main h1 { font-size: 39px; }
  .portal-intro { margin-bottom: 20px; font-size: 13px; }
  .portal-grid { grid-template-columns: 1fr; gap: 12px; }
  .portal-card { min-height: 276px; padding: 17px; }
  .portal-footer { margin-top: 36px; }
}


/* Cadastro reutilizável de motoristas */
.portal-driver-link { margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #dce5eb; border-radius: 6px; background: rgba(255,255,255,.82); color: var(--ink); text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.portal-driver-link:hover { border-color: #9eafbc; background: #fff; }
.portal-driver-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-soft); color: var(--navy); font-size: 18px; }
.portal-driver-link span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.portal-driver-link strong { font-size: 12px; }
.portal-driver-link small { color: #84939e; font-size: 10px; }
.portal-driver-link > b { color: var(--navy); font-size: 16px; }
.registry-metrics { margin: 0 0 17px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.registry-metric { min-height: 93px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-content: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.registry-metric > span { grid-column: 1 / -1; color: #748492; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.registry-metric > strong { margin-top: 3px; color: var(--navy); font-size: 28px; line-height: 1; }
.registry-metric > small { align-self: end; justify-self: end; color: #8c99a4; font-size: 10px; }
.registry-layout { display: grid; grid-template-columns: minmax(270px, 335px) minmax(0, 1fr); align-items: start; gap: 14px; }
.registry-form-panel, .registry-list-panel { min-width: 0; padding: 17px; }
.registry-panel-heading { display: flex; align-items: flex-start; gap: 10px; }
.registry-step { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 4px; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 700; }
.registry-panel-heading h2 { margin: 1px 0 2px; color: var(--ink); font-size: 16px; }
.registry-panel-heading p { margin: 0; color: #84929d; font-size: 10px; }
.registry-form { margin-top: 17px; display: grid; gap: 11px; }
.registry-form .field { gap: 5px; }
.registry-form input, .registry-form select, .registry-form textarea { min-height: 37px; padding: 8px 10px; }
.registry-form textarea { min-height: 70px; resize: vertical; }
.registry-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.registry-form-actions .button { min-height: 37px; padding: 0 12px; font-size: 11px; }
.registry-local-note { margin: 0; display: flex; gap: 7px; color: #87949e; font-size: 9px; line-height: 1.4; }
.registry-local-note span { width: 14px; height: 14px; flex: none; display: grid; place-items: center; border: 1px solid #a8b5bf; border-radius: 50%; font-size: 9px; }
.registry-list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.registry-count { padding: 5px 8px; border-radius: 14px; background: #eef2f5; color: #6f7e8a; font-size: 9px; font-weight: 700; white-space: nowrap; }
.registry-tools { margin: 15px 0 11px; display: flex; align-items: center; gap: 9px; }
.registry-tools .search-box { flex: 1; }
.registry-table-wrap { position: relative; min-height: 250px; overflow-x: auto; border: 1px solid #e8edf1; border-radius: 4px; }
.registry-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; }
.registry-table th { padding: 10px 8px; border-bottom: 1px solid #e6ebef; background: #f7f9fa; color: #83919d; font-size: 8px; letter-spacing: .1em; white-space: nowrap; }
.registry-table td { padding: 10px 8px; border-bottom: 1px solid #edf1f4; color: #536371; vertical-align: middle; }
.registry-table tbody tr:last-child td { border-bottom: 0; }
.registry-driver-name { color: var(--ink); font-weight: 700; }
.registry-plate { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.registry-notes-cell { max-width: 140px; color: #84929d !important; }
.registry-actions-head { text-align: right; }
.registry-row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.registry-row-actions .row-action { padding: 5px 7px; font-size: 9px; }
.registry-row-actions .registry-delete { border-color: #ead7d5; color: #a24d46; }
.registry-row-actions .registry-delete:hover { background: #fff3f1; }
.type-badge { min-width: 50px; padding: 5px 6px; display: inline-grid; justify-items: center; gap: 1px; border-radius: 4px; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.type-badge small { font-size: 7px; font-weight: 600; letter-spacing: .04em; }
.type-duplo { background: #eaf0f5; color: #34536e; }
.type-impar { background: #fff4d5; color: #8b6500; }
.registry-empty { min-height: 240px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.registry-empty .empty-icon svg { width: 31px; height: 31px; fill: none; stroke: #9ba9b3; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.registry-empty strong { margin-top: 7px; color: #536371; font-size: 12px; }
.registry-empty p { max-width: 280px; margin: 4px 0 0; color: #8c99a4; font-size: 10px; line-height: 1.45; }
.registry-list-foot { padding-top: 9px; color: #8996a0; font-size: 9px; }
.registry-back { text-decoration: none; }

@media (max-width: 980px) {
  .registry-layout { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 10px; }
  .registry-form-panel, .registry-list-panel { padding: 13px; }
  .registry-table th, .registry-table td { padding-left: 6px; padding-right: 6px; }
}
@media (max-width: 760px) {
  .registry-layout { grid-template-columns: 1fr; }
  .registry-form-panel { order: 1; }
  .registry-list-panel { order: 2; }
  .registry-metrics { gap: 7px; }
  .registry-metric { padding: 11px; }
  .registry-metric > small { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
}
@media (max-width: 600px) {
  .queue-link strong { font-size: 9px; }
  .queue-link small { font-size: 6px; }
  .registry-list-heading { flex-wrap: wrap; }
  .registry-tools { align-items: stretch; flex-direction: column; }
  .registry-tools .filter-wrap { align-self: flex-end; }
  .registry-table { min-width: 680px; }
  .portal-driver-link { align-items: flex-start; }
  .portal-driver-link small { line-height: 1.4; }
}
