/* Contrast columns: distinct app, day, card, and unplanned-vehicle surfaces. */
:root{background:#e5eaf0}
.page{background:#e5eaf0}
.button.primary{background:#205fba;border-color:#205fba;box-shadow:none}.button.primary:hover{background:#174b98}
body{background:#e5eaf0;color:#172b43;font-size:14px}
#appView{max-width:1800px;margin:auto}
.button,.icon-button{box-shadow:none;border-radius:7px}
.page-heading h1{font-size:26px;letter-spacing:-.4px}
.topbar{height:auto;min-height:72px;background:#18324e;color:#fff;box-shadow:0 3px 12px #142c4120;border-bottom:1px solid #10283f;display:grid;grid-template-columns:auto 1fr;gap:12px 24px;padding:18px 28px 0}
.topnav{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:wrap;gap:3px}
.nav-button{padding:12px;color:#d1dfed;font-size:13px}.nav-button:hover{color:#fff;background:#294964}.nav-button.active{color:#fff;background:#294964;border-bottom-color:#86d5e0}
.account{justify-content:flex-end;white-space:normal;flex-wrap:wrap;gap:8px;font-size:12px}.topbar .text-button,.topbar .text-button:hover{color:#e3edf7}.topbar .role-pill{color:#e3edf7;border-color:#7190ac}.brand-mark{background:#37658a}.brand{font-size:15px}
.summary-grid{gap:12px;background:transparent;border:0;border-radius:0;overflow:visible}
.metric{border:1px solid #b7c4d2;border-top:4px solid #205fba;border-radius:9px;box-shadow:0 2px 4px #172b4309;padding:14px 18px;background:#fff}
.metric.warn{border-top-color:#a56915}.metric.risk{border-top-color:#b44736}
.metric strong{font-size:23px}.metric span,.metric small{font-size:12px;color:#52647a}
.toolbar{gap:16px;margin:18px 0;padding:13px;background:#fff;border:1px solid #b7c4d2;border-radius:9px}.toolbar-right{gap:12px}
.calendar-legend{display:none}.schedule-tabs{margin-bottom:0;border-bottom:2px solid #9fadc0;gap:6px}
.schedule-tabs button{border-radius:7px 7px 0 0;padding:12px 20px;color:#3a506a;background:#f3f6fa;border:1px solid #b7c4d2;border-bottom:0}
.schedule-tabs button.active{background:#205fba;color:#fff;border-color:#205fba}
.direction-tabs{display:flex;flex-wrap:wrap;gap:8px;padding:15px 0 20px}
.direction-tabs .button{border-color:#b7c4d2;background:#fff;color:#435973}
.direction-tabs .button.active{background:#e7efff;color:#20539b;border-color:#628bc3}
.board-layout{gap:18px;grid-template-columns:225px minmax(0,1fr);align-items:start}
.backlog-panel{box-shadow:none;border:1px solid #d0ab70;border-radius:10px;background:#fff1d5;overflow:hidden}
.backlog-panel .section-title{background:#f6e0b6;padding:17px;border-bottom:1px solid #d0ab70}.backlog-panel .section-title h2{color:#714608}.backlog-panel .section-title p{color:#715b38}.backlog-list{background:#fff1d5;padding:12px}
.board-main{box-shadow:none;border:1px solid #b7c4d2;border-radius:10px;background:#dfe6ee}
.shipment-heading,.production-heading{background:#fff;padding:17px;border-bottom:1px solid #b7c4d2}
.section-title h2{font-size:16px}.section-title p{font-size:12px;color:#52647a}
.shipment-board,.production-board{display:grid;width:100%;gap:12px;padding:12px;background:#dfe6ee;grid-template-columns:repeat(7,minmax(165px,1fr));min-width:1240px}
.day-column,.day-column:last-child{width:auto;min-width:0;border:1px solid #aebfd0;border-radius:9px;background:#edf2f7;overflow:hidden}
.day-head{background:#d0dce8;color:#172b43;border-bottom:1px solid #a5b9cd;min-height:68px;padding:12px}
.day-head strong{font-size:15px}.day-weekday{font-size:12px;background:transparent;color:inherit;padding:0}
.day-column.weekend .day-head{background:#e5ddd0;border-bottom-color:#c5b9a8;color:#584b38}.day-column.weekend .day-weekday{background:transparent;color:inherit}
.day-column.today{border-color:#205fba;box-shadow:0 0 0 1px #205fba}
.day-column.today .day-head{background:#205fba;color:#fff;border-bottom-color:#205fba}.day-column.today .day-weekday{background:transparent;color:#fff}.today-label{color:#fff;font-size:11px}
.shipment-day{padding:10px;min-height:330px;background:#edf2f7;gap:0}.production-day{padding:10px;background:#edf2f7}
.capacity{font-size:11px;color:#465c75;background:#dfe7f0;border:0;border-radius:5px;padding:8px;margin-bottom:9px}
.capacity.full{background:#fbe5dc;color:#8c3420;border-radius:5px}
.load-card{border:1px solid #b7c4d2;border-left:5px solid #205fba;border-radius:8px;background:#fff;box-shadow:0 3px 6px #172b4310;margin:0 0 12px}
.load-card.planned{border-left-color:#a56915}.load-card.searching{border-left-color:#205fba}.load-card.confirmed{border-left-color:#228154;background:#fff}.load-card.shipped{border-left-color:#7c8999;background:#f7f9fb;opacity:1}.load-card.risk{border-left-color:#b44736}
.load-card:hover{border-color:#628bc3;box-shadow:0 5px 10px #172b4320}.load-card.dragging{opacity:.45}
.load-open{padding:12px}.load-open strong{font-size:14px;white-space:normal;overflow:visible;line-height:1.4;overflow-wrap:anywhere;color:#172b43}
.card-top{font-size:11px;color:#52647a}.card-bottom{margin-top:10px;font-size:11px;color:#52647a}.card-bottom .qty{font-size:17px;color:#172b43}
.truck-composition{display:block;font-size:12px;color:#435a74;margin-top:7px;line-height:1.6}
.card-status-select,.card-status{font-size:11px;padding:8px 10px;border:0;border-top:1px solid #d0dceb;background:#e7efff;color:#20539b}
.planned .card-status-select,.planned .card-status{background:#fff1d5;color:#80500c}
.searching .card-status-select,.searching .card-status{background:#e7efff;color:#20539b}
.confirmed .card-status-select,.confirmed .card-status{background:#e4f4eb;color:#16613f}
.shipped .card-status-select,.shipped .card-status{background:#e8edf2;color:#4f6074}
.day-stock{font-size:11px;color:#435a74;margin:0 0 12px}.day-stock summary{padding:5px 0;cursor:pointer}.day-stock .free-products{margin-top:8px}.free-chip{background:#fff;color:#304d5c;border:1px solid #cad6e1}
.line-slot{width:100%;text-align:left;border-radius:8px;padding:12px;background:#fff;border:1px solid #b7c4d2;border-left:4px solid #205fba;box-shadow:0 3px 6px #172b4310;margin-bottom:12px}
.line-slot:hover{background:#fff;border-color:#628bc3;box-shadow:0 5px 10px #172b4320}.line-slot.over{border-left-color:#a56915}
.line-slot strong{font-size:13px;white-space:normal;color:#172b43}.line-slot small{font-size:12px;white-space:normal;line-height:1.5;color:#435a74}.production-products{font-size:12px;white-space:normal;color:#435a74}.line-slot .fact{display:block;background:#edf2f7;border-radius:5px;padding:7px;margin-top:8px;color:#233c55}.line-slot progress.fill{margin-top:10px}
.shipment-day.drag-over,.backlog-list.drag-over{background:#d2e4ff;outline:3px dashed #205fba;outline-offset:-5px}
.request-trucks{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:16px 0}
.month-calendar{background:#dfe6ee;border:1px solid #b7c4d2;padding:12px;border-radius:10px}.month-grid{gap:10px;background:#dfe6ee}.month-day,.month-blank{border:1px solid #b7c4d2;border-radius:8px;background:#fff}.month-blank{background:#e8edf3}.month-day.today{box-shadow:none;border:2px solid #205fba;background:#edf4ff}.month-day.weekend{background:#f7f1e8}.month-day.today .month-day-top{color:#20539b}.month-weekdays{background:#18324e;border-radius:6px;margin-bottom:10px}
.production-board.production-month .day-column{border:1px solid #aebfd0}
@media(max-width:1000px){.board-layout{grid-template-columns:1fr}.backlog-list{display:flex;gap:12px;flex-wrap:wrap}.backlog-list .load-card{width:220px;margin:0}.shipment-board,.production-board,.production-board.production-month{grid-template-columns:repeat(3,minmax(0,1fr));min-width:0}.month-grid,.month-weekdays{min-width:0}}
@media(max-width:800px){.topbar{grid-template-columns:1fr;padding:14px 16px 0}.account{justify-content:flex-start;margin-left:0}.topnav{grid-row:3}.nav-button{min-height:44px}}
@media(max-width:600px){.shipment-board,.production-board,.production-board.production-month{grid-template-columns:1fr;min-width:0}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.metric{padding:12px}.toolbar{align-items:start}.toolbar-right{flex-wrap:wrap}.backlog-list .load-card{width:100%;max-width:none;min-width:0}.status-legend{display:none}.board-layout{gap:14px}.shipment-day{min-height:120px}.month-grid{gap:5px}.month-calendar{padding:6px}}
.modal-head{position:sticky;top:0;z-index:5;background:#fff;flex-wrap:wrap;border-bottom:1px solid #e0e5eb}
.modal-context-actions{flex:0 0 100%;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding-top:10px}
.modal-context-actions>span{font-size:12px;color:#647485;margin-right:auto}
@media(max-width:600px){.modal-context-actions>span{flex-basis:100%}.modal-context-actions .button{flex:1}}

/* Centered application warnings, above any open editing form. */
dialog.notice-dialog {
  position: fixed; inset: 0; margin: auto; box-sizing: border-box;
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 28px; border: 1px solid #dbe3e9; border-radius: 18px;
  background: #fff; color: #243443; box-shadow: 0 24px 80px #152c3f40;
  overflow: auto; text-align: left;
}
dialog.notice-dialog::backdrop { background: #172c4266; }
.notice-dialog h2 { margin: 0 0 14px; font-size: 21px; line-height: 1.3; }
.notice-dialog p { margin: 0 0 24px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.notice-dialog label { display: grid; gap: 8px; margin-bottom: 20px; }
.notice-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.notice-actions .button { min-height: 44px; white-space: normal; }
@media (max-width: 480px) { dialog.notice-dialog { padding: 22px; } .notice-actions .button { flex: 1; } }

/* Explicit next actions and a single composition/date workflow. */
.request-attention{display:grid;gap:8px;margin:10px 0}.attention-item{border-left:4px solid #bd852b;background:#fff8e9;border-radius:8px;padding:10px 12px}.attention-item p{margin:0 0 7px;font-size:13px;line-height:1.45}.attention-item.risk{border-color:#c24f48;background:#fff0ed}.truck-next{font-size:12px;line-height:1.4;margin:0;padding:8px 12px;background:#edf3f9;color:#2b4966}.truck-next-action{margin:8px 12px;align-self:start}.readiness-text{line-height:1.5}.vehicle-builder{max-width:100%}.compose-section{background:#f3f6fa;border:1px solid #cbd7e4;border-radius:12px;padding:18px}.compose-section h3{margin:0 0 14px}.compose-rows{display:grid;gap:8px}.compose-row{display:grid;grid-template-columns:minmax(180px,1fr) 155px;gap:16px;background:#fff;border:1px solid #d8e0e8;border-radius:8px;padding:12px}.compose-row>label:first-child{display:flex;align-items:center;gap:10px}.compose-row small{display:block;color:#516579;margin-top:5px}.compose-row input[type=checkbox]{width:19px;height:19px;flex:0 0 auto}.compose-capacity{max-width:260px;margin-bottom:14px}.compose-total{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#e4eff8;border-radius:8px;padding:12px;margin-top:14px}.compose-total.over{background:#fde5e2;color:#92372f}.compose-section progress{width:100%;margin-top:8px}.compose-dates{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.compose-date{padding:9px 3px;border-radius:8px;border:1px solid #b8cad5;display:grid;gap:5px;background:#fff;color:#30465a;cursor:pointer}.compose-date span,.compose-date small{font-size:11px}.compose-date.fits{background:#e8f4ec;border-color:#90b99d}.compose-date.unavailable{background:#eff1f3;color:#64717d;border-style:dashed}.compose-date.selected{outline:3px solid #2364b7}.shipment-mode{padding:14px;border:1px solid #cbd7e4;border-radius:10px;background:#f3f6fa}.shipment-mode>div{display:flex;flex-wrap:wrap;gap:8px;margin:9px 0}.shipment-mode .active{background:#235fa9;color:white}.shipment-mode small{color:#516579}.vehicle-builder .modal-actions{position:sticky;bottom:-24px;background:white;padding:12px 0;border-top:1px solid #d2dce7;z-index:2}#composePreview{font-weight:600;line-height:1.7}#loadDateReason{margin:12px 0}.picker-day[aria-disabled=true]{opacity:.7}
@media(max-width:700px){.compose-row{grid-template-columns:1fr}.compose-dates{grid-template-columns:repeat(4,minmax(0,1fr))}.compose-section{padding:12px}.compose-total{align-items:flex-start;flex-direction:column}}
