/* ============================================================
   WellnessHub POC — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

@import './variables.css';

/* ── Base Resets ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Serif headings (H1-H3) */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--color-text);
}

/* Sans headings (H4-H6) */
h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--color-text);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
  font-size: 16px;
}

/* Focus states — sage green ring */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(61, 107, 79, 0.12);
}

/* ── Components ── */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  background-color: #C17C4E;
  color: white;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 4px 14px rgba(193,124,78,0.3);
}

.btn-primary:hover {
  background-color: #A66840;
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  background-color: transparent;
  color: #3D6B4F;
  padding-left: 32px;
  padding-right: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-width: 1.5px;
  border-style: solid;
  border-color: #3D6B4F;
}

.btn-secondary:hover {
  background-color: #E8F0EB;
  border-color: #2A4D38;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  background-color: transparent;
  color: #7D756E;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.btn-ghost:hover {
  color: #3D6B4F;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  background-color: white;
  color: #2C2520;
  border-width: 1.5px;
  border-style: solid;
  border-color: #E8E2DC;
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 8px;
  padding-bottom: 8px;
  border-radius: 9999px;
}

.btn-pill:hover {
  border-color: #3D6B4F;
  color: #3D6B4F;
}

.btn-pill.active {
  background-color: #3D6B4F;
  color: white;
  border-color: #3D6B4F;
}

.btn-sm {
  font-size: 13px;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  padding: 10px;
  border-radius: 12px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  background-color: #C44536;
  color: white;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-success {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  background-color: #3D6B4F;
  color: white;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.btn-success:hover {
  background-color: #2A4D38;
}

.btn-warning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  border: none;
  background-color: #C5994B;
  color: white;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ── Cards ── */
.card {
  background-color: white;
  border-radius: 12px;
  border: 1px solid;
  border-color: #E8E2DC;
  box-shadow: var(--shadow-xs);
}

.card-profile {
  background-color: white;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all;
  transition-duration: 300ms;
  box-shadow: var(--shadow-sm);
}

.card-profile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-kpi {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid;
  border-color: #E8E2DC;
  box-shadow: var(--shadow-xs);
}

.card-service {
  background-color: white;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid;
  border-color: #E8E2DC;
  cursor: pointer;
  transition: all;
  transition-duration: 250ms;
}

.card-service:hover {
  border-color: #7FB99A;
  box-shadow: var(--shadow-md);
}

/* ── Inputs ── */
.input {
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-width: 1.5px;
  border-style: solid;
  border-color: #E8E2DC;
  border-radius: 6px;
  background-color: white;
  color: #2C2520;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  transition: all;
  transition-duration: 200ms;
}

.input:focus {
  border-color: #3D6B4F;
  outline: none;
  box-shadow: 0 0 0 3px rgba(61, 107, 79, 0.12);
}

.input::placeholder {
  color: var(--color-text-faint);
}

.input-error {
  border-color: #C44536;
}

.input-error:focus {
  border-color: #C44536;
  box-shadow: 0 0 0 3px rgba(196, 69, 54, 0.12);
}

.search-hero {
  width: 100%;
  padding-left: 28px;
  padding-right: 28px;
  padding-top: 18px;
  padding-bottom: 18px;
  border-radius: 9999px;
  font-size: 17px;
  background-color: white;
  border-width: 2px;
  border-style: solid;
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  max-width: 640px;
}

.search-hero:focus {
  border-color: #3D6B4F;
  outline: none;
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(61, 107, 79, 0.08);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #E8F0EB;
  color: #2A4D38;
}

.badge-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #F5E9D0;
  color: #8B6914;
}

.badge-error {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #FCEAE8;
  color: #C44536;
}

.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #E6EFF5;
  color: #4A7C9B;
}

.badge-rose {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #F3E4E8;
  color: #8B5060;
}

.badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  padding-right: 12px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-radius: 9999px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background-color: #F5F2EE;
  color: #7D756E;
}

/* ── Status indicators ── */
.status-confirmed {
  background-color: #E8F0EB;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #3D6B4F;
}

.status-pending {
  background-color: #F5E9D0;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #C5994B;
}

.status-cancelled {
  background-color: #FCEAE8;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #C44536;
}

.status-completed {
  background-color: #F5F2EE;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #A39E98;
}

.status-noshow {
  background-color: #F5E6D8;
  border-left-width: 3px;
  border-left-style: solid;
  border-left-color: #C17C4E;
}

/* ── Data display ── */
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 500;
  color: #2C2520;
}

.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: #7D756E;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
}

.kpi-trend-up {
  color: #3D6B4F;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

.kpi-trend-down {
  color: #C44536;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}

/* ── Tables ── */
.table-header {
  background-color: #F5F2EE;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7D756E;
}

.table-row {
  background-color: white;
  border-bottom: 1px solid;
  border-color: #E8E2DC;
  transition: color, background-color, border-color;
  transition-duration: 150ms;
}

.table-row:hover {
  background-color: #E8F0EB;
}

.table-row-alt {
  background-color: #FBF8F4;
}

/* ── Sidebar ── */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  transition: all;
  transition-duration: 200ms;
  cursor: pointer;
  color: var(--color-sidebar-text);
}

.sidebar-item:hover {
  background: var(--color-sidebar-hover);
}

.sidebar-item.active {
  background: var(--color-sidebar-active);
  color: var(--color-sidebar-text-active);
  border-left: 3px solid var(--color-primary-light);
}

.sidebar-section-label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 16px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: #6B8775;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background-color: white;
  border-radius: 16px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-sm { max-width: 28rem; }
.modal-md { max-width: 32rem; }
.modal-lg { max-width: 42rem; }
.modal-xl { max-width: 56rem; }

/* ── Toast ── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: var(--shadow-md);
}

.toast-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: var(--shadow-md);
  background-color: white;
  border-left-color: #3D6B4F;
}

.toast-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: var(--shadow-md);
  background-color: white;
  border-left-color: #C44536;
}

.toast-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: var(--shadow-md);
  background-color: white;
  border-left-color: #C5994B;
}

.toast-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border-left-width: 4px;
  border-left-style: solid;
  box-shadow: var(--shadow-md);
  background-color: white;
  border-left-color: #4A7C9B;
}

/* ── Skeleton loading ── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.skeleton {
  animation: skeleton-pulse 1.8s ease-in-out infinite;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color-canvas-pro) 0%, var(--color-canvas) 50%, var(--color-canvas-pro) 100%);
  background-size: 200% 100%;
}

/* ── Container ── */
.container-main {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Photo fallback gradient ── */
.photo-fallback {
  background: linear-gradient(135deg, #E8F0EB 0%, #F5E6D8 100%);
}

/* ── Utilities ── */
.font-serif-display {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
}

.text-balance {
  text-wrap: balance;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
