:root{
  --bg:#0b1f3b;
  --bg2:#08162a;
  --accent: #ff5a3d;
  --text:#e9eef7;
  --muted:#a9b6cc;
  --card:#0f2a4d;
  --border:rgba(255,255,255,.10);
}
body{
  background: radial-gradient(1200px 600px at 10% 0%, #123a6a 0%, var(--bg) 55%, var(--bg2) 100%);
  color: var(--text);
  min-height:100vh;
}
a{ color:#bfe0ff; }
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.btn-accent{
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.btn-accent:hover{ filter: brightness(0.95); }
.badge-status{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
}
input, select, textarea{
  border-radius: 12px !important;
}
.navbar{
  background: rgba(0,0,0,.15);
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
}
.table{
  color: var(--text);
}
.table thead th{
  border-bottom:1px solid var(--border);
  color: var(--muted);
}
.table td, .table th{
  border-top:1px solid rgba(255,255,255,.06);
}
.form-text{ color: var(--muted) !important; }
.small-muted{ color: var(--muted); font-size: .9rem; }
#map { height: 360px; border-radius: 18px; overflow: hidden; border:1px solid var(--border); }

/* RoutePilot production UI */
.navbar-brand{font-weight:800;letter-spacing:-.02em}.navbar-brand::before{content:"RP";display:inline-grid;place-items:center;width:34px;height:34px;margin-right:10px;border-radius:10px;background:var(--accent);font-size:.78rem;letter-spacing:.02em;box-shadow:0 8px 20px rgba(255,90,61,.25)}
.btn{border-radius:12px;font-weight:650}.form-control{background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.14);min-height:44px}.modal-content{box-shadow:0 24px 70px rgba(0,0,0,.45)}
.card h4,.card h5{font-weight:750;letter-spacing:-.015em}.container,.container-fluid{position:relative}.badge{font-weight:650}.table td{vertical-align:middle}.btn-outline-light{border-color:rgba(255,255,255,.28)}
@media(max-width:767px){.navbar{gap:10px}.navbar .d-flex{width:100%;justify-content:space-between}.card{border-radius:16px}.container{padding-left:14px;padding-right:14px}.btn{min-height:42px}}

/* RoutePilot Professional Dashboard v1.1 */
.admin-page{margin:0;background:#061427;color:#eef5ff;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.app-shell{display:flex;min-height:100vh}.sidebar{width:238px;position:fixed;inset:0 auto 0 0;background:linear-gradient(180deg,#07182d,#051120);border-right:1px solid rgba(130,174,225,.14);padding:24px 14px;z-index:100;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 25px}.brand-pin{width:38px;height:38px;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);background:linear-gradient(135deg,#ffbe32,#ff4f45);font-size:0;box-shadow:0 8px 20px rgba(255,91,61,.22)}.brand-pin:after{content:"";display:block;width:12px;height:12px;border-radius:50%;background:#09203b;position:absolute;margin:13px}.brand strong{display:block;font-size:22px;line-height:1}.brand small{display:block;color:#7f94b2;font-size:9px;letter-spacing:.11em;margin-top:5px}.side-nav{display:flex;flex-direction:column;gap:7px}.side-nav a{color:#aabbd2;text-decoration:none;padding:12px 14px;border-radius:11px;font-weight:600;display:flex;gap:12px;align-items:center;border:1px solid transparent}.side-nav a span{width:20px;text-align:center;font-size:19px}.side-nav a:hover,.side-nav a.active{color:#fff;background:linear-gradient(90deg,rgba(16,116,240,.72),rgba(14,76,148,.38));border-color:rgba(57,151,255,.45);box-shadow:inset 3px 0 #1e9cff}.sidebar-bottom{margin-top:auto;padding:14px 12px;border:1px solid rgba(44,206,130,.18);background:rgba(12,93,66,.12);border-radius:12px;color:#47dc93;font-size:13px}.sidebar-bottom small{display:block;color:#7890ad;margin-top:7px}.online-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#25d980;margin-right:7px;box-shadow:0 0 12px #25d980}.main-area{margin-left:238px;width:calc(100% - 238px);min-height:100vh;background:radial-gradient(900px 520px at 40% -10%,rgba(18,73,130,.32),transparent 65%),#071629}.topbar{min-height:84px;border-bottom:1px solid rgba(143,177,218,.12);display:flex;justify-content:space-between;align-items:center;padding:18px 28px}.topbar h1{font-size:26px;margin:0;font-weight:800}.topbar p{margin:3px 0 0;color:#8295af;font-size:13px}.top-actions{display:flex;align-items:center;gap:12px}.today-chip,.user-chip{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;background:#0a1d35;border:1px solid rgba(133,170,216,.14)}.today-chip small,.user-chip small{display:block;color:#8397b3;font-size:11px}.today-chip strong,.user-chip strong{display:block;font-size:12px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#4d78b3,#233c62);font-weight:800}.icon-btn{width:38px;height:38px;border-radius:10px;border:1px solid rgba(133,170,216,.18);background:#0a1d35;color:#dbeaff;font-size:18px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:18px;padding:20px 24px}.content-column,.right-column{min-width:0}.right-column{display:flex;flex-direction:column;gap:16px}.kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px;margin-bottom:16px}.kpi{position:relative;min-height:154px;padding:15px 15px 13px;border-radius:14px;border:1px solid rgba(75,150,238,.55);background:linear-gradient(160deg,rgba(15,58,105,.88),rgba(7,31,59,.96));box-shadow:0 12px 30px rgba(0,0,0,.16);overflow:hidden}.kpi:after{content:"";position:absolute;width:100px;height:100px;right:-50px;top:-45px;border-radius:50%;background:currentColor;opacity:.06}.kpi-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:rgba(20,123,255,.9);box-shadow:0 6px 18px rgba(17,113,242,.3);font-size:21px;margin-bottom:11px}.kpi span{display:block;font-size:13px;font-weight:700}.kpi strong{display:block;font-size:27px;line-height:1.1;margin-top:4px}.kpi small{display:block;color:#7894b7;margin-top:9px}.kpi-green{border-color:rgba(27,190,105,.55);background:linear-gradient(160deg,rgba(8,80,61,.72),rgba(5,38,39,.95))}.kpi-green .kpi-icon{background:#10ad63}.kpi-amber{border-color:rgba(237,165,28,.55);background:linear-gradient(160deg,rgba(91,64,15,.72),rgba(40,31,18,.95))}.kpi-amber .kpi-icon{background:#e59b12}.kpi-purple{border-color:rgba(160,77,241,.58);background:linear-gradient(160deg,rgba(72,31,116,.72),rgba(33,20,60,.95))}.kpi-purple .kpi-icon{background:#923be0}.kpi-teal{border-color:rgba(18,197,183,.55);background:linear-gradient(160deg,rgba(7,82,82,.72),rgba(5,39,49,.95))}.kpi-teal .kpi-icon{background:#0cae9f}.panel{background:linear-gradient(180deg,rgba(10,32,58,.94),rgba(7,25,46,.96));border:1px solid rgba(130,174,225,.16);border-radius:15px;box-shadow:0 14px 35px rgba(0,0,0,.16);overflow:hidden}.filter-panel{padding:15px;margin-bottom:16px}.filters-grid{display:grid;grid-template-columns:1fr 1fr 1.8fr 150px;gap:12px;align-items:end}.filters-grid label{font-size:12px;color:#93a8c3;margin-bottom:6px}.form-control{background:#0a1c32!important;border:1px solid rgba(125,164,211,.22)!important;color:#e8f1ff!important;border-radius:10px!important;min-height:42px}.form-control:focus{box-shadow:0 0 0 2px rgba(20,125,255,.18)!important;border-color:#1d7fe7!important}.form-control option{background:#0a1c32}.btn-primary{background:#087ff5;border-color:#087ff5;border-radius:10px;min-height:42px;font-weight:700}.btn-accent{background:linear-gradient(135deg,#ff6a42,#ff4f3d);border:0;border-radius:10px;padding:10px 15px;font-weight:800;box-shadow:0 7px 18px rgba(255,83,60,.18)}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:15px 16px;border-bottom:1px solid rgba(130,174,225,.12)}.panel-head h2{font-size:17px;margin:0;font-weight:800}.panel-head p{font-size:11px;color:#8296b1;margin:3px 0 0}.panel-head.compact{padding:14px 15px}.panel-head.compact>span{font-size:11px;color:#8296b1}.count-badge{font-size:11px;padding:3px 7px;border-radius:8px;background:#143c6a;color:#9ed0ff;vertical-align:middle}.orders-panel .table{margin:0;white-space:nowrap}.orders-panel .table thead th{font-size:11px;color:#8da1bc;background:rgba(7,24,44,.55);padding:11px 10px;border-color:rgba(130,174,225,.12)}.orders-panel .table td{padding:12px 10px;vertical-align:middle;font-size:12px;border-color:rgba(130,174,225,.09)}.orders-panel .table tbody tr:hover{background:rgba(35,100,169,.08)}.badge-status{border:0!important;border-radius:8px!important;background:rgba(27,174,99,.22)!important;color:#79e4ad!important;font-weight:700}.panel-foot{padding:10px 15px;color:#7088a6;font-size:11px;border-top:1px solid rgba(130,174,225,.09)}.cash-lines{padding:7px 15px 12px}.cash-lines>div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid rgba(130,174,225,.09);font-size:13px}.cash-lines>div:last-child{border:0}.cash-lines span{color:#a6b7cc}.cash-lines strong{color:#fff}.driver-stat-card{padding:12px 14px;border-bottom:1px solid rgba(130,174,225,.1)}.driver-stat-top{display:flex;align-items:center;justify-content:space-between}.driver-stat-name{display:flex;align-items:center;gap:9px;font-weight:800}.driver-dot{width:10px;height:10px;border-radius:50%;background:#28d789;box-shadow:0 0 10px rgba(40,215,137,.5)}.driver-stat-money{color:#ffd14a;font-weight:800}.driver-stat-sub{font-size:11px;color:#8196b2;margin:3px 0 9px 19px}.driver-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid rgba(130,174,225,.09);border-radius:9px;overflow:hidden}.driver-mini-grid div{text-align:center;padding:7px 3px;border-right:1px solid rgba(130,174,225,.09)}.driver-mini-grid div:last-child{border:0}.driver-mini-grid b{display:block;font-size:15px}.driver-mini-grid small{font-size:9px;color:#8196b2}.driver-assign-title{padding:10px 14px 5px;color:#7189a7;font-size:10px;text-transform:uppercase;letter-spacing:.08em}.driver-line{display:flex;align-items:center;justify-content:space-between;padding:9px 14px;border-top:1px solid rgba(130,174,225,.07)}.driver-line b{font-size:12px}.driver-line small{display:block;color:#7890ad;font-size:10px}.shift-toggle{font-size:10px;color:#8da2bc;margin:0}.live-label{color:#35df91!important;font-weight:700}.right-column #map{height:260px;border:0;border-radius:0}.app-footer{display:flex;gap:15px;align-items:center;padding:14px 25px;color:#7287a2;font-size:10px;border-top:1px solid rgba(130,174,225,.1)}.app-footer b{color:#dbe8f8}.system-time{margin-left:auto;color:#8ca2bd}.modal-content{background:#0b2039!important;border:1px solid rgba(130,174,225,.18)!important;border-radius:16px!important;color:#eef5ff}.modal-header,.modal-footer{border-color:rgba(130,174,225,.12)!important}
@media(max-width:1280px){.kpi-grid{grid-template-columns:repeat(3,1fr)}.dashboard-grid{grid-template-columns:1fr 320px}}@media(max-width:991px){.sidebar{position:static;width:100%;height:auto}.app-shell{display:block}.main-area{margin-left:0;width:100%}.side-nav{flex-direction:row;overflow:auto}.sidebar-bottom{display:none}.dashboard-grid{grid-template-columns:1fr}.right-column{display:grid;grid-template-columns:1fr 1fr}.kpi-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.topbar{padding:14px 15px}.topbar p,.today-chip,.user-chip small{display:none}.dashboard-grid{padding:12px}.kpi-grid{grid-template-columns:repeat(2,1fr)}.filters-grid{grid-template-columns:1fr}.right-column{display:flex}.side-nav a{white-space:nowrap}.app-footer span:not(.system-time){display:none}}

/* RoutePilot Driver Professional v1.3 */
.driver-pro-page{margin:0;background:#061a30;color:#f5f8ff;min-height:100vh;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.driver-pro-page *{box-sizing:border-box}.driver-shell{display:flex;min-height:100vh}.driver-sidebar{width:270px;position:fixed;inset:0 auto 0 0;background:#07182b;border-right:1px solid #17334f;padding:28px 18px;display:flex;flex-direction:column;z-index:10}.driver-brand{display:flex;align-items:center;gap:14px;padding:0 10px 32px}.driver-brand strong{font-size:25px;display:block}.driver-brand small{display:block;color:#7891ae;letter-spacing:2px;font-size:10px}.driver-logo{width:44px;height:54px;border-radius:50% 50% 50% 12px;background:linear-gradient(145deg,#ffad2f,#ff5c4d);display:grid;place-items:center;transform:rotate(-45deg)}.driver-logo span{width:14px;height:14px;border-radius:50%;background:#07182b;transform:rotate(45deg)}.driver-nav{padding:15px 16px;margin:5px 0;border-radius:13px;color:#91a7c0;display:flex;gap:13px;align-items:center}.driver-nav.active{background:#0d4f92;color:#fff;border-left:4px solid #20a5ff}.driver-side-bottom{margin-top:auto;border:1px solid #13504b;background:#07262e;border-radius:14px;padding:16px;display:flex;gap:10px;align-items:flex-start}.driver-side-bottom small{display:block;color:#7793a7;margin-top:3px}.online-dot,.shift-pulse{width:11px;height:11px;border-radius:50%;background:#1fe69a;box-shadow:0 0 14px #1fe69a;display:inline-block}.driver-main{margin-left:270px;width:calc(100% - 270px);min-width:0}.driver-topbar{height:112px;border-bottom:1px solid #17334f;display:flex;align-items:center;justify-content:space-between;padding:22px 38px;background:#081d35}.driver-topbar h1{font-size:30px;margin:0;font-weight:800}.driver-topbar p,.orders-head p{margin:4px 0 0;color:#8198b3}.driver-user{display:flex;align-items:center;gap:12px;border:1px solid #1a3a5c;background:#0a2543;border-radius:15px;padding:9px 10px 9px 12px}.driver-user small{display:block;color:#8aa2bd}.avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#275a95;font-weight:800;font-size:20px}.icon-btn{border:1px solid #2a4968;background:#0b223c;color:white;border-radius:10px;padding:8px 12px;font-size:20px}.driver-content{padding:28px 38px 50px;max-width:1500px;margin:auto}.shift-banner{background:linear-gradient(120deg,#0d2c4d,#10233d);border:1px solid #234767;border-radius:20px;padding:22px 25px;display:flex;align-items:center;justify-content:space-between;gap:20px}.shift-title{display:flex;gap:15px;align-items:flex-start}.shift-title small{color:#7692af;letter-spacing:1.5px}.shift-title h2{margin:3px 0;font-size:24px}.shift-title p{margin:0;color:#88a0ba}.shift-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.awake-toggle{margin:0 8px 0 0;color:#a6b8ca;font-size:13px}.pro-btn{border:0;border-radius:11px;padding:12px 16px;color:#fff;font-weight:750;cursor:pointer;white-space:nowrap}.pro-btn:disabled{opacity:.38;cursor:not-allowed}.pro-btn-green{background:#0dbb7a}.pro-btn-danger{background:#d74f4f}.pro-btn-outline{background:#0a213b;border:1px solid #315170}.driver-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}.stat-card{min-height:145px;border-radius:18px;padding:20px;display:flex;align-items:flex-start;gap:15px;border:1px solid rgba(255,255,255,.12);box-shadow:0 12px 30px rgba(0,0,0,.14)}.stat-card small{display:block;color:#aac0d5;font-weight:700;letter-spacing:.7px}.stat-card strong{display:block;font-size:30px;line-height:1.15;margin:7px 0 4px}.stat-card span{color:#8ba3bd;font-size:13px}.stat-icon{width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.12);display:grid;place-items:center;font-size:21px;font-weight:800}.stat-blue{background:linear-gradient(135deg,#0b4a83,#0a2e54)}.stat-green{background:linear-gradient(135deg,#075c4e,#073b36)}.stat-cyan{background:linear-gradient(135deg,#08666c,#073d4c)}.stat-purple{background:linear-gradient(135deg,#56309a,#281a57)}.orders-head{display:flex;justify-content:space-between;align-items:end;margin:28px 0 14px}.orders-head h3{margin:0;font-size:23px}.orders-tools{display:flex;gap:9px}.pro-orders{display:grid;gap:14px}.pro-order-card{background:#0a2543;border:1px solid #1d4265;border-radius:18px;overflow:hidden}.pro-order-top{display:flex;align-items:center;justify-content:space-between;padding:17px 20px;border-bottom:1px solid #173b5e}.pro-order-id{display:flex;align-items:center;gap:12px}.order-number{width:46px;height:46px;border-radius:12px;background:#0d4679;display:grid;place-items:center;color:#7ec8ff;font-size:18px;font-weight:800}.pro-order-top h4{margin:0;font-size:17px}.pro-order-top small{color:#829bb5}.order-status{padding:7px 12px;border-radius:9px;font-size:12px;font-weight:800;background:#0d574f;color:#79f2c2}.pro-order-body{display:grid;grid-template-columns:1.1fr 1.4fr .8fr;gap:20px;padding:18px 20px}.order-field label{display:block;color:#6f8ba8;font-size:11px;font-weight:800;letter-spacing:.8px;margin-bottom:5px}.order-field strong{font-size:15px}.order-field span{display:block;color:#9eb1c5}.order-actions{padding:0 20px 18px;display:flex;gap:9px;flex-wrap:wrap}.order-actions button{border:1px solid #345778;background:#0b223c;color:#dfeafb;border-radius:10px;padding:9px 13px;font-weight:700}.order-actions .deliver{background:#ff5c4d;border-color:#ff5c4d;color:#fff}.driver-tip{color:#708ba7;font-size:12px;margin-top:16px}.empty-orders{background:#0a2543;border:1px dashed #315170;border-radius:16px;padding:30px;text-align:center;color:#8fa5bb}
@media(max-width:1050px){.driver-sidebar{width:90px;padding:22px 10px}.driver-brand>div:last-child,.driver-nav b,.driver-side-bottom>div:last-child{display:none}.driver-brand{justify-content:center;padding:0 0 25px}.driver-nav{justify-content:center;font-size:20px}.driver-main{margin-left:90px;width:calc(100% - 90px)}.driver-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.driver-sidebar{display:none}.driver-main{margin-left:0;width:100%}.driver-topbar{height:auto;padding:17px 16px}.driver-topbar h1{font-size:23px}.driver-topbar p{font-size:12px}.driver-user{padding:6px}.driver-user>div:nth-child(2){display:none}.driver-content{padding:16px}.shift-banner{align-items:flex-start;flex-direction:column;padding:18px}.shift-actions{justify-content:flex-start}.awake-toggle{width:100%;margin-bottom:4px}.driver-stats{grid-template-columns:repeat(2,1fr);gap:10px}.stat-card{min-height:125px;padding:14px;display:block}.stat-icon{width:36px;height:36px;margin-bottom:8px}.stat-card strong{font-size:23px}.orders-head{align-items:flex-start;gap:12px;flex-direction:column}.pro-order-body{grid-template-columns:1fr}.orders-tools{width:100%}.orders-tools .pro-btn{flex:1}.pro-order-top,.pro-order-body,.order-actions{padding-left:15px;padding-right:15px}}

/* ===== RoutePilot Shift Close Modal ===== */
.rp-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.rp-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2,12,27,.82);
  backdrop-filter:blur(7px);
}

.rp-modal-box{
  position:relative;
  width:min(720px,100%);
  background:linear-gradient(145deg,#102d50,#0b213c);
  border:1px solid rgba(120,180,235,.20);
  border-radius:24px;
  box-shadow:0 30px 80px rgba(0,0,0,.55);
  overflow:hidden;
}

.rp-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:28px 30px 20px;
  border-bottom:1px solid rgba(130,174,225,.12);
}

.rp-modal-head small{
  display:block;
  color:#62aaf0;
  letter-spacing:3px;
  font-weight:800;
  margin-bottom:7px;
}

.rp-modal-head h2{
  color:#fff;
  font-size:28px;
  margin:0 0 6px;
  font-weight:900;
}

.rp-modal-head p{
  color:#8faac8;
  margin:0;
  font-size:14px;
}

.rp-modal-x{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.15);
  background:rgba(255,255,255,.05);
  color:#fff;
  font-size:26px;
  cursor:pointer;
}

.rp-modal-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  padding:24px 30px;
}

