﻿/* ============================================================
   0. FUENTE DE MARCA — Abnes (tipografía del logo)
   ============================================================ */
@font-face {
  font-family: 'Abnes';
  src: url('/font/abnes.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Aplica la tipografía del logo a cualquier texto del nombre de marca.
   Uso: <span class="brand-font">Zona CFDI</span> */
.brand-font {
  font-family: var(--font-brand);
  letter-spacing: .02em;
}

/* ============================================================
   1. TOKENS & RESET
   ============================================================ */
:root {
  /* ---- Marca — extraída del logo ---- */
  --primary:      #00B0D0;   /* cyan del logo */
  --primary-dark: #0091AB;
  --primary-darker:#00728A;
  --primary-light:#4FD1E9;
  --slate:        #607088;   /* gris-azul del logo (wordmark) */
  --accent:       #F59E0B;   /* ámbar — complementario del cyan */
  --accent-dark:  #D97706;
  /* ---- Neutros (blue-gray, alineados al slate del logo) ---- */
  --dark:         #0f172a;
  --dark-2:       #1e293b;
  --dark-3:       #334155;
  --muted:        #607088;   /* = slate del logo */
  --light:        #f8fafc;
  --border:       #e2e8f0;
  /* ---- Funcionales ---- */
  --success:      #22c55e;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --font:         'Inter', sans-serif;
  --font-brand:   'Abnes', 'Inter', sans-serif;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow:       0 4px 24px rgba(15,23,42,.08);
  --shadow-lg:    0 8px 48px rgba(15,23,42,.15);
  --transition:   .25s cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--dark); background: #fff; -webkit-font-smoothing: antialiased; }
.mono { font-family: 'Courier New', Courier, monospace; }


/* ============================================================
   2. LANDING — NAV
   ============================================================ */
.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 5%; transition: var(--transition); }
.landing-nav.scrolled { background: rgba(15,23,42,.95); backdrop-filter: blur(12px); padding: .75rem 5%; box-shadow: 0 2px 20px rgba(0,0,0,.2); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -.5px; }
.nav-logo-img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: rgba(255,255,255,.75); text-decoration: none; padding: .45rem .85rem; border-radius: 8px; font-size: .9rem; font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.btn-nav-primary { background: var(--primary); color: #fff !important; padding: .5rem 1.2rem !important; border-radius: 9px !important; }
.btn-nav-primary:hover { background: var(--primary-dark) !important; color: #fff !important; }
.btn-outline-nav { background: transparent; color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.25); padding: .5rem 1.1rem; border-radius: 8px; font-size: .875rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-outline-nav:hover { border-color: #fff; color: #fff; }
.btn-primary-nav { background: var(--primary); color: #fff; padding: .5rem 1.25rem; border-radius: 8px; font-size: .875rem; font-weight: 700; text-decoration: none; transition: var(--transition); }
.btn-primary-nav:hover { background: var(--primary-dark); color: #fff; }
.nav-whatsapp { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(34,197,94,.15); color: #22c55e; font-size: 1.1rem; text-decoration: none; transition: var(--transition); }
.nav-whatsapp:hover { background: #22c55e; color: #fff; }


/* ============================================================
   3. LANDING — HERO
   ============================================================ */
.hero { min-height: 100vh; background: linear-gradient(135deg, var(--dark) 0%, #103141 50%, #0a1620 100%); display: flex; align-items: center; position: relative; overflow: hidden; padding: 7rem 0 5rem; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0,176,208,.20) 0%, transparent 60%), radial-gradient(ellipse 50% 40% at 20% 80%, rgba(96,112,136,.16) 0%, transparent 50%); pointer-events: none; }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(0,176,208,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(0,176,208,.07) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(0,176,208,.15); border: 1px solid rgba(0,176,208,.3); color: var(--primary-light); padding: .35rem .8rem; border-radius: 50px; font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem; letter-spacing: .3px; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; color: #fff; line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 1.25rem; }
.hero-title .highlight { background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,.65); line-height: 1.7; max-width: 540px; margin-bottom: 2.5rem; }
.hero-cta-group { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-hero-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; padding: .85rem 2rem; border-radius: 12px; font-size: 1rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; transition: var(--transition); box-shadow: 0 4px 20px rgba(0,176,208,.4); }
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,176,208,.5); color: #fff; }
.btn-hero-outline { background: transparent; color: rgba(255,255,255,.85); border: 1.5px solid rgba(255,255,255,.25); padding: .85rem 2rem; border-radius: 12px; font-size: 1rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; transition: var(--transition); }
.btn-hero-outline:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.45); color: #fff; }
.btn-hero-secondary { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.2); padding: .85rem 2rem; border-radius: 12px; font-size: 1rem; font-weight: 600; display: inline-flex; align-items: center; cursor: pointer; transition: var(--transition); }
.btn-hero-secondary:hover { background: rgba(255,255,255,.14); }
.btn-hero-whatsapp { display: inline-flex; align-items: center; background: #22c55e; color: #fff; padding: .85rem 2rem; border-radius: 12px; font-size: .95rem; font-weight: 600; text-decoration: none; border: none; transition: var(--transition); box-shadow: 0 4px 18px rgba(34,197,94,.35); }
.btn-hero-whatsapp:hover { background: #16a34a; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(34,197,94,.4); }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stat-value { font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: .2rem; }
.hero-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,.15); }
.hero-stat { display: flex; flex-direction: column; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 1.5rem; backdrop-filter: blur(12px); color: #fff; }
.hero-card-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.hero-card-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.hero-card-item { display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: .85rem; }
.hero-card-item:last-child { border-bottom: none; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.hero-gradient { background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-card-mockup { background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; width: 340px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.mockup-header { background: #0f172a; padding: .75rem 1rem; display: flex; align-items: center; gap: .75rem; }
.mockup-dots { display: flex; gap: .35rem; }
.mockup-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.2); }
.mockup-dots span:first-child { background: #ef4444; }
.mockup-dots span:nth-child(2) { background: #f59e0b; }
.mockup-dots span:nth-child(3) { background: #22c55e; }
.mockup-title { font-size: .75rem; color: rgba(255,255,255,.45); }
.mockup-body { padding: 1.25rem; }
.mockup-field { margin-bottom: .75rem; }
.mockup-label { display: block; font-size: .7rem; color: rgba(255,255,255,.35); margin-bottom: .2rem; }
.mockup-value { font-size: .85rem; color: rgba(255,255,255,.85); font-weight: 500; }
.mockup-divider { height: 1px; background: rgba(255,255,255,.08); margin: 1rem 0; }
.mockup-total { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: .9rem; color: rgba(255,255,255,.7); }
.mockup-amount { font-weight: 800; color: #fff; font-size: 1.1rem; }
.mockup-btn { width: 100%; background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: .6rem; font-size: .875rem; font-weight: 600; cursor: pointer; }
.mockup-badge-ok { margin-top: .75rem; background: rgba(16,185,129,.15); color: #34d399; border-radius: 6px; padding: .4rem .6rem; font-size: .75rem; font-weight: 600; text-align: center; }
.hero-centered { flex-direction: column; align-items: center; justify-content: center; padding: 7rem 5% 5rem; }
.hero-center-wrap { position: relative; z-index: 1; width: 100%; max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-subtitle-centered { max-width: 580px; margin-left: auto; margin-right: auto; text-align: center; }
.hero-actions-centered { justify-content: center; align-items: center; }
.hero-stats-centered { justify-content: center; border-top: 1px solid rgba(255,255,255,.1); padding-top: 2rem; width: 100%; }
.hero-mockup-wrap { margin-top: 3.5rem; width: 100%; max-width: 660px; perspective: 1200px; }
.hero-mockup-wrap .hero-card-mockup { width: 100%; transform: rotateX(4deg); box-shadow: 0 32px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07); transition: transform .4s ease, box-shadow .4s ease; }
.hero-mockup-wrap .hero-card-mockup:hover { transform: rotateX(0deg) translateY(-6px); box-shadow: 0 48px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.1); }
.mockup-fields-row { display: flex; gap: 1rem; }
.mockup-fields-row .mockup-field { flex: 1; }


/* ============================================================
   4. LANDING — TRUST BAR
   ============================================================ */
.trust-bar { background: var(--dark-2); padding: .9rem 2rem; }
.trust-bar-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: .5rem; color: #94a3b8; font-size: .82rem; }
.trust-item i { color: var(--primary-light); }
.trust-sep { color: #475569; font-size: .8rem; }

/* ============================================================
   5. LANDING — FEATURES
   ============================================================ */
.section { padding: 6rem 0; }
.section-light { background: var(--light); }
.section-dark { background: var(--dark); }
.section-eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: .75rem; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -.75px; line-height: 1.2; margin-bottom: 1rem; color: var(--dark); }
.section-title.light { color: #fff; }
.section-subtitle { font-size: 1.05rem; color: var(--muted); max-width: 580px; line-height: 1.7; }
.section-subtitle.light { color: rgba(255,255,255,.6); }
.features-section { padding: 6rem 5%; background: #fff; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag { display: inline-block; background: rgba(0,176,208,.1); color: var(--primary); padding: .3rem .85rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .75rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.feature-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; height: 100%; transition: var(--transition); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(0,176,208,.2); }
.feature-card--highlight { border: 1.5px solid rgba(245,158,11,.3); background: rgba(245,158,11,.03); }
.feature-new-tag { display: inline-block; margin-left: .4rem; background: rgba(245,158,11,.15); color: #d97706; font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .3px; vertical-align: middle; }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1.25rem; }
.feature-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); }
.feature-desc { font-size: .9rem; color: var(--muted); line-height: 1.65; margin: 0; }


/* ============================================================
   6. LANDING — LOCAL
   ============================================================ */
.local-section { padding: 6rem 2rem; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); }
.local-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.local-content { display: flex; flex-direction: column; }
.local-title { font-size: 2.2rem; font-weight: 800; color: var(--dark); line-height: 1.2; margin: .75rem 0 1rem; }
.local-desc { color: var(--muted); font-size: 1rem; line-height: 1.7; margin-bottom: 2rem; }
.local-features { display: flex; flex-direction: column; gap: 1.2rem; }
.local-feature { display: flex; align-items: flex-start; gap: 1rem; }
.local-feature-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.local-feature strong { display: block; font-size: .9rem; color: var(--dark); margin-bottom: .15rem; }
.local-feature span { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.local-visual { position: relative; }
.support-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 48px rgba(15,23,42,.12); overflow: hidden; }
.support-card-header { background: var(--dark); padding: 1rem 1.2rem; display: flex; align-items: center; gap: .85rem; }
.support-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.support-name { color: #fff; font-size: .88rem; font-weight: 600; }
.support-status { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: #94a3b8; }
.support-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.support-messages { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .75rem; }
.support-msg { max-width: 78%; font-size: .8rem; line-height: 1.5; padding: .6rem .9rem; border-radius: 12px; }
.support-msg--in { background: #f1f5f9; color: var(--dark); align-self: flex-start; border-bottom-left-radius: 3px; }
.support-msg--out { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.support-typing { display: flex; gap: .3rem; align-items: center; align-self: flex-end; padding: .4rem .6rem; }
.support-typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: typing-dot 1.2s infinite; }
.support-typing span:nth-child(2) { animation-delay: .2s; }
.support-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-dot { 0%,80%,100% { opacity: .3; } 40% { opacity: 1; } }
.support-input-row { display: flex; align-items: center; gap: .5rem; padding: .85rem 1.2rem; border-top: 1px solid var(--border); background: #f8fafc; }
.support-input-mock { flex: 1; font-size: .8rem; color: #94a3b8; }
.support-send { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.support-stat-row { display: flex; justify-content: space-around; margin-top: 1.5rem; text-align: center; }
.support-stat-item strong { display: block; font-size: 1.05rem; color: var(--dark); }
.support-stat-item span { font-size: .75rem; color: var(--muted); }


/* ============================================================
   7. LANDING — CP SPOTLIGHT
   ============================================================ */
.cp-section { background: linear-gradient(135deg, #0f172a 0%, #123c4d 50%, #0a1620 100%); padding: 6rem 2rem; }
.cp-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.cp-left { display: flex; flex-direction: column; }
.cp-right { display: flex; align-items: center; justify-content: center; }
.cp-tag { display: inline-flex; align-items: center; background: rgba(245,158,11,.2); color: #fbbf24; font-size: .78rem; font-weight: 700; padding: .35rem .9rem; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 1rem; }
.cp-title { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.15; margin: 0 0 1rem; }
.cp-desc { color: rgba(255,255,255,.7); font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.cp-benefits { display: flex; flex-direction: column; gap: .7rem; margin-bottom: 2rem; }
.cp-benefit { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.9); font-size: .9rem; }
.cp-benefit i { color: #4ade80; }
.btn-cp { display: inline-flex; align-items: center; background: #f59e0b; color: #111; padding: .85rem 2rem; border-radius: 12px; font-size: .95rem; font-weight: 700; text-decoration: none; transition: var(--transition); }
.btn-cp:hover { background: #d97706; color: #111; transform: translateY(-2px); }
.cp-mockup { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 1.5rem; }
.cp-route { display: flex; flex-direction: column; gap: 0; margin-bottom: 1.5rem; }
.cp-point { display: flex; align-items: flex-start; gap: .85rem; padding: .85rem 0; }
.cp-point-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: .3rem; }
.cp-point--origen .cp-point-dot { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.5); }
.cp-point--destino .cp-point-dot { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,.5); }
.cp-point-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; }
.cp-point-name { color: #fff; font-size: .9rem; font-weight: 600; }
.cp-point-rfc { color: rgba(255,255,255,.5); font-size: .75rem; }
.cp-route-line { border-left: 2px dashed rgba(255,255,255,.2); margin-left: 5px; padding: .25rem 0 .25rem 1.5rem; }
.cp-route-dist { font-size: .75rem; color: #f59e0b; }
.cp-cargo { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; margin-bottom: 1.2rem; }
.cp-cargo-row { display: flex; justify-content: space-between; padding: .3rem 0; }
.cp-cargo-label { font-size: .78rem; color: rgba(255,255,255,.5); }
.cp-cargo-val { font-size: .82rem; color: rgba(255,255,255,.85); font-weight: 500; }
.cp-timbrar-btn { background: var(--primary); color: #fff; text-align: center; padding: .8rem; border-radius: 10px; font-size: .9rem; font-weight: 600; cursor: pointer; }

/* ============================================================
   8. LANDING — PRICING
   ============================================================ */
.pricing-section { padding: 6rem 5%; background: #f8fafc; }
.pricing-tabs { display: flex; gap: .5rem; background: var(--light); border-radius: 14px; padding: .4rem; width: fit-content; margin: 0 auto 3rem; }
.pricing-tab { padding: .55rem 1.4rem; border-radius: 10px; border: none; background: transparent; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: var(--transition); }
.pricing-tab.active { background: #fff; color: var(--dark); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.pricing-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; height: 100%; display: flex; flex-direction: column; transition: var(--transition); position: relative; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,176,208,.08); }
.pricing-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .5px; padding: .3rem .9rem; border-radius: 50px; white-space: nowrap; }
.pricing-plan-name { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: .5rem; }
.pricing-price { font-size: 2.6rem; font-weight: 800; color: var(--dark); letter-spacing: -1px; line-height: 1; }
.pricing-price sup { font-size: 1.2rem; font-weight: 700; vertical-align: super; line-height: 0; }
.pricing-period { font-size: .85rem; color: var(--muted); margin-top: .25rem; margin-bottom: 1.5rem; }
.pricing-desc { font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
.pricing-divider { height: 1px; background: var(--border); margin: 1.25rem 0; }
.pricing-features { list-style: none; padding: 0; margin: 0; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; color: var(--dark-3); padding: .35rem 0; }
.pricing-features li i { color: var(--success); font-size: .9rem; margin-top: .1rem; flex-shrink: 0; }
.pricing-features li.disabled { color: var(--muted); opacity: .55; }
.pricing-features li.disabled i { color: var(--muted); }
.btn-pricing { margin-top: 1.75rem; padding: .75rem; border-radius: 10px; font-size: .95rem; font-weight: 600; text-align: center; text-decoration: none; display: block; transition: var(--transition); border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.btn-pricing:hover { background: var(--primary); color: #fff; }
.pricing-card.popular .btn-pricing { background: var(--primary); color: #fff; border-color: var(--primary); }
.pricing-card.popular .btn-pricing:hover { background: var(--primary-dark); }
.pricing-paquetes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; max-width: 1300px; margin: 0 auto; }
.pricing-pkg-card { display: flex; flex-direction: column; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px; padding: 1.5rem 1.25rem 1.25rem; position: relative; transition: box-shadow .18s, border-color .18s; }
.pricing-pkg-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); border-color: #cbd5e1; }
.pricing-pkg-card.popular { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); }
.pricing-pkg-folios { display: flex; align-items: baseline; gap: .3rem; margin: .5rem 0 .15rem; }
.pricing-pkg-num { font-size: 2rem; font-weight: 900; color: #0f172a; line-height: 1; }
.pricing-pkg-card .pricing-btn { border: none; cursor: pointer; width: 100%; margin-top: auto; }
.pricing-pkg-card.popular .pricing-btn { background: var(--primary); color: #fff; }
.pricing-name { font-size: .9rem; font-weight: 700; color: var(--muted); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .5px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.pricing-btn { display: block; text-align: center; background: #f1f5f9; color: var(--dark); border-radius: 10px; padding: .7rem; font-weight: 700; font-size: .9rem; text-decoration: none; transition: var(--transition); }
.pricing-btn:hover { filter: brightness(.95); }
.pricing-card.popular .pricing-btn { background: var(--primary); color: #fff; }
.pricing-context-note { max-width: 700px; margin: 0 auto 2rem; background: rgba(0,176,208,.07); border: 1px solid rgba(0,176,208,.22); border-radius: 10px; padding: .85rem 1.2rem; font-size: .88rem; color: var(--primary-darker); text-align: center; }
.pricing-context-note--amber { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.25); color: #92400e; }
.pricing-unit-cost { font-size: .78rem; color: var(--muted); margin-top: .25rem; margin-bottom: 1.25rem; }
.pricing-trial-note { text-align: center; font-size: .75rem; color: #22c55e; margin-top: .6rem; font-weight: 600; }
.pricing-cta-note { text-align: center; margin-top: 2rem; font-size: .88rem; color: var(--muted); }
.pricing-cta-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.pricing-cta-note a:hover { text-decoration: underline; }
.addon-box { max-width: 1100px; margin: 2rem auto 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; }
.addon-box h4 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }
.addon-items { display: flex; flex-direction: column; gap: .75rem; }
.addon-item { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; background: #f8fafc; border-radius: 10px; }
.addon-name { font-size: .9rem; font-weight: 700; color: var(--dark); }
.addon-desc { font-size: .8rem; color: var(--muted); }
.addon-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.addon-price span { font-size: .75rem; font-weight: 500; color: var(--muted); }


/* ============================================================
   9. LANDING — CTA
   ============================================================ */
.cta-section { background: linear-gradient(135deg, var(--dark) 0%, #103141 100%); padding: 6rem 5%; position: relative; overflow: hidden; text-align: center; }
.cta-section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,176,208,.2) 0%, transparent 60%); pointer-events: none; }
.cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; margin-bottom: 1rem; }
.cta-content p { font-size: 1.1rem; color: rgba(255,255,255,.65); margin-bottom: 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-cta { background: #fff; color: var(--primary-dark); border: none; padding: .9rem 2.2rem; border-radius: 12px; font-size: 1rem; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; transition: var(--transition); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.25); color: var(--primary-dark); }
.btn-cta-primary { background: #fff; color: var(--primary); border: none; padding: .9rem 2.2rem; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; transition: var(--transition); box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.btn-cta-primary:hover { transform: translateY(-2px); }
.btn-cta-secondary { background: transparent; color: rgba(255,255,255,.85); border: 2px solid rgba(255,255,255,.3); padding: .9rem 2.2rem; border-radius: 12px; font-size: 1rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; transition: var(--transition); }
.btn-cta-secondary:hover { border-color: #fff; color: #fff; }
.btn-cta-whatsapp { display: inline-flex; align-items: center; background: #22c55e; color: #fff; padding: .85rem 1.8rem; border-radius: 10px; font-size: .95rem; font-weight: 600; text-decoration: none; transition: var(--transition); }
.btn-cta-whatsapp:hover { background: #16a34a; color: #fff; transform: translateY(-2px); }
.cta-contact-info { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.cta-contact-item { display: flex; align-items: center; gap: .5rem; color: rgba(255,255,255,.65); font-size: .85rem; }
.cta-contact-item i { color: rgba(255,255,255,.4); }


/* ============================================================
   10. LANDING — FOOTER
   ============================================================ */
.landing-footer { background: var(--dark); padding: 4rem 0 2rem; color: rgba(255,255,255,.55); font-size: .88rem; }
.footer-content { max-width: 1100px; margin: 0 auto; padding: 0 5%; display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand { display: flex; flex-direction: column; gap: .5rem; }
.footer-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.footer-logo-img { height: 30px; width: auto; display: block; margin-bottom: .5rem; }
.footer-brand p { font-size: .875rem; color: rgba(255,255,255,.5); line-height: 1.6; }
.footer-desc { max-width: 280px; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-heading { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.4); margin-bottom: 1rem; }
.footer-links { display: flex; gap: 3rem; }
.footer-col { display: flex; flex-direction: column; gap: .6rem; }
.footer-col h5 { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.4); margin-bottom: .25rem; }
.footer-col a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .875rem; transition: var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-divider { height: 1px; background: rgba(255,255,255,.08); margin: 2.5rem 0 1.5rem; }
.footer-bottom { max-width: 1100px; margin: 0 auto; padding: 1.5rem 5% 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.35); }


/* ============================================================
   11. LANDING — LOGIN MODAL
   ============================================================ */
.login-overlay { position: fixed; inset: 0; background: rgba(10,14,33,.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 1.5rem; animation: fadeInOverlay .2s ease; }
@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
.login-panel { display: flex; width: 100%; max-width: 780px; border-radius: 24px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.06); animation: slideUpPanel .25s cubic-bezier(.4,0,.2,1); }
@keyframes slideUpPanel { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.login-brand-side { width: 44%; flex-shrink: 0; background: linear-gradient(155deg, #103141 0%, #0f172a 60%, #0a1620 100%); padding: 2.75rem 2rem; display: flex; flex-direction: column; gap: .75rem; position: relative; overflow: hidden; }
.login-brand-side::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 100% 80% at 30% 20%, rgba(0,176,208,.25) 0%, transparent 60%), radial-gradient(ellipse 60% 50% at 80% 90%, rgba(96,112,136,.14) 0%, transparent 50%); pointer-events: none; }
.login-brand-logo-img { position: relative; z-index: 1; height: 44px; width: auto; display: block; margin-bottom: .5rem; }
.login-brand-title { position: relative; z-index: 1; font-size: 2rem; font-weight: 900; color: #fff; letter-spacing: -1px; margin: 0; }
.login-brand-desc { position: relative; z-index: 1; font-size: .875rem; color: rgba(255,255,255,.5); line-height: 1.65; margin: 0; }
.login-brand-features { position: relative; z-index: 1; list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .6rem; }
.login-brand-features li { font-size: .82rem; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: .5rem; }
.login-brand-features li i { color: var(--primary-light); font-size: .85rem; }
.login-form-side { flex: 1; background: #fff; padding: 2.5rem 2.25rem; position: relative; display: flex; flex-direction: column; }
.login-close-btn { position: absolute; top: 1.25rem; right: 1.25rem; width: 32px; height: 32px; border: none; background: #f1f5f9; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: .9rem; transition: var(--transition); }
.login-close-btn:hover { background: #e2e8f0; color: #0f172a; }
.login-form-header { margin-bottom: 1.75rem; }
.login-form-title { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin: 0 0 .3rem; letter-spacing: -.5px; }
.login-form-subtitle { font-size: .875rem; color: #64748b; margin: 0; }
.login-field { margin-bottom: 1.1rem; }
.login-label { display: block; font-size: .78rem; font-weight: 700; color: #475569; margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .4px; }
.login-input { width: 100%; padding: .75rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 12px; font-size: .925rem; color: #0f172a; background: #f8fafc; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.login-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,176,208,.12); }
.login-error { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.2); color: #dc2626; border-radius: 10px; padding: .6rem .85rem; font-size: .82rem; font-weight: 600; margin-bottom: 1rem; }
.login-submit-btn { width: 100%; padding: .85rem 1.5rem; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: .25rem; margin-top: .5rem; transition: var(--transition); box-shadow: 0 4px 20px rgba(0,176,208,.38); }
.login-submit-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,176,208,.48); }
.login-submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.login-footer-note { text-align: center; font-size: .8rem; color: #94a3b8; margin: 1.1rem 0 0; }
.login-footer-note a { color: var(--primary); font-weight: 700; text-decoration: none; }
.login-footer-note a:hover { text-decoration: underline; }
.login-tabs { display: flex; gap: .25rem; background: #f1f5f9; border-radius: 10px; padding: .25rem; margin-bottom: 1.4rem; }
.login-tab-btn { flex: 1; padding: .45rem .5rem; border: none; border-radius: 8px; background: transparent; color: #64748b; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .18s; }
.login-tab-btn.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.login-tab-btn:hover:not(.active) { color: #334155; }
.login-fields-row { display: grid; grid-template-columns: 1fr 100px; gap: .75rem; }
.login-success-screen { display: flex; flex-direction: column; align-items: center; padding: 1rem 0 .5rem; }
.login-success-icon { width: 72px; height: 72px; border-radius: 50%; background: rgba(16,185,129,.12); color: #10b981; font-size: 2rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; }
.login-success-info { width: 100%; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: .7rem 1rem; font-size: .83rem; color: #166534; text-align: center; }
.login-info-box { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; padding: .6rem .9rem; font-size: .8rem; color: #0369a1; margin-bottom: .75rem; }

/* ============================================================
   12. APP SHELL — LAYOUT
   ============================================================ */
.app-shell { display: flex; height: 100vh; overflow: hidden; background: #f1f5f9; }
.app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.app-content { flex: 1; overflow-y: auto; padding: 2rem 1.75rem; }


/* ============================================================
   13. APP SHELL — SIDEBAR
   ============================================================ */
.sidebar { width: 260px; flex-shrink: 0; background: var(--dark); display: flex; flex-direction: column; padding: 0; overflow-y: auto; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; gap: .65rem; padding: 1.5rem 1.25rem 1rem; font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.sidebar-logo { height: 32px; width: auto; display: block; }
.sidebar-section-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,.3); padding: 1.2rem 1.25rem .4rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .65rem 1.25rem; color: rgba(255,255,255,.6); text-decoration: none; font-size: .9rem; font-weight: 500; margin: .1rem .5rem; border-radius: 9px; transition: var(--transition); }
.sidebar-link i { font-size: 1rem; width: 1.1rem; text-align: center; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-link.active { color: #fff; background: var(--primary); }
.sidebar-folio-badge { margin-left: auto; background: var(--primary); color: #fff; font-size: .65rem; font-weight: 700; padding: .1rem .45rem; border-radius: 10px; min-width: 1.6rem; text-align: center; }
.sidebar-link-folios { border-top: 1px dashed rgba(255,255,255,.15); margin-top: .25rem; padding-top: .5rem; }
.sidebar-link-locked { opacity: .55; pointer-events: all !important; text-decoration: none; }
.sidebar-link-locked:hover { opacity: .8; background: rgba(255,255,255,.04); }
.sidebar-lock-icon { font-size: .7rem; color: rgba(255,255,255,.35); }
.sidebar-user { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; }
.sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .75rem; }
.user-avatar { width: 34px; height: 34px; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: .9rem; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: .82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-rfc { font-size: .72rem; color: rgba(255,255,255,.45); }
.btn-logout { background: none; border: none; color: rgba(255,255,255,.4); font-size: 1.1rem; cursor: pointer; transition: var(--transition); padding: .25rem; }
.btn-logout:hover { color: var(--danger); }
.emisor-switcher { margin: .5rem .75rem 1rem; position: relative; cursor: pointer; }
.emisor-switcher-current { display: flex; align-items: center; gap: .65rem; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: .6rem .75rem; transition: var(--transition); }
.emisor-switcher-current:hover { background: rgba(255,255,255,.12); }
.emisor-switcher-avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.emisor-switcher-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.emisor-switcher-rfc { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.9); font-family: monospace; }
.emisor-switcher-hint { font-size: .7rem; color: rgba(255,255,255,.4); }
.emisor-switcher-arrow { margin-left: auto; font-size: .75rem; color: rgba(255,255,255,.4); }
.emisor-switcher-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #1e293b; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; z-index: 200; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.emisor-option { display: flex; align-items: center; gap: .65rem; padding: .65rem .9rem; cursor: pointer; transition: background .15s; font-size: .82rem; }
.emisor-option:hover { background: rgba(255,255,255,.07); }
.emisor-option.selected { background: rgba(0,176,208,.15); }
.emisor-option-avatar { width: 26px; height: 26px; border-radius: 6px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.emisor-option-rfc { font-family: monospace; font-weight: 700; color: rgba(255,255,255,.9); }
.emisor-option-nombre { font-size: .72rem; color: rgba(255,255,255,.45); }
.emisor-option-manage { display: flex; align-items: center; padding: .6rem .9rem; font-size: .8rem; color: rgba(255,255,255,.5); text-decoration: none; border-top: 1px solid rgba(255,255,255,.08); transition: color .15s; }
.emisor-option-manage:hover { color: var(--primary-light); }


/* ============================================================
   14. APP SHELL — TOPBAR
   ============================================================ */
.app-topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.75rem; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: .75rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-title { font-weight: 700; font-size: 1rem; color: var(--dark); }
.topbar-badge { font-size: .78rem; background: #f0fdf4; color: #166534; padding: .3rem .7rem; border-radius: 50px; border: 1px solid #bbf7d0; display: flex; align-items: center; }
.trial-badge { display: inline-flex; align-items: center; gap: .35rem; background: rgba(245,158,11,.12); color: #b45309; border: 1px solid rgba(245,158,11,.3); border-radius: 999px; padding: .25rem .75rem; font-size: .78rem; font-weight: 700; }


/* ============================================================
   15. APP — STAT CARDS
   ============================================================ */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; transition: var(--transition); }
.stat-card:hover { box-shadow: var(--shadow); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-value { font-size: 1.65rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.stat-body { display: flex; flex-direction: column; }
.stat-trend { font-size: .75rem; font-weight: 600; margin-top: .3rem; }


/* ============================================================
   16. APP — TABLES
   ============================================================ */
.app-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.app-card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.app-card-title { font-size: .95rem; font-weight: 700; color: var(--dark); margin: 0; }
.card-section { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.card-section-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-section-header h5 { margin: 0; font-size: .95rem; font-weight: 700; color: var(--dark); }
.app-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.app-table th { padding: .75rem 1rem; background: #f8fafc; border-bottom: 1px solid var(--border); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); white-space: nowrap; }
.app-table td { padding: .85rem 1rem; border-bottom: 1px solid #f1f5f9; color: var(--dark-3); vertical-align: middle; }
.app-table tr:last-child td { border-bottom: none; }
.app-table tr:hover td { background: #f8fafc; }
.table-actions { display: flex; gap: .3rem; }
.table-footer { padding: .75rem 1.25rem; border-top: 1px solid var(--border); background: #f8fafc; }
.btn-icon { background: transparent; border: 1px solid var(--border); width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; cursor: pointer; color: var(--muted); transition: var(--transition); }
.btn-icon:hover { background: #f1f5f9; color: var(--dark); }
.btn-icon.text-danger:hover { background: rgba(239,68,68,.1); color: #dc2626; border-color: rgba(239,68,68,.3); }
.filters-bar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.input-search { position: relative; display: flex; align-items: center; }
.input-search i { position: absolute; left: .75rem; color: var(--muted); }
.input-search input { padding: .5rem .75rem .5rem 2.1rem; border: 1px solid var(--border); border-radius: 9px; font-size: .875rem; width: 260px; background: #fff; }
.input-search input:focus { outline: none; border-color: var(--primary); }
.filters-bar .input-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; max-width: 360px; }
.filters-bar .input-search i { position: absolute; left: .75rem; color: var(--muted); font-size: .875rem; pointer-events: none; }
.filters-bar .input-search input { width: 100%; padding: .5rem .85rem .5rem 2.25rem; border: 1.5px solid #e2e8f0; border-radius: 9px; font-size: .875rem; background: #fff; transition: border-color .18s, box-shadow .18s; }
.filters-bar .input-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); outline: none; }


/* ============================================================
   17. APP — FORMS
   ============================================================ */
.form-section { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; }
.form-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: .75rem 0 .5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.form-label { font-size: .8rem; font-weight: 600; color: #475569; margin-bottom: .35rem; }
.form-label-custom { font-size: .82rem; font-weight: 600; color: var(--dark); margin-bottom: .35rem; display: block; }
.form-control, .form-select { border-color: var(--border); border-radius: 9px; font-size: .9rem; padding: .55rem .85rem; transition: var(--transition); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); }
.form-wizard { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.wizard-steps { display: flex; align-items: center; padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); background: #f8fafc; gap: 0; }
.wizard-step { display: flex; align-items: center; gap: .6rem; }
.step-num { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--muted); background: #fff; }
.wizard-step.active .step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.wizard-step.done .step-num { border-color: #10b981; background: #10b981; color: #fff; }
.step-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.wizard-step.active .step-label { color: var(--dark); }
.wizard-connector { flex: 1; height: 2px; background: var(--border); margin: 0 .75rem; }
.wizard-connector.done { background: #10b981; }
.wizard-body { padding: 2rem; }
.wizard-nav { display: flex; justify-content: space-between; padding: 1.25rem 2rem; border-top: 1px solid var(--border); background: #f8fafc; }


/* ============================================================
   18. APP — PAGE COMMON
   ============================================================ */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.75rem; }
.page-title { font-size: 1.4rem; font-weight: 800; color: var(--dark); margin: 0 0 .2rem; }
.page-subtitle { font-size: .875rem; color: var(--muted); margin: 0; }
.folio-preview-badge { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .75rem; background: rgba(0,176,208,.08); color: var(--primary); border: 1px solid rgba(0,176,208,.2); border-radius: 999px; font-size: .8rem; font-weight: 500; white-space: nowrap; }
.folio-preview-badge strong { font-weight: 700; }
.bg-indigo-soft { background: rgba(0,176,208,.10) !important; }
.text-indigo { color: var(--primary) !important; }
.text-xs { font-size: .75rem; }
.text-sm { font-size: .82rem; }
.fw-medium { font-weight: 600; }
.empty-state { padding: 5rem 2rem; text-align: center; }
.empty-state-icon { font-size: 3rem; color: var(--border); margin-bottom: 1rem; }
.empty-state-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0,176,208,.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 1.25rem;
}
.empty-state-title { font-size: 1.15rem; font-weight: 700; color: var(--dark); margin-bottom: .5rem; }
.empty-state-desc { font-size: .925rem; color: var(--muted); max-width: 400px; margin: 0 auto 1rem; line-height: 1.6; }

/* ============================================================
   19. APP — FACTURAS
   ============================================================ */
.concepto-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; margin-bottom: 1rem; }
.concepto-header { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; font-weight: 700; color: var(--dark); margin-bottom: 1rem; }
.totales-box { background: #f1f5f9; border-radius: 12px; padding: 1rem 1.25rem; }
.totales-row { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); padding: .3rem 0; }
.totales-row.total-final { font-size: 1.1rem; font-weight: 800; color: var(--dark); border-top: 1px solid var(--border); margin-top: .5rem; padding-top: .75rem; }
.timbrar-preview { padding: 1rem; }
.preview-resumen { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin: 1.5rem auto; max-width: 420px; text-align: left; }
.preview-item { display: flex; justify-content: space-between; padding: .45rem 0; font-size: .875rem; border-bottom: 1px solid var(--border); }
.preview-item:last-child { border-bottom: none; }
.preview-item span { color: var(--muted); }
.timbrado-success { padding: 1rem; }
.success-icon { font-size: 4rem; color: #10b981; margin-bottom: 1rem; }
.uuid-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 1rem; margin: 1rem auto; max-width: 560px; }
.uuid-label { display: block; font-size: .75rem; color: #15803d; font-weight: 700; margin-bottom: .3rem; }
.uuid-value { font-family: monospace; font-size: .85rem; color: #166534; word-break: break-all; }
.timbrado-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.email-send-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; max-width: 520px; margin: 0 auto; overflow: hidden; text-align: left; }
.email-send-header { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: .8rem; font-weight: 600; padding: .55rem 1rem; letter-spacing: .2px; }
.email-send-body { padding: .85rem 1rem; }
.email-receptor-badge { display: inline-flex; align-items: center; gap: .4rem; background: rgba(0,176,208,.08); border: 1px solid rgba(0,176,208,.25); border-radius: 20px; padding: .25rem .75rem; font-size: .78rem; color: var(--primary-darker); font-weight: 500; }
.email-receptor-addr { font-family: monospace; font-size: .76rem; color: var(--primary-dark); font-weight: 600; }
.alert-success-card { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 10px; padding: 1rem 1.25rem; font-size: .9rem; font-weight: 600; }
.info-box { display: flex; align-items: flex-start; gap: .75rem; background: rgba(0,176,208,.06); border: 1px solid rgba(0,176,208,.2); border-radius: 10px; padding: 1rem; font-size: .85rem; color: #3730a3; }
.tab-bar { display: flex; gap: .5rem; border-bottom: 2px solid var(--border); }
.tab-btn { background: none; border: none; padding: .7rem 1.25rem; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); display: inline-flex; align-items: center; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.concepts-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tab-btn:hover:not(.active) { color: var(--dark); }


/* ============================================================
   20. APP — CERTIFICADOS
   ============================================================ */
.cert-status-card { display: flex; align-items: flex-start; gap: 1rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 14px; padding: 1.25rem; }
.cert-status-card.vencido { background: #fef2f2; border-color: #fecaca; }
.cert-icon { font-size: 2rem; color: #10b981; line-height: 1; padding-top: .1rem; }
.cert-status-card.vencido .cert-icon { color: #ef4444; }
.cert-title { font-size: .9rem; font-weight: 700; color: #065f46; }
.cert-status-card.vencido .cert-title { color: #991b1b; }
.cert-rfc, .cert-numero { font-size: .8rem; color: #047857; }
.cert-status-card.vencido .cert-rfc { color: #b91c1c; }
.cert-vigencia { font-size: .82rem; color: #047857; }
.cert-status-card.vencido .cert-vigencia { color: #b91c1c; }
.cert-preview-box { background: rgba(0,176,208,.05); border: 1px solid rgba(0,176,208,.2); border-radius: 10px; padding: .85rem 1rem; font-size: .82rem; }
.cert-preview-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid rgba(0,176,208,.1); }
.cert-preview-row:last-child { border-bottom: none; }
.cert-preview-row span { color: var(--muted); }
.cert-info-box { background: rgba(0,176,208,.06); border: 1px solid rgba(0,176,208,.2); border-radius: 10px; padding: .85rem 1rem; font-size: .875rem; color: #00728A; }
.file-drop-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .5rem; cursor: pointer; transition: var(--transition); color: var(--muted); font-size: .875rem; }
.file-drop-zone:hover { border-color: var(--primary); background: rgba(0,176,208,.04); }
.file-drop-zone.loaded { border-color: #10b981; background: rgba(16,185,129,.04); color: var(--dark); }
.file-drop-zone i { font-size: 1.8rem; }
.cert-info { display: flex; flex-direction: column; gap: .25rem; }
.btn-remove-file { background: none; border: none; color: #dc2626; cursor: pointer; margin-top: .25rem; }


/* ============================================================
   21. APP — EMISORES
   ============================================================ */
.emisores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.emisor-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: var(--transition); }
.emisor-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.emisor-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.15); }
.emisor-card-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.25rem .75rem; }
.emisor-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; }
.emisor-badge-activo { background: rgba(16,185,129,.12); color: #059669; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.emisor-card-body { padding: 0 1.25rem 1rem; }
.emisor-nombre { font-size: .95rem; font-weight: 700; color: var(--dark); margin-bottom: .2rem; }
.emisor-rfc { font-family: monospace; font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.emisor-meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); margin-bottom: .6rem; }
.emisor-cert { font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 6px; display: inline-flex; align-items: center; }
.emisor-cert.ok { background: rgba(16,185,129,.1); color: #059669; }
.emisor-cert.pendiente { background: rgba(245,158,11,.1); color: #b45309; }
.emisor-card-footer { display: flex; gap: .5rem; padding: .75rem 1.25rem; border-top: 1px solid var(--border); background: #f8fafc; flex-wrap: wrap; }


/* ============================================================
   22. APP — RECEPTORES
   ============================================================ */
.receptor-search-box { position: relative; }
.receptor-search-input { position: relative; display: flex; align-items: center; }
.receptor-search-input i { position: absolute; left: .75rem; color: var(--muted); z-index: 1; }
.receptor-search-input input { width: 100%; padding: .6rem .75rem .6rem 2.2rem; border: 1px solid var(--border); border-radius: 10px; font-size: .875rem; background: #fff; }
.receptor-search-input input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.1); }
.receptor-search-clear { position: absolute; right: .6rem; background: none; border: none; color: var(--muted); cursor: pointer; padding: .25rem; display: flex; align-items: center; }
.receptor-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; z-index: 100; box-shadow: 0 8px 32px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.receptor-suggestion { padding: .75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .12s; }
.receptor-suggestion:last-child { border-bottom: none; }
.receptor-suggestion:hover { background: #f8fafc; }
.suggestion-rfc { font-family: monospace; font-size: .85rem; font-weight: 700; color: var(--primary); }
.suggestion-nombre { font-size: .9rem; font-weight: 600; color: var(--dark); }
.suggestion-meta { display: flex; gap: .75rem; font-size: .75rem; color: var(--muted); margin-top: .2rem; }
.suggestion-uso { background: rgba(0,176,208,.1); color: var(--primary); padding: .1rem .4rem; border-radius: 4px; font-weight: 600; }
.receptor-no-results { background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: .6rem .9rem; font-size: .82rem; color: #92400e; margin-top: .4rem; }
.receptor-no-results a { color: var(--primary); font-weight: 600; text-decoration: none; margin-left: .4rem; }
.receptor-no-results a:hover { text-decoration: underline; }


/* ============================================================
   23. APP — CATALOGOS
   ============================================================ */
.modo-toggle-group { display: inline-flex; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.modo-toggle-btn { border: none; background: #f8fafc; color: #64748b; padding: .35rem .9rem; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.modo-toggle-btn:first-child { border-right: 1px solid #e2e8f0; }
.modo-toggle-btn.active { background: var(--primary); color: #fff; }
.modo-toggle-btn:hover:not(.active) { background: #f1f5f9; }
.cat-picker-search { max-width: 360px; }
.cat-picker-list { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; max-height: 320px; overflow-y: auto; }
.cat-picker-item { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .12s; }
.cat-picker-item:last-child { border-bottom: none; }
.cat-picker-item:hover { background: #eef8fb; }
.cat-picker-info { display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.cat-picker-desc { font-size: .875rem; font-weight: 500; color: #0f172a; }
.cat-picker-meta { font-size: .75rem; color: #94a3b8; }
.cat-picker-precio { margin-left: .5rem; font-weight: 700; color: var(--primary-dark); }
.cat-picker-add { flex-shrink: 0; margin-left: .75rem; opacity: 0; transition: opacity .15s; }
.cat-picker-item:hover .cat-picker-add { opacity: 1; }
.giro-card { background: #f8fafc; border: 2px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; transition: border-color .15s, background .15s, box-shadow .15s; user-select: none; cursor: pointer; }
.giro-card:hover { border-color: #94a3b8; background: #f1f5f9; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.giro-card--selected { border-color: var(--primary); background: rgba(0,176,208,.06); box-shadow: 0 2px 10px rgba(0,176,208,.15); }
.giro-icon { width: 38px; height: 38px; background: rgba(0,176,208,.10); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--primary-dark); flex-shrink: 0; }
.giro-card--selected .giro-icon { background: rgba(0,176,208,.18); color: var(--primary-darker); }
.ubicacion-picker-item { padding: .75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .12s; }
.ubicacion-picker-item:last-child { border-bottom: none; }
.ubicacion-picker-item:hover { background: #eef8fb; }
.sat-result-row { cursor: pointer; transition: background .12s; }
.sat-result-row:hover { background: #eef8fb; }
.sat-section-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; padding: 4px 2px; border-bottom: 1px solid #e2e8f0; margin-bottom: 2px; }


/* ============================================================
   24. APP — COMPRAR
   ============================================================ */
.folio-balance-badge { display: inline-flex; align-items: center; gap: .4rem; background: #f0fdf4; border: 1px solid #86efac; border-radius: 20px; padding: .35rem .9rem; font-size: .85rem; color: #166534; }
.folio-balance-badge strong { font-size: 1.1rem; }
.paquetes-compra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.paquete-compra-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px; padding: 1.5rem 1.25rem 1.25rem; transition: box-shadow .18s, border-color .18s; }
.paquete-compra-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); border-color: #cbd5e1; }
.paquete-compra-card.destacado { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); }
.paquete-compra-card.activo { border-color: #10b981; background: #f0fdf4; }
.paquete-badge-top { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .75rem; border-radius: 20px; white-space: nowrap; }
.paquete-badge-activo { background: #10b981; }
.paquete-nombre { font-size: .85rem; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem; }
.paquete-folios { display: flex; align-items: baseline; gap: .3rem; margin-bottom: .25rem; }
.paquete-num { font-size: 2.2rem; font-weight: 900; color: #0f172a; line-height: 1; }
.paquete-unit { font-size: .85rem; color: #64748b; }
.paquete-precio { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin-bottom: .15rem; }
.paquete-iva { font-size: .72rem; font-weight: 400; color: #94a3b8; }
.paquete-por-folio { font-size: .75rem; color: #94a3b8; margin-bottom: 1rem; }
.paquete-features-list { list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .8rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.paquete-features-list li { display: flex; align-items: center; gap: .4rem; }
.paquete-features-list li.text-muted { color: #94a3b8 !important; }
.comprar-garantia { display: flex; align-items: center; gap: .75rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: .75rem 1rem; height: 100%; }
.comprar-garantia i { font-size: 1.5rem; color: var(--primary); flex-shrink: 0; }
.comprar-garantia strong { display: block; font-size: .85rem; margin-bottom: .1rem; }
.comprar-garantia span { font-size: .78rem; color: #64748b; }
.comprar-nota { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: .85rem 1rem; font-size: .82rem; color: var(--muted); line-height: 1.6; }

/* ============================================================
   25. SHARED — MODALS & BUTTONS
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 1050; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); padding: 1rem; }
.modal-box { background: #fff; border-radius: var(--radius-lg); width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 80px rgba(0,0,0,.25); animation: modalIn .25s ease; }
@keyframes modalIn { from { transform: scale(.95) translateY(-8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header-custom { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title-custom { font-size: 1.05rem; font-weight: 700; color: var(--dark); margin: 0; }
.modal-body-custom { padding: 1.5rem; }
.modal-footer-custom { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; }
.modal-close { background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: .9rem; transition: var(--transition); flex-shrink: 0; }
.modal-close:hover { background: #e2e8f0; color: var(--dark); }
.modal-box .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-box .modal-header h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: .5rem; }
.modal-box .modal-body { padding: 1.5rem; }
.modal-body .form-label { font-size: .775rem; font-weight: 700; color: #475569; margin-bottom: .3rem; letter-spacing: .02em; }
.modal-body .form-control, .modal-body .form-select { border: 1.5px solid #e2e8f0; border-radius: 9px; padding: .55rem .85rem; font-size: .875rem; color: var(--dark); background: #fff; transition: border-color .18s, box-shadow .18s; }
.modal-body .form-control:focus, .modal-body .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); outline: none; }
.modal-body .form-control.is-invalid { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.modal-body .invalid-feedback { font-size: .75rem; color: #dc2626; margin-top: .25rem; }
.modal-body .form-control::placeholder, .modal-body .form-select::placeholder { color: #94a3b8; }
.modal-body .modal-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.modal-body .input-search { position: relative; display: flex; align-items: center; }
.modal-body .input-search i { position: absolute; left: .75rem; color: var(--muted); font-size: .875rem; }
.modal-body .input-search input { width: 100%; padding: .55rem .85rem .55rem 2.25rem; border: 1.5px solid #e2e8f0; border-radius: 9px; font-size: .875rem; transition: border-color .18s, box-shadow .18s; }
.modal-body .input-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); outline: none; }
.modal-body .modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.btn-primary-custom { background: var(--primary); color: #fff; border: none; padding: .6rem 1.3rem; border-radius: 9px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; }
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary-custom { background: var(--light); color: var(--dark-3); border: 1px solid var(--border); padding: .6rem 1.3rem; border-radius: 9px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: .5rem; }
.btn-secondary-custom:hover { background: var(--border); }
.btn-danger-custom { background: var(--danger); color: #fff; border: none; padding: .6rem 1.3rem; border-radius: 9px; font-size: .9rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-danger-custom:hover { background: #dc2626; }


/* ============================================================
   26. SHARED — FEATURE GATE
   ============================================================ */
.feature-gate { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3rem 2rem; max-width: 540px; margin: 2rem auto; background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.feature-gate-icon { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 1.25rem; }
.feature-gate-title { font-size: 1.3rem; font-weight: 800; color: var(--dark); margin-bottom: .5rem; }
.feature-gate-desc { color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; line-height: 1.6; }
.feature-gate-detail { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.25rem; width: 100%; text-align: left; margin-bottom: .5rem; }
.feature-gate-item { display: flex; align-items: center; gap: .6rem; font-size: .875rem; padding: .35rem 0; color: var(--dark); }
.feature-gate-item + .feature-gate-item { border-top: 1px solid var(--border); }

/* ============================================================
   27. SHARED — TOASTS
   ============================================================ */
.toast-container-custom { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .6rem; }
.toast-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-radius: 12px; font-size: .875rem; font-weight: 500; min-width: 280px; max-width: 380px; box-shadow: 0 4px 20px rgba(0,0,0,.15); animation: slideIn .3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-exito { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.toast-error { background: #fff1f2; border: 1px solid #fca5a5; color: #991b1b; }
.toast-info { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }
.toast-advertencia { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.toast-stack { display: flex; flex-direction: column; gap: .5rem; }
.toast-close { background: none; border: none; color: inherit; opacity: .6; cursor: pointer; padding: 0 .25rem; font-size: .9rem; }
.toast-close:hover { opacity: 1; }


/* ============================================================
   27. SHARED — BADGES & STATUS
   ============================================================ */
.status-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 50px; font-size: .72rem; font-weight: 700; letter-spacing: .3px; }
.badge-emitido { background:#dcfce7; color:#166534; }
.badge-cancelado { background:#fee2e2; color:#991b1b; }
.badge-pendiente { background:#fef3c7; color:#92400e; }
.badge-borrador { background:#f1f5f9; color:#475569; }
.status-badge.info { background: rgba(0,176,208,.1); color: var(--primary-dark); }
.status-badge.ok { background: rgba(16,185,129,.1); color: #059669; }
.status-badge.warn { background: rgba(245,158,11,.1); color: #b45309; }
.status-badge.error { background: rgba(239,68,68,.1); color: #dc2626; }
.vigente { background: rgba(16,185,129,.1); color: #059669; }
.cancelado { background: rgba(239,68,68,.1); color: #dc2626; }
.info { background: rgba(0,176,208,.1); color: var(--primary); }
.tipo-p { background: rgba(0,176,208,.1); color: #00728A; }
.tipo-i { background: rgba(20,184,166,.1); color: #0f766e; }
.tipo-e { background: rgba(245,158,11,.1); color: #b45309; }
.tipo-t { background: rgba(139,92,246,.1); color: #7c3aed; }
.status-badge.tipo-p { background: #fef3c7; color: #92400e; }
.bg-success-soft { background: rgba(16,185,129,.12); }
.text-success { color: #059669; }


/* ============================================================
   28. SHARED — SKELETONS
   ============================================================ */
/* Skeleton loader */
.skeleton-pulse {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.skeleton-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skeleton-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-stat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.skeleton-stat-line {
  height: 16px;
  border-radius: 6px;
}

.skeleton-stat-line:first-child {
  width: 50%;
  height: 28px;
}

.skeleton-table-row {
  display: flex;
  gap: 1rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.skeleton-table-cell {
  height: 14px;
  border-radius: 5px;
  flex: 1;
}

.skeleton-table-header {
  display: flex;
  gap: 1rem;
  padding: .75rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.skeleton-table-header .skeleton-table-cell {
  height: 12px;
  width: 60px;
  flex: 0 0 auto;
}


/* ============================================================
   29. SHARED — SCROLL-TO-TOP
   ============================================================ */
.scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,176,208,.35);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,176,208,.45);
}



   ============================================================ */


/* ============================================================
   30. SHARED — ACCESSIBILITY
   ============================================================ */

/* Skip link — oculto visualmente hasta recibir foco de teclado.
   Patrón "visually-hidden": sacado del flujo y recortado a 1px, de modo que
   NUNCA se ve ni ocupa espacio salvo cuando se enfoca con Tab. No depende de
   posicionamiento fixed/absolute relativo a ningún contenedor. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 0;
  left: 1rem;
  width: auto;
  height: auto;
  margin: 0;
  padding: .6rem 1.2rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  z-index: 9999;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

/* Banner de impersonación (modo soporte) */
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .5rem 1.25rem;
  background: #92400e;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}
.impersonation-banner strong { font-weight: 800; }
.impersonation-banner .btn { flex-shrink: 0; }

/* Botón de ayuda en la barra superior */
.btn-topbar-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 1.05rem;
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-topbar-help:hover {
  background: rgba(0,176,208,.10);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Focus visible global */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Excluir inputs, textareas y selects (tienen su propio focus ring) */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
}

/* Focus visible para botones custom */
.btn-primary-custom:focus-visible,
.btn-secondary-custom:focus-visible,
.btn-danger-custom:focus-visible,
.btn-icon:focus-visible,
.sidebar-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Focus visible para nav-links en landing */
.nav-links a:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}


/* ============================================================
   31. ADMIN MODULE
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; background: #f8fafc; }
.admin-sidebar { width: 220px; flex-shrink: 0; background: #0f172a; display: flex; flex-direction: column; padding: 0; }
.admin-sidebar-brand { display: flex; align-items: center; gap: .5rem; padding: 1.25rem 1.25rem 1rem; color: #fff; font-size: 1.05rem; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.07); }
.admin-sidebar-brand i { color: var(--primary); font-size: 1.2rem; }
.admin-logo { height: 28px; width: auto; display: block; }
.admin-badge { margin-left: auto; font-size: .6rem; font-weight: 700; background: rgba(0,176,208,.25); color: #7FE0F2; border: 1px solid rgba(0,176,208,.35); border-radius: 999px; padding: .1rem .45rem; letter-spacing: .04em; text-transform: uppercase; }
.admin-nav { flex: 1; padding: .75rem .75rem 0; display: flex; flex-direction: column; gap: .2rem; }
.admin-nav-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .85rem; border-radius: 8px; color: #94a3b8; font-size: .85rem; font-weight: 500; text-decoration: none; transition: all .18s; }
.admin-nav-item i { font-size: 1rem; }
.admin-nav-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.admin-nav-item.active { background: rgba(0,176,208,.18); color: #7FE0F2; }
.admin-sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255,255,255,.07); }
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.75rem; background: #fff; border-bottom: 1px solid #e2e8f0; }
.admin-topbar-title { font-weight: 700; color: #0f172a; font-size: .95rem; }
.admin-topbar-user { font-size: .82rem; color: #64748b; }
.admin-content { flex: 1; padding: 1.75rem; overflow-y: auto; }
.admin-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.admin-page-title { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin: 0; }
.admin-page-date { font-size: .82rem; color: #94a3b8; text-transform: capitalize; }
.admin-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.admin-kpi-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.1rem 1.25rem; display: flex; align-items: flex-start; gap: 1rem; transition: box-shadow .18s; }
.admin-kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.admin-kpi-icon { width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.admin-kpi-value { font-size: 1.6rem; font-weight: 800; color: #0f172a; line-height: 1; }
.admin-kpi-label { font-size: .8rem; color: #64748b; margin-top: .2rem; font-weight: 500; }
.admin-kpi-body { display: flex; flex-direction: column; }
.admin-kpi-sub { font-size: .74rem; color: #94a3b8; margin-top: .15rem; }
.admin-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; }
.admin-section-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.admin-section-title { font-weight: 700; color: #0f172a; font-size: .95rem; margin: 0; }
.admin-search-box { display: flex; align-items: center; gap: .4rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: .35rem .75rem; color: #94a3b8; }
.admin-search-box input { border: none; background: transparent; outline: none; font-size: .83rem; color: #334155; width: 200px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.admin-table thead th { padding: .65rem 1rem; text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.admin-table tbody td { padding: .7rem 1rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #fafafe; }
.admin-row-inactive td { opacity: .55; }
.admin-rfc { font-family: monospace; font-size: .85rem; font-weight: 600; color: #1e293b; }
.admin-table-footer { padding: .65rem 1.25rem; font-size: .75rem; color: #94a3b8; border-top: 1px solid #f1f5f9; }
.admin-plan-badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.admin-plan-trial { background: rgba(245,158,11,.12); color: #b45309; }
.admin-plan-basico { background: rgba(16,185,129,.12); color: #065f46; }
.admin-plan-multirfc { background: rgba(0,176,208,.12); color: #00728A; }
.admin-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.admin-status-dot.green { background: #10b981; }
.admin-status-dot.yellow { background: #f59e0b; }
.admin-status-dot.red { background: #ef4444; }
.admin-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 7px; font-size: .74rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
.admin-btn-cancel { background: rgba(239,68,68,.08); color: #dc2626; border-color: rgba(239,68,68,.2); }
.admin-btn-cancel:hover { background: rgba(239,68,68,.16); }
.admin-btn-reactivate { background: rgba(16,185,129,.08); color: #059669; border-color: rgba(16,185,129,.2); }
.admin-btn-reactivate:hover { background: rgba(16,185,129,.16); }
.admin-btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-indigo { background: var(--primary); color: #fff; border: none; padding: .4rem 1rem; border-radius: 7px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.btn-indigo:hover { background: var(--primary-dark); }
.admin-confirm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.admin-confirm-modal { background: #fff; border-radius: 18px; padding: 2rem; width: 380px; max-width: calc(100vw - 2rem); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.admin-confirm-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto 1rem; }
.admin-confirm-icon.danger { background: rgba(239,68,68,.12); color: #dc2626; }
.admin-confirm-icon.success { background: rgba(16,185,129,.12); color: #059669; }
.admin-confirm-title { font-size: 1rem; font-weight: 800; color: #0f172a; text-align: center; margin: 0 0 .4rem; }
.admin-confirm-body { font-size: .85rem; color: #64748b; text-align: center; margin: 0 0 1.5rem; line-height: 1.55; }
.admin-confirm-actions { display: flex; gap: .75rem; }
.admin-confirm-actions button { flex: 1; padding: .6rem; border-radius: 10px; font-size: .85rem; font-weight: 700; cursor: pointer; border: none; transition: all .15s; }
.admin-btn-confirm-cancel { background: #f1f5f9; color: #475569; }
.admin-btn-confirm-cancel:hover { background: #e2e8f0; }
.admin-btn-confirm-danger { background: #dc2626; color: #fff; }
.admin-btn-confirm-danger:hover { background: #b91c1c; }
.admin-btn-confirm-success { background: #059669; color: #fff; }
.admin-btn-confirm-success:hover { background: #047857; }


/* ============================================================
   32. LEGAL PAGES
   ============================================================ */
.legal-page { max-width: 820px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.legal-header { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0 1.25rem; border-bottom: 1px solid #e2e8f0; margin-bottom: 2rem; }
.legal-brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: #0f172a; text-decoration: none; font-size: 1.1rem; }
.legal-logo-img { height: 28px; width: auto; display: block; }
.legal-content h1 { font-size: 1.9rem; font-weight: 800; color: #0f172a; margin-bottom: .25rem; }
.legal-content h2 { font-size: 1.15rem; font-weight: 700; color: #1e293b; margin: 1.75rem 0 .5rem; }
.legal-content p { color: #475569; line-height: 1.7; font-size: .95rem; }
.legal-content a { color: var(--primary); }
.legal-updated { color: #94a3b8; font-size: .82rem; margin-bottom: 1.25rem; }
.legal-notice { display: flex; gap: .25rem; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: .85rem 1rem; font-size: .88rem; margin-bottom: 1.5rem; }
.legal-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid #e2e8f0; color: #94a3b8; font-size: .82rem; }
.legal-footer a { color: var(--primary); text-decoration: none; }


/* ============================================================
   33. EXCEL IMPORT
   ============================================================ */
.excel-step { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.excel-step:last-of-type { border-bottom: none; }
.excel-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.excel-step-body { flex: 1; }
.excel-step-body strong { display: block; font-size: .9rem; margin-bottom: .15rem; }
.excel-step-body span { font-size: .8rem; color: var(--muted); }
.excel-preview { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 1rem; margin-bottom: .5rem; }
.excel-preview-header { font-size: .85rem; font-weight: 600; color: #166534; margin-bottom: .75rem; }
.excel-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .75rem; }
.excel-preview-grid > div { display: flex; flex-direction: column; }
.excel-preview-grid span { font-size: .72rem; color: #64748b; }
.excel-preview-grid strong { font-size: .82rem; color: #0f172a; }
.excel-advertencia { font-size: .78rem; color: #92400e; background: rgba(245,158,11,.1); border-radius: 6px; padding: .35rem .6rem; margin-top: .5rem; }


/* ============================================================
   34. RESPONSIVE
   ============================================================ */
/* Hamburger button — base (hidden by default) */
.btn-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--dark);
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
}

@media (max-width: 991px) {
  .btn-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
    height: 100vh;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 1099;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .local-grid, .cp-inner { grid-template-columns: 1fr; gap: 3rem; }
  .local-visual, .cp-right { display: none; }
  .local-title, .cp-title { font-size: 1.75rem; }
  .trust-sep { display: none; }
}
@media (max-width: 767px) {
  .hero { padding: 6rem 0 4rem; }
  .hero-cta-group { flex-direction: column; align-items: flex-start; }
  .pricing-tabs { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 600px) {
  .login-brand-side { display: none; }
  .login-panel { max-width: 420px; border-radius: 20px; }
  .login-form-side { padding: 2rem 1.5rem; }
}


/* ============================================================
   35. BOOTSTRAP — MAPEO A LA PALETA DE MARCA
   Bootstrap trae su primario azul (#0d6efd) por defecto; aquí
   remapeamos las utilidades/componentes usados en las páginas
   internas al cyan y funcionales de la marca.
   ============================================================ */
:root {
  --bs-primary: #00B0D0;
  --bs-primary-rgb: 0, 176, 208;
  --bs-link-color: var(--primary-dark);
  --bs-link-color-rgb: 0, 145, 171;
  --bs-link-hover-color: var(--primary-darker);
  --bs-link-hover-color-rgb: 0, 114, 138;
}

/* Botón primario */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--primary-darker);
  --bs-btn-active-border-color: var(--primary-darker);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
  --bs-btn-focus-shadow-rgb: 0, 176, 208;
}

/* Botón outline primario */
.btn-outline-primary {
  --bs-btn-color: var(--primary-dark);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--primary);
  --bs-btn-active-border-color: var(--primary);
  --bs-btn-disabled-color: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
  --bs-btn-focus-shadow-rgb: 0, 176, 208;
}

/* Botones funcionales alineados a los tokens */
.btn-success {
  --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success);
  --bs-btn-hover-bg: #16a34a; --bs-btn-hover-border-color: #16a34a;
  --bs-btn-active-bg: #15803d; --bs-btn-active-border-color: #15803d;
  --bs-btn-disabled-bg: var(--success); --bs-btn-disabled-border-color: var(--success);
  --bs-btn-focus-shadow-rgb: 34, 197, 94;
}
.btn-danger {
  --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger);
  --bs-btn-hover-bg: #dc2626; --bs-btn-hover-border-color: #dc2626;
  --bs-btn-active-bg: #b91c1c; --bs-btn-active-border-color: #b91c1c;
  --bs-btn-disabled-bg: var(--danger); --bs-btn-disabled-border-color: var(--danger);
  --bs-btn-focus-shadow-rgb: 239, 68, 68;
}
.btn-info {
  --bs-btn-color: #fff; --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--primary-darker); --bs-btn-active-border-color: var(--primary-darker);
}

/* Checks, radios, switches y selects */
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 .25rem rgba(0,176,208,.25); }
.form-switch .form-check-input:focus { border-color: var(--primary-light); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,176,208,.12); }

/* Texto / fondos primarios de Bootstrap → cyan */
.text-info { color: var(--primary-darker) !important; }
.badge.text-bg-primary { background-color: var(--primary) !important; color: #fff !important; }

/* Alertas informativas → tinte cyan de marca */
.alert-info {
  --bs-alert-color: #00566a;
  --bs-alert-bg: rgba(0,176,208,.08);
  --bs-alert-border-color: rgba(0,176,208,.22);
  --bs-alert-link-color: #00566a;
}
.alert-primary {
  --bs-alert-color: #00566a;
  --bs-alert-bg: rgba(0,176,208,.10);
  --bs-alert-border-color: rgba(0,176,208,.25);
  --bs-alert-link-color: #00566a;
}

/* Spinner con text-primary */
.spinner-border.text-primary, .spinner-grow.text-primary { color: var(--primary) !important; }

/* Nav-pills / paginación por si se usan en páginas internas */
.nav-pills { --bs-nav-pills-link-active-bg: var(--primary); }
.pagination { --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-color: var(--primary-dark); --bs-pagination-hover-color: var(--primary-darker); --bs-pagination-focus-color: var(--primary-darker); }

/* ══════════════════════════════════════════════════════════════
   Manual de usuario  (/app/ayuda)
   ══════════════════════════════════════════════════════════════ */
.manual-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }

/* Índice lateral fijo */
.manual-toc { position: sticky; top: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1rem .75rem; box-shadow: var(--shadow); }
.manual-toc-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding: .25rem .75rem .6rem; }
.manual-toc a { display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; border-radius: 9px; font-size: .85rem; color: var(--dark-3); text-decoration: none; transition: var(--transition); line-height: 1.2; }
.manual-toc a:hover { background: rgba(0,176,208,.08); color: var(--primary-dark); }
.manual-toc a i { font-size: 1rem; color: var(--muted); flex-shrink: 0; }
.manual-toc a:hover i { color: var(--primary); }

/* Secciones */
.manual-section { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.75rem 2rem; margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.manual-section > h3 { display: flex; align-items: center; gap: .65rem; font-size: 1.15rem; font-weight: 800; color: var(--dark); margin: 0 0 .35rem; }
.manual-section > h3 .manual-sec-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(0,176,208,.12); color: var(--primary); font-size: 1.05rem; flex-shrink: 0; }
.manual-lead { font-size: .92rem; color: var(--muted); line-height: 1.6; margin: 0 0 1.15rem; }
.manual-section h4 { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 1.5rem 0 .75rem; }

/* Badge de add-on */
.manual-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: .2rem .55rem; border-radius: 999px; background: rgba(245,158,11,.14); color: var(--accent-dark); margin-left: .5rem; vertical-align: middle; }

/* Pasos numerados */
.manual-steps { list-style: none; counter-reset: paso; padding: 0; margin: 0; }
.manual-steps > li { counter-increment: paso; position: relative; padding: 0 0 1rem 3rem; }
.manual-steps > li::before { content: counter(paso); position: absolute; left: 0; top: -.1rem; width: 1.9rem; height: 1.9rem; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,176,208,.35); }
.manual-steps > li::after { content: ""; position: absolute; left: .93rem; top: 1.9rem; bottom: -.15rem; width: 2px; background: linear-gradient(var(--primary-light), transparent); }
.manual-steps > li:last-child { padding-bottom: 0; }
.manual-steps > li:last-child::after { display: none; }
.manual-steps > li strong { color: var(--dark); }
.manual-steps > li .step-body { font-size: .9rem; color: var(--dark-3); line-height: 1.55; padding-top: .25rem; }

/* Callouts */
.manual-callout { display: flex; gap: .7rem; padding: .85rem 1rem; border-radius: 11px; font-size: .87rem; line-height: 1.55; margin: 1.1rem 0; border: 1px solid transparent; }
.manual-callout i { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
.manual-callout.info { background: rgba(0,176,208,.08); border-color: rgba(0,176,208,.22); color: #075a6c; }
.manual-callout.info i { color: var(--primary); }
.manual-callout.tip { background: rgba(34,197,94,.09); border-color: rgba(34,197,94,.24); color: #146c37; }
.manual-callout.tip i { color: var(--success); }
.manual-callout.warn { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.28); color: #92500a; }
.manual-callout.warn i { color: var(--warning); }

/* Diagramas SVG */
.manual-diagram { margin: 1.25rem 0; padding: 1.25rem; background: linear-gradient(180deg,#f8fafc,#f1f5f9); border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.manual-diagram svg { max-width: 100%; height: auto; }
.manual-diagram-caption { font-size: .78rem; color: var(--muted); margin-top: .6rem; }

/* Glosario */
.manual-glossary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.25rem; margin: 0; }
.manual-glossary dt { font-weight: 700; color: var(--primary-dark); font-size: .88rem; }
.manual-glossary dd { margin: 0 0 .6rem; font-size: .86rem; color: var(--dark-3); line-height: 1.5; }

/* FAQ */
.manual-faq details { border: 1px solid var(--border); border-radius: 11px; padding: 0; margin-bottom: .6rem; overflow: hidden; }
.manual-faq summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 600; font-size: .9rem; color: var(--dark); list-style: none; display: flex; align-items: center; gap: .5rem; transition: var(--transition); }
.manual-faq summary::-webkit-details-marker { display: none; }
.manual-faq summary::before { content: "\F4FE"; font-family: "bootstrap-icons"; color: var(--primary); font-size: .9rem; transition: transform .2s; }
.manual-faq details[open] summary { background: rgba(0,176,208,.06); }
.manual-faq details[open] summary::before { transform: rotate(90deg); }
.manual-faq .faq-body { padding: 0 1.1rem 1rem 2.35rem; font-size: .87rem; color: var(--dark-3); line-height: 1.6; }

/* Chips de campos/valores */
.manual-chip { display: inline-block; font-family: 'Courier New', monospace; font-size: .8rem; background: var(--light); border: 1px solid var(--border); border-radius: 6px; padding: .05rem .4rem; color: var(--primary-dark); }

@media (max-width: 991px) {
  .manual-layout { grid-template-columns: 1fr; }
  .manual-toc { position: static; margin-bottom: .5rem; }
  .manual-toc-links { display: flex; flex-wrap: wrap; gap: .25rem; }
  .manual-toc a { flex: 0 0 auto; }
  .manual-glossary { grid-template-columns: 1fr; }
}
