/* ─── Shafa Voyance — Design System ─────────────────────────────────────── */

:root {
  --bg-deep: #0F1021;
  --bg-primary: #16142A;
  --bg-secondary: #1C1833;
  --bg-card: rgba(28, 24, 51, 0.92);
  --bg-elevated: #242038;

  --violet: #6A3FA0;
  --violet-light: #CDBBE6;
  --violet-glow: rgba(106, 63, 160, 0.28);

  --gold: #D4AF37;
  --gold-light: #F0E2A8;
  --gold-glow: rgba(212, 175, 55, 0.28);

  --text-primary: #F7F4EF;
  --text-secondary: #DDD6EA;
  --text-muted: #C4BCD4;

  --success: #8FD4AE;
  --warning: #E4C56A;
  --error: #F0A0B4;

  --border: rgba(205, 187, 230, 0.2);
  --border-gold: rgba(212, 175, 55, 0.35);

  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
  --nav-height: 4.75rem;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Montserrat', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.stars-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(107, 76, 154, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 169, 98, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(155, 127, 212, 0.08) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

main { position: relative; z-index: 1; }

.container {
  width: min(1140px, 92vw);
  margin: 0 auto;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

em { font-style: italic; color: var(--gold-light); }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

/* ─── Header, pied de page et marque : voir vitrine.css ─────────────────── */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 200;
  background: var(--violet);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}
.skip-link:focus { top: 0.5rem; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-gold {
  background: var(--violet);
  color: #fff;
}

.btn-gold:hover { background: #58348a; }

a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.btn-outline:hover {
  background: rgba(201, 169, 98, 0.1);
}

.btn-ghost {
  background: rgba(155, 127, 212, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover { background: rgba(155, 127, 212, 0.15); color: var(--text-primary); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-full { width: 100%; }

.badge {
  background: var(--error);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  margin-left: 0.25rem;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
}

.hero-content { position: relative; z-index: 2; max-width: 680px; }

.hero-eyebrow {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 1.25rem 0 2rem;
  max-width: 540px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-orb {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--violet-glow) 0%, transparent 70%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.05); }
}

/* ─── Sections ───────────────────────────────────────────────────────────── */

.section { padding: 5rem 0; }
.section-dark { background: rgba(17, 10, 31, 0.6); }

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3rem;
}

.section-header p { color: var(--text-secondary); margin-top: 0.75rem; }
.section-cta { text-align: center; margin-top: 2.5rem; }

.page-hero {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-hero p { color: var(--text-secondary); margin-top: 0.75rem; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card, .catalog-card, .review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.service-card:hover, .catalog-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.service-icon.lg { font-size: 2.5rem; }

.service-card h3, .catalog-card h2 { margin-bottom: 0.75rem; }

.service-card p, .catalog-desc { color: var(--text-secondary); font-size: 0.95rem; }

.service-meta, .catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price { color: var(--gold); font-weight: 600; font-size: 1.1rem; }

/* ─── About ──────────────────────────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p { color: var(--text-secondary); margin: 1rem 0 1.5rem; }

.about-features {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  color: var(--text-secondary);
}

.about-visual { display: flex; justify-content: center; }

.mystic-circle {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: radial-gradient(circle, var(--violet-glow) 0%, transparent 70%);
}

.mystic-circle .orbit {
  position: absolute;
  top: -8px;
  right: 30%;
  font-size: 1.2rem;
  color: var(--gold);
  animation: orbit 8s linear infinite;
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(110px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(110px) rotate(-360deg); }
}

/* ─── Reviews ────────────────────────────────────────────────────────────── */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.review-card { position: relative; }

.review-card .stars { color: var(--gold); margin-bottom: 0.75rem; letter-spacing: 2px; }

.review-card p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.review-card cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ─── CTA ────────────────────────────────────────────────────────────────── */

.cta-section { padding-bottom: 6rem; }

.cta-box {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
}

.cta-box p { color: var(--text-secondary); margin: 1rem 0 2rem; }

/* ─── Catalog ────────────────────────────────────────────────────────────── */

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
  background: rgba(201, 169, 98, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet-light);
  background: rgba(107, 76, 154, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.catalog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ─── Auth ───────────────────────────────────────────────────────────────── */

.auth-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(12px);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-header .logo-icon { font-size: 1.5rem; display: block; margin-bottom: 0.75rem; }
.auth-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem; }

.auth-form { display: grid; gap: 1.25rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-secondary); }
.auth-footer a { color: var(--gold); }

.auth-oauth {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.oauth-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-weight: 500;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #dadce0;
  color: #202124;
}

.btn-google-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-google-outline:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(107, 76, 154, 0.1);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-credentials summary { cursor: pointer; color: var(--text-secondary); }

.demo-credentials p { margin-top: 0.5rem; }

/* ─── Forms ──────────────────────────────────────────────────────────────── */

.form-group { display: grid; gap: 0.4rem; }

.form-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--violet-light);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */

.dashboard { padding: 3rem 0 5rem; }

.dashboard-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.dashboard-header p { color: var(--text-secondary); margin-top: 0.5rem; }

.dashboard-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.dashboard-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.dashboard-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Appointments ───────────────────────────────────────────────────────── */

.appointments-list { display: grid; gap: 0.75rem; }

.appointment-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.appointment-item.clickable {
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.appointment-item.clickable:hover,
.appointment-item.clickable:focus-visible {
  border-color: var(--border-gold);
  background: rgba(201, 169, 98, 0.06);
  outline: none;
}

.appt-chevron {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.panel-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -0.5rem 0 1rem;
}

.appointment-item.compact { padding: 0.85rem; }

.appt-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 0.5rem;
  background: rgba(201, 169, 98, 0.1);
  border-radius: 8px;
}

.appt-date .day { font-size: 1.4rem; font-weight: 600; color: var(--gold); line-height: 1; }
.appt-date .month { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); }

.appt-info { flex: 1; }
.appt-info h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 500; }
.appt-info p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

.status-pill {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending .status-pill { background: rgba(212, 168, 83, 0.2); color: var(--warning); }
.status-confirmed .status-pill { background: rgba(92, 184, 138, 0.2); color: var(--success); }
.status-cancelled .status-pill { background: rgba(196, 92, 122, 0.2); color: var(--error); }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.empty-state p { margin-bottom: 1rem; }

/* ─── Client appointment modal ──────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-card h2 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.modal-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.modal-details {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.modal-card textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
}

.policy-notice {
  background: rgba(201, 169, 98, 0.08);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.policy-notice.warning {
  background: rgba(196, 92, 122, 0.08);
  border-color: rgba(196, 92, 122, 0.35);
}

.policy-notice a { color: var(--gold-light); }

.btn-ghost.danger { color: var(--error); }
.btn-ghost.danger:hover { background: rgba(196, 92, 122, 0.12); color: var(--error); }

.reschedule-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.reschedule-section label {
  display: block;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.mini-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1rem;
}

.time-slots.compact {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ─── Admin email configuration ─────────────────────────────────────────── */

.email-config-page .container-wide {
  width: min(1200px, 96vw);
}

.email-config-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.email-config-sidebar,
.email-config-main {
  min-width: 0;
}

.email-template-nav {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.email-template-nav-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
}

.email-template-nav-btn span {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
}

.email-template-nav-btn small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.email-template-nav-btn:hover,
.email-template-nav-btn.active {
  border-color: var(--border-gold);
  background: rgba(201, 169, 98, 0.08);
}

.email-vars-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.email-vars-list code {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.78rem;
  color: var(--gold-light);
}

.email-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.email-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.email-config-main textarea,
.email-config-sidebar textarea,
.email-config-sidebar input[type="text"] {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.email-config-main textarea {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}

.email-empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1.5rem;
}

.email-help-panel code {
  color: var(--gold-light);
}

@media (max-width: 900px) {
  .email-config-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Offline banner ─────────────────────────────────────────────────────── */

.offline-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(196, 92, 122, 0.12);
  border: 1px solid rgba(196, 92, 122, 0.3);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.offline-banner.inline { margin-bottom: 1.5rem; }

.offline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
  animation: blink 2s infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Booking wizard ─────────────────────────────────────────────────────── */

.booking-wizard { max-width: 720px; margin: 0 auto; }

.booking-step {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1rem;
}

.booking-step.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.booking-step h2 {
  font-size: 1.2rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--gold-light);
}

.service-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.service-select-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.service-select-card:hover,
.service-select-card.selected {
  border-color: var(--gold);
  background: rgba(201, 169, 98, 0.08);
}

.service-select-card h3 { font-size: 0.95rem; margin: 0.5rem 0; font-family: var(--font-body); }
.service-select-card p { font-size: 0.8rem; color: var(--text-muted); }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

#calendar-title, #admin-calendar-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

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

.cal-header {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: default;
  color: var(--text-muted);
}

.cal-day.available {
  cursor: pointer;
  color: var(--text-primary);
  background: rgba(107, 76, 154, 0.15);
  border: 1px solid transparent;
  transition: var(--transition);
}

.cal-day.available:hover { border-color: var(--violet-light); }

.cal-day.selected {
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 600;
}

.cal-day.empty { visibility: hidden; }

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
}

.time-slot {
  padding: 0.75rem;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.time-slot:hover, .time-slot.selected {
  border-color: var(--gold);
  background: rgba(201, 169, 98, 0.1);
}

.selected-date-label { color: var(--text-secondary); margin-bottom: 1rem; font-size: 0.95rem; }

.booking-summary {
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.booking-summary .detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.booking-summary .detail-row:last-child { border-bottom: none; }
.booking-summary span { color: var(--text-muted); }

/* ─── Confirmation ───────────────────────────────────────────────────────── */

.confirmation-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.confirmation-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
}

.confirmation-icon {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
  animation: pulse 3s ease-in-out infinite;
}

.confirmation-subtitle { color: var(--text-secondary); margin: 0.75rem 0 2rem; }

.confirmation-details {
  text-align: left;
  background: var(--bg-primary);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.detail-row:last-child { border-bottom: none; }
.detail-row span:first-child { color: var(--text-muted); }

.confirmation-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ─── Chat ───────────────────────────────────────────────────────────────── */

.chat-page { padding-bottom: 2rem; }

.chat-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 520px;
}

.chat-container.single { max-width: 720px; }

.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  height: 600px;
}

.chat-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
}

