/* ============================================================
   NAIL BOOKING APP - Main Stylesheet
   Aesthetic: Luxury Nail Salon - Rose Gold & Cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --rose:       #C4927A;
  --rose-light: #F2E8E3;
  --rose-dark:  #8B5E4A;
  --cream:      #FAF7F4;
  --cream-dark: #F0EAE4;
  --charcoal:   #2C2420;
  --gray:       #8A7D78;
  --gray-light: #D4CBC6;
  --white:      #FFFFFF;
  --success:    #5A8A6A;
  --error:      #C4574A;
  --shadow:     0 4px 24px rgba(44,36,32,0.08);
  --shadow-lg:  0 12px 48px rgba(44,36,32,0.12);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.2;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--rose);
  color: var(--white);
}
.btn-primary:hover { background: var(--rose-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 1.5px solid var(--rose);
}
.btn-outline:hover { background: var(--rose-light); }
.btn-ghost {
  background: transparent;
  color: var(--gray);
}
.btn-ghost:hover { background: var(--cream-dark); color: var(--charcoal); }
.btn-danger { background: var(--error); color: var(--white); }
.btn-danger:hover { background: #A84035; }
.btn-success { background: var(--success); color: var(--white); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-lg { padding: 18px 36px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--charcoal);
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196,146,122,0.12);
}
.form-select { cursor: pointer; appearance: none; background-image: 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='%238A7D78' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 6px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--cream-dark);
}
.card-body { padding: 28px; }
.card-footer {
  padding: 20px 28px;
  background: var(--cream);
  border-top: 1px solid var(--cream-dark);
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.badge-confirmed { background: #E8F4EB; color: #3A6B47; }
.badge-done      { background: #E8EEF4; color: #3A5470; }
.badge-cancelled { background: #FAEAE8; color: #8B3A32; }
.badge-pending   { background: #FDF3E8; color: #8B6A2A; }

/* ============================================================
   LOADING
   ============================================================ */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-dark {
  border-color: rgba(196,146,122,0.2);
  border-top-color: var(--rose);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #EEF7F1; color: #2D6B3E; border-left: 3px solid #5A8A6A; }
.alert-error   { background: #FDF0EF; color: #8B3A32; border-left: 3px solid var(--error); }
.alert-info    { background: #EFF3FB; color: #2D4A8B; border-left: 3px solid #4A72C4; }

/* ============================================================
   NAVIGATION / HEADER
   ============================================================ */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(44,36,32,0.06);
}
.app-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--rose-dark);
  letter-spacing: 0.5px;
  text-decoration: none;
}
.app-logo span { color: var(--rose); }
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray);
}
.nav-user strong { color: var(--charcoal); }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page { min-height: 100vh; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.page-subtitle { color: var(--gray); font-size: 15px; }

/* ============================================================
   BOOKING FLOW - STEPS
   ============================================================ */
.steps-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow);
}
.step-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
  cursor: default;
}
.step-item.active {
  background: var(--rose);
  color: var(--white);
}
.step-item.done {
  color: var(--rose);
}
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--gray);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-item.active .step-num { background: rgba(255,255,255,0.25); color: var(--white); }
.step-item.done .step-num { background: var(--rose-light); color: var(--rose); }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.service-card {
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.service-card:hover { border-color: var(--rose); transform: translateY(-2px); box-shadow: var(--shadow); }
.service-card.selected { border-color: var(--rose); background: var(--rose-light); }
.service-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px; right: 14px;
  width: 22px; height: 22px;
  background: var(--rose);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.service-name { font-size: 16px; font-weight: 500; color: var(--charcoal); margin-bottom: 8px; }
.service-meta { display: flex; gap: 12px; font-size: 13px; color: var(--gray); margin-top: 8px; }
.service-price { font-size: 20px; font-weight: 600; color: var(--rose-dark); font-family: 'Cormorant Garamond', serif; }

/* ============================================================
   STAFF CARDS
   ============================================================ */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.staff-card {
  background: var(--white);
  border: 2px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.staff-card:hover { border-color: var(--rose); transform: translateY(-2px); }
.staff-card.selected { border-color: var(--rose); background: var(--rose-light); }
.staff-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--rose-light);
  color: var(--rose-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.staff-name { font-size: 14px; font-weight: 500; color: var(--charcoal); }

/* ============================================================
   TIME SLOTS
   ============================================================ */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.time-slot {
  padding: 12px 8px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--white);
  transition: var(--transition);
}
.time-slot:hover { border-color: var(--rose); color: var(--rose); }
.time-slot.selected { background: var(--rose); border-color: var(--rose); color: var(--white); }
.time-slot.unavailable { opacity: 0.4; cursor: not-allowed; background: var(--cream-dark); }

/* ============================================================
   DATE PICKER
   ============================================================ */
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.date-header { text-align: center; font-size: 11px; font-weight: 600; color: var(--gray); padding: 6px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.date-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.date-cell:hover { background: var(--rose-light); color: var(--rose-dark); }
.date-cell.selected { background: var(--rose); color: var(--white); border-color: var(--rose); }
.date-cell.today { border-color: var(--rose); color: var(--rose); font-weight: 600; }
.date-cell.disabled { opacity: 0.3; cursor: not-allowed; }
.date-cell.empty { cursor: default; }

/* ============================================================
   APPOINTMENT LIST (Staff & Admin)
   ============================================================ */
.appt-list { display: flex; flex-direction: column; gap: 12px; }
.appt-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  border-left: 4px solid var(--rose);
  box-shadow: 0 2px 8px rgba(44,36,32,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.appt-card:hover { transform: translateX(2px); box-shadow: var(--shadow); }
.appt-card.done { border-left-color: var(--gray-light); opacity: 0.7; }
.appt-card.cancelled { border-left-color: var(--error); opacity: 0.6; }
.appt-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--rose-dark);
  min-width: 70px;
  line-height: 1;
}
.appt-time span { display: block; font-size: 12px; color: var(--gray); font-family: 'DM Sans', sans-serif; font-weight: 400; }
.appt-info { flex: 1; }
.appt-customer { font-size: 16px; font-weight: 500; color: var(--charcoal); margin-bottom: 4px; }
.appt-service { font-size: 13px; color: var(--gray); }
.appt-note { font-size: 12px; color: var(--rose); margin-top: 4px; font-style: italic; }
.appt-phone { font-size: 13px; color: var(--gray); }
.appt-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============================================================
   DASHBOARD STATS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 600; color: var(--charcoal); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--rose); margin-top: 6px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cream) 0%, var(--rose-light) 100%);
  padding: 24px;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}
