/* ============================================================
   Dream Decors PWA – Complete Stylesheet
   Mobile-first, Dark Mode, Animations, All Screens
   ============================================================ */

/* ── Google Font Import ────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:        #FF5722;
  --primary-dark:   #E64A19;
  --primary-light:  #FF8A65;
  --primary-bg:     #FBE9E7;
  --secondary:      #1A1A2E;
  --accent:         #FFC107;
  --success:        #4CAF50;
  --success-bg:     #E8F5E9;
  --danger:         #F44336;
  --danger-bg:      #FFEBEE;
  --warning:        #FF9800;
  --warning-bg:     #FFF3E0;
  --info:           #2196F3;
  --info-bg:        #E3F2FD;

  --bg:             #F5F5F5;
  --bg2:            #EEEEEE;
  --surface:        #FFFFFF;
  --surface2:       #FAFAFA;
  --surface3:       #F5F5F5;

  --text:           #212121;
  --text2:          #424242;
  --text3:          #757575;
  --text4:          #BDBDBD;
  --text-inv:       #FFFFFF;

  --border:         #E0E0E0;
  --border2:        #F0F0F0;
  --divider:        #EEEEEE;

  --shadow-xs:      0 1px 3px rgba(0,0,0,.08);
  --shadow-sm:      0 2px 8px rgba(0,0,0,.10);
  --shadow-md:      0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.16);
  --shadow-xl:      0 16px 48px rgba(0,0,0,.20);

  --r-xs:  6px;
  --r-sm:  10px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;
  --r-full: 9999px;

  --dur:   .28s;
  --ease:  cubic-bezier(.4,0,.2,1);

  --nav-h: 68px;
  --top-h: 60px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:             #121212;
  --bg2:            #1E1E1E;
  --surface:        #1E1E1E;
  --surface2:       #252525;
  --surface3:       #2C2C2C;
  --text:           #F5F5F5;
  --text2:          #EEEEEE;
  --text3:          #BDBDBD;
  --text4:          #757575;
  --text-inv:       #121212;
  --border:         #333333;
  --border2:        #2A2A2A;
  --divider:        #2A2A2A;
  --primary-bg:     #3A1F14;
  --success-bg:     #1A2E1C;
  --danger-bg:      #2E1A1A;
  --warning-bg:     #2E251A;
  --info-bg:        #1A2230;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  user-select: none;
  -webkit-user-select: none;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--primary); color: white; }
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── App Shell ─────────────────────────────────────────────── */
#app {
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  contain: paint;           /* stops child overflow bleeding into #app scrollWidth */
  box-shadow: var(--shadow-xl);
}

/* ── Screens ───────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--bg);
  contain: paint;           /* prevents child overflow bleeding to #app */
  /* Pure fade — zero translateX so #app never accumulates scrollLeft */
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.screen.prev {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.screen.no-anim {
  transition: none;
}
.screen-content {
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  min-height: 100%;
}
.screen-content.no-nav { padding-bottom: 0; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  padding: 0 16px;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: var(--safe-top);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topbar.transparent {
  background: transparent;
  border: none;
  position: absolute;
  width: 100%;
}
.topbar-back {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface3);
  font-size: 20px;
  flex-shrink: 0;
  transition: background var(--dur);
}
.topbar-back:active { background: var(--border); }
.topbar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-action {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--surface3);
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  transition: background var(--dur);
}
.topbar-action:active { background: var(--border); }
.topbar-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* ── Bottom Navigation ─────────────────────────────────────── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border2);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  padding-bottom: var(--safe-bottom);
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  transition: transform var(--dur) var(--ease);
}
#bottom-nav.hidden { transform: translate(-50%, 100%); }
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  padding: 0 4px;
  transition: opacity var(--dur);
}
.nav-item:active { opacity: .7; }
.nav-icon-wrap {
  position: relative;
  width: 46px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  transition: background var(--dur), transform var(--dur);
}
.nav-item.active .nav-icon-wrap {
  background: var(--primary-bg);
  transform: scale(1.05);
}
.nav-icon { font-size: 22px; transition: transform var(--dur); }
.nav-item.active .nav-icon { transform: scale(1.1); }
.nav-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text3);
  transition: color var(--dur);
}
.nav-item.active .nav-label { color: var(--primary); font-weight: 700; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: SPLASH                                         ── */
/* ── ═══════════════════════════════════════════════════════ ── */
#screen-splash {
  background: linear-gradient(145deg, #FF5722 0%, #BF360C 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
}
.splash-logo {
  width: 140px; height: 140px;
  background: white;
  border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  animation: splashPop .6s var(--ease) .2s both;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}
.splash-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.splash-brand {
  margin-top: 20px;
  font-size: 32px; font-weight: 900;
  color: white;
  letter-spacing: -1px;
  animation: splashFade .6s var(--ease) .5s both;
}
.splash-tagline {
  margin-top: 8px;
  font-size: 14px; font-weight: 400;
  color: rgba(255,255,255,.8);
  letter-spacing: .5px;
  animation: splashFade .6s var(--ease) .7s both;
}
.splash-loader {
  margin-top: 60px;
  display: flex; gap: 8px;
  animation: splashFade .6s var(--ease) 1s both;
}
.splash-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  animation: dotPulse 1.4s ease infinite;
}
.splash-dot:nth-child(2) { animation-delay: .2s; }
.splash-dot:nth-child(3) { animation-delay: .4s; }