.rp-modal-grid>div{
  min-height:125px;
  padding:17px;
  border-radius:17px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(130,174,225,.13);
}

.rp-modal-grid span{
  display:flex;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:rgba(51,151,255,.18);
  color:#69b6ff;
  font-size:20px;
  font-weight:900;
  margin-bottom:15px;
}

.rp-modal-grid small{
  display:block;
  color:#86a4c5;
  font-size:11px;
  font-weight:800;
  letter-spacing:1px;
  margin-bottom:5px;
}

.rp-modal-grid strong{
  display:block;
  color:#fff;
  font-size:24px;
  font-weight:900;
}

.rp-modal-note{
  margin:0 30px 22px;
  padding:14px 17px;
  border-radius:13px;
  color:#a9bdd3;
  background:rgba(40,120,190,.10);
  border:1px solid rgba(100,170,230,.12);
  font-size:14px;
}

.rp-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  padding:20px 30px 26px;
  border-top:1px solid rgba(130,174,225,.12);
}

.rp-modal-actions button{
  border:0;
  border-radius:13px;
  padding:14px 20px;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
}

#shiftModalCancel{
  background:#203a59;
  color:#dbeaff;
}

#shiftModalConfirm{
  background:linear-gradient(135deg,#ff684f,#ef4e55);
  color:#fff;
  box-shadow:0 8px 25px rgba(239,78,85,.22);
}

