:root{
  --yellow:#FFD54A;
  --yellow-dark:#FFC107;

  --bg:#FFFBEA;
  --bg-grad: radial-gradient(circle at top, #FFFDE7 0%, #FFF3CD 100%);

  --card-bg:#F7F7F3;
  --surface:#FFFDF9;
  --surface-2:#FFFDF3;

  --text-main:#222;
  --text-muted:#777;

  --card-radius:24px;
  --radius-input:12px;

  --border-soft:rgba(0,0,0,0.08);
  --border-softer:rgba(0,0,0,0.06);
  --shadow-soft:0 8px 20px rgba(0,0,0,0.12);
}

*{box-sizing:border-box;margin:0;padding:0;}

body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  background:var(--bg-grad);
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:stretch;
  color:var(--text-main);
  padding:0 12px;
}

.app{
  width:100%;
  max-width:1024px;
  padding:16px 0;
}

.card{
  background:var(--card-bg);
  border-radius:var(--card-radius);
  padding:18px;
  min-height:calc(100vh - 32px);
  box-shadow:var(--shadow-soft);
  display:flex;
  flex-direction:column;
}

.title {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
}

.subtitle {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.title-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(255,213,74,0.20);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--text-muted);
}
.title-pill-dot{
  width:7px;height:7px;
  border-radius:50%;
  background:var(--yellow-dark);
}

.btn-top{
  border-radius:999px;
  border:1px solid var(--border-soft);
  background:var(--surface-2);
  padding:6px 14px;
  font-size:12px;
  cursor:pointer;
  white-space:nowrap;
}