@keyframes splashPop  { from { transform: scale(.4); opacity:0 } to { transform: scale(1); opacity:1 } }
@keyframes splashFade { from { opacity:0; transform: translateY(16px) } to { opacity:1; transform: none } }
@keyframes dotPulse   { 0%,80%,100% { opacity:.3; transform: scale(.8) } 40% { opacity:1; transform: scale(1.2) } }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: ONBOARDING                                     ── */
/* ── ═══════════════════════════════════════════════════════ ── */
#screen-onboarding {
  background: var(--surface);
  display: flex; flex-direction: column;
}
.onboard-slides { flex: 1; overflow: hidden; position: relative; }
.onboard-slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 32px;
  text-align: center;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
  transform: translateX(100%);
  opacity: 0;
}
.onboard-slide.active { transform: none; opacity: 1; }
.onboard-slide.done   { transform: translateX(-100%); opacity: 0; }
.onboard-illustration {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 90px;
  margin-bottom: 36px;
  position: relative;
}
.onboard-illustration::before {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 3px dashed currentColor;
  opacity: .2;
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.onboard-title {
  font-size: 26px; font-weight: 800;
  color: var(--text); line-height: 1.2;
  margin-bottom: 12px;
}
.onboard-desc {
  font-size: 15px; color: var(--text3);
  line-height: 1.65;
}
.onboard-bottom {
  padding: 24px 24px calc(24px + var(--safe-bottom));
  background: var(--surface);
}
.onboard-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-bottom: 24px;
}
.onboard-dot {
  height: 6px; border-radius: 3px;
  background: var(--border);
  transition: width .3s var(--ease), background .3s;
  width: 6px;
}
.onboard-dot.active { width: 24px; background: var(--primary); }
.onboard-actions { display: flex; gap: 12px; align-items: center; }
.btn-skip {
  flex: 1; padding: 14px; border-radius: var(--r-full);
  background: var(--surface3); color: var(--text3);
  font-size: 15px; font-weight: 600;
  transition: background var(--dur);
}
.btn-skip:active { background: var(--border); }
.btn-next {
  flex: 2; padding: 14px; border-radius: var(--r-full);
  background: var(--primary); color: white;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(255,87,34,.35);
  transition: background var(--dur), transform var(--dur), box-shadow var(--dur);
}
.btn-next:active { background: var(--primary-dark); transform: scale(.97); box-shadow: none; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: AUTH / LOGIN                                   ── */
/* ── ═══════════════════════════════════════════════════════ ── */
#screen-auth {
  background: var(--surface);
  display: flex; flex-direction: column;
}
.auth-hero {
  background: linear-gradient(145deg, #FF5722, #BF360C);
  padding: 48px 24px 64px;
  text-align: center;
  clip-path: ellipse(120% 100% at 50% 0);
}
.auth-hero-icon { font-size: 60px; margin-bottom: 20px; line-height: 1; }
.auth-hero-icon img { display: block; margin: 0 auto; }
.auth-hero-title { font-size: 28px; font-weight: 900; color: white; margin-bottom: 6px; }
.auth-hero-sub { font-size: 14px; color: rgba(255,255,255,.8); }
.auth-form {
  flex: 1;
  padding: 32px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.input-group {
  display: flex; flex-direction: column; gap: 6px;
}
.input-label { font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; }
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface3); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 0 16px;
  transition: border-color var(--dur), box-shadow var(--dur);
  height: 52px;
}
.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,87,34,.12);
  background: var(--surface);
}
.input-prefix { font-size: 15px; color: var(--text3); font-weight: 600; white-space: nowrap; }
.input-wrap input {
  flex: 1; background: none; border: none;
  font-size: 16px; color: var(--text);
  height: 100%;
}
.input-wrap input::placeholder { color: var(--text4); }
.input-icon { font-size: 18px; color: var(--text4); }
.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 4px 16px rgba(255,87,34,.35);
  transition: background var(--dur), transform var(--dur), box-shadow var(--dur);
  margin-top: 8px;
}
.btn-primary:active { background: var(--primary-dark); transform: scale(.98); box-shadow: none; }
.btn-primary:disabled { background: var(--text4); box-shadow: none; cursor: not-allowed; }
.divider-text {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text4);
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.btn-social {
  width: 100%; padding: 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 15px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background var(--dur);
}
.btn-social:active { background: var(--surface3); }
.auth-terms { font-size: 12px; color: var(--text4); text-align: center; line-height: 1.6; margin-top: 8px; }
.auth-terms span { color: var(--primary); font-weight: 600; }

