@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
  /* Tinta y superficie */
  --ink:           #0A0B0D;
  --ink-2:         #2A2D33;
  --ink-3:         #636E72;
  --ink-4:         #A0A4AA;
  --bg:            #FAF8F5;
  --bg-card:       #FFFFFF;
  --bg-subtle:     #F2EFE9;
  --line:          rgba(10,11,13,0.08);
  --line-strong:   rgba(10,11,13,0.16);

  /* Acento de marca — rose, sobreescrito por tema de categoría */
  --primary:       #E85A8C;
  --primary-dark:  #C2356C;
  --rose:          var(--primary);
  --rose-soft:     #FFE4EC;
  --rose-deep:     var(--primary-dark);

  /* Gradiente — SOLO para cover público y FAB */
  --hero-gradient:  linear-gradient(135deg, #FFB4D1 0%, #E85A8C 60%, #B8407A 100%);
  --gradient-hero:  var(--hero-gradient);

  /* Compat aliases — mantiene inline styles existentes funcionando */
  --secondary:     var(--primary);
  --surface:       #FFFFFF;
  --text:          #0A0B0D;
  --text-muted:    #636E72;
  --border:        #DFE6E9;

  /* Estados semánticos */
  --success:       #2D8F5F;
  --success-soft:  #E3F4EB;
  --warning:       #FDCB6E;   /* bg / borders */
  --warning-soft:  #FBF1DC;   /* bg suave */
  --warning-text:  #B8821A;   /* texto sobre warning-soft */
  --danger:        #E74C3C;
  --danger-soft:   #FCE6E3;
  --info:          #2563B8;
  --info-soft:     #E2EBF7;

  /* Tipografía */
  --font-display:  'Fraunces', Georgia, serif;
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Escala tipográfica */
  --text-xs:    11px;
  --text-sm:    13px;
  --text-base:  15px;
  --text-md:    17px;
  --text-lg:    20px;
  --text-xl:    24px;
  --text-2xl:   32px;
  --text-3xl:   42px;

  /* Espaciado */
  --space-1:  4px;  --space-2:  8px;  --space-3:  12px; --space-4:  16px;
  --space-5:  20px; --space-6:  24px; --space-8:  32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px;

  /* Radios */
  --radius:      12px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 999px;

  /* Sombras — sutiles, sin glow saturado */
  --shadow:     0 2px 8px rgba(10,11,13,0.06), 0 1px 2px rgba(10,11,13,0.04);
  --shadow-sm:  0 1px 2px rgba(10,11,13,0.04);
  --shadow-md:  0 2px 8px rgba(10,11,13,0.06), 0 1px 2px rgba(10,11,13,0.04);
  --shadow-lg:  0 8px 24px rgba(10,11,13,0.08), 0 2px 4px rgba(10,11,13,0.04);
  --shadow-xl:  0 16px 48px rgba(10,11,13,0.12), 0 4px 8px rgba(10,11,13,0.06);
  --shadow-rose: 0 8px 24px rgba(232,90,140,0.24);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;

  /* Layout */
  --nav-h:        64px;
  --bottom-nav-h: 72px;
  --header-h:     56px;
  --safe-bottom:  env(safe-area-inset-bottom, 0);
  --fab-shadow:   var(--shadow-rose);

  /* Z-index */
  --z-nav:     10;
  --z-sticky:  20;
  --z-fab:     30;
  --z-overlay: 40;
  --z-modal:   50;
  --z-toast:   60;
}

/* ── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  font-feature-settings: 'cv11', 'ss01';
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── TIPOGRAFÍA ─────────────────────────────────────────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h3 { font-size: 1rem; font-weight: 600; }
p  { font-size: 0.875rem; }
small { font-size: 0.75rem; }

/* Clases tipográficas editoriales */
.text-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.text-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-xs);
  color: var(--ink-3);
  font-weight: 500;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────────── */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}
@media (min-width: 768px) {
  .app-container { max-width: 100%; display: flex; }
}

/* ── SIDEBAR DESKTOP ─────────────────────────────────────────────────────────── */
.sidebar { display: none; }
@media (min-width: 768px) {
  .sidebar {
    display: flex; flex-direction: column;
    width: 240px; min-height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed; top: 0; left: 0;
    z-index: 100;
  }
  .sidebar-logo {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
  }
  .sidebar-logo span { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
  .sidebar-logo small { display: block; color: var(--text-muted); font-size: 0.7rem; }
  .sidebar-nav { flex: 1; }
  .sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px;
    color: var(--text-muted);
    font-size: 0.875rem; font-weight: 500;
    transition: all .15s;
  }
  .sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--rose);
    background: rgba(0,0,0,.04);
  }
  .sidebar-nav a .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
  .main-content {
    margin-left: 240px; flex: 1;
    max-width: calc(100% - 240px);
    padding-bottom: 0 !important;
  }
}

/* ── HEADER MÓVIL ───────────────────────────────────────────────────────────── */
.page-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  overflow: hidden;
}
.page-header h1 { font-size: 1.1rem; }
.header-logo { font-size: 1.25rem; font-weight: 700; color: var(--rose); }

/* Línea de acento sutil en header */
.page-header::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--rose);
  opacity: 0.4;
}

/* ── BOTTOM NAV (MÓVIL) ─────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  min-height: var(--nav-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  padding: 0 4px calc(var(--safe-bottom));
  z-index: 100;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 4px;
  color: var(--ink-3); font-size: 0.625rem; font-weight: 500;
  text-decoration: none; transition: color .15s;
}
.bottom-nav a svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.bottom-nav a.active { color: var(--rose); }
.nav-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--hero-gradient); color: #fff;
  box-shadow: var(--shadow-rose);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: transform .15s;
  margin: 6px 4px;
}
.nav-fab svg {
  width: 24px; height: 24px;
  stroke: #fff; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-fab:active { transform: scale(.94); }
@media (min-width: 768px) { .bottom-nav { display: none; } }
@media (max-width: 767px) { .fab { display: none !important; } }

/* ── PÁGINA ─────────────────────────────────────────────────────────────────── */
.page-content {
  padding: 16px 16px calc(var(--nav-h) + 16px);
}
@media (min-width: 768px) {
  .page-content { padding: 24px 32px; max-width: 900px; }
}