@media(max-width:650px){
  .rp-modal-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .rp-modal-head,
  .rp-modal-grid,
  .rp-modal-actions{
    padding-left:18px;
    padding-right:18px;
  }

  .rp-modal-note{
    margin-left:18px;
    margin-right:18px;
  }

  .rp-modal-actions{
    flex-direction:column-reverse;
  }

  .rp-modal-actions button{
    width:100%;
  }
}

/* RoutePilot - Admin Shift History wider layout */
body.shift-history-page .dashboard-grid{
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
}

body.shift-history-page .content-column{
    width: 100% !important;
    max-width: none !important;
}

body.shift-history-page .panel{
    width: 100% !important;
    max-width: none !important;
}

body.shift-history-page .table-responsive{
    width: 100% !important;
    overflow-x: auto !important;
}

body.shift-history-page table{
    width: 100% !important;
    min-width: 1050px !important;
}

/* Shift history final table fit */
body.shift-history-page table{
    width:100% !important;
    min-width:0 !important;
    table-layout:auto !important;
}

body.shift-history-page .table-responsive{
    width:100% !important;
    overflow-x:hidden !important;
}

body.shift-history-page table th,
body.shift-history-page table td{
    padding:10px 8px !important;
    white-space:nowrap !important;
    font-size:15px !important;
}

