/* ── HairDid Design System ──────────────────────────────────────────────── */
:root {
  --black: #0a0a0a;
  --white: #fafaf9;
  --cream: #f5f0eb;
  --gold: #c8956c;
  --gold-light: #e8c9a8;
  --gold-dark: #a06b3c;
  --charcoal: #1a1a1a;
  --muted: #6b6560;
  --border: #2a2520;
  --danger: #dc4a4a;
  --success: #4adc6a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 { font-family: 'Space Grotesk', sans-serif; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.app-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(200,149,108,0.1);
}

.app-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}

.app-nav .logo span { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-links .btn-sm {
  color: var(--black);
  background: var(--gold);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.nav-links .btn-sm:hover { background: var(--gold-light); color: var(--black); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: var(--black);
}

.btn-primary:hover { background: var(--gold-light); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
  background: rgba(220, 74, 74, 0.1);
  color: var(--danger);
  border: 1px solid rgba(220, 74, 74, 0.3);
}

.btn-danger:hover { background: rgba(220, 74, 74, 0.2); }

.btn-sm-inline {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Form Elements ───────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-input::placeholder {
  color: rgba(255,255,255,0.2);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b6560' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Fix native <select> dropdown option visibility.
   The select has color: var(--white) for dark-theme appearance,
   but browsers render native dropdown options with a default white
   background — making white text invisible. Setting option text to
   dark ensures readability across Chrome, Firefox, and Safari. */
select option,
select optgroup {
  background: #fff;
  color: #1a1a1a;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(200,149,108,0.3);
  transform: translateY(-2px);
}

/* ── Page Container ──────────────────────────────────────────────────── */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 40px 60px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Tags / Pills ────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid rgba(200,149,108,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

.tag-filled {
  background: rgba(200,149,108,0.12);
  border-color: transparent;
}

/* ── Rating Stars ────────────────────────────────────────────────────── */
.rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.rating .stars {
  color: var(--gold);
  letter-spacing: 1px;
}

.rating .count {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ── Grid Layouts ────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Stylist Card (Browse) ───────────────────────────────────────────── */
.stylist-card {
  display: block;
  color: inherit;
}

.stylist-card:hover {
  color: inherit;
}

.stylist-card .card-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: rgba(200,149,108,0.08);
}

.stylist-card .card-body {
  padding: 20px;
}

.stylist-card .card-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.stylist-card .card-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.stylist-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.stylist-card .card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.stylist-card .card-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.stylist-card .card-price small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ── Search Bar ──────────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-bar .form-input {
  flex: 1;
  min-width: 200px;
}

.search-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200,149,108,0.08);
}

/* ── Gallery Grid ────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .caption {
  opacity: 1;
}

/* ── Service List ────────────────────────────────────────────────────── */
.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.service-item:last-child {
  border-bottom: none;
}

.service-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.service-info p {
  font-size: 0.8rem;
  color: var(--muted);
}

.service-price {
  text-align: right;
}

.service-price .price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.service-price .duration {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Calendar / Slots ────────────────────────────────────────────────── */
.calendar-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.calendar-strip::-webkit-scrollbar { display: none; }

.cal-day {
  flex-shrink: 0;
  width: 64px;
  padding: 12px 8px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  color: var(--white);
}

.cal-day:hover { border-color: var(--gold); }

.cal-day.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.cal-day.unavailable {
  opacity: 0.3;
  cursor: not-allowed;
}

.cal-day .day-name {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day.active .day-name { color: rgba(0,0,0,0.5); }

.cal-day .day-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2px;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.time-slot {
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
}

.time-slot:hover { border-color: var(--gold); color: var(--gold); }

.time-slot.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ── Profile Header ──────────────────────────────────────────────────── */
.profile-cover {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: rgba(200,149,108,0.08);
}

.profile-header {
  display: flex;
  gap: 24px;
  margin-top: -60px;
  padding: 0 40px;
  position: relative;
  z-index: 10;
  align-items: flex-end;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  object-fit: cover;
  border: 4px solid var(--black);
  background: var(--charcoal);
  flex-shrink: 0;
}

.profile-info {
  padding-bottom: 8px;
}

.profile-info h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-info .location {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.profile-info .specialties {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Profile Layout ──────────────────────────────────────────────────── */
.profile-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 40px;
  max-width: 1200px;
}

.profile-main { min-width: 0; }

.profile-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

.sidebar-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.sidebar-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* ── Section ─────────────────────────────────────────────────────────── */
.section {
  margin-bottom: 48px;
}

.section h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* ── Booking Steps ───────────────────────────────────────────────────── */
.booking-step {
  display: none;
}

.booking-step.active {
  display: block;
}

.step-indicator {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.step-dot {
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
}

.step-dot.active { background: var(--gold); }
.step-dot.done { background: var(--gold-dark); }

/* ── Confirmation Page ───────────────────────────────────────────────── */
.confirmation {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding-top: 40px;
}

.confirmation .check-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(200,149,108,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
}

.confirmation h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.confirmation .details-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  margin: 32px 0;
}

.confirmation .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.confirmation .detail-row:last-child { border-bottom: none; }

.confirmation .detail-label { color: var(--muted); font-size: 0.9rem; }
.confirmation .detail-value { font-weight: 600; font-size: 0.9rem; }

/* ── Dashboard ───────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-card .stat-value.gold { color: var(--gold); }

.dashboard-section {
  margin-bottom: 40px;
}

.dashboard-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Booking Row ─────────────────────────────────────────────────────── */
.booking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
}

.booking-row .client-info {
  flex: 1;
}

.booking-row .client-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.booking-row .booking-service {
  font-size: 0.85rem;
  color: var(--muted);
}

.booking-row .booking-time {
  text-align: right;
}

.booking-row .booking-date {
  font-weight: 600;
  font-size: 0.9rem;
}

.booking-row .booking-hour {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pending { background: rgba(200,149,108,0.15); color: var(--gold); }
.status-confirmed { background: rgba(74,220,106,0.15); color: var(--success); }
.status-completed { background: rgba(255,255,255,0.08); color: var(--muted); }
.status-cancelled { background: rgba(220,74,74,0.15); color: var(--danger); }

/* ── Empty State ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--white);
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error { border-color: var(--danger); }
.toast.success { border-color: var(--success); }

/* ── Loading ─────────────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--charcoal);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.app-footer {
  padding: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 80px;
}

.app-footer .logo { font-size: 1.2rem; }
.app-footer p { font-size: 0.8rem; color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .app-nav { padding: 14px 20px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn-sm) { display: none; }
  .page-container { padding: 80px 20px 40px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .profile-body { grid-template-columns: 1fr; }
  .profile-header { padding: 0 20px; }
  .profile-sidebar { position: static; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .search-bar { flex-direction: column; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .profile-cover { height: 180px; }
  .profile-avatar { width: 80px; height: 80px; }
  .profile-info h1 { font-size: 1.4rem; }
}