/* ── CARDS ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 0.75rem; color: var(--text-muted);
  margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em;
}
.card-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.card-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  border-top: 3px solid var(--rose);
}
.stat-card .icon { font-size: 1.5rem; margin-bottom: 8px; }
.stat-card .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 1.25rem; font-weight: 700; line-height: 1.2; font-family: var(--font-mono); color: var(--ink); }
.stat-card .change { font-size: 0.75rem; margin-top: 4px; }
.change.up { color: var(--success); font-weight: 600; }
.change.down { color: var(--danger); }

/* ── KPI ROW (dashboard nuevo) ──────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 20px;
}
.kpi {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.02em; line-height: 1;
}
.kpi-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.kpi-meta .up { color: var(--success); font-weight: 600; }

/* ── SALUDO EDITORIAL ───────────────────────────────────────────────────────── */
.greeting-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 8px;
}
.greeting-title {
  font-family: var(--font-display);
  font-size: 28px; line-height: 1.1; font-weight: 400;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 4px;
}
.greeting-sub {
  font-size: 14px; color: var(--ink-3);
}

/* ── MSG CARD (mensaje del día en dashboard) ────────────────────────────────── */
.msg-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rose);
  padding: 18px;
  margin-bottom: 20px;
}
.msg-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 10px; font-weight: 600;
}
.msg-text {
  font-family: var(--font-display);
  font-size: 16px; line-height: 1.35; color: var(--ink); font-style: italic;
}
.msg-meta {
  font-size: 12px; color: var(--ink-3); margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.msg-edit {
  background: none; border: none; font-size: 12px;
  color: var(--ink); font-weight: 600; cursor: pointer;
}

/* ── BOTONES ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 20px; height: 48px;
  border-radius: var(--radius-full);
  font-size: 0.9375rem; font-weight: 600;
  transition: transform var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
  cursor: pointer; border: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--ink); color: #fff;
}
.btn-primary:hover { background: var(--ink-2); }
.btn-secondary {
  background: rgba(0,0,0,.06); color: var(--ink);
}
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-outline {
  background: transparent; border: 1.5px solid var(--border); color: var(--ink);
}
.btn-outline:hover { border-color: var(--rose); color: var(--rose); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0; height: auto; }
.btn-full { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.8125rem; border-radius: var(--radius-full); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── FORMULARIOS ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--surface); color: var(--ink);
  transition: border-color .15s; outline: none; appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ink);
}
.form-input.error { border-color: var(--danger); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 4px; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23636E72' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

/* ── BADGES / CHIPS ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.6875rem; font-weight: 600;
}
.badge-pending  { background: rgba(253,203,110,.2); color: #d4830a; }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-completed{ background: rgba(99,110,114,.15); color: var(--text-muted); }
.badge-cancelled{ background: rgba(231,76,60,.15);  color: var(--danger); }
.badge-rejected { background: rgba(231,76,60,.15);  color: var(--danger); }

/* ── CITA CARD ──────────────────────────────────────────────────────────────── */
.cita-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
  border-left: 4px solid var(--border);
}
.cita-card.pending  { border-left-color: var(--warning); }
.cita-card.approved { border-left-color: var(--success); }
.cita-card.completed{ border-left-color: var(--border); }
.cita-card.rejected,
.cita-card.cancelled{ border-left-color: var(--danger); }
.cita-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.cita-service { font-weight: 600; font-size: 0.9375rem; }
.cita-client  { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 4px; }
.cita-time    { font-size: 0.8125rem; font-weight: 500; font-family: var(--font-mono); color: var(--ink-3); }
.cita-price   { font-weight: 600; font-family: var(--font-mono); color: var(--ink); }
.cita-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* Cita card "próxima" en negro */
.cita-card.next-up {
  background: var(--ink); color: #fff;
  border-left-color: var(--ink);
  position: relative;
}
.cita-card.next-up .cita-service { color: #fff; }
.cita-card.next-up .cita-client,
.cita-card.next-up .cita-time { color: rgba(255,255,255,0.65); }
.cita-card.next-up .cita-price { color: #fff; }
.cita-card.next-up::before {
  content: 'PRÓXIMA';
  position: absolute; top: -8px; left: 14px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.15em;
  background: var(--rose); color: #fff;
  padding: 3px 8px; border-radius: 4px; font-weight: 600;
}

/* ── RES CARD (reservas en dashboard) ───────────────────────────────────────── */
.res-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px; align-items: center;
  margin-bottom: 8px;
}
.res-time {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  color: var(--ink); line-height: 1.1;
}
.res-time .ampm {
  display: block; font-size: 10px; color: var(--ink-3);
  font-weight: 500; margin-top: 2px; letter-spacing: 0.1em;
}
.res-body { min-width: 0; }
.res-name {
  font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-service { font-size: 12px; color: var(--ink-3); }
.res-action {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--success-soft);
  display: grid; place-items: center; border: none; cursor: pointer;
}
.res-action svg { width: 16px; height: 16px; stroke: var(--success); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.res-action.wsp { background: #DCF7C5; }
.res-action.wsp svg { stroke: #128C7E; }
.res-card.next {
  border-color: var(--ink); background: var(--ink); color: #fff; position: relative;
}
.res-card.next .res-time, .res-card.next .res-name { color: #fff; }
.res-card.next .res-time .ampm, .res-card.next .res-service { color: rgba(255,255,255,0.6); }
.res-card.next .res-action { background: rgba(255,255,255,0.12); }
.res-card.next .res-action svg { stroke: #fff; }
.res-card.next::before {
  content: 'AHORA';
  position: absolute; top: -8px; left: 16px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em;
  background: var(--rose); color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: 600;
}

/* ── LOADING / SKELETON ─────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f0f0f0 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.2s infinite; border-radius: 6px;
}
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── TOAST ──────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%;
  transform: translateX(-50%);
  z-index: 1000; width: calc(100% - 32px); max-width: 448px;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: var(--radius-full);
  font-size: 0.875rem; font-weight: 500;
  margin-bottom: 8px;
  animation: toast-in .25s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MODAL ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 20px 16px 32px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(100%); transition: transform .25s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 20px;
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 16px; }
@media (min-width: 768px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: var(--radius); transform: scale(.95); max-height: 80vh; }
  .modal-overlay.open .modal { transform: scale(1); }
}

/* ── AUTH ────────────────────────────────────────────────────────────────────── */
.auth-container {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px 24px; max-width: 420px; margin: 0 auto;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo h1 { font-size: 2rem; color: var(--rose); font-family: var(--font-display); font-weight: 400; }
.auth-logo p { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }
.auth-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 24px;
}
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--text-muted); }
.auth-footer a { color: var(--rose); font-weight: 500; }

/* ── SECTION TITLE ──────────────────────────────────────────────────────────── */
.section-title {
  font-size: 1rem; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}

/* ── TOGGLE (día activo/inactivo) ──────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 12px; cursor: pointer; transition: background .15s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: transform .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked ~ .toggle-slider { background: var(--rose); }
.toggle input:checked ~ .toggle-slider:before { transform: translateX(20px); }

/* ── TIME INPUTS ────────────────────────────────────────────────────────────── */
.time-row {
  display: flex; gap: 8px; align-items: center; font-size: 0.8125rem;
}
.time-row input[type=time] {
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 8px 10px; font-size: 0.875rem; font-family: var(--font-mono);
  outline: none; background: var(--surface);
}
.time-row input[type=time]:focus { border-color: var(--rose); }

/* ── CALENDARIO ─────────────────────────────────────────────────────────────── */
.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; margin-bottom: 8px;
}
.cal-header h3 { font-size: 1rem; font-weight: 600; }
.cal-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border); font-size: 1rem; transition: all .15s;
}
.cal-btn:hover { border-color: var(--rose); color: var(--rose); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-name {
  text-align: center; font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted); padding: 4px 0;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em;
}
.cal-day {
  text-align: center; padding: 8px 4px; border-radius: var(--radius-sm);
  font-size: 0.8125rem; cursor: pointer; position: relative;
  min-height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all .15s;
}
.cal-day:hover:not(.disabled):not(.empty) { background: rgba(0,0,0,.05); }
.cal-day.today { font-weight: 700; color: var(--rose); }
.cal-day.selected { background: var(--ink); color: #fff; font-weight: 600; }
.cal-day.disabled { color: var(--border); cursor: default; }
.cal-day.empty { cursor: default; }
.cal-day .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rose); margin-top: 2px; }
.cal-day.selected .dot { background: #fff; }

/* ── DAY STRIP (nuevo — booking flow) ──────────────────────────────────────── */
.day-strip {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -16px 24px; padding: 4px 16px 8px;
  scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-tile {
  flex-shrink: 0; width: 58px; height: 80px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; gap: 2px; transition: all var(--duration-fast) var(--ease-out);
}
.day-tile:hover:not(.disabled) { border-color: var(--ink); }
.day-tile-name {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase;
}
.day-tile-num {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  color: var(--ink); line-height: 1;
}
.day-tile-month {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase;
}
.day-tile.selected { background: var(--ink); border-color: var(--ink); }
.day-tile.selected .day-tile-name,
.day-tile.selected .day-tile-month { color: rgba(255,255,255,0.6); }
.day-tile.selected .day-tile-num { color: #fff; }
.day-tile.disabled { opacity: 0.4; cursor: not-allowed; }
.day-tile-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--success); margin-top: 2px;
}
.day-tile-dot-placeholder { width: 5px; height: 5px; margin-top: 2px; }

/* ── SLOT SECTIONS (agrupados Mañana/Tarde/Noche) ───────────────────────────── */
.slot-section { margin-bottom: 20px; }
.slot-section-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.slot-section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot-item {
  padding: 12px 0; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 10px;
  text-align: center; font-family: var(--font-mono);
  font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; position: relative;
  transition: all var(--duration-fast) var(--ease-out);
}
.slot-item:hover:not(.unavailable) { border-color: var(--ink); }
.slot-item.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot-item.selected::after {
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--rose);
}
.slot-item.unavailable {
  opacity: 0.3; text-decoration: line-through; cursor: not-allowed; background: transparent;
}

