/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 22px;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  font-family: var(--font-family);
  line-height: 1;
  letter-spacing: -0.2px;
  transition: all 0.15s ease;
  min-height: 52px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  user-select: none;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }

.btn-primary  { background: var(--color-primary); color: var(--white); box-shadow: 0 2px 12px rgba(0,122,255,0.28); }
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary { background: var(--gray-100); color: var(--color-text); }
.btn-secondary:hover { background: var(--gray-200); }

.btn-outline   { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-ghost     { background: transparent; color: var(--color-primary); border: none; }
.btn-ghost:hover { background: var(--color-primary-light); }

.btn-white     { background: rgba(255,255,255,0.95); color: var(--color-primary); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-white:hover { background: rgba(255,255,255,1); }

.btn-danger    { background: var(--color-danger); color: var(--white); }
.btn-success   { background: var(--color-success); color: var(--white); }

.btn-lg   { padding: 16px 28px; font-size: var(--text-lg); min-height: 56px; }
.btn-sm   { padding: 8px 16px; font-size: var(--text-sm); min-height: 38px; border-radius: var(--radius-md); }
.btn-xs   { padding: 6px 12px; font-size: var(--text-xs); min-height: 30px; border-radius: var(--radius-md); }

.btn-icon    { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon-lg { width: 52px; height: 52px; min-height: 52px; }

.btn svg, .btn-icon svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-lg svg { width: 20px; height: 20px; }

/* ==============================
   INPUTS
   ============================== */
.form-group  { display: flex; flex-direction: column; gap: var(--space-2); }
.form-label  { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--color-text); letter-spacing: -0.1px; }
.form-hint   { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--gray-100);
  transition: background 0.15s, outline 0.15s;
  min-height: 52px;
}
.form-input:focus {
  outline: 2px solid var(--color-primary);
  background: var(--color-surface);
}
.form-input::placeholder { color: var(--color-text-muted); }

.input-with-icon         { position: relative; }
.input-with-icon .form-input { padding-left: 44px; }
.input-with-icon .input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--color-text-muted); display: flex; align-items: center;
}
.input-with-icon .input-icon svg { width: 18px; height: 18px; }

.form-select {
  appearance: none;
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--gray-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636366' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
  min-height: 52px;
}
.form-select:focus { outline: 2px solid var(--color-primary); background-color: var(--color-surface); }

.otp-group { display: flex; gap: var(--space-2); }
.otp-input {
  flex: 1; padding: 16px 8px; border: none;
  border-radius: var(--radius-md); font-size: var(--text-2xl); font-weight: var(--font-bold);
  text-align: center; color: var(--color-text); background: var(--gray-100); min-height: 64px;
}
.otp-input:focus { outline: 2px solid var(--color-primary); background: var(--color-surface); }

/* ==============================
   SCREEN HEADER
   ============================== */
.screen-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(60, 60, 67, 0.12);
  min-height: var(--header-height);
  flex-shrink: 0;
}
.screen-header.transparent { background: transparent; border-bottom: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.screen-header.white-bg    { background: var(--white); }

.header-back {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--gray-100); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; cursor: pointer; border: none;
  transition: background 0.15s;
}
.header-back:active { background: var(--gray-200); }
.header-back svg { width: 18px; height: 18px; color: var(--gray-700); }

.header-title  { font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--color-text); flex: 1; letter-spacing: -0.2px; }
.header-action { font-size: var(--text-sm); color: var(--color-primary); font-weight: var(--font-medium); cursor: pointer; }

/* ==============================
   CARDS
   ============================== */
.card          { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-4); border: none; box-shadow: var(--shadow-sm); }
.card-elevated { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-md); }

/* ==============================
   PRO CARD
   ============================== */
.pro-card {
  background: var(--color-surface); border-radius: var(--radius-xl);
  padding: var(--space-4); border: none;
  box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.15s ease;
}
.pro-card:active { transform: scale(0.985); box-shadow: var(--shadow-md); }

.pro-card-header { display: flex; gap: var(--space-3); align-items: flex-start; }

.pro-avatar {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: var(--font-bold); color: var(--white);
  flex-shrink: 0; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
}
.pro-avatar.lg { width: 72px; height: 72px; font-size: 24px; }

