/* ──────────────────────────────────────────────
   Petal & Co. Courier — App Stylesheet
   Aesthetic: Soft pink / cream botanical (Petaland)
────────────────────────────────────────────── */

:root {
  --bg: #fffaf8;
  --paper: #fffdfb;
  --paper-2: #fff4f7;
  --panel: #fff7fa;
  --ink: #513742;
  --muted: #8d6d7a;
  --line: #efd6df;
  --line-strong: #e8bfcd;
  --brand: #ef8fb0;
  --brand-dark: #d96b94;
  --brand-soft: #ffdbe8;
  --brand-soft-2: #ffeaf1;
  --cream: #fff3ee;
  --peach: #ffd9cc;
  --shadow: 0 12px 30px rgba(175, 93, 125, 0.10);
  --shadow-soft: 0 6px 18px rgba(175, 93, 125, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', 'Instrument Sans', sans-serif;
  --font-mono: 'DM Sans', 'Instrument Sans', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* compat aliases */
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-dim: rgba(81,55,66,0.4);
  --surface: var(--paper);
  --surface2: var(--panel);
  --border: var(--line);
  --border-strong: var(--line-strong);
  --gold: var(--brand-dark);
  --gold-light: var(--brand);
  --gold-dim: var(--brand-soft);
  --red: #c47a7a;
  --green: #7aab8a;
}

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

html, body {
  height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 15% 0%, #ffe9f0 0%, transparent 22%),
    radial-gradient(circle at 100% 10%, #fff0e8 0%, transparent 18%),
    repeating-linear-gradient(0deg,
      #fffaf8 0px, #fffaf8 34px,
      #fff8f6 34px, #fff8f6 35px);
}

input, select, textarea, button { -webkit-appearance: none; appearance: none; font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ── Screens ──────────────────────────────── */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen.active { opacity: 1; pointer-events: all; transform: translateX(0); }
.screen.slide-out { opacity: 0; transform: translateX(-24px); }

/* ── Landing ─────────────────────────────── */

#screen-landing {
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, #ffdbe8 0%, transparent 55%),
    radial-gradient(circle at 90% 90%, #fff0e8 0%, transparent 40%),
    #fffaf8;
}

.landing-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(239,143,176,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(255,217,204,0.3) 0%, transparent 60%);
}

.landing-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23ef8fb0' fill-opacity='0.06'/%3E%3C/g%3E%3C/svg%3E");
}

.landing-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 24px;
}

.logo-wrap {
  margin-bottom: 8px;
}
.logo { width: 90px; height: 90px; object-fit: contain; }
.logo-fallback { width: 60px; height: 60px; display: grid; place-items: center; }
.logo-fallback-inner { opacity: 0.7; }

.brand-name {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 500;
  color: var(--ink); letter-spacing: 0.02em; line-height: 1;
}
.brand-name span { color: var(--brand-dark); }
.courier-label { font-size: 0.65rem; letter-spacing: 0.3em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.landing-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; margin-top: 16px; }
.landing-footer { position: absolute; bottom: calc(20px + var(--safe-bottom)); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--muted); }

/* ── Buttons ─────────────────────────────── */