/* OTP Screen */
.otp-wrap { display: flex; gap: 12px; justify-content: center; }
.otp-input {
  width: 52px; height: 60px;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface3);
  text-align: center;
  font-size: 22px; font-weight: 700; color: var(--text);
  caret-color: var(--primary);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,87,34,.12);
  background: var(--surface);
}
.otp-resend { text-align: center; font-size: 14px; color: var(--text3); margin-top: 4px; }
.otp-resend span { color: var(--primary); font-weight: 600; }
.otp-timer { color: var(--text4); }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: HOME                                           ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.home-header {
  background: linear-gradient(135deg, #FF5722 0%, #BF360C 100%);
  padding: 16px 16px 56px;
  position: relative;
  overflow: hidden;
}
.home-header::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--bg);
  border-radius: 40px 40px 0 0;
}
.home-header-row1 {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.home-header-row1 .hdr-actions { display: flex; gap: 8px; }
.hdr-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
  position: relative;
  backdrop-filter: blur(8px);
  transition: background var(--dur);
}
.hdr-btn:active { background: rgba(255,255,255,.3); }
.hdr-btn .badge {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--accent);
  border-radius: 50%; font-size: 9px; font-weight: 800;
  color: var(--secondary);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent;
}
.home-location { display: flex; align-items: center; gap: 6px; }
.home-location .loc-label { font-size: 11px; color: rgba(255,255,255,.7); font-weight: 500; }
.home-location .loc-value {
  font-size: 14px; font-weight: 700; color: white;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-location .loc-arrow { color: rgba(255,255,255,.8); font-size: 12px; }
.home-user-name { font-size: 20px; font-weight: 800; color: white; margin-bottom: 4px; }
.home-user-sub { font-size: 14px; color: rgba(255,255,255,.75); }

/* Search Bar */
.search-bar-wrap {
  margin: -28px 16px 0;
  position: relative;
  z-index: 10;
}
.search-bar {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid var(--border2);
  transition: border-color var(--dur), box-shadow var(--dur);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 4px 20px rgba(255,87,34,.2); }
.search-icon { font-size: 18px; color: var(--text3); }
.search-input {
  flex: 1; border: none; background: none;
  font-size: 15px; color: var(--text);
}
.search-input::placeholder { color: var(--text4); }
.search-filter {
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--primary-bg); color: var(--primary);
  font-size: 13px; font-weight: 600;
}

/* Promo Banner */
.section-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.section-see-all { font-size: 13px; font-weight: 600; color: var(--primary); }
/* Promo carousel — transform-based, zero overflow so #app.scrollWidth stays at app width */
.promo-outer {
  position: relative;
  width: 100%;
  overflow: hidden;           /* clips the off-screen cards — no horizontal bleed */
  border-radius: var(--r-lg);
  height: 148px;
}
.promo-scroll {
  display: flex;
  width: 100%;
  transition: transform .4s var(--ease);
  will-change: transform;
}
.promo-card {
  flex-shrink: 0;
  width: 100%;                /* one full-width card visible at a time */
  height: 148px;
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: attr(data-emoji);
  position: absolute;
  right: -10px; bottom: -10px;
  font-size: 80px;
  opacity: .2;
  transform: rotate(-15deg);
}
.promo-title { font-size: 17px; font-weight: 800; color: white; line-height: 1.2; }
.promo-subtitle { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 4px; }
.promo-cta {
  display: inline-block;
  background: rgba(255,255,255,.25);
  color: white;
  font-size: 12px; font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--r-full);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
}
.promo-dots {
  display: flex; justify-content: center; gap: 5px;
  margin-top: 8px;
}
.promo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: background .3s, width .3s;
}
.promo-dot.active { background: var(--primary); width: 16px; border-radius: 3px; }