.conversation-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}

.conversation-item:hover,
.conversation-item.active {
  background: rgba(155, 127, 212, 0.1);
}

.conversation-item .conv-name {
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversation-item .conv-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 0.75rem;
}

.chat-placeholder span { font-size: 2.5rem; opacity: 0.5; }

.chat-active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.message-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.message-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--violet) 0%, #4a3570 100%);
  border-bottom-right-radius: 4px;
  color: #fff;
}
.message-bubble.mine .message-time { color: rgba(255, 255, 255, 0.8); }

.message-bubble.theirs {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.chat-input {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.chat-input input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.chat-input input:focus {
  outline: none;
  border-color: var(--violet-light);
}

/* ─── Admin ──────────────────────────────────────────────────────────────── */

.admin-settings-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.setting-toggle {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.setting-toggle strong { display: block; font-size: 0.95rem; }
.setting-toggle p { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 26px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: rgba(201, 169, 98, 0.2);
  border-color: var(--gold);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: var(--gold);
}

.offline-message-edit {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.5rem;
}

.offline-message-edit label { font-size: 0.85rem; color: var(--text-secondary); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.admin-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: center;
}

.admin-nav-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.admin-nav-card span { font-size: 2rem; display: block; margin-bottom: 0.75rem; }
.admin-nav-card p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; }

.calendar-admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
}

.calendar-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
}