.btn-primary {
  background: linear-gradient(180deg, #f7a6c2, #ea86ac);
  color: white; border: none; border-radius: 14px;
  padding: 15px 22px; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; box-shadow: 0 6px 18px rgba(217,107,148,0.25);
  transition: 0.18s ease; letter-spacing: 0.02em;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn-primary.full { width: 100%; }

.btn-outline {
  background: white; color: var(--brand-dark);
  border: 1.5px solid var(--line-strong); border-radius: 14px;
  padding: 14px 22px; font-weight: 600; font-size: 0.92rem;
  cursor: pointer; transition: 0.18s ease;
}
.btn-outline:hover { background: var(--paper-2); transform: translateY(-1px); }
.btn-outline.full { width: 100%; }

.btn-success {
  background: linear-gradient(180deg, #95d4a8, #72bb8a);
  color: white; border: none; border-radius: 12px;
  padding: 11px 18px; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; box-shadow: 0 4px 12px rgba(100,180,130,0.25);
  transition: 0.18s ease; flex: 1;
}
.btn-success:hover { transform: translateY(-1px); filter: brightness(1.04); }

.btn-danger {
  background: white; color: #b05555;
  border: 1.5px solid #f0c0c0; border-radius: 12px;
  padding: 11px 18px; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: 0.18s ease; flex: 1;
}
.btn-danger:hover { background: #fff0f0; transform: translateY(-1px); }

.btn-maps {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 14px 18px;
  color: var(--ink); font-weight: 500; font-size: 0.9rem;
  cursor: pointer; transition: 0.18s ease;
}
.btn-maps:hover { background: var(--brand-soft-2); border-color: var(--brand); }

/* ── Screen Header ───────────────────────── */

.screen-header {
  position: sticky; top: 0; z-index: 10;
  height: calc(60px + var(--safe-top)); padding-top: var(--safe-top);
  display: flex; align-items: center; gap: 12px;
  padding-left: 16px; padding-right: 20px;
  background: rgba(255,250,248,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 1.2rem; color: var(--ink);
}

.back-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: white; border: 1.5px solid var(--line);
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  color: var(--ink); box-shadow: var(--shadow-soft); transition: 0.15s ease;
}
.back-btn:hover { background: var(--paper-2); }
.back-btn svg { width: 18px; height: 18px; }

.screen-body {
  flex: 1; padding: 24px 20px;
  display: flex; flex-direction: column; gap: 16px;
  padding-bottom: calc(28px + var(--safe-bottom));
}
.screen-body.centered { align-items: center; justify-content: center; text-align: center; }

.screen-title { font-family: var(--font-display); font-size: 2rem; font-weight: 400; color: var(--ink); line-height: 1.2; }
.screen-subtitle { font-size: 0.92rem; color: var(--muted); line-height: 1.55; }
.screen-note { font-size: 0.8rem; color: var(--muted); }

/* ── Form Elements ───────────────────────── */

.form-logo-small {
  width: 52px; height: 52px; background: white;
  border-radius: 14px; display: grid; place-items: center;
  border: 1px solid var(--line); box-shadow: var(--shadow-soft); margin-bottom: 4px;
}
.form-logo-small img { width: 38px; height: 38px; object-fit: contain; }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.optional { font-weight: 400; color: var(--muted); opacity: 0.6; }

.field-group input,
.field-group select,
.field-group textarea {
  background: white; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
  font-size: 0.95rem; color: var(--ink); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(239,143,176,0.15);
}
.field-group input::placeholder { color: rgba(81,55,66,0.35); }
.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23d96b94' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.progress-bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: 4px; transition: width 0.4s ease; }
.step-label { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }

.question-block { display: flex; flex-direction: column; gap: 12px; }
.question { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; color: var(--ink); }

.radio-group { display: flex; gap: 10px; }
.radio-card {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: white; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 16px; cursor: pointer; transition: 0.18s ease;
  font-weight: 500; font-size: 0.92rem; color: var(--ink);
}
.radio-card input[type="radio"] { display: none; }
.radio-card:has(input:checked) {
  border-color: var(--brand); background: var(--brand-soft-2);
  color: var(--brand-dark); box-shadow: 0 0 0 2px rgba(239,143,176,0.2);
}

.conditional-block { display: flex; flex-direction: column; gap: 12px; background: var(--cream); border-radius: 14px; padding: 16px; border: 1px solid var(--peach); }
.conditional-block.hidden { display: none; }
.inline-selects { display: flex; gap: 10px; }
.inline-selects select { flex: 1; }

.file-upload-area {
  background: white; border: 1.5px dashed var(--line-strong);
  border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: 0.18s ease;
  color: var(--muted); font-size: 0.85rem; text-align: center;
}
.file-upload-area svg { width: 28px; height: 28px; color: var(--brand); }
.file-upload-area:hover { border-color: var(--brand); background: var(--brand-soft-2); }
.file-upload-area.selected { border-color: var(--green); background: #f0fff4; color: var(--green); }

.error-msg { background: #fff0f0; border: 1px solid #f5c0c0; border-radius: 10px; padding: 10px 14px; font-size: 0.83rem; color: #b05555; }
.error-msg.hidden { display: none; }

.status-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 30px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.status-pill.pending { background: #fff3e0; color: #b07020; }
.status-pill.assigned { background: var(--brand-soft-2); color: var(--brand-dark); }
.status-pill.delivered { background: #e8f8ee; color: #4a9a64; }
.status-pill.denied { background: #fff0f0; color: #b05555; }

/* ── Status screens ──────────────────────── */

.success-icon, .pulse-icon, .sorry-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 8px;
}
.success-icon { background: #e8f8ee; }
.success-icon svg circle, .success-icon svg path { stroke: #4a9a64; }
.pulse-icon { background: var(--brand-soft-2); }
.pulse-icon svg circle { stroke: var(--brand); animation: spin 8s linear infinite; }
.sorry-icon { background: #fff0f0; }
.sorry-icon svg circle, .sorry-icon svg path { stroke: #c47a7a; }

/* ── Dashboard Header ────────────────────── */

.dashboard-header, .admin-header {
  position: sticky; top: 0; z-index: 10;
  height: calc(72px + var(--safe-top)); padding-top: var(--safe-top);
  display: flex; align-items: center; gap: 14px;
  padding-left: 20px; padding-right: 16px;
  background: rgba(255,250,248,0.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.dash-logo { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.dash-logo img { width: 44px; height: 44px; object-fit: contain; }
.dash-title { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-greeting { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }
.dash-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: white; border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: 0.15s ease; flex-shrink: 0; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Dashboard Body ──────────────────────── */

.dashboard-body { display: flex; flex-direction: column; gap: 20px; flex: 1; padding: 20px; padding-bottom: calc(24px + var(--safe-bottom)); }

/* ── Stats Row ───────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s, transform 0.15s;
}
.stat-card:hover { border-color: var(--brand); transform: translateY(-1px); }

.stat-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.stat-icon.pink { background: var(--brand-soft-2); color: var(--brand-dark); }
.stat-icon.pink svg { stroke: var(--brand-dark); }
.stat-icon.green { background: #e8f8ee; color: #4a9a64; }
.stat-icon.green svg { stroke: #4a9a64; }

.stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; color: var(--ink); line-height: 1.1; }
.stat-sub { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

/* ── Order Cards ─────────────────────────── */

.section-heading { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }

.order-card {
  background: white; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-soft);
}
.order-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow); }

/* ── Active Order Card ───────────────────── */

.order-card.active-order {
  border-color: var(--brand);
  background: white;
  position: relative;
  overflow: hidden;
  padding-top: 22px;
}

.order-card.active-order::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
}

.order-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-product { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; color: var(--ink); }
.order-recipient { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

.order-fee-block { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.order-fee { font-size: 1.1rem; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }

/* ── ETA chip on card ────────────────────── */

.eta-chip-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand-soft-2);
  border: 1px solid var(--brand);
  border-radius: 30px;
  padding: 3px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.eta-chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-dark);
  animation: blink 1.5s ease infinite;
  flex-shrink: 0;
}

/* ── Delivery progress bar (on active card) ── */

.delivery-progress {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.delivery-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.delivery-progress-label { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.delivery-progress-val { font-size: 0.72rem; font-weight: 700; color: var(--brand-dark); }
.delivery-progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.delivery-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ── Address pill on card ────────────────── */

.order-address-pill {
  font-size: 0.82rem; color: var(--muted); line-height: 1.4;
  display: flex; gap: 6px; align-items: flex-start;
  background: var(--brand-soft-2);
  border-radius: 10px;
  padding: 9px 12px;
}
.order-address-pill svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--brand-dark); }

/* legacy plain address (history cards) */
.order-address { font-size: 0.82rem; color: var(--muted); line-height: 1.4; display: flex; gap: 6px; align-items: flex-start; }
.order-address svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--brand); }

/* ── Inline action buttons on active card ── */

.card-actions {
  display: flex;
  gap: 8px;
}

.card-btn-map {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: white;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: 0.15s ease;
  text-decoration: none;
}
.card-btn-map:hover { background: var(--brand-soft-2); border-color: var(--brand); }
.card-btn-map svg { width: 15px; height: 15px; flex-shrink: 0; }

.card-btn-deliver {
  flex: 1.2;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #f7a6c2, #ea86ac);
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: 0.15s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(217,107,148,0.2);
}
.card-btn-deliver:hover { filter: brightness(1.04); transform: translateY(-1px); }
.card-btn-deliver svg { width: 15px; height: 15px; flex-shrink: 0; }

.order-tracking { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); opacity: 0.7; }

/* ── History card (redesigned) ───────────── */

.history-card {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.history-card:hover { border-color: var(--brand); transform: translateY(-1px); }

.history-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: #e8f8ee;
  display: flex; align-items: center; justify-content: center;
  color: #4a9a64;
  flex-shrink: 0;
}
.history-icon svg { width: 17px; height: 17px; stroke: #4a9a64; }

.history-info { flex: 1; min-width: 0; }
.history-product {
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

.history-fee { font-size: 0.95rem; font-weight: 700; color: var(--ink); flex-shrink: 0; }

/* ── Empty state ─────────────────────────── */

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 40px; height: 40px; opacity: 0.3; color: var(--brand); }
.empty-state p { font-size: 0.85rem; line-height: 1.5; }

/* ── Order Detail ────────────────────────── */

.order-detail-hero { background: white; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-soft); }
.detail-product { font-family: var(--font-display); font-size: 2rem; font-weight: 400; color: var(--ink); }
.detail-fee { font-size: 1.5rem; font-weight: 700; color: var(--brand-dark); }

.detail-section { background: white; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-soft); }
.detail-row { display: flex; flex-direction: column; gap: 4px; }
.detail-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.detail-value { font-size: 0.92rem; color: var(--ink); line-height: 1.4; }

.pin-input-section { background: white; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; box-shadow: var(--shadow-soft); }
.pin-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }
.pin-input { font-size: 2.2rem !important; letter-spacing: 0.5em !important; text-align: center; width: 180px !important; padding: 14px 20px !important; border: 2px solid var(--line) !important; border-radius: 14px !important; color: var(--ink) !important; background: var(--cream) !important; }
.pin-input:focus { border-color: var(--brand) !important; box-shadow: 0 0 0 3px rgba(239,143,176,0.15) !important; outline: none; }
.maps-links { display: flex; flex-direction: column; gap: 8px; }

/* ── Live Location ───────────────────────── */

.location-banner { background: linear-gradient(135deg, var(--brand-soft-2), var(--cream)); border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--brand-dark); }
.location-dot { width: 10px; height: 10px; background: var(--brand-dark); border-radius: 50%; flex-shrink: 0; animation: blink 1.5s ease infinite; }

.live-tracking-card { background: white; border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-soft); }
.live-tracking-header { display: flex; align-items: center; gap: 10px; }
.live-dot { width: 10px; height: 10px; background: var(--brand-dark); border-radius: 50%; flex-shrink: 0; animation: blink 1.5s ease infinite; }
.live-tracking-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; color: var(--brand-dark); text-transform: uppercase; }
.live-coords { font-size: 0.78rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.live-coords span { color: var(--ink); font-weight: 600; }
.live-courier-name { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }

/* ── Admin ───────────────────────────────── */

.admin-tabs { display: flex; border-bottom: 1.5px solid var(--line); background: rgba(255,250,248,0.96); backdrop-filter: blur(8px); position: sticky; top: calc(72px + var(--safe-top)); z-index: 9; }
.tab-btn { flex: 1; padding: 14px; background: none; border: none; border-bottom: 2.5px solid transparent; color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { color: var(--brand-dark); border-bottom-color: var(--brand-dark); }
.tab-btn:hover { color: var(--ink); }

.admin-content { padding: 20px; display: flex; flex-direction: column; gap: 16px; padding-bottom: calc(20px + var(--safe-bottom)); }

.admin-card { background: white; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-soft); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s; }
.admin-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }

.admin-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-card-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: var(--ink); }
.admin-card-meta { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

.doc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.doc-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--brand-soft-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 0.72rem; font-weight: 600; color: var(--brand-dark); cursor: pointer; transition: 0.15s; }
.doc-chip:hover { background: var(--brand-soft); }
.doc-chip.missing { background: #fff0f0; color: #b05555; border-color: #f5c0c0; cursor: default; }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

.admin-create-btn { background: var(--brand-soft-2); border: 1.5px dashed var(--brand); border-radius: var(--radius); padding: 16px; color: var(--brand-dark); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; width: 100%; }
.admin-create-btn:hover { background: var(--brand-soft); }

/* ── Application Detail Modal ────────────── */

.modal-overlay { position: fixed; inset: 0; background: rgba(81,55,66,0.5); z-index: 100; display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--safe-bottom); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn 0.2s ease; }
.modal { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 16px; max-height: 92vh; overflow-y: auto; animation: slideUp 0.3s ease; }
.modal-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; color: var(--ink); }

.app-detail-section { background: white; border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.app-detail-section-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; color: var(--brand-dark); text-transform: uppercase; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.app-qa-row { display: flex; flex-direction: column; gap: 3px; }
.app-qa-q { font-size: 0.72rem; font-weight: 600; color: var(--muted); letter-spacing: 0.03em; }
.app-qa-a { font-size: 0.92rem; color: var(--ink); }

.app-images-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-image-tile { display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
.app-image-tile span { font-size: 0.68rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.app-image-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--line); transition: 0.15s; }
.app-image-tile img:hover { border-color: var(--brand); transform: scale(1.02); }
.app-image-missing { width: 100%; aspect-ratio: 4/3; background: var(--cream); border: 1.5px dashed var(--line-strong); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: 0.75rem; }

/* ── Lightbox ────────────────────────────── */

.lightbox-overlay { position: fixed; inset: 0; background: rgba(81,55,66,0.88); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.2s ease; cursor: zoom-out; }
.lightbox-overlay img { max-width: 100%; max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.4); object-fit: contain; }
.lightbox-caption { margin-top: 14px; color: rgba(255,255,255,0.7); font-size: 0.82rem; letter-spacing: 0.06em; font-weight: 600; }

/* ── New Order Pulse ─────────────────────── */

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,143,176,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(239,143,176,0); }
}