/* Service Categories Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.service-cat-card {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1.5px solid var(--border2);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.service-cat-card:active { transform: scale(.96); }
.service-cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.service-cat-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.service-cat-name {
  font-size: 11px; font-weight: 600; color: var(--text2);
  line-height: 1.3;
}
.service-cat-price { font-size: 10px; color: var(--text3); }
.service-cat-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--primary); color: white;
  font-size: 8px; font-weight: 700;
  padding: 2px 6px; border-radius: var(--r-full);
}

/* Painter Cards */
.painters-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 4px 2px 8px;
  scrollbar-width: none;
}
.painters-scroll::-webkit-scrollbar { display: none; }
.painter-card {
  flex-shrink: 0; width: 140px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 16px 12px;
  border: 1.5px solid var(--border2);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.painter-card:active { opacity: .85; }
.painter-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface3);
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  border: 2px solid var(--primary-light);
  position: relative;
}
.painter-online-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--success);
  border: 2px solid var(--surface);
}
.painter-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.painter-rating { font-size: 11px; color: var(--text3); display: flex; align-items: center; justify-content: center; gap: 2px; }
.painter-rating .star { color: var(--accent); }
.painter-eta { font-size: 11px; color: var(--primary); font-weight: 600; margin-top: 4px; }
.painter-badge {
  font-size: 9px; font-weight: 700;
  background: var(--primary-bg); color: var(--primary);
  padding: 3px 8px; border-radius: var(--r-full);
  margin-top: 6px; display: inline-block;
}

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: SERVICES LIST                                  ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.service-list-hero {
  background: linear-gradient(135deg, #FF5722, #BF360C);
  padding: 20px 16px 48px;
  position: relative;
}
.service-list-hero::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 32px; background: var(--bg);
  border-radius: 32px 32px 0 0;
}
.service-list-hero-emoji { font-size: 48px; margin-bottom: 8px; }
.service-list-hero-title { font-size: 22px; font-weight: 800; color: white; }
.service-list-hero-sub { font-size: 13px; color: rgba(255,255,255,.8); margin-top: 4px; }
.filter-tabs {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 0;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0;
  padding: 7px 16px; border-radius: var(--r-full);
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text3);
  transition: all var(--dur);
  cursor: pointer;
}
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: white; }
.filter-tab:active { opacity: .8; }
.sub-service-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--border2);
  cursor: pointer;
  transition: border-color var(--dur), box-shadow var(--dur);
  margin-bottom: 10px;
}
.sub-service-card:active { opacity: .85; }
.sub-service-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,87,34,.15); }
.sub-service-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: var(--r-md);
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.sub-service-info { flex: 1; }
.sub-service-name { font-size: 15px; font-weight: 700; color: var(--text); }
.sub-service-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }
.sub-service-price {
  font-size: 15px; font-weight: 800; color: var(--primary);
  white-space: nowrap;
}
.sub-service-unit { font-size: 10px; color: var(--text3); text-align: right; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: SERVICE DETAIL                                 ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.service-detail-hero {
  height: 220px;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
  position: relative;
}
.rating-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text3);
}
.rating-stars { color: var(--accent); letter-spacing: -1px; }
.rating-count { color: var(--text4); }
.includes-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.includes-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--text2);
}
.includes-list li::before {
  content: '✓';
  width: 22px; height: 22px;
  background: var(--success-bg); color: var(--success);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; flex-shrink: 0;
}
.price-calc-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  border: 1.5px solid var(--border2);
}
.price-calc-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.price-calc-label { font-size: 14px; color: var(--text2); font-weight: 500; }
.stepper {
  display: flex; align-items: center; gap: 12px;
}
.stepper-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface3); border: 1.5px solid var(--border);
  font-size: 18px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur);
}
.stepper-btn:active { background: var(--border); }
.stepper-btn:disabled { color: var(--text4); cursor: not-allowed; }
.stepper-val { font-size: 16px; font-weight: 700; color: var(--text); min-width: 24px; text-align: center; }
.area-input-wrap {
  display: flex; align-items: center;
  background: var(--surface3); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); overflow: hidden;
  width: 110px;
}
.area-input {
  width: 70px; padding: 6px 8px;
  background: none; border: none;
  font-size: 16px; font-weight: 700; color: var(--text);
  text-align: center;
}
.area-unit {
  padding: 0 8px; font-size: 12px;
  color: var(--text3); font-weight: 600;
  background: var(--border2);
  height: 100%; display: flex; align-items: center;
}
.price-total-row {
  border-top: 1px dashed var(--border);
  padding-top: 12px; margin-top: 4px;
  display: flex; justify-content: space-between; align-items: center;
}
.price-total-label { font-size: 13px; color: var(--text3); }
.price-total-value { font-size: 24px; font-weight: 900; color: var(--primary); }
.price-note { font-size: 11px; color: var(--text4); margin-top: 4px; }
.sticky-book-bar {
  position: sticky; bottom: 0; z-index: 50;
  background: var(--surface);
  padding: 12px 16px calc(var(--nav-h) + var(--safe-bottom) + 8px);
  border-top: 1px solid var(--border2);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.book-bar-row {
  display: flex; align-items: center; gap: 12px;
}
.book-bar-price { flex: 1; }
.book-bar-price-label { font-size: 11px; color: var(--text4); }
.book-bar-price-value { font-size: 22px; font-weight: 900; color: var(--text); }
.book-bar-price-sub { font-size: 11px; color: var(--text3); }
.btn-book {
  flex: 1.4;
  padding: 14px 20px;
  border-radius: var(--r-full);
  background: var(--primary); color: white;
  font-size: 16px; font-weight: 800;
  box-shadow: 0 4px 16px rgba(255,87,34,.35);
  transition: all var(--dur);
}
.btn-book:active { background: var(--primary-dark); transform: scale(.97); box-shadow: none; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── BOOKING FLOW STEPS                                     ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.step-indicator {
  display: flex; align-items: center; gap: 0;
  padding: 16px 16px 0;
}
.step-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute; top: 12px; left: calc(50% + 12px);
  right: calc(-50% + 12px);
  height: 2px; background: var(--border);
  z-index: 0;
  transition: background .4s;
}
.step-item.done::after,
.step-item.active::after { background: var(--primary); }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--border); color: var(--text3);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  z-index: 1; position: relative;
  transition: background .3s, color .3s;
}
.step-item.active .step-dot { background: var(--primary); color: white; box-shadow: 0 0 0 3px rgba(255,87,34,.2); }
.step-item.done .step-dot { background: var(--success); color: white; }
.step-item.done .step-dot::after { content: '✓'; }
.step-label { font-size: 10px; color: var(--text4); font-weight: 500; text-align: center; }
.step-item.active .step-label { color: var(--primary); font-weight: 700; }
.step-item.done .step-label { color: var(--success); }

/* Address input placeholder (no map) */

