@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --brand: #E8541A;
  --brand-dark: #B83C0D;
  --brand-light: #FDF1EC;
  --brand-mid: #F4784A;
  --surface: #FFFFFF;
  --surface2: #F7F6F3;
  --surface3: #EFEDE8;
  --border: rgba(0,0,0,0.08);
  --border-med: rgba(0,0,0,0.14);
  --text: #1A1A1A;
  --text2: #555550;
  --text3: #999994;
  --success: #2E7D32;
  --success-bg: #E8F5E9;
  --danger: #C62828;
  --danger-bg: #FFEBEE;
  --warn: #B8860B;
  --warn-bg: #FFF8E1;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

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

html {
  height: 100%;
  background: #E8541A;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: #E8541A;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 430px;
  /* Inaltimea = tot ecranul inclusiv safe areas */
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── SCREENS ── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
}
.screen.active {
  display: flex;
  transform: translateX(0);
}
.screen.slide-out {
  transform: translateX(-30%);
}
.center-screen {
  align-items: center;
  justify-content: center;
}

/* ── SCROLL BODY ── */
.scroll-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
}
.scroll-body::-webkit-scrollbar { display: none; }

/* ── SPLASH ── */
#screen-splash {
  transform: none;
  background: linear-gradient(160deg, #1A0A04 0%, #3D1206 40%, #E8541A 100%);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  box-sizing: border-box;
}
.splash-bg {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.splash-content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 60px 28px calc(48px + env(safe-area-inset-bottom));
  justify-content: flex-end;
  box-sizing: border-box;
}
.splash-logo {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.splash-logo span { color: var(--brand-mid); }
.splash-tagline {
  font-size: 20px;
  color: rgba(255,255,255,0.75);
  line-height: 1.3;
  margin-bottom: 40px;
  font-weight: 300;
  text-align: center;
  width: 100%;
}
.splash-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.splash-legal { font-size: 11px; color: rgba(255,255,255,0.4); text-align: center; }
.splash-legal a { color: rgba(255,255,255,0.6); text-decoration: underline; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:active { background: var(--brand-dark); transform: scale(0.98); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  padding: 15px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-outline:active { border-color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
}
.btn-google {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-md);
  padding: 13px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.full { width: 100%; }

/* ── AUTH ── */
.auth-header {
  padding: 48px 24px 24px;
  background: var(--surface);
}
.auth-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin: 10px 0 4px;
}
.auth-header p { font-size: 14px; color: var(--text2); }
.auth-body { padding: 0 24px 32px; overflow-y: auto; flex: 1; }
.role-toggle {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.role-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.15s;
}
.role-btn.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); font-weight: 600; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--brand); }
.form-group textarea { resize: none; line-height: 1.5; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-link { font-size: 13px; color: var(--text2); text-align: center; margin-top: 16px; }
.auth-link a { color: var(--brand); font-weight: 600; cursor: pointer; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--text3); }

/* ── TOPBAR ── */
.app-topbar {
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-greeting { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); }
.topbar-loc { font-size: 12px; color: var(--text3); margin-top: 1px; }
.topbar-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}

/* ── CLIENT HERO ── */
.client-hero {
  background: linear-gradient(135deg, #E8541A 0%, #B83C0D 100%);
  padding: 24px 20px 28px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
}
.search-wrap {
  background: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  background: transparent;
}
.search-icon-btn {
  background: var(--brand);
  border: none;
  padding: 13px 16px;
  font-size: 16px;
  cursor: pointer;
}

/* ── SECTIONS ── */
.section { padding: 20px 20px 4px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); }
.section-link { font-size: 13px; color: var(--brand); font-weight: 500; }
.section-meta { font-size: 12px; color: var(--text3); }

