/* ============================================================
   Everything Else — Design System
   Ground-up rebuild. Mobile-first. Premium delivery app feel.
   ============================================================ */

/* ── Design Tokens ───────────────────────────────────────── */
:root {
  /* Brand colors */
  --blue:          #0057A8;
  --blue-dark:     #004288;
  --blue-light:    #e8f0fb;
  --green:         #00A651;
  --green-dark:    #007A3D;
  --green-light:   #e6f7ee;
  --dark:          #1A1A1A;
  --white:         #FFFFFF;

  /* UI palette */
  --bg:            #F7F8FA;
  --surface:       #FFFFFF;
  --surface-2:     #F0F4F8;

  /* Typography */
  --font-base:     'Inter', system-ui, -apple-system, sans-serif;
  --border:        #E2E8F0;
  --border-strong: #CBD5E1;
  --text:          #1A1A1A;
  --text-2:        #4A5568;
  --muted:         #718096;
  --danger:        #E53E3E;
  --warning-bg:    #FFFBEB;
  --warning-border:#FCD34D;
  --warning-text:  #92400E;

  /* Spacing scale */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s8:  32px;
  --s10: 40px;
  --s12: 48px;

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  /* Transitions */
  --t-fast:   0.12s ease;
  --t-base:   0.2s ease;
  --t-slow:   0.3s ease;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ── App shell ───────────────────────────────────────────── */
#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ── Page / screen wrappers ──────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  /* override per-screen if needed */
  transition: transform var(--t-slow), opacity var(--t-slow);
  will-change: transform;
}

.screen-enter {
  transform: translateX(100%);
  opacity: 0;
}

.screen-active {
  transform: translateX(0);
  opacity: 1;
}

.screen-exit {
  transform: translateX(-40%);
  opacity: 0;
}

/* Scrollable content area (sits above bottom nav) */
.screen-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* ── Bottom navigation ───────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 4px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform var(--t-fast);
}

.bottom-nav-item.active {
  color: var(--blue);
}

.bottom-nav-item:active {
  transform: scale(0.92);
  color: var(--blue);
}

/* ── App header ──────────────────────────────────────────── */
.app-header {
  background: var(--blue);
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo-box {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255,255,255,0.85);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-logo-box svg {
  width: 18px;
  height: 18px;
}

.header-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}

.header-action {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}

.header-action:active { background: rgba(255,255,255,0.15); }

/* ── Back header (sub-screens) ───────────────────────────── */
.sub-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.sub-header-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.back-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}

.back-btn:active { opacity: 0.65; }

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--s6) var(--s4);
}