.pro-card-info    { flex: 1; min-width: 0; }
.pro-name         { font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--color-text); letter-spacing: -0.2px; }
.pro-business     { font-size: var(--text-sm); color: var(--color-text-secondary); margin-top: 1px; }

.pro-rating       { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.pro-rating .star { color: var(--amber-400); font-size: 13px; }
.pro-rating .score{ font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--color-text); }
.pro-rating .count{ font-size: var(--text-sm); color: var(--color-text-secondary); }

.pro-card-tags    { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-3); }

.pro-card-footer  {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: 0.5px solid var(--gray-200);
}

.pro-price-label  { font-size: var(--text-sm); color: var(--color-text-secondary); }
.pro-price        { font-size: var(--text-base); font-weight: var(--font-bold); color: var(--color-text); }

/* ==============================
   CATEGORY GRID
   ============================== */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.category-grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }

.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px var(--space-2) 12px;
  background: var(--color-surface); border-radius: var(--radius-xl) !important;
  border: none; box-shadow: var(--shadow-sm);
  cursor: pointer; transition: all 0.15s ease; text-align: center;
}
.category-card:active  { transform: scale(0.93); box-shadow: none; background: var(--color-primary-light); }
.category-card.selected{ background: var(--color-primary-light); box-shadow: 0 0 0 2px var(--color-primary); }

.category-icon  { font-size: 26px; line-height: 1; }
.category-label { font-size: 11px; font-weight: var(--font-medium); color: var(--color-text); line-height: 1.25; }

/* ==============================
   CHIPS / FILTERS
   ============================== */
.chip-row {
  display: flex; gap: var(--space-2); overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding-bottom: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: var(--font-medium);
  white-space: nowrap; cursor: pointer;
  border: none;
  background: var(--gray-100); color: var(--color-text);
  transition: all 0.12s;
}
.chip:active, .chip.active { background: var(--color-primary); color: var(--white); }
.chip svg { width: 14px; height: 14px; }

/* filter-chip alias */
.filter-chip { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: var(--font-medium); white-space: nowrap; cursor: pointer; border: none; background: var(--gray-100); color: var(--color-text); transition: all 0.12s; }
.filter-chip.active { background: var(--color-primary); color: var(--white); }

/* ==============================
   BADGES
   ============================== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: var(--font-semibold); letter-spacing: 0.1px;
  border: none;
}
.badge-available   { background: var(--color-success-light); color: var(--color-success); }
.badge-unavailable { background: var(--gray-100); color: var(--color-text-secondary); }
.badge-insured     { background: var(--color-primary-light); color: var(--color-primary); }
.badge-licensed    { background: rgba(255, 159, 10, 0.12); color: #C2410C; }
.badge-primary     { background: var(--color-primary-light); color: var(--color-primary); }
.badge-success     { background: rgba(52, 199, 89, 0.12); color: var(--color-success); }
.badge-warning     { background: rgba(255, 159, 10, 0.12); color: var(--color-warning); }
.badge-danger      { background: rgba(255, 59, 48, 0.10); color: var(--color-danger); }
.badge-info        { background: var(--color-primary-light); color: var(--color-primary); }
.badge-dot { width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; display: inline-block; }

/* ==============================
   SEARCH BAR
   ============================== */
