/* ═══════════════════════════════════════════════════════════════════
   electroprecios_teal.css
   Tema "Teal" — basado en el sistema de diseño de index.html
   Reemplaza a electroprecios.css en páginas que usan este tema.

   USO: reemplazar en el <head>
     <link rel="stylesheet" href="css/electroprecios_teal.css">

   Tipografías requeridas (ya cargadas en el HTML):
     DM Sans (300, 400, 500) · DM Serif Display
   ═══════════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════
   1. RESET & VARIABLES
   ══════════════════════════════════════════════ */

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

/* ── TEMA CLARO (por defecto) ── */
:root {
  /* Paleta de marca */
  --brand:          #1D9E75;
  --brand-light:    #E1F5EE;
  --brand-mid:      #0F6E56;
  --brand-dark:     #085041;

  /* Tipografía */
  --text-primary:   #1a1a18;
  --text-secondary: #4a4a47;
  --text-tertiary:  #888780;
  --text:           #1a1a18;       /* alias para compatibilidad */
  --muted:          #888780;

  /* Fondos */
  --bg-page:        #f7f6f2;
  --bg:             #f7f6f2;       /* alias para compatibilidad */
  --bg-card:        #ffffff;
  --bg-nav:         rgba(255,255,255,0.92);
  --bg-input:       rgba(0,0,0,0.04);
  --bg-input-f:     rgba(0,0,0,0.07);

  /* Bordes */
  --border:         rgba(0,0,0,0.09);
  --border-mid:     rgba(0,0,0,0.15);

              /* Compatibilidad con nombres del CSS global */
      --volt:           #1D9E75;       /* reemplaza el amarillo-volt por el teal */
      --volt-dim:       rgba(29,158,117,0.10);
      --volt-border:    rgba(29,158,117,0.22);
      --navy:           #f0f4f2;
      --navy-mid:       #e1f5ee;
      --blue:           #1D9E75;
      --blue-light:     #0F6E56;
      --card:           rgba(0,0,0,0.03);
      --card-hover:     rgba(29,158,117,0.06);
      --danger:         #e53e3e;
      --success:        #1D9E75;
      --shadow-volt:    rgba(29,158,117,0.20);
      --volt-glow:  rgba(200,255,0,.25);
      --surface:    rgba(255,255,255,.02);
      --border:     rgba(200,255,0,.12);
      --border2:    rgba(255,255,255,.07);
      --text:       #e8f0ff;
      --muted:      #6b82a8;
      --font-head:  'Syne', sans-serif;
      --font-body:  'DM Sans', sans-serif;
      --font-mono:  'DM Mono', monospace;
      --r:          10px;
      --r-sm:       6px;

  /* Radio */
  --radius-md:      8px;
  --radius-lg:      14px;
}

/* ── TEMA OSCURO (prefers-color-scheme) ── */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary:   #edede8;
    --text-secondary: #b4b2a9;
    --text-tertiary:  #666460;
    --text:           #edede8;
    --muted:          #666460;

    --bg-page:        #1a1a18;
    --bg:             #1a1a18;
    --bg-card:        #232320;
    --bg-nav:         rgba(26,26,24,0.92);
    --bg-input:       rgba(255,255,255,0.06);
    --bg-input-f:     rgba(255,255,255,0.09);

    --border:         rgba(255,255,255,0.08);
    --border-mid:     rgba(255,255,255,0.14);

    --brand-light:    #04342c;
    --brand-mid:      #5DCAA5;

    --volt-dim:       rgba(29,158,117,0.14);
    --volt-border:    rgba(29,158,117,0.28);
    --navy:           #1a1a18;
    --navy-mid:       #232320;
    --card:           rgba(255,255,255,0.04);
    --card-hover:     rgba(29,158,117,0.08);
    --shadow-volt:    rgba(29,158,117,0.25);
  }
}

/* ── THEME TOGGLE (data-theme manual) ── */
[data-theme="light"] {
  --text-primary:   #1a1a18;
  --text-secondary: #4a4a47;
  --text-tertiary:  #888780;
  --text:           #1a1a18;
  --muted:          #888780;
  --bg-page:        #f7f6f2;
  --bg:             #f7f6f2;
  --bg-card:        #ffffff;
  --bg-nav:         rgba(255,255,255,0.92);
  --bg-input:       rgba(0,0,0,0.04);
  --bg-input-f:     rgba(0,0,0,0.07);
  --border:         rgba(0,0,0,0.09);
  --border-mid:     rgba(0,0,0,0.15);
  --brand-light:    #E1F5EE;
  --brand-mid:      #0F6E56;
  --volt-dim:       rgba(29,158,117,0.10);
  --volt-border:    rgba(29,158,117,0.22);
  --navy:           #f0f4f2;
  --navy-mid:       #e1f5ee;
  --card:           rgba(0,0,0,0.03);
  --card-hover:     rgba(29,158,117,0.06);
  --shadow-volt:    rgba(29,158,117,0.20);
}

[data-theme="dark"] {
  --text-primary:   #edede8;
  --text-secondary: #b4b2a9;
  --text-tertiary:  #666460;
  --text:           #edede8;
  --muted:          #666460;
  --bg-page:        #1a1a18;
  --bg:             #1a1a18;
  --bg-card:        #232320;
  --bg-nav:         rgba(26,26,24,0.92);
  --bg-input:       rgba(255,255,255,0.06);
  --bg-input-f:     rgba(255,255,255,0.09);
  --border:         rgba(255,255,255,0.08);
  --border-mid:     rgba(255,255,255,0.14);
  --brand-light:    #04342c;
  --brand-mid:      #5DCAA5;
  --volt-dim:       rgba(29,158,117,0.14);
  --volt-border:    rgba(29,158,117,0.28);
  --navy:           #1a1a18;
  --navy-mid:       #232320;
  --card:           rgba(255,255,255,0.04);
  --card-hover:     rgba(29,158,117,0.08);
  --shadow-volt:    rgba(29,158,117,0.25);
}