body.shift-history-page table th:first-child,
body.shift-history-page table td:first-child{
    padding-left:4px !important;
}

/* =====================================================
   RoutePilot FINAL ADMIN DASHBOARD
   ===================================================== */

body:not(.shift-history-page) .main-area{
    background:#071a2f;
}

body:not(.shift-history-page) .dashboard-grid{
    display:grid !important;
    grid-template-columns:minmax(0, 1fr) 390px !important;
    gap:22px !important;
    width:100% !important;
    max-width:none !important;
    padding:26px !important;
}

body:not(.shift-history-page) .content-column{
    width:100% !important;
    min-width:0 !important;
}

body:not(.shift-history-page) .right-column{
    width:100% !important;
    min-width:0 !important;
}

/* KPI cards */
body:not(.shift-history-page) .kpi-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:16px !important;
    margin-bottom:22px !important;
}

body:not(.shift-history-page) .kpi{
    min-height:130px !important;
    border-radius:20px !important;
    padding:20px !important;
}

/* Panels */
body:not(.shift-history-page) .panel{
    border-radius:20px !important;
    overflow:hidden;
}

/* LIVE MAP */
body:not(.shift-history-page) #mapPanel{
    width:100% !important;
}

body:not(.shift-history-page) #map{
    width:100% !important;
    height:520px !important;
    min-height:520px !important;
    border-radius:0 0 20px 20px;
}

