/* ============================================
   SV PRO — Client Portal Design System v2
   Premium Booking Experience
   Think: Airbnb + Apple + Halodoc
   
   NOT ERP. NOT Admin. NOT Tables.
   
   Principles:
   - Calendar first
   - Availability first
   - Rating first
   - CTA always visible
   - Large photos
   - Reduce friction
   ============================================ */

:root {
  --white: #ffffff;
  --gray-25: #fcfcfd;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #000000;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

  --max-width: 1200px;
  --nav-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; line-height: 1.6; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--gray-800); background: var(--white); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* === TOP NAVIGATION === */
.nav {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-height); background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.nav-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 32px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--gray-500); transition: color 150ms; }
.nav-link:hover { color: var(--gray-900); }
.nav-link.active { color: var(--gray-900); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-search { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-full); font-size: 13px; color: var(--gray-400); min-width: 220px; cursor: pointer; transition: all 150ms; }
.nav-search:hover { border-color: var(--gray-300); background: var(--white); }
.nav-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 150ms; }
.nav-icon:hover { background: var(--gray-100); }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-200); }

/* === CONTAINER === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.page-section { padding: 48px 0; }
.page-section + .page-section { border-top: 1px solid var(--gray-100); }

/* === HERO === */
.hero { padding: 64px 0 48px; }
.hero-title { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.2; }
.hero-subtitle { font-size: 17px; color: var(--gray-500); margin-top: 8px; line-height: 1.5; }

/* === PROFESSIONAL PHOTO === */
.photo-lg { width: 100%; aspect-ratio: 1; background: var(--gray-200); border-radius: var(--radius-xl); object-fit: cover; }
.photo-md { width: 80px; height: 80px; background: var(--gray-200); border-radius: var(--radius-lg); flex-shrink: 0; }
.photo-sm { width: 56px; height: 56px; background: var(--gray-200); border-radius: var(--radius-md); flex-shrink: 0; }
.photo-xs { width: 40px; height: 40px; background: var(--gray-200); border-radius: var(--radius-sm); flex-shrink: 0; }
.photo-circle { border-radius: 50%; }

/* === CARDS === */
.card {
  background: var(--white); border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: box-shadow 200ms, transform 200ms;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 20px; }
.card-image { width: 100%; aspect-ratio: 4/3; background: var(--gray-100); }
.card-static { transition: none; }
.card-static:hover { box-shadow: none; transform: none; }

/* === PROFESSIONAL CARD (Large) === */
.pro-card-lg { cursor: pointer; }
.pro-card-lg .card-image { aspect-ratio: 3/4; background: var(--gray-200); }
.pro-card-lg .card-body { padding: 16px 20px 20px; }
.pro-card-lg .pro-name { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.pro-card-lg .pro-specialty { font-size: 13px; color: var(--gray-500); }
.pro-card-lg .pro-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 8px; }
.pro-card-lg .pro-avail { font-size: 12px; color: var(--gray-500); margin-top: 6px; padding: 4px 10px; background: var(--gray-50); border-radius: var(--radius-full); display: inline-block; }
.pro-card-lg .pro-price { font-size: 14px; font-weight: 600; margin-top: 12px; }
.pro-card-lg .pro-fav { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font); font-weight: 600; border: none; cursor: pointer; transition: all 150ms; white-space: nowrap; }
.btn-primary { background: var(--gray-900); color: var(--white); border-radius: var(--radius-full); padding: 14px 28px; font-size: 15px; }
.btn-primary:hover { background: var(--gray-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--gray-800); border: 1.5px solid var(--gray-200); border-radius: var(--radius-full); padding: 12px 24px; font-size: 14px; }
.btn-secondary:hover { border-color: var(--gray-400); background: var(--gray-50); }
.btn-ghost { background: transparent; color: var(--gray-600); padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* === STICKY CTA BAR === */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: var(--white); border-top: 1px solid var(--gray-100);
  padding: 16px 24px; box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}