/* ── BOOKING STEPS ──────────────────────────────────────────────────────────── */
.step-indicator {
  display: flex; justify-content: center; gap: 6px; margin-bottom: 24px;
}
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); transition: all .2s;
}
.step-dot.active { background: var(--ink); transform: scale(1.3); }
.step-dot.done   { background: var(--success); }
.step { display: none; }
.step.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Progress bar segmentada */
.booking-progress {
  height: 3px; background: var(--line);
  display: flex; gap: 4px; padding: 0 20px; margin-top: -1px;
}
.progress-seg { flex: 1; background: var(--line); border-radius: 2px; height: 3px; }
.progress-seg.active { background: var(--rose); }
.progress-seg.done   { background: var(--ink); }

/* Summary card en booking */
.booking-summary {
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.booking-summary-name { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.booking-summary-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.05em; }
.booking-summary-price { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--ink); }

/* Footer del booking */
.booking-footer {
  position: sticky; bottom: 0;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: rgba(250,248,245,0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.booking-footer-summary {
  display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px;
}
.booking-footer-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase;
}
.booking-footer-value { font-size: 14px; color: var(--ink); font-weight: 600; }
.booking-footer-value strong { font-family: var(--font-mono); }

/* Servicio option */
.service-option {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: all .15s;
}
.service-option:hover, .service-option.selected {
  border-color: var(--ink); background: rgba(0,0,0,.02);
}
.service-name { font-weight: 600; font-size: 0.9375rem; }
.service-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.service-price { font-weight: 700; font-family: var(--font-mono); color: var(--ink); font-size: 1rem; }

/* Slots legados (grid 3 columnas — mantiene compat) */
.time-slot {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; cursor: pointer; text-align: center;
  font-size: 0.875rem; font-weight: 500; font-family: var(--font-mono);
  transition: all .15s;
}
.time-slot:hover, .time-slot.selected {
  border-color: var(--ink); background: rgba(0,0,0,.04);
}
.time-slot.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.time-slot-end { font-size: 0.7rem; opacity: .75; }
.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* ── PANTALLA DE CONFIRMACIÓN (post-booking) ────────────────────────────────── */
.conf-check {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center;
  margin: 0 auto 28px; position: relative;
  animation: pop 600ms var(--ease-out);
}
.conf-check::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px solid var(--line);
  animation: ring 1200ms var(--ease-out);
}
.conf-check svg {
  width: 36px; height: 36px; stroke: #fff; fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30;
  animation: draw 600ms 200ms var(--ease-out) forwards;
}
@keyframes pop { 0% { transform: scale(0.5); opacity:0; } 100% { transform: scale(1); opacity:1; } }
@keyframes ring { 0% { transform: scale(0.8); opacity: 0.6; } 100% { transform: scale(1.2); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.conf-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--success); margin-bottom: 10px; text-transform: uppercase; font-weight: 600;
  text-align: center;
}
.conf-title {
  font-family: var(--font-display); font-size: 30px; line-height: 1.1;
  color: var(--ink); font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 6px; text-align: center;
}
.conf-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 28px; text-align: center; }
.conf-details {
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--line); padding: 4px 20px; margin-bottom: 20px;
}
.conf-detail-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.conf-detail-row:last-child { border-bottom: none; }
.conf-detail-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bg-subtle);
  display: grid; place-items: center;
}
.conf-detail-icon svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.conf-detail-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 2px;
}
.conf-detail-value { font-size: 14px; color: var(--ink); font-weight: 600; }
.conf-detail-meta { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.conf-closing {
  background: var(--ink); color: #fff; border-radius: var(--radius-xl);
  padding: 24px; margin-bottom: 20px; position: relative; overflow: hidden; text-align: left;
}
.conf-closing::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 70%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(232,90,140,0.18), transparent 60%);
  pointer-events: none;
}
.conf-closing-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--rose);
  text-transform: uppercase; margin-bottom: 12px; font-weight: 600; position: relative;
}
.conf-closing-text {
  font-family: var(--font-display); font-size: 18px; line-height: 1.35;
  font-style: italic; margin-bottom: 12px; position: relative;
}
.conf-closing-author { font-size: 12px; color: rgba(255,255,255,0.6); position: relative; }
.conf-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px;
}
.conf-action-btn {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; color: var(--ink); font-size: 12px; font-weight: 600;
}
.conf-action-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.conf-footer {
  position: sticky; bottom: 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  background: rgba(250,248,245,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.conf-sig {
  text-align: center; margin-top: 12px;
  font-family: var(--font-mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.conf-sig span { color: var(--rose); }

/* ── PERFIL PÚBLICO ─────────────────────────────────────────────────────────── */
.pro-hero {
  background: var(--hero-gradient);
  color: #fff; padding: 40px 24px 80px;
  text-align: left; position: relative; overflow: hidden; min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.pro-hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12), transparent 40%),
              radial-gradient(circle at 80% 80%, rgba(0,0,0,0.15), transparent 50%);
}
.pro-hero::before { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; width: 220px; height: 220px; top: -80px; right: -60px; }
.hero-circle-sm { position: absolute; border-radius: 50%; background: rgba(255,255,255,.07); pointer-events: none; width: 80px; height: 80px; top: 20px; left: -20px; }
.pro-hero-actions {
  position: absolute; top: 56px; left: 20px; right: 20px;
  display: flex; justify-content: space-between; z-index: 4;
}
.hero-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.28);
  display: grid; place-items: center; cursor: pointer; z-index: 5;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; opacity: 0.8; margin-bottom: 8px; position: relative; z-index: 3;
}
.hero-name {
  font-family: var(--font-display); font-size: 36px; line-height: 1.05;
  font-weight: 400; letter-spacing: -0.02em; position: relative; z-index: 3;
}
/* Identity card flotante */
.identity-card {
  background: var(--bg-card); margin: -32px 16px 0; border-radius: var(--radius-xl);
  padding: 18px; box-shadow: var(--shadow-md); position: relative; z-index: 4;
  display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center;
}
.identity-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 24px;
  overflow: hidden; flex-shrink: 0;
}
.identity-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  color: var(--ink); line-height: 1.1; margin-bottom: 4px; letter-spacing: -0.01em;
}
.identity-meta { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.identity-rating { text-align: right; }
.identity-rating .stars { color: var(--rose); font-size: 13px; letter-spacing: 1px; }
.identity-rating .num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* Mensaje del día en perfil público */
.msg-block {
  margin: 20px 16px 0;
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rose);
}
.msg-block .msg-eyebrow {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--rose); margin-bottom: 10px; font-weight: 600;
}
.msg-block .msg-text {
  font-family: var(--font-display); font-size: 17px; line-height: 1.3;
  color: var(--ink); font-style: italic;
}
.msg-block .msg-author { font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.msg-block .msg-author span { color: var(--rose); }

/* Servicios en perfil público */
.svc-list { display: flex; flex-direction: column; gap: 8px; }
.svc-item {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--line); padding: 16px;
  display: flex; gap: 12px; align-items: center;
  cursor: pointer; transition: border-color var(--duration-fast) var(--ease-out);
}
.svc-item:hover { border-color: var(--ink); }
.svc-item.selected { border-color: var(--ink); background: var(--bg-subtle); }
.svc-item-body { flex: 1; min-width: 0; }
.svc-item-name { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.svc-item-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.05em; }
.svc-item-meta strong { color: var(--ink-2); font-weight: 500; }
.svc-item-price { font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--ink); }
.svc-item-arrow {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-subtle);
  display: grid; place-items: center; margin-left: 6px; flex-shrink: 0;
}