/* ── Hero section ────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #0057A8 0%, #003d7a 100%);
  padding: 36px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0,166,81,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-logo-box {
  width: 44px;
  height: 44px;
  border: 2.5px solid rgba(255,255,255,0.9);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-box svg {
  width: 24px;
  height: 24px;
}

.hero-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.hero-headline {
  font-size: 36px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
  letter-spacing: 0.1px;
}

.trust-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.2px;
}

.trust-bar-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* ── Service cards ───────────────────────────────────────── */
.services-section {
  padding: var(--s5) var(--s4);
  padding-top: var(--s6);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.service-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 20px 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.service-card:active {
  transform: scale(0.97);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.service-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.service-card-icon svg {
  width: 24px;
  height: 24px;
}

.service-card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.service-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.service-card-price {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

/* Service card color variants */
.svc-returns .service-card-icon { background: #EBF4FF; }
.svc-returns .service-card-icon svg { color: var(--blue); }
.svc-returns .service-card-price { color: var(--blue); }
.svc-returns:hover, .svc-returns:focus { border-color: var(--blue); }

.svc-laundry .service-card-icon { background: #E6F7EE; }
.svc-laundry .service-card-icon svg { color: var(--green); }
.svc-laundry .service-card-price { color: var(--green); }
.svc-laundry:hover, .svc-laundry:focus { border-color: var(--green); }

.svc-liquor .service-card-icon { background: #FFF8E6; }
.svc-liquor .service-card-icon svg { color: #C48A00; }
.svc-liquor .service-card-price { color: #C48A00; }
.svc-liquor:hover, .svc-liquor:focus { border-color: #C48A00; }

.svc-nicotine .service-card-icon { background: #E0FAF7; }
.svc-nicotine .service-card-icon svg { color: #00897B; }
.svc-nicotine .service-card-price { color: #00897B; }
.svc-nicotine:hover, .svc-nicotine:focus { border-color: #00897B; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast), opacity var(--t-fast), box-shadow var(--t-fast);
  letter-spacing: -0.1px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.btn-disabled { opacity: 0.5; pointer-events: none; }

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,87,168,0.3);
}

.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 6px 20px rgba(0,87,168,0.35); }

.btn-green {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(0,166,81,0.3);
}

.btn-green:hover { background: var(--green-dark); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover { border-color: var(--border-strong); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--blue);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-ghost:active { opacity: 0.6; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--s4);
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  margin-bottom: var(--s4);
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.1px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,87,168,0.1);
}

.form-input::placeholder { color: #A0AEC0; font-weight: 400; }

.form-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.error-msg {
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
  min-height: 18px;
  margin-bottom: var(--s2);
}

/* ── Radio / checkbox items ──────────────────────────────── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.radio-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.radio-item.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}

.radio-item input { accent-color: var(--blue); cursor: pointer; }

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ── Auth screen ─────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  background: var(--surface);
}

.auth-tabs {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s5);
}

.auth-tab {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
}

.auth-tab.active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* ── Step progress bar ───────────────────────────────────── */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  gap: 0;
  flex-shrink: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
  transition: all var(--t-base);
}

.step-dot.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.step-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.step-name.active {
  color: var(--blue);
  font-weight: 700;
}

.step-line {
  width: 20px;
  height: 2px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
  transition: background var(--t-base);
}

.step-line.done { background: var(--green); }

/* ── Review rows ─────────────────────────────────────────── */
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: var(--s4);
}

.review-row:last-child { border-bottom: none; }

.review-label {
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}

.review-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.review-total {
  font-size: 17px;
  font-weight: 800;
  padding-top: 14px;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

/* ── Item cart (liquor/nicotine menus) ───────────────────── */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: var(--s3);
}

.item-row:last-child { border-bottom: none; }

.item-info { flex: 1; min-width: 0; }

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.item-price {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.qty-btn:active { transform: scale(0.9); border-color: var(--blue); color: var(--blue); }

.qty-val {
  font-size: 15px;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  color: var(--text);
}

.cart-summary {
  background: var(--blue-light);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

/* ── Success screen ──────────────────────────────────────── */
.success-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 100px;
  gap: 18px;
  background: var(--surface);
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 8px 32px rgba(0,166,81,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.success-icon svg {
  width: 38px;
  height: 38px;
  color: var(--white);
}

.success-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.1;
}

.success-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.6;
}

.success-detail {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 18px;
  max-width: 360px;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: var(--s3);
}

.success-detail-row:last-child { border: none; }
.success-detail-row .lbl { color: var(--muted); font-weight: 500; }
.success-detail-row .val { font-weight: 600; text-align: right; }

/* ── Skeleton loader ─────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #E8EDF4 25%, #F4F7FB 50%, #E8EDF4 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r-sm);
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-card {
  height: 120px;
  border-radius: var(--r-xl);
  margin-bottom: var(--s3);
}

.skeleton-btn {
  height: 50px;
  border-radius: var(--r-md);
  margin-top: var(--s4);
}

/* ── Dashboard ───────────────────────────────────────────── */
.dashboard-header {
  background: linear-gradient(135deg, var(--blue) 0%, #003d7a 100%);
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
}

.dashboard-greeting {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 2px;
  letter-spacing: 0.2px;
}

.dashboard-name {
  font-size: 26px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
}

.first-free-banner {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.first-free-badge {
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.first-free-text {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.credit-bar {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: var(--s4);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}

.credit-bar strong { font-size: 16px; font-weight: 800; }

/* ── Referral card ───────────────────────────────────────── */
.refer-card {
  background: linear-gradient(135deg, var(--blue) 0%, #003d7a 100%);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: var(--s4);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.refer-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(0,166,81,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.refer-header {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 2px;
  letter-spacing: -0.2px;
}

.refer-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 14px;
}

.refer-code-block {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.refer-code-block:active { background: rgba(255,255,255,0.2); }

.refer-code-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.refer-code-value {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--white);
  font-family: monospace;
}

.refer-code-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

/* ── Info / notice blocks ────────────────────────────────── */
.info-block {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--blue);
  line-height: 1.5;
  margin-bottom: var(--s3);
}

.warning-block {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--warning-text);
  line-height: 1.5;
  margin-bottom: var(--s3);
}

.notice-block {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: var(--s3);
}

.extended-fee-msg {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--warning-text);
  font-weight: 600;
  margin-top: 6px;
}

/* ── Autocomplete ────────────────────────────────────────── */
.autocomplete-wrapper { position: relative; }

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--white);
  border: 1.5px solid var(--blue);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  max-height: 200px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.autocomplete-item {
  padding: 11px 14px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:active { background: var(--blue-light); }

/* ── Toast notification ──────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 11px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 1000;
  white-space: nowrap;
  opacity: 0;
  transition: all var(--t-base);
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Label upload (success screen) ──────────────────────── */
.upload-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #EFF6FF;
  border: 2px dashed #93C5FD;
  border-radius: var(--r-md);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #2563EB;
  transition: all var(--t-fast);
}

.upload-box:active { background: #DBEAFE; }

/* ── Orders screen ───────────────────────────────────────── */
.orders-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}

.orders-empty-icon {
  width: 64px;
  height: 64px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.orders-empty-icon svg {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.orders-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.orders-empty-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.order-item {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: var(--s3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-item-icon svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.order-item-info { flex: 1; min-width: 0; }

.order-item-type {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.order-item-date {
  font-size: 12px;
  color: var(--muted);
}

.order-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.status-pending   { background: #FEF3C7; color: #92400E; }
.status-assigned  { background: #EBF4FF; color: #0057A8; }
.status-completed { background: var(--green-light); color: var(--green-dark); }
.status-cancelled { background: #FEE2E2; color: #991B1B; }

/* ── Account screen ──────────────────────────────────────── */
.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: var(--s4);
}

.account-avatar svg {
  width: 32px;
  height: 32px;
  color: rgba(255,255,255,0.9);
}

.account-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.account-email {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: var(--s5);
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--t-fast);
}

.account-menu-item:last-child { border-bottom: none; }
.account-menu-item:active { opacity: 0.6; }

.account-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-menu-icon svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.account-menu-text {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.account-menu-arrow {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

/* ── Tip screen ──────────────────────────────────────────── */
.tip-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: center;
  margin-bottom: var(--s5);
}

.tip-btn {
  width: 72px;
  padding: 14px 0;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: center;
}

.tip-btn:active { transform: scale(0.94); }
.tip-btn.selected { border-color: var(--blue); background: var(--blue); color: var(--white); }

/* ── How It Works cards ──────────────────────────────────── */
.hiw-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: var(--s4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.hiw-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s3);
}

.hiw-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.hiw-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.hiw-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.hiw-steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.hiw-steps li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.hiw-steps li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 7px;
}

.hiw-note {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Footer links ────────────────────────────────────────── */
.footer-links {
  text-align: center;
  padding: 20px 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links a {
  color: var(--muted);
  text-decoration: underline;
}

.footer-links a:hover { color: var(--text); }

/* ── Chat button ─────────────────────────────────────────── */
.chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: opacity var(--t-fast);
}

.chat-btn:active { opacity: 0.85; }

/* ── Age gate overlay ────────────────────────────────────── */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.age-gate-box {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.age-gate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.age-gate-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Coming Soon cards ──────────────────────────────────── */
.svc-coming-soon {
  opacity: 0.68;
  filter: saturate(0.6);
  cursor: pointer;
  background: var(--surface-2);
  border: 2px solid transparent;
}

.svc-coming-soon:hover {
  opacity: 0.85;
  filter: saturate(0.8);
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.svc-coming-soon:active {
  transform: scale(0.97);
}

.svc-coming-soon .service-card-price {
  color: var(--muted);
  font-weight: 600;
}

.coming-soon-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--border-strong);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--r-full);
  line-height: 1.4;
}

/* ── Coming Soon modal overlay ───────────────────────────── */
.coming-soon-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.coming-soon-box {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.coming-soon-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.coming-soon-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.coming-soon-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Card active state ───────────────────────────────────── */
.card:active {
  box-shadow: var(--shadow-md);
}

/* ── Pulsing first-order badge ───────────────────────────── */
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,166,81,0.5); }
  50%       { transform: scale(1.04); box-shadow: 0 0 0 6px rgba(0,166,81,0); }
}

.first-order-pulse-badge {
  animation: pulse-badge 2s ease-in-out infinite;
}

/* ── Animated checkmark ──────────────────────────────────── */
@keyframes draw-check {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

.check-animated polyline {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw-check 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}

/* ── Confetti ─────────────────────────────────────────────── */
.confetti-container {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
}

@keyframes confetti-out {
  0%   { transform: translate(0, 0) scale(1.2); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(var(--cx), calc(var(--cy) + 80px)) scale(0.3); opacity: 0; }
}

.confetti-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: confetti-out 1.4s ease-out var(--delay, 0s) forwards;
}

/* ── Success screen position ──────────────────────────────── */
.success-screen { position: relative; overflow: hidden; }

/* ── Coming soon badge — friendly italic ──────────────────── */
.coming-soon-badge {
  font-style: italic;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.2px;
  text-transform: none;
  color: #9CA3AF;
  background: #F3F4F6;
  border: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 400px) {
  .hero-headline { font-size: 30px; }
  .service-grid  { grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .service-card  { padding: 16px 12px; }
  .container     { padding: var(--s5) var(--s3); }
}

@media (min-width: 520px) {
  .container { padding-left: var(--s8); padding-right: var(--s8); }
}

/* ── DoorDash-style Home Layout ─────────────────────────── */

.dd-home {
  background: #FFFFFF;
}

.dd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
}

.dd-location {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dd-location-arrow {
  font-size: 10px;
  color: var(--muted);
  margin-left: 2px;
}

.dd-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dd-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.dd-icon-btn svg {
  width: 18px;
  height: 18px;
  color: var(--text);
}

.dd-greeting-wrap {
  padding: 18px 16px 10px;
  background: #FFFFFF;
}

.dd-greeting {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 4px;
}

.dd-tagline {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.dd-first-free-note {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
}

.dd-credit-note {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-top: 4px;
}

.dd-search-wrap {
  padding: 10px 16px 12px;
  background: #FFFFFF;
}

.dd-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F4F6FA;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: text;
}

.dd-search-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.dd-search {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  outline: none;
  flex: 1;
  cursor: text;
  pointer-events: none;
}

.dd-categories-wrap {
  background: #FFFFFF;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--border);
}

.dd-cat-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.dd-cat-scroll::-webkit-scrollbar {
  display: none;
}

.dd-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-width: 68px;
  scroll-snap-align: start;
}

.dd-cat-item:active .dd-cat-icon-wrap {
  transform: scale(0.90);
}

/* iOS-style solid rounded square icon chips */
.dd-cat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #EBF4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
  flex-shrink: 0;
}

/* Per-service solid color fills */
.dd-cat-returns  .dd-cat-icon-wrap { background: #0057A8; }
.dd-cat-laundry  .dd-cat-icon-wrap { background: #00A651; }
.dd-cat-liquor   .dd-cat-icon-wrap { background: #C48A00; }
.dd-cat-nicotine .dd-cat-icon-wrap { background: #00897B; }

/* Coming soon — muted & no interaction */
.dd-cat-soon {
  opacity: 0.38;
  pointer-events: none;
}

.dd-cat-soon .dd-cat-icon-wrap {
  background: #D1D5DB;
}

.dd-cat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}

.dd-cat-soon .dd-cat-label {
  color: var(--muted);
}

.dd-cat-soon-text {
  display: none; /* opacity handles coming-soon visual */
}

.dd-services-wrap {
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Premium service card — real product tile with visual weight */
.dd-service-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  padding: 18px 16px;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.dd-service-card:active {
  transform: scale(0.975);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.dd-service-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.11);
}

/* Solid tinted rounded-square icon — not a circle, not gray */
.dd-service-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dd-service-info {
  flex: 1;
  min-width: 0;
}

.dd-service-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.dd-service-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 6px;
}

.dd-service-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

/* Subtle chevron circle */
.dd-service-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  color: #9CA3AF;
  line-height: 1;
}