/* ══════════════════════════════════════════════
   2. BASE
   ══════════════════════════════════════════════ */

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

body.registro-page {
  display: flex;
  flex-direction: column;
}


/* ══════════════════════════════════════════════
   3. FONDOS DECORATIVOS — desactivados en tema teal
   ══════════════════════════════════════════════ */

.bg-grid,
.bg-glow,
.bg-glow2,
.bg-glow3,
.bg-left,
.bg-right,
.hero-lines,
.hero-bolt-bg { display: none !important; }


/* ══════════════════════════════════════════════
   4. NAVEGACIÓN
   ══════════════════════════════════════════════ */

nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-card);
  border-bottom: 0.5px solid var(--border-mid);
  backdrop-filter: none;
  transition: background .3s, border-color .3s;
}

nav.registro-nav { position: relative; }

.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; gap: 32px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: 1rem;
  color: var(--text-primary); text-decoration: none;
  transition: color .3s;
}
.logo svg { flex-shrink: 0; }
.logo em { font-style: normal; color: var(--brand); }

.nav-links {
  display: flex; gap: 24px; margin-left: 8px;
  /* quitar el centrado absoluto del CSS global */
  position: static; transform: none;
}

.nav-link {
  font-size: .875rem; color: var(--text-tertiary);
  text-decoration: none; transition: color .15s;
  padding: 0; background: none; border-radius: 0;
}
.nav-link:hover,
.nav-link.active { color: var(--brand); background: none; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.nav-cta {
  background: var(--brand); color: #fff;
  padding: 7px 18px; border-radius: var(--radius-md);
  font-weight: 500; font-size: .85rem;
  text-decoration: none; white-space: nowrap;
  transition: filter .2s;
}
.nav-cta:hover { filter: brightness(1.1); }

.nav-back {
  font-size: .82rem; color: var(--muted); text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
  transition: color .2s;
}
.nav-back:hover { color: var(--text-primary); }
.nav-back svg { width: 14px; height: 14px; }

/* Theme toggle — mantenemos el componente pero con colores teal */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .3rem;
  display: flex; align-items: center; gap: .15rem;
  cursor: pointer;
  transition: border-color .2s, background .3s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--volt-border); }
.theme-option {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 100px;
  font-size: .85rem; transition: background .2s; user-select: none;
}
.theme-option.active { background: var(--volt-dim); }


/* ══════════════════════════════════════════════
   5. LAYOUT GENERAL
   ══════════════════════════════════════════════ */

.container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  position: relative; z-index: 1;
}


/* ══════════════════════════════════════════════
   6. FOOTER
   ══════════════════════════════════════════════ */

footer {
  border-top: 0.5px solid var(--border);
  background: var(--bg-card);
  padding: 2.5rem 0 1.5rem;
  color: var(--text-secondary);
  margin-top: 0;
  transition: background .3s, border-color .3s, color .3s;
}
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--brand); }

.footer-inner {
  display: flex; gap: 3rem; flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: flex-start; align-items: flex-start;
}
.footer-brand { flex: 2; min-width: 200px; }
.footer-brand p {
  font-size: .85rem; color: var(--text-tertiary);
  margin-top: .75rem; line-height: 1.6;
  transition: color .3s;
}
.fl-col { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.fl-title {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-tertiary); margin-bottom: 4px;
  font-family: 'DM Sans', sans-serif;
  transition: color .3s;
}
.fl-col a {
  font-size: .85rem; color: var(--text-secondary);
  text-decoration: none; transition: color .15s;
}
.fl-col a:hover { color: var(--brand); }

.footer-bottom {
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--border);
  font-size: .78rem; color: var(--text-tertiary);
  transition: border-color .3s, color .3s;
}
.f-links { display: flex; gap: 1rem; }
.f-links a {
  color: var(--text-tertiary); text-decoration: none;
  font-size: .78rem; transition: color .15s;
}
.f-links a:hover { color: var(--brand); }

.footer-dev {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-tertiary);
  text-decoration: none; transition: color .15s;
  border: none; padding: 0; background: none;
  font-family: 'DM Sans', sans-serif;
}
.footer-dev:hover { color: var(--brand); }
.footer-dev svg { width: 14px; height: 14px; }

footer.registro-footer { margin-top: 0; padding: 1.25rem 2rem; }


/* ══════════════════════════════════════════════
   7. HIGHLIGHT (búsqueda)
   ══════════════════════════════════════════════ */

mark {
  background: rgba(29,158,117,.15);
  color: var(--brand);
  border-radius: 2px; padding: 0 2px;
}


/* ══════════════════════════════════════════════
   8. ANIMACIONES
   ══════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:.3} }
@keyframes float   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ══════════════════════════════════════════════
   9. BOTONES COMPARTIDOS
   ══════════════════════════════════════════════ */

.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand); color: #fff;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .9rem;
  text-decoration: none; transition: filter .2s;
  border: none; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary svg { width: 14px; height: 14px; }
.btn-primary--large { padding: 12px 28px; font-size: 1rem; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  border: 0.5px solid var(--border-mid);
  color: var(--text-secondary);
  padding: 10px 20px; border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400; font-size: .9rem;
  text-decoration: none; transition: border-color .2s, color .2s;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost svg { width: 14px; height: 14px; }


/* ══════════════════════════════════════════════
   10. INDEX — HERO
   ══════════════════════════════════════════════ */

.hero {
  background: var(--bg-page);
  padding: 5rem 24px 4rem;
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
  position: relative;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 500;
  color: var(--brand-mid);
  background: var(--brand-light);
  border-radius: 20px; padding: 4px 12px;
  margin-bottom: 1.25rem;
  letter-spacing: .02em;
  animation: fadeUp .5s ease both;
}
.tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); display: inline-block;
  animation: blink 1.8s infinite;
}