.search-bar {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--gray-100); border: none;
  border-radius: var(--radius-lg); padding: 10px 14px;
  cursor: text; min-height: 44px;
}
.search-bar svg             { width: 20px; height: 20px; color: var(--color-text-muted); flex-shrink: 0; }
.search-bar-text            { flex: 1; font-size: var(--text-base); color: var(--color-text-muted); }
.search-bar-mic             { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--color-primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-bar-mic svg         { width: 16px; height: 16px; color: var(--color-primary); }

/* ==============================
   BOTTOM NAV
   ============================== */
#bottom-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid rgba(60, 60, 67, 0.15);
  height: calc(68px + env(safe-area-inset-bottom));
  padding: 0 8px calc(4px + env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; padding: 8px 4px;
  cursor: pointer; transition: color 0.12s; color: var(--color-text-muted);
  border: none; background: none; font-family: var(--font-family);
}
.nav-item svg  { width: 24px; height: 24px; }
.nav-item span { font-size: 10px; font-weight: var(--font-medium); letter-spacing: 0.2px; }
.nav-item.active { color: var(--color-primary); }

/* ==============================
   SECTION
   ============================== */
.section    { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.section-sm { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }

.section-header  { display: flex; align-items: center; justify-content: space-between; }
.section-title   { font-size: var(--text-base); font-weight: var(--font-bold); color: var(--color-text); letter-spacing: -0.3px; }
.section-link    { font-size: var(--text-sm); color: var(--color-primary); font-weight: var(--font-medium); cursor: pointer; }

/* ==============================
   LIST
   ============================== */
.list-group { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: none; }
.list-item  {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4);
  cursor: pointer; transition: background 0.1s; border-bottom: 0.5px solid var(--gray-200);
}
.list-item:last-child { border-bottom: none; }
.list-item:active     { background: var(--gray-100); }

.list-item-icon    { width: 36px; height: 36px; border-radius: var(--radius-md); background: var(--gray-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-item-icon svg{ width: 18px; height: 18px; color: var(--color-text-secondary); }
.list-item-content { flex: 1; }
.list-item-title   { font-size: var(--text-base); font-weight: var(--font-medium); color: var(--color-text); }
.list-item-subtitle{ font-size: var(--text-sm); color: var(--color-text-secondary); margin-top: 1px; }
.list-item-arrow svg{ width: 16px; height: 16px; color: var(--gray-300); }

/* ==============================
   DIVIDER
   ============================== */
.divider { height: 0.5px; background: var(--color-border); }
.section-gap { height: var(--space-3); background: var(--gray-100); }

.divider-text { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 0.5px; background: var(--color-border); }

/* ==============================
   PAYMENT METHOD
   ============================== */
.payment-option {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4); background: var(--white);
  border-radius: var(--radius-md); border: 1.5px solid var(--color-border);
  cursor: pointer; transition: all 0.12s;
}
.payment-option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }

.payment-radio {
  width: 20px; height: 20px; border-radius: var(--radius-full);
  border: 2px solid var(--color-border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.payment-option.selected .payment-radio { border-color: var(--color-primary); background: var(--color-primary); }
.payment-option.selected .payment-radio::after { content: ''; width: 7px; height: 7px; border-radius: var(--radius-full); background: white; }

.payment-label { font-size: var(--text-base); font-weight: var(--font-medium); color: var(--color-text); }
.payment-sub   { font-size: var(--text-sm); color: var(--color-text-secondary); margin-top: 1px; }

/* ==============================
   CHAT
   ============================== */
.chat-container { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.chat-container::-webkit-scrollbar { display: none; }

.chat-message     { display: flex; flex-direction: column; gap: 4px; }
.chat-message.bot { align-items: flex-start; }
.chat-message.user{ align-items: flex-end; }

.chat-bubble {
  max-width: 82%; padding: var(--space-3) var(--space-4);
  border-radius: 18px; font-size: var(--text-base); line-height: 1.5;
}
.chat-bubble.bot  { background: var(--gray-100); border: none; border-bottom-left-radius: 4px; color: var(--color-text); }
.chat-bubble.user { background: var(--color-primary); color: var(--white); border-radius: 18px 18px 4px 18px; }

.chat-time { font-size: var(--text-xs); color: var(--color-text-muted); }

.chat-input-row   {
  display: flex; align-items: flex-end; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); background: var(--white);
  border-top: 0.5px solid var(--color-border);
}
.chat-input {
  flex: 1; padding: 10px 14px; border: none;
  border-radius: var(--radius-xl); font-size: var(--text-base);
  resize: none; max-height: 100px; font-family: var(--font-family);
  line-height: 1.5; transition: background 0.15s; background: var(--gray-100);
}
.chat-input:focus { outline: 2px solid var(--color-primary); background: var(--white); }

/* ==============================
   AI CHAT — DEMO BAR
   ============================== */
.chat-demo-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 24px;
  background: var(--color-surface);
  border-top: 0.5px solid var(--color-border);
}

.chat-demo-steps {
  display: flex;
  gap: 6px;
  align-items: center;
}

.demo-step {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  background: var(--gray-200);
  transition: all 0.3s ease;
}

.demo-step.active {
  background: var(--color-primary);
  width: 22px;
  border-radius: 4px;
}

.demo-step.done {
  background: var(--color-success);
}

.chat-demo-hint {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-align: center;
  margin: 0;
}

.chat-mic-btn {
  width: 64px; height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 122, 255, 0.38);
  transition: transform 0.15s, box-shadow 0.15s;
}

.chat-mic-btn:active { transform: scale(0.94); }

.chat-mic-btn.listening {
  animation: micPulse 0.75s ease-out forwards;
}

@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0   rgba(0, 122, 255, 0.55); transform: scale(1.08); }
  60%  { box-shadow: 0 0 0 18px rgba(0, 122, 255, 0);   transform: scale(1.08); }
  100% { box-shadow: 0 4px 20px rgba(0, 122, 255, 0.38); transform: scale(1); }
}

