:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1d342e;background:#f4f6f3;font-size:16px;--green:#214f42;--muted:#607369;--line:#dce4de}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}
button,input,textarea,select{font:inherit}
button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid var(--green);border-radius:10px;background:var(--green);color:white;font-weight:650;cursor:pointer;text-decoration:none;gap:6px}
button:disabled{opacity:.55;cursor:wait}
button:hover,.button:hover{filter:brightness(.94)}
.secondary{background:white;color:var(--green)}
.subtle{background:transparent;color:inherit;border-color:var(--line)}
.danger{color:#9e2929;background:#fff2f1;border-color:#efb6b0}
a{color:var(--green)}
input,textarea,select{display:block;width:100%;min-height:44px;padding:10px;border:1px solid #b9c9bf;border-radius:8px;background:white;color:#1d342e}
textarea{resize:vertical}
label{display:grid;gap:6px;font-size:.9rem;font-weight:600;min-width:0}
:focus-visible{outline:3px solid #da9d4c;outline-offset:3px}
.topbar{background:#183c33;color:white;display:flex;justify-content:space-between;align-items:center;gap:14px;padding:18px max(20px,calc((100vw - 1200px)/2));flex-wrap:wrap}
.brand{color:white;text-decoration:none;font-size:1.35rem;font-weight:750}
.brand span{color:#edc18b}
.brand small{font-size:.75rem;display:block;font-weight:450;letter-spacing:.13em;text-transform:uppercase}
.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.85rem}
.topbar button{border-color:#638476}
main{max-width:1240px;margin:auto;padding:28px 20px 70px}
h1{font-size:clamp(1.7rem,4vw,2.4rem);line-height:1.15;margin:6px 0 16px}
h2{font-size:1.2rem;margin:0 0 10px}
h3{font-size:1rem;margin:0 0 8px}
p{line-height:1.6;margin:0 0 14px}
.eyebrow{letter-spacing:.14em;font-size:.7rem;font-weight:750;color:#987038;margin:0 0 8px}
.card{background:white;border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:0 3px 14px #183c3305}
.login{max-width:460px;margin:6vh auto}
form{display:grid;gap:16px}
.page-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.section-heading{margin-bottom:14px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:6px 0 14px}
.stat{padding:18px;border-radius:12px;background:#e6eee7}
.stat strong{font-size:1.8rem;display:block;color:var(--green)}
.stat span{font-size:.8rem;color:var(--muted)}
.connection{display:flex;gap:15px;justify-content:space-between;flex-wrap:wrap;font-size:.8rem;color:var(--muted);margin:10px 0 20px}
.tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tools>div{flex:1 1 300px}
.hint{font-size:.8rem;color:var(--muted);line-height:1.5}
.tools>.hint{flex-basis:100%}
.pickup{padding:10px 14px;background:#f4f6f3;border-radius:8px;font-size:.9rem}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.check{display:flex;align-items:flex-start;gap:9px;font-size:.9rem}
.check input{width:20px;min-height:20px;flex-shrink:0;margin:1px 0}
.actions{display:flex;gap:10px;flex-wrap:wrap}
details{border:1px solid var(--line);border-radius:10px;margin-bottom:12px;overflow:hidden}
summary{padding:14px;cursor:pointer;font-weight:650;background:#f8faf8;overflow-wrap:anywhere}
.detail-body{padding:16px}
.order-line{display:grid;grid-template-columns:minmax(0,1fr) 85px;align-items:center;gap:15px;padding:12px 0;border-top:1px solid var(--line)}
.order-line small{display:block;color:var(--muted);margin-top:5px}
.order-line input{text-align:center}
.review-stops{padding-left:25px;margin:0}
.review-stops li{padding:14px 0;border-bottom:1px solid var(--line)}
.review-stops .actions{margin:8px 0}
.review-stops label{font-size:.8rem;font-weight:500}
.badge{padding:4px 10px;border-radius:99px;background:#e8eee8;color:var(--green);font-size:.75rem;display:inline-block;font-weight:700}
.badge.active,.badge.on_way{background:#e5efff;color:#184d98}
.badge.problem,.badge.cancelled{background:#fff0eb;color:#9e3f2a}
.badge.delivered,.badge.completed{background:#def4e5;color:#166936}
.trip-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.trip-meta{font-size:.85rem;color:var(--muted);margin:12px 0}
.stops{padding-left:23px}
.stop{padding:16px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.stop:first-child{border-top:0}
.stop p{font-size:.9rem;margin:6px 0}
.stop ul{font-size:.85rem;padding-left:18px;margin:10px 0}
.stop .actions{margin-top:12px}
.event{font-size:.8rem;background:#f6f8f6;padding:10px;border-left:3px solid #c3d6c9;margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.map-section iframe{border:0;width:100%;height:380px;border-radius:10px;background:#edf1ed}
#notice:not(:empty){position:sticky;top:8px;z-index:5;padding:14px 18px;margin-bottom:16px;border:1px solid #b5cbbc;border-radius:10px;background:#eef9f0;white-space:pre-wrap}
#notice.error:not(:empty){background:#fff1ee;border-color:#eabdb1;color:#8a3522}
.empty{padding:25px;text-align:center;color:var(--muted)}
dialog{width:min(480px,calc(100% - 24px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border:1px solid var(--line);border-radius:16px;padding:20px;overflow-y:auto;color:inherit}
dialog::backdrop{background:#10271db3}
#action-error{color:#a12727}
@media(max-width:600px){main{padding:20px 12px 50px}.card{padding:16px}.form-grid{grid-template-columns:1fr}.topbar{padding:14px}.stats{gap:7px}.stat{padding:12px}.stat strong{font-size:1.4rem}.stat span{font-size:.7rem}.map-section iframe{height:300px}.actions>button,.actions>.button{flex:1 1 140px}.detail-body{padding:12px}}
@media(prefers-reduced-motion:no-preference){button,.button{transition:filter .15s ease}}