.sticky-cta-inner { max-width: var(--max-width); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.sticky-cta .price { font-size: 20px; font-weight: 700; }
.sticky-cta .price-detail { font-size: 13px; color: var(--gray-500); }

/* === RATING === */
.rating { display: inline-flex; align-items: center; gap: 4px; }
.rating-star { font-size: 14px; }
.rating-value { font-size: 14px; font-weight: 600; }
.rating-count { font-size: 13px; color: var(--gray-400); }

/* === AVAILABILITY / CALENDAR === */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-header { font-size: 11px; font-weight: 600; color: var(--gray-400); text-align: center; padding: 8px 0; text-transform: uppercase; }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; transition: all 150ms; }
.cal-day:hover { background: var(--gray-100); }
.cal-day.available { font-weight: 500; }
.cal-day.available::after { content: ''; display: block; width: 4px; height: 4px; background: var(--gray-700); border-radius: 50%; position: absolute; bottom: 4px; }
.cal-day.selected { background: var(--gray-900); color: var(--white); font-weight: 600; }
.cal-day.today { border: 1.5px solid var(--gray-300); }
.cal-day.disabled { color: var(--gray-300); cursor: default; }
.cal-day.disabled:hover { background: transparent; }

/* === TIME SLOTS === */
.slot-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 10px 20px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-full); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 150ms; }
.slot:hover { border-color: var(--gray-900); background: var(--gray-50); }
.slot.selected { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }
.slot.unavailable { background: var(--gray-50); color: var(--gray-300); border-color: var(--gray-100); cursor: not-allowed; }

/* === TIMELINE === */
.tracking-timeline { display: flex; align-items: flex-start; padding: 32px 0; position: relative; }
.tracking-step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.tracking-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; z-index: 2; transition: all 300ms; }
.tracking-dot.active { background: var(--gray-900); color: var(--white); width: 40px; height: 40px; font-size: 14px; }
.tracking-dot.done { background: var(--gray-700); color: var(--white); }
.tracking-label { font-size: 12px; color: var(--gray-400); margin-top: 8px; max-width: 80px; }
.tracking-label.active { color: var(--gray-900); font-weight: 600; }
.tracking-connector { position: absolute; top: 16px; left: 50%; width: 100%; height: 2px; background: var(--gray-200); z-index: 1; }
.tracking-connector.done { background: var(--gray-700); }

/* === GRID === */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-sidebar { grid-template-columns: 1fr 380px; gap: 48px; }

/* === SECTION HEADER === */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.section-subtitle { font-size: 14px; color: var(--gray-500); margin-top: 4px; }
.section-action { font-size: 14px; font-weight: 500; color: var(--gray-500); cursor: pointer; }
.section-action:hover { color: var(--gray-900); }

/* === BADGE === */
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }
.badge-dark { background: var(--gray-900); color: var(--white); }
.badge-light { background: var(--gray-100); color: var(--gray-600); }
.badge-outline { border: 1px solid var(--gray-200); color: var(--gray-600); }

/* === REVIEW CARD === */
.review-card { padding: 20px 0; border-bottom: 1px solid var(--gray-100); }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--gray-400); }
.review-text { font-size: 14px; color: var(--gray-600); line-height: 1.7; }

/* === SUMMARY PANEL === */
.summary-panel { background: var(--gray-50); border: 1px solid var(--gray-100); border-radius: var(--radius-xl); padding: 24px; position: sticky; top: 96px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.summary-row.total { font-size: 18px; font-weight: 700; padding-top: 16px; border-top: 1px solid var(--gray-200); margin-top: 8px; }
.summary-divider { border: none; border-top: 1px solid var(--gray-200); margin: 12px 0; }

/* === WIZARD PROGRESS === */
.wizard-bar { display: flex; align-items: center; gap: 0; padding: 24px 0 32px; }
.wizard-step { display: flex; align-items: center; gap: 8px; }
.wizard-num { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200); color: var(--gray-500); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wizard-step.active .wizard-num { background: var(--gray-900); color: var(--white); }
.wizard-step.done .wizard-num { background: var(--gray-700); color: var(--white); }
.wizard-step-label { font-size: 13px; font-weight: 500; color: var(--gray-400); }
.wizard-step.active .wizard-step-label { color: var(--gray-900); }
.wizard-line { flex: 1; height: 1px; background: var(--gray-200); margin: 0 12px; }
.wizard-line.done { background: var(--gray-700); }

/* === EMPTY / SUCCESS STATE === */
.success-icon { width: 80px; height: 80px; background: var(--gray-100); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 24px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 28px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .page-section { padding: 32px 0; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 24px; }
  .nav-search { display: none; }
}

/* === UTILITY === */
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--gray-500); }
.text-bold { font-weight: 600; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.pb-20 { padding-bottom: 80px; }
.relative { position: relative; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.inline-flex { display: inline-flex; }