/* Drivers */
body:not(.shift-history-page) #driversPanel{
    min-height:300px;
}

/* Responsive */
@media(max-width:1200px){
    body:not(.shift-history-page) .dashboard-grid{
        grid-template-columns:1fr !important;
    }

    body:not(.shift-history-page) .right-column{
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:18px !important;
    }
}

@media(max-width:760px){
    body:not(.shift-history-page) .dashboard-grid{
        padding:14px !important;
    }

    body:not(.shift-history-page) .kpi-grid{
        grid-template-columns:repeat(2,1fr) !important;
    }

    body:not(.shift-history-page) .right-column{
        grid-template-columns:1fr !important;
    }

    body:not(.shift-history-page) #map{
        height:420px !important;
        min-height:420px !important;
    }
}


/* RoutePilot LIVE Driver Marker */
.routepilot-driver-marker{
  background:transparent !important;
  border:0 !important;
}

.rp-driver-pin{
  position:relative;
  display:flex;
  align-items:center;
  gap:7px;
  width:max-content;
}

.rp-driver-bike{
  position:relative;
  z-index:3;
  width:46px;
  height:46px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  background:#ff7a18;
  border:3px solid #fff;
  box-shadow:0 5px 18px rgba(0,0,0,.38);
}

.rp-driver-pulse{
  position:absolute;
  left:3px;
  top:3px;
  width:40px;
  height:40px;
  border-radius:50%;
  background:rgba(18,201,138,.45);
  animation:rpPulse 1.8s infinite;
  z-index:1;
}

