
:root{
  --navy:#07162f;--navy2:#10284d;--gold:#d8aa43;--gold-light:#f3d98e;
  --red:#9d1d28;--paper:#fffaf0;--ink:#15243b;--muted:#738094;--line:#e5e8ee;
}
*{box-sizing:border-box}
body{margin:0;background:linear-gradient(180deg,#07162f 0,#10284d 25%,#edf1f7 25%,#edf1f7 100%);font-family:Inter,Arial,sans-serif;color:var(--ink)}
button,input,textarea{font:inherit}
button{cursor:pointer}
.driver-app{width:min(560px,100%);min-height:100vh;margin:0 auto;background:#edf1f7;box-shadow:0 0 50px rgba(0,0,0,.25);padding-bottom:102px}
.driver-topbar{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:12px;padding:14px 16px;background:rgba(7,22,47,.96);color:#fff;backdrop-filter:blur(14px)}
.icon-btn{width:42px;height:42px;border:1px solid rgba(255,255,255,.14);border-radius:13px;background:rgba(255,255,255,.08);color:#fff}
.driver-brand{display:flex;justify-content:center;align-items:center;gap:10px}.driver-brand strong,.driver-brand small{display:block}.driver-brand strong{font-size:.86rem}.driver-brand small{margin-top:2px;color:rgba(255,255,255,.55);font-size:.62rem}.mini-seal{display:grid;place-items:center;width:35px;height:35px;border:1px solid var(--gold-light);border-radius:50%;color:var(--gold-light);font-family:Georgia,serif;font-size:.68rem}
main{padding:16px}
.status-card{display:flex;justify-content:space-between;align-items:center;padding:20px;border-radius:20px;background:linear-gradient(135deg,#10284d,#07162f);color:#fff;box-shadow:0 18px 40px rgba(7,22,47,.25)}
.eyebrow{color:var(--gold);font-size:.61rem;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.status-card h1{margin:.35rem 0 0;font-family:Georgia,serif;font-size:1.18rem}
.progress-ring{--p:0;display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:conic-gradient(var(--gold) calc(var(--p)*1%),rgba(255,255,255,.13) 0);position:relative}.progress-ring:before{content:"";position:absolute;inset:7px;border-radius:50%;background:#0b2142}.progress-ring span{position:relative;font-size:.72rem;font-weight:900}
.next-card,.book-card,.checklist-card,.route-strip{margin-top:14px;border:1px solid #e0e4eb;border-radius:20px;background:#fff;box-shadow:0 9px 25px rgba(18,37,68,.07)}
.next-card{padding:19px}.next-card-head{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:.62rem}.live-pill{display:flex;align-items:center;gap:6px;padding:5px 9px;border-radius:99px;background:#e7f5ed;color:#2f7b58;font-weight:900}.live-pill i{width:7px;height:7px;border-radius:50%;background:#35a26f;box-shadow:0 0 0 4px rgba(53,162,111,.13)}
.family-row{display:flex;align-items:center;gap:13px;padding:20px 0 15px}.family-avatar{display:grid;place-items:center;width:52px;height:52px;border-radius:16px;background:linear-gradient(135deg,#10284d,#193d72);color:var(--gold-light);font-weight:900}.family-row h2{margin:0;color:var(--navy);font-family:Georgia,serif;font-size:1.25rem}.family-row p{margin:5px 0 0;color:var(--muted);font-size:.72rem}
.quick-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.quick-actions button{display:flex;justify-content:center;align-items:center;gap:7px;padding:11px 6px;border:1px solid #dfe4ec;border-radius:12px;background:#f9fafc;color:var(--navy);font-size:.68rem;font-weight:850}.quick-actions button:first-child{border-color:#ead7a8;background:#fff8e8}
.visit-meta{display:grid;grid-template-columns:repeat(3,1fr);margin-top:16px;padding-top:15px;border-top:1px solid var(--line)}.visit-meta div{text-align:center;border-right:1px solid var(--line)}.visit-meta div:last-child{border:0}.visit-meta small,.visit-meta strong{display:block}.visit-meta small{color:#929aa7;font-size:.57rem}.visit-meta strong{margin-top:4px;color:var(--navy);font-size:.66rem}
.book-card{position:relative;overflow:hidden;background:linear-gradient(135deg,#fffdf7,#f8eed7)}.book-card:before{content:"";position:absolute;left:50%;top:0;bottom:0;width:1px;background:rgba(115,83,28,.15);box-shadow:0 0 8px rgba(115,83,28,.1)}.book-ribbon{display:inline-block;margin-left:18px;padding:8px 12px;border-radius:0 0 10px 10px;background:var(--red);color:#fff;font-size:.67rem;font-weight:900}.book-grid{display:grid;grid-template-columns:1fr 1fr}.book-grid article{padding:18px}.book-grid span{color:#9c6c1d;font-size:.57rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em}.book-grid h3{margin:7px 0;color:#4a3418;font-family:Georgia,serif;font-size:.88rem}.book-grid p{margin:0;color:#705e45;font-family:Georgia,serif;font-size:.67rem;line-height:1.55}.magic-tags{display:flex;gap:7px;flex-wrap:wrap;padding:0 18px 18px}.magic-tags span{padding:6px 9px;border:1px solid #e2c98e;border-radius:99px;background:rgba(255,255,255,.65);color:#76531a;font-size:.57rem;font-weight:850}
.checklist-card,.route-strip{padding:18px}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.section-title h2{margin:3px 0 0;color:var(--navy);font-size:.98rem}.section-title>span{color:var(--red);font-size:.65rem;font-weight:900}
.checklist-card label{display:flex;align-items:center;gap:11px;padding:12px 0;border-bottom:1px solid #edf0f4;color:#556174;font-size:.7rem}.checklist-card label:last-child{border:0}.checklist-card input{appearance:none;width:22px;height:22px;border:2px solid #cfd5df;border-radius:7px}.checklist-card input:checked{border-color:#2f8b63;background:#2f8b63}.checklist-card input:checked:after{content:"✓";display:grid;place-items:center;color:#fff;font-size:.76rem;font-weight:900}
.route-item{display:grid;grid-template-columns:31px 1fr auto;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #edf0f4}.route-item:last-child{border:0}.route-number{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e9edf4;color:#6f7b8d;font-size:.65rem;font-weight:900}.route-item.active .route-number{background:var(--navy);color:var(--gold-light)}.route-item.done{opacity:.52}.route-item.done .route-number{background:#2f8b63;color:#fff}.route-item strong,.route-item small{display:block}.route-item strong{color:var(--navy);font-size:.69rem}.route-item small{margin-top:3px;color:#8c95a3;font-size:.58rem}.route-item time{color:var(--red);font-size:.65rem;font-weight:900}
.driver-footer{position:fixed;z-index:25;left:50%;bottom:0;transform:translateX(-50%);display:grid;grid-template-columns:.85fr 1.15fr;gap:10px;width:min(560px,100%);padding:13px 16px calc(13px + env(safe-area-inset-bottom));border-top:1px solid #dce1e9;background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
.primary,.secondary{padding:13px 12px;border-radius:13px;font-size:.7rem;font-weight:900}.primary{border:0;background:linear-gradient(135deg,#9d1d28,#73141e);color:#fff;box-shadow:0 8px 20px rgba(157,29,40,.22)}.secondary{border:1px solid #d8dee7;background:#fff;color:var(--navy)}
.driver-toast{position:fixed;z-index:60;left:50%;bottom:95px;transform:translate(-50%,20px);width:calc(min(560px,100%) - 32px);padding:12px 14px;border-radius:12px;background:#07162f;color:#fff;font-size:.68rem;text-align:center;opacity:0;pointer-events:none;transition:.3s}.driver-toast.show{opacity:1;transform:translate(-50%,0)}
.driver-modal{position:fixed;inset:0;z-index:80;display:none;place-items:end center}.driver-modal.open{display:grid}.modal-backdrop{position:absolute;inset:0;background:rgba(3,12,27,.7);backdrop-filter:blur(8px)}.modal-card{position:relative;width:min(560px,100%);padding:25px 20px calc(22px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#fff;animation:slideUp .35s ease}@keyframes slideUp{from{transform:translateY(100%)}to{transform:none}}.modal-seal{display:grid;place-items:center;width:54px;height:54px;margin:-52px auto 12px;border:5px solid #fff;border-radius:50%;background:#2f8b63;color:#fff;font-size:1.25rem}.modal-card h2{text-align:center;color:var(--navy);font-family:Georgia,serif}.modal-card p{text-align:center;color:var(--muted);font-size:.72rem}.modal-rating{display:flex;justify-content:center;gap:12px;margin:18px 0}.modal-rating button{width:48px;height:48px;border:1px solid #e2e6ed;border-radius:14px;background:#f8fafc;font-size:1.35rem}.modal-card textarea{width:100%;min-height:85px;padding:12px;border:1px solid #dce1e9;border-radius:12px;resize:vertical;font-size:.7rem}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:13px}
@media(max-width:390px){.quick-actions button span{display:none}.book-grid{grid-template-columns:1fr}.book-card:before{display:none}.visit-meta strong{font-size:.6rem}}
