 :root {
 --blue: #1a56e8;
 --blue-light: #f0f4ff;
 --blue-dark: #1448cc;
 --green: #16a34a;
 --green-light: #f0fdf4;
 --red: #ef4444;
 --red-light: #fef2f2;
 --orange: #f59e0b;
 --orange-light:#fffbeb;
 --purple: #7c3aed;
 --purple-light:#f5f3ff;
 --gray-50: #f9fafb;
 --gray-100: #f8f9fa;
 --gray-200: #e9ecef;
 --gray-300: #dee2e6;
 --gray-400: #9ca3af;
 --gray-600: #4b5563;
 --gray-700: #374151;
 --gray-900: #111827;
 --white: #ffffff;
 --radius: 12px;
 --radius-sm: 8px;
 --shadow: 0 2px 16px rgba(0,0,0,0.10);
 --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
 --font: 'Nunito', sans-serif;
 --min-tap: 48px;
 }

 *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 html { font-size: 16px; -webkit-text-size-adjust: 100%; }
 body {
 font-family: var(--font);
 font-size: 15px;
 color: var(--gray-900);
 background: var(--gray-100);
 min-height: 100vh;
 }
 input, select, textarea, button { font-family: var(--font); }

 /* ── App Shell ── */
 .app {
 max-width: 480px;
 margin: 0 auto;
 background: var(--white);
 min-height: 100vh;
 box-shadow: var(--shadow-lg);
 position: relative;
 }
 /* Admin uses a wider "landscape" layout than the mobile customer screens.
    Tables that don't fit get their own horizontal scrollbar (see the
    overflow-x:auto wrapper divs around each .data-table in the HTML)
    rather than the whole admin shell scrolling sideways. */
 .app.admin-mode { max-width: 1400px; }

 /* ── Screen controller ── */
 .screen { display: none; }
 .screen.active { display: block; }

 /* ══════════════════════════════
 SHARED HEADER
 ══════════════════════════════ */
 .app-header {
 background: var(--blue);
 color: var(--white);
 padding: 16px 20px 14px;
 position: sticky;
 top: 0;
 z-index: 100;
 }
 .header-top {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 6px;
 }
 .app-header h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
 .header-badge {
 background: rgba(255,255,255,0.2);
 color: var(--white);
 font-size: 11px; font-weight: 700;
 padding: 3px 10px; border-radius: 50px;
 letter-spacing: 0.04em;
 }
 .header-sub { font-size: 12px; opacity: 0.75; }

 /* ══════════════════════════════
 STEP INDICATOR
 ══════════════════════════════ */
 .steps { display: flex; align-items: center; margin-top: 12px; }
 .step-wrap { display: flex; align-items: center; flex: 1; }
 .step-wrap:last-child { flex: 0; }
 .step-dot {
 width: 28px; height: 28px; border-radius: 50%;
 background: rgba(255,255,255,0.22);
 border: 2px solid rgba(255,255,255,0.38);
 display: flex; align-items: center; justify-content: center;
 font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.65);
 flex-shrink: 0; transition: all 0.25s;
 }
 .step-dot.active { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
 .step-dot.done { background: var(--green); border-color: var(--green); color: var(--white); }
 .step-line {
 flex: 1; height: 2px; background: rgba(255,255,255,0.22);
 margin: 0 4px; transition: background 0.25s;
 }
 .step-line.done { background: var(--green); }

 /* ══════════════════════════════
 PANELS / SECTIONS
 ══════════════════════════════ */
 .panel { display: none; padding: 24px 20px; animation: fadeUp 0.25s ease both; }
 .panel.active { display: block; }
 @keyframes fadeUp {
 from { opacity: 0; transform: translateY(10px); }
 to { opacity: 1; transform: translateY(0); }
 }

 /* ══════════════════════════════
 TYPOGRAPHY
 ══════════════════════════════ */
 .page-heading { font-size: 22px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
 .page-sub { font-size: 13px; color: var(--gray-600); margin-bottom: 22px; }
 .section-label {
 font-size: 11px; font-weight: 700; text-transform: uppercase;
 letter-spacing: 0.06em; color: var(--gray-600); margin-bottom: 10px;
 }
 .divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

 /* ══════════════════════════════
 FORM FIELDS
 ══════════════════════════════ */
 .field { margin-bottom: 16px; }
 .field label {
 display: block; font-size: 13px; font-weight: 700; color: var(--gray-600);
 margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
 }
 .field label .opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--gray-400); margin-left: 4px; }
 .field input, .field select, .field textarea {
 width: 100%; height: var(--min-tap); padding: 0 14px; font-size: 17px;
 border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
 background: var(--white); color: var(--gray-900); outline: none;
 transition: border-color 0.2s, box-shadow 0.2s; appearance: none;
 }
 .field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 80px; font-size: 15px; }
 .field input:focus, .field select:focus, .field textarea:focus {
 border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,232,0.12);
 }
 .field input.error, .field select.error { border-color: var(--red); }
 .field-error { display: none; font-size: 12px; color: var(--red); margin-top: 4px; font-weight: 700; }
 .field-error.visible { display: block; }
 .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

 /* ══════════════════════════════
 BUTTONS
 ══════════════════════════════ */
 .btn {
 display: flex; align-items: center; justify-content: center; gap: 8px;
 width: 100%; min-height: var(--min-tap); padding: 0 20px; border: none;
 border-radius: var(--radius); font-family: var(--font); font-size: 16px; font-weight: 700;
 cursor: pointer; transition: background 0.2s, opacity 0.2s, transform 0.1s;
 }
 .btn:active { transform: scale(0.98); }
 .btn-primary { background: var(--blue); color: var(--white); }
 .btn-primary:hover { background: var(--blue-dark); }
 .btn-primary:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; transform: none; }
 .btn-success { background: var(--green); color: var(--white); }
 .btn-success:disabled { background: var(--gray-300); color: var(--gray-400); cursor: not-allowed; transform: none; }
 .btn-outline { background: transparent; border: 2px solid var(--blue); color: var(--blue); }
 .btn-orange { background: var(--orange); color: var(--white); }
 .btn-danger { background: var(--red); color: var(--white); }
 .btn-purple { background: var(--purple); color: var(--white); }
 .btn-gray { background: var(--gray-200); color: var(--gray-700); }
 .btn-sm { width: auto; min-height: 36px; font-size: 13px; padding: 0 14px; border-radius: var(--radius-sm); border: none; }
 .btn-xs { width: auto; min-height: 30px; font-size: 12px; padding: 0 10px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-family: var(--font); font-weight: 700; }
 .spinner { display: none; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
 @keyframes spin { to { transform: rotate(360deg); } }
 .btn.loading .spinner { display: block; }
 .btn.loading .btn-text { opacity: 0.6; }

 /* ══════════════════════════════
 CARDS / SURFACES
 ══════════════════════════════ */
 .card {
 background: var(--white); border: 2px solid var(--gray-200);
 border-radius: var(--radius); padding: 16px;
 margin-bottom: 14px;
 }
 .card-blue { border-color: var(--blue); background: var(--blue-light); }
 .card-green { border-color: var(--green); background: var(--green-light); }

 /* ── Alert ── */
 .alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
 .alert-info { background: var(--blue-light); color: #1448cc; border: 1.5px solid #c3d3f9; }
 .alert-success { background: var(--green-light); color: #15803d; border: 1.5px solid #bbf7d0; }
 .alert-warn { background: var(--orange-light); color: #b45309; border: 1.5px solid #fde68a; }
 .alert-danger { background: var(--red-light); color: #dc2626; border: 1.5px solid #fecaca; }

 /* ══════════════════════════════
 BADGES
 ══════════════════════════════ */
 .badge {
 display: inline-block; padding: 3px 10px; border-radius: 50px;
 font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
 }
 .badge-pending { background: var(--orange-light); color: #92400e; }
 .badge-verified { background: var(--green-light); color: #15803d; }
 .badge-rejected { background: var(--red-light); color: #b91c1c; }
 .badge-processing{ background: var(--blue-light); color: #1d4ed8; }
 .badge-transit { background: #eff6ff; color: #1d4ed8; }
 .badge-delivered { background: var(--green-light); color: #15803d; }
 .badge-payment { background: #ecfdf5; color: #065f46; }
 .badge-cancelled { background: #f3f4f6; color: #4b5563; }
 .badge-admin { background: var(--purple-light); color: #5b21b6; }

 /* ══════════════════════════════
 STAT CARDS
 ══════════════════════════════ */
 .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
 .stat-card {
 background: var(--gray-100); border-radius: var(--radius-sm); padding: 14px;
 }
 .stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); margin-bottom: 4px; }
 .stat-val { font-size: 24px; font-weight: 700; color: var(--gray-900); }
 .stat-val.blue { color: var(--blue); }
 .stat-val.green { color: var(--green); }
 .stat-val.orange { color: var(--orange); }
 .stat-val.red { color: var(--red); }

 /* ══════════════════════════════
 BOTTOM NAV
 ══════════════════════════════ */
 .bottom-nav {
 position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
 width: 100%; max-width: 480px;
 background: var(--white); border-top: 2px solid var(--gray-200);
 display: flex; z-index: 200; padding: 6px 0 10px;
 box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
 }
 .nav-item {
 flex: 1; display: flex; flex-direction: column; align-items: center;
 gap: 3px; padding: 4px 0; cursor: pointer; border: none; background: none;
 font-family: var(--font); color: var(--gray-400); transition: color 0.15s;
 }
 .nav-item.active { color: var(--blue); }
 .nav-item .nav-icon { font-size: 20px; }
 .nav-item .nav-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

 /* ══════════════════════════════
 REGISTRATION STEPS
 ══════════════════════════════ */
 .reg-step { display: none; }
 .reg-step.active { display: block; }
 .reg-progress {
 display: flex; gap: 6px; margin-bottom: 24px;
 }
 .reg-prog-dot {
 flex: 1; height: 4px; border-radius: 2px; background: var(--gray-200); transition: background 0.3s;
 }
 .reg-prog-dot.done { background: var(--green); }
 .reg-prog-dot.active { background: var(--blue); }

 /* Pending verification */
 .pending-body { text-align: center; padding: 32px 20px 40px; }
 .big-icon { font-size: 64px; margin-bottom: 16px; }
 .ref-pill {
 display: inline-block; background: var(--blue-light); color: var(--blue);
 font-size: 16px; font-weight: 700; padding: 8px 20px;
 border-radius: 50px; margin: 12px 0; letter-spacing: 0.05em;
 }
 .timeline { text-align: left; margin: 20px 0; }
 .timeline-item { display: flex; gap: 14px; margin-bottom: 14px; }
 .tl-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px; }
 .tl-dot.done { background: var(--green); color: #fff; }
 .tl-dot.active { background: var(--blue); color: #fff; }
 .tl-dot.wait { background: var(--gray-200); color: var(--gray-600); }
 .tl-text .tl-title { font-size: 14px; font-weight: 700; color: var(--gray-900); }
 .tl-text .tl-desc { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

 /* ══════════════════════════════
 DASHBOARD
 ══════════════════════════════ */
 .dash-header {
 background: var(--blue);
 color: var(--white);
 padding: 20px 20px 16px;
 }
 .dash-greeting { font-size: 13px; opacity: 0.8; margin-bottom: 2px; }
 .dash-name { font-size: 20px; font-weight: 700; }
 .dash-shop { font-size: 13px; opacity: 0.75; margin-top: 2px; }

 /* Order history */
 .order-list { display: flex; flex-direction: column; gap: 10px; }
 .order-item {
 background: var(--white); border: 2px solid var(--gray-200);
 border-radius: var(--radius); padding: 14px;
 display: flex; justify-content: space-between; align-items: center;
 }
 .order-item .o-ref { font-size: 13px; font-weight: 700; color: var(--gray-900); }
 .order-item .o-date { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
 .order-item .o-total { font-size: 15px; font-weight: 700; color: var(--blue); text-align: right; }
 .order-item .o-items { font-size: 11px; color: var(--gray-400); text-align: right; margin-top: 2px; }

 /* ══════════════════════════════
 PRODUCT LIST / ORDER FORM
 ══════════════════════════════ */
 .product-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 100px; }
 .product-card {
 background: var(--white); border: 2px solid var(--gray-200);
 border-radius: var(--radius); padding: 14px;
 transition: border-color 0.2s, background 0.2s; position: relative;
 }
 .product-card.has-qty { border-color: var(--blue); background: var(--blue-light); }
 .product-card.custom-item { border-color: var(--orange); }
 .product-card.custom-item.has-qty { border-color: var(--orange); background: var(--orange-light); }
 .custom-badge {
 position: absolute; top: 8px; right: 8px;
 background: var(--orange); color: var(--white);
 font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 50px;
 }
 .product-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
 .product-name { font-size: 15px; font-weight: 700; color: var(--gray-900); line-height: 1.3; flex: 1; padding-right: 10px; }
 .product-price { font-size: 13px; font-weight: 700; color: var(--blue); white-space: nowrap; }
 .custom-item .product-price { color: var(--orange); }
 .product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

 /* Rich ordering card additions — added 2026-07-01, Progress Report Section
 11 Step 13 (brings the ordering flow up to the same richness the public
 catalog viewer and Admin Catalogs tab already have: image, SKU, wholesale
 price, low-stock indicator, and variant grouping). Sizing adjusted in
 Step 14 per feedback: bigger image (stretches to fill the height of the
 details block beside it via align-items:stretch + align-self:stretch),
 no more "Wholesale:" label text (see app.js — value only now), and
 smaller stepper controls to make room. */
 .product-media-row { display: flex; align-items: stretch; gap: 12px; margin-bottom: 10px; }
 .product-thumb { width: 84px; height: auto; align-self: stretch; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--gray-100); }
 .product-thumb-placeholder {
 width: 84px; align-self: stretch; border-radius: 10px; background: var(--gray-100);
 color: var(--gray-400); font-size: 10px; text-align: center; flex-shrink: 0;
 display: flex; align-items: center; justify-content: center;
 }
 .product-meta { flex: 1; min-width: 0; }
 .product-sku { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
 .product-wholesale { font-size: 11px; color: var(--gray-600); margin-top: 2px; }
 .stock-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 50px; margin-top: 4px; }
 .stock-badge.low { background: var(--orange-light); color: #92400e; }
 .stock-badge.available { background: var(--green-light); color: var(--green); }
 .product-variant-name { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
 .product-variant-select {
 width: 100%; padding: 8px 10px; margin-bottom: 10px;
 border: 1.5px solid var(--gray-200); border-radius: 8px;
 font-size: 13px; font-family: var(--font); color: var(--gray-900);
 }

 .stepper { display: flex; align-items: center; gap: 6px; }
 .stepper-btn {
 width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--gray-200);
 background: var(--white); font-size: 15px; font-weight: 700; color: var(--gray-600);
 cursor: pointer; display: flex; align-items: center; justify-content: center;
 transition: all 0.15s; line-height: 1; flex-shrink: 0;
 }
 .stepper-btn:active { background: var(--gray-200); }
 .stepper-btn.plus { background: var(--blue); border-color: var(--blue); color: var(--white); }
 .stepper-btn.plus:active { background: var(--blue-dark); }
 .stepper-input {
 width: 40px; height: 30px; text-align: center; font-size: 14px; font-weight: 700;
 border: 2px solid var(--gray-200); border-radius: 8px; background: var(--white);
 color: var(--gray-900); outline: none; -moz-appearance: textfield; appearance: textfield;
 }
 .stepper-input::-webkit-outer-spin-button,
 .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; }
 .stepper-input:focus { border-color: var(--blue); }
 .product-subtotal { font-size: 14px; font-weight: 700; color: var(--green); min-width: 70px; text-align: right; }
 .product-subtotal.zero { color: var(--gray-400); }
 .remove-item-btn {
 display: flex; align-items: center; justify-content: center;
 margin-top: 8px; background: var(--red-light); border: 1.5px solid var(--red);
 color: var(--red); border-radius: var(--radius-sm); height: 34px; font-size: 12px;
 font-weight: 700; cursor: pointer; width: 100%;
 }
 /* ── M-Pesa warning shake animation ── */
 @keyframes warnShake {
   0%,100% { transform: translateX(0); }
   20%      { transform: translateX(-6px); }
   40%      { transform: translateX(6px); }
   60%      { transform: translateX(-4px); }
   80%      { transform: translateX(4px); }
 }

 .add-item-box {
 border: 2px dashed var(--orange); border-radius: var(--radius);
 background: var(--orange-light); padding: 16px; margin-bottom: 12px;
 }
 .add-item-box .box-title { font-size: 13px; font-weight: 700; color: var(--orange); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
 .add-item-row { display: flex; gap: 8px; align-items: flex-end; }
 .add-item-row .field { flex: 2; margin-bottom: 0; }
 .add-item-row .field:last-of-type { flex: 1; }
 .add-item-row .field input { height: 44px; font-size: 15px; }

 /* ══════════════════════════════
 DISTRIBUTOR LISTING
 ══════════════════════════════ */
 .dist-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 12px;
 margin-bottom: 24px;
 }
 .dist-card {
 background: var(--white);
 border: 2.5px solid var(--gray-200);
 border-radius: 14px;
 padding: 16px 12px 14px;
 cursor: pointer;
 transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s, background 0.18s;
 display: flex;
 flex-direction: column;
 gap: 8px;
 position: relative;
 overflow: hidden;
 }
 .dist-card:active { transform: scale(0.97); }
 .dist-card:hover {
 border-color: var(--blue);
 box-shadow: 0 4px 18px rgba(26,86,232,0.13);
 }
 .dist-card.selected {
 border-color: var(--blue);
 background: var(--blue-light);
 box-shadow: 0 4px 18px rgba(26,86,232,0.18);
 }
 .dist-card-icon {
 width: 44px; height: 44px;
 border-radius: 12px;
 background: var(--blue-light);
 display: flex; align-items: center; justify-content: center;
 font-size: 22px;
 margin-bottom: 2px;
 transition: background 0.18s;
 }
 .dist-card.selected .dist-card-icon { background: rgba(26,86,232,0.15); }
 .dist-card-name {
 font-size: 13px; font-weight: 700; color: var(--gray-900);
 line-height: 1.25;
 }
 .dist-card-meta {
 font-size: 11px; color: var(--gray-600);
 display: flex; align-items: center; gap: 4px;
 }
 .dist-card-items {
 font-size: 11px; font-weight: 700;
 color: var(--blue);
 background: rgba(26,86,232,0.09);
 border-radius: 50px;
 padding: 2px 8px;
 display: inline-block;
 margin-top: 2px;
 width: fit-content;
 }
 .dist-card-check {
 position: absolute; top: 10px; right: 10px;
 width: 20px; height: 20px; border-radius: 50%;
 background: var(--blue); color: var(--white);
 font-size: 11px; font-weight: 700;
 display: none; align-items: center; justify-content: center;
 }
 .dist-card.selected .dist-card-check { display: flex; }

 /* Catalog header (after distributor selected) */
 .dist-catalog-header {
 background: var(--blue);
 border-radius: 14px;
 padding: 14px 16px;
 margin-bottom: 16px;
 display: flex;
 align-items: center;
 gap: 12px;
 }
 .dist-back-btn {
 background: rgba(255,255,255,0.18);
 border: none;
 border-radius: 8px;
 color: var(--white);
 font-size: 12px; font-weight: 700;
 padding: 7px 12px;
 cursor: pointer;
 white-space: nowrap;
 font-family: var(--font);
 flex-shrink: 0;
 transition: background 0.15s;
 }
 .dist-back-btn:hover { background: rgba(255,255,255,0.28); }
 .dist-catalog-title {
 font-size: 15px; font-weight: 700; color: var(--white);
 flex: 1;
 }
 .dist-catalog-badge {
 background: rgba(255,255,255,0.22);
 color: var(--white);
 font-size: 10px; font-weight: 700;
 padding: 3px 9px; border-radius: 50px;
 letter-spacing: 0.04em;
 white-space: nowrap;
 flex-shrink: 0;
 }

 /* Sticky bar */
 .sticky-bar {
 position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
 width: 100%; max-width: 480px; background: var(--white);
 border-top: 2px solid var(--gray-200); padding: 12px 20px;
 box-shadow: 0 -4px 20px rgba(0,0,0,0.10); z-index: 90; display: none;
 }
 .sticky-bar.visible { display: block; }
 .sticky-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
 .sticky-count { font-size: 13px; color: var(--gray-600); font-weight: 700; }
 .sticky-total { font-size: 18px; font-weight: 700; color: var(--blue); }

 /* ══════════════════════════════
 REVIEW & PAYMENT
 ══════════════════════════════ */
 .review-card { background: var(--blue-light); border: 2px solid var(--blue); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
 .review-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); margin-bottom: 12px; }
 .review-row { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; border-bottom: 1px solid rgba(26,86,232,0.1); }
 .review-row:last-child { border-bottom: none; }
 .review-row .lbl { color: var(--gray-600); font-weight: 700; }
 .review-row .val { color: var(--gray-900); text-align: right; max-width: 60%; word-break: break-word; }
 .order-items-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
 .order-items-table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); padding: 6px 0; border-bottom: 2px solid var(--gray-200); }
 .order-items-table th:last-child, .order-items-table td:last-child { text-align: right; }
 .order-items-table td { padding: 10px 0; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
 .order-items-table td:first-child { font-weight: 700; padding-right: 10px; }
 .item-meta { font-size: 12px; color: var(--gray-400); }
 .item-custom-tag { font-size: 10px; background: var(--orange); color: #fff; padding: 1px 6px; border-radius: 10px; margin-left: 4px; vertical-align: middle; }
 .grand-total-row { display: flex; justify-content: space-between; align-items: center; background: var(--gray-900); color: var(--white); padding: 14px 16px; border-radius: var(--radius-sm); margin: 16px 0; }
 .grand-total-row .gt-label { font-size: 14px; font-weight: 700; }
 .grand-total-row .gt-amount { font-size: 22px; font-weight: 700; }
 .paybill-box { background: var(--green-light); border: 2px solid var(--green); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
 .paybill-box .pb-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); margin-bottom: 14px; }
 .paybill-steps { display: flex; flex-direction: column; gap: 10px; }
 .pb-step { display: flex; align-items: flex-start; gap: 12px; }
 .pb-num { width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
 .pb-text { font-size: 14px; color: var(--gray-900); line-height: 1.5; }
 .pb-text strong { font-weight: 700; color: var(--green); font-size: 16px; }
 .pb-text .pb-note { font-size: 12px; color: var(--gray-600); }
 .paybill-total-reminder { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(22,163,74,0.2); display: flex; justify-content: space-between; align-items: center; }
 .ptr-label { font-size: 13px; color: var(--gray-600); font-weight: 700; }
 .ptr-amount { font-size: 20px; font-weight: 700; color: var(--green); }
 .ref-field { margin-bottom: 16px; }
 .ref-field label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
 .ref-input { width: 100%; height: var(--min-tap); padding: 0 14px; font-size: 17px; border: 2px solid var(--gray-200); border-radius: var(--radius-sm); background: var(--white); outline: none; transition: border-color 0.2s; }
 .ref-input:focus { border-color: var(--blue); }
 .ref-input.error { border-color: var(--red); }
 .ref-required-note { font-size: 12px; color: var(--red); margin-top: 4px; font-weight: 700; display: none; }
 .ref-required-note.visible { display: block; }
 .confirm-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--gray-100); border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 20px; }
 .confirm-check input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--blue); flex-shrink: 0; margin-top: 2px; }
 .confirm-check span { font-size: 14px; font-weight: 700; color: var(--gray-900); line-height: 1.45; }
 .error-banner { display: none; background: var(--red-light); border: 2px solid var(--red); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; font-size: 14px; font-weight: 700; color: var(--red); line-height: 1.5; }
 .error-banner.visible { display: block; }
 .offline-order-dump { display: none; background: var(--gray-100); border: 2px dashed var(--gray-400); border-radius: var(--radius); padding: 16px; font-size: 13px; color: var(--gray-900); white-space: pre-wrap; word-break: break-word; margin-top: 12px; line-height: 1.7; }
 .offline-order-dump.visible { display: block; }

 /* ══════════════════════════════
 SUCCESS
 ══════════════════════════════ */
 .success-body { text-align: center; padding: 32px 20px 40px; }
 .success-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--green-light); border: 3px solid var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; animation: popIn 0.4s cubic-bezier(0.34,1.6,0.64,1) both; }
 .success-icon svg { color: var(--green); }
 @keyframes popIn { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
 .success-title { font-size: 24px; font-weight: 700; color: var(--gray-900); margin-bottom: 8px; }
 .success-ref { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 15px; font-weight: 700; padding: 8px 18px; border-radius: 50px; margin-bottom: 20px; letter-spacing: 0.05em; }
 .success-details { background: var(--gray-100); border-radius: var(--radius); padding: 16px; text-align: left; margin-bottom: 24px; }
 .success-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--gray-200); }
 .success-row:last-child { border-bottom: none; font-weight: 700; font-size: 16px; }
 .success-row .lbl { color: var(--gray-600); }
 .success-row .val { font-weight: 700; color: var(--gray-900); text-align: right; max-width: 65%; }

 /* ══════════════════════════════
 TRACKING
 ══════════════════════════════ */
 .track-steps { padding: 8px 0; }
 .track-row { display: flex; gap: 14px; margin-bottom: 0; }
 .track-col { display: flex; flex-direction: column; align-items: center; }
 .track-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
 .track-dot.active { animation: pulse-dot 1.8s ease-in-out infinite; }
 @keyframes pulse-dot {
 0%,100% { box-shadow: 0 0 0 0 rgba(14,124,123,0.4); }
 50% { box-shadow: 0 0 0 6px rgba(14,124,123,0); }
 }
 .track-line { width: 2px; flex: 1; min-height: 32px; margin: 4px auto; }
 .track-line.done { background: var(--green); }
 .track-line.wait { background: var(--gray-200); }
 .track-body .t-title { font-size: 14px; font-weight: 700; color: var(--gray-900); }
 .track-body .t-time { font-size: 12px; color: var(--gray-400); margin-top: 2px; margin-bottom: 14px; }
 .track-cancelled { opacity: 0.45; text-decoration: line-through; }

 /* ══════════════════════════════
 ADMIN PANEL
 ══════════════════════════════ */
 .admin-header {
 background: var(--purple); color: var(--white);
 padding: 16px 24px;
 display: flex; align-items: center; justify-content: space-between;
 }
 .admin-header h1 { font-size: 18px; font-weight: 700; }
 .admin-tabs { display: flex; border-bottom: 2px solid var(--gray-200); background: var(--white); }
 .admin-tab {
 padding: 12px 20px; font-size: 13px; font-weight: 700; cursor: pointer;
 border: none; background: none; font-family: var(--font); color: var(--gray-600);
 border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.15s;
 }
 .admin-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
 .admin-content { padding: 20px 24px; }
 .admin-tab-panel { display: none; }
 .admin-tab-panel.active { display: block; }
 .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
 .data-table th { text-align: left; padding: 10px 12px; background: var(--gray-100); font-weight: 700; color: var(--gray-700); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid var(--gray-200); }
 .data-table td { padding: 12px 12px; border-bottom: 1px solid var(--gray-200); color: var(--gray-900); vertical-align: middle; }
 .data-table tr:hover td { background: var(--gray-50); }
 .status-select { padding: 4px 8px; border-radius: 6px; border: 1.5px solid var(--gray-200); font-size: 12px; font-weight: 700; font-family: var(--font); background: var(--white); cursor: pointer; }
 .admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
 .admin-stat { background: var(--gray-100); border-radius: var(--radius-sm); padding: 14px; }
 .admin-stat .a-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-600); font-weight: 700; margin-bottom: 4px; }
 .admin-stat .a-val { font-size: 22px; font-weight: 700; color: var(--gray-900); }
 .filter-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
 .filter-row select, .filter-row input { height: 38px; padding: 0 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font); background: var(--white); }
 .notes-input { width:100%; min-width:220px; box-sizing:border-box; padding:6px 10px; border:1.5px solid var(--gray-200); border-radius:6px; font-size:12px; font-family:var(--font); resize:vertical; height:64px; }

 /* Login screen */
 .login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--white); }
 .login-box { background: var(--white); border-radius: var(--radius); box-shadow: none; border: 1px solid var(--gray-200); padding: 40px 36px; width: 100%; max-width: 360px; }
 .login-logo { font-size: 32px; text-align: center; margin-bottom: 8px; }
 .login-title { font-size: 20px; font-weight: 700; text-align: center; color: var(--gray-900); margin-bottom: 4px; }
 .login-sub { font-size: 13px; color: var(--gray-600); text-align: center; margin-bottom: 24px; }

 /* Misc */
 .mt-8 { margin-top: 8px; }
 .mt-12 { margin-top: 12px; }
 .mt-20 { margin-top: 20px; }
 .mb-16 { margin-bottom: 16px; }
 .info-note { font-size: 13px; color: var(--gray-600); background: var(--gray-100); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; line-height: 1.5; }
 .pb-4 { padding-bottom: 80px; }

 /* ══════════════════════════════
 DRIVER SCREEN ── DRIVER ──
 ══════════════════════════════ */
 .driver-header {
 background: var(--green); color: var(--white);
 padding: 16px 20px;
 display: flex; align-items: center; justify-content: space-between;
 }
 .driver-header h1 { font-size: 17px; font-weight: 700; }
 .driver-card {
 background: var(--white); border: 2px solid var(--gray-200);
 border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
 }
 .driver-card.status-transit { border-color: var(--blue); background: var(--blue-light); }
 .driver-card .dc-ref { font-size: 13px; font-weight: 700; color: var(--gray-900); }
 .driver-card .dc-shop { font-size: 14px; font-weight: 700; color: var(--gray-900); margin: 4px 0 2px; }
 .driver-card .dc-loc { font-size: 12px; color: var(--gray-600); margin-bottom: 8px; }
 .driver-card .dc-total { font-size: 16px; font-weight: 700; color: var(--green); }
 .driver-btns { display: flex; gap: 8px; margin-top: 12px; }
 .driver-btns .btn { min-height: 44px; font-size: 13px; }

 /* ══════════════════════════════
 DSA SCREEN ── DSA ──
 ══════════════════════════════ */
 .dsa-header {
 background: var(--orange); color: var(--white);
 padding: 16px 20px;
 display: flex; align-items: center; justify-content: space-between;
 }
 .dsa-header h1 { font-size: 17px; font-weight: 700; }
 .dsa-card {
 background: var(--white); border: 2px solid var(--gray-200);
 border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
 }
 .dsa-card .dsa-shop { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 2px; }
 .dsa-card .dsa-meta { font-size: 13px; color: var(--gray-600); margin-bottom: 4px; }
 .dsa-card .dsa-loc { font-size: 12px; color: var(--gray-400); margin-bottom: 10px; }
 .dsa-btns { display: flex; gap: 8px; margin-top: 10px; }
 .dsa-btns .btn { min-height: 44px; font-size: 13px; }

 /* ══════════════════════════════
 MARKETING EXECUTIVE SCREEN ── MARKETING ──
 Added 2026-07-01, Progress Report Section 11 Step 9.
 Card/button styling reuses .dsa-card/.dsa-btns directly (same shape:
 name + meta + location lines + notes textarea + verify/reject buttons).
 ══════════════════════════════ */
 .marketing-header {
 background: #db2777; color: var(--white);
 padding: 16px 20px;
 display: flex; align-items: center; justify-content: space-between;
 }
 .marketing-header h1 { font-size: 17px; font-weight: 700; }

 /* ══════════════════════════════
 STAFF TAB ── STAFF ──
 ══════════════════════════════ */
 .staff-form { background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
 .staff-form .field { margin-bottom: 14px; }
 .staff-role-badge-driver { background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 50px; }
 .staff-role-badge-dsa { background: var(--orange-light); color: #92400e; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 50px; }
 .staff-role-badge-dsa_supervisor { background: #e0f2fe; color: #0369a1; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 50px; }
 .staff-role-badge-admin_manager { background: var(--purple-light); color: #5b21b6; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 50px; }
 .staff-role-badge-marketing_executive { background: #fce7f3; color: #db2777; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 50px; } /* added 2026-07-01, Step 8 */

/* Trailing rule — originally a second inline <style> block right before </body>, after the delete-staff modal */
 #dsm-confirm-btn:not([disabled]) { opacity: 1 !important; }