/* =========================
   MENU SCREEN
========================= */
body.menu-screen .header{
  text-align:center;
  margin-bottom:18px;
}
body.menu-screen .menu{
  margin-top:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
body.menu-screen .btn-menu{
  border:none;
  width:100%;
  border-radius:20px;
  padding:14px 16px;
  font-size:15px;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:space-between;
  text-align:left;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
body.menu-screen .btn-main{
  background:linear-gradient(135deg,var(--yellow),var(--yellow-dark));
  color:#2b2100;
  box-shadow:0 8px 18px rgba(255,193,7,0.38);
}
body.menu-screen .btn-ghost{
  background:var(--surface);
  border:1px solid rgba(0,0,0,0.04);
  color:var(--text-main);
}
body.menu-screen .btn-menu:active{
  transform:translateY(1px) scale(.99);
  box-shadow:0 4px 10px rgba(0,0,0,0.12);
}
body.menu-screen .btn-left{
  display:flex;
  flex-direction:column;
  gap:2px;
}
body.menu-screen .btn-title{font-size:15px;}
body.menu-screen .btn-sub{
  font-size:12px;
  color:var(--text-muted);
  opacity:.85;
}
body.menu-screen .btn-icon{
  width:26px;height:26px;
  border-radius:999px;
  background:rgba(255,255,255,0.90);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
}
body.menu-screen .footer{
  margin-top:auto;
  padding-top:18px;
  font-size:11px;
  text-align:center;
  color:var(--text-muted);
  opacity:.8;
}

/* =========================
   ADD PACKAGE
========================= */

body.add-package .client-combo{
  position: relative;
}

body.add-package .client-input{
  padding-right: 36px; /* space for arrow */
}

body.add-package .client-combo::after{
  content:"▼";
  position:absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color:#333;
  pointer-events:none;
}

body.add-package .client-dd{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 8px);
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  overflow:hidden;
  z-index: 50;
}

body.add-package .client-item{
  padding: 12px 14px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:4px;
}

body.add-package .client-item:hover{
  background: rgba(255,193,7,0.12);
}

body.add-package .client-name{
  font-weight: 900;
  color:#111;
}

body.cadd-package .client-phone{
  font-size: 12px;
  color:#666;
}


body.add-package .card{padding:16px 16px 20px;}

body.add-package .topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
body.add-package .top-left{
  display:flex;
  align-items:center;
  gap:10px;
}
body.delivery-screen .topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
body.delivery-screen .top-left{
  display:flex;
  align-items:center;
  gap:10px;
}
body.add-package .back-btn{
  width:32px;height:32px;
  border-radius:999px;
  border:none;
  background:#FFF9E0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;
}
body.delivery-screen .back-btn{
  width:32px;height:32px;
  border-radius:999px;
  border:none;
  background:#FFF9E0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  cursor:pointer;
}
body.add-package .title-block{display:flex;flex-direction:column;gap:2px;}
body.add-package .title{font-size:18px;font-weight:700;}
body.add-package .subtitle{font-size:12px;color:var(--text-muted);}

body.delivery-screen .title-block{display:flex;flex-direction:column;gap:2px;}
body.delivery-screen .title{font-size:18px;font-weight:700;}
body.delivery-screen .subtitle{font-size:12px;color:var(--text-muted);}

body.add-package .menu-btn{
  border-radius:999px;
  border:1px solid var(--border-soft);
  padding:6px 10px;
  font-size:12px;
  background:var(--surface-2);
  cursor:pointer;
  white-space:nowrap;
}

body.add-package .success-banner{
  margin-top:8px;
  font-size:12px;
  padding:8px 10px;
  border-radius:12px;
  background:#E8F5E9;
  color:#2E7D32;
  display:none;
}

body.add-package .section-label{
  margin-top:14px;
  margin-bottom:8px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.1em;
  color:var(--text-muted);
}

body.add-package .field-group{display:flex;flex-direction:column;gap:10px;}
body.add-package .field{display:flex;flex-direction:column;gap:4px;}
body.add-package .field label{font-size:13px;color:#444;}
body.add-package .field label span.required{color:#E53935;}

body.add-package input,
body.add-package textarea{
  width:100%;
  border-radius:var(--radius-input);
  border:1px solid var(--border-softer);
  padding:9px 11px;
  font-size:14px;
  background:var(--surface-2);
  outline:none;
  transition:border .12s, box-shadow .12s, background .12s;
}
body.add-package input:focus,
body.add-package textarea:focus{
  border-color:var(--yellow-dark);
  box-shadow:0 0 0 1px rgba(255,193,7,0.40);
  background:#fff;
}
body.add-package textarea{resize:vertical;min-height:70px;}
body.add-package .row{display:flex;gap:10px;}
body.add-package .row .field{flex:1;}
body.add-package .hint{font-size:11px;color:var(--text-muted);}

body.add-package .bottom-actions{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
body.add-package .btn-submit{
  width:100%;
  border:none;
  border-radius:999px;
  padding:12px 16px;
  font-size:15px;
  font-weight:700;
  background:linear-gradient(135deg,var(--yellow),var(--yellow-dark));
  color:#2b2100;
  box-shadow:0 8px 20px rgba(255,193,7,0.40);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s;
}
body.add-package .btn-submit:active{
  transform:translateY(1px) scale(.99);
  box-shadow:0 4px 10px rgba(0,0,0,0.18);
}
body.add-package .btn-submit.disabled{
  opacity:.6;
  cursor:default;
  box-shadow:none;
}
body.add-package .btn-submit span.loader{
  width:14px;height:14px;
  border-radius:50%;
  border:2px solid rgba(0,0,0,0.12);
  border-top-color:#5D4500;
  animation:spin .7s linear infinite;
}
body.add-package .secondary-link{
  font-size:12px;
  text-align:center;
  color:var(--text-muted);
}

/* Upload box + preview */
body.add-package .upload-box{
  border:2px dashed #CFD8DC;
  border-radius:14px;
  background:#fff;
  padding:28px 16px;
  text-align:center;
  cursor:pointer;
  transition:all .2s ease;
  position:relative;
  overflow:hidden;
}
body.add-package .upload-box:hover{
  border-color:var(--yellow-dark);
  background:var(--surface-2);
}
body.add-package .upload-box.dragover{
  border-color:#FFB300;
  background:#FFF8E1;
}
body.add-package .upload-icon{font-size:32px;margin-bottom:8px;}
body.add-package .upload-title{font-weight:700;font-size:15px;}
body.add-package .upload-sub{font-size:12px;color:var(--text-muted);}
body.add-package .upload-browse{
  color:#FF9800;
  font-weight:700;
  text-decoration:underline;
  cursor:pointer;
}

body.add-package .upload-box.has-file .upload-content{display:none;}
body.add-package .upload-preview{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:12px;
  display:none;
}
body.add-package .upload-box.has-file .upload-preview{display:block;}

body.add-package .change-chip{
  position:absolute;
  top:10px;
  right:10px;
  background:rgba(255,255,255,0.92);
  border:1px solid rgba(0,0,0,0.10);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

/* ===== ADD PACKAGE: FULL IMAGE VIEWER ===== */
body.add-package .image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;              /* IMPORTANT: hide by default */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 14px;
}

body.add-package .image-viewer-inner {
  max-width: 90vw;
  max-height: 80vh;
}

body.add-package .image-viewer-inner img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

body.add-package .image-viewer-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #fff;
  text-align: center;
}


/* =======================
   ADMIN LAYOUT
======================= */

body.admin-screen {
  background: radial-gradient(circle at top, #fffde7, #fff3cd);
}

.admin-screen .card {
  min-height: calc(100vh - 32px);
}

/* top header */
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.topbar-left .title {
  font-size: 20px;
  font-weight: 800;
  margin-top: 2px;
}
.topbar-left .subtitle {
  font-size: 12px;
  color: #777;
}

.title-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(255, 213, 74, 0.2);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #777;
}
.title-pill-dot{
  width:7px; height:7px;
  border-radius:50%;
  background:#ffc107;
}

.btn-top{
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:#fffdf3;
  padding: 8px 14px;
  font-size: 12px;
  cursor:pointer;
  white-space:nowrap;
}

/* =======================
   TABS
======================= */
.admin-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 12px 0 14px;
}

.admin-tab{
  border:0;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(0,0,0,0.05);
  cursor:pointer;
  font-weight:700;
}

.admin-tab.active{
  background: rgba(255, 213, 74, 0.5);
}

/* =======================
   ORDER LIST
======================= */
.orders-list{
  display:flex;
  flex-direction: column;
  gap: 14px;
}

.order-card{
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fffdf9;
  padding: 14px;
}

.order-header{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.order-id{
  font-size: 16px;
  font-weight: 900;
}
.order-date{
  font-size: 12px;
  color:#777;
  margin-top:2px;
}

.status-badge{
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 213, 74, 0.35);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* admin status colors like delivery */
body.admin-screen .status-badge{
  background:#FFF3CD;
  color:#7A5600;
  text-transform:uppercase;
  letter-spacing:.05em;
}
body.admin-screen .status-badge.is-cancelled{ background:#FFECEC; color:#8B0000; }
body.admin-screen .status-badge.is-completed{ background:#EAFFF1; color:#0A6B2D; }

/* optional: make OUT_FOR_DELIVERY / ON_DELIVERY stand out */
body.admin-screen .status-badge.is-out{ background:#EAF3FF; color:#0B4A8B; }
body.admin-screen .status-badge.is-waitpay{ background:#FFF4E6; color:#7A3E00; }

body.admin-screen .dd{ position:relative; }
body.admin-screen .dd-btn{
  border:1px solid rgba(0,0,0,0);
  background:#fffdf9;
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}
body.admin-screen .dd-menu{
  position:absolute;
  right:0;
  top:42px;
  width:160px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius:14px;
  box-shadow:0 16px 30px rgba(0,0,0,0.12);
  padding:8px;
  display:none;
  z-index:60;
}
body.admin-screen .dd.open .dd-menu{ display:block; }
body.admin-screen .dd-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:0;
  background:rgba(0,0,0,0.03);
  font-weight:800;
  cursor:pointer;
  margin-bottom:6px;
}
body.admin-screen .dd-danger{ color:#b30000; background:rgba(255,0,0,0.08); }


.line{
  font-size: 14px;
  margin-top: 4px;
  word-break: break-word;
}
.label{
  font-weight: 800;
}

/* thumbs */
.thumbs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.thumb{
  position:relative;
  width: 120px;
  height: 86px;
  border-radius: 14px;
  overflow:hidden;
  cursor:pointer;
  border: 1px solid rgba(0,0,0,0.08);
  background:#fff;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.thumb-label{
  position:absolute;
  left:6px;
  bottom:6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color:#fff;
  background: rgba(0,0,0,0.55);
}

/* actions row */
.actions-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 12px;
}

.driver-select{
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background:#fff;
  font-size: 14px;
}

.btn{
  border:0;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  cursor:pointer;
  white-space: nowrap;
}

.btn-edit{ background: rgba(255, 213, 74, 0.45); }
.btn-assign{ background: rgba(0,0,0,0.06); }
.btn-delete{ background: rgba(255,0,0,0.08); color:#b30000; }

/* empty */
.no-orders{
  text-align:center;
  color:#777;
  padding: 20px 8px;
}

/* =======================
   OVERLAY + MODAL
======================= */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none; 
  align-items:center;
  justify-content:center;
  padding: 14px;
  z-index: 9999;
}
.overlay.show{ display:flex; }

/* overlay must allow scrolling */
#edit-overlay.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;                 /* you already toggle .show */
  align-items: center;
  justify-content: center;

  /* ✅ allow scroll when content is tall */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 12px;            /* space around modal */
}

#edit-overlay.overlay.show{
  display: flex;
}

/* modal card: limit height and scroll inside */
#edit-overlay .modal{
  width: min(520px, 96vw);
  background: #fff;
  border-radius: 18px;

  /* ✅ key: constrain height */
  max-height: calc(100vh - 32px);

  /* ✅ allow inner scroll */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 16px;
}

/* optional: keep bottom buttons always visible */
#edit-overlay .modal-buttons{
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.modal{
  width: min(520px, 100%);
  /*max-height: 88vh;*/
  overflow:auto;
  background:#fff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
}

.modal-title{
  font-size: 18px;
  font-weight: 900;
}
.modal-sub{
  font-size: 12px;
  color:#777;
  margin-bottom: 10px;
}

.modal-row{
  margin-top: 10px;
}

.modal-label{
  display:block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.modal-input,
.modal-textarea,
.modal-select{
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background:#fff;
  font-size: 14px;
}

.modal-textarea{
  min-height: 72px;
  resize: vertical;
}

/* labels inside Address block (you used <label> without class) */
.modal-row label{
  display:block;
  font-size: 12px;
  font-weight: 900;
  margin: 10px 0 6px;
}

/* geo row button */
.geo-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top: 10px;
}
.btn-small{
  border:0;
  border-radius:999px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
}
.btn-secondary{
  background: rgba(0,0,0,0.06);
}
.btn-primary{
  background: rgba(255, 213, 74, 0.55);
}

/* mini map container */
#mini-map{
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background:#f6f6f6;
}

/* modal buttons */
.modal-buttons{
  display:flex;
  gap:10px;
  margin-top: 14px;
}
.modal-buttons .btn-small{
  flex:1;
}

/* Image overlay preview */
.image-preview{
  max-width: 94vw;
  max-height: 92vh;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}



/* =========================
   DELIVERY (DRIVER) SCREEN
========================= */
body.delivery-screen .card{
  background:var(--card-bg);
  padding:16px 16px 20px;
}
body.delivery-screen .topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  gap:10px;
}
body.delivery-screen .topbar-left{display:flex;flex-direction:column;gap:2px;}

/* =========================
   Shared: Search + Date chips
   (Admin + Delivery)
   ========================= */

.search-box{
  width: 100%;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  margin: 10px 0 10px;
}
.search-box:focus{
  border-color: rgba(255,193,7,.85);
  box-shadow: 0 0 0 3px rgba(255,193,7,.16);
}

.date-chips{
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 6px 0 10px;
}

.date-chips .chip{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.date-chips .chip.active{
  background: var(--yellow, #FFC107);
  border-color: rgba(0,0,0,.15);
}

.custom-range{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.custom-range .small-input{
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.custom-range .btn-top{
  padding: 10px 14px;
}

/* =========================
   Shared: List actions (Export + Sort)
   (Admin + Delivery)
========================= */

.list-actions{
  display:flex;
  gap:12px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap:wrap;
  margin: 12px 0 14px;
}

.btn-action{
  padding: 10px 14px;
  border-radius: 14px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  cursor:pointer;
  font-weight:800;
  min-height: 44px;
}

/* export dropdown */
.export-wrapper{ position: relative; }

.export-menu{
  position:absolute;
  top: 48px;
  left: 0;
  width: 260px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
  padding: 10px;
  display:none;
  z-index: 50;
}

.export-menu.open{ display:block; }

.export-item{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  border-radius: 12px;
  border:0;
  background: rgba(0,0,0,0.03);
  font-weight:800;
  cursor:pointer;
  margin-bottom: 8px;
}

.export-item:hover{ background: rgba(255,193,7,0.25); }

.export-custom{
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.export-custom input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  margin-top: 8px;
}

.export-custom button{
  width:100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:0;
  background: rgba(255,193,7,0.85);
  font-weight:900;
  cursor:pointer;
}

/* Admin also uses 4 equal chips like delivery */
body.admin-screen .date-chips{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
  align-items:stretch;
}
body.admin-screen .date-chips .chip{
  width:100%;
  padding:14px 10px;
  border-radius:999px;
  text-align:center;
  white-space:normal;
}


/*Delivery*/
body.delivery-screen .tabs{
  display:flex;
  gap:10px;
  margin:12px 0 6px;
}
body.delivery-screen .tab-btn{
  flex:1;
  border:none;
  border-radius:12px;
  padding:10px;
  background:var(--surface-2);
  border:1px solid rgba(0,0,0,0.12);
  cursor:pointer;
}
body.delivery-screen .tab-btn.active{
  background:linear-gradient(135deg,var(--yellow),var(--yellow-dark));
}

body.delivery-screen .list-actions{
  display:flex;
  gap:10px;
  margin:10px 0 0;
  flex-wrap:wrap;
}
body.delivery-screen .btn-action{
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  padding:10px 12px;
  font-weight:700;
  cursor:pointer;
  font-size: 11px;
}

body.delivery-screen .orders-list{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  padding-right:4px;
}
body.delivery-screen .order-card{
  border-radius:18px;
  border:1px solid rgba(0,0,0,0.04);
  background:var(--surface);
  padding:10px 10px 12px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

body.delivery-screen .status-badge{
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  background:#FFF3CD;
  color:#7A5600;
  text-transform:uppercase;
  letter-spacing:.05em;
}
body.delivery-screen .status-badge.is-cancelled{background:#FFECEC;color:#8B0000;}
body.delivery-screen .status-badge.is-completed{background:#EAFFF1;color:#0A6B2D;}

body.delivery-screen .actions{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
body.delivery-screen .btn{
  border-radius:999px;
  border:none;
  padding:7px 10px;
  font-size:12px;
  cursor:pointer;
}
body.delivery-screen .btn-next{
  background:linear-gradient(135deg,var(--yellow),var(--yellow-dark));
  color:#2b2100;
}
body.delivery-screen .btn-next:active{
  transform:translateY(1px) scale(.99);
}

body.delivery-screen .small-input,
body.delivery-screen .small-select{
  font-size:12px;
  padding:5px 7px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,0.10);
  width:100%;
  background:#fff;
}

body.delivery-screen .pay-panel,
body.delivery-screen .info-panel{
  border-radius:12px;
  border:1px dashed rgba(0,0,0,0.12);
  background:#FFFEF5;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:12px;
}

body.delivery-screen .photo-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:8px;
}
body.delivery-screen .photo-box label{
  font-size:12px;
  font-weight:600;
  margin-bottom:6px;
  color:#444;
}
body.delivery-screen .photo-box input[type="file"]{
  width:100%;
  font-size:12px;
  padding:8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
}

body.delivery-screen .image-viewer{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:20000;
}
body.delivery-screen .image-viewer-inner{
  max-width:90vw;
  max-height:80vh;
}
body.delivery-screen .image-viewer-inner img{
  width:100%;
  max-height:80vh;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 12px 40px rgba(0,0,0,0.40);
}
body.delivery-screen .image-viewer-hint{
  position:absolute;
  bottom:18px;          /* ⬅ bottom of screen */
  left:50%;
  transform:translateX(-50%);
  margin-top:10px;
  font-size:12px;
  color:#fff;
  text-align:center;
  
}

body.delivery-screen .modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
}
body.delivery-screen .modal-card{
  width:min(520px, 92vw);
  background:#fff;
  border-radius:18px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
}
body.delivery-screen .modal-title{font-weight:700;margin-bottom:8px;}
body.delivery-screen .modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}
body.delivery-screen .btn-outline{
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.25);
  background:transparent;
  padding:8px 14px;
  cursor:pointer;
}
body.delivery-screen .btn-danger{
  border-radius:999px;
  border:none;
  background:#FF4D4D;
  color:#fff;
  padding:8px 14px;
  cursor:pointer;
}

body.delivery-screen .no-orders{
  margin-top:20px;
  font-size:13px;
  color:var(--text-muted);
  text-align:center;
}

/* =======================
   DELIVERY SCREEN Fix Bug
======================= */

body.delivery-screen {
  background: radial-gradient(circle at top, #fffde7, #fff3cd);
}

.delivery-screen .topbar {
  display:flex;
  justify-content: space-between;
  gap:12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.delivery-screen .btn-top{
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:#fffdf3;
  padding: 8px 14px;
  font-size: 12px;
  cursor:pointer;
  white-space:nowrap;
}

.delivery-screen .search-box{
  width:100%;
  padding: 12px 14px;
  border-radius: 16px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  margin: 10px 0 12px;
  font-size:14px;
}

/* chips */
.delivery-screen .date-chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}
.delivery-screen .chip{
  border:0;
  padding:10px 14px;
  border-radius:999px;
  background: rgba(0,0,0,0.05);
  font-weight:800;
  cursor:pointer;
}
.delivery-screen .chip.active{
  background: rgba(255, 213, 74, 0.8);
}

/* custom range row */
.delivery-screen .custom-range{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin: 0 0 12px;
}
.delivery-screen .small-input{
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background:#fff;
  font-size: 14px;
}

/* tabs */
.delivery-screen .tabs{
  display:flex;
  gap:10px;
  margin: 12px 0;
}
.delivery-screen .tab-btn{
  flex:1;
  border:1px solid rgba(0,0,0,0.10);
  background:#fffdf3;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 900;
  cursor:pointer;
}
.delivery-screen .tab-btn.active{
  background: rgba(255, 193, 7, 0.85);
  border-color: rgba(0,0,0,0.12);
}

/* actions row (Export + Sort) */
.delivery-screen .list-actions{
  display:flex;
  gap:12px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap:wrap;
  margin: 12px 0 14px;
}
.delivery-screen .btn-action{
  padding: 10px 14px;
  border-radius: 14px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  cursor:pointer;
  font-weight:800;
  min-height: 44px;
}

/* export dropdown */
.delivery-screen .export-wrapper{
  position: relative;
}
.delivery-screen .export-menu{
  position:absolute;
  top: 48px;
  left: 0;
  width: 260px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
  padding: 10px;
  display:none;
  z-index: 50;
}
.delivery-screen .export-menu.open{ display:block; }

.delivery-screen .export-item{
  width:100%;
  text-align:left;
  padding: 10px 12px;
  border-radius: 12px;
  border:0;
  background: rgba(0,0,0,0.03);
  font-weight:800;
  cursor:pointer;
  margin-bottom: 8px;
}
.delivery-screen .export-item:hover{
  background: rgba(255,193,7,0.25);
}

.delivery-screen .export-custom{
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.delivery-screen .export-custom input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  margin-top: 8px;
}
.delivery-screen .export-custom button{
  width:100%;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border:0;
  background: rgba(255,193,7,0.85);
  font-weight:900;
  cursor:pointer;
}

/* orders list */
/* highlight when navigated via ?focus=ID */
.delivery-screen .order-card .scan-highlight{
  box-shadow: 0 0 0 2px #ffc107, 0 8px 24px rgba(0,0,0,0.18);
  transform: translateY(-2px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.delivery-screen .orders-list{
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.delivery-screen .order-card{
  border-radius: 22px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fffdf9;
  padding: 14px;
}
.delivery-screen .order-id{
  font-size: 16px;
  font-weight: 900;
}
.delivery-screen .order-date{
  font-size: 12px;
  color:#777;
  margin-top:2px;
}
.delivery-screen .status-badge{
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 213, 74, 0.35);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}
.delivery-screen .status-badge.is-completed{ background: rgba(40,167,69,0.18); }
.delivery-screen .status-badge.is-cancelled{ background: rgba(220,53,69,0.18); }

.delivery-screen .line{
  font-size: 14px;
  margin-top: 0px;
  word-break: break-word;
}
.delivery-screen .label{ font-weight: 900; }

.delivery-screen .thumbs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 10px;
}
.delivery-screen .thumbs img{
  width: 120px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.08);
  cursor:pointer;
}

.delivery-screen .map-link{
  color:#ffb300;
  font-weight:900;
  text-decoration: underline;
}

/* More dropdown (dd) */
.delivery-screen .dd{
  position: relative;
}
.delivery-screen .dd-btn{
  border:1px solid rgba(0,0,0,0);
  background:#fffdf9;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 900;
  cursor:pointer;
}
.delivery-screen .dd-menu{
  position:absolute;
  right: 0;
  top: 42px;
  width: 160px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
  padding: 8px;
  display:none;
  z-index: 60;
}
.delivery-screen .dd.open .dd-menu{ display:block; }
.delivery-screen .dd-item{
  width:100%;
  text-align:left;
  padding: 10px 10px;
  border-radius: 12px;
  border:0;
  background: rgba(0,0,0,0.03);
  font-weight: 800;
  cursor:pointer;
  margin-bottom: 6px;
}
.delivery-screen .dd-danger{ color:#b30000; background: rgba(255,0,0,0.08); }

/* Payment panel buttons */
.delivery-screen .btn{
  border:0;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 900;
  cursor:pointer;
}
.delivery-screen .btn-next{ background: rgba(255,193,7,0.85); }
.delivery-screen .btn-danger{ background: rgba(255,0,0,0.10); color:#b30000; }

.delivery-screen .small-select{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  background:#fff;
}

/* =========================
   DELIVERY PANEL LAYOUT FIX
   ========================= */
body.delivery-screen .topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:nowrap;            /* ✅ keep Menu on same row */
  margin-bottom:14px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card-bg);       /* same as card background */
  padding-bottom: 10px;

}

body.delivery-screen .topbar-left{
  flex:1;
  min-width:0;
}

body.delivery-screen #btn-menu{
  white-space:nowrap;
  flex:0 0 auto;
}

/* Search box full width */
body.delivery-screen .search-box{
  width:100%;
  box-sizing:border-box;
  /* margin:12px 0 14px; */
}

/* ✅ Date chips: 1 row, equal width, no wrap */
body.delivery-screen .date-chips{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:12px;
  align-items:stretch;
  margin:8px 0 14px;
}

body.delivery-screen .date-chips .chip{
  width:100%;
  padding:14px 10px;
  border-radius:999px;
  font-weight:700;
  text-align:center;
  line-height:1.1;
  white-space:normal;          /* allow "Last 3 days" break like your 2nd photo */
}

/* ✅ Tabs: 2 equal buttons */
body.delivery-screen .tabs{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:12px;
  /* margin:6px 0 14px; */
}

body.delivery-screen .tab-btn{
  width:100%;
  padding:16px 12px;
  border-radius:14px;
  font-weight:800;
  text-align:center;
}

body.delivery-screen .tab{
  width:100%;
  padding:16px 12px;
  border-radius:14px;
  font-weight:800;
  text-align:center;
}

/* Custom range row spacing */
body.delivery-screen .custom-range{
  display:flex;
  gap:10px;
  align-items:center;
  margin:-6px 0 12px;
}

body.delivery-screen .custom-range .small-input{
  flex:1;
  min-width:0;
}

/* Small screens: keep same “2nd photo” feel */
@media (max-width: 420px){
  body.delivery-screen .date-chips{
    gap:10px;
  }
  body.delivery-screen .date-chips .chip{
    padding:11px 6px;
    font-size:11px;
  }
  body.delivery-screen .tab-btn{
    padding:11px 10px;
    font-size:12px;
  }
}

/* Label QR popup */
#labelqr-overlay .modal { max-width: 520px; }
.labelqr-toolbar{
  display:flex; gap:10px; align-items:center; justify-content:space-between;
  margin: 8px 0 12px;
}
.labelqr-toolbar select{
  border:1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 10px 12px;
  background:#fff;
  font-weight:800;
}

/* Screen preview */
.print-sheet{ display:flex; justify-content:center; }
.label-card{
  width: 100%;
  max-width: 360px;
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 16px;
}
.label-id{ font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.label-row{ font-size: 14px; margin: 4px 0; }
.qr-wrap{ margin-top: 1px; display:flex; justify-content:center; }
.qr-img{ width: 220px; height: 220px; object-fit:contain; }

/* Preview sizing differences */
.print-sheet[data-format="58mm"] .label-card{
  max-width: 58mm;
  border-radius: 10px;
  padding: 10px;
}
.print-sheet[data-format="58mm"] .label-id{ font-size: 18px; }
.print-sheet[data-format="58mm"] .label-row{ font-size: 12px; }
.print-sheet[data-format="58mm"] .qr-img{ width: 46mm; height: 46mm; }



.label-grid{
  display:flex;
  gap:14px;
  align-items:flex-start; /* align QR top with text */
}

.qr-wrap{ flex:0 0 auto; }
.qr-img{
  width: 170px;
  height: 170px;
  object-fit:contain;
}

.label-info{ flex:1; min-width:0;margin-top: 7px; }
.label-id{ font-size: 20px; font-weight: 900; margin-bottom: 8px; }

.print-sheet[data-format="58mm"] .qr-img{
  width: 25mm;
  height: 25mm;
  margin-top: 30px;
}
.print-sheet[data-format="58mm"] .label-grid{
  gap: 8px;
}

/* =========================
   PRINT — LABEL ONLY
========================= */

@page {
  size: auto;
  margin: 0;
}

@media print {

  /* A6 */
  #printArea[data-format="a6"] {
    width: 105mm;
    height: 148mm;
  }

  /* 58mm thermal */
  #printArea[data-format="58mm"] {
    width: 58mm;
    height: auto;
  }
}

@page { margin: 0; }
/* ---------Client Screen--------*/
/* Make the main card fill screen and allow inner scrolling */
body.client-home{
  overflow: hidden;        /* lock body scroll */
}

body.client-home .app,
body.client-home .card{
  height: 100vh;
}

body.client-home .card{
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* important */
}

/* Main scroll area (everything except bottom nav) */
body.client-home .client-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

body .portal-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

body .client-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

body .driver-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

body .screen-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

/* ---------Lock layout for specific pages--------*/
body.client-packages,
body.account-screen,
body.driver-packages,
body.history-screen,
body.driver-main{
  overflow:hidden;
}

body.client-packages .app,
body.account-screen .app,
body.driver-packages .app,
body.history-screen .app,
body.driver-main .app,
body.client-packages .card,
body.account-screen .card,
body.driver-packages .card,
body.history-screen .card,
body.driver-main .card{
  height:100vh;
}

body.client-packages .card,
body.account-screen .card,
body.driver-packages .card,
body.history-screen .card,
body.driver-main .card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* ---------Driver Screen--------*/
body.driver-home{
  overflow: hidden;          /* prevent body/page scrolling */
}

body.driver-home .app,
body.driver-home .card{
  height: 100vh;
}

body.driver-home .card{
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* keep inner area scrolling */
}

/* Main scroll area (everything except bottom nav) */
body.driver-home .driver-scroll{
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;    /* space for bottom bar */
}

/* Fixed bottom nav */
body.client-home .bottom-nav{
  position: sticky;        /* works inside .card */
  bottom: 0;
  left: 0;
  right: 0;
  margin-top: 0;
  padding: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0,0,0,0.08);
  border-radius: 22px 22px 0px 0px;
}

/* Search input full width */
body.client-home .search-box{
  width: 100%;
  box-sizing: border-box;
}

/* Quick actions: auto wrap on small screens */
body.client-home .quick-actions{
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 360px){
  body.client-home .quick-actions{
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Order card layout: allow wrapping */
body.client-home .client-card{
  gap: 10px;
}

body.client-home .info{
  min-width: 0; /* allows text to shrink */
}

body.client-home .topline{
  flex-wrap: wrap;          /* status badge goes to next line if needed */
  align-items: center;
}

body.client-home .idcode{
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons row: wrap if narrow */
body.client-home .info > div[style*="display:flex"]{
  flex-wrap: wrap;
}

/* Thumbnails smaller on tiny screens */
@media (max-width: 360px){
  body.client-home .left-thumb{
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }
}

/* ===== Pickup modal overlay ===== */
body.client-home .overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;              /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;              /* make sure it is above everything */
  padding: 16px;
}
body.client-home .overlay.show{
  display: flex;              /* show when JS adds .show */
}
body.client-home .modal{
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
body.client-home .modal-title{
  font-weight: 900;
  font-size: 16px;
}
body.client-home .modal-sub{
  margin-top: 4px;
  font-size: 13px;
  color: #666;
}
body.client-home .modal-input{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  margin-top: 6px;
}
body.client-home .modal-buttons{
  margin-top: 14px;
}

/* CLIENT PICKUP MODAL (avoid conflicts with admin/delivery modal styles) */
body.client-home .pickup-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 99999;
}
body.client-home .pickup-overlay.show{ display:flex; }

body.client-home .pickup-modal{
  width: min(420px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}


/*-------Portal----------*/
.portal-layout {
  background: #f5f6fb;
}

/* ===== SHELL ===== */
.portal-shell {
  width: 100%;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: auto;        /* 👈 allow natural page height */
  min-height: 100%;    /* 👈 only fill when shorter */
}


/* ===== SIDEBAR ===== */
.portal-sidebar {
  background: #111827;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
}

.portal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #111827;
  font-size: 18px;
}

.logo-text {
  font-weight: 600;
  font-size: 15px;
}

.portal-menu-section {
  margin-top: 10px;
}

.portal-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin: 16px 10px 6px;
}

.portal-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  color: #d1d5db;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.portal-menu-item .icon {
  width: 22px;
  text-align: center;
}

.portal-menu-item:hover {
  background: rgba(249, 115, 22, 0.15);
  color: #f9fafb;
}

.portal-menu-item.active {
  background: #fbbf24;
  color: #111827;
}

.portal-menu-footer {
  margin-top: auto;
}

.portal-plan-box {
  background: rgba(55, 65, 81, 0.9);
  border-radius: 16px;
  padding: 14px;
  font-size: 13px;
}

/* ===== MAIN COLUMN ===== */
.portal-main {
  display: flex;
  flex-direction: column;
  height: 100vh;            /* full height */
  overflow: hidden;
}

/* Topbar always behaves nicely */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding: 20px;
}

.page-title {
  font-weight: 600;
  font-size: 18px;
}

.page-breadcrumb {
  font-size: 12px;
  color: #6b7280;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search input {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 6px 12px;
  font-size: 13px;
  min-width: 220px;
}

.top-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
}

