:root{--bg: #f3f6fa;--ink: #1f2937;--muted: #6b7280;--line: #d9e2ec;--paper: #ffffff;--header: #334e68;--accent: #2f6fed;--accent-soft: #eaf2ff;--danger: #9f2d2d;color:var(--ink);background:var(--bg);font-family:Segoe UI,Helvetica Neue,sans-serif;line-height:1.45}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{border:1px solid transparent;border-radius:8px;padding:8px 12px;background:var(--header);color:#fff;cursor:pointer}button.secondary{background:#e8eef3;border:2px solid #5f7190;color:var(--ink)}button.danger{background:#e8eef3;color:var(--danger);border-color:#e7c1c1}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}h2,p{margin:0}.app{min-height:100vh}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;background:var(--header);color:#fff}.brand{display:flex;flex-direction:column;gap:4px}.brand-logo{height:52px;width:auto;max-width:none;align-self:flex-start;object-fit:contain;display:block}.partner-logos{flex:1;display:flex;align-items:center;justify-content:center;gap:10px}.partner-logos img{height:52px;width:auto;object-fit:contain;background:white;border-radius:6px;padding:4px 8px}.topbar-center{flex:1;display:flex;align-items:center;min-width:0;margin-left:72px}.nav{display:flex;gap:8px}.nav a{color:#fff;text-decoration:none;padding:6px 10px;border-radius:8px;display:inline-flex;align-items:center;gap:6px}.nav-count{min-width:1.15rem;height:1.15rem;padding:0 4px;border-radius:999px;background:#b42318;color:#fff;font-size:.72rem;display:inline-grid;place-items:center}.nav a.active{background:rgba(255,255,255,.16)}.topbar-side{display:flex;align-items:center;gap:20px}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(420px,100%);background:white;color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:24px;display:flex;flex-direction:column;gap:14px}.login-card img{height:52px;width:auto;align-self:flex-start;object-fit:contain}.login-card input{color:var(--ink);background:white}.duty-bar{color:#fff;text-align:right;font-size:1.05rem;line-height:1.3;display:flex;flex-direction:column;align-items:flex-end;gap:2px}.duty-label{align-self:flex-end;padding:2px 8px;border:1px solid rgba(255,255,255,.7);border-radius:8px;background:transparent;color:#fff;font-weight:600;font-size:1.05rem;letter-spacing:.02em;line-height:1.3}.duty-bar p{margin:0;color:#fff}main{padding:16px}.plan{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(320px,.8fr);gap:16px;align-items:start}.plan-drivers{grid-column:1 / -1;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.panel{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px}.panel-head,.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.panel-head,.spread{justify-content:space-between}.area-line{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}.side-field{width:260px;max-width:100%;flex:0 0 auto}.trip-date{width:340px;font-size:1.15rem}.trip-date input{font-size:1.15rem;padding:10px 12px}label{display:flex;flex-direction:column;gap:4px;font-size:.9rem}.label-line{display:flex;align-items:center;justify-content:space-between;gap:12px}input,select,textarea{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:white}input[type=date]{cursor:pointer}.date-field{position:relative;display:inline-block;max-width:100%}.date-field input{cursor:pointer;width:11rem}.date-field input:focus,.date-field input:focus-visible{outline:none}.date-pop{position:absolute;z-index:30;top:calc(100% + 6px);left:0;width:280px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0f172a29;padding:10px}.date-pop-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.date-pop-head strong{font-size:.95rem;text-transform:capitalize}.date-pop-head button,.date-pop-day{background:white;color:var(--ink);border:0;min-height:0;padding:4px;box-shadow:none}.date-pop-head button{width:32px}.date-pop-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;align-items:center}.date-pop-weekday{text-align:center;font-size:.75rem;color:var(--muted);text-transform:uppercase}.date-pop-day{height:32px;border-radius:8px}.date-pop-day:hover{background:#f4f7fb}.date-pop-day.today{box-shadow:inset 0 0 0 1px var(--accent)}.date-pop-day.selected,.date-pop-day.selected:hover{background:#1d4ed8;color:#fff}.date-pop-clear{margin-top:8px}input[type=date]:focus,input[type=date]:focus-visible{outline:none}input[type=date]::-webkit-datetime-edit,input[type=date]::-webkit-datetime-edit-fields-wrapper,input[type=date]::-webkit-datetime-edit-text,input[type=date]::-webkit-datetime-edit-month-field,input[type=date]::-webkit-datetime-edit-day-field,input[type=date]::-webkit-datetime-edit-year-field,input[type=date]::-webkit-datetime-edit-month-field:focus,input[type=date]::-webkit-datetime-edit-day-field:focus,input[type=date]::-webkit-datetime-edit-year-field:focus{background-color:transparent!important;color:var(--ink)!important;outline:none!important}textarea{min-height:72px;resize:vertical;width:100%}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;max-height:62vh}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}th{position:sticky;top:0;background:#f8fafc;font-size:.85rem}tbody tr{cursor:pointer}tbody td,.stops li{-webkit-user-select:none;user-select:none}tbody tr:hover td{background:#f8fafc}tbody tr.on-route td{background:var(--row)}tbody tr.selected{box-shadow:inset 0 0 0 2px var(--accent)}.segmented{display:flex;gap:8px}.segmented button.active{background:var(--accent-soft);color:var(--header);border:1px solid var(--accent)}.badge{font-size:.8rem;padding:4px 8px;border-radius:999px;background:#e7f6ec;color:#166534}.badge.warn{background:#fff4db;color:#92400e}.badge.sent{background:#e7f0ff;color:#1d4ed8}.route-title{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:16px 18px;border-radius:10px}.route-title strong{font-size:1.45rem}.file-button{position:relative;overflow:hidden;flex-direction:row;width:auto;background:#e8eef3;border:2px solid #5f7190;color:var(--ink);border-radius:8px;padding:8px 12px;cursor:pointer}.file-button input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.with-hint{position:relative}.with-hint:hover:after{content:attr(data-hint);position:absolute;z-index:8;left:12px;bottom:calc(100% - 28px);max-width:340px;padding:8px 10px;border-radius:8px;background:#1f2937;color:#fff;font-size:.85rem;line-height:1.35;white-space:normal;pointer-events:none}.delivery-card.driver-stop{align-items:stretch;gap:16px;padding:18px 14px 14px}.driver-stop-text{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px}.driver-stop-text strong{font-size:1.15rem}.driver-stop-text p{color:var(--ink)}.driver-stop-actions{display:grid;grid-template-columns:1fr 1.2fr 1fr;gap:8px}.driver-stop-actions>*{width:100%;justify-content:center;text-align:center}.driver-page .driver-stop-actions .map-link,.driver-page .driver-stop-actions button{min-height:44px}.stop-info-line{display:flex;flex-direction:column;gap:2px}.stop-info-line p{margin:0}.area-head{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:baseline;margin:0;padding:8px 12px;border-radius:8px;font-size:.95rem}.area-driver{margin-left:auto}.stops{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.stops li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:grab;background:white}.stops li:active{cursor:grabbing}.stops li.dragging{opacity:.45}.stops li.drop-before{box-shadow:inset 0 3px 0 var(--accent)}.stops li.drop-after{box-shadow:inset 0 -3px 0 var(--accent)}.stops li div:first-child{display:flex;flex-direction:column}.stops li.plan-stop{align-items:flex-start}.stop-side{display:grid;grid-template-columns:auto auto;align-items:center;justify-items:center;column-gap:8px;row-gap:10px}.stop-side .badge{grid-column:1;grid-row:1}.stop-side button{grid-column:2;grid-row:1}.stops .stop-driver{grid-column:2;grid-row:2;color:var(--header);font-weight:400;font-size:1.15rem;text-align:center}.stops span,.empty,.notice{color:var(--muted);font-size:.9rem}.stops .badge{color:#166534;font-size:.8rem}.stops .badge.warn{color:#92400e}.stops .badge.sent{color:#1d4ed8}.error{color:var(--danger)}.calendar-panel{max-width:1100px}.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.weekday{font-size:.8rem;color:var(--muted);text-transform:uppercase}.day{min-height:110px;text-align:left;align-items:stretch;background:white;color:var(--ink);border:1px solid var(--line);display:flex;flex-direction:column;gap:6px}.day.today{border-color:var(--accent)}.day.marked{box-shadow:inset 0 0 0 2px var(--header)}.day.past{position:relative}.day.past:after{content:"";position:absolute;top:8px;right:8px;bottom:8px;left:8px;background:linear-gradient(to top right,transparent calc(50% - 1.5px),rgba(180,40,40,.55) calc(50% - 1.5px),rgba(180,40,40,.55) calc(50% + 1.5px),transparent calc(50% + 1.5px));pointer-events:none}.day-group{display:flex;flex-direction:column;gap:8px}.day-group+.day-group{margin-top:14px}.day-group h3{margin:0;padding:8px 12px;border-radius:8px;font-size:.95rem}.day-group .stops li{cursor:pointer}.trip-columns{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:16px;align-items:stretch}.trip-column{display:flex;flex-direction:column;min-width:0}.trip-column h3{margin:0 0 10px;text-align:center;font-size:1.45rem;overflow-wrap:anywhere}.trip-list{flex:1;min-height:68vh;border:1px solid var(--line);border-radius:8px;padding:16px}.trip-list .stops li{cursor:pointer}.stops li.delivered{background:#e6e8eb;border-color:#c5ced6}.stops li.delivered strong,.stops li.delivered span{color:#5c6770}.stops li.delivered .badge{color:#166534}.stops li.past{position:relative}.stops li.past:after{content:"";position:absolute;top:8px;right:12px;bottom:8px;left:12px;background:linear-gradient(to top right,transparent calc(50% - 1.5px),rgba(180,40,40,.55) calc(50% - 1.5px),rgba(180,40,40,.55) calc(50% + 1.5px),transparent calc(50% + 1.5px));pointer-events:none}.info-lines{display:flex;flex-direction:column;gap:6px}.info-lines p{margin:0;white-space:pre-wrap}.day.empty-day{background:transparent;border-color:transparent;cursor:default}.chips{display:flex;flex-direction:column;gap:4px}.chips span{font-size:.75rem;padding:2px 6px;border-radius:6px}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:rgba(31,41,55,.35);display:grid;place-items:center;padding:16px}.dialog{width:min(440px,100%);background:white;color:var(--ink);border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:12px}.dialog input,.dialog textarea,.dialog select{color:var(--ink);background:white}.form{display:flex;flex-direction:column;gap:10px}.user-form{gap:22px;font-size:1.05rem}.user-form label{font-size:1.05rem;font-weight:600;color:var(--ink)}.user-form input,.user-form textarea,.user-form select,.user-form .date-field input{font-size:1.12rem;font-weight:600;padding:12px 14px;border:2px solid var(--header);background:#f4f7fb;color:var(--ink)}.user-form input::placeholder,.user-form textarea::placeholder{color:var(--header);opacity:.75}.user-form :is(input,textarea,select,button):focus,.user-form :is(input,textarea,select,button):focus-visible{outline:none}.user-form button[type=submit]{width:100%;font-size:1.08rem;padding:12px 16px}.user-form input[readonly]{background:#f4f7fb}.request-top{display:flex;flex-wrap:wrap;align-items:flex-end;gap:16px 32px}.request-top label:first-child{width:15rem;max-width:100%}.request-top label:nth-child(2){width:18rem;max-width:100%}.request-top label:nth-child(3){margin-left:auto}.request-top input{width:100%}.request-top .date-field input{width:11rem}.request-customer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.request-customer-row{display:flex;align-items:center;gap:12px;width:100%}.request-customer-row .customer-suggest{flex:1 1 16rem;max-width:28rem;min-width:0}.request-customer-row>button{flex:0 0 auto}.request-contact{display:grid;grid-template-columns:1.4fr .8fr;gap:12px}.request-kinds{display:grid;grid-template-columns:1fr 1fr;gap:12px}button.request-kind{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;background:#f4f7fb;color:var(--ink);border:2px solid var(--header);border-radius:12px;padding:14px 16px;min-height:76px}button.request-kind strong{font-size:1.12rem;font-weight:600}button.request-kind span{font-size:1rem;color:var(--ink);font-weight:600}button.request-kind.active{background:var(--header);color:#fff;border-color:var(--header)}button.request-kind.active span{color:#ffffffd9}.user-form .customer-line{display:block}.user-form .customer-suggest input,.user-form .customer-suggest ul{width:100%;flex:1 1 auto}.delivery-form{gap:22px;font-size:1.08rem}.delivery-form label{font-size:1.05rem;font-weight:600;color:var(--ink)}.delivery-form input,.delivery-form textarea,.delivery-form select,.delivery-form .date-field input{font-size:1.12rem;font-weight:600;padding:12px 14px;border:2px solid var(--header);background:#f4f7fb;color:var(--ink)}.delivery-form input::placeholder,.delivery-form textarea::placeholder{color:var(--header);opacity:.75}.delivery-form :is(input,textarea,select,button):focus,.delivery-form :is(input,textarea,select,button):focus-visible{outline:none}.delivery-form .customer-line,.delivery-form .customer-line input,.delivery-form .customer-suggest ul{width:100%;max-width:100%;flex:1 1 auto}.delivery-form .segmented{margin-top:8px}.delivery-form .segmented button{font-size:1.08rem;font-weight:600;padding:12px 16px;border:2px solid var(--header);background:#f4f7fb;color:var(--ink)}.delivery-form .segmented button.active{background:var(--header);color:#fff;border-color:var(--header)}.delivery-form button[type=submit]{font-size:1.12rem;padding:12px 16px}.delivery-top{display:flex;flex-wrap:wrap;gap:16px;align-items:end}.delivery-driver{width:16rem;max-width:100%}.delivery-driver select{width:100%}.delivery-form textarea{min-height:96px}.customer-suggest{position:relative}.customer-line{display:flex;align-items:center;gap:32px}.customer-line input{width:240px;flex:0 0 240px}.customer-address{display:flex;flex-direction:column;gap:4px;padding:0;color:inherit;background:transparent;border:0}.customer-suggest ul{position:relative;z-index:3;margin:4px 0 0;padding:4px;width:240px;list-style:none;background:white;border:1px solid var(--line);border-radius:8px;max-height:240px;overflow:auto}.customer-suggest li{margin:0}.customer-suggest button{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;background:transparent;color:inherit;border:0;border-radius:6px;padding:8px 10px;min-height:0}.customer-suggest button.active{background:var(--header);color:#fff}.customer-suggest button.active span{color:#ffffffd9}.customer-suggest button span{color:var(--muted, #5c6b7a);font-size:.85rem}.customer-empty{padding:8px 10px;color:var(--muted, #5c6b7a)}.role{display:flex;align-items:center;gap:8px;color:#fff;font-size:.9rem}.duty-choices{display:flex;flex-direction:column;gap:8px}.duty-choices .row button:first-child{flex:1}.trip-boards{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-start}.trip-board{display:flex;align-items:flex-start;gap:8px;flex:1 1 520px;max-width:920px;min-width:0}.trip-board .trip-panel{flex:1 1 auto;min-width:0}.trip-add{position:relative;width:36px;height:36px;padding:0;flex:0 0 auto}.trip-add:before,.trip-add:after{content:"";position:absolute;left:50%;top:50%;background:currentColor;transform:translate(-50%,-50%)}.trip-add:before{width:14px;height:2px}.trip-add:after{width:2px;height:14px}.trip-tools{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px}.trip-side{display:flex;flex-direction:column;align-items:flex-end;gap:14px;margin-left:auto}.trip-drivers{margin:0;min-width:0;border:1px solid #8aa0b8;border-radius:10px;padding:14px 16px}.trip-drivers legend{padding:0 8px;margin-left:6px;font-size:1.05rem}.trip-driver-buttons{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.trip-panel>button.secondary{align-self:flex-start}.trip-tools .send-button{width:128px;min-height:96px;padding:16px 12px;font-size:1.15rem;line-height:1.25;white-space:normal;background:var(--accent)}.map-link{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:8px;background:#e8eef3;border:2px solid #5f7190;color:var(--ink);text-decoration:none}.panel .map-link{min-height:0}.map-link[aria-disabled=true]{opacity:.45;pointer-events:none}.driver-page button,.driver-page .map-link{min-height:44px}@media (max-width: 720px){.topbar{flex-wrap:wrap;align-items:center;padding:12px 14px;gap:10px 12px}.brand{order:1}.topbar-side{order:2;margin-left:auto}.topbar-center{order:3;flex:1 1 100%;margin-left:0;flex-wrap:wrap;gap:8px}.nav{flex-wrap:wrap}.partner-logos{flex:1 1 100%;justify-content:flex-start}.partner-logos img{height:40px;max-width:46vw}.driver-page{max-width:none}.driver-page .row{width:100%}.driver-page .row>*{flex:1;justify-content:center}}.split{display:grid;grid-template-columns:1fr 1fr;gap:12px}.trip-card,.delivery-card{border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:6px}.delivery-card p{margin:0;color:var(--muted)}.request-facts{display:grid;gap:6px;margin:0}.request-facts div{display:grid;grid-template-columns:11rem 1fr;gap:8px}.request-facts dt{color:var(--muted)}.request-facts dd{margin:0}.date-new{background:#fff4db;color:#92400e;border-radius:6px;padding:1px 6px}.date-moved{display:block;margin-top:2px;font-size:12px;font-weight:400;color:var(--muted)}.history-search{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}.history-search label:first-child{flex:1 1 220px}.history-search button{margin-bottom:2px}.history-card{flex-direction:row;align-items:center;justify-content:space-between}.history-body{display:flex;flex-direction:column;gap:6px;min-width:0}button.pdf-open{width:auto;flex:0 0 auto;align-self:center;padding:4px 10px;font-size:.9rem}.signature{width:100%;height:120px;border:1px dashed var(--line);border-radius:10px;background:white;touch-action:none;cursor:crosshair}.signature-box{display:flex;flex-direction:column;gap:8px}.chip-way{background:#fff4db}.chip-done{background:#e7f6ec}.colors{display:flex;flex-wrap:wrap;gap:8px}.colors button{width:28px;height:28px;padding:0;border:2px solid white;box-shadow:0 0 0 1px var(--line)}.colors button.active{box-shadow:0 0 0 2px var(--header)}@media (max-width: 980px){.split{grid-template-columns:1fr}}@media (max-width: 980px){.plan{grid-template-columns:1fr}.calendar{grid-template-columns:repeat(2,minmax(0,1fr))}.weekday{display:none}}