.hero-inner { position: relative; z-index: 2; }
.hero-inner h1,
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 400; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 1rem;
  letter-spacing: normal;
  animation: fadeUp .5s .08s ease both;
  transition: color .3s;
}
.h1-accent { color: var(--brand); background: none; -webkit-text-fill-color: unset; }

.hero-desc {
  font-size: 1rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: 2rem;
  font-weight: 300;
  animation: fadeUp .5s .16s ease both;
  transition: color .3s;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 2.5rem;
  animation: fadeUp .5s .22s ease both;
}

/* Stats hero */
.hero-stat-row {
  display: flex; align-items: center; gap: 1.5rem;
  animation: fadeUp .5s .3s ease both;
}
.hero-stat-div {
  width: 0.5px; height: 28px;
  background: var(--border-mid);
}
.hs-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; color: var(--text-primary);
  font-weight: 400; line-height: 1;
  transition: color .3s;
}
.hs-label { font-size: .75rem; color: var(--text-tertiary); margin-top: 2px; transition: color .3s; }


/* ══════════════════════════════════════════════
   11. INDEX — PREVIEW CARD
   ══════════════════════════════════════════════ */

.hero-preview { position: relative; }

.preview-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
  transition: background .3s, border-color .3s;
}
.pc-header {
  background: var(--bg-page);
  border-bottom: 0.5px solid var(--border);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 6px;
  transition: background .3s, border-color .3s;
}
.pc-dot { width: 10px; height: 10px; border-radius: 50%; }
.pc-dot.r { background: #FF5F57; }
.pc-dot.y { background: #FFBD2E; }
.pc-dot.g { background: #28C840; }
.pc-title {
  margin-left: 6px; font-size: .75rem;
  color: var(--text-tertiary); font-family: 'DM Sans', monospace;
}
.pc-body { padding: 1.25rem; }
.pc-badge {
  display: inline-block; font-size: .75rem; font-weight: 500;
  background: var(--brand-light); color: var(--brand-mid);
  border-radius: 20px; padding: 3px 10px; margin-bottom: 1rem;
  border: none;
  font-family: 'DM Sans', sans-serif;
  transition: background .3s, color .3s;
}
.pc-badge::before { display: none; }
.pc-rows { display: flex; flex-direction: column; gap: 2px; }
.pc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: var(--radius-md); font-size: .83rem;
  transition: background .15s;
}
.pc-row:hover { background: var(--bg-page); }
.pc-row-active { background: var(--brand-light); }
.pc-name { color: var(--text-secondary); transition: color .3s; }
.pc-row-active .pc-name { color: var(--brand-mid); }
.pc-price { color: var(--brand); font-weight: 500; transition: color .3s; }

.floating-badge {
  position: absolute; bottom: -14px; right: -10px;
  background: var(--brand); color: #fff;
  border-radius: 20px; padding: 6px 14px;
  font-size: .78rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 12px rgba(29,158,117,.35);
  border: none;
  animation: float 3s ease-in-out infinite;
}
.floating-badge svg { width: 13px; height: 13px; }


/* ══════════════════════════════════════════════
   12. INDEX — FEATURES
   ══════════════════════════════════════════════ */

.features { padding: 5rem 0; position: relative; z-index: 1; }

.section-header { text-align: center; margin-bottom: 3rem; }
.sh-tag {
  font-size: .8rem; font-weight: 500; letter-spacing: .06em;
  color: var(--brand); margin-bottom: .75rem;
  font-family: 'DM Sans', monospace;
}
.section-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem; font-weight: 400;
  color: var(--text-primary); line-height: 1.25;
  transition: color .3s;
}
.section-header h2 em { font-style: normal; color: var(--brand); }

.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  animation: fadeUp .6s .5s ease both;
}
.feat-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: background .2s, border-color .2s;
}
.feat-card--large { grid-column: span 2; }
.feat-card--accent {
  background: var(--brand-light);
  border-color: rgba(29,158,117,.2);
}
.fc-icon { font-size: 1.5rem; margin-bottom: .75rem; }
.feat-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem; font-weight: 400;
  color: var(--text-primary); margin-bottom: .4rem;
  transition: color .3s;
}
.feat-card p { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; transition: color .3s; }
.fc-tag {
  display: inline-block; margin-top: 1rem;
  font-size: .75rem; font-weight: 500;
  background: var(--brand-light); color: var(--brand-mid);
  border-radius: 20px; padding: 3px 10px;
  transition: background .3s, color .3s;
}
.fc-link {
  display: inline-block; margin-top: 1rem;
  font-size: .85rem; font-weight: 500;
  color: var(--brand); text-decoration: none; transition: color .15s;
}
.fc-link:hover { color: var(--brand-mid); }


/* ══════════════════════════════════════════════
   13. INDEX — HOW IT WORKS
   ══════════════════════════════════════════════ */

.how {
  padding: 5rem 0;
  background: var(--bg-card);
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  position: relative; z-index: 1;
  transition: background .3s, border-color .3s;
}
.steps {
  display: flex; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap;
}
.step { flex: 1; min-width: 180px; }
.step-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem; color: var(--brand);
  line-height: 1; margin-bottom: .5rem;
}
.step-body h4 {
  font-size: .95rem; font-weight: 500;
  color: var(--text-primary); margin-bottom: .3rem; transition: color .3s;
}
.step-body p { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; transition: color .3s; }
.step-arrow { font-size: 1.5rem; color: var(--border-mid); padding-top: .75rem; flex-shrink: 0; }


/* ══════════════════════════════════════════════
   14. INDEX — CTA
   ══════════════════════════════════════════════ */