/* Photo bubble */
.chat-photo-bubble { padding: 10px !important; min-width: 180px; }

.chat-photo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

.chat-photo-meta { display: flex; flex-direction: column; gap: 2px; }
.chat-photo-name { font-size: var(--text-sm); font-weight: var(--font-semibold); }
.chat-photo-size { font-size: var(--text-xs); opacity: 0.75; }

/* Job suggestion card */
.chat-job-card { padding: 14px !important; max-width: 260px; }

.job-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.job-card-emoji { font-size: 30px; line-height: 1; }

.job-card-info { flex: 1; }
.job-card-title { font-size: var(--text-lg); font-weight: var(--font-bold); color: var(--color-text); }
.job-card-sub   { font-size: var(--text-xs); color: var(--color-text-secondary); }

.job-card-badge {
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.job-card-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 0;
  border-top: 0.5px solid var(--color-border);
  border-bottom: 0.5px solid var(--color-border);
  margin-bottom: 2px;
}

.job-card-row { font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ==============================
   SCHEDULE
   ============================== */
.schedule-option {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4); background: var(--white);
  border-radius: var(--radius-md); border: 1.5px solid var(--color-border);
  cursor: pointer; transition: all 0.12s;
}
.schedule-option.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.schedule-radio {
  width: 20px; height: 20px; border-radius: var(--radius-full);
  border: 2px solid var(--color-border); flex-shrink: 0; transition: all 0.12s;
}
.schedule-option.selected .schedule-radio { border-color: var(--color-primary); background: var(--color-primary); box-shadow: inset 0 0 0 3px var(--white); }
.schedule-option-icon { font-size: 22px; flex-shrink: 0; }
.schedule-option-content { flex: 1; }
.schedule-option-title   { font-size: var(--text-base); font-weight: var(--font-semibold); color: var(--color-text); }
.schedule-option-sub     { font-size: var(--text-sm); color: var(--color-text-secondary); margin-top: 1px; }

/* ==============================
   SERVICE ITEM
   ============================== */
.service-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); background: var(--white);
  border-radius: var(--radius-md); border: none; box-shadow: var(--shadow-sm);
}
.service-name          { font-size: var(--text-base); font-weight: var(--font-medium); color: var(--color-text); }
.service-desc          { font-size: var(--text-sm); color: var(--color-text-secondary); margin-top: 2px; }
.service-price-from    { font-size: var(--text-xs); color: var(--color-text-secondary); }
.service-price-amount  { font-size: var(--text-base); font-weight: var(--font-bold); color: var(--color-text); }

/* ==============================
   PROGRESS STEPS (onboarding)
   ============================== */
.progress-steps { display: flex; align-items: center; gap: var(--space-1); padding: var(--space-3) var(--space-5) 0; }
.progress-step  { flex: 1; height: 4px; border-radius: var(--radius-full); background: var(--gray-200); transition: background 0.3s; }
.progress-step.done   { background: var(--color-primary); }
.progress-step.active { background: var(--color-primary); opacity: 0.5; }

