/* ============================================================
   Opinfinita — styles.css
   Multi-tema con selector en navbar
   Tipografía: Poppins + Playfair Display
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;0,800;1,700;1,800&display=swap');

/* ════════════════════════════════════════════════════════════
   TEMAS — se activan con data-theme en <html>
   ════════════════════════════════════════════════════════════ */

/* TEMA 1: Tierra/Lila (default — el actual de Viviana) */
:root,
[data-theme="tierra"] {
  --primary:       #5C3D6E;
  --primary-dark:  #3E2549;
  --primary-light: #7B5EA7;
  --accent:        #C17B5C;
  --cta:           #4A7C59;
  --cta-dark:      #2F5C3E;
  --text:          #2A1F1A;
  --text-muted:    #6B5C54;
  --bg:            #F5F0EA;
  --bg-card:       #FFFAF6;
  --border:        #DDD3C8;
  --shadow:        0 4px 24px rgba(92,61,110,0.10);
  --shadow-hover:  0 8px 40px rgba(92,61,110,0.18);
  --hero-from:     #3E2549;
  --hero-to:       #7B4F3A;
  --hero-mid:      #5C3D6E;
  --hero-accent:   #E8B89A;
  --brand-dot:     #E8B89A;
  --navbar-bg:     #5C3D6E;
  --footer-bg:     #3E2549;
  --spinner-color: rgba(92,61,110,0.2);
}

/* TEMA 2: Naranja — letras naranjas, fondo crema */
[data-theme="naranja"] {
  --primary:       #E07B20;
  --primary-dark:  #B55E10;
  --primary-light: #F09040;
  --accent:        #D64F00;
  --cta:           #5A8A3C;
  --cta-dark:      #3A6A22;
  --text:          #2A1A0A;
  --text-muted:    #7A5030;
  --bg:            #FFF8F0;
  --bg-card:       #FFFCF8;
  --border:        #F0D8B8;
  --shadow:        0 4px 24px rgba(224,123,32,0.12);
  --shadow-hover:  0 8px 40px rgba(224,123,32,0.22);
  --hero-from:     #B55E10;
  --hero-to:       #8B3A00;
  --hero-mid:      #D06010;
  --hero-accent:   #FFD080;
  --brand-dot:     #FFD080;
  --navbar-bg:     #C06010;
  --footer-bg:     #8B3A00;
  --spinner-color: rgba(224,123,32,0.2);
}

/* TEMA 3: Celeste y Rosa — fondo celeste, letras rosas */
[data-theme="celeste"] {
  --primary:       #D63384;
  --primary-dark:  #A01060;
  --primary-light: #E8559A;
  --accent:        #FF6BA8;
  --cta:           #0D8A7A;
  --cta-dark:      #096A5E;
  --text:          #1A0A20;
  --text-muted:    #5A3060;
  --bg:            #EEF8FF;
  --bg-card:       #F8FCFF;
  --border:        #C8E8F8;
  --shadow:        0 4px 24px rgba(214,51,132,0.10);
  --shadow-hover:  0 8px 40px rgba(214,51,132,0.20);
  --hero-from:     #0A6080;
  --hero-to:       #A01060;
  --hero-mid:      #1A88A8;
  --hero-accent:   #FFB8D8;
  --brand-dot:     #FFB8D8;
  --navbar-bg:     #0E7090;
  --footer-bg:     #0A5070;
  --spinner-color: rgba(214,51,132,0.2);
}

/* TEMA 4: Rosa Puro — todo rosado suave */
[data-theme="rosa"] {
  --primary:       #C2185B;
  --primary-dark:  #880E4F;
  --primary-light: #E91E8C;
  --accent:        #FF4081;
  --cta:           #7B1FA2;
  --cta-dark:      #4A0072;
  --text:          #1A0010;
  --text-muted:    #6A2040;
  --bg:            #FFF0F5;
  --bg-card:       #FFF8FB;
  --border:        #F8C8D8;
  --shadow:        0 4px 24px rgba(194,24,91,0.10);
  --shadow-hover:  0 8px 40px rgba(194,24,91,0.20);
  --hero-from:     #880E4F;
  --hero-to:       #4A0072;
  --hero-mid:      #C2185B;
  --hero-accent:   #FFD0E8;
  --brand-dot:     #FFD0E8;
  --navbar-bg:     #C2185B;
  --footer-bg:     #880E4F;
  --spinner-color: rgba(194,24,91,0.2);
}

