:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --bg-card: #1a1a1a;
  --fg: #f0f0f0;
  --fg-muted: #8a8a8a;
  --fg-subtle: #5a5a5a;
  --accent: #00d26a;
  --accent-dim: #00a854;
  --accent-glow: rgba(0, 210, 106, 0.15);
  --warm: #ff6b35;
  --warm-dim: #cc5529;
  --danger: #e53e3e;
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5vw;
  border-bottom: 1px solid #1e1e1e;
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  z-index: 100;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--fg); }
.btn-ghost { background: none; border: none; cursor: pointer; }

.app-main { min-height: calc(100vh - 57px); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: var(--accent-dim); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid #2a2a2a;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn-danger-sm {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-danger-sm:hover { border-color: var(--danger); }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg-subtle);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--fg-subtle); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.form-row-tight { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.form-group-inline { display: flex; align-items: center; gap: 8px; }
.form-group-inline label { font-size: 0.82rem; color: var(--fg-muted); white-space: nowrap; }
.form-group-inline input { width: auto; }
.form-section {
  border: 1px solid #222;
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-section legend {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 8px;
  color: var(--fg);
}

/* ===== DAY PICKER ===== */
.day-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.day-chip {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.day-chip input { display: none; }
.day-chip span {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #2a2a2a;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--fg-muted);
  transition: all 0.15s;
  user-select: none;
}
.day-chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-error { background: rgba(229,62,62,0.1); border: 1px solid rgba(229,62,62,0.3); color: #fc8181; }
.alert-success { background: rgba(0,210,106,0.1); border: 1px solid rgba(0,210,106,0.3); color: var(--accent); }

/* ===== AUTH ===== */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 57px);
  padding: 2rem 5vw;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid #222;
  border-radius: var(--radius);
  padding: 2.5rem;
}
.auth-header { margin-bottom: 1.5rem; }
.auth-header h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.auth-header p { color: var(--fg-muted); font-size: 0.95rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--fg-muted);
}
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== ONBOARDING ===== */
.onboard-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 5vw;
}
.onboard-card {
  width: 100%;
  max-width: 720px;
}
.onboard-header { margin-bottom: 2rem; }
.step-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--fg-subtle);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.onboard-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.onboard-header p { color: var(--fg-muted); }
.onboard-form { display: flex; flex-direction: column; gap: 1.5rem; }

/* ===== DASHBOARD ===== */
.dash-wrap { padding: 2rem 5vw; max-width: 1280px; margin: 0 auto; }
.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.dash-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.dash-sub { color: var(--fg-muted); font-size: 0.9rem; margin-top: 2px; }
.dash-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}
.dash-col-main, .dash-col-side { display: flex; flex-direction: column; gap: 1.5rem; }
.dash-card {
  background: var(--bg-card);
  border: 1px solid #222;
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

/* Link card */
.link-card { background: linear-gradient(135deg, var(--bg-card), rgba(0,210,106,0.05)); border-color: rgba(0,210,106,0.15); }
.link-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.5rem; }
.link-url {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--fg);
  word-break: break-all;
  background: var(--bg-elevated);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.link-hint { font-size: 0.82rem; color: var(--fg-muted); }

/* Booking list */
.booking-list { display: flex; flex-direction: column; gap: 1px; }
.booking-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid #1e1e1e;
}
.booking-item:last-child { border-bottom: none; }
.booking-time { min-width: 100px; }
.booking-date { display: block; font-size: 0.85rem; font-weight: 600; font-family: var(--font-display); }
.booking-hour { display: block; font-size: 0.8rem; color: var(--accent); }
.booking-info { flex: 1; }
.booking-info strong { display: block; font-size: 0.9rem; }
.booking-info span { display: block; font-size: 0.8rem; color: var(--fg-muted); }
.booking-service { color: var(--fg-subtle) !important; font-size: 0.78rem !important; }

/* Table */
.booking-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.booking-table th { text-align: left; padding: 8px; color: var(--fg-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #222; }
.booking-table td { padding: 10px 8px; border-bottom: 1px solid #1a1a1a; vertical-align: top; }
.booking-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-confirmed { background: rgba(0,210,106,0.1); color: var(--accent); }
.status-cancelled { background: rgba(229,62,62,0.1); color: #fc8181; }
.status-completed { background: rgba(138,138,138,0.1); color: var(--fg-muted); }

/* Service list */
.service-list { list-style: none; margin-bottom: 1rem; }
.service-item { padding: 8px 0; border-bottom: 1px solid #1e1e1e; }
.service-item:last-child { border-bottom: none; }
.service-item div { display: flex; flex-direction: column; gap: 2px; }
.add-service-form { display: flex; flex-direction: column; gap: 8px; }

/* Settings form */
.settings-form { display: flex; flex-direction: column; gap: 1rem; }

/* Misc */
.empty-state { text-align: center; padding: 2rem; color: var(--fg-muted); font-size: 0.9rem; }
.muted { color: var(--fg-muted); }
.small { font-size: 0.82rem; }

/* ===== BOOKING PAGE ===== */
.booking-page { min-height: 100vh; }
.booking-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}
.booking-sidebar {
  background: var(--bg-elevated);
  border-right: 1px solid #1e1e1e;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.biz-card {}
.biz-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.biz-desc { color: var(--fg-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.biz-addr, .biz-phone { color: var(--fg-muted); font-size: 0.85rem; margin-top: 0.25rem; }
.services-sidebar h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
  margin-bottom: 0.75rem;
}
.service-list-pub { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.service-list-pub li {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px solid #1e1e1e;
}
.service-list-pub li:last-child { border-bottom: none; }
.svc-meta { color: var(--fg-muted); font-size: 0.82rem; }
.powered-by { margin-top: auto; font-size: 0.78rem; color: var(--fg-subtle); }
.powered-by a { color: var(--fg-subtle); }

.booking-form-wrap {
  padding: 3rem 4vw;
  max-width: 640px;
}
.booking-form-wrap h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}
.slot-chip { cursor: pointer; }
.slot-chip input { display: none; }
.slot-chip span {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.slot-chip span strong { font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; }
.slot-chip span em { font-style: normal; font-size: 0.88rem; color: var(--fg-muted); margin-top: 2px; }
.slot-chip input:checked + span { border-color: var(--accent); background: var(--accent-glow); }
.slot-chip:hover span { border-color: var(--accent-dim); }
.customer-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.customer-form h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.no-slots { padding: 2rem 0; color: var(--fg-muted); }
.booking-success-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.booking-success-card {
  text-align: center;
  max-width: 400px;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(0,210,106,0.2);
  border-radius: var(--radius);
}
.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.booking-success-card h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.booking-success-card p { color: var(--fg-muted); }
.booking-error { text-align: center; padding: 4rem; }
.booking-error h1 { font-family: var(--font-display); font-size: 2rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .booking-layout { grid-template-columns: 1fr; }
  .booking-sidebar { border-right: none; border-bottom: 1px solid #1e1e1e; padding: 2rem 5vw; }
  .booking-form-wrap { padding: 2rem 5vw; max-width: none; }
}
@media (max-width: 600px) {
  .dash-topbar { flex-direction: column; }
  .auth-card { padding: 1.75rem; }
}