/* Schedule preview en perfil público */
.schedule-preview {
  margin: 16px 16px 0; padding: 16px;
  background: var(--bg-subtle); border-radius: var(--radius-lg);
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.schedule-status { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.schedule-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.schedule-status-text { font-size: 13px; font-weight: 600; color: var(--ink); }
.schedule-hours { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* CTA bar sticky */
.cta-bar {
  position: sticky; bottom: 0; margin-top: 24px;
  background: rgba(250,248,245,0.96); backdrop-filter: blur(16px);
  padding: 14px 16px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--line);
}
.cta-btn {
  width: 100%; background: var(--ink); color: #fff;
  border: none; border-radius: var(--radius-full); padding: 18px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform var(--duration-fast) var(--ease-out);
}
.cta-btn:active { transform: scale(0.99); }
.cta-btn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Footer viral en perfil público */
.footer-viral {
  margin: 0 16px 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 18px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.footer-viral-title { font-size: .9rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.footer-viral-sub   { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.footer-viral-cta   { display: block; width: 100%; text-decoration: none; text-align: center; font-size: .875rem; padding: 13px 16px; height: auto; margin-top: 14px; }
.footer-viral-note  { font-size: .7rem; color: var(--text-muted); margin-top: 8px; }

/* Avatar legado (se usa en agenda.html) */
.pro-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.5);
  margin: 0 auto 12px; object-fit: cover;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.2);
  font-weight: 700; letter-spacing: -.5px; position: relative; z-index: 2;
}
.public-page { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
.public-content { padding: 16px 16px 24px; }

/* ── BOOKING PAGE ────────────────────────────────────────────────────────────── */
.booking-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.booking-header {
  background: var(--bg-card); border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  position: sticky; top: 0; z-index: 50;
}
.booking-content { padding: 20px 16px 100px; }

/* Mensaje cliente (en perfil público — compat) */
.mensaje-cliente-wrap {
  margin: 0 0 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rose);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.mensaje-cliente-wrap .icon { font-size: 1.2rem; flex-shrink: 0; }
.mensaje-cliente-wrap p { font-size: .8125rem; line-height: 1.5; font-style: italic; color: var(--ink-2); }

/* ── EMPTY STATE ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.875rem; }

/* ── FAB — gradiente permitido aquí ─────────────────────────────────────────── */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 16px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--hero-gradient); color: #fff;
  box-shadow: var(--shadow-rose);
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s; z-index: var(--z-fab);
}
.fab:hover { transform: scale(1.05); box-shadow: var(--shadow-rose); }
@media (min-width: 768px) { .fab { bottom: 24px; right: 24px; } }

/* ── UTILS ───────────────────────────────────────────────────────────────────── */
.text-primary { color: var(--rose); }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4  { margin-top: 4px; }  .mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-center  { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── MÁS MENU (nav móvil) ───────────────────────────────────────────────────── */
.mas-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 98;
}
.mas-overlay.open { display: block; }
.mas-menu {
  position: fixed; bottom: calc(var(--nav-h) + 8px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px); max-width: 448px;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px 0;
  z-index: 99; opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.mas-menu.open { opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0); }
.mas-menu a, .mas-menu button {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; width: 100%;
  font-size: .9375rem; font-weight: 500; color: var(--ink);
  background: none; border: none; cursor: pointer; text-align: left;
  transition: background .12s;
}
.mas-menu a:hover, .mas-menu button:hover { background: rgba(0,0,0,.04); }
.mas-menu a.active { color: var(--rose); }
.mas-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
@media (min-width: 768px) { .mas-menu, .mas-overlay { display: none !important; } }

/* ── SIDEBAR: nav group title ────────────────────────────────────────────────── */
.nav-group-title {
  padding: 16px 24px 4px;
  font-size: .65rem; font-weight: 700; letter-spacing: .08em;
  color: var(--text-muted); text-transform: uppercase;
}

/* ── MENSAJE DEL DÍA (dashboard — rediseñado sin gradiente) ─────────────────── */
.mensaje-dia-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rose);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--ink);
}
.mensaje-dia-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.mensaje-dia-label {
  font-family: var(--font-mono); font-size: .65rem; font-weight: 700;
  letter-spacing: .06em; color: var(--rose); text-transform: uppercase; margin-bottom: 4px;
}
.mensaje-dia-text {
  font-family: var(--font-display); font-size: .9375rem; line-height: 1.45;
  font-style: italic; color: var(--ink);
}

