﻿:root{
  --navy:#17324d;--navy2:#244b6d;--ink:#10212f;--muted:#708090;--line:#dbe5ee;
  --bg:#f5f8fb;--card:#fff;--green:#138a63;--green-soft:#e7f6f0;--amber:#9a6500;
  --amber-soft:#fff3d9;--red:#ba3b45;--red-soft:#fdecef;--blue-soft:#e9f2fb;
  --shadow:0 12px 34px rgba(23,50,77,.09)
}
*{box-sizing:border-box}
html,body{min-height:100%}
body.driver-shell{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Tahoma,sans-serif}
html[dir=rtl] body.driver-shell{font-family:Tahoma,Arial,sans-serif}
.driver-container{max-width:1480px;margin:0 auto;padding-left:20px;padding-right:20px}
.driver-topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:1020}
.driver-topbar .driver-container{height:100%;display:flex;align-items:center;justify-content:space-between}
.driver-brand{display:flex;align-items:center;gap:12px;color:var(--navy);font-weight:800;text-decoration:none;font-size:18px}
.driver-brand img{height:38px;max-width:110px;object-fit:contain}
.driver-top-actions{display:flex;align-items:center;gap:12px}
.lang-chip{display:inline-flex;align-items:center;justify-content:center;height:36px;min-width:42px;border:1px solid var(--line);border-radius:11px;color:var(--navy);font-weight:800;text-decoration:none;background:#fff}
.driver-user{font-weight:700;color:#4a5c6c}
.driver-menu-btn{width:42px;height:42px;border:1px solid var(--line);background:#fff;border-radius:12px;display:grid;place-content:center;gap:4px}
.driver-menu-btn span{display:block;width:20px;height:2px;background:var(--navy);border-radius:5px}
.driver-main{padding:28px 0 54px}
.driver-page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.driver-page-head h1{font-size:27px;margin:0;font-weight:800;color:var(--navy)}
.page-branch{color:var(--muted);font-size:13px;margin-top:4px}
.driver-nav{width:320px!important}
.driver-nav-links{display:grid;gap:7px}
.driver-nav-links a{padding:13px 14px;border-radius:12px;text-decoration:none;color:#34495a;font-weight:700}
.driver-nav-links a.active,.driver-nav-links a:hover{background:var(--blue-soft);color:var(--navy)}
.driver-primary-btn,.driver-secondary-btn,.driver-success-btn,.driver-danger-btn,.camera-btn,.export-btn{border:0;border-radius:12px;font-weight:800;padding:11px 16px}
.driver-primary-btn{background:var(--navy);color:#fff}
.driver-primary-btn:hover{background:#0e263a;color:#fff}
.driver-secondary-btn{background:var(--blue-soft);color:var(--navy)}
.driver-success-btn{background:var(--green);color:#fff}
.driver-danger-btn{background:var(--red-soft);color:var(--red)}
.driver-ghost-danger{border:0;background:transparent;color:var(--red);font-weight:800}
.camera-btn{background:#eef3f7;color:var(--navy)}
.driver-alert{border-radius:14px;box-shadow:none}
.driver-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}
.driver-kpi{background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:0 6px 18px rgba(23,50,77,.04)}
.driver-kpi span{display:block;color:var(--muted);font-size:13px;font-weight:700;margin-bottom:6px}
.driver-kpi strong{font-size:27px;color:var(--navy)}
.driver-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.driver-admin-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:18px;box-shadow:var(--shadow)}
.driver-admin-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.driver-admin-card-head h3{font-size:20px;color:var(--navy);margin:0 0 5px;font-weight:800}
.account-warning{display:inline-flex;background:var(--amber-soft);color:var(--amber);padding:4px 8px;border-radius:8px;font-size:11px;font-weight:800}
.driver-card-metrics{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.driver-card-metrics span{background:#f5f8fb;border:1px solid var(--line);border-radius:10px;padding:7px 9px;color:#607282;font-size:11px}
.driver-card-metrics b{color:var(--navy);margin-inline-start:3px}
.admin-current-order{margin-top:15px;border:1px solid #b8ddcf;background:var(--green-soft);border-radius:16px;padding:14px}
.admin-order-top,.queue-card-top,.delivery-card-status{display:flex;align-items:center;justify-content:space-between;gap:10px}
.status-pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}
.status-pill.current{background:#d8f2e8;color:#08714e}.status-pill.queued{background:var(--amber-soft);color:var(--amber)}
.status-pill.delivered{background:var(--green-soft);color:var(--green)}.status-pill.cancelled{background:var(--red-soft);color:var(--red)}
.live-timer{font-variant-numeric:tabular-nums;font-weight:800;color:var(--navy);letter-spacing:.4px}
.admin-order-no{font-size:26px;font-weight:900;color:var(--navy);margin-top:10px}
.admin-order-amount{font-weight:800;color:#3b5264;margin-top:3px}
.admin-queue-list{margin-top:10px;display:grid;gap:8px}
.admin-queue-row{display:flex;justify-content:space-between;align-items:center;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#fbfcfd}
.admin-queue-row>div{display:flex;align-items:center;gap:8px}
.driver-login-wrap{min-height:calc(100vh - 125px);display:grid;place-items:center;padding:30px 0}
.driver-login-card{width:min(100%,440px);background:#fff;border:1px solid var(--line);border-radius:24px;padding:30px;box-shadow:var(--shadow)}
.driver-login-logo{text-align:center;margin-bottom:12px}.driver-login-logo img{height:58px;max-width:150px;object-fit:contain}
.driver-login-card h1{text-align:center;color:var(--navy);font-size:22px;font-weight:900;margin:0 0 24px}
.driver-login-form{display:grid;gap:14px}.driver-login-form label,.driver-settings-card label,.driver-user-card label,.report-filter-card label{font-size:12px;font-weight:800;color:#526677;margin-bottom:6px}
.role-toggle{display:grid;grid-template-columns:1fr 1fr;background:#f2f6f9;border-radius:14px;padding:4px}
.role-toggle label{margin:0}.role-toggle input{position:absolute;opacity:0}.role-toggle span{display:flex;justify-content:center;padding:10px;border-radius:11px;cursor:pointer}
.role-toggle input:checked+span{background:#fff;color:var(--navy);box-shadow:0 3px 10px rgba(23,50,77,.08)}
.form-control,.form-select{border-color:#cfdbe5;border-radius:11px;min-height:44px}
.form-control:focus,.form-select:focus{border-color:#7897b0;box-shadow:0 0 0 .2rem rgba(23,50,77,.08)}
.scan-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px;margin-bottom:18px;box-shadow:0 6px 20px rgba(23,50,77,.04)}
.scan-input-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:9px}
.current-delivery-card{background:#fff;border:2px solid #90cbb5;border-radius:22px;padding:20px;box-shadow:var(--shadow);margin-bottom:22px}
.delivery-order-number{font-size:38px;line-height:1.1;font-weight:900;color:var(--navy);margin:18px 0}
.delivery-amounts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}
.delivery-amounts>div{background:#f5f8fb;border-radius:14px;padding:12px}.delivery-amounts span{display:block;color:var(--muted);font-size:12px;font-weight:700}.delivery-amounts strong{font-size:21px;color:var(--navy)}
.delivery-actions{display:flex;gap:10px;align-items:center}.delivery-actions form{margin:0}
.driver-section{margin-top:25px}.driver-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.driver-section-title h2,.report-section h2{font-size:19px;color:var(--navy);font-weight:900;margin:0}
.driver-section-title>span{background:var(--navy);color:#fff;min-width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:800}
.driver-queue-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.queue-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:15px}
.queue-order-no{font-size:24px;font-weight:900;color:var(--navy);margin-top:12px}.queue-order-amount{color:#536a7c;font-weight:800;margin:2px 0 13px}
.queue-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.queue-actions form{margin:0}
.driver-modal{border:0;border-radius:20px;overflow:hidden}
.barcode-reader{width:100%;min-height:280px}.barcode-reader video,#nativeScannerVideo{width:100%!important;border-radius:14px}
#nativeScannerVideo{display:none;max-height:420px;object-fit:cover}
.delivery-modal-label{font-size:12px;font-weight:900;color:#53697a;margin-bottom:7px}
.payment-row{display:grid;grid-template-columns:1.2fr 1fr 38px;gap:7px;margin-bottom:8px}
.payment-remove{border:0;background:var(--red-soft);color:var(--red);border-radius:10px;font-size:20px}
.add-payment-btn{background:#eef3f7;color:var(--navy);font-weight:800;margin-bottom:16px}
.photo-capture-block{margin-top:8px;padding-top:14px;border-top:1px solid var(--line)}
.photo-preview{display:none;width:100%;max-height:220px;object-fit:cover;border-radius:13px;margin-top:10px}
.photo-size{font-size:11px;color:var(--muted);display:block;margin-top:5px}
.driver-user-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.driver-user-card,.driver-settings-card,.report-filter-card,.report-section{background:#fff;border:1px solid var(--line);border-radius:18px;padding:17px;box-shadow:0 5px 18px rgba(23,50,77,.035)}
.driver-user-card{display:grid;gap:12px}.driver-user-card.suspended{opacity:.55}.driver-user-card.dashboard-hidden{border-color:#d9dee3;background:#f8f9fa}.driver-user-card.dashboard-hidden .driver-user-card-title strong{color:#73818d}
.driver-user-card-title{display:flex;justify-content:space-between;align-items:center}.driver-user-card-title strong{font-size:18px;color:var(--navy)}.driver-user-card-title span{font-size:12px;color:var(--muted)}
.driver-switch-row{display:flex;align-items:center;gap:8px;margin:0!important}.driver-switch-row input{width:18px;height:18px}.dashboard-visibility-switch{padding-top:8px;border-top:1px dashed #e1e7ec}
.driver-settings-card{max-width:560px;display:grid;gap:15px}
.report-filter-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.report-actions{grid-column:1/-1;display:flex;gap:9px;flex-wrap:wrap}.export-btn.excel{background:#e6f5ed;color:#16714e}.export-btn.pdf{background:#fdecef;color:#a52d39}
.report-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.report-section{margin-top:18px}.report-section h2{margin-bottom:14px}
.report-table{margin:0}.report-table thead th{background:#f1f5f8;color:#405668;border-bottom:0;font-size:12px;white-space:nowrap}.report-table td{vertical-align:middle;font-size:13px}
.payment-settlement-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.settlement-card{border:1px solid var(--line);border-radius:15px;padding:14px}.settlement-card h3{font-size:17px;font-weight:900;color:var(--navy);margin:0 0 10px}.settlement-card>div{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px dashed #e2e8ee}.settlement-card>div:last-child{border-bottom:0}.settlement-total{font-weight:900;color:var(--navy)}
.delivery-report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.delivery-report-card{border:1px solid var(--line);border-radius:16px;padding:14px}
.delivery-report-top{display:flex;justify-content:space-between;gap:10px}.delivery-report-top>div{display:flex;align-items:baseline;gap:9px}.delivery-report-top strong{font-size:20px;color:var(--navy)}.delivery-report-top>div span{color:var(--muted);font-size:12px}
.report-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}.report-detail-grid>div{background:#f6f9fb;border-radius:10px;padding:8px}.report-detail-grid span{display:block;font-size:10px;color:var(--muted);font-weight:700}.report-detail-grid b{font-size:12px;color:#354c5d}
.report-payment-line{margin-top:9px;font-size:12px;color:#4f6475}
.report-card-actions{display:flex;gap:8px;margin-top:10px}.photo-link,.external-close{display:inline-flex;padding:6px 9px;border-radius:9px;font-size:11px;font-weight:800;text-decoration:none}.photo-link{background:var(--blue-soft);color:var(--navy)}.external-close{background:var(--amber-soft);color:var(--amber)}
@media(max-width:1000px){
 .driver-dashboard-grid,.delivery-report-grid{grid-template-columns:1fr}
 .driver-user-grid,.payment-settlement-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .report-filter-card{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
 .driver-container{padding-left:12px;padding-right:12px}.driver-topbar{height:62px}.driver-main{padding-top:16px}
 .driver-brand span{font-size:14px}.driver-brand img{height:31px;max-width:82px}
 .driver-user{display:none!important}.driver-page-head h1{font-size:22px}
 .driver-kpis,.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.driver-kpi{padding:13px}.driver-kpi strong{font-size:22px}
 .driver-dashboard-grid,.driver-queue-grid,.driver-user-grid,.payment-settlement-grid{grid-template-columns:1fr}
 .driver-admin-card{padding:14px}.driver-admin-card-head{display:block}.driver-card-metrics{justify-content:flex-start;margin-top:10px}
 .scan-input-row{grid-template-columns:1fr auto}.camera-btn{grid-column:1/-1}.scan-submit{min-width:74px}
 .current-delivery-card{padding:16px}.delivery-order-number{font-size:32px}.delivery-amounts{gap:8px}.delivery-actions{display:grid;grid-template-columns:1fr 1fr}.delivery-actions .btn{width:100%}
 .report-filter-card{grid-template-columns:1fr}.report-actions{display:grid;grid-template-columns:1fr 1fr}.report-actions .driver-primary-btn{grid-column:1/-1}
 .report-detail-grid{grid-template-columns:repeat(2,1fr)}
 .driver-login-card{padding:22px;border-radius:20px}
}

/* PWA install gate */
.pwa-install-gate{display:none}html.pwa-install-required,html.pwa-install-required body{min-height:100%;overflow:hidden}html.pwa-install-required .pwa-install-gate{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom));background:radial-gradient(circle at 12% 0%,rgba(214,165,63,.16),transparent 28%),linear-gradient(160deg,#f8fafc 0%,#eef3f8 100%);overflow:auto}.pwa-install-card{width:min(460px,100%);background:rgba(255,255,255,.97);border:1px solid rgba(218,225,234,.95);border-radius:26px;padding:20px;box-shadow:0 24px 70px rgba(20,61,105,.14)}.pwa-install-card-top{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:3px}.pwa-install-logo{width:76px;height:76px;object-fit:contain}.pwa-app-label{margin-top:8px;color:#c6922e;font-size:.62rem;font-weight:900;letter-spacing:.08em;direction:ltr}.pwa-gate-language{position:absolute;top:0;inset-inline-end:0;display:inline-flex;gap:3px;padding:3px;border:1px solid #e1e7ee;border-radius:11px;background:#fff}.pwa-gate-language button{min-width:31px;height:28px;padding:0 6px;border:0;border-radius:8px;background:transparent;color:#7c8798;font-size:.64rem;font-weight:900}.pwa-gate-language button.active{background:#173f70;color:#fff}.pwa-install-copy{max-width:360px;margin:17px auto 15px;text-align:center}.pwa-install-copy h1{margin:0;color:#14243a;font-size:1.45rem;line-height:1.3;font-weight:900}.pwa-install-copy p{margin:7px 0 0;color:#77859a;font-size:.78rem;line-height:1.7}.pwa-platform-panel{padding:14px;border:1px solid #e4eaf1;border-radius:19px;background:#fbfcfe}.pwa-platform-heading{display:flex;align-items:center;gap:10px;margin-bottom:12px;text-align:start}.pwa-platform-mark{width:38px;height:38px;flex:0 0 auto;display:grid;place-items:center;border-radius:12px;font-weight:900}.pwa-platform-mark.android{background:#eaf7ef;color:#1c8a50}.pwa-platform-mark.apple{background:#edf1f6;color:#182236;font-size:.85rem}.pwa-platform-heading strong{display:block;color:#1c293c;font-size:.9rem;direction:ltr}.pwa-platform-heading small{display:block;margin-top:2px;color:#8a95a5;font-size:.67rem}.pwa-install-button{width:100%;min-height:49px;display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:14px;background:#173f70;color:#fff;font-size:.86rem;font-weight:900;box-shadow:0 10px 24px rgba(23,63,112,.18)}.pwa-install-button.installed{background:#198754}.pwa-mini-guide{margin-top:12px;padding-top:12px;border-top:1px solid #e6ebf1}.pwa-guide-steps{display:grid;gap:8px}.pwa-guide-steps.compact{grid-template-columns:1fr 1fr}.pwa-guide-step{min-width:0;display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #e7ebf1;border-radius:14px;background:#fff;text-align:start}.pwa-step-visual{width:39px;height:39px;flex:0 0 auto;display:grid;place-items:center;border-radius:11px;background:#edf3f9;color:#173f70;font-size:1.35rem;direction:ltr}.pwa-step-visual.home{background:#f7f0df;color:#9d7629}.pwa-guide-step b{width:18px;height:18px;display:inline-grid;place-items:center;margin-inline-end:5px;border-radius:6px;background:#f0f3f7;color:#68768a;font-size:.58rem}.pwa-guide-step strong{color:#273449;font-size:.72rem;font-weight:900;line-height:1.4}@media(max-width:420px){.pwa-install-card{padding:17px 14px;border-radius:22px}.pwa-install-logo{width:68px;height:68px}.pwa-guide-steps.compact{grid-template-columns:1fr}}

/* Operation feedback: keep save/deliver/cancel confirmations clearly visible. */
.driver-notification-stack{position:fixed;top:78px;left:50%;transform:translateX(-50%);z-index:1090;width:min(520px,calc(100% - 28px));pointer-events:none}
.driver-operation-message{margin:0;border:1px solid #b8dfc8;border-radius:14px;box-shadow:0 14px 34px rgba(20,61,105,.14);font-size:.9rem;pointer-events:auto}
html[dir="rtl"] .driver-operation-message .btn-close{margin-left:0;margin-right:auto}
@media(max-width:575.98px){.driver-notification-stack{top:68px;width:calc(100% - 20px)}.driver-operation-message{font-size:.84rem}}

/* Compact operations dashboard */
.dashboard-page-head{margin-bottom:14px}
.dashboard-kpis{gap:10px;margin-bottom:14px}
.dashboard-kpi{position:relative;overflow:hidden;padding:13px 15px;border-radius:15px;min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.dashboard-kpi span{margin:0;font-size:12px}
.dashboard-kpi strong{font-size:25px;line-height:1}
.dashboard-kpi:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:#6f8ca5}
.dashboard-kpi.delivered:before{background:var(--green)}
.dashboard-kpi.collected:before{background:#c6922e}
.driver-dashboard-grid.compact-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start}
.compact-driver-card{position:relative;padding:13px;border:1px solid #dce5ec;border-radius:18px;box-shadow:0 8px 24px rgba(23,50,77,.06);min-width:0;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease,transform .2s ease}
.compact-driver-card:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:5px;background:#aab8c3}
.compact-driver-card.is-idle{border-color:#b9dfcf;background:linear-gradient(145deg,#ffffff 0%,#f4fbf7 100%);box-shadow:0 8px 24px rgba(25,122,83,.08)}
.compact-driver-card.is-idle:before{background:#24a06b}
.compact-driver-card.is-idle .driver-avatar{background:linear-gradient(145deg,#16865a,#2bb77d);box-shadow:0 5px 13px rgba(22,134,90,.22)}
.compact-driver-card.is-idle .compact-driver-head{padding-bottom:0;border-bottom:0}
.compact-driver-card.is-working{border-color:#e8c985;background:linear-gradient(145deg,#ffffff 0%,#fff9ed 100%);box-shadow:0 8px 24px rgba(185,126,24,.10)}
.compact-driver-card.is-working:before{background:#e29a1d}
.compact-driver-card.is-working .driver-avatar{background:linear-gradient(145deg,#b97610,#eca52c);box-shadow:0 5px 13px rgba(185,118,16,.22)}
.compact-driver-card.is-overdue{border-color:#e7aaa8;background:linear-gradient(145deg,#ffffff 0%,#fff3f2 100%);box-shadow:0 9px 26px rgba(190,57,52,.13)}
.compact-driver-card.is-overdue:before{background:#d74b45}
.compact-driver-card.is-overdue .driver-avatar{background:linear-gradient(145deg,#b73531,#df5a54);box-shadow:0 5px 13px rgba(183,53,49,.24)}
.compact-driver-card:hover{transform:translateY(-1px)}
.compact-driver-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid #edf1f5}
.driver-identity{display:flex;align-items:center;gap:9px;min-width:0}
.driver-avatar{width:34px;height:34px;flex:0 0 34px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(145deg,#17324d,#315f84);color:#fff;font-size:14px;font-weight:900;box-shadow:0 5px 12px rgba(23,50,77,.16)}
.driver-name-wrap{min-width:0}
.driver-name-wrap h3{margin:0;color:var(--navy);font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
.driver-name-wrap .account-warning{margin-top:3px;font-size:9px;padding:2px 6px}
.compact-driver-metrics{display:flex;gap:5px;flex:0 0 auto}
.compact-driver-metrics span{min-width:54px;display:grid;justify-items:center;padding:4px 6px;border-radius:9px;background:#f6f9fb;border:1px solid #e8eef3;color:#718190;font-size:8px;line-height:1.25;white-space:nowrap}
.compact-driver-metrics b{display:block;color:var(--navy);font-size:11px;margin-bottom:1px}
.compact-section{padding-top:9px}
.compact-section+.compact-section{margin-top:8px;border-top:1px solid #f0f3f6}
.compact-section-label{height:18px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:#7b8997;font-size:9px;font-weight:900;text-transform:none}
.compact-section-label b{min-width:18px;height:18px;padding:0 5px;border-radius:6px;display:grid;place-items:center;background:#eef3f7;color:#53697b;font-size:9px}
.compact-current-order{height:45px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #bfe0d3;background:linear-gradient(135deg,#edf9f5,#f8fcfb);border-radius:11px}
.compact-current-main{display:flex;align-items:center;gap:7px;min-width:0}
.current-indicator{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(19,138,99,.11);flex:0 0 auto}
.compact-current-main strong{font-size:15px;color:var(--navy);white-space:nowrap}
.compact-order-amount{font-size:9px;font-weight:800;color:#668071;white-space:nowrap}
.current-timer{font-size:11px;letter-spacing:.2px;white-space:nowrap}
.empty-current{border-color:#e5ebf0;background:#fafcfd;color:#a3aeba}
.empty-current .current-indicator{background:#b6c1cb;box-shadow:none}
.empty-current .current-timer{color:#a8b2bc}
.compact-horizontal-list{display:flex;gap:6px;min-height:34px;align-items:center;overflow-x:auto;overflow-y:hidden;padding:2px 1px 3px;scrollbar-width:thin;scrollbar-color:#d6e0e8 transparent}
.compact-horizontal-list::-webkit-scrollbar{height:4px}.compact-horizontal-list::-webkit-scrollbar-thumb{background:#d6e0e8;border-radius:9px}
.queue-chip{flex:0 0 auto;min-width:94px;height:31px;display:flex;align-items:center;justify-content:space-between;gap:7px;border-radius:9px;padding:0 7px}
.queue-chip{background:#fff8e9;border:1px solid #f0dfb8}
.queue-chip strong{font-size:10px;color:#75551b}.queue-chip .live-timer{font-size:9px;color:#9b721e}
.compact-empty-value{color:#b2bcc5;font-weight:900;padding-inline:3px}

/* Split payment entry */
.payment-row{grid-template-columns:minmax(125px,1.25fr) minmax(100px,1fr) 38px;align-items:center}
.payment-amount{font-variant-numeric:tabular-nums;font-weight:800;text-align:center}
.payment-total-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-1px 0 10px;padding:8px 10px;border-radius:10px;background:#f6f9fb;border:1px solid #e5ecf2;color:#657888;font-size:10px;font-weight:800}
.payment-total-strip span{display:flex;align-items:center;gap:6px}
.payment-total-strip strong{color:var(--navy);font-size:12px;font-variant-numeric:tabular-nums}
#paymentRemaining.has-balance{color:var(--amber)}
#paymentRemaining.is-zero{color:var(--green)}
.add-payment-btn{margin-bottom:16px}

@media(max-width:1280px){
 .driver-dashboard-grid.compact-board{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
 .driver-dashboard-grid.compact-board{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
 .dashboard-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
 .dashboard-kpi{min-height:64px;padding:10px;display:block}.dashboard-kpi span{font-size:9px;margin-bottom:5px}.dashboard-kpi strong{font-size:20px}
 .driver-dashboard-grid.compact-board{grid-template-columns:1fr;gap:10px}
 .compact-driver-card{padding:12px}
 .driver-name-wrap h3{max-width:130px}
 .compact-driver-metrics span{min-width:48px;padding:4px;font-size:7px}.compact-driver-metrics b{font-size:10px}
 .payment-row{grid-template-columns:minmax(0,1.2fr) minmax(92px,.8fr) 36px}
}
@media(max-width:420px){
 .dashboard-kpis{gap:6px}.dashboard-kpi{padding:9px 8px}.dashboard-kpi strong{font-size:18px}
 .compact-driver-head{gap:7px}.driver-avatar{width:31px;height:31px;flex-basis:31px}.driver-name-wrap h3{font-size:14px;max-width:108px}
 .compact-driver-metrics{gap:3px}.compact-driver-metrics span{min-width:43px}
 .payment-row{grid-template-columns:1fr 88px 34px;gap:5px}
 .payment-total-strip{font-size:9px;padding:7px 8px}.payment-total-strip strong{font-size:11px}
}

/* Order, customer and item details */
.live-dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard-kpi.working:before{background:#557a9a}
.dashboard-kpi.current-live:before{background:var(--green)}
.dashboard-kpi.queued-live:before{background:#c6922e}

.order-rich-card{padding:18px}
.delivery-reference-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:15px 0 12px}
.main-order-reference{font-size:34px;line-height:1;font-weight:950;color:var(--navy);letter-spacing:-.5px}
.daily-order-badge{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:10px;background:#eef4f8;border:1px solid #dce7ee;color:#607488;font-size:10px;font-weight:850;white-space:nowrap}
.daily-order-badge b{font-size:13px;color:var(--navy)}
.daily-order-badge.compact{padding:3px 6px;border-radius:7px;font-size:8px}.daily-order-badge.compact b{font-size:10px}
.order-customer-block{border:1px solid #dce6ee;background:#fbfdfe;border-radius:15px;padding:13px;margin-bottom:12px}
.order-customer-name{font-size:18px;font-weight:900;color:var(--navy);margin-bottom:6px}
.order-phone-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px;direction:ltr;justify-content:flex-start}
html[dir="rtl"] .order-phone-row{justify-content:flex-end}
.order-phone-row a,.dashboard-phone-row a{display:inline-flex;align-items:center;padding:5px 8px;border-radius:8px;background:#eaf2f8;color:#174d75;text-decoration:none;font-size:11px;font-weight:850;direction:ltr}
.order-address-grid,.dashboard-address-grid{display:flex;gap:6px;flex-wrap:wrap}
.order-address-grid span,.dashboard-address-grid span{display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border-radius:8px;background:#fff;border:1px solid #e4ebf1;color:#526879;font-size:10px}
.order-address-grid b,.dashboard-address-grid b{color:#8795a2;font-size:8px;font-weight:900}
.order-address-notes,.dashboard-address-notes{display:flex;gap:7px;align-items:flex-start;margin-top:7px;padding-top:7px;border-top:1px dashed #e0e7ed;color:#526879;font-size:10px}
.order-address-notes b,.dashboard-address-notes b{color:#8795a2;font-size:9px;white-space:nowrap}
.order-block-title{font-size:10px;color:#748492;font-weight:900;margin-bottom:6px}
.order-items-block{margin-bottom:14px}
.order-items-table-wrap{overflow-x:auto;border:1px solid #e0e8ef;border-radius:13px;background:#fff}
.order-items-table{width:100%;border-collapse:collapse;min-width:480px}
.order-items-table th{padding:7px 9px;background:#f3f7fa;color:#7a8997;font-size:9px;font-weight:900;text-align:start;border-bottom:1px solid #e3eaf0}
.order-items-table td{padding:8px 9px;color:#445a6b;font-size:11px;font-weight:700;border-bottom:1px solid #edf1f4;font-variant-numeric:tabular-nums}
.order-items-table tr:last-child td{border-bottom:0}
.order-items-table th:not(:first-child),.order-items-table td:not(:first-child){text-align:center;white-space:nowrap}
.order-items-table td:first-child{color:var(--navy);font-weight:850}

.rich-queue-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.queue-rich-card{padding:0;overflow:hidden;background:#fff}
.queue-rich-card>summary{list-style:none}.queue-rich-card>summary::-webkit-details-marker{display:none}
.queue-rich-summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:11px 12px;cursor:pointer;background:#fff}
.queue-rich-card[open] .queue-rich-summary{background:#fffaf0;border-bottom:1px solid #eee4ca}
.queue-summary-ref{display:flex;align-items:center;gap:6px}.queue-summary-ref>strong{font-size:14px;color:var(--navy);white-space:nowrap}
.queue-summary-customer{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#405667;font-size:11px;font-weight:850}
.queue-summary-side{display:grid;justify-items:end;gap:2px;white-space:nowrap;font-size:10px;font-weight:850;color:#536a7c}.queue-summary-side .live-timer{font-size:9px;color:#8d6a24}
.queue-rich-body{padding:11px 12px 12px;background:#fff}
.compact-address{margin-bottom:7px}
.queue-items-list{display:grid;margin:9px 0;border:1px solid #e6ecf1;border-radius:10px;overflow:hidden}
.queue-item-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:7px 8px;border-bottom:1px solid #eef2f5;font-size:9px;color:#607181;font-variant-numeric:tabular-nums}
.queue-item-row:last-child{border-bottom:0}.queue-item-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#314c62;font-weight:850}.queue-item-row strong{color:var(--navy)}

.rich-dashboard-board{align-items:start}
.rich-driver-card{overflow:visible}
.live-driver-metrics span{min-width:49px}
.dashboard-no-current{min-height:42px;display:flex;align-items:center;gap:9px;padding:8px 10px;border:1px solid #e6ebef;background:#fafcfd;border-radius:10px;color:#a3aeba}
.dashboard-order-detail{border:1px solid #e1e8ee;border-radius:10px;background:#fff;overflow:hidden}
.dashboard-order-detail.current-order-detail{border-color:#bfe0d3;background:#fbfefd}
.dashboard-order-detail.queued-order-detail{border-color:#eadfca;background:#fffdfa}
.dashboard-order-detail>summary{list-style:none;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;min-height:43px;padding:7px 8px;cursor:pointer}
.dashboard-order-detail>summary::-webkit-details-marker{display:none}
.dashboard-order-detail[open]>summary{border-bottom:1px solid #e8edf1}
.dashboard-order-ref{display:flex;align-items:center;gap:5px;min-width:0}
.dashboard-order-ref strong{font-size:12px;color:var(--navy);white-space:nowrap}
.dashboard-daily-no{display:inline-flex;align-items:center;gap:3px;padding:3px 5px;border-radius:6px;background:#eef3f7;color:#6d7f8e;font-size:7px;font-weight:900;white-space:nowrap}.dashboard-daily-no b{font-size:9px;color:var(--navy)}
.dashboard-order-customer{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:#455b6c;font-weight:850}
.dashboard-order-side{display:grid;justify-items:end;gap:1px;white-space:nowrap}.dashboard-order-amount{font-size:8px;color:#71818d;font-weight:850}.dashboard-order-side .live-timer{font-size:9px}
.dashboard-order-body{padding:8px;background:#fff}
.dashboard-phone-row{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:6px;direction:ltr}
html[dir="rtl"] .dashboard-phone-row{justify-content:flex-end}
.dashboard-phone-row a{font-size:8px;padding:4px 6px}
.dashboard-address-grid{gap:4px}.dashboard-address-grid span{padding:3px 5px;border-radius:6px;font-size:8px}.dashboard-address-grid b{font-size:7px}
.dashboard-address-notes{font-size:8px;margin-top:5px;padding-top:5px}.dashboard-address-notes b{font-size:7px}
.dashboard-items-block{margin-top:7px;border:1px solid #e8edf1;border-radius:8px;overflow:hidden}
.dashboard-items-head,.dashboard-item-row{display:grid;grid-template-columns:minmax(0,1.6fr) .45fr .65fr .65fr;gap:4px;align-items:center;padding:5px 6px;text-align:center}
.dashboard-items-head{background:#f4f7f9;color:#81909c;font-size:6.5px;font-weight:900}.dashboard-items-head span:first-child{text-align:start}
.dashboard-item-row{border-top:1px solid #eef2f5;color:#5e7180;font-size:7.5px;font-variant-numeric:tabular-nums}.dashboard-item-row>span:first-child{text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#385267;font-weight:800}.dashboard-item-row strong{color:var(--navy)}
.dashboard-queue-list{display:grid;gap:5px;max-height:185px;overflow:auto;padding-inline-end:2px;scrollbar-width:thin;scrollbar-color:#d5dfe7 transparent}
.dashboard-queue-list::-webkit-scrollbar{width:4px}.dashboard-queue-list::-webkit-scrollbar-thumb{background:#d5dfe7;border-radius:8px}

@media(max-width:980px){
 .live-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .rich-queue-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
 .live-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .order-rich-card{padding:14px}.main-order-reference{font-size:29px}
 .order-customer-name{font-size:16px}
 .order-items-table{min-width:420px}
 .dashboard-queue-list{max-height:none}
}
@media(max-width:480px){
 .delivery-reference-line{margin-top:12px}.main-order-reference{font-size:27px}
 .order-address-grid span{font-size:9px}.order-address-grid b{font-size:7px}
 .queue-rich-summary{grid-template-columns:1fr auto;gap:6px}.queue-summary-customer{grid-column:1/-1;grid-row:2}
 .queue-summary-side{grid-column:2;grid-row:1}
 .live-dashboard-kpis{gap:6px}
 .dashboard-order-detail>summary{grid-template-columns:1fr auto;gap:5px}.dashboard-order-customer{grid-column:1/-1;grid-row:2;padding-inline-start:13px}.dashboard-order-side{grid-column:2;grid-row:1}
}

/* Mobile-first driver details and collapsed dashboard orders */
.driver-customer-card{padding:14px;background:#fff;border-color:#dbe5ec;box-shadow:0 5px 18px rgba(19,48,70,.045)}
.driver-customer-topline,.queue-customer-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.driver-info-label{display:block;color:#8a98a4;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.35px;margin-bottom:2px}
.driver-customer-no,.queue-customer-heading small{display:block;margin-top:3px;color:#738391;font-size:10px;font-weight:750}
.driver-customer-no b{color:#3e5669}
.driver-phone-actions{margin:0;flex-shrink:0}
.driver-phone-actions a{min-height:34px;padding:7px 10px;border-radius:10px;font-size:11px;background:#edf5fa;border:1px solid #dbeaf4}
.driver-address-card{margin-top:12px;border:1px solid #dfe7ed;border-radius:14px;overflow:hidden;background:#f9fbfc}
.driver-card-section-title{padding:8px 11px;background:#eef3f6;color:#6f7f8c;font-size:9px;font-weight:950;letter-spacing:.2px}
.driver-area-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;background:#fff;border-bottom:1px solid #e8eef2}
.driver-area-row span{color:#7b8b98;font-size:10px;font-weight:800}
.driver-area-row strong{color:var(--navy);font-size:15px;font-weight:950;text-align:end}
.driver-address-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#fff}
.driver-address-details>div{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-inline-end:1px solid #edf1f4;border-bottom:1px solid #edf1f4;min-width:0}
.driver-address-details>div:nth-child(3n){border-inline-end:0}
.driver-address-details span,.driver-address-note span{color:#8996a1;font-size:8px;font-weight:900}
.driver-address-details strong{color:#334e63;font-size:12px;font-weight:900;overflow-wrap:anywhere}
.driver-address-note{display:flex;flex-direction:column;gap:3px;padding:10px 12px;background:#fff8e9;border-top:1px solid #f0e4c9}
.driver-address-note strong{color:#5d523c;font-size:11px;font-weight:800;line-height:1.55;overflow-wrap:anywhere}
.driver-items-card{margin-bottom:14px;border:1px solid #dfe7ed;border-radius:14px;overflow:hidden;background:#fff}
.driver-item-list{display:grid}
.driver-item-card{padding:10px 12px;border-top:1px solid #edf1f4}
.driver-item-card:first-child{border-top:0}
.driver-item-main{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.driver-item-name{color:var(--navy);font-size:12px;font-weight:900;line-height:1.4;min-width:0;overflow-wrap:anywhere}
.driver-item-total{color:#204e3f;font-size:13px;font-weight:950;white-space:nowrap;font-variant-numeric:tabular-nums}
.driver-item-meta{display:flex;gap:14px;flex-wrap:wrap;margin-top:5px;color:#8795a0;font-size:9px;font-weight:800}
.driver-item-meta b{color:#516878;font-size:10px;margin-inline-start:3px;font-variant-numeric:tabular-nums}
.queue-customer-details{display:grid;gap:10px}
.queue-customer-heading>div:first-child{min-width:0}.queue-customer-heading>div:first-child>strong{display:block;color:var(--navy);font-size:13px;font-weight:900;overflow-wrap:anywhere}
.compact-driver-address{margin-top:0}.compact-driver-items{margin:0}

.dashboard-order-compact>summary.dashboard-order-compact-summary{display:grid;grid-template-columns:.7fr 1.05fr 1.45fr 1fr .8fr;align-items:stretch;gap:0;padding:0;min-height:48px;background:#fff}
.dashboard-order-compact.current-order-detail>summary{box-shadow:inset 3px 0 0 var(--green)}
html[dir="rtl"] .dashboard-order-compact.current-order-detail>summary{box-shadow:inset -3px 0 0 var(--green)}
.dashboard-order-compact.queued-order-detail>summary{box-shadow:inset 3px 0 0 #d3a249}
html[dir="rtl"] .dashboard-order-compact.queued-order-detail>summary{box-shadow:inset -3px 0 0 #d3a249}
.dashboard-summary-field{display:flex;flex-direction:column;justify-content:center;gap:1px;min-width:0;padding:7px 7px;border-inline-end:1px solid #edf1f4}
.dashboard-summary-field:last-child{border-inline-end:0}
.dashboard-summary-field small{display:block;color:#84929d;font-size:7.5px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dashboard-summary-field strong{display:block;color:#405768;font-size:10px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dashboard-summary-field.daily-field strong{font-size:13px;color:var(--navy)}
.dashboard-summary-field.amount-field{text-align:end}.dashboard-summary-field.amount-field strong{font-size:11px;color:#1f5744;font-variant-numeric:tabular-nums}
.dashboard-summary-field.phone-field strong{font-variant-numeric:tabular-nums;direction:ltr;text-align:start}.dashboard-summary-field.timer-field{text-align:center}.dashboard-summary-field.timer-field strong{font-size:9.5px;color:#526b7c;font-variant-numeric:tabular-nums;letter-spacing:.15px}
.dashboard-order-compact[open]>summary{background:#f8fbfd}
.dashboard-expanded-detail{padding:8px 9px 9px}
.dashboard-expanded-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;padding-bottom:6px;border-bottom:1px dashed #dfe7ed}
.dashboard-expanded-head>strong{font-size:11px;color:var(--navy)}
.dashboard-expanded-head .live-timer{font-size:9px;color:#657987;font-variant-numeric:tabular-nums}

@media(max-width:720px){
 .driver-customer-card{padding:12px}
 .driver-customer-topline,.queue-customer-heading{display:grid;grid-template-columns:1fr;gap:8px}
 .driver-phone-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .driver-phone-actions a{justify-content:center;font-size:12px;min-height:39px}
 .driver-address-details{grid-template-columns:repeat(2,minmax(0,1fr))}
 .driver-address-details>div:nth-child(3n){border-inline-end:1px solid #edf1f4}
 .driver-address-details>div:nth-child(2n){border-inline-end:0}
 .driver-area-row{padding:12px}.driver-area-row strong{font-size:16px}
 .driver-card-section-title{font-size:10px;padding:9px 11px}
 .driver-address-details span,.driver-address-note span{font-size:9px}
 .driver-address-details strong{font-size:13px}
 .driver-address-details>div{padding:10px 11px;min-height:53px}
 .driver-address-note strong{font-size:12px}
 .driver-item-card{padding:11px 12px}.driver-item-name{font-size:13px}.driver-item-total{font-size:14px}
 .driver-item-meta{font-size:10px}.driver-item-meta b{font-size:11px}
}


/* Driver contact actions, four-field dashboard summary and daily history */
.driver-customer-identity{min-width:0;flex:1}
.driver-customer-name-line{display:flex;align-items:center;gap:10px;min-width:0}
.driver-customer-name-line>.order-customer-name,.driver-customer-name-line>strong{min-width:0;flex:1;overflow-wrap:anywhere}
.driver-contact-icons{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.driver-contact-btn{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;text-decoration:none;border:1px solid transparent;box-shadow:0 4px 12px rgba(23,50,77,.07)}
.driver-contact-btn svg{width:18px;height:18px;fill:currentColor}
.driver-contact-btn.call{background:#edf5fb;border-color:#d8e8f4;color:#1f628f}
.driver-contact-btn.whatsapp{background:#e9f8ef;border-color:#cfead9;color:#168a4e}
.driver-phone-text{margin-top:5px;color:#718391;font-size:11px;font-weight:800;direction:ltr;text-align:start}
.settings-full-row{grid-column:1/-1}.driver-settings-card textarea{min-height:92px;resize:vertical}

.dashboard-order-compact>summary.dashboard-order-compact-summary{grid-template-columns:.7fr 1.15fr 1.15fr .9fr .9fr;grid-template-areas:none;min-height:44px}
.dashboard-summary-field{min-width:0;padding:6px 7px;border-bottom:0}
.dashboard-summary-field.daily-field,.dashboard-summary-field.phone-field,.dashboard-summary-field.city-field,.dashboard-summary-field.amount-field,.dashboard-summary-field.timer-field{grid-area:auto}
.dashboard-expanded-reference{display:flex;align-items:center;gap:8px;min-width:0}
.dashboard-expanded-reference>strong{font-size:11px;color:var(--navy);white-space:nowrap}
.dashboard-expanded-reference>span{font-size:10px;font-weight:900;color:#405768;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-expanded-customer-no{margin:-1px 0 7px;color:#7d8c98;font-size:9px;font-weight:800}
.dashboard-expanded-customer-no strong{color:#425b6d}

.driver-history-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.driver-history-kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px;box-shadow:0 5px 18px rgba(23,50,77,.04);position:relative;overflow:hidden}
.driver-history-kpi:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:4px;background:#6f8ca5}
.driver-history-kpi.primary:before{background:var(--green)}.driver-history-kpi.cancelled:before{background:var(--red)}
.driver-history-kpi span{display:block;color:#758695;font-size:10px;font-weight:850;margin-bottom:5px}
.driver-history-kpi strong{display:block;color:var(--navy);font-size:22px;font-weight:950;font-variant-numeric:tabular-nums}
.driver-payment-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.driver-payment-summary-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:13px;display:grid;gap:5px;box-shadow:0 4px 14px rgba(23,50,77,.035)}
.payment-method-name{color:#667a89;font-size:11px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.driver-payment-summary-card>strong{font-size:20px;color:var(--navy);font-weight:950;font-variant-numeric:tabular-nums}
.driver-payment-summary-card small{color:#8996a0;font-size:9px;font-weight:800}.driver-payment-summary-card small b{color:#536a7a}
.driver-history-list{display:grid;gap:9px}
.driver-history-order{background:#fff;border:1px solid #dfe7ed;border-radius:14px;overflow:hidden}
.driver-history-order.delivered-history-order{border-inline-start:4px solid var(--green)}
.driver-history-order.cancelled-history-order{border-inline-start:4px solid var(--red)}
.driver-history-order>summary{list-style:none;display:grid;grid-template-columns:.7fr 1.6fr 1.1fr .9fr;align-items:stretch;cursor:pointer;min-height:50px}
.driver-history-order>summary::-webkit-details-marker{display:none}.driver-history-order[open]>summary{background:#f8fbfd;border-bottom:1px solid #e6edf2}
.driver-history-order>summary>span{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:8px 10px;border-inline-end:1px solid #edf1f4}
.driver-history-order>summary>span:last-child{border-inline-end:0}
.driver-history-order>summary small{color:#96a2ac;font-size:7px;font-weight:900;white-space:nowrap}
.driver-history-order>summary strong{color:#405769;font-size:10px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.driver-history-order .history-daily strong{font-size:14px;color:var(--navy)}.driver-history-order .history-amount strong{font-size:12px;color:#1f5744;font-variant-numeric:tabular-nums}
.driver-history-detail{padding:11px;background:#fff}.history-detail-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:8px;margin-bottom:8px;border-bottom:1px dashed #dfe7ed}.history-detail-head strong{color:var(--navy)}.history-detail-head span{color:#718290;font-size:10px;font-weight:900}
.history-customer-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:9px}.history-customer-meta span,.history-customer-meta a{padding:6px 8px;background:#f2f6f9;border-radius:9px;color:#536a7b;font-size:10px;font-weight:800;text-decoration:none}
.history-address-card{margin-top:0}.history-items-card{margin-top:10px;margin-bottom:0}.history-photo-btn{margin-top:10px;width:100%}
.driver-history-empty{padding:18px;text-align:center;border:1px dashed #d9e3ea;border-radius:13px;color:#8b99a4;font-size:11px;font-weight:800;background:#fbfcfd}
.cancelled-history-section{margin-top:20px}

@media(max-width:900px){
 .driver-history-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .driver-payment-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .driver-customer-name-line{gap:8px}.driver-contact-btn{width:40px;height:40px;border-radius:12px}.driver-contact-btn svg{width:19px;height:19px}
 .driver-history-overview{gap:7px}.driver-history-kpi{padding:11px}.driver-history-kpi strong{font-size:19px}
 .driver-payment-summary-grid{gap:7px}.driver-payment-summary-card{padding:11px}.driver-payment-summary-card>strong{font-size:18px}
 .driver-history-order>summary{grid-template-columns:.7fr 1.15fr .95fr .8fr;min-height:48px}
 .driver-history-order>summary>span{padding:7px 6px}.driver-history-order>summary small{font-size:6.5px}.driver-history-order>summary strong{font-size:9px}.driver-history-order .history-daily strong{font-size:12px}.driver-history-order .history-amount strong{font-size:10px}
 .dashboard-order-compact>summary.dashboard-order-compact-summary{grid-template-columns:.68fr 1.12fr 1.05fr .82fr .88fr;grid-template-areas:none;min-height:42px}
 .dashboard-summary-field{padding:5px 4px;min-height:42px;border-bottom:0}.dashboard-summary-field small{font-size:6.7px}.dashboard-summary-field strong{font-size:9.2px}.dashboard-summary-field.daily-field strong{font-size:12px}.dashboard-summary-field.amount-field strong{font-size:10px}.dashboard-summary-field.timer-field strong{font-size:8.6px}
}


/* Driver availability controls and driver contact */
.driver-availability-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:start}
.driver-availability-card{background:#fff;border:1px solid #dfe7ed;border-radius:17px;padding:13px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 6px 20px rgba(23,50,77,.045);min-width:0}
.driver-availability-card.is-visible{border-color:#b9dfcf;background:linear-gradient(145deg,#fff 0%,#f4fbf7 100%)}
.driver-availability-card.is-hidden{border-color:#d7dde2;background:#f7f9fa}
.driver-availability-main{display:flex;align-items:center;gap:10px;min-width:0}
.availability-avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;background:#173b59;color:#fff;font-size:15px;font-weight:950}
.driver-availability-card.is-visible .availability-avatar{background:#16865a}.driver-availability-card.is-hidden .availability-avatar{background:#87949e}
.availability-identity{min-width:0}.availability-identity>strong{display:block;color:var(--navy);font-size:14px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.availability-phone{display:inline-flex;align-items:center;gap:5px;margin-top:4px;color:#526f84;text-decoration:none;font-size:10.5px;font-weight:850}.availability-phone:hover{color:#164f77}
.driver-availability-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}.availability-status{font-size:9px;font-weight:900;color:#6d7f8d}
.availability-toggle-btn{min-width:66px;border-radius:10px;padding:7px 10px;font-size:10px;font-weight:900}.availability-toggle-btn.hide-driver{background:#fff2f1;border:1px solid #efc7c4;color:#b5423e}.availability-toggle-btn.show-driver{background:#eaf8f0;border:1px solid #c6e6d3;color:#15784f}
.dashboard-driver-phone{display:inline-flex;align-items:center;gap:5px;margin-top:3px;color:#4e6f86;text-decoration:none;font-size:9.5px;font-weight:900;white-space:nowrap;direction:ltr}.dashboard-driver-phone:hover{color:#0f5d91}.dashboard-driver-phone span{font-size:11px}
@media(max-width:1180px){.driver-availability-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.driver-availability-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.driver-availability-grid{grid-template-columns:1fr}.driver-availability-card{padding:12px}.availability-status{display:none}}


/* Cancellation reason */
.cancel-reason-input { min-height: 118px; resize: vertical; font-weight: 600; }
.driver-cancel-reason, .report-cancel-reason { margin: 10px 0; padding: 10px 12px; border: 1px solid #fecaca; background: #fff7f7; border-radius: 12px; display: grid; gap: 4px; }
.driver-cancel-reason span, .report-cancel-reason span { font-size: .74rem; color: #991b1b; font-weight: 700; }
.driver-cancel-reason strong, .report-cancel-reason strong { color: #7f1d1d; white-space: pre-wrap; overflow-wrap: anywhere; }


/* Delivery photo camera control */
.photo-native-input{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.photo-capture-btn{width:100%;min-height:48px;border:1px solid #cfe0eb;background:linear-gradient(145deg,#f8fbfd 0%,#eef6fa 100%);color:#244f6e;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:9px;padding:11px 14px;font-size:12px;font-weight:950;cursor:pointer;transition:.18s ease;box-shadow:0 4px 14px rgba(23,50,77,.04)}
.photo-capture-btn:hover,.photo-capture-btn:focus-visible{border-color:#8fb7cf;background:#edf6fb;color:#143f5d;transform:translateY(-1px)}
.photo-capture-btn svg{width:20px;height:20px;fill:currentColor;flex:0 0 auto}
.photo-capture-status{text-align:center;margin-top:7px;color:#8997a2;font-size:9.5px;font-weight:850}
.photo-capture-status.is-captured{color:#16865a}