/* ==============================
   EMPTY STATE
   ============================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: var(--space-12) var(--space-8);
  gap: var(--space-3); text-align: center; flex: 1;
}
.empty-state-icon  { font-size: 52px; line-height: 1; }
.empty-state-title { font-size: var(--text-lg); font-weight: var(--font-semibold); color: var(--color-text); }
.empty-state-desc  { font-size: var(--text-base); color: var(--color-text-secondary); line-height: 1.5; }

/* ==============================
   TOAST
   ============================== */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: rgba(40, 40, 40, 0.92); color: var(--white); padding: 12px 20px;
  border-radius: var(--radius-lg); font-size: var(--text-sm); font-weight: var(--font-medium);
  z-index: 9999; white-space: nowrap; animation: toastIn 0.2s ease-out;
  box-shadow: var(--shadow-md); pointer-events: none;
  border: none;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==============================
   ORDER SUMMARY
   ============================== */
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-3) 0; border-bottom: 0.5px solid var(--gray-200);
}
.summary-row:last-child { border-bottom: none; }
.summary-label { font-size: var(--text-sm); color: var(--color-text-secondary); }
.summary-value { font-size: var(--text-sm); font-weight: var(--font-medium); color: var(--color-text); text-align: right; }
.summary-total-label { font-size: var(--text-base); font-weight: var(--font-bold); color: var(--color-text); }
.summary-total-value { font-size: var(--text-lg); font-weight: var(--font-bold); color: var(--color-primary); }

/* ==============================
   AVATAR GRADIENT COLORS (by initial)
   ============================== */