.cta-section { padding: 5rem 0; position: relative; z-index: 1; }
.cta-box {
  background: var(--brand);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.cta-bolt {
  font-size: 4rem; opacity: .15;
  position: absolute; top: -10px; right: 30px;
  pointer-events: none; user-select: none;
}
.cta-box h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem; font-weight: 400;
  color: #fff; margin-bottom: .5rem;
}
.cta-box p { color: rgba(255,255,255,.85); margin-bottom: 2rem; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-box .btn-primary { background: #fff; color: var(--brand); }
.cta-box .btn-primary:hover { filter: brightness(.97); }
.cta-box .btn-ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.cta-box .btn-ghost:hover { border-color: #fff; color: #fff; }


/* ══════════════════════════════════════════════
   15. PRECIOS — HERO CON CARRUSEL LATERAL
   ══════════════════════════════════════════════ */

.hero-wrapper { background: var(--bg-page); }

.hero-precios {
  max-width: 1200px; margin: 0 auto;
  padding: 3rem 24px;
  display: flex; align-items: center; gap: 3rem;
  position: relative;
}

/* Carrusel lateral */
.hero-carousel-bg {
  display: block;
  flex: 0 0 420px; width: 420px; height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  order: 2;
}
.hero-carousel-bg .carousel-track {
  display: flex; height: 100%;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.hero-carousel-bg .carousel-track img {
  flex: 0 0 100%; width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.hero-overlay { display: none !important; }

/* Controles del carrusel */
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.4); border: 0.5px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s; z-index: 10;
  backdrop-filter: none;
}
.carousel-btn:hover { background: rgba(0,0,0,.6); border-color: rgba(255,255,255,.45); }
.carousel-btn.prev { left: 10px; right: unset; }
.carousel-btn.next { right: 10px; left: unset; }
.carousel-btn svg { width: 16px; height: 16px; pointer-events: none; }

.carousel-counter {
  position: absolute; bottom: 10px; right: 12px; top: unset;
  font-size: .72rem; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.4); border: none;
  border-radius: 20px; padding: 2px 8px; z-index: 10;
  font-family: 'DM Sans', sans-serif;
  backdrop-filter: none;
}
.carousel-counter span { color: #fff; }

.carousel-dots {
  position: absolute; bottom: 10px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 10;
}
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: none; padding: 0; cursor: pointer;
  transition: background .15s; transform: none;
}
.carousel-dot.active { background: #fff; transform: scale(1.35); }

/* Contenido del hero */
.hero-content {
  position: relative; z-index: 1;
  flex: 1; order: 1;
  display: block;
}

.hero-badge {
  display: inline-block; font-size: .78rem; font-weight: 500;
  padding: 3px 12px; border-radius: 20px;
  background: var(--brand-light); color: var(--brand-mid);
  border: none; letter-spacing: .03em; margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
  animation: none;
}
.hero-badge::before { display: none; }

h1.hero-precios-title {
  font-family: 'DM Serif Display', serif !important;
  font-size: 2.5rem !important; font-weight: 400 !important;
  color: var(--text-primary) !important; line-height: 1.2;
  margin-bottom: .75rem; letter-spacing: normal !important;
  animation: none;
  -webkit-text-fill-color: unset !important;
  background: none !important;
}
h1.hero-precios-title em {
  font-style: normal;
  color: var(--brand) !important;
  background: none !important; -webkit-text-fill-color: unset !important;
}

.hero-sub {
  font-size: .95rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: 1.5rem;
  max-width: unset; margin-left: 0; font-weight: normal;
  animation: none;
}

.updated-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-light);
  border: 0.5px solid var(--volt-border);
  border-radius: 20px; padding: 4px 12px;
  font-size: .78rem; color: var(--brand-mid);
  margin-bottom: 1.25rem; margin-top: 0;
  font-family: 'DM Sans', sans-serif;
  animation: none;
}
.updated-pill svg { width: 13px; height: 13px; }

/* Buscador en el hero */
.search-bar {
  display: flex !important; align-items: center; gap: 10px;
  background: var(--bg-card) !important;
  border: 0.5px solid var(--border-mid) !important;
  border-radius: var(--radius-md) !important;
  padding: 10px 14px !important;
  max-width: 460px !important;
  margin: 0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  position: static !important;
  animation: none;
}
.search-bar svg {
  width: 15px; height: 15px; color: var(--text-tertiary);
  flex-shrink: 0; position: static !important;
  transform: none !important; top: unset !important; left: unset !important;
}
.search-bar input {
  border: none !important; outline: none;
  background: transparent !important;
  font-family: 'DM Sans', sans-serif; font-size: .9rem;
  color: var(--text-primary) !important;
  width: 100%; padding: 0 !important; border-radius: 0 !important;
}
.search-bar input::placeholder { color: var(--text-tertiary) !important; }
.search-bar input:focus { border-color: transparent !important; background: transparent !important; }


/* ══════════════════════════════════════════════
   16. PRECIOS — ESTADÍSTICAS
   ══════════════════════════════════════════════ */

.stats {
  display: flex; gap: 2rem; flex-wrap: wrap;
  padding: 1.75rem 0 1.5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 2rem;
  justify-content: flex-start;
  animation: none;
  transition: border-color .3s;
}
.stat { text-align: left; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem; color: var(--text-primary);
  font-weight: 400; line-height: 1;
  transition: color .3s;
}
.stat-label {
  font-size: .75rem; color: var(--text-tertiary);
  margin-top: 2px; font-family: 'DM Sans', sans-serif;
  text-transform: none; letter-spacing: normal;
  transition: color .3s;
}

.section-label {
  font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  color: var(--brand); text-transform: uppercase; margin-bottom: 1.25rem;
  font-family: 'DM Sans', sans-serif;
  transition: color .3s;
}


/* ══════════════════════════════════════════════
   17. PRECIOS — CATEGORÍAS
   ══════════════════════════════════════════════ */

.cat-grid {
  display: flex; flex-direction: column;
  gap: 2rem; padding-bottom: 4rem;
  animation: none;
}
.cat-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 12px rgba(29,158,117,.08);
  transform: none;
  background: var(--bg-card);
}
.cat-header {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.25rem;
  cursor: pointer; user-select: none;
}
.cat-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-light);
  border: 0.5px solid rgba(29,158,117,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; flex-shrink: 0;
  transition: background .3s, border-color .3s;
}
.cat-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .95rem; flex: 1;
  color: var(--text-primary); transition: color .3s;
}
.cat-count {
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem; font-weight: 400;
  color: var(--text-tertiary);
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  padding: .15rem .55rem; border-radius: 4px;
  transition: background .3s, color .3s;
}
.cat-toggle {
  width: 20px; height: 20px; color: var(--text-tertiary);
  transition: transform .25s, color .3s; flex-shrink: 0;
}
.cat-card.open .cat-toggle { transform: rotate(180deg); }