.new-order-banner { background: var(--brand-soft-2); border: 1.5px solid var(--brand); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 12px; animation: pulseGlow 2s infinite; }
.new-order-dot { width: 10px; height: 10px; background: var(--brand-dark); border-radius: 50%; flex-shrink: 0; animation: blink 1.5s ease infinite; }

/* ── Animations ──────────────────────────── */

@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Toast ───────────────────────────────── */

.toast { position: fixed; top: calc(20px + var(--safe-top)); left: 50%; transform: translateX(-50%) translateY(-70px); background: var(--ink); border-radius: 30px; padding: 11px 22px; font-size: 0.82rem; font-weight: 600; color: white; z-index: 300; white-space: nowrap; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none; box-shadow: 0 8px 28px rgba(81,55,66,0.25); }
.toast.show { transform: translateX(-50%) translateY(0); }

@media (min-width: 480px) {
  .screen-body { padding: 36px 32px; }
  .landing-actions { width: 290px; }
}


/* ── Bottom Tab Bar ──────────────────────── */

#screen-dashboard {
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
}

.dash-tab-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.dash-tab-content.hidden { display: none !important; }

.bottom-tab-bar {
  display: flex;
  background: rgba(255,250,248,0.98);
  border-top: 1.5px solid var(--line);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
  z-index: 20;
}

.bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px 8px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s ease;
  position: relative;
}

.bottom-tab.active {
  color: var(--brand-dark);
}

.bottom-tab.active svg {
  stroke: var(--brand-dark);
}

.bottom-tab::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 0; height: 2.5px;
  background: var(--brand-dark);
  border-radius: 0 0 4px 4px;
  transition: width 0.2s ease;
}

.bottom-tab.active::before { width: 40px; }

/* ── Dashboard Header (new) ──────────────── */

.dash-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-soft-2), #ffdbe8);
  border: 2px solid var(--line-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.dash-avatar svg { width: 22px; height: 22px; }
.dash-header-right { display: flex; align-items: center; gap: 8px; }

/* ── Notification bell button ────────────── */

.notif-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: white;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--muted);
  position: relative;
  transition: 0.15s ease;
  flex-shrink: 0;
}
.notif-btn:hover { background: var(--paper-2); color: var(--ink); }
.notif-btn svg { width: 18px; height: 18px; }

.notif-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand-dark);
  border: 1.5px solid white;
}
.notif-dot.hidden { display: none; }

.new-order-indicator {
  width: 10px; height: 10px;
  background: var(--brand-dark);
  border-radius: 50%;
  animation: blink 1.5s ease infinite;
}
.new-order-indicator.hidden { display: none; }