.address-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--dur);
}
.address-row:active { opacity: .85; }
.address-icon { font-size: 22px; flex-shrink: 0; }
.address-info { flex: 1; }
.address-label { font-size: 11px; color: var(--text4); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.address-value { font-size: 14px; color: var(--text); font-weight: 500; line-height: 1.4; }
.address-change { font-size: 12px; color: var(--primary); font-weight: 700; margin-top: 4px; }
.address-row.active { border-color: var(--primary); }

/* Date Time Picker */
.date-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.date-chip {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 6px;
  text-align: center; cursor: pointer;
  transition: all var(--dur);
}
.date-chip:active { opacity: .8; }
.date-chip.selected { background: var(--primary); border-color: var(--primary); color: white; }
.date-chip-day { font-size: 10px; color: var(--text4); text-transform: uppercase; font-weight: 600; }
.date-chip.selected .date-chip-day { color: rgba(255,255,255,.8); }
.date-chip-num { font-size: 18px; font-weight: 700; color: var(--text); }
.date-chip.selected .date-chip-num { color: white; }

.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.time-chip {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 10px 8px;
  text-align: center; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text2);
  transition: all var(--dur);
}
.time-chip.selected { background: var(--primary); border-color: var(--primary); color: white; }
.time-chip.disabled { opacity: .4; cursor: not-allowed; }
.time-chip:not(.disabled):active { opacity: .8; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: SELECT PAINTER                                 ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.finding-wrap {
  padding: 40px 24px;
  text-align: center;
}
.radar {
  width: 180px; height: 180px;
  border-radius: 50%;
  margin: 0 auto 24px;
  background: radial-gradient(circle, var(--primary-bg) 30%, transparent 70%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.radar::before, .radar::after {
  content: '';
  position: absolute; border-radius: 50%;
  border: 2px solid var(--primary);
  animation: radarPulse 2s ease-out infinite;
}
.radar::before { inset: 20px; animation-delay: .5s; }
.radar::after  { inset: 40px; animation-delay: 1s; }
.radar-ring-1, .radar-ring-2 {
  position: absolute; border-radius: 50%;
  border: 2px solid var(--primary);
  animation: radarPulse 2s ease-out infinite;
  opacity: 0;
}
.radar-ring-1 { inset: -20px; }
.radar-ring-2 { inset: -40px; animation-delay: .7s; }
@keyframes radarPulse {
  0%   { transform: scale(.8); opacity: .6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.radar-center { font-size: 40px; z-index: 1; animation: radarBounce 1s ease-in-out infinite; }
@keyframes radarBounce { 0%,100%{ transform: scale(1) } 50%{ transform: scale(1.15) } }
.finding-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.finding-sub   { font-size: 14px; color: var(--text3); margin-bottom: 32px; }

/* Painter Select Card */
.painter-select-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 20px;
  border: 2px solid var(--border2);
  cursor: pointer;
  transition: all var(--dur);
  margin-bottom: 12px;
}
.painter-select-card:active { opacity: .9; }
.painter-select-card.selected { border-color: var(--primary); background: var(--primary-bg); }
.painter-select-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.painter-select-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  border: 3px solid var(--primary-light);
  flex-shrink: 0; position: relative;
}
.painter-select-info { flex: 1; }
.painter-select-name { font-size: 16px; font-weight: 700; color: var(--text); }
.painter-select-exp  { font-size: 12px; color: var(--text3); margin-top: 2px; }
.painter-select-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text3); margin-top: 4px;
}
.painter-select-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.meta-chip {
  background: var(--surface3); border-radius: var(--r-full);
  padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
}
.meta-chip.green { background: var(--success-bg); color: var(--success); }
.meta-chip.blue  { background: var(--info-bg); color: var(--info); }
.meta-chip.orange { background: var(--primary-bg); color: var(--primary); }
.painter-select-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.ps-price { font-size: 18px; font-weight: 800; color: var(--text); }
.ps-price-note { font-size: 10px; color: var(--text3); }
.ps-eta { font-size: 14px; font-weight: 700; color: var(--primary); }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: TRACKING                                       ── */
/* ── ═══════════════════════════════════════════════════════ ── */
#screen-tracking {
  background: var(--bg);
}