.cat-items {
  display: none;
  border-top: 0.5px solid var(--border);
  transition: border-color .3s;
}
.cat-card.open .cat-items { display: block; }

.item-row {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
  padding: .85rem 1.25rem;
  border-bottom: 0.5px solid var(--border);
  transition: background .15s;
}
.item-row:last-child { border-bottom: none; }
.item-row:hover { background: var(--brand-light); }
.item-name {
  font-size: .875rem; color: var(--text-primary);
  line-height: 1.45; flex: 1; transition: color .3s;
}
.item-desc { font-size: .78rem; color: var(--text-tertiary); margin-top: .2rem; transition: color .3s; }
.item-price-wrap { text-align: right; flex-shrink: 0; }
.item-price {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem; color: var(--brand);
  white-space: nowrap; font-weight: 400; transition: color .3s;
}
.item-unit { font-size: .72rem; color: var(--text-tertiary); margin-top: .1rem; transition: color .3s; }

/* Loading / empty */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; padding: 4rem 0;
  color: var(--text-tertiary); font-size: .9rem; text-align: center;
}
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border-mid);
  border-top-color: var(--brand);
  animation: spin .7s linear infinite;
  margin: 0;
}
.empty-state {
  display: none; flex-direction: column; align-items: center;
  gap: .75rem; padding: 4rem 0;
  color: var(--text-tertiary); font-size: .9rem; text-align: center;
}
.empty-state svg { width: 36px; height: 36px; opacity: .4; }


/* ══════════════════════════════════════════════
   18. REGISTRO — LAYOUT
   ══════════════════════════════════════════════ */

.main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem; position: relative; z-index: 1;
}
.register-wrap {
  width: 100%; max-width: 940px;
  display: grid; grid-template-columns: 1fr 420px;
  gap: 4rem; align-items: center;
}

/* Panel izquierdo */
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--volt-dim); border: 1px solid var(--volt-border);
  color: var(--brand); padding: .3rem .85rem;
  border-radius: 100px; font-size: .7rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  transition: background .3s, border-color .3s, color .3s;
}
.badge::before {
  content: ''; width: 5px; height: 5px;
  background: var(--brand); border-radius: 50%;
}

h1.registro-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; line-height: 1.1;
  margin-bottom: 1.25rem;
  color: var(--text-primary); transition: color .3s;
}
h1.registro-title em {
  font-style: normal; color: var(--brand);
  background: none; -webkit-text-fill-color: unset;
}

.left-desc {
  color: var(--muted); font-weight: 300;
  line-height: 1.7; font-size: .95rem;
  margin-bottom: 2rem; max-width: 400px; transition: color .3s;
}
.features-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.features-list li {
  display: flex; align-items: center; gap: .75rem;
  font-size: .88rem; color: var(--text-secondary); transition: color .3s;
}
.feat-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--volt-dim); border: 1px solid var(--volt-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
  transition: background .3s, border-color .3s;
}

/* Form card */
.form-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  animation: slideIn .5s ease;
  transition: background .3s, border-color .3s;
}
.form-title {
  font-family: 'DM Serif Display', serif;
  font-weight: 400; font-size: 1.25rem;
  margin-bottom: .25rem;
  color: var(--text-primary); transition: color .3s;
}
.form-sub { color: var(--muted); font-size: .82rem; margin-bottom: 1.75rem; transition: color .3s; }

/* Campos */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: .78rem; font-weight: 500;
  color: var(--muted); margin-bottom: .4rem;
  font-family: 'DM Sans', sans-serif; transition: color .3s;
}
.form-group input,
.form-group select {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border-mid); color: var(--text-primary);
  padding: .75rem 1rem; border-radius: var(--radius-md);
  font-size: .88rem; font-family: 'DM Sans', sans-serif;
  outline: none; transition: border-color .2s, background .2s, color .3s;
  appearance: none;
}
.form-group input::placeholder { color: var(--muted); }
.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand);
  background: var(--bg-input-f);
}
.form-group .select-wrap { position: relative; }
.form-group .select-wrap::after {
  content: '▾'; position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%); color: var(--muted); pointer-events: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.input-error { border-color: rgba(229,62,62,.5) !important; }
.field-error { font-size: .72rem; color: var(--danger); margin-top: .3rem; display: none; transition: color .3s; }

/* Divider */
.divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.25rem 0; color: var(--muted); font-size: .75rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 0.5px; background: var(--border-mid);
}

