*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:#f5f7fb;color:#18212f}.hidden{display:none!important}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:#eef2f7}.auth-card{width:min(440px,100%);background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:28px;box-shadow:0 18px 50px rgba(15,23,42,.08)}.auth-brand{display:flex;gap:14px;align-items:center;margin-bottom:24px}.auth-brand h1{font-size:23px;margin:0}.auth-brand p{margin:4px 0 0;color:#7b8493;font-size:13px}.notice{padding:12px 14px;border-radius:10px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:13px;margin-bottom:16px}.tabs{display:grid;grid-template-columns:1fr 1fr;background:#f3f4f6;border-radius:10px;padding:4px;margin-bottom:18px}.tab{border:0;background:transparent;border-radius:8px;padding:10px;cursor:pointer}.tab.active{background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.08);font-weight:700}.error{color:#b91c1c;font-size:13px;min-height:16px;margin:2px 0}.wide{width:100%;justify-content:center}.app{display:grid;grid-template-columns:245px 1fr;min-height:100vh}aside{background:#111827;color:#fff;padding:24px 16px}.brand{display:flex;gap:12px;align-items:center;padding:4px 8px 28px}.brand small{display:block;color:#94a3b8;margin-top:3px}.logo{width:40px;height:40px;border-radius:12px;background:#fff;color:#111827;display:grid;place-items:center;font-weight:800}nav{display:grid;gap:6px}nav button{border:0;background:transparent;color:#cbd5e1;padding:12px 14px;border-radius:10px;text-align:left;font-size:14px;cursor:pointer}nav button:hover,nav button.active{background:#1f2937;color:white}main{padding:28px 34px;overflow:auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}h1{margin:0;font-size:28px}header p{margin:5px 0 0;color:#7b8493}.userbox{display:flex;align-items:center;gap:10px;color:#667085;font-size:13px}.ghost{border:1px solid #d8dde6;background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:16px}.cards.three{grid-template-columns:repeat(3,1fr)}.card,.panel,.empty{background:white;border:1px solid #e7eaf0;border-radius:16px;box-shadow:0 4px 18px rgba(16,24,40,.04)}.card{padding:20px}.card span{display:block;color:#7b8493;font-size:13px;margin-bottom:10px}.card strong{font-size:25px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.panel{overflow:hidden}.panelHead{padding:18px 20px;border-bottom:1px solid #edf0f4}.panelHead h2{margin:0;font-size:17px;display:flex;justify-content:space-between;align-items:center}.primary{background:#111827;color:white;border:0;border-radius:10px;padding:10px 14px;display:inline-flex;gap:7px;align-items:center;cursor:pointer}.primary:disabled{opacity:.45;cursor:not-allowed}.danger{border:1px solid #fecaca;background:#fff;color:#b91c1c;border-radius:8px;cursor:pointer}.small{padding:6px 9px}.mini{display:grid;grid-template-columns:110px 1fr auto;gap:12px;padding:14px 20px;border-bottom:1px solid #f0f2f5;font-size:14px}.mini:last-child{border-bottom:0}.emptymini{padding:22px;color:#98a2b3}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px 18px;border-bottom:1px solid #edf0f4;font-size:14px}th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#758095;background:#fbfcfe}.muted{text-align:center;color:#98a2b3}.click{cursor:pointer}.click:hover{background:#fafafa}.overlay{position:fixed;inset:0;background:rgba(15,23,42,.4);display:grid;place-items:center;padding:20px;z-index:50}.modal{width:min(980px,100%);background:white;border-radius:18px;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.22)}.modalHead{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.modalHead h3{margin:0}.icon{border:0;background:#f3f4f6;border-radius:9px;width:36px;height:36px;display:grid;place-items:center;cursor:pointer}form{display:grid;gap:13px}label{display:grid;gap:6px;font-size:13px;font-weight:600}input{border:1px solid #d7dce5;border-radius:10px;padding:11px 12px;font:inherit}.save{justify-content:center;margin-top:8px}.back{border:0;background:transparent;margin:0 0 16px;padding:0;cursor:pointer;color:#4b5563}.empty{padding:40px;text-align:center;color:#7b8493}.loading{padding:40px;color:#7b8493}.settings{padding:20px}.settings p{margin:8px 0}
@media(max-width:900px){.app{grid-template-columns:80px 1fr}.brand>div:last-child{display:none}nav button{font-size:0}nav button:before{content:'•';font-size:18px}.cards,.cards.three,.grid2{grid-template-columns:1fr 1fr}main{padding:22px}.userbox span{display:none}}@media(max-width:640px){.app{display:block}aside{padding:10px;position:sticky;top:0;z-index:5}.brand{display:none}nav{display:flex;overflow:auto}nav button{font-size:12px!important;white-space:nowrap}nav button:before{display:none}main{padding:18px}.cards,.cards.three,.grid2{grid-template-columns:1fr}.panel{overflow:auto}table{min-width:650px}header{align-items:flex-start}}
select{border:1px solid #d7dce5;border-radius:10px;padding:11px 12px;font:inherit;background:#fff;color:#18212f;width:100%}.helper{margin:14px 18px;padding:12px 14px;border-radius:10px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:13px}
.danger:disabled{opacity:.35;cursor:not-allowed;background:#f9fafb}

.time24{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center}.time24 span{font-size:20px;font-weight:700;text-align:center}.time24 select{text-align:center;font-variant-numeric:tabular-nums}



/* Reports filters */
.reportFilters{margin-bottom:18px}
.filterGrid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px;padding:18px}
.filterGrid label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;color:#374151}
.filterGrid select,.filterGrid input{width:100%;padding:11px 12px;border:1px solid #d8dde6;border-radius:10px;background:#fff;font:inherit;color:#111827;outline:none}
.filterGrid select:focus,.filterGrid input:focus{border-color:#9aa4b2;box-shadow:0 0 0 3px rgba(17,24,39,.06)}
.secondary{border:1px solid #d8dde6;background:#fff;color:#111827;border-radius:9px;padding:9px 12px;cursor:pointer;font-weight:600}
.secondary:hover{background:#f8fafc}
@media(max-width:900px){.filterGrid{grid-template-columns:repeat(2,minmax(150px,1fr))}}
@media(max-width:600px){.filterGrid{grid-template-columns:1fr}}

.actionRow{display:flex;gap:6px;flex-wrap:wrap}.salaryInfo{margin:0 0 18px}.salaryInfo b{color:#111827}


/* Dashboard revenue cards */
.revenueLine{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.revenueLine em{font-style:normal;font-size:12px;font-weight:700;color:#475569;background:#f1f5f9;border-radius:999px;padding:6px 9px;white-space:nowrap}
.revenueCard strong{font-size:24px}

/* Fuel expenses */
.fuelFilters{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr)) auto;gap:12px;align-items:end;padding:18px}
.fuelFilters label{display:flex;flex-direction:column;gap:7px}
.fuelFilters .secondary{height:42px}
.fuelReports{align-items:start}
@media(max-width:1000px){.fuelFilters{grid-template-columns:repeat(2,minmax(160px,1fr))}.fuelFilters .secondary{width:100%}}
@media(max-width:640px){.fuelFilters{grid-template-columns:1fr}.revenueLine{align-items:flex-start;flex-direction:column}.revenueLine em{margin-top:2px}}

.linkBtn{
  background:none;
  border:0;
  padding:0;
  font:inherit;
  color:#2563eb;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
}
.linkBtn:hover{opacity:.75;}


/* ===== V29 Mobile / Tablet Responsive Layout ===== */
html, body { max-width: 100%; overflow-x: hidden; }
* { box-sizing: border-box; }

.mobileMenuBtn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
}

.tablewrap,
.panel,
#content,
main {
  min-width: 0;
}

.tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.tablewrap table,
table {
  white-space: nowrap;
}

button,
input,
select {
  touch-action: manipulation;
}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .cards.three {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .grid2,
  .fuelReports {
    grid-template-columns: 1fr !important;
  }
  .filterGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .mobileMenuBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .floatingMenuBtn {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    z-index: 1101;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
  }

  .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: min(82vw, 300px) !important;
    min-width: min(82vw, 300px) !important;
    z-index: 1100;
    transform: translateX(-105%);
    transition: transform .2s ease;
    overflow-y: auto;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    box-shadow: 14px 0 35px rgba(0,0,0,.18);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 1090;
  }

  .main,
  main,
  .content,
  #content {
    width: 100% !important;
    margin-left: 0 !important;
    max-width: 100% !important;
  }

  .topbar {
    min-height: 58px;
    padding-left: 56px !important;
    padding-right: 12px !important;
    gap: 8px;
  }

  .topbar h1,
  .topbar .title {
    font-size: 17px !important;
  }

  #content {
    padding: 12px !important;
  }

  .cards,
  .cards.three {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .card {
    min-height: auto !important;
    padding: 14px !important;
  }

  .card .value,
  .card strong {
    font-size: 22px !important;
  }

  .panel {
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    overflow: hidden;
  }

  .panelTitle {
    padding: 13px 12px !important;
    gap: 8px;
    flex-wrap: wrap;
  }

  .panelTitle > span,
  .panelTitle h2,
  .panelTitle h3 {
    min-width: 0;
  }

  .panelTitle button {
    width: auto;
    min-height: 40px;
  }

  .tablewrap {
    margin: 0;
    border-radius: 0 0 12px 12px;
  }

  table {
    min-width: 720px;
    font-size: 13px;
  }

  th, td {
    padding: 10px 9px !important;
  }

  .linkBtn {
    min-height: 32px;
    padding: 4px 2px !important;
  }

  button.primary,
  button.secondary,
  button.danger,
  .primary,
  .secondary,
  .danger {
    min-height: 42px;
  }

  button.small,
  .small {
    min-height: 36px !important;
    padding: 7px 10px !important;
  }

  .grid2,
  .fuelReports,
  .filterGrid,
  .time24 {
    grid-template-columns: 1fr !important;
  }

  .filterGrid {
    gap: 10px;
  }

  .fuelFilters {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .fuelFilters button,
  .filterGrid button {
    width: 100%;
  }

  label {
    width: 100%;
  }

  input,
  select,
  textarea {
    width: 100%;
    min-height: 44px;
    font-size: 16px !important; /* prevents iOS zoom */
  }

  .time24 {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center;
    gap: 8px;
  }

  .overlay {
    padding: 10px !important;
    align-items: flex-end !important;
  }

  .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0 !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .modalHead {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .modal form {
    padding-bottom: 8px;
  }

  .save {
    width: 100%;
    min-height: 48px !important;
  }

  .settings {
    word-break: break-word;
  }
}

@media (max-width: 420px) {
  #content {
    padding: 8px !important;
  }

  .card {
    padding: 12px !important;
  }

  .card .value,
  .card strong {
    font-size: 20px !important;
  }

  .panelTitle {
    padding: 11px 10px !important;
  }

  table {
    min-width: 680px;
  }
}

/* V30 sorting + driver status */
.panelActions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.panelActions select{min-width:210px}
.statusBadge{display:inline-block;margin-top:5px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:700}
.statusBadge.active{background:#dcfce7;color:#166534}
.statusBadge.terminated{background:#fee2e2;color:#991b1b}
@media(max-width:760px){
  .panelActions{width:100%}
  .panelActions select,.panelActions button{width:100%}
}


/* V30.1 Drivers page layout refinement */
.driverTableWrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.driverTableWrap table{
  width:100%;
  min-width:860px;
  table-layout:fixed;
  white-space:normal;
}
.driverTableWrap th{
  font-size:12px;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#64748b;
  padding:11px 10px !important;
}
.driverTableWrap td{
  vertical-align:middle;
  padding:12px 10px !important;
  font-size:13px;
}
.driverTableWrap th:nth-child(1),
.driverTableWrap td:nth-child(1){width:22%}
.driverTableWrap th:nth-child(2),
.driverTableWrap td:nth-child(2),
.driverTableWrap th:nth-child(3),
.driverTableWrap td:nth-child(3),
.driverTableWrap th:nth-child(4),
.driverTableWrap td:nth-child(4){width:14%}
.driverTableWrap th:nth-child(5),
.driverTableWrap td:nth-child(5){width:20%}
.driverTableWrap th:nth-child(6),
.driverTableWrap td:nth-child(6){width:16%}

.driverNameCell{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  min-width:0;
}
.driverNameLink{
  font-size:15px;
  font-weight:700;
  text-decoration:none;
  color:#0f172a;
  overflow-wrap:anywhere;
  text-align:left;
}
.driverNameLink:hover{color:#2563eb}
.driverMeta{
  font-size:11px;
  color:#64748b;
}
.driverPeriod{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.driverPeriod strong{
  font-size:14px;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
}
.driverPeriod span{
  font-size:11px;
  color:#64748b;
}
.driverBalanceCell{
  display:flex;
  flex-direction:column;
  gap:3px;
}
.driverBalanceCell strong{
  font-size:15px;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
}
.driverBalanceCell span{
  font-size:11px;
  color:#64748b;
}
.driverActions{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.driverActions button{
  width:100%;
  white-space:nowrap;
}

@media (min-width:1200px){
  .driverTableWrap table{min-width:0}
}

@media (max-width:760px){
  .driverTableWrap{
    margin:0 -2px;
    width:calc(100% + 4px);
  }
  .driverTableWrap table{
    min-width:760px;
  }
  .driverNameLink{font-size:14px}
  .driverPeriod strong,
  .driverBalanceCell strong{font-size:13px}
}


/* V31 Public customer balance */
.publicCustomerView{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#f4f7fb;
}
.publicCustomerView.hidden{display:none!important}
.publicBalanceCard{
  width:min(520px,100%);
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:22px;
  padding:34px;
  box-shadow:0 18px 55px rgba(15,23,42,.10);
  text-align:center;
}
.publicBrand{
  font-size:13px;
  letter-spacing:.16em;
  font-weight:800;
  color:#64748b;
  margin-bottom:24px;
}
.publicLabel{
  font-size:13px;
  color:#64748b;
  margin-bottom:7px;
}
.publicBalanceCard h1{
  margin:0 0 24px;
  font-size:26px;
  line-height:1.2;
  color:#0f172a;
}
.publicBalanceAmount{
  font-size:42px;
  line-height:1;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  color:#0f172a;
  margin-bottom:14px;
}
.publicBalanceStatus{
  font-size:14px;
  color:#475569;
}
.publicBalanceUpdated{
  font-size:11px;
  color:#94a3b8;
  margin-top:18px;
}
@media(max-width:600px){
  .publicCustomerView{padding:14px}
  .publicBalanceCard{padding:28px 18px;border-radius:18px}
  .publicBalanceAmount{font-size:34px}
  .publicBalanceCard h1{font-size:22px}
}


/* V31.2 Customer share link visibility */
.customerTableWrap table{min-width:1180px}
.shareLinkHeader,.shareLinkCell{min-width:120px}
.customerCopyLinkBtn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-width:108px;
  white-space:nowrap;
}
@media(max-width:760px){
  .customerTableWrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .customerCopyLinkBtn{min-height:38px}
}


/* V31.3 public statement */
.publicStatementSection{
  margin-top:30px;
  padding-top:24px;
  border-top:1px solid #e5e7eb;
  text-align:left;
}
.publicStatementTitle{
  font-size:16px;
  font-weight:800;
  color:#0f172a;
  margin-bottom:12px;
}
.publicStatementWrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  border:1px solid #e5e7eb;
  border-radius:12px;
}
.publicStatementTable{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  white-space:nowrap;
  font-size:12px;
}
.publicStatementTable th{
  text-align:left;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding:10px 12px;
  border-bottom:1px solid #e5e7eb;
}
.publicStatementTable td{
  padding:11px 12px;
  border-bottom:1px solid #eef2f7;
  color:#1e293b;
}
.publicStatementTable tr:last-child td{border-bottom:0}
.publicStatementTable .num{text-align:right;font-variant-numeric:tabular-nums}
.publicEmpty{text-align:center!important;color:#94a3b8!important;padding:22px!important}
@media(max-width:600px){
  .publicStatementSection{margin-top:22px;padding-top:18px}
  .publicStatementTable{min-width:700px}
}


/* V31.4 Full-page public customer statement */
.publicCustomerView{
  min-height:100dvh !important;
  width:100% !important;
  display:block !important;
  padding:0 !important;
  background:#f8fafc !important;
}
.publicCustomerView.hidden{display:none!important}

.publicBalanceCard{
  width:100% !important;
  max-width:none !important;
  min-height:100dvh !important;
  margin:0 !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:36px clamp(20px,5vw,72px) 56px !important;
  text-align:left !important;
  background:#fff !important;
}

.publicBrand{
  font-size:14px !important;
  letter-spacing:.16em !important;
  font-weight:800 !important;
  color:#64748b !important;
  margin-bottom:28px !important;
}

.publicLabel{
  font-size:14px !important;
  color:#64748b !important;
  margin-bottom:6px !important;
}

.publicBalanceCard h1{
  margin:0 0 18px !important;
  font-size:clamp(30px,4vw,44px) !important;
  color:#0f172a !important;
}

.publicBalanceAmount{
  font-size:clamp(44px,7vw,72px) !important;
  line-height:1 !important;
  font-weight:800 !important;
  margin:0 0 12px !important;
  color:#0f172a !important;
}

.publicBalanceStatus{
  font-size:16px !important;
  color:#475569 !important;
  margin-bottom:8px !important;
}

.publicBalanceUpdated{
  font-size:12px !important;
  color:#94a3b8 !important;
  margin-top:0 !important;
}

.publicStatementSection{
  margin-top:34px !important;
  padding-top:28px !important;
  border-top:1px solid #e5e7eb !important;
  text-align:left !important;
}

.publicStatementTitle{
  font-size:22px !important;
  font-weight:800 !important;
  margin-bottom:14px !important;
}

.publicStatementWrap{
  width:100% !important;
  overflow-x:auto !important;
  border:1px solid #e5e7eb !important;
  border-radius:10px !important;
}

.publicStatementTable{
  width:100% !important;
  min-width:820px !important;
  border-collapse:collapse !important;
  white-space:nowrap !important;
  font-size:13px !important;
}

.publicStatementTable th{
  padding:13px 14px !important;
  background:#f8fafc !important;
}

.publicStatementTable td{
  padding:14px !important;
}

@media(max-width:700px){
  .publicBalanceCard{
    padding:24px 14px 40px !important;
  }
  .publicBrand{
    margin-bottom:20px !important;
  }
  .publicBalanceCard h1{
    font-size:28px !important;
  }
  .publicBalanceAmount{
    font-size:42px !important;
  }
  .publicStatementTitle{
    font-size:19px !important;
  }
  .publicStatementTable{
    min-width:760px !important;
  }
}


/* V35 customer search */
.customerToolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.customerToolbar input[type="search"]{
  min-width:220px;
  height:42px;
  border:1px solid #d8dee9;
  border-radius:10px;
  padding:0 12px;
  background:#fff;
}
@media(max-width:760px){
  .customerToolbar{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }
  .customerToolbar input[type="search"],
  .customerToolbar select,
  .customerToolbar button{
    width:100%;
    min-width:0;
  }
}


/* V36 searchable customer selector */
.customerSearchInput{width:100%}
.customerSearchResults{
  position:relative;
  z-index:30;
  margin-top:6px;
  max-height:240px;
  overflow-y:auto;
  border:1px solid #d8dee9;
  border-radius:10px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.12);
}
.customerSearchResults.hidden{display:none}
.customerSearchOption{
  display:block;
  width:100%;
  text-align:left;
  border:0;
  border-bottom:1px solid #eef2f7;
  background:#fff;
  padding:11px 12px;
  cursor:pointer;
  font:inherit;
}
.customerSearchOption:last-child{border-bottom:0}
.customerSearchOption:hover,.customerSearchOption:focus{background:#f8fafc}
.customerSearchEmpty{padding:12px;color:#94a3b8;font-size:13px}
@media(max-width:760px){
  .customerSearchOption{min-height:44px}
  .customerSearchResults{max-height:280px}
}


/* V38 Yellow & Red Theme */
:root{
  --az-red:#b91c1c;
  --az-red-dark:#991b1b;
  --az-red-soft:#fee2e2;
  --az-yellow:#facc15;
  --az-yellow-dark:#eab308;
  --az-yellow-soft:#fef9c3;
  --az-cream:#fffdf2;
  --az-ink:#2b160f;
}

body{
  background:var(--az-cream) !important;
  color:var(--az-ink) !important;
}

.sidebar{
  background:linear-gradient(180deg,var(--az-red) 0%,var(--az-red-dark) 100%) !important;
  border-right:0 !important;
}
.sidebar .brand,
.sidebar .logo,
.sidebar h1,
.sidebar h2{
  color:#fff !important;
}
.sidebar .brand span,
.sidebar .logo span{
  color:var(--az-yellow) !important;
}
.sidebar nav button,
.sidebar .navItem{
  color:#fff7ed !important;
}
.sidebar nav button:hover,
.sidebar nav button.active,
.sidebar .navItem:hover,
.sidebar .navItem.active{
  background:var(--az-yellow) !important;
  color:#5f1010 !important;
}

.topbar,
header.topbar{
  background:#fff !important;
  border-bottom:3px solid var(--az-yellow) !important;
}

.card,
.panel,
.modal{
  border-color:#f3d7a0 !important;
  box-shadow:0 8px 24px rgba(127,29,29,.07) !important;
}
.card{
  border-top:4px solid var(--az-yellow) !important;
}
.panelHead,
.panel-header{
  border-bottom-color:#fde68a !important;
}

button.primary,
.primary{
  background:var(--az-red) !important;
  border-color:var(--az-red) !important;
  color:#fff !important;
}
button.primary:hover,
.primary:hover{
  background:var(--az-red-dark) !important;
  border-color:var(--az-red-dark) !important;
}

button.secondary,
.secondary{
  background:var(--az-yellow) !important;
  border-color:var(--az-yellow-dark) !important;
  color:#5f1010 !important;
}
button.secondary:hover,
.secondary:hover{
  background:var(--az-yellow-dark) !important;
}

button.danger,
.danger{
  background:#dc2626 !important;
  border-color:#dc2626 !important;
  color:#fff !important;
}

input:focus,
select:focus,
textarea:focus{
  border-color:var(--az-red) !important;
  box-shadow:0 0 0 3px rgba(250,204,21,.28) !important;
  outline:none !important;
}

table thead th{
  background:var(--az-yellow-soft) !important;
  color:#7f1d1d !important;
  border-bottom-color:#facc15 !important;
}
table tbody tr:hover td{
  background:#fffbea !important;
}

.linkBtn,
a{
  color:var(--az-red) !important;
}

.badge,
.status{
  border-color:#facc15 !important;
}

.customerSearchOption:hover,
.customerSearchOption:focus{
  background:var(--az-yellow-soft) !important;
  color:#7f1d1d !important;
}

.publicCustomerView{
  background:var(--az-cream) !important;
}
.publicBalanceCard{
  border-top:7px solid var(--az-red) !important;
}
.publicBrand{
  color:var(--az-red) !important;
}
.publicBalanceAmount{
  color:var(--az-red-dark) !important;
}
.publicStatementTable th{
  background:var(--az-yellow-soft) !important;
  color:#7f1d1d !important;
}

@media(max-width:760px){
  .sidebar{
    background:linear-gradient(180deg,var(--az-red) 0%,var(--az-red-dark) 100%) !important;
  }
}


/* V39 PWA */
#installAppBtn{margin-top:10px}
@media(max-width:760px){
  #installAppBtnHeader{width:auto!important;min-width:96px}
}
@media(display-mode:standalone){
  #installAppBtn,#installAppBtnHeader{display:none!important}
}


/* V40 Trip sorting and filters */
.tripFilters{
  display:grid;
  grid-template-columns:repeat(5,minmax(140px,1fr));
  gap:10px;
  align-items:end;
  margin-bottom:14px;
}
.tripFilters label{
  font-size:12px;
  color:#64748b;
}
.tripFilters select{
  margin-top:5px;
}
.tripSortBtn{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  font-weight:800;
  color:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.tripSortBtn:hover{
  text-decoration:underline;
}
.tripTableWrap th{
  user-select:none;
}
@media(max-width:1000px){
  .tripFilters{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .tripFilters{grid-template-columns:1fr}
  .tripFilters button{width:100%}
}


/* V40.2 Trips filters only */
.tripFiltersThree{
  grid-template-columns:repeat(3,minmax(160px,1fr)) auto !important;
}
@media(max-width:900px){
  .tripFiltersThree{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media(max-width:760px){
  .tripFiltersThree{grid-template-columns:1fr !important}
}


/* V41 Driver security deposit */
.publicDriverDepositSummary{
  display:grid;
  grid-template-columns:minmax(200px,320px) minmax(220px,360px);
  gap:18px;
  align-items:stretch;
  margin:18px 0 18px;
}
.publicDriverDepositSummary.hidden{display:none!important}

.driverDepositLine,
.driverRemainingLine{
  border:1px solid #f0d7a0;
  border-radius:14px;
  padding:16px 18px;
  background:#fffdf2;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.driverDepositAmount{
  font-size:24px;
  font-weight:800;
  color:#b91c1c;
  font-variant-numeric:tabular-nums;
}
.driverDepositLabel,
.driverRemainingLine span{
  font-size:12px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.driverRemainingLine strong{
  font-size:28px;
  color:#0f172a;
  font-variant-numeric:tabular-nums;
}

@media(max-width:700px){
  .publicDriverDepositSummary{
    grid-template-columns:1fr;
    gap:10px;
  }
  .driverDepositAmount{font-size:21px}
  .driverRemainingLine strong{font-size:24px}
}

/* V42 Cashbox expense */
#cashboxExpensePayee{margin-top:0}


/* V43 Dashboard fuel mini */
.dashboardTripCard .fuelMini{
  display:block;
  margin-top:9px;
  font-size:11px;
  color:#64748b;
  font-weight:600;
}


/* V44 Trip tabs */
.tripTabs{
  display:flex;
  gap:8px;
  margin-bottom:14px;
  flex-wrap:wrap;
}
.tripTabBtn{
  border:1px solid #e5b94a;
  background:#fff8d6;
  color:#7f1d1d;
  border-radius:999px;
  padding:9px 14px;
  font-weight:700;
  cursor:pointer;
}
.tripTabBtn.active{
  background:#b91c1c;
  border-color:#b91c1c;
  color:#fff;
}
@media(max-width:760px){
  .tripTabs{
    display:grid;
    grid-template-columns:1fr;
  }
  .tripTabBtn{
    width:100%;
  }
}

/* V46 Settings - customer automatic message */
.settingsForm{margin-top:24px;max-width:760px}
.settingsForm textarea{width:100%;min-height:150px;resize:vertical;margin-top:8px}
.settingsForm .helper{margin:8px 0 14px}
.settingsSaved{margin-left:10px;font-weight:700}


/* V47 Dashboard collections + average trip */
.dashboardTripCard .dashboardMini,
.collectionDashboardCard small{
  display:block;
  margin-top:6px;
  font-size:11px;
  color:#64748b;
  font-weight:600;
}
.collectionDashboardCard strong{
  display:block;
  margin-top:8px;
  font-size:24px;
  font-variant-numeric:tabular-nums;
}


/* V48 Customer public warning */
.publicCustomerView.publicReportLocked{
  visibility:hidden !important;
  pointer-events:none !important;
}

.publicCustomerWarning{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(127,29,29,.92);
}

.publicCustomerWarning.hidden{
  display:none !important;
}

.publicWarningBox{
  width:min(620px,100%);
  background:#fff;
  border:4px solid #facc15;
  border-radius:20px;
  padding:30px;
  box-shadow:0 24px 80px rgba(0,0,0,.28);
  text-align:center;
}

.publicWarningBrand{
  color:#b91c1c;
  font-size:14px;
  font-weight:900;
  letter-spacing:.16em;
  margin-bottom:12px;
}

.publicWarningTitle{
  font-size:24px;
  font-weight:900;
  color:#7f1d1d;
  margin-bottom:18px;
}

.publicWarningMessage{
  white-space:pre-wrap;
  font-size:16px;
  line-height:1.65;
  color:#1f2937;
  text-align:left;
  background:#fffbea;
  border:1px solid #fde68a;
  border-radius:12px;
  padding:18px;
  margin-bottom:22px;
}

.publicWarningOk{
  min-width:160px;
  min-height:46px;
  font-size:16px;
  font-weight:800;
}

@media(max-width:600px){
  .publicCustomerWarning{
    padding:14px;
  }
  .publicWarningBox{
    padding:22px 16px;
    border-radius:16px;
  }
  .publicWarningTitle{
    font-size:21px;
  }
  .publicWarningMessage{
    font-size:15px;
    padding:14px;
  }
  .publicWarningOk{
    width:100%;
  }
}


/* V48.1 Warning modal fix */
.publicCustomerView.publicReportLocked{
  visibility:visible !important;
  pointer-events:auto !important;
}

.publicCustomerWarning{
  background:rgba(15,23,42,.55) !important;
  backdrop-filter:blur(2px);
}

.publicWarningBox{
  max-height:85vh;
  overflow:auto;
}


/* V48.2 Customer warning button */
.publicWarningOk{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding:0 24px !important;
  line-height:1 !important;
}


/* V49 Customer header sorting */
.customerSortHeader{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  font-weight:800;
  color:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.customerSortHeader:hover{
  text-decoration:underline;
}
.customerTableWrap th{
  user-select:none;
}


/* V50 Dashboard daily breakdown */
.dashboardClickableCard{
  width:100%;
  text-align:left;
  cursor:pointer;
  appearance:none;
  border:1px solid #f3d7a0;
}
.dashboardClickableCard:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 28px rgba(127,29,29,.10) !important;
}
.dashboardBreakdownOverlay{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.55);
}
.dashboardBreakdownModal{
  width:min(760px,100%);
  max-height:85vh;
  overflow:auto;
  background:#fff;
  border:3px solid #facc15;
  border-radius:18px;
  padding:20px;
  box-shadow:0 24px 80px rgba(0,0,0,.28);
}
.dashboardBreakdownHead{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}
.dashboardBreakdownHead h3{
  margin:0 0 4px;
  color:#7f1d1d;
}
.dashboardBreakdownHead small{
  color:#64748b;
  font-weight:700;
}
@media(max-width:600px){
  .dashboardBreakdownOverlay{padding:10px}
  .dashboardBreakdownModal{padding:14px}
}


/* V51 Customer search everywhere */
.customerToolbar input[type="search"]{
  min-width:240px;
  height:42px;
  border:1px solid #d8dee9;
  border-radius:10px;
  padding:0 12px;
  background:#fff;
}
.customerSearchInput{width:100%}
.customerSearchResults{
  position:relative;
  z-index:40;
  margin-top:6px;
  max-height:240px;
  overflow-y:auto;
  border:1px solid #d8dee9;
  border-radius:10px;
  background:#fff;
  box-shadow:0 10px 28px rgba(15,23,42,.12);
}
.customerSearchResults.hidden{display:none}
.customerSearchOption{
  display:block;
  width:100%;
  text-align:left;
  border:0;
  border-bottom:1px solid #eef2f7;
  background:#fff;
  padding:11px 12px;
  cursor:pointer;
  font:inherit;
}
.customerSearchOption:last-child{border-bottom:0}
.customerSearchOption:hover,.customerSearchOption:focus{
  background:#fef9c3;
}
.customerSearchEmpty{
  padding:12px;
  color:#94a3b8;
  font-size:13px;
}
@media(max-width:760px){
  .customerToolbar{
    width:100%;
    display:grid;
    grid-template-columns:1fr;
  }
  .customerToolbar input[type="search"],
  .customerToolbar button{
    width:100%;
    min-width:0;
  }
  .customerSearchOption{min-height:44px}
}


/* V52 Vehicle status */
.muted{opacity:.72}


/* V53 Vehicle header sorting */
.vehicleSortHeader{
  appearance:none;
  border:0;
  background:transparent;
  padding:0;
  font:inherit;
  font-weight:800;
  color:inherit;
  cursor:pointer;
  white-space:nowrap;
}
.vehicleSortHeader:hover{
  text-decoration:underline;
}


/* V54 Dashboard expense cards */
.dashboardExpenseCard strong{
  display:block;
  margin-top:8px;
  margin-bottom:8px;
  font-size:24px;
  font-variant-numeric:tabular-nums;
}
.dashboardExpenseCard small{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:#64748b;
  font-weight:600;
}

/* V55 Not Assigned trips + Cashbox Today details */
@media(max-width:760px){
  .tripTabs{display:grid;grid-template-columns:1fr 1fr}
}
#cashboxTodayInCard,#cashboxTodayOutCard{
  text-align:left;
  cursor:pointer;
}


/* V56 Cashbox balance cards */
.cashboxBalanceCards{
  margin-top:14px;
}
.cashboxBalanceCard{
  width:100%;
  text-align:left;
  cursor:pointer;
  appearance:none;
}
.cashboxBalanceCard strong{
  display:block;
  margin-top:8px;
  font-size:24px;
  font-variant-numeric:tabular-nums;
}
.cashboxBalanceCard small{
  display:block;
  margin-top:5px;
  font-size:11px;
  color:#64748b;
  font-weight:600;
}
.cashboxBalanceCard:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 28px rgba(127,29,29,.10) !important;
}

/* V58 Driver Portal */
.driverLoginBadge{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 9px;
  border-radius:999px;
  background:#fef9c3;
  color:#7f1d1d;
  font-size:11px;
  font-weight:800;
}
.driverPortal{
  min-height:100vh;
  background:#fffdf2;
}
.driverPortalHeader{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:20px clamp(16px,4vw,44px);
  background:#fff;
  border-bottom:4px solid #facc15;
}
.driverPortalHeader h1{
  margin:4px 0 0;
  color:#0f172a;
}
.driverPortalBrand{
  color:#b91c1c;
  font-weight:900;
  letter-spacing:.14em;
  font-size:13px;
}
.driverPortalMain{
  width:min(1200px,calc(100% - 28px));
  margin:22px auto 50px;
}
.driverPortalCards{
  margin-bottom:20px;
}
.driverMainBalance{
  border-top-color:#b91c1c !important;
}
.driverMainBalance small{
  display:block;
  margin-top:6px;
  font-size:11px;
  color:#64748b;
}
.driverPortal .panel{
  margin-bottom:18px;
}
@media(max-width:760px){
  .driverPortalHeader{
    padding:14px;
  }
  .driverPortalHeader h1{
    font-size:20px;
  }
  .driverPortalMain{
    width:calc(100% - 18px);
    margin-top:12px;
  }
}

/* V58.12 Driver planned trips */
.driverPlannedCard{font:inherit;text-align:left;cursor:pointer;width:100%;border:0}
.driverPlannedCard:hover{transform:translateY(-1px)}
.driverPlannedCard small{display:block;margin-top:4px}
.driverCompleteTripBtn{white-space:nowrap}

/* V58.12 customer planned trips */
.publicPlannedTripsTable td a{font-weight:700;text-decoration:underline}
#publicPlannedTripsSection{margin-top:18px}

/* ===== V58.17 BRAND / UI REFRESH ===== */
:root{
  --az-red:#bd0f1f;
  --az-red-dark:#970b18;
  --az-yellow:#ffbd08;
  --az-yellow-soft:#fff8e3;
  --az-red-soft:#fff1f1;
  --az-green:#069653;
  --az-ink:#111111;
  --az-muted:#6b7280;
  --az-line:#ececec;
  --az-page:#fafafa;
}

body{background:var(--az-page)!important;color:var(--az-ink)!important}
.brandLogo{display:block;object-fit:contain;max-width:100%;height:auto}

/* Left navigation */
.app{grid-template-columns:245px minmax(0,1fr)!important;background:#fff}
.sidebar,aside.sidebar{
  background:#fff!important;
  color:#111!important;
  border-right:1px solid #ececec!important;
  padding:18px 16px!important;
  box-shadow:none!important;
}
.sidebar .brand{
  min-height:138px;
  padding:8px 2px 20px!important;
  margin:0 0 10px;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px!important;
  border-bottom:1px solid #f1f1f1;
}
.sidebarBrandLogo{width:210px;max-height:112px}
.sidebar .brand small{color:#777!important;margin:0!important;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.sidebar nav{gap:7px!important}
.sidebar nav button{
  color:#171717!important;
  background:transparent!important;
  border-radius:8px!important;
  padding:12px 14px!important;
  font-weight:500;
  transition:.15s ease;
}
.sidebar nav button:hover{background:#fff8df!important;color:#111!important}
.sidebar nav button.active{
  background:linear-gradient(135deg,#ffb900,#ffc928)!important;
  color:#111!important;
  font-weight:700;
  box-shadow:0 5px 14px rgba(255,189,8,.18)
}

/* Top bar */
.main{padding:0!important;background:#fff!important;overflow:auto!important}
.topbar{
  min-height:76px;
  margin:0!important;
  padding:18px 28px!important;
  border-bottom:2px solid var(--az-yellow)!important;
  background:#fff!important;
  position:sticky;
  top:0;
  z-index:10;
}
.topbar h1{font-size:21px!important;font-weight:750}
.topbar p{font-size:12px!important;color:#8a8a8a!important}
.topbar .userbox{gap:10px!important}
.topbar .ghost,.topbar .secondary{border-radius:20px!important}
#content{padding:24px 24px 8px!important;background:#fff!important;min-height:calc(100vh - 150px)}

/* Cards matching approved dashboard concept */
.cards{gap:15px!important;margin-bottom:16px!important}
.card,.panel,.empty{
  border:1px solid #e9e9e9!important;
  border-radius:9px!important;
  box-shadow:0 3px 12px rgba(0,0,0,.055)!important;
  background:#fff!important;
}
.card{padding:18px!important;border-top:1px solid #e9e9e9!important}
.card span{color:#171717!important;font-weight:650!important;font-size:13px!important;margin-bottom:9px!important}
.card strong{font-size:24px!important;color:#111!important}
.card small{color:#555!important}
.dashboardClickableCard{cursor:pointer;transition:transform .12s ease,box-shadow .12s ease}
.dashboardClickableCard:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(0,0,0,.08)!important}
.dashboardTripCard{
  background:linear-gradient(145deg,#fffdf8 0%,#fff5d8 100%)!important;
  border-color:#f6e9c1!important;
}
.dashboardTripCard .revenueLine em{background:transparent!important;color:#202020!important;padding:0!important}
.dashboardTripCard .dashboardMini{display:block;margin-top:8px!important;font-size:11px!important}
.collectionDashboardCard{
  background:linear-gradient(145deg,#fff 0%,#f8fff9 100%)!important;
  border-color:#dcefe3!important;
}
.collectionDashboardCard strong{color:var(--az-green)!important}
.dashboardExpenseCard{
  background:linear-gradient(145deg,#fffafa 0%,#ffecec 100%)!important;
  border-color:#f3dddd!important;
}
.dashboardExpenseCard>span{color:#d6101f!important}
.dashboardExpenseCard strong{display:block;margin-bottom:12px!important}
.dashboardExpenseCard small{display:block;margin-top:6px!important;color:#333!important}
.cards.three .card strong{color:var(--az-green)!important}

/* Panels / tables */
.panelHead{padding:15px 18px!important;border-bottom:1px solid #eee!important;background:#fff}
.panelHead h2{font-size:15px!important}
table thead th{
  background:#fafafa!important;
  color:#202020!important;
  border-bottom:1px solid #eaeaea!important;
  text-transform:none!important;
  letter-spacing:0!important;
  font-weight:700!important;
}
th,td{padding:12px 15px!important;font-size:13px!important}
table tbody tr:hover td{background:#fffaf0!important}
.linkBtn,a{color:#d50f1f!important}

/* Buttons */
.primary{background:var(--az-red)!important;border-color:var(--az-red)!important;color:#fff!important}
.primary:hover{background:var(--az-red-dark)!important}
.secondary{background:var(--az-yellow)!important;border-color:#e4a600!important;color:#191919!important}
.secondary:hover{background:#f0ad00!important}
.ghost{background:#fff!important;color:#222!important;border-color:#ddd!important}

/* Login / public / driver branding */
.auth-shell{background:#fafafa!important}
.auth-card{border-radius:14px!important;border:1px solid #ededed!important;box-shadow:0 14px 36px rgba(0,0,0,.07)!important}
.auth-brand.brandOnly{display:flex!important;flex-direction:column!important;align-items:center!important;text-align:center!important;gap:8px!important;margin-bottom:22px!important}
.authBrandLogo{width:290px;max-height:154px}
.auth-brand.brandOnly p{margin:0!important;font-size:12px!important;color:#777!important}
.publicWarningBrand,.publicBrand{display:flex!important;justify-content:center!important;color:inherit!important}
.publicWarningLogo{width:250px;margin:0 auto 12px}
.publicPageLogo{width:270px;margin:0 auto 12px}
.publicBalanceCard{border-top:0!important}
.driverPortalHeader{background:#fff!important;border-bottom:2px solid var(--az-yellow)!important}
.driverPortalTitleWrap{display:flex;align-items:center;gap:16px}
.driverPortalLogo{width:170px;max-height:82px}
.driverPortalTitleWrap h1{font-size:20px!important}

/* Footer */
.appFooter{
  border-top:1px solid #efefef;
  min-height:66px;
  padding:10px 24px 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#777;
  font-size:11px;
  background:#fff;
}
.footerBrandLogo{width:72px;max-height:40px}

/* Mobile */
@media(max-width:900px){
  .app{grid-template-columns:82px minmax(0,1fr)!important}
  .sidebar .brand{min-height:80px;padding:4px!important}
  .sidebarBrandLogo{width:68px}
  .sidebar .brand small{display:none}
  .topbar{padding:16px 18px!important}
  #content{padding:16px!important}
}
@media(max-width:760px){
  .sidebar,aside.sidebar{
    width:min(82vw,300px)!important;
    min-width:min(82vw,300px)!important;
    padding:14px!important;
  }
  .sidebar .brand{display:flex!important;min-height:120px}
  .sidebarBrandLogo{width:210px}
  .sidebar .brand small{display:block}
  .topbar{padding-left:18px!important}
  .driverPortalTitleWrap{gap:8px}
  .driverPortalLogo{width:130px}
  .driverPortalTitleWrap h1{font-size:17px!important}
  .authBrandLogo{width:240px}
  .publicPageLogo,.publicWarningLogo{width:220px}
}

/* V58.18 public customer trip date range */
.publicTripFilter{
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.publicTripFilter label{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:170px;
  font-size:12px;
  font-weight:700;
  color:#64748b;
}
.publicTripFilter input[type="date"]{
  min-height:42px;
  padding:8px 10px;
  border:1px solid #dbe2ea;
  border-radius:9px;
  background:#fff;
  color:#0f172a;
  font:inherit;
}
.publicTripFilter button{min-height:42px}
.publicTripSummary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,220px));
  gap:12px;
  margin-bottom:14px;
}
.publicTripSummary>div{
  padding:14px 16px;
  border:1px solid #fde68a;
  border-radius:12px;
  background:#fffbeb;
}
.publicTripSummary span{
  display:block;
  margin-bottom:4px;
  color:#92400e;
  font-size:12px;
  font-weight:700;
}
.publicTripSummary strong{
  color:#111827;
  font-size:20px;
  font-variant-numeric:tabular-nums;
}
.publicTripHistoryTable .num{text-align:right}
@media(max-width:600px){
  .publicTripFilter{align-items:stretch}
  .publicTripFilter label{width:100%;min-width:0}
  .publicTripFilter button{width:100%}
  .publicTripSummary{grid-template-columns:1fr 1fr}
  .publicTripSummary strong{font-size:17px}
}


/* V58.19 compact public customer ledger layout */
.publicCustomerView{
  padding:28px 32px 42px!important;
}
.publicBalanceCard{
  width:min(1180px,100%)!important;
  max-width:1180px!important;
  margin:0 auto!important;
  padding:24px 28px 30px!important;
}
.publicHeroRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:36px;
  padding:0 0 20px;
  margin-bottom:8px;
  border-bottom:1px solid #edf0f3;
}
.publicHeroRow .publicBrand{
  flex:0 0 40%;
  justify-content:flex-start!important;
  margin:0!important;
}
.publicHeroRow .publicPageLogo{
  width:min(300px,100%)!important;
  max-height:150px!important;
  object-fit:contain;
  object-position:left center;
  margin:0!important;
}
.publicCustomerSummary{
  flex:1 1 auto;
  min-width:0;
  text-align:right;
}
.publicCustomerSummary .publicLabel{
  font-size:12px!important;
  margin:0 0 4px!important;
}
.publicCustomerSummary h1{
  font-size:30px!important;
  line-height:1.12!important;
  margin:0 0 8px!important;
}
.publicCustomerSummary .publicBalanceAmount{
  font-size:44px!important;
  line-height:1!important;
  margin:0 0 8px!important;
}
.publicCustomerSummary .publicBalanceStatus{
  font-size:14px!important;
  margin:0 0 5px!important;
}
.publicCustomerSummary .publicBalanceUpdated{
  font-size:11px!important;
}
.publicStatementSection{
  margin-top:16px!important;
  padding-top:14px!important;
}
.publicStatementTitle{
  font-size:16px!important;
  margin-bottom:10px!important;
}
.publicStatementWrap{
  border-radius:10px!important;
}
.publicStatementTable th,
.publicStatementTable td{
  padding:9px 11px!important;
  font-size:12px!important;
}
.publicTripFilter{
  gap:9px!important;
  margin-bottom:10px!important;
}
.publicTripFilter label{
  min-width:150px!important;
  font-size:11px!important;
}
.publicTripFilter input[type="date"]{
  min-height:36px!important;
  padding:6px 8px!important;
}
.publicTripSummary{
  margin-bottom:10px!important;
  gap:10px!important;
}
.publicTripSummary>div{
  min-width:140px!important;
  padding:10px 12px!important;
}
.publicTripSummary span{font-size:11px!important}
.publicTripSummary strong{font-size:16px!important}

@media(max-width:760px){
  .publicCustomerView{padding:12px!important}
  .publicBalanceCard{padding:18px 14px 22px!important}
  .publicHeroRow{gap:16px;padding-bottom:16px;align-items:center}
  .publicHeroRow .publicBrand{flex:0 0 38%}
  .publicHeroRow .publicPageLogo{width:100%!important;max-height:100px!important}
  .publicCustomerSummary h1{font-size:21px!important}
  .publicCustomerSummary .publicBalanceAmount{font-size:30px!important}
  .publicCustomerSummary .publicBalanceStatus{font-size:12px!important}
  .publicCustomerSummary .publicBalanceUpdated{font-size:10px!important}
  .publicStatementTable th,.publicStatementTable td{padding:8px!important;font-size:11px!important}
}

@media(max-width:480px){
  .publicHeroRow{gap:10px}
  .publicHeroRow .publicBrand{flex-basis:34%}
  .publicCustomerSummary h1{font-size:18px!important}
  .publicCustomerSummary .publicBalanceAmount{font-size:26px!important}
  .publicCustomerSummary .publicBalanceStatus{font-size:11px!important}
}


/* ===== V58.20 MOBILE NAV / TABS FIX ===== */
@media (max-width:760px){
  /* V58.17 introduced an off-canvas sidebar; ensure the app itself no longer
     reserves the old 82px tablet column on phones. */
  .app{
    display:block!important;
    grid-template-columns:none!important;
    width:100%!important;
  }
  .main,main.main{
    width:100%!important;
    margin:0!important;
  }

  /* Real mobile menu trigger (the JS already supported #mobileMenuBtn). */
  #mobileMenuBtn.mobileMenuBtn{
    display:inline-flex!important;
    flex:0 0 44px;
    width:44px;
    height:44px;
    align-items:center;
    justify-content:center;
    position:relative;
    z-index:1102;
    padding:0!important;
    border:1px solid #e7e7e7!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#111!important;
    font-size:24px!important;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
  }
  .topbar{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    padding:10px 12px!important;
    min-height:64px!important;
  }
  .topbarTitle{
    flex:1 1 auto;
    min-width:0;
  }
  .topbarTitle h1{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .topbarTitle p{display:none!important}
  .topbar .userbox{
    flex:0 0 auto;
    gap:6px!important;
  }
  .topbar .userbox #userEmail{display:none!important}
  .topbar .userbox button{
    min-height:38px!important;
    padding:7px 9px!important;
    font-size:12px!important;
  }

  /* Sidebar must remain off-canvas until the menu button is pressed. */
  .sidebar,aside.sidebar{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    height:100dvh!important;
    width:min(84vw,300px)!important;
    min-width:min(84vw,300px)!important;
    transform:translateX(-105%)!important;
    transition:transform .2s ease!important;
    z-index:1200!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    box-shadow:14px 0 35px rgba(0,0,0,.18)!important;
  }
  body.mobile-nav-open .sidebar,
  body.mobile-nav-open aside.sidebar{
    transform:translateX(0)!important;
  }
  body.mobile-nav-open::after{
    z-index:1190!important;
  }
  .sidebar nav{
    display:grid!important;
    overflow:visible!important;
    gap:7px!important;
  }
  .sidebar nav button{
    display:block!important;
    width:100%!important;
    min-height:44px!important;
    font-size:14px!important;
    text-align:left!important;
    white-space:normal!important;
  }
  .sidebar nav button:before{display:none!important}

  /* Trips: keep all four tabs visible and tappable on phones. */
  .tripTabs{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    overflow:visible!important;
  }
  .tripTabBtn{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:8px 6px!important;
    font-size:12px!important;
    line-height:1.2!important;
    white-space:normal!important;
    text-align:center!important;
  }
}

@media (max-width:380px){
  .tripTabs{grid-template-columns:1fr!important}
  .topbar .userbox #installAppBtnHeader{display:none!important}
}


/* V58.21 Driver PWA */
.driverHeaderActions{display:flex;align-items:center;gap:8px}
.driverInstallBtn{white-space:nowrap}
@media(display-mode:standalone){
  .driverInstallBtn{display:none!important}
}
@media(max-width:520px){
  .driverPortalHeader{align-items:flex-start}
  .driverHeaderActions{flex-direction:column;align-items:stretch}
  #driverInstallAppBtnHeader{min-width:92px}
}

/* V58.22 Driver push notifications */
.driverNotificationRow{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:4px 0}
.driverNotificationRow .helper{margin-top:5px}
.settingsForm hr,.settings hr{border:0;border-top:1px solid #e5e7eb;margin:24px 0}
@media(max-width:640px){.driverNotificationRow{align-items:stretch;flex-direction:column}.driverNotificationRow button{width:100%}}


/* V58.31 mandatory driver notification acknowledgement */
.driverAckOverlay{position:fixed;inset:0;z-index:99999;background:rgba(12,18,28,.72);display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(4px)}
.driverAckCard{width:min(520px,100%);background:#fff;border-radius:22px;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.34);text-align:center}
.driverAckType{display:inline-block;padding:7px 12px;border-radius:999px;background:#fff3cd;color:#7a5200;font-weight:800;font-size:12px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:12px}
.driverAckCard h2{margin:0 0 14px;font-size:25px}
.driverAckMessage{white-space:pre-wrap;font-size:17px;line-height:1.55;color:#242a33;margin:0 auto 16px}
.driverAckMeta{font-size:12px;color:#737b86;margin-bottom:16px;word-break:break-all}
.driverAckOkay{width:100%;min-height:50px;font-size:16px;font-weight:800}
.notifReadBadge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;white-space:nowrap}
.notifReadBadge.read{background:#dff5e7;color:#176b36}.notifReadBadge.unread{background:#ffe5e5;color:#9b1c1c}
@media(max-width:600px){.driverAckCard{padding:22px 18px;border-radius:18px}.driverAckCard h2{font-size:22px}.driverAckMessage{font-size:16px}}


/* V58.32 Driver notification inbox */
.driverNotificationInbox{display:flex;flex-direction:column;gap:10px}
.driverNotificationInbox.hidden{display:none!important}
.driverNotificationItem{
  border:1px solid var(--line,#e5e7eb);
  border-radius:12px;
  padding:12px;
  background:var(--card,#fff);
}
.driverNotificationItemTop{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:7px}
.driverNotificationBadge{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.driverNotificationDate{font-size:12px;color:var(--muted,#6b7280)}
.driverNotificationTitle{display:block;font-size:15px;margin-bottom:5px}
.driverNotificationMessage{white-space:pre-wrap;line-height:1.45;margin-bottom:8px}
.driverNotificationMeta{font-size:12px;color:var(--muted,#6b7280);margin-bottom:8px}
.driverNotificationEmpty{padding:10px 0;color:var(--muted,#6b7280)}
.driverMarkNotificationRead{margin-top:2px}
@media(max-width:640px){
  .driverNotificationItemTop{align-items:flex-start;flex-direction:column;gap:3px}
  .driverMarkNotificationRead{width:100%}
}
