/* ============================================================
   Handyman Pro — vanilla CSS design system
   (port of the Tailwind-styled React app; light/dark via vars)
   ============================================================ */

:root {
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --teal-500: #00a884;
  --teal-600: #0d9488;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-850: #172033;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --cream: #FFFDF0;

  --bg: var(--cream);
  --text: var(--slate-900);
  --card: #ffffff;
  --card-border: #d1ece6;
  --muted: var(--slate-500);
  --input-bg: var(--slate-50);
  --input-border: #d1ece6;
}

html.dark {
  --bg: var(--slate-900);
  --text: var(--slate-100);
  --card: var(--slate-800);
  --card-border: var(--slate-700);
  --muted: var(--slate-400);
  --input-bg: var(--slate-800);
  --input-border: var(--slate-700);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.min-h-screen { min-height: 100vh; }
.flex-1 { flex: 1; }

.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }

.section-pad { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-8 { padding: 2rem 0; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* ---------- Utilities ---------- */
.rtl\:right-0, .ltr\:left-0 { display: none; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.grid { display: grid; }
.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
html[dir="rtl"] .text-right { text-align: right; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.text-slate-300 { color: var(--slate-300); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--muted); }
.text-white { color: #fff; }
.text-amber-300 { color: var(--amber-400); }
.text-amber-400 { color: var(--amber-400); }
.text-amber-500 { color: var(--amber-500); }
.text-emerald-400 { color: var(--emerald-400); }
.text-sky-400 { color: var(--sky-400); }

.bg-white { background: #fff; }
.bg-amber-500 { background: var(--amber-500); }
.bg-slate-900 { background: var(--slate-900); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1;
}
.btn svg { width: 1rem; height: 1rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-amber {
  background: var(--orange-500);
  color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px -2px rgba(249, 115, 22, 0.4);
}
.btn-amber:hover { filter: brightness(1.05); }

.btn-dark-ghost { background: rgba(30, 41, 59, 0.9); border-color: var(--slate-600); color: #fff; }
.btn-dark-ghost:hover { background: var(--slate-700); }

.btn-outline { background: transparent; border-color: var(--card-border); color: var(--text); }
.btn-outline:hover { background: var(--input-bg); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.75rem; }

/* ---------- Top bar ---------- */
.topbar {
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600), var(--amber-700));
  color: #fffbeb;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 1rem;
}
html[dir="rtl"] .topbar .flex { flex-direction: row-reverse; }
.topbar .flame { color: #fde047; animation: pulse 1.8s infinite; display: inline-flex; }
.brand-hotline a { color: #fef3c7; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  color: var(--text);
  border-bottom: 1px solid #d1ece6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.logo-mark img { display: block; width: 100%; height: 100%; }
.logo-mark svg { width: 1.25rem; height: 1.25rem; }
.brand-name { font-weight: 800; color: var(--slate-900); letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-name em { font-style: normal; color: var(--orange-500); }
.brand-tagline { font-size: 0.55rem; color: var(--muted); margin-top: 0.1rem; line-height: 1.1; }

.nav-tabs { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 900px) { .nav-tabs { display: flex; } }
.nav-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem; font-weight: 500;
  color: var(--slate-600);
  background: transparent; border: 1px solid transparent;
  transition: all 0.15s;
}
.nav-tab:hover { color: var(--slate-900); background: #e6f7f2; border-color: #d1ece6; }
.nav-tab.active { background: var(--orange-500); color: #fff; border-color: var(--orange-500); }
.nav-tab.active-ai { background: var(--teal-500); color: #fff; border-color: var(--teal-500); }
.nav-tab svg { width: 1rem; height: 1rem; }

.header-actions { display: none; align-items: center; gap: 0.5rem; }
@media (min-width: 900px) { .header-actions { display: flex; } }
.icon-btn {
  position: relative;
  background: #fff;
  border: 1px solid #d1ece6;
  border-radius: 999px;
  color: var(--slate-600);
  padding: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.icon-btn:hover { background: #e6f7f2; color: var(--teal-600); }
.icon-btn svg { width: 1.05rem; height: 1.05rem; }
.icon-btn .badge {
  position: absolute; top: -0.35rem; right: -0.35rem;
  min-width: 1.1rem; height: 1.1rem;
  background: var(--orange-500); color: #fff;
  border-radius: 999px; font-size: 0.65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0.2rem;
}
html[dir="rtl"] .icon-btn .badge { right: auto; left: -0.35rem; }

.header-login-btn .btn, .header-register-btn .btn { font-size: 0.8rem; }

/* Mobile header */
.mobile-header-actions { display: flex; align-items: center; gap: 0.5rem; }
/* Desktop: hide the mobile-only actions + hamburger so the header shows a
   single set of controls. !important guards against stray inline display rules. */
@media (min-width: 900px) {
  .mobile-header-actions { display: none !important; }
  .mobile-menu-toggle { display: none !important; }
}
.mobile-menu-toggle { background: #fff; border: 1px solid #d1ece6; color: var(--slate-600); border-radius: 0.5rem; padding: 0.45rem; display: inline-flex; }
.mobile-menu-toggle svg { width: 1.2rem; height: 1.2rem; }

.mobile-drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.3);
  display: flex; justify-content: flex-end;
}
html[dir="rtl"] .mobile-drawer { justify-content: flex-start; }
.mobile-drawer-panel {
  width: min(20rem, 85vw);
  background: #fff;
  color: var(--text);
  height: 100%;
  padding: 1rem;
  border-left: 1px solid #d1ece6;
  display: flex; flex-direction: column; gap: 0.5rem;
  animation: slide-in 0.2s ease;
}
html[dir="rtl"] .mobile-drawer-panel { border-left: none; border-right: 1px solid #d1ece6; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: #fff;
  color: var(--text);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("/images/hero_handyman_banner_1786465838228.jpg");
  background-size: cover; background-position: center;
  opacity: 0.25;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,253,240,0.95), rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.3));
}
.hero-content { position: relative; max-width: 80rem; margin: 0 auto; padding: 3rem 1rem 2rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #e6f7f2;
  border: 1px solid #d1ece6;
  color: var(--teal-600);
  font-size: 0.75rem; font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.hero h1 span { color: var(--orange-500); }
.hero-sub { color: var(--muted); margin-top: 0.6rem; font-size: 0.95rem; max-width: 42rem; line-height: 1.6; }

.hero-search {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid #d1ece6;
  border-radius: 1rem;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.08);
}
@media (min-width: 900px) { .hero-search { flex-direction: row; align-items: center; } }
.hero-search .field { flex: 1; position: relative; min-width: 0; }
.hero-search input, .hero-search select {
  width: 100%;
  background: var(--slate-50);
  border: 1px solid #d1ece6;
  color: var(--text);
  padding: 0.7rem 0.9rem 0.7rem 2.2rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
}
.hero-search input::placeholder { color: var(--slate-400); }
.hero-search .input-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); display: flex; }
html[dir="rtl"] .hero-search .input-icon { left: auto; right: 0.7rem; }
html[dir="rtl"] .hero-search input { padding-left: 0.9rem; padding-right: 2.2rem; }
html[dir="rtl"] .hero-search select { padding-left: 0.9rem; }

.hero-cats {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
@media (min-width: 640px) { .hero-cats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .hero-cats { grid-template-columns: repeat(5, 1fr); } }
.hero-cat {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(255,255,255,0.8);
  border: 1px solid #d1ece6;
  border-radius: 0.9rem;
  padding: 0.6rem 0.85rem;
  color: var(--slate-700);
  font-size: 0.8rem; font-weight: 600;
  transition: all 0.15s;
  position: relative;
}
.hero-cat:hover { transform: translateY(-1px); border-color: var(--teal-500); }
.hero-cat .chip {
  width: 2rem; height: 2rem; border-radius: 0.6rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hero-cat .chip svg { width: 1.1rem; height: 1.1rem; }
.hero-cat-hot { position: absolute; top: 0.3rem; right: 0.5rem; color: var(--orange-500); display: flex; align-items: center; }
html[dir="rtl"] .hero-cat-hot { right: auto; left: 0.5rem; }
.hero-cat-hot svg { width: 0.9rem; height: 0.9rem; }

.hero-stats {
  margin-top: 2rem;
  background: #e6f7f2;
  border-top: 1px solid #d1ece6;
  border-bottom: 1px solid #d1ece6;
  padding: 1.1rem 1rem;
}
.hero-stats .grid {
  max-width: 80rem; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 900px) { .hero-stats .grid { grid-template-columns: repeat(4, 1fr); } }
.stat .num { font-size: 1.35rem; font-weight: 800; }
.stat .lbl { font-size: 0.7rem; color: var(--slate-400); margin-top: 0.15rem; }
html[dir="rtl"] .stat-amber { color: var(--orange-500); }

/* ---------- Section headers ---------- */
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head .pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #e6f7f2;
  color: var(--teal-600);
  border: 1px solid #d1ece6;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.3rem 0.85rem; border-radius: 999px;
}
html.dark .section-head .pill { color: var(--amber-400); }
.section-head h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.5rem; }
.section-head p { color: var(--muted); margin-top: 0.4rem; font-size: 0.9rem; max-width: 40rem; margin-left: auto; margin-right: auto; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }

.cat-card {
  background: var(--card);
  border: 2px solid #d1ece6;
  border-radius: 1.25rem;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px -8px rgba(0,0,0,0.1); }
.cat-card-img { height: 9rem; position: relative; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-img .shade { position: absolute; inset: 0; background: linear-gradient(to top, #020617, transparent 70%); }
.cat-card-badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(15,23,42,0.85);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem; font-weight: 700;
  padding: 0.25rem 0.6rem;
  z-index: 2;
  white-space: nowrap;
  max-width: calc(100% - 3rem);
  overflow: hidden;
}
html[dir="rtl"] .cat-card-badge { left: auto; right: 0.7rem; }
.cat-card-trend { position: absolute; top: 0.7rem; left: 0.7rem; color: #fff; background: var(--orange-500); border-radius: 999px; padding: 0.25rem 0.55rem; font-size: 0.62rem; font-weight: 700; display: flex; align-items: center; gap: 0.25rem; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
html[dir="rtl"] .cat-card-trend { left: auto; right: 0.7rem; }
.cat-card-24h { position: absolute; top: 0.7rem; right: 0.7rem; color: var(--orange-500); background: #fff; border: 1px solid #d1ece6; border-radius: 999px; padding: 0.25rem 0.5rem; font-size: 0.62rem; font-weight: 700; display: flex; align-items: center; gap: 0.25rem; }
html[dir="rtl"] .cat-card-24h { right: auto; left: 0.7rem; }
.cat-card-badge svg { width: 0.8rem; height: 0.8rem; }
.cat-card-title { position: absolute; bottom: 0.6rem; left: 0.9rem; right: 0.9rem; color: #fff; font-weight: 800; font-size: 1.05rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); z-index: 3; line-height: 1.2; }
.cat-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.cat-card-desc { color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.cat-card-jobs { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.job-pill { background: var(--input-bg); border: 1px solid var(--input-border); color: var(--muted); font-size: 0.65rem; padding: 0.25rem 0.6rem; border-radius: 999px; }
.cat-card-subs { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sub-pill { display: inline-flex; align-items: center; gap: 0.25rem; background: var(--teal-50); border: 1px solid #c7ece6; color: var(--teal-700); font-size: 0.68rem; font-weight: 600; padding: 0.3rem 0.6rem; border-radius: 999px; cursor: pointer; transition: all 0.15s; }
.sub-pill:hover { background: var(--teal-500); color: #fff; border-color: var(--teal-500); }
html[dir="rtl"] .sub-pill { flex-direction: row-reverse; }
.cat-card-rate { display: flex; align-items: center; justify-content: space-between; margin-top: 0.85rem; font-size: 0.75rem; }
.cat-card-rate b { color: var(--teal-600); }
.cat-card-btn { margin-top: 0.9rem; width: 100%; }

/* ---------- Featured pros carousel ---------- */
.feat-section { background: var(--slate-50); border-bottom: 1px solid var(--card-border); }
html.dark .feat-section { background: rgba(15,23,42,0.6); }
.feat-carousel { position: relative; overflow: hidden; border-radius: 1.25rem; }
.feat-track { display: flex; transition: transform 0.7s ease; }
.feat-slide { flex: 0 0 100%; padding: 0 0.25rem; }
.feat-card {
  background: #fff;
  color: var(--text); border-radius: 1.25rem;
  padding: 1.5rem;
  border: 1px solid #d1ece6;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.08);
}
.feat-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; }
.feat-grid { display: flex; flex-direction: column; gap: 1rem; position: relative; }
@media (min-width: 768px) { .feat-grid { flex-direction: row; align-items: center; gap: 1.5rem; } }
.feat-avatar { width: 5rem; height: 5rem; border-radius: 1rem; object-fit: cover; border: 3px solid #d1ece6; }
.feat-headline { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.2; color: var(--orange-500); }
.feat-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.feat-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; }
.feat-meta { margin-top: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; color: var(--slate-500); }
.feat-rate { margin-top: 0.8rem; font-size: 1.1rem; font-weight: 800; color: var(--teal-600); }
.feat-cta { margin-top: 1rem; }
.feat-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; background: #fff; border: 1px solid #d1ece6; color: var(--slate-500); border-radius: 999px; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px -4px rgba(0,0,0,0.08); }
.feat-nav:hover { background: var(--orange-500); color: #fff; border-color: var(--orange-500); }
.feat-prev { left: 0.5rem; } .feat-next { right: 0.5rem; }
html[dir="rtl"] .feat-prev { left: auto; right: 0.5rem; }
html[dir="rtl"] .feat-next { right: auto; left: 0.5rem; }
.feat-dots { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; }
.feat-dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--slate-300); border: none; padding: 0; }
html.dark .feat-dot { background: var(--slate-600); }
.feat-dot.active { background: var(--orange-500); width: 1.25rem; }

/* ---------- Droguerie home card ---------- */
.droguerie-card {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.08);
  transition: all 0.2s;
}
html[dir="rtl"] .droguerie-card { text-align: right; }
.droguerie-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px -8px rgba(0,0,0,0.12); }
.droguerie-card .bg { position: absolute; inset: 0; background: linear-gradient(90deg, #0D9488, #00A884, #0f172a); }
.droguerie-card .panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.4rem; }
@media (min-width: 640px) { .droguerie-card .panel { flex-direction: row; align-items: center; padding: 1.8rem 2rem; } }
.droguerie-card .store-icon { width: 4rem; height: 4rem; border-radius: 1rem; background: linear-gradient(135deg, #2dd4bf, #10b981); display: flex; align-items: center; justify-content: center; color: #020617; flex-shrink: 0; box-shadow: 0 12px 28px -8px rgba(45,212,191,0.5); }
.droguerie-card .store-icon svg { width: 2rem; height: 2rem; }
.droguerie-card h2 { color: #fff; font-size: 1.25rem; font-weight: 800; }
.droguerie-card p { color: var(--slate-300); font-size: 0.8rem; margin-top: 0.25rem; }
.droguerie-card .cta { flex-shrink: 0; background: var(--orange-500); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 0.7rem 1.2rem; border-radius: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem; box-shadow: 0 8px 20px -6px rgba(255,140,0,0.4); }
.droguerie-card .cta svg { width: 1rem; height: 1rem; }

/* ---------- Tradespeople directory ---------- */
.directory-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tab-cat {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #fff; color: var(--slate-700);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.4rem 0.8rem;
  transition: all 0.15s;
}
html.dark .tab-cat { background: var(--slate-800); color: var(--slate-200); }
.tab-cat svg { width: 0.85rem; height: 0.85rem; }
.tab-cat.active { color: #fff; }
.tab-cat.active-all { background: var(--orange-500); color: #fff; border-color: var(--orange-500); }

.control-bar {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
@media (min-width: 900px) { .control-bar { flex-direction: row; align-items: center; } }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field svg { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); width: 1rem; height: 1rem; }
html[dir="rtl"] .search-field svg { left: auto; right: 0.8rem; }
.search-field input { width: 100%; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 0.75rem; padding: 0.6rem 0.9rem 0.6rem 2.3rem; font-size: 0.8rem; color: var(--text); }
html[dir="rtl"] .search-field input { padding-left: 0.9rem; padding-right: 2.3rem; }
.filters-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.1rem;
  margin-top: 0.7rem;
  display: grid; gap: 1rem;
}
@media (min-width: 900px) { .filters-panel { grid-template-columns: repeat(2, 1fr); } }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.filter-row b { color: var(--orange-500); }
.filter-row input[type="range"] { accent-color: var(--orange-500); flex: 1; }

.pro-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .pro-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pro-grid { grid-template-columns: repeat(3, 1fr); } }

.pro-card {
  background: #fff;
  border-radius: 1rem;
  color: var(--text);
  border: 2px solid #d1ece6;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.2s;
  position: relative;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.06);
}
.pro-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -8px rgba(0,0,0,0.1); }
.pro-card-accent { height: 3px; }
.pro-card-body { padding: 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.pro-card-top { display: flex; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.pro-badge-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.pro-cat-badge { background: #e6f7f2; color: var(--teal-600); font-size: 0.62rem; font-weight: 700; padding: 0.25rem 0.55rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.3rem; }
.pro-cat-badge .dot { width: 0.4rem; height: 0.4rem; border-radius: 999px; background: var(--teal-500); }
.pro-emergency { background: var(--orange-500); color: #fff; font-size: 0.62rem; font-weight: 800; padding: 0.25rem 0.55rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.25rem; }
.pro-save-btn { background: #fff; border: 1px solid #d1ece6; border-radius: 0.6rem; color: var(--slate-500); width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pro-save-btn svg { width: 1rem; height: 1rem; }
.pro-save-btn.saved { background: var(--orange-500); color: #fff; border-color: var(--orange-500); }
.pro-card-head { display: flex; align-items: center; gap: 0.8rem; }
.pro-avatar { width: 4rem; height: 4rem; border-radius: 0.85rem; object-fit: cover; border: 2px solid #d1ece6; position: relative; }
.pro-name { font-weight: 800; font-size: 1rem; line-height: 1.2; color: var(--text); }
.pro-name .shield { color: var(--teal-500); display: inline-flex; vertical-align: middle; margin-right: 0.15rem; }
.pro-rating { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; margin-top: 0.25rem; }
.pro-rating .stars { color: var(--orange-500); }
.pro-bio { margin-top: 0.7rem; font-size: 0.75rem; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pro-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.8rem; background: #f7faf9; border-radius: 0.75rem; padding: 0.6rem; }
.pro-metric { text-align: center; }
.pro-metric .v { font-size: 0.85rem; font-weight: 800; color: var(--text); }
.pro-metric .v.amber { color: var(--orange-500); }
.pro-metric .k { font-size: 0.58rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.1rem; }
.pro-skills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.8rem; }
.skill-pill { background: #f0f5f3; font-size: 0.62rem; padding: 0.22rem 0.55rem; border-radius: 999px; color: var(--slate-600); }
.pro-card-foot { background: #f7faf9; border-top: 1px solid #d1ece6; padding: 0.7rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.pro-card-foot .btn { font-size: 0.75rem; padding: 0.5rem 0.9rem; }


/* ---------- AI estimator ---------- */
.ai-wrap { background: #fff; color: var(--text); border: 2px solid #d1ece6; border-radius: 1.5rem; padding: 2rem; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.06); max-width: 64rem; margin: 2rem auto; }
.ai-box { background: #f7faf9; border: 1px solid #d1ece6; border-radius: 1.25rem; padding: 1.5rem; }
.ai-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; display: block; }
.ai-textarea { width: 100%; min-height: 7rem; background: #fff; border: 1px solid #d1ece6; color: var(--text); border-radius: 0.9rem; padding: 0.8rem; font-size: 0.85rem; resize: vertical; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.ai-chip { display: inline-flex; align-items: center; gap: 0.3rem; background: #e6f7f2; border: 1px solid #d1ece6; color: var(--teal-600); font-size: 0.68rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; }
.ai-row { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1rem; }
@media (min-width: 768px) { .ai-row { flex-direction: row; align-items: center; justify-content: space-between; } }
.ai-result { background: #e6f7f2; border: 1px solid #d1ece6; border-radius: 1.25rem; padding: 1.5rem; margin-top: 1.5rem; }
.ai-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1rem; }
.ai-metric { background: #fff; border: 1px solid #d1ece6; border-radius: 0.9rem; padding: 0.9rem; text-align: center; }
.ai-metric .v { font-size: 1.05rem; font-weight: 800; color: var(--teal-600); }
.ai-metric .k { font-size: 0.62rem; color: var(--muted); margin-top: 0.25rem; text-transform: uppercase; }
.ai-cols { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 768px) { .ai-cols { flex-direction: row; } }
.ai-cols > div { flex: 1; }
.ai-list { list-style: none; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ai-list li { display: flex; gap: 0.5rem; font-size: 0.78rem; line-height: 1.5; }
.ai-list .bullet { color: var(--orange-500); flex-shrink: 0; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem;
  overflow-y: auto;
  animation: fade-in 0.15s ease;
}
.modal {
  background: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px -12px rgba(2,6,23,0.5);
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  animation: zoom-in 0.18s ease;
}
html.dark .modal { background: var(--slate-900); border-color: var(--slate-800); }
.modal-md { max-width: 36rem; }
.modal-lg { max-width: 56rem; }
.modal-xl { max-width: 60rem; }
.modal-head { padding: 1.1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--card-border); }
.modal-close { background: transparent; border: none; color: var(--slate-400); width: 2rem; height: 2rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--slate-100); color: var(--slate-900); }
html.dark .modal-close:hover { background: var(--slate-700); color: #fff; }
.modal-close svg { width: 1.1rem; height: 1.1rem; }
.modal-body { padding: 1.25rem; }
.modal-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--card-border); display: flex; gap: 0.6rem; flex-wrap: wrap; }
.modal-head.dark { background: var(--slate-900); color: #fff; border-bottom: 1px solid var(--slate-800); }
.modal-head.dark .title { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-head.dark .title svg { color: var(--orange-500); }

/* Form fields */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange-500); }
.field .with-icon { position: relative; }
.field .with-icon svg { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); width: 1rem; height: 1rem; }
html[dir="rtl"] .field .with-icon svg { left: auto; right: 0.8rem; }
.field .with-icon input { padding-left: 2.4rem; }
html[dir="rtl"] .field .with-icon input { padding-left: 0.9rem; padding-right: 2.4rem; }
.error-text { color: #ef4444; font-size: 0.72rem; margin-top: 0.3rem; }
.success-box { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: var(--emerald-500); border-radius: 0.9rem; padding: 1rem; font-size: 0.85rem; font-weight: 600; text-align: center; }

/* Booking / profile detail rows */
.detail-header { display: flex; gap: 1rem; align-items: center; }
.detail-avatar { width: 5.5rem; height: 5.5rem; border-radius: 1rem; object-fit: cover; border: 3px solid #d1ece6; }
.detail-tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--card-border); margin-top: 1.1rem; }
.detail-tab { background: none; border: none; padding: 0.6rem 1rem; font-size: 0.8rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; display: inline-flex; align-items: center; gap: 0.4rem; }
.detail-tab.active { color: var(--teal-600); border-color: var(--orange-500); }
html.dark .detail-tab.active { color: var(--amber-400); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1rem; }
.pricing-card { background: var(--input-bg); border: 1px solid var(--card-border); border-radius: 0.9rem; padding: 0.8rem; text-align: center; }
.pricing-card .v { font-size: 1.05rem; font-weight: 800; color: var(--teal-600); }
.pricing-card .k { font-size: 0.6rem; color: var(--muted); margin-top: 0.2rem; text-transform: uppercase; }
.trust-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.trust-pill { display: inline-flex; align-items: center; gap: 0.3rem; background: #e6f7f2; border: 1px solid #d1ece6; color: var(--teal-600); font-size: 0.7rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; }

/* Booking tracker */
.booking-card { border: 1px solid var(--card-border); border-radius: 1rem; padding: 1rem; background: var(--card); }
.booking-progress { display: flex; gap: 0.3rem; margin: 0.8rem 0; }
.bp-step { flex: 1; text-align: center; font-size: 0.62rem; color: var(--slate-400); position: relative; }
.bp-step .dot { width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--slate-200); color: var(--slate-500); font-size: 0.75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 0.25rem; }
html.dark .bp-step .dot { background: var(--slate-700); color: var(--slate-200); }
.bp-step.done .dot, .bp-step.active .dot { background: var(--orange-500); color: #fff; }
.bp-step.done .dot { background: var(--teal-500); }

/* ---------- Droguerie page ---------- */
.dr-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.dr-chip { background: var(--input-bg); border: 1px solid var(--input-border); color: var(--muted); font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0.8rem; border-radius: 999px; }
.dr-chip.active { background: var(--orange-500); color: #fff; border-color: var(--orange-500); }
.store-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .store-grid { grid-template-columns: repeat(3, 1fr); } }
.store-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 1rem; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; transition: all 0.15s; }
.store-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(2,6,23,0.2); }
.store-card .icon { width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: linear-gradient(135deg, var(--teal-500), var(--orange-500)); color: #fff; display: flex; align-items: center; justify-content: center; }
.store-card .icon svg { width: 1.4rem; height: 1.4rem; }
.store-card h3 { font-weight: 800; font-size: 0.95rem; }
.store-card .sub { font-size: 0.72rem; color: var(--muted); }
.store-card .row { display: flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--muted); }
.store-card .row svg { width: 0.85rem; height: 0.85rem; }
.store-card .cta { margin-top: auto; }

/* Droguerie store modal */
.store-head { display: flex; align-items: center; gap: 1rem; }
.store-logo { width: 4.5rem; height: 4.5rem; border-radius: 1rem; background: #e6f7f2; border: 2px solid #d1ece6; display: flex; align-items: center; justify-content: center; color: var(--teal-500); }
.store-logo svg { width: 2rem; height: 2rem; }
.prod-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
.prod-card { border: 1px solid var(--card-border); border-radius: 1rem; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.prod-img { height: 8rem; position: relative; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-stock { position: absolute; top: 0.5rem; left: 0.5rem; font-size: 0.62rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; }
html[dir="rtl"] .prod-stock { left: auto; right: 0.5rem; }
.prod-stock.in { background: rgba(16,185,129,0.9); color: #022c22; }
.prod-stock.out { background: rgba(239,68,68,0.9); color: #fff; }
.prod-body { padding: 0.8rem 0.9rem 0.9rem; display: flex; flex-direction: column; flex: 1; }
.prod-title { font-size: 0.8rem; font-weight: 700; line-height: 1.3; }
.prod-price { color: var(--teal-600); font-weight: 800; font-size: 0.85rem; margin-top: 0.4rem; }
html.dark .prod-price { color: var(--amber-400); }
.prod-specs, .prod-projects { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.spec-pill { background: var(--input-bg); border: 1px solid var(--input-border); font-size: 0.6rem; color: var(--muted); padding: 0.2rem 0.5rem; border-radius: 999px; }
.kit-card { border: 1px dashed var(--card-border); border-radius: 0.9rem; padding: 0.9rem; display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; background: var(--input-bg); }
.kit-card .name { font-weight: 700; font-size: 0.85rem; }
.kit-card .items { font-size: 0.68rem; color: var(--muted); margin-top: 0.25rem; }

/* Calculators */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: repeat(3, 1fr); } }
.calc-card { border: 1px solid var(--card-border); border-radius: 1rem; padding: 1.1rem; background: var(--card); }
.calc-card h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }
.calc-card h4 svg { color: var(--orange-500); }
.calc-result { margin-top: 0.7rem; background: #f7faf9; border-radius: 0.7rem; padding: 0.7rem; font-size: 0.78rem; font-weight: 700; }
.calc-result b { color: var(--teal-600); }
html.dark .calc-result b { color: var(--amber-400); }

/* Vendor catalog */
.aisle-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.aisle-tab { background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 999px; font-size: 0.7rem; font-weight: 600; padding: 0.35rem 0.8rem; color: var(--text); }
.aisle-tab.active { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.catalog-tool { border: 1px solid var(--card-border); border-radius: 0.9rem; padding: 0.9rem; display: flex; gap: 0.7rem; background: var(--card); }
.catalog-tool .icon { width: 2.5rem; height: 2.5rem; border-radius: 0.7rem; background: #e6f7f2; display: flex; align-items: center; justify-content: center; color: var(--teal-500); flex-shrink: 0; }
html.dark .catalog-tool .icon { color: var(--amber-400); }
.catalog-tool .icon svg { width: 1.2rem; height: 1.2rem; }
.catalog-tool .name { font-weight: 700; font-size: 0.82rem; }
.catalog-tool .desc { font-size: 0.68rem; color: var(--muted); margin-top: 0.2rem; }
.catalog-tool .row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; font-size: 0.7rem; }
.catalog-tool .row .price { font-weight: 800; color: var(--teal-600); }
html.dark .catalog-tool .row .price { color: var(--amber-400); }
.catalog-tool .row input { width: 4.5rem; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 0.5rem; padding: 0.25rem 0.5rem; font-size: 0.72rem; }

/* ---------- Footer ---------- */
.site-footer { background: #f7faf9; color: var(--muted); border-top: 1px solid #d1ece6; font-size: 0.75rem; padding: 3rem 0 2rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-grid h4 { color: var(--text); font-weight: 700; font-size: 0.8rem; margin-bottom: 0.75rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links li { display: flex; align-items: center; gap: 0.5rem; }
.footer-links a:hover { color: var(--orange-500); }
.footer-links svg { width: 0.95rem; height: 0.95rem; }
.footer-bottom { border-top: 1px solid #d1ece6; margin-top: 2rem; padding-top: 1rem; text-align: center; font-size: 0.7rem; }

/* ---------- Misc ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoom-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
html[dir="rtl"] @keyframes slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.loader { display: flex; align-items: center; justify-content: center; padding: 2rem; color: var(--muted); font-size: 0.8rem; gap: 0.5rem; }
.spinner { width: 1.1rem; height: 1.1rem; border: 2px solid #d1ece6; border-top-color: var(--orange-500); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state .icon { color: var(--slate-300); margin-bottom: 0.6rem; display: inline-flex; }
html.dark .empty-state .icon { color: var(--slate-600); }

.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
  background: var(--slate-900); color: #fff;
  border-radius: 999px; padding: 0.6rem 1.1rem;
  font-size: 0.8rem; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  z-index: 100; animation: zoom-in 0.2s ease;
}

/* ---------- Account dashboard ---------- */
.acct-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 1rem; padding: 1.25rem; margin-bottom: 1rem;
}
.acct-card h3 {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.95rem; margin: 0 0 0.9rem; color: var(--text);
}
.acct-profile { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.acct-avatar {
  width: 4.25rem; height: 4.25rem; border-radius: 1rem; flex-shrink: 0;
  background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
  color: #fff; font-weight: 800; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.acct-avatar-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; padding: 0.22rem 0.55rem;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); cursor: pointer;
}
.acct-avatar-btn:hover { border-color: var(--orange-500); color: var(--orange-600); }
.acct-avatar-remove {
  font-size: 0.66rem; color: #ef4444; background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline;
}
.acct-name-line { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 1.1rem; }
.acct-role-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.6rem;
  border-radius: 999px; background: rgba(249,115,22,0.12); color: var(--orange-600);
}
.acct-profile-rows { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; }
.acct-row { display: flex; align-items: center; gap: 0.45rem; font-size: 0.82rem; color: var(--muted); }
.acct-row a { color: var(--muted); text-decoration: none; }
.acct-row a:hover { color: var(--orange-500); }
.acct-stats {
  display: grid; gap: 0.8rem; margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.acct-stat {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 0.9rem; padding: 0.9rem 1rem;
}
.acct-stat-icon { display: inline-flex; }
.acct-stat-value { font-size: 1.35rem; font-weight: 800; line-height: 1; color: var(--text); }
.acct-stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.25rem; }
.acct-actions-grid { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.acct-hist-list { display: flex; flex-direction: column; }
.acct-hist-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--card-border);
}
.acct-hist-item:last-child { border-bottom: none; }
.acct-hist-icon {
  width: 2rem; height: 2rem; border-radius: 0.6rem; flex-shrink: 0;
  background: var(--slate-100); color: var(--orange-500);
  display: flex; align-items: center; justify-content: center;
}
html.dark .acct-hist-icon { background: var(--slate-700); }
.acct-hist-label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.acct-hist-date { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Settings */
.acct-form { display: block; }
.acct-form-grid {
  display: grid; gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.acct-sep { border: none; border-top: 1px solid var(--card-border); margin: 1.1rem 0; }
.acct-pro-block {
  border: 1px solid rgba(249,115,22,0.28);
  background: rgba(249,115,22,0.05);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  margin: 0.2rem 0 0.9rem;
}
.acct-pro-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.acct-pro-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.88rem; color: var(--text); }
.acct-pro-status {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; padding: 0.18rem 0.55rem;
  border-radius: 999px; background: rgba(239,68,68,0.12); color: #ef4444;
}
.acct-pro-status.is-complete { background: rgba(20,184,166,0.14); color: var(--teal-600, #0d9488); }
.acct-pro-block .acct-form-grid { margin-top: 0.2rem; }
.acct-ok-text { color: var(--teal-500); font-size: 0.78rem; margin: 0.25rem 0; min-height: 0; }
/* Email verification badge (Account settings → email field) */
.acct-email-status { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.35rem; }
.acct-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 700; padding: 0.18rem 0.55rem;
  border-radius: 999px; white-space: nowrap;
}
.acct-badge-ok { background: rgba(20,184,166,0.14); color: var(--teal-600, #0d9488); }
.acct-badge-warn { background: rgba(249,115,22,0.14); color: #ea580c; }
.acct-resend {
  background: transparent; border: 1px solid rgba(249,115,22,0.5); color: #ea580c;
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem;
  border-radius: 999px; cursor: pointer; line-height: 1.2;
}
.acct-resend:hover { background: rgba(249,115,22,0.1); }
.acct-resend:disabled { opacity: 0.6; cursor: default; }
.acct-danger {
  border: 1px solid rgba(239,68,68,0.35); background: rgba(239,68,68,0.05);
  border-radius: 0.8rem; padding: 0.9rem 1rem;
}
.acct-danger-title {
  display: flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.85rem; color: #ef4444;
}
.acct-danger-row {
  display: flex; gap: 0.5rem; align-items: center;
  margin-top: 0.7rem; flex-wrap: wrap;
}
.acct-danger-row input { flex: 1; min-width: 160px; }
/* account location selects */
.acct-select, select.acct-select { appearance: auto; -webkit-appearance: menulist; -moz-appearance: menulist; background-image: none; padding-inline-end: .75rem; }

/* ---- Image download protection (all images site-wide) ---- */
/* No drag-to-desktop, no long-press "Save image", no text selection. */
img, [data-lsh-protect-image] {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
img[data-lsh-protected] { -webkit-user-drag: none; }

/* ===== Welcome / role-select screen ===== */
body.welcome-active{overflow:hidden}
body.welcome-active #app{min-height:100dvh}
.welcome-main{min-height:100dvh;display:flex;flex-direction:column}
.welcome-main #view-container{flex:1;display:flex;flex-direction:column;min-height:0}
.welcome-screen{padding:clamp(1rem,2.5vw,2.5rem) 0 1.25rem;min-height:100%;display:flex;align-items:center;flex:1}
.welcome-screen .container{width:min(1120px,calc(100% - 2rem));margin:0 auto}
.welcome-head{text-align:center;margin:0 auto 1rem;max-width:42rem}
.welcome-kicker{display:inline-flex;align-items:center;gap:.45rem;font-size:.78rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--orange-500);background:rgba(249,115,22,.08);border:1px solid rgba(249,115,22,.18);padding:.4rem .85rem;border-radius:999px;margin-bottom:.75rem}
.welcome-title{font-size:clamp(1.5rem,4vw,2.8rem);line-height:1.15;font-weight:800;color:var(--slate-900);margin:0 0 .45rem}
.welcome-sub{font-size:clamp(.92rem,1.6vw,1.05rem);color:var(--slate-500);margin:0;line-height:1.6}
.welcome-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;max-width:980px;margin:0 auto}
.welcome-role-card{position:relative;display:flex;flex-direction:column;align-items:stretch;text-align:inherit;background:var(--card-bg,#fff);border:1.5px solid var(--slate-200,#e7e5e4);border-radius:1.5rem;padding:0;cursor:pointer;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;box-shadow:0 4px 18px rgba(28,25,23,.04);min-height:100%}
.welcome-role-card:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(28,25,23,.10);border-color:color-mix(in srgb,var(--role-accent) 45%,#e7e5e4)}
.welcome-role-card:focus-visible{outline:3px solid color-mix(in srgb,var(--role-accent) 35%,transparent);outline-offset:3px}
.welcome-role-card:active{transform:translateY(-1px)}
.welcome-role-visual{background:linear-gradient(180deg,color-mix(in srgb,var(--role-accent) 8%,#fff7ed) 0%,#fff 100%);padding:1rem 1rem .35rem;display:flex;align-items:center;justify-content:center;min-height:180px}
.welcome-role-visual img{width:min(100%,280px);height:170px;object-fit:contain;display:block}
.welcome-role-body{padding:.9rem 1.15rem 1.15rem;display:flex;flex-direction:column;gap:.35rem;min-height:96px}
.welcome-role-title{font-size:1.28rem;font-weight:800;color:var(--slate-900);line-height:1.2}
.welcome-role-desc{font-size:.9rem;color:var(--slate-500);line-height:1.65;max-width:30ch}
.welcome-role-go{position:absolute;top:.9rem;inset-inline-end:.9rem;width:2.4rem;height:2.4rem;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--slate-200,#e7e5e4);color:var(--role-accent);box-shadow:0 4px 10px rgba(28,25,23,.05);transition:transform .18s ease,background .18s ease,color .18s ease}
.welcome-role-card:hover .welcome-role-go{background:var(--role-accent);color:#fff;transform:translateX(2px)}
[dir="rtl"] .welcome-role-card:hover .welcome-role-go{transform:translateX(-2px)}
.welcome-foot{text-align:center;margin:1rem 0 0;color:var(--slate-400);font-size:.78rem}

@media (max-width: 820px){
  .welcome-grid{gap:.85rem}
  .welcome-role-visual{min-height:150px;padding:.75rem .75rem .2rem}
  .welcome-role-visual img{height:140px}
}

@media (max-width: 640px){
  body.welcome-active{overflow:hidden}
  .welcome-screen{padding:.5rem 0 .5rem;min-height:100dvh;align-items:stretch}
  .welcome-screen .container{width:calc(100% - 1rem);display:flex;flex-direction:column;min-height:calc(100dvh - 1rem)}
  .welcome-head{margin:0 auto .55rem;padding-top:.25rem}
  .welcome-kicker{margin-bottom:.45rem;padding:.3rem .7rem;font-size:.7rem}
  .welcome-title{font-size:1.35rem;margin-bottom:.2rem}
  .welcome-sub{font-size:.84rem;line-height:1.45}
  .welcome-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;flex:1;min-height:0;align-content:stretch;grid-auto-rows:1fr}
  .welcome-role-card{border-radius:1.1rem;min-height:0}
  .welcome-role-visual{min-height:0;flex:1 1 auto;padding:.55rem .45rem .15rem}
  .welcome-role-visual img{width:100%;height:100%;max-height:20dvh;min-height:84px;object-fit:contain}
  .welcome-role-body{padding:.55rem .65rem .7rem;min-height:0;gap:.2rem}
  .welcome-role-title{font-size:1.02rem}
  .welcome-role-desc{font-size:.72rem;line-height:1.45;max-width:none;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .welcome-role-go{top:.5rem;width:1.9rem;height:1.9rem}
  .welcome-role-go svg{width:14px;height:14px}
  .welcome-foot{display:none}
  .welcome-download{display:none}
}

@media (max-width: 420px){
  .welcome-title{font-size:1.2rem}
  .welcome-role-visual img{max-height:18dvh;min-height:72px}
  .welcome-role-body{padding:.5rem .55rem .6rem}
  .welcome-role-title{font-size:.96rem}
  .welcome-role-desc{font-size:.68rem;-webkit-line-clamp:2}
}

@media (max-height: 740px) and (max-width: 640px){
  .welcome-head{margin-bottom:.35rem}
  .welcome-sub{display:none}
  .welcome-download-note{display:none}
  .welcome-role-visual img{max-height:16dvh;min-height:64px}
}

@media (prefers-reduced-motion: reduce){
  .welcome-role-card,.welcome-role-go{transition:none}
}

/* ===== App download CTA ===== */
.welcome-download{margin:1.25rem auto 0;display:flex;flex-direction:column;align-items:center;gap:.55rem}
.welcome-download-btn{display:inline-flex;align-items:center;gap:.65rem;padding:.85rem 1.35rem;border-radius:999px;background:#fff;color:var(--slate-800);border:1.5px solid var(--slate-200,#e7e5e4);font-weight:700;font-size:.95rem;text-decoration:none;box-shadow:0 4px 14px rgba(28,25,23,.05);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;cursor:pointer;font-family:inherit}
.welcome-download-btn:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(28,25,23,.09);border-color:rgba(249,115,22,.35);background:#FFF7ED}
.welcome-download-btn:focus-visible{outline:3px solid rgba(249,115,22,.28);outline-offset:3px}
.welcome-download-btn svg{color:var(--orange-500);flex-shrink:0}
.welcome-download-note{font-size:.76rem;color:var(--slate-400);text-align:center}
@media (max-width:640px){.welcome-download-btn{width:100%;justify-content:center;max-width:24rem}}

/* ===== Header APK download CTA ===== */
.header-download-btn{
  display:inline-flex;align-items:center;gap:.55rem;
  padding:.72rem 1.1rem;
  border-radius:12px;
  background:linear-gradient(180deg,#FFF7ED 0%,#FFEDD5 100%);
  color:#C2410C;
  border:1.5px solid #FDBA74;
  font-weight:800;
  font-size:.92rem;
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:0 2px 8px rgba(249,115,22,.10);
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease;
  cursor:pointer;font-family:inherit;
}
.header-download-btn:hover{
  transform:translateY(-1px);
  background:linear-gradient(180deg,#FFEDD5 0%,#FED7AA 100%);
  border-color:#FB923C;
  box-shadow:0 8px 20px rgba(249,115,22,.16);
  color:#9A3412;
}
.header-download-btn:focus-visible{outline:3px solid rgba(249,115,22,.28);outline-offset:3px}
.header-download-btn svg{flex-shrink:0;color:#EA580C}
.header-download-btn-drawer{font-size:1rem;padding:.9rem 1.1rem}

.header-download-icon{
  color:#EA580C !important;
  border-color:rgba(251,146,60,.35);
  background:rgba(255,247,237,.9);
}
.header-download-icon:hover{background:#FFEDD5;border-color:#FB923C}

@media (max-width: 1180px){
  .header-download-label{display:none}
  .header-download-btn{padding:.72rem .85rem;gap:0}
}
@media (max-width: 899px){
  .header-download-btn{display:none}
}