/* Botón submit */
.btn-submit {
  width: 100%; padding: .85rem;
  background: var(--brand); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .95rem;
  cursor: pointer; transition: filter .2s;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-submit:hover { filter: brightness(1.1); transform: none; }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Alerts */
.alert {
  border-radius: var(--radius-md); padding: .75rem 1rem;
  font-size: .83rem; margin-bottom: 1rem;
  display: none; align-items: flex-start; gap: .6rem;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-error   { background: rgba(229,62,62,.08); border: 1px solid rgba(229,62,62,.25); color: var(--danger); }
.alert-success { background: rgba(29,158,117,.08); border: 1px solid rgba(29,158,117,.25); color: var(--brand-mid); }

/* Estado éxito */
.success-state { text-align: center; display: none; padding: 1rem 0; }
.success-icon {
  width: 56px; height: 56px; background: var(--volt-dim);
  border: 1px solid var(--volt-border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; font-size: 1.5rem;
}
.success-title {
  font-family: 'DM Serif Display', serif; font-weight: 400; font-size: 1.1rem;
  margin-bottom: .5rem; color: var(--text-primary); transition: color .3s;
}
.success-sub { color: var(--muted); font-size: .85rem; line-height: 1.5; transition: color .3s; }

/* Spinner pequeño */
.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}


/* ══════════════════════════════════════════════
   19. RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 860px) {
  /* Precios: carrusel debajo en móvil */
  .hero-precios   { flex-direction: column; gap: 1.5rem; }
  .hero-carousel-bg { flex: none !important; width: 100% !important; height: 220px !important; order: 2; }
  .hero-content   { order: 1; }
}

@media (max-width: 768px) {
  /* Index */
  .hero           { grid-template-columns: 1fr; padding: 3rem 24px; }
  .hero-preview   { display: none; }
  .hero-inner h1  { font-size: 2.2rem; }
  .feat-grid      { grid-template-columns: 1fr; }
  .feat-card--large { grid-column: span 1; }
  .steps          { flex-direction: column; }
  .step-arrow     { display: none; }
  .footer-inner   { gap: 2rem; }
}

@media (max-width: 820px) {
  /* Registro */
  .register-wrap  { grid-template-columns: 1fr; gap: 2rem; }
  .left-panel     { text-align: center; }
  .left-desc      { margin-left: auto; margin-right: auto; }
  .features-list  { align-items: center; }
}

@media (max-width: 600px) {
  h1.hero-precios-title { font-size: 1.8rem !important; }
  .footer-inner   { flex-direction: column; gap: 1.5rem; }
  .stats          { gap: 1.5rem; }
}

/* ══════════════════════════════════════════════
   20. PRESUPUESTO — LAYOUT GENERAL
   ══════════════════════════════════════════════ */

/* Page header (banda superior de presupuesto.html) */
.page-header {
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  padding: 2.5rem 24px 2rem;
  transition: background .3s, border-color .3s;
}
.page-header-text {
  max-width: 1200px; margin: 0 auto;
}
.ph-tag {
  font-size: .72rem; font-weight: 500; letter-spacing: .07em;
  color: var(--brand); text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: .6rem;
}
.page-header-text h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400; line-height: 1.15;
  color: var(--text-primary); margin-bottom: .6rem;
  animation: none;
  transition: color .3s;
}
.page-header-text h1 em {
  font-style: normal; color: var(--brand);
}
.page-header-text p {
  font-size: .95rem; color: var(--text-secondary);
  font-weight: 300; line-height: 1.65;
  transition: color .3s;
}

/* Builder (dos columnas: form + sidebar) */
.builder-wrap {
  max-width: 1200px; margin: 2rem auto 4rem;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

/* ── Cards del formulario ── */
.card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 0;
  transition: background .3s, border-color .3s;
}

.card-title {
  display: flex; align-items: center; gap: .6rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .9rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  transition: color .3s;
}
.ct-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--brand-light);
  border: 0.5px solid var(--volt-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
  transition: background .3s, border-color .3s;
}
.ct-tag {
  margin-left: auto;
  font-size: .65rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  padding: .15rem .55rem; border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  transition: background .3s, border-color .3s, color .3s;
}

/* Número de presupuesto badge */
.num-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 500;
  color: var(--brand);
  background: var(--brand-light);
  border: 0.5px solid var(--volt-border);
  border-radius: 6px; padding: .4rem .85rem;
  margin-bottom: 1.25rem;
  font-family: 'DM Sans', sans-serif;
  transition: background .3s, border-color .3s, color .3s;
}

/* Sidebar */
.sidebar {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 74px;
}

/* Vista previa mini */
.preview-mini {
  background: var(--bg-page);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: background .3s, border-color .3s, color .3s;
}
.preview-mini strong { color: var(--text-primary); transition: color .3s; }

/* ── Items del presupuesto ── */
.item-cols-header {
  display: grid;
  grid-template-columns: 1fr 70px 120px 32px;
  gap: 8px;
  font-size: .72rem; font-weight: 500;
  color: var(--text-tertiary); letter-spacing: .04em;
  text-transform: uppercase;
  padding: 0 0 .5rem;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: .5rem;
  transition: border-color .3s, color .3s;
}
.items-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 1rem;
}
.item-row-b {
  display: grid;
  grid-template-columns: 1fr 70px 120px 32px;
  gap: 8px; align-items: start;
}
.item-row-b input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  padding: .55rem .75rem;
  border-radius: var(--radius-md);
  font-size: .85rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, background .2s, color .3s;
}
.item-row-b input:focus {
  border-color: var(--brand);
  background: var(--bg-input-f);
}
.item-row-b input::placeholder { color: var(--muted); }
.i-desc { position: relative; }
.del-btn {
  width: 32px; height: 32px; margin-top: 2px;
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--danger);
  border-radius: var(--radius-md);
  cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.del-btn:hover { background: rgba(229,62,62,.08); border-color: var(--danger); }

/* Wrapper para el campo de descripción con autocomplete */
.desc-wrap { position: relative; }