/* ETA Banner – replaces map */
.tracking-eta-banner {
  background: linear-gradient(135deg, #FF5722, #BF360C);
  padding: 28px 20px;
  display: flex; align-items: center; gap: 20px;
}
.eta-pulse {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.eta-rings {
  position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3);
  animation: etaRingPulse 1.6s ease-out infinite;
}
.eta-rings::before {
  content: '';
  position: absolute; inset: -10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  animation: etaRingPulse 1.6s ease-out .5s infinite;
}
@keyframes etaRingPulse {
  0%   { transform: scale(.85); opacity: .8; }
  100% { transform: scale(1.4);  opacity: 0;  }
}
.eta-icon { font-size: 34px; z-index: 1; }
.eta-title { font-size: 18px; font-weight: 800; color: white; margin-bottom: 4px; }
.eta-sub   { font-size: 14px; color: rgba(255,255,255,.85); }
.eta-sub b { color: white; }

.tracking-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  margin: 12px;
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border2);
}
.tracking-painter-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.tracking-painter-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface3); font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--primary);
}
.tracking-painter-name { font-size: 16px; font-weight: 700; }
.tracking-painter-rating { font-size: 12px; color: var(--text3); }
.tracking-painter-actions { margin-left: auto; display: flex; gap: 8px; }
.action-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: background var(--dur);
}
.action-btn:active { background: var(--surface3); }
.action-btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.tracking-status-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.tracking-status-sub   { font-size: 14px; color: var(--text3); margin-bottom: 20px; }
.tracking-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 12px;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute; left: 11px; top: 24px;
  width: 2px; height: calc(100% - 8px);
  background: var(--border);
}
.timeline-item.done::before { background: var(--success); }
.timeline-dot {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--border); color: var(--text4);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; z-index: 1;
  transition: background .3s;
}
.timeline-item.done .timeline-dot { background: var(--success); color: white; }
.timeline-item.active .timeline-dot {
  background: var(--primary); color: white;
  box-shadow: 0 0 0 3px rgba(255,87,34,.2);
  animation: pulseRing 1.5s ease infinite;
}
@keyframes pulseRing { 0%,100%{ box-shadow: 0 0 0 3px rgba(255,87,34,.2) } 50%{ box-shadow: 0 0 0 6px rgba(255,87,34,.08) } }
.timeline-body { padding: 2px 0 20px; }
.timeline-label { font-size: 14px; font-weight: 600; color: var(--text); }
.timeline-time  { font-size: 12px; color: var(--text3); margin-top: 1px; }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: MY BOOKINGS                                    ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.tab-bar {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border2);
  padding: 0 16px;
  position: sticky; top: 60px; z-index: 10;
}
.tab-item {
  flex: 1; padding: 14px 8px;
  text-align: center; font-size: 13px; font-weight: 600;
  color: var(--text3);
  border-bottom: 2px solid transparent;
  transition: color var(--dur), border-color var(--dur);
  cursor: pointer;
}
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-item:active { opacity: .7; }
.booking-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1.5px solid var(--border2);
  margin-bottom: 12px;
  cursor: pointer;
  transition: box-shadow var(--dur);
}
.booking-card:active { opacity: .9; }
.booking-card:hover { box-shadow: var(--shadow-sm); }
.booking-card-header {
  padding: 14px 16px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.booking-id { font-size: 11px; color: var(--text4); font-weight: 600; }
.booking-status-badge {
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
}
.booking-card-body { padding: 12px 16px; }
.booking-service-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.booking-service-icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--primary-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.booking-service-name { font-size: 15px; font-weight: 700; color: var(--text); }
.booking-service-sub  { font-size: 12px; color: var(--text3); }
.booking-meta-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.booking-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text3);
}
.booking-card-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between;
}
.booking-price { font-size: 18px; font-weight: 800; color: var(--text); }
.booking-footer-actions { display: flex; gap: 8px; }
.btn-outline {
  padding: 7px 14px; border-radius: var(--r-full);
  border: 1.5px solid var(--border); color: var(--text2);
  font-size: 12px; font-weight: 600;
  background: var(--surface);
  transition: all var(--dur);
}
.btn-outline:active { background: var(--surface3); }
.btn-outline.primary { border-color: var(--primary); color: var(--primary); }
.btn-sm {
  padding: 8px 16px; border-radius: var(--r-full);
  background: var(--primary); color: white;
  font-size: 13px; font-weight: 700;
  transition: all var(--dur);
}
.btn-sm:active { background: var(--primary-dark); transform: scale(.97); }