/* ── CAT CHIPS ── */
.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  border: 1px solid var(--border-med);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  background: var(--surface);
}
.cat-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── WORKER CARDS ── */
.worker-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  box-shadow: var(--shadow-sm);
}
.worker-card:active { box-shadow: none; border-color: var(--brand); }
.w-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  flex-shrink: 0;
}
.w-info { flex: 1; min-width: 0; }
.w-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.w-trade { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.w-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
}
.badge-star { background: var(--warn-bg); color: var(--warn); }
.badge-price { background: var(--success-bg); color: var(--success); }
.badge-fast { background: #E3F2FD; color: #1565C0; }
.badge-urgent { background: var(--danger-bg); color: var(--danger); }
.w-dist { font-size: 11px; color: var(--text3); }
.w-avail { font-size: 11px; color: var(--success); font-weight: 500; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: auto;
  min-height: calc(64px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding: 8px 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}
.nav-item:active { background: var(--surface2); }
.nav-icon { font-size: 20px; }
.nav-label { font-size: 10px; font-weight: 500; color: var(--text3); }
.nav-item.active .nav-label { color: var(--brand); }
.nav-item.active .nav-icon { filter: none; }

/* ── DETAIL SCREEN ── */
.detail-img-header {
  height: 220px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
}
.float-back, .float-fav {
  position: absolute;
  top: 14px;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.float-back { left: 16px; }
.float-fav { right: 16px; font-size: 20px; }
.detail-avatar-wrap {
  position: absolute;
  bottom: -36px;
  left: 20px;
}
.detail-avatar {
  width: 80px; height: 80px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md);
}
.detail-info-card {
  padding: 48px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.detail-name { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--text); }
.detail-trade { font-size: 14px; color: var(--text2); margin: 4px 0 12px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.stat-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}
.stat-val { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 10px; color: var(--text3); margin-top: 2px; }
.detail-section { padding: 20px; border-bottom: 1px solid var(--border); }
.detail-section-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.detail-desc { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* REVIEWS */
.review-item { margin-bottom: 14px; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text2); flex-shrink: 0; }
.review-author { font-size: 13px; font-weight: 600; color: var(--text); }
.review-stars { font-size: 12px; color: var(--warn); }
.review-text { font-size: 13px; color: var(--text2); line-height: 1.5; padding-left: 42px; }

.sticky-book-bar {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1001;
}
.price-preview { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--brand); white-space: nowrap; }

/* ── PAGE HEADER ── */
.page-header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.page-header h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); }
.back-btn {
  background: var(--surface2);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── BOOKING ── */
.booking-worker-card {
  margin: 16px 20px;
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.form-section { padding: 0 20px 4px; }
.form-section-title {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  color: var(--text);
  padding: 16px 0 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.urgency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.urgency-opt {
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--surface);
}
.urgency-opt.active { border-color: var(--brand); background: var(--brand-light); }
.urg-icon { font-size: 20px; margin-bottom: 4px; }
.urg-label { font-size: 12px; font-weight: 600; color: var(--text); }
.urg-sub { font-size: 10px; color: var(--text3); margin-top: 2px; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.time-slot {
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  padding: 10px 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.15s;
  background: var(--surface);
}
.time-slot.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.price-summary {
  margin: 16px 20px 8px;
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 16px;
}
.price-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 5px 0; }
.price-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.price-row .plabel { color: var(--text2); }
.price-row .pval { font-weight: 500; color: var(--text); }

/* ── CONFIRMED ── */
.confirmed-wrap { padding: 32px 24px; width: 100%; text-align: center; }
.success-anim {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #fff;
  margin: 0 auto 20px;
  animation: pop 0.4s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.conf-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.conf-sub { font-size: 14px; color: var(--text2); line-height: 1.5; margin-bottom: 24px; }
.conf-card { background: var(--surface2); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 24px; text-align: left; }
.conf-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.conf-row:last-child { border-bottom: none; }
.conf-label { color: var(--text2); }
.conf-val { font-weight: 500; color: var(--text); }
.conf-val.status { color: var(--brand); font-weight: 600; }
.conf-actions { display: flex; flex-direction: column; gap: 10px; }

/* ── WORKER PANEL ── */
.online-toggle-wrap { display: flex; align-items: center; gap: 8px; }
.online-label { font-size: 13px; font-weight: 600; color: var(--success); }
.toggle-switch {
  width: 46px; height: 26px;
  background: #ccc;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-switch.on { background: var(--brand); }
.toggle-knob {
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch.on .toggle-knob { left: 23px; }
.worker-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
}
.wstat-card {
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 14px;
}
.wstat-card.accent { background: var(--brand); grid-column: 1 / -1; }
.wstat-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.wstat-card.accent .wstat-label { color: rgba(255,255,255,0.7); }
.wstat-val { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); }
.wstat-card.accent .wstat-val { color: #fff; font-size: 24px; }
.wstat-delta { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 4px; }
.notif-badge {
  background: var(--brand);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* REQUESTS */
.request-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.req-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.req-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.req-tag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; letter-spacing: 0.3px; }
.req-tag.urgent { background: var(--danger-bg); color: var(--danger); }
.req-tag.today { background: var(--warn-bg); color: var(--warn); }
.req-tag.planned { background: var(--success-bg); color: var(--success); }
.req-desc { font-size: 13px; color: var(--text2); line-height: 1.4; margin-bottom: 12px; }
.req-footer { display: flex; justify-content: space-between; align-items: center; }
.req-meta { font-size: 11px; color: var(--text3); }
.req-actions { display: flex; gap: 8px; }
.btn-accept { background: var(--brand); color: #fff; border: none; border-radius: var(--radius-sm); padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.btn-decline { background: var(--surface2); color: var(--text2); border: none; border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; cursor: pointer; font-family: var(--font-body); }

.scheduled-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sched-time { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--brand); min-width: 80px; }
.sched-info { flex: 1; }
.sched-name { font-size: 14px; font-weight: 600; color: var(--text); }
.sched-desc { font-size: 12px; color: var(--text2); }
.sched-status { font-size: 11px; font-weight: 600; color: var(--success); background: var(--success-bg); padding: 4px 10px; border-radius: 20px; }

/* ── PROFILE ── */
.profile-hero-card {
  margin: 20px;
  background: var(--surface2);
  border-radius: var(--radius-xl);
  padding: 28px 20px 20px;
  text-align: center;
}
.profile-big-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700;
  margin: 0 auto 14px;
}
.profile-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.profile-role-badge {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  padding: 4px 14px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 20px;
  margin-bottom: 20px;
}
.profile-stats-row { display: flex; justify-content: space-around; }
.pstat { text-align: center; }
.pstat-val { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); }
.pstat-label { font-size: 11px; color: var(--text3); margin-top: 2px; }

.menu-group { margin: 0 20px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
  background: var(--surface);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--surface2); }
.menu-icon { font-size: 18px; width: 24px; text-align: center; }
.menu-label { flex: 1; font-size: 15px; color: var(--text); }
.menu-arrow { color: var(--text3); font-size: 18px; }
.menu-item.danger .menu-label { color: var(--danger); }
.app-version { text-align: center; font-size: 12px; color: var(--text3); padding: 8px 0 24px; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1A1A1A;
  color: #fff;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── EXTRA COMPONENTS ─────────────────────── */
.form-error{color:var(--danger);font-size:13px;padding:6px 0;display:none}
.loading-state{text-align:center;padding:32px 20px;color:var(--text3);font-size:14px}
.empty-state{text-align:center;padding:32px 20px;color:var(--text3);font-size:14px}
.global-loader{position:fixed;inset:0;background:rgba(255,255,255,0.85);display:flex;align-items:center;justify-content:center;z-index:9999}
.loader-spinner{width:36px;height:36px;border:3px solid var(--border);border-top-color:var(--brand);border-radius:50%;animation:spin 0.7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.tabs-row{display:flex;gap:8px;padding:16px 20px 8px}
.tab-pill{flex:1;text-align:center;padding:9px 4px;border:1px solid var(--border);border-radius:20px;font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;transition:all .15s}
.tab-pill.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.booking-history-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px;margin-bottom:12px}
.bh-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.bh-worker{font-family:var(--font-display);font-size:15px;font-weight:700}
.bh-status.completed{color:var(--success)}.bh-status.pending{color:var(--warn)}
.bh-status.accepted{color:#1565C0}.bh-status.cancelled,.bh-status.rejected{color:var(--danger)}
.bh-detail{font-size:12px;color:var(--muted);margin-bottom:2px}
.bh-addr{font-size:12px;color:var(--text3)}
.bh-price{font-family:var(--font-display);font-size:15px;font-weight:700;color:var(--brand);margin-top:6px}
.btn-review{margin-top:10px;background:var(--brand);color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;width:100%;font-family:var(--font-body)}
.btn-cancel{margin-top:10px;background:transparent;color:var(--danger);border:1px solid var(--danger);border-radius:8px;padding:7px 16px;font-size:13px;cursor:pointer;width:100%;font-family:var(--font-body)}
.req-addr{font-size:12px;color:var(--text3);margin-bottom:8px}
.stars-row{display:flex;justify-content:center;gap:12px;font-size:40px;cursor:pointer}
.star{transition:transform .1s;color:var(--warn)}
.star:hover{transform:scale(1.2)}
.review-item{margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--border)}
.review-item:last-child{border-bottom:none}
.review-header{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.review-avatar{width:32px;height:32px;border-radius:50%;background:var(--surface2);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:var(--text2);flex-shrink:0}
.review-author{font-size:13px;font-weight:600}
.review-stars{font-size:13px;color:var(--warn)}
.review-text{font-size:13px;color:var(--muted);line-height:1.5;padding-left:42px}

/* ── V2 EXTRAS ──────────────────────────────── */
.has-nav .scroll-body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.empty-state-big { display:flex;flex-direction:column;align-items:center;justify-content:center;padding:60px 20px;text-align:center; }
.form-error { color:#C62828;font-size:13px;padding:6px 0;display:none; }
.loading-state { text-align:center;padding:32px 20px;color:#999;font-size:14px; }
.empty-state { text-align:center;padding:32px 20px;color:#999;font-size:14px; }
.global-loader { position:fixed;inset:0;background:rgba(255,255,255,0.85);display:flex;align-items:center;justify-content:center;z-index:9999; }
.loader-spinner { width:36px;height:36px;border:3px solid rgba(0,0,0,0.08);border-top-color:#E8541A;border-radius:50%;animation:spin 0.7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.tabs-row { display:flex;gap:8px;padding:16px 20px 8px; }
.tab-pill { flex:1;text-align:center;padding:9px 4px;border:1px solid rgba(0,0,0,0.1);border-radius:20px;font-size:13px;font-weight:500;color:#666;cursor:pointer;transition:all .15s; }
.tab-pill.active { background:#E8541A;color:#fff;border-color:#E8541A; }
.booking-history-card { background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:18px;padding:14px;margin-bottom:12px; }
.bh-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:6px; }
.bh-worker { font-family:'Syne',sans-serif;font-size:15px;font-weight:700; }
.bh-status.completed { color:#2E7D32; }
.bh-status.pending { color:#B8860B; }
.bh-status.accepted { color:#1565C0; }
.bh-status.in_progress { color:#1565C0; }
.bh-status.cancelled,.bh-status.rejected { color:#C62828; }
.bh-detail { font-size:12px;color:#666;margin-bottom:2px; }
.bh-addr { font-size:12px;color:#999; }
.bh-price { font-family:'Syne',sans-serif;font-size:15px;font-weight:700;color:#E8541A;margin-top:6px; }
.btn-review { margin-top:10px;background:#E8541A;color:#fff;border:none;border-radius:8px;padding:8px 16px;font-size:13px;font-weight:600;cursor:pointer;width:100%;font-family:'DM Sans',sans-serif; }
.btn-cancel { margin-top:10px;background:transparent;color:#C62828;border:1px solid #C62828;border-radius:8px;padding:7px 16px;font-size:13px;cursor:pointer;width:100%;font-family:'DM Sans',sans-serif; }
.stars-row { display:flex;justify-content:center;gap:12px;font-size:40px;cursor:pointer; }
.star { transition:transform .1s;color:#B8860B; }
.star:hover { transform:scale(1.2); }
.review-item { margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid rgba(0,0,0,0.08); }
.review-item:last-child { border-bottom:none; }
.review-header { display:flex;align-items:center;gap:10px;margin-bottom:4px; }
.review-avatar { width:32px;height:32px;border-radius:50%;background:#F7F6F3;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;color:#555;flex-shrink:0; }
.review-author { font-size:13px;font-weight:600; }
.review-stars { font-size:13px;color:#B8860B; }
.review-text { font-size:13px;color:#555;line-height:1.5;padding-left:42px; }
.req-addr { font-size:12px;color:#999;margin-bottom:8px; }
.info-card-text h3 { font-family:'Syne',sans-serif;font-size:15px;font-weight:700;margin:0 0 8px; }
.info-card-text p { font-size:14px;color:#666;line-height:1.6;margin-bottom:16px; }
.info-card-text a { color:#E8541A; }
.toggle-label { position:relative;display:inline-block;width:44px;height:24px;margin-left:auto; }
.toggle-label input { opacity:0;width:0;height:0; }
.toggle-slider { position:absolute;inset:0;background:#ccc;border-radius:24px;transition:.2s; }
.toggle-slider:before { content:'';position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s; }
.toggle-label input:checked + .toggle-slider { background:#E8541A; }
.toggle-label input:checked + .toggle-slider:before { transform:translateX(20px); }

.splash-logo-img{text-align:center;margin-bottom:12px}

/* ── CHAT ─────────────────────────────────────────────── */
.msg-dot{display:inline-block;width:8px;height:8px;background:#E8541A;border-radius:50%;margin-left:3px;vertical-align:middle;animation:pulse-dot 1.5s infinite}
@keyframes pulse-dot{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.8)}}

.chat-header{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);background:var(--surface);flex-shrink:0;position:sticky;top:0;z-index:10}
.chat-header-info{display:flex;align-items:center;gap:10px;flex:1;min-width:0}
.chat-header-avatar{width:38px;height:38px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-family:'Syne',sans-serif;font-size:14px;font-weight:700;flex-shrink:0}
.chat-header-name{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;color:var(--text)}
.chat-header-status{font-size:11px;color:var(--success)}

.chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:8px;background:#F7F6F3;-webkit-overflow-scrolling:touch}
.chat-messages::-webkit-scrollbar{display:none}

.msg-bubble{max-width:78%;padding:10px 14px;border-radius:18px;font-size:14px;line-height:1.45;position:relative;word-break:break-word}
.msg-bubble.mine{background:var(--brand);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.msg-bubble.theirs{background:#fff;color:var(--text);border-bottom-left-radius:4px;align-self:flex-start;box-shadow:0 1px 3px rgba(0,0,0,0.08)}
.msg-meta{font-size:10px;margin-top:4px;opacity:.65}
.msg-bubble.mine .msg-meta{text-align:right}
.msg-sender{font-size:11px;font-weight:600;color:var(--brand);margin-bottom:2px}

.chat-day-divider{text-align:center;font-size:11px;color:var(--muted);padding:4px 0;margin:4px 0}

.chat-typing{padding:6px 16px;font-size:12px;color:var(--muted);background:#F7F6F3;flex-shrink:0}
.typing-dots span{animation:blink 1.2s infinite;animation-fill-mode:both}
.typing-dots span:nth-child(2){animation-delay:.2s}
.typing-dots span:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,80%,100%{opacity:0}40%{opacity:1}}

.chat-input-bar{display:flex;gap:10px;padding:10px 14px;border-top:1px solid var(--border);background:var(--surface);flex-shrink:0;padding-bottom:calc(10px + env(safe-area-inset-bottom));position:relative;z-index:1001}
.chat-input{flex:1;border:1px solid var(--border-med);border-radius:22px;padding:10px 16px;font-size:14px;font-family:'DM Sans',sans-serif;background:var(--surface2);outline:none;color:var(--text)}
.chat-input:focus{border-color:var(--brand);background:var(--surface)}
.chat-send-btn{width:42px;height:42px;border-radius:50%;background:var(--brand);border:none;color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s}
.chat-send-btn:active{background:var(--brand-dark)}

/* INBOX */
.inbox-item{display:flex;align-items:center;gap:12px;padding:14px 20px;border-bottom:1px solid var(--border);cursor:pointer;transition:background .1s;background:var(--surface)}
.inbox-item:active{background:var(--surface2)}
.inbox-item.unread{background:#FFF8F5}
.inbox-avatar{width:48px;height:48px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'Syne',sans-serif;font-size:17px;font-weight:700;flex-shrink:0}
.inbox-info{flex:1;min-width:0}
.inbox-name{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;color:var(--text);margin-bottom:2px}
.inbox-preview{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inbox-right{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}
.inbox-time{font-size:11px;color:var(--text3)}
.inbox-unread-badge{background:var(--brand);color:#fff;border-radius:50%;width:20px;height:20px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}

/* ── CHAT FILTER WARNING ────────────────────────────── */
#chat-filter-warn{animation:slideUp .3s ease}
@keyframes slideUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* Placeholder chat input */
.chat-input::placeholder{color:#aaa}

/* ── SCHEDULE ────────────────────────────────────────── */
#schedule-calendar table th,
#schedule-calendar table td { border: none; }
#schedule-calendar { margin-bottom: 8px; }

/* ── WORKER NAV 5 BUTOANE ────────────────────────────── */
/* worker-only-nav same size as regular nav */

/* ── CUM FUNCȚIONEAZĂ ────────────────────────────────── */
.how-section-title{font-family:'Syne',sans-serif;font-size:13px;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:1px;padding:20px 0 10px;border-top:1px solid var(--border);margin-top:8px}
.how-section-title:first-of-type{border-top:none;margin-top:0}
.how-step{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.how-num{width:32px;height:32px;border-radius:50%;background:var(--brand);color:#fff;display:flex;align-items:center;justify-content:center;font-family:'Syne',sans-serif;font-size:14px;font-weight:800;flex-shrink:0;margin-top:2px}
.how-content{flex:1}
.how-title{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;color:var(--text);margin-bottom:4px}
.how-desc{font-size:13px;color:var(--muted);line-height:1.6}
.how-info-row{display:flex;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px;color:var(--text);line-height:1.5}

/* ── FAQ ─────────────────────────────────────────────── */
.faq-section{font-family:'Syne',sans-serif;font-size:13px;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:1px;padding:20px 0 10px;border-top:1px solid var(--border);margin-top:8px}
.faq-section:first-of-type{border-top:none;padding-top:16px}
.faq-item{border-bottom:1px solid var(--border);cursor:pointer}
.faq-q{display:flex;justify-content:space-between;align-items:center;padding:14px 0;font-size:14px;font-weight:600;color:var(--text);line-height:1.4;gap:8px}
.faq-arrow{font-size:20px;color:var(--muted);flex-shrink:0;transition:transform .2s;font-weight:400}
.faq-a{display:none;font-size:13px;color:var(--muted);line-height:1.7;padding-bottom:14px}
.faq-a a{color:var(--brand)}
.faq-item.open .faq-arrow{transform:rotate(90deg)}
.faq-item.open .faq-a{display:block}


/* ── IPHONE SAFE AREA FIX ────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    height: auto !important;
    min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }
  .has-nav .scroll-body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
  }
  #app {
    min-height: 100dvh;
  }
}
/* Fundalul body acopera toata zona inclusiv safe area */
body { background: #ffffff; }

/* ── FIX GLOBAL SAFE AREA ──────────────────────────────── */
html, body, #app {
  /* Umple tot ecranul fizic inclusiv notch si gesture bar */
  margin: 0 !important;
  padding: 0 !important;
}
#app {
  /* Inaltimea exacta a viewport-ului vizibil */
  height: 100dvh !important;
  padding-bottom: 0 !important;
}
/* splash fix aplicat mai sus */
/* ── BROADCAST ───────────────────────────────────────── */
.broadcast-banner {
  margin: 16px 20px;
  background: linear-gradient(135deg, #FDF1EC, #fff);
  border: 2px solid var(--brand);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s;
}
.broadcast-banner:active { transform: scale(0.98); }
.broadcast-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.broadcast-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.broadcast-btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 11px 16px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
/* Card broadcast la mester */
.broadcast-req {
  border: 2px solid var(--brand) !important;
  animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,84,26,.3); }
  50%      { box-shadow: 0 0 0 6px rgba(232,84,26,0); }
}
.broadcast-req-badge {
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px 8px 0 0;
  margin: -14px -14px 10px -14px;
  text-align: center;
}
.uber-accept {
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 700 !important;
  animation: pulse-btn 1.5s infinite;
}
@keyframes pulse-btn {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.uber-accept:active { transform: scale(0.95) !important; animation: none !important; }


/* ── GLOBAL NAV ──────────────────────────────────────── */
.global-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
}
#client-global-nav,
#worker-global-nav {
  display: flex;
  width: 100%;
  align-items: center;
}
.has-nav .scroll-body {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}


/* chat screen uses JS to hide global nav */

/* ── TRACKING & NAVIGATE ─────────────────────────────── */
.btn-nav-waze {
  background: #1A237E;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  flex: 1;
}
.btn-nav-waze:active { opacity: 0.85; }
#screen-tracking {
  display: none;
  flex-direction: column;
}
#screen-tracking.active {
  display: flex;
}
#tracking-map {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#tracking-map-inner {
  flex: 1;
  min-height: 250px;
}


/* ── SCREEN DETAIL FIX ───────────────────────────────── */
#screen-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
#screen-detail .scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
  width: 100%;
}
#screen-detail .sticky-book-bar {
  flex-shrink: 0;
  width: 100%;
}
/* Tracking screen fix */
#screen-tracking {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#tracking-map {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#tracking-map-inner {
  flex: 1;
  min-height: 0;
}
#tracking-info {
  flex-shrink: 0;
}