/* Botón agregar ítem */
.btn-add {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: .65rem 1rem;
  background: var(--brand-light);
  border: 0.5px dashed var(--volt-border);
  border-radius: var(--radius-md);
  color: var(--brand);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-add:hover { background: rgba(29,158,117,.12); border-color: var(--brand); }

/* Totales */
.totals-box {
  margin-top: 1.25rem;
  border-top: 0.5px solid var(--border);
  padding-top: 1rem;
  display: flex; flex-direction: column; gap: .4rem;
  transition: border-color .3s;
}
.tot-row {
  display: flex; justify-content: space-between;
  align-items: center; font-size: .85rem;
  color: var(--text-secondary);
  transition: color .3s;
}
.tot-row.grand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem; color: var(--text-primary);
  padding-top: .5rem;
  border-top: 0.5px solid var(--border);
  margin-top: .25rem;
  font-weight: 400;
  transition: border-color .3s, color .3s;
}
.tot-row .lbl { color: var(--text-tertiary); transition: color .3s; }

/* Extra row: descuento/recargo */
.extra-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}

/* Opciones PDF */
.opt-group { display: flex; flex-direction: column; gap: 0; }
.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem 0;
  border-bottom: 0.5px solid var(--border);
  transition: border-color .3s;
}
.opt-row:last-child { border-bottom: none; }
.opt-label {
  font-size: .83rem; color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  transition: color .3s;
}
.opt-sub {
  font-size: .72rem; color: var(--text-tertiary);
  margin-top: .1rem;
  transition: color .3s;
}

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.toggle input { display: none; }
.toggle-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: var(--border-mid);
  position: relative;
  transition: background .2s;
}
.toggle-track::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.toggle input:checked + .toggle-track { background: var(--brand); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* Botones acción full width */
.btn-primary-full {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .85rem;
  background: var(--brand); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: .95rem;
  cursor: pointer; transition: filter .2s;
}
.btn-primary-full:hover { filter: brightness(1.1); }

.btn-ghost-full {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .75rem;
  background: transparent;
  border: 0.5px solid var(--border-mid);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost-full:hover { border-color: var(--brand); color: var(--brand); }

/* Textarea */
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-family: 'DM Sans', sans-serif;
  outline: none; resize: vertical; min-height: 80px;
  transition: border-color .2s, background .2s, color .3s;
}
.form-group textarea::placeholder { color: var(--muted); }
.form-group textarea:focus {
  border-color: var(--brand);
  background: var(--bg-input-f);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: .75rem 1.25rem;
  display: flex; align-items: center; gap: .6rem;
  font-size: .85rem; color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  transform: translateY(120%); opacity: 0;
  transition: transform .3s, opacity .3s, background .3s, border-color .3s, color .3s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { font-size: 1rem; flex-shrink: 0; }


/* ══════════════════════════════════════════════
   21. PRESUPUESTO — CATALOG DRAWER
   ══════════════════════════════════════════════ */

.catalog-drawer {
  position: fixed; inset: 0; z-index: 500;
  pointer-events: none;
}
.catalog-drawer.open { pointer-events: all; }

.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0; transition: opacity .3s;
}
.catalog-drawer.open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 90vw;
  background: var(--bg-card);
  border-left: 0.5px solid var(--border-mid);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1), background .3s, border-color .3s;
  overflow: hidden;
}
.catalog-drawer.open .drawer-panel { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 0.5px solid var(--border);
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem; font-weight: 400;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: border-color .3s, color .3s;
}
.drawer-close {
  background: var(--bg-page);
  border: 0.5px solid var(--border-mid);
  color: var(--text-tertiary);
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .85rem;
  transition: background .15s, color .15s;
}
.drawer-close:hover { background: var(--brand-light); color: var(--brand); }

.drawer-search {
  padding: 1rem 1.5rem;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
  transition: border-color .3s;
}
.drawer-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  padding: .6rem .9rem;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .2s, background .2s, color .3s;
}
.drawer-search input::placeholder { color: var(--muted); }
.drawer-search input:focus {
  border-color: var(--brand);
  background: var(--bg-input-f);
}

.drawer-list {
  flex: 1; overflow-y: auto;
  padding: .75rem 1rem;
}
.drawer-cat-title {
  font-size: .7rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand);
  padding: .6rem .5rem .3rem;
  font-family: 'DM Sans', sans-serif;
}
.drawer-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .12s;
}
.drawer-item:hover { background: var(--brand-light); }
.drawer-item-name {
  flex: 1; font-size: .85rem; color: var(--text-primary);
  transition: color .3s;
}
.drawer-item-price {
  font-size: .82rem; color: var(--brand);
  font-family: 'DM Serif Display', serif;
  white-space: nowrap;
  transition: color .3s;
}
.drawer-item-add {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}


/* ══════════════════════════════════════════════
   22. PRESUPUESTO — AUTOCOMPLETE (en ítems)
   ══════════════════════════════════════════════ */

.ac-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 0.5px solid var(--border-mid);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  overflow: hidden;
  display: none;
  transition: background .3s, border-color .3s;
}
.ac-dropdown.open { display: block; }

.ac-search-wrap {
  padding: .5rem .6rem;
  border-bottom: 0.5px solid var(--border);
  transition: border-color .3s;
}
.ac-inner-search {
  width: 100%;
  background: var(--bg-input) !important;
  border: 1px solid var(--border-mid) !important;
  color: var(--text-primary) !important;
  padding: .4rem .7rem !important;
  border-radius: 6px !important;
  font-size: .82rem !important;
  font-family: 'DM Sans', sans-serif !important;
  outline: none !important;
  transition: border-color .2s, background .2s, color .3s !important;
}
.ac-inner-search::placeholder { color: var(--muted) !important; }
.ac-inner-search:focus { border-color: var(--brand) !important; }