/* Stars Rating */
.stars-rate { display: flex; gap: 4px; }
.star-btn {
  font-size: 28px; color: var(--border); cursor: pointer;
  transition: color .2s, transform .2s;
}
.star-btn:active { transform: scale(1.2); }
.star-btn.active { color: var(--accent); }

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── SCREEN: PROFILE                                        ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.profile-header {
  background: linear-gradient(135deg, #FF5722, #BF360C);
  padding: 32px 16px 64px;
  text-align: center; position: relative;
}
.profile-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 36px; background: var(--bg);
  border-radius: 36px 36px 0 0;
}
.profile-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  border: 4px solid rgba(255,255,255,.4);
  position: relative;
  backdrop-filter: blur(8px);
}
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: white; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.profile-name { font-size: 22px; font-weight: 800; color: white; margin-bottom: 4px; }
.profile-phone { font-size: 14px; color: rgba(255,255,255,.8); }
.profile-stats-row {
  display: flex; background: var(--surface);
  border-radius: var(--r-lg); overflow: hidden;
  border: 1.5px solid var(--border2);
  box-shadow: var(--shadow-sm);
}
.profile-stat {
  flex: 1; padding: 16px 8px; text-align: center;
  border-right: 1px solid var(--border2);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-val { font-size: 20px; font-weight: 900; color: var(--primary); }
.profile-stat-label { font-size: 11px; color: var(--text3); font-weight: 500; margin-top: 2px; }
.menu-section { margin-bottom: 8px; }
.menu-section-title { font-size: 11px; font-weight: 700; color: var(--text4); text-transform: uppercase; letter-spacing: .8px; padding: 12px 16px 4px; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  background: var(--surface);
  cursor: pointer;
  transition: background var(--dur);
  border-bottom: 1px solid var(--border2);
}
.menu-item:active { background: var(--surface3); }
.menu-item:first-of-type { border-radius: var(--r-md) var(--r-md) 0 0; }
.menu-item:last-of-type { border-bottom: none; border-radius: 0 0 var(--r-md) var(--r-md); }
.menu-icon {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.menu-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.menu-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.menu-arrow { color: var(--text4); font-size: 14px; }
.menu-badge {
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: var(--r-full);
}
.toggle {
  width: 46px; height: 26px;
  border-radius: var(--r-full);
  background: var(--border);
  position: relative; cursor: pointer;
  transition: background var(--dur);
  flex-shrink: 0;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-xs);
  transition: left var(--dur) var(--ease);
}
.toggle.on::after { left: 23px; }

/* ── Notifications Screen ──────────────────────────────── */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  transition: background var(--dur);
  position: relative;
}
.notif-item:active { background: var(--surface3); }
.notif-item.unread { background: var(--primary-bg); }
.notif-item.unread::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.notif-icon-wrap {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.notif-content { flex: 1; }
.notif-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.notif-body  { font-size: 13px; color: var(--text3); line-height: 1.5; }
.notif-time  { font-size: 11px; color: var(--text4); margin-top: 4px; }

/* ── Review Screen ────────────────────────────────────────── */
.review-hero {
  text-align: center; padding: 32px 24px;
  background: var(--surface);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  margin-bottom: 16px;
}
.review-hero-icon { font-size: 64px; margin-bottom: 12px; }
.review-hero-title { font-size: 22px; font-weight: 800; color: var(--text); }
.review-hero-sub   { font-size: 14px; color: var(--text3); margin-top: 6px; }

/* ── Confirmation Screen ─────────────────────────────────── */
.confirm-screen { text-align: center; padding: 40px 24px; }
.confirm-icon {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--success-bg);
  margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
  animation: confirmPop .5s var(--ease) both;
}
@keyframes confirmPop { 0%{ transform:scale(.5);opacity:0 } 70%{ transform:scale(1.1) } 100%{ transform:scale(1);opacity:1 } }
.confirm-title { font-size: 26px; font-weight: 900; color: var(--text); margin-bottom: 8px; }
.confirm-sub   { font-size: 15px; color: var(--text3); line-height: 1.6; margin-bottom: 32px; }
.confirm-order-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  border: 1.5px solid var(--border2);
  text-align: left;
  margin-bottom: 24px;
}

/* ── ═══════════════════════════════════════════════════════ ── */
/* ── UTILITY / SHARED                                       ── */
/* ── ═══════════════════════════════════════════════════════ ── */
.section { padding: 20px 16px 0; }
.section + .section { padding-top: 16px; }
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  border: 1.5px solid var(--border2);
  box-shadow: var(--shadow-xs);
}
.card + .card { margin-top: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.p-16  { padding: 16px; }
.pb-nav { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text3); }
.text-sm      { font-size: 13px; }
.text-xs      { font-size: 11px; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.full-w { width: 100%; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.rounded { border-radius: var(--r-md); }
.rounded-full { border-radius: var(--r-full); }

/* Empty State */
.empty-state {
  text-align: center; padding: 60px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 64px; opacity: .5; }
.empty-title { font-size: 18px; font-weight: 700; color: var(--text); }
.empty-desc  { font-size: 14px; color: var(--text3); line-height: 1.6; }

/* Toast */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  max-width: 90%; min-width: 200px;
  background: var(--secondary); color: white;
  padding: 12px 20px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none; z-index: 9999;
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { background: var(--success); }
#toast.danger  { background: var(--danger); }
#toast.warning { background: var(--warning); color: var(--secondary); }
#toast.info    { background: var(--info); }

/* Install Banner — Bottom Sheet */
#install-banner {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 0 0 calc(20px + var(--safe-bottom));
  box-shadow: 0 -12px 48px rgba(0,0,0,.35);
  z-index: 2000;
  transition: transform .4s cubic-bezier(.32,1.2,.64,1);
}
#install-banner.hidden { display: none; }
#install-banner.slide-up  { transform: translateX(-50%) translateY(0); }
#install-banner.slide-down { transform: translateX(-50%) translateY(110%); }

/* sheet drag handle */
.install-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 12px auto 0;
}
/* sheet body */
.install-sheet-body {
  padding: 20px 24px 4px;
  text-align: center;
}
.install-sheet-logo {
  width: 72px; height: 72px;
  background: white;
  border-radius: 18px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  padding: 10px;
}
.install-sheet-logo img { width: 100%; height: 100%; object-fit: contain; }
.install-sheet-title {
  font-size: 20px; font-weight: 800; color: var(--text);
  margin-bottom: 6px;
}
.install-sheet-sub {
  font-size: 14px; color: var(--text3); line-height: 1.5;
  margin-bottom: 20px;
}
.install-sheet-features {
  display: flex; justify-content: center; gap: 24px;
  margin-bottom: 24px;
}
.install-sheet-feat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.install-sheet-feat-icon { font-size: 22px; }
.install-sheet-feat-label { font-size: 11px; color: var(--text3); font-weight: 500; }
.btn-install {
  width: 100%; padding: 16px;
  background: var(--primary); color: white;
  border-radius: var(--r-full);
  font-size: 16px; font-weight: 800;
  letter-spacing: .3px;
  transition: background var(--dur), transform .1s;
  box-shadow: 0 4px 16px rgba(255,87,34,.4);
}
.btn-install:active { background: var(--primary-dark); transform: scale(.98); }
.btn-install-close {
  width: 100%; padding: 14px;
  background: none; border: none;
  font-size: 14px; color: var(--text3);
  cursor: pointer; margin-top: 4px;
}
.btn-install-close:active { color: var(--text); }