/* ── Welcome Card ────────────────────────── */

.welcome-card {
  background: linear-gradient(135deg, var(--brand-soft-2), var(--cream));
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin: 4px 0;
}

.welcome-icon { font-size: 2.8rem; line-height: 1; }
.welcome-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
}
.welcome-sub {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 280px;
}

/* ── ETA Section (order detail screen) ────── */

.eta-section {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.eta-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.eta-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eta-quick-btns {
  display: flex;
  gap: 8px;
}

.eta-quick {
  flex: 1;
  padding: 9px 4px;
  background: var(--brand-soft-2);
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}
.eta-quick:hover { background: var(--brand-soft); }
.eta-quick:active { transform: scale(0.97); }

.eta-custom-input {
  flex: 1;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  width: 80px;
  text-align: center;
  transition: border-color 0.2s;
}
.eta-custom-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239,143,176,0.15); }

.eta-status {
  background: var(--brand-soft-2);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--brand-dark);
  font-weight: 600;
}
.eta-status.hidden { display: none; }

.eta-badge {
  display: inline-flex;
  align-items: center;
  background: var(--brand-soft-2);
  border: 1px solid var(--brand);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: 0.02em;
}

/* ── Delivered Banner ────────────────────── */

.delivered-banner {
  background: #e8f8ee;
  border: 1.5px solid #72bb8a;
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4a9a64;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ── Profile Photo Picker ────────────────── */

.profile-photo-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--cream);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  cursor: pointer;
  transition: 0.18s ease;
  text-align: center;
}
.profile-photo-picker:hover { border-color: var(--brand); background: var(--brand-soft-2); }