.avatar-a, .avatar-m { background: linear-gradient(135deg, #007AFF, #0A84FF); }
.avatar-b, .avatar-n { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.avatar-c, .avatar-o { background: linear-gradient(135deg, #34C759, #30D158); }
.avatar-d, .avatar-p { background: linear-gradient(135deg, #FF3B30, #FF6961); }
.avatar-e, .avatar-r { background: linear-gradient(135deg, #FF9F0A, #FFD60A); color: #000000 !important; }
.avatar-f, .avatar-s { background: linear-gradient(135deg, #32ADE6, #64D2FF); }
.avatar-g, .avatar-t { background: linear-gradient(135deg, #FF375F, #FF6B9D); }
.avatar-h, .avatar-u { background: linear-gradient(135deg, #7C3AED, #C084FC); }
.avatar-i, .avatar-v { background: linear-gradient(135deg, #30D158, #34C759); }
.avatar-j, .avatar-w { background: linear-gradient(135deg, #FF9F0A, #FFD60A); color: #000000 !important; }
.avatar-k, .avatar-x { background: linear-gradient(135deg, #5AC8FA, #32ADE6); }
.avatar-l, .avatar-y { background: linear-gradient(135deg, #FF6B35, #FF9F0A); }
.avatar-z            { background: linear-gradient(135deg, #5E5CE6, #BF5AF2); }

/* ==============================
   TRACKING SCREEN
   ============================== */
.tracking-screen { display: flex; flex-direction: column; height: 100%; background: #F2F2F7; }

.tracking-eta-banner {
  background: white;
  padding: 14px 20px 12px;
  text-align: center;
  border-bottom: 0.5px solid var(--color-border);
  flex-shrink: 0;
}
.tracking-eta-label  { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.tracking-eta-time   { font-size: 42px; font-weight: 800; color: var(--color-text); letter-spacing: -2px; line-height: 1.1; margin: 2px 0; }
.tracking-eta-status { font-size: 13px; color: var(--color-text-secondary); font-weight: 500; }

/* Map */
.tracking-map        { flex: 1; position: relative; overflow: hidden; min-height: 180px; }
.tracking-map-bg     { position: absolute; inset: 0; background: #E8ECD4; overflow: hidden; }

.map-block {
  position: absolute;
  background: #D4D9BF;
  border-radius: 3px;
}

.map-road {
  position: absolute;
  background: white;
}
.map-road.h { height: 8px; left: 0; right: 0; }
.map-road.v { width:  8px; top:  0; bottom: 0; }

.map-route-svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Pro pin */
.map-pro-pin {
  position: absolute;
  bottom: 28%;
  left: 17%;
  display: flex; align-items: center; justify-content: center;
  animation: proMove 12s ease-in-out infinite alternate;
}
@keyframes proMove {
  0%   { left: 17%; bottom: 28%; }
  100% { left: 42%; bottom: 36%; }
}
.map-car-dot {
  width: 38px; height: 38px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,122,255,0.4);
  z-index: 2;
}
.map-pin-ring {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(0,122,255,0.35);
  animation: ringPulse 2s ease-out infinite;
}
@keyframes ringPulse {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* Home pin */
.map-home-pin {
  position: absolute;
  top: 16%;
  right: 16%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: homeBounce 2.5s ease-in-out infinite;
}
@keyframes homeBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.map-home-dot   { font-size: 30px; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); }
.map-home-label { font-size: 10px; font-weight: 700; color: var(--color-text); background: white; padding: 2px 6px; border-radius: 99px; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }

/* ETA badge on map */
.map-eta-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

/* Pro card */
.tracking-pro-card {
  background: white;
  padding: 16px 20px;
  border-top: 0.5px solid var(--color-border);
  display: flex; flex-direction: column; gap: 14px;
  flex-shrink: 0;
}
.tracking-pro-row    { display: flex; align-items: center; gap: 12px; }
.tracking-actions-row { display: flex; gap: 8px; }

.tracking-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-border);
  background: var(--gray-50);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  font-family: var(--font-family);
}
.tracking-btn svg { flex-shrink: 0; }
.tracking-btn-outline {
  color: var(--color-danger);
  border-color: var(--color-danger-light);
  background: var(--color-danger-light);
  flex: 1.4;
}

/* ==============================
   LEAFLET CUSTOM MARKERS
   ============================== */
.lf-car-wrap {
  position: relative;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}
.lf-car-dot {
  width: 42px; height: 42px;
  background: #007AFF;
  border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 3px 12px rgba(0,122,255,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; position: relative;
}
.lf-car-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(0,122,255,0.3);
  animation: lf-ring-pulse 2s ease-out infinite;
}
@keyframes lf-ring-pulse {
  0%   { transform: scale(0.75); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}
.lf-home-wrap { font-size: 34px; filter: drop-shadow(0 3px 7px rgba(0,0,0,0.3)); animation: lf-home-bounce 2.5s ease-in-out infinite; }
@keyframes lf-home-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
/* Override Leaflet attribution to stay readable but small */
.leaflet-control-attribution { font-size: 9px !important; }

/* ==============================
   ACTIVE JOB BANNER (home)
   ============================== */
.active-job-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border-bottom: 2px solid var(--color-success);
  padding: 10px 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.active-job-pulse {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--color-success);
  animation: bannerPulse 1.5s ease-in-out infinite;
}
@keyframes bannerPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ==============================
   RATING SCREEN
   ============================== */
.rating-stars { display: flex; gap: 4px; }
.rating-star  { transition: transform 0.1s, color 0.1s; color: var(--gray-300); }
.rating-star:active { transform: scale(1.25) !important; }
.rating-tag.active { background: var(--color-primary-light); color: var(--color-primary); border-color: var(--color-primary); }

/* ==============================
   TRACKING — MAPBOX-STYLE LAYOUT
   ============================== */
.tracking-fullscreen {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #e8e0d5;
}

/* Frosted-glass header */
.tracking-header-overlay {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.tracking-header-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.2px;
}
.tracking-close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text);
  transition: background 0.15s;
}
.tracking-close-btn:active { background: rgba(0,0,0,0.15); }

/* ETA pill — floats centred over the map */
.tracking-eta-pill {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  background: white;
  border-radius: 99px;
  padding: 8px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18), 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.tracking-eta-pill-min {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.tracking-eta-pill-unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-right: 4px;
}
.tracking-eta-pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(52,199,89,0.2);
}
.tracking-eta-pill-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Bottom sheet — slides up from bottom */
.tracking-bottom-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  background: white;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(0,0,0,0.14);
}
.tracking-bottom-sheet::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: var(--gray-200);
  border-radius: 99px;
  margin: 0 auto 16px;
}

/* MapLibre custom markers */
.ml-car-marker {
  position: relative;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
}
.ml-car-dot {
  width: 42px; height: 42px;
  background: #1a73e8;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 4px 16px rgba(26,115,232,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; position: relative;
}
.ml-car-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2.5px solid rgba(26,115,232,0.25);
  animation: ml-ring 2s ease-out infinite;
}
@keyframes ml-ring {
  0%   { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.ml-home-marker {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.ml-home-dot {
  font-size: 30px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.3));
  animation: ml-home-bounce 2.5s ease-in-out infinite;
}
@keyframes ml-home-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
.ml-home-label {
  font-size: 11px; font-weight: 700;
  color: var(--color-text);
  background: white;
  padding: 2px 7px;
  border-radius: 99px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
/* Hide old tracking styles that conflict */
.tracking-screen { display: flex; flex-direction: column; height: 100%; }