/* Update Banner */
#update-banner {
  position: fixed; top: var(--safe-top);
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--secondary); color: white;
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 2000; font-size: 13px;
}
#update-banner span { flex: 1; }
#update-btn {
  padding: 6px 14px; border-radius: var(--r-full);
  background: var(--primary); color: white;
  font-size: 12px; font-weight: 700;
}

/* Offline Bar */
#offline-bar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--danger); color: white;
  text-align: center; padding: 8px; font-size: 13px; font-weight: 600;
  z-index: 2000;
}

/* iOS Install Tip */
#ios-install-tip {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--secondary); color: white;
  border-radius: var(--r-lg); padding: 14px 16px;
  font-size: 13px; line-height: 1.5; text-align: center;
  max-width: calc(100% - 32px); z-index: 900;
  box-shadow: var(--shadow-xl);
}
#ios-install-tip::after {
  content: '▼'; position: absolute; bottom: -16px;
  left: 50%; transform: translateX(-50%);
  color: var(--secondary); font-size: 16px;
}

/* ── Loader ────────────────────────────────────────────────── */
.loader-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.loader {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ── Skeleton ──────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface3) 25%, var(--border2) 50%, var(--surface3) 75%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0%{ background-position:200% 0 } 100%{ background-position:-200% 0 } }

/* ── Number Input ──────────────────────────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ── Textarea ──────────────────────────────────────────────── */
.textarea {
  width: 100%; min-height: 90px; resize: none;
  background: var(--surface3); border: 1.5px solid var(--border);
  border-radius: var(--r-md); padding: 12px 14px;
  font-size: 14px; color: var(--text); line-height: 1.5;
  transition: border-color var(--dur);
}
.textarea:focus { border-color: var(--primary); background: var(--surface); }
.textarea::placeholder { color: var(--text4); }

/* ── Bottom Sheet ──────────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 500;
  opacity: 0; transition: opacity var(--dur);
  pointer-events: none;
}
.sheet-overlay.open { opacity: 1; pointer-events: all; }
.bottom-sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 600; padding: 0 0 calc(16px + var(--safe-bottom));
  transition: transform .35s var(--ease);
  max-height: 85dvh;
  overflow-y: auto;
}
.bottom-sheet.open { transform: translateX(-50%) translateY(0); }
.sheet-handle {
  width: 36px; height: 4px; background: var(--border);
  border-radius: var(--r-full); margin: 12px auto 4px;
}
.sheet-title {
  font-size: 17px; font-weight: 800;
  padding: 12px 16px 0; margin-bottom: 4px;
}
.sheet-body { padding: 12px 20px 8px; }
.loc-chip {
  padding: 7px 14px; border-radius: var(--r-full);
  background: var(--bg2); border: 1.5px solid var(--border2);
  font-size: 13px; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .15s;
}
.loc-chip:active, .loc-chip.selected {
  background: var(--primary); border-color: var(--primary);
  color: white;
}

/* Make home-location tappable */
.home-location { cursor: pointer; }
.home-location:active { opacity: .7; }

/* ── Pull-to-Refresh ───────────────────────────────────────── */
.ptr-indicator {
  position: absolute; top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-100%);
  transition: transform var(--dur);
  font-size: 20px;
  color: var(--primary);
}

/* ── Transitions ───────────────────────────────────────────── */
.slide-up   { animation: slideUp   .35s var(--ease) both; }
.slide-down { animation: slideDown .35s var(--ease) both; }
.fade-in    { animation: fadeIn    .3s  var(--ease) both; }
.pop-in     { animation: popIn     .35s var(--ease) both; }

@keyframes slideUp   { from{transform:translateY(100%);opacity:0} to{transform:none;opacity:1} }
@keyframes slideDown { from{transform:none;opacity:1} to{transform:translateY(100%);opacity:0} }
@keyframes fadeIn    { from{opacity:0} to{opacity:1} }
@keyframes popIn     { from{transform:scale(.85);opacity:0} to{transform:scale(1);opacity:1} }

/* ── Desktop frame ─────────────────────────────────────────── */
@media (min-width: 520px) {
  body { background: #E0E0E0; display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: hidden; }
  #app { border-radius: 40px; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
  #bottom-nav { border-radius: 0 0 40px 40px; }
}

/* ── Standalone adjustments ────────────────────────────────── */
.standalone .home-header { padding-top: calc(16px + var(--safe-top)); }
.standalone .topbar { padding-top: calc(12px + var(--safe-top)); height: calc(var(--top-h) + var(--safe-top)); }