.rp-driver-label{
  position:relative;
  z-index:3;
  min-width:95px;
  padding:7px 11px;
  border-radius:10px;
  background:#071b30;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 5px 16px rgba(0,0,0,.30);
  color:#fff;
  line-height:1.15;
}

.rp-driver-label strong{
  display:block;
  font-size:13px;
  white-space:nowrap;
}

.rp-driver-label span{
  display:block;
  margin-top:3px;
  color:#18e6a0;
  font-size:10px;
  font-weight:800;
  letter-spacing:.5px;
}

@keyframes rpPulse{
  0%{transform:scale(1);opacity:.8;}
  70%{transform:scale(1.7);opacity:0;}
  100%{transform:scale(1.7);opacity:0;}
}


/* =========================================================
   ROUTEPILOT PREMIUM DASHBOARD 2026
   ========================================================= */

:root{
  --rp-bg:#020d18;
  --rp-panel:#07192b;
  --rp-panel2:#0a2036;
  --rp-border:#153653;
  --rp-blue:#1685ff;
  --rp-green:#16d987;
  --rp-text:#f4f8fc;
  --rp-muted:#8299b2;
}

body{
  background:
    radial-gradient(circle at 70% 0%,rgba(22,133,255,.08),transparent 32%),
    var(--rp-bg);
}

.app-shell{
  min-height:100vh;
}