/* TEMA 5: Verde Esmeralda */
[data-theme="esmeralda"] {
  --primary:       #1B6B4A;
  --primary-dark:  #0D4A30;
  --primary-light: #2A8A60;
  --accent:        #D4A847;
  --cta:           #2196A0;
  --cta-dark:      #147080;
  --text:          #0A1A10;
  --text-muted:    #3A5A40;
  --bg:            #F0F8F4;
  --bg-card:       #F8FCF9;
  --border:        #C0DCC8;
  --shadow:        0 4px 24px rgba(27,107,74,0.10);
  --shadow-hover:  0 8px 40px rgba(27,107,74,0.20);
  --hero-from:     #0D4A30;
  --hero-to:       #1A4060;
  --hero-mid:      #1B6B4A;
  --hero-accent:   #F0D080;
  --brand-dot:     #F0D080;
  --navbar-bg:     #1B6B4A;
  --footer-bg:     #0D4A30;
  --spinner-color: rgba(27,107,74,0.2);
}

/* TEMA 6: Oscuro/Noche */
[data-theme="noche"] {
  --primary:       #9B59B6;
  --primary-dark:  #6C3483;
  --primary-light: #BB8FCE;
  --accent:        #E67E22;
  --cta:           #27AE60;
  --cta-dark:      #1E8449;
  --text:          #000000;
  --text-muted:    #BDC3C7;
  --bg:            #1A1A2E;
  --bg-card:       #222236;
  --border:        #3A3A5A;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover:  0 8px 40px rgba(0,0,0,0.6);
  --hero-from:     #0D0D1A;
  --hero-to:       #1A0D2E;
  --hero-mid:      #16213E;
  --hero-accent:   #E67E22;
  --brand-dot:     #E67E22;
  --navbar-bg:     #0D0D1A;
  --footer-bg:     #0A0A14;
  --spinner-color: rgba(155,89,182,0.3);
}

/* Variables fijas sin tema */
:root {
  --radius:       14px;
  --radius-sm:    8px;
  --nav-h:        70px;
  --font:         'Poppins', sans-serif;
  --font-display: 'Playfair Display', serif;
  --whatsapp:     #25D366;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); outline: none; border: none; }

/* ─── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--navbar-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

/* Texto en dos líneas cursiva */
.navbar-brand .brand-lines {
  display: flex;
  flex-direction: column;
}

.navbar-brand .brand-line1 {
  font-style: italic;
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.1;
}

.navbar-brand .brand-line2 {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--brand-dot);
  line-height: 1.1;
}

.navbar-brand .brand-dot { color: var(--brand-dot); }