.top-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.user-meta {
  font-size: 12px;
}

.user-name {
  font-weight: 600;
}

.user-role {
  color: #6b7280;
}

/* Content */
.portal-content {
  padding: 18px 22px 30px;
  max-width: none;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;             /* required so inner flex children can shrink */
}

.portal-content > [data-portal-page]{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Grid rows */
.portal-row {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-row-kpi {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-row-main {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.portal-row-table {
  grid-template-columns: 1fr;
}

/* Cards */
.portal-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

/* KPI card */
.kpi-card .kpi-label {
  font-size: 12px;
  color: #6b7280;
}

.kpi-card .kpi-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
}

.kpi-card .kpi-sub {
  font-size: 12px;
  color: #10b981;
  margin-top: 4px;
}

/* Generic card header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
}

.card-sub {
  font-size: 12px;
  color: #6b7280;
}

.card-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px;
}

.card-tabs .tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
}

.card-tabs .tab.active {
  background: #111827;
  color: #f9fafb;
}

/* Chart placeholder */
.chart-placeholder {
  height: 220px;
  border-radius: 14px;
  background: repeating-linear-gradient(
    -45deg,
    #f9fafb,
    #f9fafb 8px,
    #e5e7eb 8px,
    #e5e7eb 9px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #6b7280;
}

/* Schedule */
.schedule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 13px;
}

.schedule-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dot {
  margin-top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.dot-green { background: #22c55e; }
.dot-yellow { background: #facc15; }
.dot-red { background: #ef4444; }

.sched-title {
  font-weight: 500;
}

.sched-sub {
  color: #6b7280;
  font-size: 12px;
}

/* Table */
.full-width {
  grid-column: 1 / -1;
}

.table-wrapper {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.portal-table thead {
  background: #f9fafb;
}

.portal-table th,
.portal-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.portal-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}
.badge-warning {
  background: #fef9c3;
  color: #92400e;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.link-btn {
  border: none;
  background: none;
  color: #2563eb;
  font-size: 13px;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */

/* Big screens (>1440px): keep center with max-width already set */

/* Medium screens (tablets / small laptops) */
@media (max-width: 1200px) {
  .portal-row-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-row-main {
    grid-template-columns: 1.6fr 1.2fr;
  }
}

/* Small tablets / large phones */
@media (max-width: 900px) {
  .portal-shell {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  /* compress sidebar */
  .logo-text,
  .portal-plan-box,
  .portal-menu-item span:not(.icon),
  .portal-menu-title {
    display: none;
  }

  .portal-sidebar {
    align-items: center;
  }

  .portal-row-main {
    grid-template-columns: 1fr;
  }
}

/* Phones */
@media (max-width: 768px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    display: none;   /* simplest: hide sidebar, you can later make it a drawer */
  }

  .top-right {
    width: 100%;
    justify-content: space-between;
  }

  .top-search input {
    min-width: 0;
    width: 100%;
  }

  .portal-content {
    padding: 14px 12px 20px;
  }

  .portal-row-kpi,
  .portal-row-main,
  .portal-row-table {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    height: auto;
    padding: 12px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .portal-topbar .top-left {
    width: 100%;
  }

  .portal-topbar .page-breadcrumb {
    display: none; /* ✅ remove clutter */
  }

  .portal-topbar .top-right {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
  }

  .portal-topbar .top-search {
    width: 100%;
  }

  .portal-topbar .top-search input {
    width: 100%;
    min-width: 0;
  }

  /* keep user compact */
  .portal-topbar .user-meta {
    display: none;
  }
}

/*Import for responsive*/

/* ===== PORTAL: break out of the "mobile card" base layout ===== */
.portal-layout .app,
.portal-layout .container,
.portal-layout .page,
.portal-layout .screen,
.portal-layout .wrapper,
.portal-layout .content-wrap {
  max-width: none !important;
  width: 100% !important;
}

.portal-layout .app,
.portal-layout .page,
.portal-layout .screen {
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* ===== PORTAL MENU (Delivery Menu style) ===== */
.portal-menu-wrap {
  width: 100%;
  padding: 24px 22px 34px;
}

.portal-menu-head {
  text-align: center;
  margin-bottom: 18px;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: #6b7280;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.portal-h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #111827;
}

.portal-sub {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 13px;
}

/* list */
.portal-menu-list {
  max-width: 980px;
  margin: 18px auto 0;
  display: grid;
  gap: 14px;
}

/* cards */
.portal-menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(17, 24, 39, 0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}

.portal-menu-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
}

.portal-menu-title {
  font-weight: 800;
  color: #111827;
  font-size: 14px;
}

.portal-menu-desc {
  margin-top: 2px;
  color: #9ca3af;
  font-size: 12px;
}

.portal-menu-right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
}

.portal-menu-ico {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* primary highlight like screenshot */
.portal-menu-card--primary {
  background: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.portal-menu-card--primary .portal-menu-title,
.portal-menu-card--primary .portal-menu-desc {
  color: #111827;
}

.portal-menu-pill {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
  .portal-menu-wrap {
    padding: 16px 12px 22px;
  }
  .portal-h1 {
    font-size: 20px;
  }
  .portal-menu-list {
    max-width: 100%;
    gap: 12px;
  }
  .portal-menu-card {
    padding: 14px 14px;
    border-radius: 16px;
  }
}

/*Loging portal*/

/* ===== Portal Login ===== */
.portal-login-wrap{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  background: #f5f4ef;
}

.portal-login-card{
  width: min(460px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 55px rgba(0,0,0,.10);
  border: 1px solid rgba(0,0,0,.04);
}

.portal-login-brand{
  display:flex;
  gap: 12px;
  align-items:center;
  margin-bottom: 16px;
}

.brand-badge{
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #111827;
  color: #ffc107;
  font-weight: 900;
  letter-spacing: .5px;
}

.brand-title{
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.brand-sub{
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.portal-login-form{ margin-top: 8px; }

.pfield{ margin: 12px 0; }
.plabel{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.pinput{
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
  font-size: 14px;
  background: #fff;
  transition: .18s;
}
.pinput:focus{
  border-color: rgba(255,193,7,.9);
  box-shadow: 0 0 0 4px rgba(255,193,7,.18);
}

.pbtn{
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  background: #ffc107;
  font-weight: 900;
  cursor:pointer;
  transition: .15s;
  margin-top: 6px;
}
.pbtn:hover{ transform: translateY(-1px); }
.pbtn:active{ transform: translateY(0); }

.phelp{
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* Toast */
.portal-toast{
  position: fixed;
  left: 50%;
  top: 16px;
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  transition: .25s;
  z-index: 9999;
}
.portal-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== TOPBAR (desktop) ===== */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e5e7eb;
}

/* left side: title + breadcrumb */
.portal-topbar .top-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
}

.page-title {
  font-weight: 700;
  font-size: 22px;
}

.page-breadcrumb {
  font-size: 12px;
  color: #6b7280;
}

/* right side: search + icons + user */
.portal-topbar .top-right {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* make search bar long, like screenshot 2 */
.top-search {
  flex: 1 1 auto;
  max-width: 460px;
}

.top-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 8px 14px;
  font-size: 13px;
}

/* icons & user stay as you had */
.top-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: #f3f4f6;
  cursor: pointer;
}

.top-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

/* 🔧 Remove forced full-screen height for portal pages only */
body.portal-layout {
  min-height: 0;
}

/* Common outer wrappers from base.html */
body.portal-layout .app,
body.portal-layout .screen,
body.portal-layout .page,
body.portal-layout .wrapper,
body.portal-layout .content-wrap,
body.portal-layout .container {
  min-height: 0 !important;
  height: auto !important;
}

/* =========================
   HARD RESET FOR PORTAL LAYOUT
   ========================= */
body.portal-layout {
  /* kill the “centered card” body style */
  display: block;
  justify-content: normal;
  align-items: normal;
  padding: 0;
  background: #f5f6fb;
}

/* remove the old app/card sizing for portal pages */
body.portal-layout .app {
  max-width: none;
  padding: 0;
}

body.portal-layout .card {
  min-height: 0;          /* ✅ no forced full-screen card */
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

body.portal-layout .portal-shell {
  min-height: 100vh;
}

body.portal-layout .portal-main {
  min-height: 100vh;
}

/* === FINAL OVERRIDE: PORTAL LAYOUT === */

/* body for portal pages: no flex, full height */
html,
body.portal-layout {
  height: 100%;
}

body.portal-layout {
  background: #f5f6fb;
  display: block;          /* override global body flex */
  padding: 0;
  justify-content: initial;
  align-items: initial;
}

/* app wrapper on portal pages */
body.portal-layout .app {
  max-width: none;
  padding: 0;
}

/* grid shell fills viewport */
body.portal-layout .portal-shell {
  height: 100vh;           /* full screen */
}

/* main column fixed; only content scrolls */
body.portal-layout .portal-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;        /* prevent page/body scroll */
}

body.portal-layout .portal-topbar {
  flex: 0 0 auto;          /* sticky header area */
}

body.portal-layout .portal-content {
  flex: 1 1 auto;
  overflow-y: auto;        /* ⬅️ only this scrolls */
  -webkit-overflow-scrolling: touch;
}

body.portal-layout .dd{ position:relative; }
body.portal-layout .dd-btn{
  border:1px solid rgba(0,0,0,0);
  background:#fffdf9;
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  cursor:pointer;
}
body.portal-layout .dd-menu{
  position:absolute;
  right:0;
  top:42px;
  width:160px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.10);
  border-radius:14px;
  box-shadow:0 16px 30px rgba(0,0,0,0.12);
  padding:8px;
  display:none;
  z-index:60;
}
body.portal-layout .dd.open .dd-menu{ display:block; }
body.portal-layout .dd-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:0;
  background:rgba(0,0,0,0.03);
  font-weight:800;
  cursor:pointer;
  margin-bottom:6px;
}
body.portal-layout .dd-danger{ color:#b30000; background:rgba(255,0,0,0.08); }


/*Printing Area*/

/* ----- LABEL PRINTING ONLY ----- */
@media print {
  /* hide rest of the UI */
  body[data-printing="label"] * {
    visibility: hidden !important;
  }


  /* make modal full page so we print only the sheet */
  body[data-printing="label"] #labelqr-overlay .modal {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* hide toolbar buttons when printing */
  body[data-printing="label"] #labelqr-overlay .labelqr-toolbar {
    display: none !important;
  }

  /* ensure print area is visible and fills the page */
  body[data-printing="label"] #printArea {
    visibility: visible !important;
    display: block !important;
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
  }

  /* avoid page breaks inside label */
  body[data-printing="label"] #printArea,
  body[data-printing="label"] #printArea * {
    visibility: visible !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}

/*Printing Area*/

/*Edit Overlay*/
/* === Edit sidebar overlay === */
.overlay-edit {
  /* same dim background, but right-aligned content */
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
  justify-content: flex-end;
  align-items: stretch;
}

.overlay-edit.show {
  display: flex;
}

/* Sliding panel */
.overlay-edit .edit-panel {
  position: relative;
  height: 100%;
  width: 1080px;
  max-width: 100%;
  background: #ffffff;
  box-shadow: -20px 0 40px rgba(15, 23, 42, 0.35);
  border-radius: 16px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
}

.overlay-edit.show .edit-panel {
  transform: translateX(0);
}

/* Header / footer / body */
.edit-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f1f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-panel-title {
  font-size: 16px;
  font-weight: 600;
}

.edit-panel-sub {
  font-size: 12px;
  color: #6b7280;
}

.edit-close-btn {
  border: none;
  background: #f3f4f6;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.edit-panel-body {
  padding: 16px 20px 12px;
  overflow-y: auto;
  flex: 1;
}

.edit-panel-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #f1f1f5;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Form layout helpers */
.modal-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin: 18px 0 6px;
}

.modal-row {
  margin-bottom: 10px;
}

.modal-row.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-row.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

/* Small buttons re-used */
.btn-small.btn-secondary,
.btn-small.btn-primary {
  min-width: 80px;
}

/* On small screens, panel can be full-width */
@media (max-width: 640px) {
  .overlay-edit .edit-panel {
    width: 100%;
    border-radius: 0;
  }
}

.edit-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.edit-tab {
  padding: 8px 0;
  font-size: 16px;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  color: #6b7280;
}

.edit-tab.active {
  color: #111827;
}

.edit-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: #fbbf24; /* yellow accent */
}

.edit-tab-panels {
  margin-top: 12px;
}

.edit-tab-panel {
  display: none;
}

.edit-tab-panel.active {
  display: block;
}

/* Payment panel */
.pay-panel {
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

/* Grid for the 2 upload boxes */
.photo-grid {
  display: flex;
  gap: 10px;
  margin: 8px 0 12px;
}

.photo-box {
  position: relative;
  flex: 1;
}

/* Pretty upload card */
.photo-upload {
  border-radius: 14px;
  padding: 10px 10px 9px;
  background: #fff9e8;
  border: 1px dashed #f3c25d;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.05s ease;
}

.photo-upload:active {
  transform: scale(0.98);
}

.photo-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffd86a;
  font-size: 16px;
}

.photo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.photo-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.photo-sub {
  font-size: 11px;
  color: #888;
}

/* Hide native file input but keep it clickable */
.photo-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Small screens */
@media (max-width: 420px) {
  .photo-grid {
    gap: 8px;
  }
  .photo-upload {
    padding: 9px 8px;
  }
  .photo-icon {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
}
.photo-thumb {
  display: none;              /* hidden until we have a file */
  width: 100%;
  margin-top: 6px;
  border-radius: 12px;
  object-fit: cover;
  max-height: 160px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  background: #f5f5f5;
}

/* Driver photo upload – hide real input, use JS to trigger it */
body.delivery-screen .photo-box {
  position: relative;
}

/* Stop covering the whole box; just hide the native control */
body.delivery-screen .photo-box input[type="file"] {
  display: none;          /* <— key change */
}

/* Thumbnail default state */
body.delivery-screen .photo-thumb {
  width: 100%;
  border-radius: 14px;
  margin-top: 8px;
  display: none;          /* hidden until we set src in JS */
  object-fit: cover;
}
/* Ensure overlay actually shows on driver home */
body.delivery-screen.driver-home .image-viewer.show {
  display: flex !important;   /* override app.css display:none */
}

/* (optional but safe) keep it above everything */
body.delivery-screen.driver-home .image-viewer {
  z-index: 20000;
}



@keyframes spin{to{transform:rotate(360deg);}}