.calendar-sidebar h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  margin-bottom: 1.25rem;
}

.admin-form { display: grid; gap: 1rem; }

.legend {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.dot.available { background: var(--success); }
.dot.booked { background: var(--warning); }
.dot.blocked { background: var(--error); }

.calendar-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.admin-slots-list { display: grid; gap: 0.5rem; max-height: 500px; overflow-y: auto; }

.admin-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-slot-row .slot-info { display: flex; gap: 1rem; align-items: center; }
.admin-slot-row .slot-actions { display: flex; gap: 0.5rem; }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-appointments-list { display: grid; gap: 1rem; }

.admin-appt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.admin-appt-card .appt-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-appt-card .appt-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.loading-text { padding: 2rem; text-align: center; color: var(--text-muted); }

/* ─── Payment & badges ───────────────────────────────────────────────────── */

.appt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.status-pill.payment-pending { background: rgba(212, 168, 83, 0.2); color: var(--warning); }
.status-pill.payment-paid { background: rgba(92, 184, 138, 0.2); color: var(--success); }
.status-pill.reminder-sent { background: rgba(155, 127, 212, 0.2); color: var(--violet-light); }

.optional { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }

.step-desc, .panel-desc, .notes-hint, .finance-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ─── Booking: payment & policy ────────────────────────────────────────── */

.payment-options {
  display: grid;
  gap: 0.6rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201, 169, 98, 0.08);
}