.sidebar{
  background:linear-gradient(180deg,#041326 0%,#020b14 100%);
  border-right:1px solid var(--rp-border);
}

.main-area{
  background:transparent;
}

.topbar{
  border-bottom:1px solid rgba(100,160,210,.12);
  padding-bottom:18px;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:16px;
  align-items:start;
}

.content-column{
  min-width:0;
}

.right-column{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.kpi-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(130px,1fr));
  gap:12px;
  margin-bottom:16px;
}

.kpi{
  min-height:105px;
  background:
    radial-gradient(circle at 90% 0%,rgba(255,255,255,.06),transparent 35%),
    linear-gradient(145deg,#092039,#061625);
  border:1px solid #173b5d;
  border-radius:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}

.panel{
  background:linear-gradient(145deg,rgba(8,28,47,.97),rgba(4,17,30,.97));
  border:1px solid #173957;
  border-radius:14px;
  box-shadow:0 14px 36px rgba(0,0,0,.18);
}

#mapPanel{
  overflow:hidden;
}

#mapPanel .panel-head{
  padding:16px 18px;
}

#map{
  height:520px !important;
  min-height:520px;
  border-top:1px solid rgba(100,160,210,.12);
  border-bottom:1px solid rgba(100,160,210,.12);
}

#driversPanel,
.cash-panel{
  background:linear-gradient(160deg,#081c30,#051321);
}

#driversStatsBox{
  display:grid;
  gap:10px;
}

.driver-stat-card,
.driver-line{
  transition:.18s ease;
}

.driver-stat-card:hover,
.driver-line:hover{
  transform:translateY(-2px);
  border-color:#2585d8;
  background:#0b2944;
}

.orders-panel{
  margin-top:16px;
}

.table{
  margin-bottom:0;
}

.table tbody tr{
  transition:.15s ease;
}

.table tbody tr:hover{
  background:rgba(30,132,255,.07);
}

.btn-accent,
.btn-primary{
  box-shadow:0 7px 18px rgba(0,112,255,.22);
}

@media(max-width:1350px){
  .kpi-grid{
    grid-template-columns:repeat(3,1fr);
  }
}

@media(max-width:1050px){
  .dashboard-grid{
    grid-template-columns:1fr;
  }

  .right-column{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  #map{
    height:460px !important;
    min-height:460px;
  }
}

@media(max-width:700px){
  .kpi-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .right-column{
    grid-template-columns:1fr;
  }

  #map{
    height:390px !important;
    min-height:390px;
  }
}

/* ===== ROUTEPILOT DRIVER SIDE PANEL ===== */
.driver-side-panel{
  position:fixed;
  top:0;
  right:-430px;
  width:410px;
  max-width:94vw;
  height:100vh;
  z-index:9999;
  background:#071a2d;
  border-left:1px solid #1d4161;
  box-shadow:-18px 0 45px rgba(0,0,0,.45);
  color:#fff;
  transition:right .28s ease;
  overflow-y:auto;
}

.driver-side-panel.open{
  right:0;
}

.driver-side-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:22px 22px 18px;
  background:#081d32;
  border-bottom:1px solid #173a59;
}

.driver-side-header small{
  display:block;
  color:#5c8bb5;
  font-size:11px;
  font-weight:700;
  letter-spacing:1.4px;
  margin-bottom:5px;
}

.driver-side-header h2{
  margin:0;
  font-size:21px;
  color:#fff;
}

.driver-side-close{
  width:38px;
  height:38px;
  border:1px solid #31516d;
  border-radius:10px;
  background:#0c2740;
  color:#b9cbe0;
  font-size:26px;
  line-height:30px;
  cursor:pointer;
}

.driver-side-close:hover{
  background:#123654;
  color:#fff;
}

.driver-side-body{
  padding:20px;
}

.driver-side-body .driver-stat-card{
  background:#0b2238;
  border:1px solid #173c5d;
  border-radius:12px;
  padding:13px;
}

@media(max-width:700px){
  .driver-side-panel{
    width:100%;
    max-width:100%;
    right:-100%;
  }
}


