/* =============================================
   Simmer App — design tokens from landing page
   ============================================= */
:root {
  --bg: #faf7f2;
  --bg-warm: #f3ede4;
  --bg-dark: #1a1611;
  --fg: #1a1611;
  --fg-muted: #6b6156;
  --accent: #c4582a;
  --accent-soft: #e8a87c;
  --accent-bg: #fef0e7;
  --border: #e2dbd1;
  --white: #ffffff;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
}

* { 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: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- NAV ---- */
.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-link:hover, .nav-link--active { color: var(--fg); }

.nav-link--primary {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
}

.nav-link--primary:hover { background: #a84420; }

/* ---- MAIN CONTAINER ---- */
.app-main {
  flex: 1;
  padding: 40px 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ---- ALERTS ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}

.alert--error {
  background: #fff0f0;
  border: 1px solid #fca5a5;
  color: #c53030;
}

/* ====================================
   BOOKING FORM
   ==================================== */
.form-page { max-width: 680px; }

.form-header { margin-bottom: 36px; }

.form-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.form-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.form-subtitle {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* Fieldsets */
.booking-form { display: flex; flex-direction: column; gap: 32px; }

.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.form-row { display: grid; gap: 16px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.form-field:first-child { margin-top: 0; }
.form-row > .form-field { margin-top: 0; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.required { color: var(--accent); }

.form-input,
.form-select,
.form-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(196, 88, 42, 0.1);
}

.form-textarea { resize: vertical; }

/* Day checkboxes */
.day-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.day-chip {
  cursor: pointer;
}

.day-chip input { display: none; }

.day-chip span {
  display: block;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg);
  transition: all 0.15s;
  user-select: none;
}

.day-chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.day-chip:hover span { border-color: var(--accent-soft); }

/* Form actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-note {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ====================================
   BUTTONS
   ==================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn--primary {
  background: var(--accent);
  color: var(--white);
  padding: 12px 28px;
  font-size: 15px;
}

.btn--primary:hover { background: #a84420; transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
  padding: 10px 22px;
  font-size: 14px;
}

.btn--outline:hover { border-color: var(--fg-muted); }

.btn--lg { padding: 14px 32px; font-size: 16px; }
.btn--sm { padding: 7px 16px; font-size: 13px; }

/* ====================================
   CONFIRMATION PAGE
   ==================================== */
.confirmation-page {
  max-width: 560px;
  margin: 60px auto;
  text-align: center;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.confirmation-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.confirmation-title em { color: var(--accent); font-style: italic; font-weight: 500; }

.confirmation-sub {
  color: var(--fg-muted);
  margin-bottom: 36px;
  font-size: 15px;
}

.booking-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  text-align: left;
}

.booking-card-header {
  background: var(--bg-warm);
  padding: 14px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}

.booking-details { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }

.booking-detail { display: flex; gap: 16px; align-items: baseline; }

.detail-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  min-width: 80px;
}

.detail-value { font-size: 15px; color: var(--fg); font-weight: 500; }

.confirmation-actions { display: flex; justify-content: center; }

/* ====================================
   DASHBOARD
   ==================================== */
.dashboard-main {
  flex: 1;
  padding: 32px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-header { margin-bottom: 28px; }

.dashboard-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 4px;
}

.dashboard-sub { color: var(--fg-muted); font-size: 14px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

/* Calendar */
.dashboard-calendar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-warm);
}

.calendar-nav-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  transition: all 0.15s;
}

.calendar-nav-btn:hover { border-color: var(--fg-muted); color: var(--fg); }

.calendar-week-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
  border-right: 1px solid var(--border);
  min-height: 140px;
  padding: 12px;
}

.calendar-day:last-child { border-right: none; }

.calendar-day--today .calendar-day-header { color: var(--accent); }
.calendar-day--today { background: var(--accent-bg); }

.calendar-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-day-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.calendar-day--today .calendar-day-label { color: var(--accent); }

.calendar-day-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent);
  color: var(--white);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day-empty {
  font-size: 11px;
  color: var(--border);
  text-align: center;
  margin-top: 20px;
}

.calendar-day-sessions { display: flex; flex-direction: column; gap: 6px; }

.session-chip {
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 6px;
  padding: 6px 8px;
}

.session-chip-time {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.session-chip-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-chip-service {
  display: block;
  font-size: 10px;
  color: var(--fg-muted);
}

/* Sidebar */
.dashboard-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-warm);
}

/* Session List */
.session-list { list-style: none; }

.session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

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

.session-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  min-width: 44px;
}

.session-date-month {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.session-date-day {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.session-info { flex: 1; min-width: 0; }
.session-client { font-size: 14px; font-weight: 600; color: var(--fg); }
.session-meta { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }
.session-phone { font-size: 12px; color: var(--fg-muted); }

.session-cancel-form { flex-shrink: 0; }

.btn-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 11px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-cancel:hover { border-color: #e57373; color: #c53030; background: #fff0f0; }

/* Client List */
.client-list { list-style: none; }

.client-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

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

.client-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}

.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.client-meta { font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-dietary { font-size: 11px; color: var(--fg-muted); margin-top: 2px; }

.client-stats { text-align: right; flex-shrink: 0; }

.client-booking-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 100px;
}

/* Empty state */
.empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .app-nav { padding: 14px 20px; }
  .app-main { padding: 24px 20px; }
  .dashboard-main { padding: 20px; }
  .form-row--2, .form-row--3 { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: repeat(3, 1fr); }
}