.payment-option input { accent-color: var(--gold); }

.policy-box {
  background: rgba(107, 76, 154, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.policy-box.compact { margin: 1.5rem 0 0; text-align: left; }

.policy-box h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.policy-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.policy-accept {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.policy-accept input { accent-color: var(--gold); margin-top: 0.2rem; }

.form-group select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
}

.form-group select:focus {
  outline: none;
  border-color: var(--violet-light);
  box-shadow: 0 0 0 3px var(--violet-glow);
}

/* ─── Private notes ──────────────────────────────────────────────────────── */

.private-notes-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.private-notes-section.compact { margin-top: 0.75rem; padding-top: 0.75rem; }

.private-notes-section label {
  display: block;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.private-notes-section textarea,
.private-notes-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.private-notes-section textarea:focus,
.private-notes-input:focus {
  outline: none;
  border-color: var(--violet-light);
}

.save-error {
  border-color: var(--error) !important;
  color: var(--error) !important;
}

.save-status {
  display: block;
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 0.35rem;
  min-height: 1.2em;
}

/* ─── Finances ───────────────────────────────────────────────────────────── */

.finance-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.finance-overview { margin-bottom: 2rem; }

.finance-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.finance-ca {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.finance-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.finance-value {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold-light);
  line-height: 1;
}

.finance-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.finance-target-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.progress-pct { color: var(--gold); font-weight: 600; }

.progress-bar {
  height: 10px;
  background: var(--bg-primary);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--violet) 0%, var(--gold) 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progress-remaining {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.finance-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mini-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.mini-stat span {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.mini-stat small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.targets-form { display: grid; gap: 1rem; }

.finance-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

/* ─── Clients dossier ────────────────────────────────────────────────────── */

.clients-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 560px;
}

.clients-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
}

.clients-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  overflow-y: auto;
}

.client-detail-header { margin-bottom: 1.5rem; }

.client-detail-header p { color: var(--text-muted); font-size: 0.9rem; }

.client-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.client-appointments { margin-top: 2rem; }

.client-appointments h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.admin-appt-card.compact {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ─── Flash messages ─────────────────────────────────────────────────────── */

.flash-container { padding-top: 1rem; }

.flash {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.flash-success { background: rgba(92, 184, 138, 0.15); border: 1px solid rgba(92, 184, 138, 0.3); color: var(--success); }
.flash-error { background: rgba(196, 92, 122, 0.15); border: 1px solid rgba(196, 92, 122, 0.3); color: var(--error); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }

  .chat-layout { grid-template-columns: 1fr; height: auto; }
  .chat-sidebar { max-height: 200px; }
  .chat-container { height: 450px; }

  .calendar-admin-layout { grid-template-columns: 1fr; }

  .dashboard-header { flex-direction: column; }
  .confirmation-actions { flex-direction: column; }
  .confirmation-actions .btn { width: 100%; }

  .finance-hero { grid-template-columns: 1fr; }
  .finance-mini-stats { grid-template-columns: 1fr; }

  .clients-layout { grid-template-columns: 1fr; height: auto; }
  .clients-sidebar { max-height: 220px; }
}