.login-header {
  background: var(--rose);
  padding: 40px 36px 32px;
  text-align: center;
}
.login-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.login-tagline { font-size: 13px; color: rgba(255,255,255,0.75); }
.login-body { padding: 36px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,36,32,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 20px; font-family: 'Cormorant Garamond', serif; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray); font-size: 20px; padding: 4px; }
.modal-body { padding: 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--cream-dark); display: flex; gap: 12px; justify-content: flex-end; }

/* ============================================================
   SIDEBAR (Admin)
   ============================================================ */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: var(--charcoal);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--white);
  font-weight: 600;
}
.sidebar-logo-text span { color: var(--rose); }
.sidebar-shop { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 4px; }
.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 24px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.nav-item.active { color: var(--white); border-left-color: var(--rose); background: rgba(196,146,122,0.1); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-footer { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 12px; }
.sidebar-user strong { display: block; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.main-content { flex: 1; overflow: auto; background: var(--cream); }
.main-inner { padding: 32px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
}
.data-table td {
  padding: 16px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--charcoal);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }
.data-table .actions { display: flex; gap: 8px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .steps-bar { gap: 4px; }
  .step-label { display: none; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .appt-card { flex-wrap: wrap; }
  .main-inner { padding: 20px 16px; }
  .container, .container-sm { padding: 0 16px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.fade-in { animation: fadeIn 0.35s ease forwards; }
.slide-in { animation: slideIn 0.35s ease forwards; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-family: 'Cormorant Garamond', serif; font-size: 22px; color: var(--charcoal); margin-bottom: 8px; }

/* Section title */
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tab bar */
.tab-bar { display: flex; gap: 4px; background: var(--cream-dark); padding: 4px; border-radius: var(--radius); margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 10px; text-align: center; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; background: none; color: var(--gray); transition: var(--transition); }
.tab-btn.active { background: var(--white); color: var(--charcoal); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