.profile-photo-preview {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--line-strong);
  display: grid; place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-photo-preview svg { width: 40px; height: 40px; color: var(--brand); opacity: 0.5; }

.profile-photo-hint { display: flex; flex-direction: column; gap: 4px; }
.profile-photo-label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.profile-photo-sub { font-size: 0.75rem; color: var(--muted); }

/* ── Sort Code / Bank Logo ───────────────── */

.sort-code-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-code-wrap input {
  flex: 1;
}

.bank-logo-container {
  flex-shrink: 0;
}

.bank-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: white;
  min-width: 48px;
  text-align: center;
  animation: fadeIn 0.2s ease;
  flex-shrink: 0;
}
.bank-logo-badge.unknown { background: var(--muted); }

/* ── Pay Tab ──────────────────────────────── */

.pay-hero {
  background: linear-gradient(135deg, var(--brand-dark), #c05080);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: white;
}

.pay-hero-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.8;
}

.pay-hero-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
}

.pay-hero-sub {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 2px;
}

.pay-payout-card {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-soft);
}

.pay-payout-icon {
  width: 40px; height: 40px;
  background: var(--brand-soft-2);
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--brand-dark);
  flex-shrink: 0;
}

.pay-payout-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.pay-payout-date { font-size: 1rem; font-weight: 600; color: var(--ink); margin-top: 3px; }
.pay-payout-days { font-size: 0.8rem; color: var(--brand-dark); font-weight: 600; margin-top: 3px; }

.pay-chart-section { display: flex; flex-direction: column; gap: 10px; }

.pay-chart {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  height: 130px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.chart-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
  min-width: 0;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  transition: height 0.3s ease;
}

.chart-bar-label {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.pay-bank-card {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.pay-bank-row { display: flex; justify-content: space-between; align-items: center; }
.pay-bank-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.pay-bank-value { font-size: 0.88rem; color: var(--ink); font-weight: 500; }

/* ── Settings Tab ─────────────────────────── */

.settings-notice {
  background: var(--brand-soft-2);
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.settings-section {
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-soft);
}

.settings-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-dark);
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.settings-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.settings-field:last-child { border-bottom: none; padding-bottom: 0; }

.settings-field-label {
  font-size: 0.77rem;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 1px;
}

.settings-field-value {
  font-size: 0.88rem;
  color: var(--ink);
  text-align: right;
  line-height: 1.4;
}

.settings-field-empty { color: var(--muted); font-style: italic; }

.btn-danger-outline {
  background: white;
  color: #b05555;
  border: 1.5px solid #f0c0c0;
  border-radius: 14px;
  padding: 14px 22px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-danger-outline:hover { background: #fff0f0; }
.btn-danger-outline.full { width: 100%; }

/* ── Dashboard body padding fix (tabs) ───── */

.dash-tab-content .dashboard-body {
  padding-bottom: calc(16px + var(--safe-bottom));
}

/* ── App-image grid 5 items ──────────────── */
.app-images-grid {
  grid-template-columns: 1fr 1fr;
}