/* ── MOTIVACIONAL HOY ───────────────────────────────────────────────────────── */
.motiv-card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px;
}
.motiv-top { display: flex; align-items: center; justify-content: space-between; }
.motiv-circle { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.motiv-circle svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.motiv-circle-bg { fill: none; stroke: var(--border); stroke-width: 6; }
.motiv-circle-fill { fill: none; stroke: var(--rose); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 163; stroke-dashoffset: 163; transition: stroke-dashoffset .8s ease; }
.motiv-circle-pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 700; color: var(--rose);
}
.motiv-progress-track { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.motiv-progress-fill { height: 100%; background: var(--rose); border-radius: 3px; width: 0%; transition: width .8s ease; }
.motiv-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-muted); margin-top: 5px; }

/* ── CLIENTES: cards ─────────────────────────────────────────────────────────── */
.client-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  flex-direction: column; align-items: stretch; padding: 14px 16px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: transform .12s, box-shadow .12s;
  border-left: 4px solid var(--border);
}
.client-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.client-card.activo  { border-left-color: var(--success); }
.client-card.riesgo  { border-left-color: var(--warning); }
.client-card.perdido { border-left-color: var(--danger); }
.client-card.nuevo   { border-left-color: var(--rose); }

.client-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--rose-soft); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; flex-shrink: 0;
  font-style: normal;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-weight: 600; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-meta { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.client-stats { text-align: right; flex-shrink: 0; }
.client-spent { font-weight: 700; font-family: var(--font-mono); font-size: .9rem; color: var(--ink); }
.client-visits { font-size: .7rem; color: var(--text-muted); }

/* CRM stats en mono */
.crm-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0;
}
.crm-stat .crm-stat-value {
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
  color: var(--ink); line-height: 1; margin-bottom: 4px; letter-spacing: -0.02em;
}
.crm-stat .crm-stat-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-3); text-transform: uppercase;
}