.navbar-logo-icon {
  width: 40px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* ─── Theme Switcher ─────────────────────────────────────────── */
.theme-switcher {
  position: relative;
}

.theme-btn {
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  border-radius: 50px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.theme-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
}

.theme-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  min-width: 200px;
  overflow: hidden;
  z-index: 2000;
  animation: dropIn 0.15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.theme-dropdown.open { display: block; }

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.1rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.theme-option:hover { background: var(--bg); }

.theme-option.active {
  background: var(--bg);
  font-weight: 700;
  color: var(--primary);
}

.theme-option .theme-swatch {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

/* ─── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

.btn-cta {
  background: var(--cta);
  color: #fff;
  border-color: var(--cta);
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
}
.btn-cta:hover {
  background: var(--cta-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  border-color: var(--whatsapp);
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  width: 100%;
  justify-content: center;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,0.4);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-danger { background: #dc3545; color: #fff; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; }

.btn-sm  { padding: 0.35rem 0.9rem; font-size: 0.8rem; }
.btn-lg  { padding: 1rem 2.5rem; font-size: 1.05rem; }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 5rem;
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 45%, var(--hero-to) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--hero-accent);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero h1 span { color: var(--hero-accent); }

.hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 550px;
  margin: 0 auto 2.5rem;
}

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

.hero-stats {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.hero-stat { text-align: center; }

.hero-stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--hero-accent);
}

.hero-stat span { font-size: 0.85rem; opacity: 0.8; }

/* ─── Sections ───────────────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }

.section-header { text-align: center; margin-bottom: 3rem; }

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Cómo funciona ──────────────────────────────────────────── */
.how-section { background: var(--bg-card); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.step-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2.2rem 1.8rem;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  transition: box-shadow 0.2s;
}

.step-card:hover { box-shadow: var(--shadow-hover); }

.step-number {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon { font-size: 3rem; margin: 0.5rem 0 1rem; }
.step-card h3 { font-weight: 700; margin-bottom: 0.5rem; color: var(--primary); }
.step-card p  { color: var(--text-muted); font-size: 0.92rem; }

/* ─── Categorías ─────────────────────────────────────────────── */
.categories-section { background: var(--bg); }

.categories-scroll {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  color: var(--text-muted);
}

.cat-chip:hover,
.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ─── Services Grid ──────────────────────────────────────────── */
.services-section { background: var(--bg); padding-top: 1rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.25s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg) 0%, var(--border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.service-card-img img { width: 100%; height: 100%; object-fit: cover; }

.service-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }

.service-card-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(0,0,0,0.05);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
}

.service-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; line-height: 1.3; }

.service-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.2rem; gap: 0.5rem; }

.service-price { font-size: 1.25rem; font-weight: 800; color: var(--primary); }
.service-price small { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

.service-provider { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }

.legal-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.6rem; line-height: 1.4; font-style: italic; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,5,20,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(3px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header { position: relative; }

.modal-img {
  width: 100%;
  height: 230px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(135deg, var(--bg), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.modal-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }

.modal-close {
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  width: 36px; height: 36px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(0,0,0,0.8); }

.modal-body { padding: 1.8rem; }

.modal-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(0,0,0,0.05);
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}

.modal-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.modal-provider { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.modal-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.5rem; }
.modal-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 1.5rem; }
.modal-price small { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

.modal-legal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.modal-legal strong { display: block; margin-bottom: 0.2rem; color: var(--text); }

/* ─── Formularios ────────────────────────────────────────────── */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 2rem 1rem;
  padding-top: calc(var(--nav-h) + 2rem);
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.form-card h2 { font-family: var(--font-display); font-size: 1.9rem; color: var(--primary); margin-bottom: 0.3rem; }
.form-card .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

.form-group { margin-bottom: 1.2rem; }

.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--primary); }

.form-group textarea { resize: vertical; min-height: 90px; }

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

.form-link { text-align: center; margin-top: 1.2rem; font-size: 0.88rem; color: var(--text-muted); }
.form-link a { color: var(--primary); font-weight: 600; }

.form-err {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  border-radius: var(--radius-sm); padding: 0.7rem 1rem; font-size: 0.85rem;
  margin-bottom: 1rem; display: none;
}
.form-err.show { display: block; }

.form-ok {
  background: #f0fdf4; border: 1px solid #86efac; color: #166534;
  border-radius: var(--radius-sm); padding: 0.7rem 1rem; font-size: 0.85rem;
  margin-bottom: 1rem; display: none;
}
.form-ok.show { display: block; }

/* ─── Image upload ───────────────────────────────────────────── */
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
  position: relative;
}

.img-upload-area:hover { border-color: var(--primary); }

.img-upload-area input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}

.img-upload-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: var(--radius-sm); margin-top: 0.5rem; display: none; }