.ac-list {
  max-height: 240px; overflow-y: auto;
  padding: .25rem 0;
}
.ac-cat-label {
  font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--brand);
  padding: .5rem .75rem .2rem;
  font-family: 'DM Sans', sans-serif;
}
.ac-option {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .45rem .75rem;
  cursor: pointer; font-size: .83rem;
  color: var(--text-primary);
  transition: background .1s;
}
.ac-option:hover,
.ac-option.focused { background: var(--brand-light); }
.ac-option-name { flex: 1; line-height: 1.35; }
.ac-option-price {
  font-family: 'DM Serif Display', serif;
  color: var(--brand); white-space: nowrap; font-size: .82rem;
  transition: color .3s;
}
.ac-custom-opt {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem;
  font-size: .8rem; color: var(--text-tertiary);
  cursor: pointer; border-top: 0.5px solid var(--border);
  transition: background .1s, border-color .3s;
}
.ac-custom-opt:hover { background: var(--brand-light); color: var(--text-primary); }
.ac-empty {
  padding: .75rem; font-size: .82rem;
  color: var(--text-tertiary); text-align: center;
  transition: color .3s;
}
.ac-spin {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--border-mid);
  border-top-color: var(--brand);
  display: none; /* mostrar con JS si se quiere spinner */
}


/* ══════════════════════════════════════════════
   23. PRESUPUESTO — RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 900px) {
  .builder-wrap {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
}

@media (max-width: 640px) {
  .item-cols-header,
  .item-row-b {
    grid-template-columns: 1fr 55px 95px 28px;
    gap: 5px;
  }
  .drawer-panel { width: 100%; }
  .builder-wrap { padding: 0 16px; }
  .page-header { padding: 1.5rem 16px 1.25rem; }
}
input[type="text"],input[type="number"],input[type="date"],textarea,select{background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:10px 14px;font-family:'DM Sans',sans-serif;font-size:.9rem;color:var(--text);outline:none;transition:border-color .2s,box-shadow .2s;width:100%}
input:focus,textarea:focus,select:focus{border-color:var(--volt);box-shadow:0 0 0 3px rgba(200,255,0,.08)}
/* ── ITEMS ── */
.items-list{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.item-row-m{background:var(--surface2);border:1px solid var(--border);border-radius:10px;padding:12px 14px;display:grid;grid-template-columns:1fr 80px 36px;gap:10px;align-items:center;animation:itemIn .25s ease forwards}
@keyframes itemIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.form-group input,
.select-wrap select {
  background: var(--bg-page);
}

/* ── Autocomplete material ── */
.mat-wrap{position:relative;flex:1}
.mat-wrap input{width:100%}
.mat-dropdown{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:0 12px 40px rgba(0,0,0,.45);z-index:300;overflow:hidden;max-height:240px;display:none;flex-direction:column}
.mat-dropdown.open{display:flex}
.mat-list{overflow-y:auto;flex:1}
.mat-cat-label{font-family:'DM Mono',monospace;font-size:.65rem;color:var(--volt);letter-spacing:.1em;text-transform:uppercase;padding:8px 14px 3px;background:var(--surface);border-bottom:1px solid var(--border)}
.mat-option{display:flex;align-items:center;padding:9px 14px;cursor:pointer;gap:10px;transition:background .12s}
.mat-option:hover,.mat-option.focused{background:var(--surface2)}
.mat-option-name{font-size:.87rem;flex:1;line-height:1.3}
.mat-option-name mark{background:rgba(200,255,0,.25);color:var(--volt);border-radius:2px;padding:0 1px}
.mat-option-cat{font-size:.7rem;color:var(--muted);white-space:nowrap}
.mat-custom-opt{display:flex;align-items:center;gap:8px;padding:9px 14px;cursor:pointer;border-top:1px solid var(--border);color:var(--muted);font-size:.83rem;transition:background .12s}
.mat-custom-opt:hover{background:var(--surface2);color:var(--text)}

.btn-add{width:100%;background:rgba(200,255,0,.06);border:1px dashed rgba(200,255,0,.3);border-radius:10px;padding:12px;color:var(--volt);font-family:'DM Sans',sans-serif;font-size:.88rem;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:background .2s,border-color .2s}
.btn-add:hover{background:rgba(200,255,0,.12);border-color:rgba(200,255,0,.5)}

.btn-primary-full{width:100%;background:var(--volt);color:#0a1628;border:none;border-radius:10px;padding:15px 24px;font-family:'Syne',sans-serif;font-weight:700;font-size:1rem;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;transition:filter .2s,transform .15s}
.btn-primary-full:hover{filter:brightness(1.1);transform:translateY(-1px)}
.btn-primary-full:active{transform:translateY(0)}
.btn-ghost-full{width:100%;background:transparent;border:1px solid var(--border);border-radius:10px;padding:12px 24px;font-family:'DM Sans',sans-serif;font-weight:600;font-size:.9rem;color:var(--text);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:border-color .2s,background .2s}
.btn-ghost-full:hover{border-color:var(--volt);background:rgba(200,255,0,.05)}


/* ── TOAST ── */
.toast{position:fixed;bottom:32px;right:32px;background:var(--surface);border:1px solid var(--success);border-radius:12px;padding:14px 20px;font-size:.88rem;display:flex;align-items:center;gap:10px;box-shadow:0 8px 32px rgba(0,0,0,.4);transform:translateY(100px);opacity:0;transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .35s;z-index:999}
.toast.show{transform:translateY(0);opacity:1}
.toast-icon{color:var(--success);font-size:1.1rem}

/* ── Guardar en Supabase badge ── */
.save-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(0,230,118,.08);border:1px solid rgba(0,230,118,.2);border-radius:8px;padding:6px 12px;font-size:.78rem;color:var(--success);font-family:'DM Mono',monospace}

/* Estado vacío */
.empty-state{text-align:center;padding:32px 16px;color:var(--muted)}
.empty-state .es-icon{font-size:2rem;margin-bottom:10px;opacity:.4}
.empty-state p{font-size:.88rem}