/* Próxima cita CRM en negro */
.next-appointment {
  background: var(--ink); color: #fff; border-radius: var(--radius-lg);
  padding: 16px; display: grid; grid-template-columns: 56px 1fr; gap: 14px;
  align-items: center; position: relative; overflow: hidden;
}
.next-appointment::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(232,90,140,0.18), transparent 60%);
}
.next-appt-date { text-align: center; position: relative; }
.next-appt-day { font-family: var(--font-mono); font-size: 9px; color: var(--rose); letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 2px; }
.next-appt-num { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.next-appt-month { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: rgba(255,255,255,0.5); text-transform: uppercase; }
.next-appt-info { position: relative; }
.next-appt-time { font-family: var(--font-mono); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.next-appt-svc { font-size: 12px; color: rgba(255,255,255,0.7); }

/* Notas con bullets rosa */
.notes-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.note-item { padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); line-height: 1.45; display: flex; gap: 10px; }
.note-item:first-child { border-top: none; padding-top: 0; }
.note-bullet { width: 6px; height: 6px; border-radius: 50%; background: var(--rose); flex-shrink: 0; margin-top: 7px; }

.status-chip {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 100px;
  font-size: .65rem; font-weight: 700; letter-spacing: .03em;
}
.status-chip.activo  { background: var(--success-soft); color: var(--success); }
.status-chip.riesgo  { background: rgba(253,203,110,.25); color: #9a6c00; }
.status-chip.perdido { background: rgba(231,76,60,.12); color: var(--danger); }
.status-chip.nuevo   { background: var(--rose-soft); color: var(--rose-deep); }

/* ── TABS ──────────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex; background: var(--bg);
  border-radius: var(--radius-sm); padding: 3px; gap: 3px; margin-bottom: 16px;
}
.tab-btn {
  flex: 1; height: 36px; border-radius: 6px;
  font-size: .8125rem; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer; transition: all .15s;
}
.tab-btn.active { background: var(--surface); color: var(--rose); box-shadow: var(--shadow); font-weight: 600; }

/* ── RANKING ─────────────────────────────────────────────────────────────────── */
.rank-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
  background: var(--bg); color: var(--text-muted);
}
.rank-num.gold   { background: #FFD700; color: #7a5c00; }
.rank-num.silver { background: #C0C0C0; color: #444; }
.rank-num.bronze { background: #CD7F32; color: #fff; }
.rank-info { flex: 1; }
.rank-name { font-weight: 600; font-size: .875rem; }
.rank-sub  { font-size: .75rem; color: var(--text-muted); }
.rank-value { font-weight: 700; font-family: var(--font-mono); font-size: .9rem; color: var(--ink); }

/* ── CLIENTE DETALLE STATS ───────────────────────────────────────────────────── */
.detail-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.detail-stat { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; }
.detail-stat-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 3px; }
.detail-stat-value { font-size: 1rem; font-weight: 700; font-family: var(--font-mono); }

/* ── PREFIJO TELÉFONO ────────────────────────────────────────────────────────── */
.phone-wrap { display: flex; }
.phone-prefix {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--bg); border: 1.5px solid var(--border); border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-family: var(--font-mono); font-size: .9rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.phone-wrap .form-input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.phone-wrap:focus-within .phone-prefix { border-color: var(--ink); }
.phone-wrap:focus-within .form-input { border-color: var(--ink); }

/* ── SEARCH BAR ──────────────────────────────────────────────────────────────── */
.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap input { padding-left: 36px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .9rem; pointer-events: none; }

/* ── SPLASH SCREEN ───────────────────────────────────────────────────────────── */
.splash-overlay {
  position: fixed; inset: 0;
  background: var(--ink);
  z-index: 999;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 400ms var(--ease-out);
}
.splash-overlay.show { opacity: 1; pointer-events: auto; }
.splash-overlay::before {
  content: ''; position: absolute; top: -20%; left: -10%; width: 120%; height: 70%;
  background: radial-gradient(ellipse at center, rgba(232,90,140,0.22), transparent 65%);
  pointer-events: none;
}
.splash-date {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--rose);
  margin-bottom: 28px; text-transform: uppercase; position: relative;
}
.splash-msg {
  font-family: var(--font-display); font-size: 28px; line-height: 1.15; color: #fff;
  margin-bottom: 20px; max-width: 320px; position: relative;
}
.splash-meta { font-size: 14px; color: rgba(255,255,255,.55); margin-bottom: 40px; position: relative; }
.splash-meta strong { color: #fff; font-weight: 600; }
.splash-btn {
  background: #fff; color: var(--ink); border: none;
  border-radius: var(--radius-full); padding: 14px 32px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  position: relative;
}

/* ── TEMAS POR CATEGORÍA ────────────────────────────────────────────────────── */

/* 💅 UÑAS */
[data-theme="unas"] {
  --primary:       #E91E8C; --primary-dark: #C2185B;
  --bg:            #FFF0F8;
  --hero-gradient: linear-gradient(135deg, #F472B6 0%, #E91E8C 60%, #C2185B 100%);
}
[data-theme="unas"] body {
  background-color: #FFF0F8;
  background-image: radial-gradient(rgba(233,30,140,.07) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
[data-theme="unas"] .sidebar-nav a:hover,
[data-theme="unas"] .sidebar-nav a.active { color: #E91E8C; background: rgba(233,30,140,.06); }
[data-theme="unas"] .bottom-nav a.active  { color: #E91E8C; }

/* ✂️ BARBERÍA */
[data-theme="barberia"] {
  --primary:       #D32F2F; --primary-dark: #B71C1C;
  --bg:            #FFF5F5;
  --hero-gradient: linear-gradient(135deg, #EF9A9A 0%, #D32F2F 60%, #B71C1C 100%);
}
[data-theme="barberia"] body {
  background-color: #FFF5F5;
  background-image: repeating-linear-gradient(45deg,rgba(211,47,47,.04) 0,rgba(211,47,47,.04) 1px,transparent 0,transparent 50%), repeating-linear-gradient(-45deg,rgba(55,71,79,.03) 0,rgba(55,71,79,.03) 1px,transparent 0,transparent 50%);
  background-size: 14px 14px;
}
[data-theme="barberia"] .sidebar-nav a:hover,
[data-theme="barberia"] .sidebar-nav a.active { color: #D32F2F; background: rgba(211,47,47,.06); }
[data-theme="barberia"] .bottom-nav a.active  { color: #D32F2F; }

/* 💇 PELUQUERÍA */
[data-theme="peluqueria"] {
  --primary:       #E8A020; --primary-dark: #C8880A;
  --bg:            #FFFBF0;
  --hero-gradient: linear-gradient(135deg, #FCD34D 0%, #E8A020 60%, #C8880A 100%);
}
[data-theme="peluqueria"] body {
  background-color: #FFFBF0;
  background-image: radial-gradient(ellipse, rgba(232,160,32,.08) 1px, transparent 1px);
  background-size: 18px 18px;
}
[data-theme="peluqueria"] .sidebar-nav a:hover,
[data-theme="peluqueria"] .sidebar-nav a.active { color: #E8A020; background: rgba(232,160,32,.06); }
[data-theme="peluqueria"] .bottom-nav a.active  { color: #E8A020; }

/* 💄 MAQUILLAJE */
[data-theme="maquillaje"] {
  --primary:       #AD1457; --primary-dark: #880E4F;
  --bg:            #FFF5F9;
  --hero-gradient: linear-gradient(135deg, #F48FB1 0%, #AD1457 60%, #880E4F 100%);
}
[data-theme="maquillaje"] body {
  background-color: #FFF5F9;
  background-image: radial-gradient(circle, rgba(173,20,87,.06) 1px, transparent 1px);
  background-size: 16px 16px;
}
[data-theme="maquillaje"] .sidebar-nav a:hover,
[data-theme="maquillaje"] .sidebar-nav a.active { color: #AD1457; background: rgba(173,20,87,.06); }
[data-theme="maquillaje"] .bottom-nav a.active  { color: #AD1457; }

/* 🌿 ESTÉTICA */
[data-theme="estetica"] {
  --primary:       #00897B; --primary-dark: #00695C;
  --bg:            #F0FAFA;
  --hero-gradient: linear-gradient(135deg, #80CBC4 0%, #00897B 60%, #00695C 100%);
}
[data-theme="estetica"] body {
  background-color: #F0FAFA;
  background-image: radial-gradient(circle, rgba(0,137,123,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}
[data-theme="estetica"] .sidebar-nav a:hover,
[data-theme="estetica"] .sidebar-nav a.active { color: #00897B; background: rgba(0,137,123,.06); }
[data-theme="estetica"] .bottom-nav a.active  { color: #00897B; }

/* Salud & Bienestar */
[data-theme="kinesiologo"],[data-theme="nutricion"],[data-theme="psicologia"],[data-theme="masajes"],[data-theme="medico"] {
  --primary: #0288D1; --primary-dark: #01579B;
  --bg: #F0F8FF; --hero-gradient: linear-gradient(135deg,#81D4FA 0%,#0288D1 60%,#01579B 100%);
}
[data-theme="kinesiologo"] body,[data-theme="nutricion"] body,[data-theme="psicologia"] body,[data-theme="masajes"] body,[data-theme="medico"] body {
  background-color: #F0F8FF;
  background-image: radial-gradient(circle, rgba(2,136,209,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* Fitness */
[data-theme="entrenador"],[data-theme="yoga"],[data-theme="deportes"] {
  --primary: #E65100; --primary-dark: #BF360C;
  --bg: #FFF8F5; --hero-gradient: linear-gradient(135deg,#FFAB76 0%,#E65100 60%,#BF360C 100%);
}
[data-theme="entrenador"] body,[data-theme="yoga"] body,[data-theme="deportes"] body {
  background-color: #FFF8F5;
  background-image: radial-gradient(circle, rgba(230,81,0,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* Profesional */
[data-theme="abogado"],[data-theme="contador"],[data-theme="arquitecto"] {
  --primary: #1A237E; --primary-dark: #0D1259;
  --bg: #F5F6FF; --hero-gradient: linear-gradient(135deg,#7986CB 0%,#1A237E 60%,#0D1259 100%);
}
[data-theme="abogado"] body,[data-theme="contador"] body,[data-theme="arquitecto"] body {
  background-color: #F5F6FF;
  background-image: radial-gradient(circle, rgba(26,35,126,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* Fotógrafo / Diseñador */
[data-theme="fotografo"],[data-theme="disenador"] {
  --primary: #6A1B9A; --primary-dark: #4A148C;
  --bg: #FBF5FF; --hero-gradient: linear-gradient(135deg,#CE93D8 0%,#6A1B9A 60%,#4A148C 100%);
}
[data-theme="fotografo"] body,[data-theme="disenador"] body {
  background-color: #FBF5FF;
  background-image: radial-gradient(circle, rgba(106,27,154,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* Educación */
[data-theme="profesor"],[data-theme="coach"],[data-theme="musica"] {
  --primary: #00695C; --primary-dark: #004D40;
  --bg: #F0FFF8; --hero-gradient: linear-gradient(135deg,#80CBC4 0%,#00695C 60%,#004D40 100%);
}
[data-theme="profesor"] body,[data-theme="coach"] body,[data-theme="musica"] body {
  background-color: #F0FFF8;
  background-image: radial-gradient(circle, rgba(0,105,92,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* Mascotas */
[data-theme="peluqueria_canina"],[data-theme="peluqueria_felina"],[data-theme="veterinario_pet"],[data-theme="adiestrador"],[data-theme="paseador"],[data-theme="petsitter"] {
  --primary: #6B8E5A; --primary-dark: #4E6B3F;
  --bg: #F4F9F0; --hero-gradient: linear-gradient(135deg,#A5D6A7 0%,#6B8E5A 60%,#4E6B3F 100%);
}

/* Tatuador */
[data-theme="tatuador"] {
  --primary: #37474F; --primary-dark: #263238;
  --bg: #F5F5F5; --hero-gradient: linear-gradient(135deg,#90A4AE 0%,#37474F 60%,#263238 100%);
}

/* Otro */
[data-theme="otro"] { --primary: #455A64; --primary-dark: #263238; }

/* Sidebar hover para nuevas categorías — aplicado genéricamente */
[data-theme] .sidebar-nav a:hover,
[data-theme] .sidebar-nav a.active { color: var(--primary); background: rgba(0,0,0,.05); }
[data-theme] .bottom-nav a.active  { color: var(--primary); }

/* ── TATUADOR body ──────────────────────────────────────────────────────────── */
[data-theme="tatuador"] body {
  background-color: #F5F5F5;
  background-image: radial-gradient(circle, rgba(55,71,79,.07) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
}

/* 👁 LASH / MICROPIGMENTACIÓN → paleta maquillaje */
[data-theme="lash"],[data-theme="micropigmentacion"] {
  --primary: #AD1457; --primary-dark: #880E4F;
  --bg: #FFF5F9;
  --hero-gradient: linear-gradient(135deg,#F48FB1 0%,#AD1457 60%,#880E4F 100%);
}
[data-theme="lash"] body,[data-theme="micropigmentacion"] body {
  background-color: #FFF5F9;
  background-image: radial-gradient(circle,rgba(173,20,87,.06) 1px,transparent 1px);
  background-size: 16px 16px;
}

/* 🪒 DEPILACIÓN → paleta estética */
[data-theme="depilacion"] {
  --primary: #00897B; --primary-dark: #00695C;
  --bg: #F0FDFA;
  --hero-gradient: linear-gradient(135deg,#80CBC4 0%,#00897B 60%,#00695C 100%);
}
[data-theme="depilacion"] body {
  background-color: #F0FDFA;
  background-image: radial-gradient(ellipse,rgba(0,137,123,.07) 1px,transparent 1px);
  background-size: 18px 18px;
}

/* 🦶 PODOLOGÍA / 🗣️ FONOAUDIOLOGÍA / 💉 ENFERMERÍA → paleta salud */
[data-theme="podologia"],[data-theme="fonoaudiologo"],[data-theme="enfermeria"] {
  --primary: #1976D2; --primary-dark: #1565C0;
  --bg: #F0F8FF;
  --hero-gradient: linear-gradient(135deg,#64B5F6 0%,#1976D2 60%,#1565C0 100%);
}
[data-theme="podologia"] body,[data-theme="fonoaudiologo"] body,[data-theme="enfermeria"] body {
  background-color: #F0F8FF;
  background-image: radial-gradient(circle,rgba(25,118,210,.05) 1px,transparent 1px);
  background-size: 18px 18px;
}

/* 🌀 TERAPIAS ALTERNATIVAS → púrpura místico */
[data-theme="holistico"],[data-theme="acupuntura"],[data-theme="naturopatia"] {
  --primary: #7B1FA2; --primary-dark: #6A1B9A;
  --bg: #FDF7FF;
  --hero-gradient: linear-gradient(135deg,#CE93D8 0%,#7B1FA2 60%,#6A1B9A 100%);
}
[data-theme="holistico"] body,[data-theme="acupuntura"] body,[data-theme="naturopatia"] body {
  background-color: #FDF7FF;
  background-image: radial-gradient(circle,rgba(123,31,162,.06) 1px,transparent 1px);
  background-size: 20px 20px;
}

/* 🏡 CORREDOR / 💻 TÉCNICO PC → paleta profesional */
[data-theme="corredor"],[data-theme="tecnico_pc"] {
  --primary: #455A64; --primary-dark: #263238;
  --bg: #F5F7F8;
  --hero-gradient: linear-gradient(135deg,#90A4AE 0%,#455A64 60%,#263238 100%);
}
[data-theme="corredor"] body,[data-theme="tecnico_pc"] body {
  background-color: #F5F7F8;
  background-image: repeating-linear-gradient(90deg,rgba(69,90,100,.04) 0,rgba(69,90,100,.04) 1px,transparent 0,transparent 20px),
    repeating-linear-gradient(0deg,rgba(69,90,100,.04) 0,rgba(69,90,100,.04) 1px,transparent 0,transparent 20px);
  background-size: 20px 20px;
}

/* 🌎 IDIOMAS → paleta educación */
[data-theme="idiomas"] {
  --primary: #5C6BC0; --primary-dark: #3949AB;
  --bg: #F5F6FF;
  --hero-gradient: linear-gradient(135deg,#9FA8DA 0%,#5C6BC0 60%,#3949AB 100%);
}
[data-theme="idiomas"] body {
  background-color: #F5F6FF;
  background-image: radial-gradient(circle,rgba(92,107,192,.06) 1px,transparent 1px);
  background-size: 18px 18px;
}

/* 🎧 DJ / 🎉 ANIMADOR / 👨‍🍳 CHEF / 🎂 REPOSTERÍA → naranja vibrante */
[data-theme="dj"],[data-theme="animador"],[data-theme="chef"],[data-theme="reposteria"] {
  --primary: #E65100; --primary-dark: #BF360C;
  --bg: #FFF8F5;
  --hero-gradient: linear-gradient(135deg,#FFAB76 0%,#E65100 60%,#BF360C 100%);
}
[data-theme="dj"] body,[data-theme="animador"] body,[data-theme="chef"] body,[data-theme="reposteria"] body {
  background-color: #FFF8F5;
  background-image: radial-gradient(circle,rgba(230,81,0,.06) 1px,transparent 1px);
  background-size: 18px 18px;
}

/* ── LÁPIZ ASISTENTE ─────────────────────────────────────────────────────────── */
.lapiz-btn {
  position: fixed; bottom: calc(var(--nav-h) + 16px); right: 16px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--hero-gradient);
  box-shadow: var(--shadow-rose), 0 2px 6px rgba(0,0,0,.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; z-index: var(--z-fab);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  opacity: 1; padding: 0;
}
.lapiz-btn svg { display: block; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); }
.lapiz-btn:hover { transform: scale(1.1); }
.lapiz-btn.hidden { transform: scale(0); opacity: 0; pointer-events: none; }

.lapiz-bubble {
  position: fixed; bottom: calc(var(--nav-h) + 80px); right: 16px;
  width: 268px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 16px 16px 4px 16px;
  padding: 14px 16px; box-shadow: var(--shadow-lg);
  font-size: .8125rem; line-height: 1.55; color: var(--ink);
  z-index: 201; transform-origin: bottom right;
  transform: scale(0); opacity: 0;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), opacity .18s ease;
  pointer-events: none;
}
.lapiz-bubble.visible { transform: scale(1); opacity: 1; pointer-events: auto; }
.lapiz-bubble .lapiz-close {
  position: absolute; top: 8px; right: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--border); border: none; cursor: pointer;
  font-size: .7rem; color: var(--text-muted); padding: 0;
  transition: background .15s, color .15s;
}
.lapiz-bubble .lapiz-close:hover { background: var(--danger); color: #fff; }
#lapiz-msg { display: block; padding-right: 20px; }
.lapiz-bubble .lapiz-type-success { color: var(--success); font-weight: 600; }
.lapiz-bubble .lapiz-type-error   { color: var(--danger);  font-weight: 600; }
.lapiz-bubble .lapiz-type-info    { color: var(--rose); }

@media (min-width: 768px) {
  .lapiz-btn    { bottom: 28px; right: 36px; }
  .lapiz-bubble { bottom: 92px; right: 36px; }
}