/* ─── Dashboard ──────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; padding-top: var(--nav-h); }

.sidebar {
  background: var(--primary);
  padding: 2rem 1.2rem;
  color: #fff;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

.sidebar-title { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; padding: 0 0.5rem; margin-bottom: 0.8rem; }

.sidebar-user {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 1rem; background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); margin-bottom: 2rem;
}

.sidebar-user-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--hero-accent, #E8B89A);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; color: var(--primary); flex-shrink: 0;
}

.sidebar-user-name { font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.sidebar-user-role { font-size: 0.72rem; opacity: 0.7; }

.sidebar-nav { list-style: none; }

.sidebar-nav li a {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.8); transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active { background: rgba(255,255,255,0.15); color: #fff; }

.main-content { padding: 2.5rem; background: var(--bg); }

.page-title { font-family: var(--font-display); font-size: 1.8rem; color: var(--text); margin-bottom: 0.3rem; }
.page-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }

/* ─── Stats cards ────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.2rem; margin-bottom: 2.5rem; }

.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .stat-val { font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .stat-lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.stat-card .stat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrap { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }

.table-head { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border); }
.table-head h3 { font-size: 1rem; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }

thead th { background: var(--bg); padding: 0.8rem 1.2rem; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }

tbody td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; color: var(--text); }

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }

.badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 50px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-pending  { background: #f5e8d8; color: #7a4a1e; }
.badge-paid     { background: #d1fae5; color: #065f46; }
.badge-done     { background: #ede0f5; color: #4e2a6e; }
.badge-active   { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* ─── Alert ──────────────────────────────────────────────────── */
.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 1.2rem; }
.alert-info { background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); }
.alert-warn { background: #fdf3ee; border: 1px solid #e8c4aa; color: #7a4a28; }
.alert-ok   { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

/* ─── Footer ─────────────────────────────────────────────────── */
footer { background: var(--footer-bg); color: rgba(255,255,255,0.85); padding: 3.5rem 1.5rem 2rem; transition: background 0.3s ease; }

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; max-width: 1180px; margin: 0 auto 2.5rem; }

.footer-brand { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: #fff; margin-bottom: 0.8rem; }
.footer-desc { font-size: 0.88rem; line-height: 1.7; opacity: 0.8; }

.footer-col h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hero-accent, #E8B89A); margin-bottom: 1rem; }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.88rem; opacity: 0.8; transition: opacity 0.2s; }
.footer-col ul li a:hover { opacity: 1; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; max-width: 1180px; margin: 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

.footer-legal { font-size: 0.75rem; opacity: 0.65; line-height: 1.6; max-width: 600px; }
.footer-copy  { font-size: 0.78rem; opacity: 0.5; }

/* ─── Spinner ────────────────────────────────────────────────── */
.spinner { width: 40px; height: 40px; border: 4px solid var(--spinner-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 2rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }

/* ─── Toast ──────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 2rem; right: 2rem; background: var(--text); color: var(--bg-card); padding: 0.9rem 1.5rem; border-radius: var(--radius-sm); font-size: 0.9rem; z-index: 9999; box-shadow: 0 8px 30px rgba(0,0,0,0.3); animation: toastIn 0.3s ease; max-width: 320px; }
.toast.success { border-left: 4px solid var(--cta); }
.toast.error   { border-left: 4px solid #dc3545; }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ─── Toggle ─────────────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #ccc; border-radius: 50px; cursor: pointer; transition: 0.2s; }
.toggle-slider::before { content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:0.2s; }
.toggle input:checked + .toggle-slider { background: var(--cta); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── Hamburger ──────────────────────────────────────────────── */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.2s; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; display: none; }
  .sidebar.open { display: block; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .theme-dropdown { right: auto; left: 0; }
}

@media (max-width: 640px) {
  .navbar { padding: 0 1rem; }
  .navbar-actions .btn-ghost { display: none; }
  .hero h1 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-content { padding: 1.5rem 1rem; }
  .hero-stats { gap: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 1.5rem; }
  .theme-btn span.theme-label { display: none; }
}

/* ─── Utilidades ─────────────────────────────────────────────── */
.d-none { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.font-bold { font-weight: 700; }