/* RoutePilot - Driver side panel stat cards */
.driver-side-body .driver-stat-card{
  background:linear-gradient(145deg,#0b2238,#081b2d);
  border:1px solid #173c5d;
  border-radius:14px;
  padding:14px 12px;
  min-height:76px;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
  transition:transform .18s ease,border-color .18s ease;
}

.driver-side-body .driver-stat-card:hover{
  transform:translateY(-2px);
  border-color:#258cff;
}

.driver-side-body .driver-stat-card small{
  display:block;
  color:#8ea8c3;
  font-size:12px;
  margin-bottom:7px;
}

.driver-side-body .driver-stat-card b{
  display:block;
  color:#fff;
  font-size:19px;
  line-height:1.1;
  font-weight:800;
}


/* RoutePilot - Premium Driver Side Panel */
.driver-side-panel{
  position:fixed;
  top:0;
  right:-440px;
  width:420px;
  max-width:92vw;
  height:100vh;
  z-index:5000;
  background:linear-gradient(180deg,#071a2c 0%,#061625 100%);
  border-left:1px solid #173c5d;
  box-shadow:-18px 0 45px rgba(0,0,0,.38);
  transition:right .28s ease;
  overflow:hidden;
}

.driver-side-panel.open{
  right:0;
}

.driver-side-head{
  min-height:88px;
  padding:20px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #173c5d;
  background:#081d31;
}

.driver-side-head small{
  display:block;
  color:#5e8db7;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.4px;
  text-transform:uppercase;
  margin-bottom:5px;
}

.driver-side-head h3{
  margin:0;
  color:#fff;
  font-size:21px;
  font-weight:800;
}

.driver-side-close{
  width:38px;
  height:38px;
  border-radius:10px;
  border:1px solid #285071;
  background:#0b2942;
  color:#a9c5df;
  font-size:22px;
  cursor:pointer;
}

.driver-side-close:hover{
  background:#123958;
  color:#fff;
}

.driver-side-body{
  height:calc(100vh - 88px);
  overflow-y:auto;
  overflow-x:hidden;
  padding:20px;
}

.driver-side-body::-webkit-scrollbar{
  width:7px;
}

.driver-side-body::-webkit-scrollbar-thumb{
  background:#285071;
  border-radius:10px;
}


/* Driver panel - compact tables without horizontal white scrollbar */
.driver-side-body .table-responsive{
  width:100%;
  overflow-x:hidden;
}

.driver-side-body .table{
  width:100%;
  table-layout:fixed;
  font-size:12px;
}

.driver-side-body .table th,
.driver-side-body .table td{
  padding:10px 7px;
  white-space:normal;
  overflow-wrap:anywhere;
  vertical-align:middle;
}

.driver-side-body .table th{
  color:#8ea8c3;
  font-size:11px;
  font-weight:700;
}

.driver-side-body .small-muted{
  color:#8ea8c3;
}


/* RoutePilot - wider driver details panel */
.driver-side-panel{
  width:520px;
  right:-540px;
  max-width:96vw;
}

.driver-side-body .table th,
.driver-side-body .table td{
  overflow-wrap:normal;
  word-break:normal;
}

.driver-side-body .table th{
  white-space:normal;
}

@media(max-width:700px){
  .driver-side-panel{
    width:100%;
    max-width:100%;
    right:-100%;
  }
}


/* ===== RoutePilot - Modern Shift History ===== */
.shift-history-modern{
  margin-top:24px;
  border-top:1px solid rgba(120,170,220,.15);
  padding-top:18px;
}

.shift-history-modern h6{
  font-size:16px;
  font-weight:800;
  margin:0 0 14px;
  color:#fff;
}

.shift-history-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.shift-history-card{
  background:#071c2e;
  border:1px solid #173c5d;
  border-radius:14px;
  padding:15px;
}

.shift-history-date{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-bottom:10px;
  margin-bottom:10px;
  border-bottom:1px solid rgba(120,170,220,.12);
}

.shift-history-date span,
.shift-history-times span,
.shift-history-stats span{
  display:block;
  color:#7895af;
  font-size:11px;
  margin-bottom:3px;
}

.shift-history-date b{
  color:#fff;
  font-size:14px;
}

.shift-history-times{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-bottom:12px;
}

.shift-history-times div{
  background:#0b253a;
  border-radius:9px;
  padding:9px;
}

.shift-history-times b{
  font-size:12px;
  color:#eaf4ff;
}

.shift-history-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin-bottom:12px;
}

.shift-history-stats div{
  background:#0b253a;
  border-radius:9px;
  padding:9px 6px;
  text-align:center;
}

.shift-history-stats b{
  color:#fff;
  font-size:13px;
}

.shift-history-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.shift-status{
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:20px;
  font-size:11px;
  font-weight:800;
}

.shift-status.closed{
  background:rgba(18,201,138,.13);
  color:#19d99a;
}

.shift-status.open{
  background:rgba(255,174,0,.13);
  color:#ffb21c;
}

@media(max-width:700px){
  .shift-history-stats{
    grid-template-columns:1fr 1fr;
  }
}


/* ===== ROUTEPILOT LEAFLET MAP FIX ===== */
#map {
    position: relative !important;
    overflow: hidden !important;
}

#map .leaflet-map-pane,
#map .leaflet-tile-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#map .leaflet-tile-pane {
    z-index: 200 !important;
}

#map img.leaflet-tile {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: none !important;
    max-height: none !important;
    width: 256px !important;
    height: 256px !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

/* LEAFLET TILE VISIBILITY FIX */
#map .leaflet-tile-pane {
  z-index: 200 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
#map .leaflet-tile {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}
