/* Uber Roots — Mobile-first styles */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --dark: #111827;
  --mid: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --accent: #a855f7;
  --accent-dark: #9333ea;
  --danger: #ef4444;
  --success: #22c55e;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

/* ===== UTILITIES ===== */
.container { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 20px; }
.container-wide { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 24px; border: none; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--dark); color: var(--white); border: 1px solid var(--border); }
.btn-secondary:hover { background: #1f2937; }
.btn-ghost { background: transparent; color: var(--accent); padding: 8px 16px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-lg { padding: 16px 32px; font-size: 1.125rem; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.text-center { text-align: center; }
.text-muted { color: var(--mid); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; } .mt-5 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.p-3 { padding: 16px; } .p-4 { padding: 24px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }

.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 9999px; font-size: .75rem; font-weight: 600;
}
.badge-purple { background: rgba(168,85,247,.2); color: #c084fc; }
.badge-green { background: rgba(34,197,94,.2); color: #4ade80; }
.badge-yellow { background: rgba(234,179,8,.2); color: #fbbf24; }
.badge-red { background: rgba(239,68,68,.2); color: #f87171; }

/* ===== FORM ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .875rem; font-weight: 600; color: #d1d5db; }
.form-control {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid #374151; background: #1f2937;
  color: var(--white); font-size: 1rem;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--accent); }
.form-control::placeholder { color: #6b7280; }
.form-error { color: var(--danger); font-size: .875rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9999px;
  border: 1px solid #374151; background: transparent;
  cursor: pointer; font-size: .875rem; color: #9ca3af;
  transition: all .2s;
}
.checkbox-pill input { display: none; }
.checkbox-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.checkbox-pill:hover { border-color: var(--accent); }

/* Range slider */
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ===== NAV ===== */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: rgba(10,10,10,.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.05);
  position: sticky; top: 0; z-index: 100;
}
.navbar-logo { font-size: 1.25rem; font-weight: 800; color: var(--white); letter-spacing: -0.5px; }
.navbar-logo span { color: var(--accent); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-actions a { font-size: .875rem; color: var(--mid); }
.navbar-actions a:hover { color: var(--white); }

/* ===== CARDS ===== */
.card {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden; box-shadow: var(--shadow);
}
.card:hover { border-color: rgba(168,85,247,.3); }

/* ===== PROVIDER GRID ===== */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 0;
}
.provider-card {
  position: relative; aspect-ratio: 3/4;
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer;
}
.provider-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.provider-card:hover img { transform: scale(1.03); }
.provider-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 12px; background: linear-gradient(transparent, rgba(0,0,0,.85));
  color: #fff;
}
.provider-card-name { font-weight: 700; font-size: .9rem; }
.provider-card-price { font-size: .8rem; color: #c084fc; }
.provider-card-verified { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; color: #4ade80; }

/* ===== SWIPE CARDS ===== */
.swipe-container {
  position: relative; width: 100%; max-width: 420px; margin: 0 auto;
  aspect-ratio: 3/4; overflow: visible;
}
.swipe-card {
  position: absolute; inset: 0; border-radius: var(--radius);
  overflow: hidden; cursor: grab; user-select: none;
  background: var(--dark); box-shadow: var(--shadow-lg);
}
.swipe-card:active { cursor: grabbing; }
.swipe-card img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.swipe-card-name { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.swipe-card-meta { color: #c084fc; font-size: .9rem; }
.swipe-card-services { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.swipe-actions {
  display: flex; justify-content: center; gap: 32px;
  padding: 24px 0;
}
.swipe-action-btn {
  width: 64px; height: 64px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.swipe-action-btn:hover { transform: scale(1.1); }
.swipe-action-pass { background: #374151; color: #9ca3af; }
.swipe-action-save { background: var(--accent); color: #fff; }
.swipe-action-chat { background: var(--success); color: #fff; }

/* ===== PHOTO GALLERY ===== */
.photo-gallery { display: flex; gap: 8px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.photo-gallery::-webkit-scrollbar { display: none; }
.photo-thumb {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color .2s;
}
.photo-thumb.active { border-color: var(--accent); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-gallery-full {
  position: relative; width: 100%; aspect-ratio: 4/3;
  border-radius: var(--radius); overflow: hidden; background: #1f2937;
}
.photo-gallery-full img { width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: none;
  cursor: pointer; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.gallery-arrow:hover { background: rgba(0,0,0,.8); }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }

/* ===== FILTER PANEL ===== */
.filter-panel {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  padding: 20px; margin-bottom: 16px;
}
.filter-row { margin-bottom: 16px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: .875rem; font-weight: 600; color: #d1d5db; margin-bottom: 8px; display: block; }

/* ===== BOOKING ===== */
.booking-card {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  padding: 16px; display: flex; gap: 16px; align-items: flex-start;
}
.booking-card img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; }
.booking-meta { font-size: .8rem; color: var(--mid); }
.status-chip {
  display: inline-block; padding: 2px 10px; border-radius: 9999px;
  font-size: .75rem; font-weight: 600;
}
.status-pending { background: rgba(234,179,8,.2); color: #fbbf24; }
.status-accepted { background: rgba(34,197,94,.2); color: #4ade80; }
.status-declined { background: rgba(239,68,68,.2); color: #f87171; }
.status-cancelled { background: rgba(107,114,128,.2); color: #9ca3af; }

/* ===== CHECKOUT ===== */
.checkout-card {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  padding: 24px; max-width: 480px; margin: 0 auto;
}
.privacy-note {
  display: flex; gap: 10px; padding: 12px 16px;
  background: rgba(168,85,247,.1); border-radius: var(--radius-sm);
  border: 1px solid rgba(168,85,247,.2); font-size: .875rem; color: #c084fc;
  margin-top: 16px;
}

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  padding: 32px 28px; width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 1.75rem; font-weight: 800; margin-bottom: 4px; }
.auth-subtitle { color: var(--mid); margin-bottom: 28px; }
.role-selector { display: flex; gap: 12px; margin-bottom: 24px; }
.role-option {
  flex: 1; padding: 16px; border-radius: var(--radius);
  border: 2px solid #374151; text-align: center; cursor: pointer;
  transition: all .2s;
}
.role-option:hover { border-color: var(--accent); }
.role-option.selected { border-color: var(--accent); background: rgba(168,85,247,.1); }
.role-option-title { font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.role-option-desc { font-size: .75rem; color: var(--mid); }

/* ===== LANDING ===== */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 80px 20px 60px; position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(168,85,247,.15) 0%, transparent 70%);
}
.hero-badge { margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4rem); font-weight: 900; letter-spacing: -1px; line-height: 1.05; margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.hero-sub { font-size: 1.125rem; color: var(--mid); max-width: 520px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.features { padding: 80px 20px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; max-width: 900px; margin: 0 auto; }
.feature-card {
  background: #111827; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.06);
  padding: 28px 24px;
}
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.125rem; margin-bottom: 8px; }
.feature-card p { color: var(--mid); font-size: .9rem; line-height: 1.6; }

/* ===== PROVIDER DASHBOARD ===== */
.dashboard-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.05); }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px; }
.stat-card { background: #1f2937; border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: .75rem; color: var(--mid); margin-top: 4px; }

/* ===== SETUP PAGE ===== */
.setup-page { padding: 20px; max-width: 600px; margin: 0 auto; }
.photo-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.photo-upload-slot {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  border: 2px dashed #374151; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative;
  transition: border-color .2s; background: #1f2937;
}
.photo-upload-slot:hover { border-color: var(--accent); }
.photo-upload-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-slot .slot-icon { font-size: 1.5rem; color: #6b7280; }
.upload-remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(239,68,68,.9); color: #fff; border: none;
  cursor: pointer; font-size: .75rem; display: flex; align-items: center; justify-content: center;
}

/* ===== LOADER ===== */
.loading-spinner {
  display: flex; align-items: center; justify-content: center; padding: 40px;
  color: var(--mid); gap: 12px;
}
.loading-spinner::before {
  content: ''; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--mid); }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  background: #1f2937; color: var(--white); font-size: .9rem;
  box-shadow: var(--shadow-lg); animation: slideIn .3s ease;
}
.toast-success { background: rgba(34,197,94,.2); border: 1px solid rgba(34,197,94,.4); }
.toast-error { background: rgba(239,68,68,.2); border: 1px solid rgba(239,68,68,.4); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal { background: #111827; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 480px; border: 1px solid rgba(255,255,255,.06); }
.modal h3 { font-size: 1.25rem; margin-bottom: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .swipe-actions { gap: 24px; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .provider-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ===== PROFILE PAGE ===== */
.profile-hero { aspect-ratio: 16/9; position: relative; }
.profile-hero img { width: 100%; height: 100%; object-fit: cover; }
.profile-header { padding: 20px; }
.profile-name { font-size: 1.75rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.profile-bio { color: var(--mid); margin-top: 8px; line-height: 1.6; }
.profile-services { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.service-chip { padding: 4px 12px; border-radius: 9999px; background: rgba(168,85,247,.15); color: #c084fc; font-size: .8rem; }
.book-btn { width: 100%; }

/* ===== DIVIDER ===== */
.divider { height: 1px; background: rgba(255,255,255,.06); margin: 24px 0; }

/* ===== PRICE ===== */
.price-display { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.price-display span { font-size: .875rem; color: var(--mid); font-weight: 400; }