/* ELIT · Educational Leadership Intelligence Tracking
 * Identidad visual v3.0 · CEOO Tecnologías + EMCA
 * Dirección estética: Editorial premium institucional (Hermès × Apple × cumbre escolar)
 * Paleta exacta del manual: oro envejecido + negro profundo + azul marino + carbón + crema
 * Tipografía: SF Pro Display (Light/Regular/Medium/Semibold) — sistema Apple
 * Mood: confianza, calma, autoridad. Old Money digital, no neon ni cyberpunk.
 */

:root {
  /* Negros del manual */
  --bg:           #0A0A0C;   /* Negro Profundo (fondo principal) */
  --bg-elev:      #15151A;   /* Negro suave (inputs en focus) */
  --surface:      #16161B;   /* Carbón premium (cards) */
  --surface-2:    #1E1E24;   /* surface elevado */
  --surface-3:    #22222A;   /* hover state */
  --line:         #2A2A30;   /* Carbón Gris bordes */
  --line-soft:    rgba(184, 144, 85, .14);
  --line-strong:  #3A3A42;

  /* Cremas / texto */
  --text:         #F5F2EB;   /* Crema Premium */
  --text-soft:    rgba(245, 242, 235, .80);
  --text-mute:    rgba(245, 242, 235, .52);
  --text-faint:   rgba(245, 242, 235, .32);

  /* Oro envejecido (institucional) */
  --gold:         #B89055;
  --gold-bright:  #D4AC6E;
  --gold-deep:    #8B6B3F;
  --gold-soft:    rgba(184, 144, 85, .10);
  --gold-glow:    rgba(184, 144, 85, .22);
  --gold-on:      #0A0A0C;

  /* Azul marino institucional */
  --navy:         #1A2B47;
  --navy-soft:    rgba(26, 43, 71, .35);

  /* Semánticos */
  --success:      #4CAF74;   /* verde más cálido */
  --success-soft: rgba(76, 175, 116, .14);
  --danger:       #D85959;
  --danger-soft:  rgba(216, 89, 89, .12);
  --warning:      #D4A03A;
  --warning-soft: rgba(212, 160, 58, .12);
  --info:         #5B8AC9;
  --info-soft:    rgba(91, 138, 201, .14);

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    18px;
  --radius-pill:  99px;

  /* Sistema de spacing 8pt */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;  --s-8: 64px;  --s-9: 96px;

  /* Sombras editoriales */
  --shadow-card:   0 1px 0 rgba(255,255,255,.02) inset, 0 24px 60px -32px rgba(0,0,0,.7);
  --shadow-lift:   0 18px 50px -24px rgba(184, 144, 85, .35);
  --shadow-login:  0 50px 120px -40px rgba(0,0,0,.85), 0 0 0 1px rgba(184,144,85,.06);
}

.light {
  --bg:           #F5F2EB;
  --bg-elev:      #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #F8F5EE;
  --line:         #DCD7CC;
  --line-soft:    rgba(184, 144, 85, .20);
  --text:         #0A0A0C;
  --text-soft:    rgba(10, 10, 12, .78);
  --text-mute:    rgba(10, 10, 12, .50);
  --gold:         #8B6B3F;
  --gold-bright:  #B89055;
  --gold-deep:    #6B5028;
  --gold-soft:    rgba(139, 107, 63, .10);
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale }
html { -webkit-text-size-adjust:100% }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'kern', 'liga', 'cv11';
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--gold); text-decoration: none; transition: color .15s }
a:hover { color: var(--gold-bright) }

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, Inter, system-ui, sans-serif;
  letter-spacing: -.01em;
  color: var(--text);
}
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 300; line-height: 1.08; letter-spacing: -.02em }
h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 500; line-height: 1.2 }
h3 { font-size: 18px; font-weight: 600 }
.display-1 { font-size: clamp(56px, 9vw, 96px); font-weight: 200; letter-spacing: -.03em; line-height: 1 }
.lead { font-size: clamp(17px, 2vw, 20px); font-weight: 300; color: var(--text-soft); line-height: 1.55 }
.eyebrow {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.tagline {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 11px; font-weight: 300;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--text-mute);
}
code, .mono {
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  font-feature-settings: 'tnum';
}

/* ── Brand mark · letterhead E L I T ──────────────────────── */
.brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
}
.brand-shield { width: 30px; height: 36px; display: inline-block }
.brand-shield svg { width: 100%; height: 100% }
.brand-text { display: flex; flex-direction: column; line-height: 1.05 }
.brand-mark {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: .42em;
  color: var(--text);
  padding-right: 0;
  margin-right: -.42em;
}
.brand-mark-line {
  display: block;
  width: 22px; height: 1px;
  background: var(--gold);
  margin: 4px 0 2px;
}
.brand-tag {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 9px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 300;
}

/* ── Header ─────────────────────────────────────────────── */
header.top {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 12, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top-wrap {
  max-width: 1320px; margin: 0 auto;
  padding: 16px 30px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
}
nav.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap }
nav.main-nav a {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 14px; font-weight: 400;
  color: var(--text-soft);
  padding: 9px 14px; border-radius: 6px;
  transition: color .15s, background-color .15s;
}
nav.main-nav a:hover { background: var(--surface); color: var(--gold) }

.theme-toggle {
  min-height: 44px; min-width: 44px; /* 44px: minimo tactil recomendado */
  background: transparent; border: 1px solid var(--line);
  border-radius: 99px; padding: 6px;
  cursor: pointer; color: var(--text);
  margin-left: 8px; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold) }
.theme-toggle svg { width: 18px; height: 18px }
:root:not(.light) .theme-toggle .sun { display: block }
:root:not(.light) .theme-toggle .moon { display: none }
.light .theme-toggle .moon { display: block }
.light .theme-toggle .sun { display: none }

/* ── Main · hero ─────────────────────────────────────────── */
main { max-width: 1320px; margin: 0 auto; padding: 60px 30px 80px }
section { margin-bottom: 100px }

.hero {
  text-align: center;
  padding: 60px 0 80px;
  position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 30%, var(--gold-soft), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative }
.hero-shield {
  width: 140px; height: auto;
  max-width: 100%;
  margin: 0 auto 40px;
  display: block;
}
.hero-shield img, .hero-shield svg {
  width: 100%; height: auto;
  display: block;
  object-fit: contain;
}

.hero h1 em {
  font-style: normal; color: var(--gold); font-weight: 300;
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px;
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 14px; font-weight: 500;
  letter-spacing: .02em;
  border: none; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.btn.primary {
  background: var(--gold); color: var(--gold-on);
  font-weight: 600;
}
.btn.primary:hover { background: var(--gold-bright); color: var(--gold-on) }
.btn.outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn.outline:hover { border-color: var(--gold); color: var(--gold) }
.btn:active { transform: translateY(1px) }
.btn:disabled { opacity: .55; cursor: not-allowed }
.btn.full { width: 100% }
.btn.sm { padding: 9px 16px; font-size: 12.5px }

/* ── Cards ───────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px }
.card, .tarjeta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover, .tarjeta:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -20px rgba(184, 144, 85, .35);
}
.card .titulo, .tarjeta .titulo {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 17px; font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.card .desc, .tarjeta .desc {
  color: var(--text-soft);
  font-size: 14.5px; line-height: 1.55;
  font-weight: 300;
}

/* ── Pilares cuádruples ELIT ─────────────────────────────── */
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.pilar {
  text-align: center;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color .2s, transform .2s;
}
.pilar:hover { border-color: var(--gold); transform: translateY(-2px) }
.pilar .letra {
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 56px; font-weight: 200;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 12px;
  letter-spacing: -.02em;
}
.pilar .nombre {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.pilar .desc {
  font-size: 13.5px; color: var(--text-mute);
  font-weight: 300; line-height: 1.5;
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin: 36px 0 }
.pricing {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.pricing:hover { border-color: var(--gold); transform: translateY(-3px) }
.pricing.featured {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(184,144,85,.06), var(--surface));
  position: relative;
}
.pricing.featured::before {
  content: 'RECOMENDADO';
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--gold-on);
  font-family: 'SF Pro Display', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 99px;
}
.pricing .tier-name {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--text-mute);
  font-weight: 500; margin-bottom: 16px;
}
.pricing .precio {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 64px; font-weight: 200;
  color: var(--gold); line-height: 1;
  letter-spacing: -.02em;
  font-feature-settings: 'tnum';
}
.pricing .precio small {
  display: block; font-family: 'SF Pro Display', sans-serif;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-mute); margin-top: 8px; font-weight: 500;
}
.pricing ul.features {
  list-style: none; margin: 28px 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; flex: 1;
}
.pricing ul.features li {
  padding-left: 26px; position: relative;
  color: var(--text-soft);
  font-weight: 300;
}
.pricing ul.features li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 12px; height: 7px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}

/* ── KPIs (estilo mockup móvil del manual) ───────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3); margin-bottom: var(--s-6) }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5) var(--s-5);
  position: relative;
  transition: border-color .25s, transform .25s;
}
.kpi:hover { border-color: var(--gold-soft); transform: translateY(-1px) }
.kpi .label {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-soft);
  margin-bottom: var(--s-3);
  letter-spacing: -.005em;
}
.kpi .val {
  font-family: 'SF Pro Display', sans-serif;
  font-size: clamp(34px, 4.5vw, 48px); font-weight: 300;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.025em;
  font-feature-settings: 'tnum';
}
.kpi .val.success { color: var(--success) }
.kpi .val.warning { color: var(--warning) }
.kpi .val.danger  { color: var(--danger) }
.kpi .val.gold    { color: var(--gold) }
.kpi .sub {
  font-size: 13px; color: var(--text-mute);
  margin-top: var(--s-2); font-weight: 500;
  font-feature-settings: 'tnum';
}
.kpi .sub.success { color: var(--success) }
.kpi .sub.danger  { color: var(--danger) }
.kpi .sub.warning { color: var(--warning) }
.kpi .icono {
  position: absolute; top: var(--s-5); right: var(--s-5);
  width: 22px; height: 22px;
  color: var(--gold); opacity: .85;
}
.kpi .icono svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.6; fill: none }

/* ── Card genérica panel ─────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-4);
}
.panel-head h3 {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 16px; font-weight: 600;
  color: var(--text); letter-spacing: -.01em;
}
.panel-head .meta { font-size: 12px; color: var(--text-mute); font-weight: 500 }
.panel-head svg { width: 18px; height: 18px; color: var(--gold); opacity: .85 }

/* ── Gráfica semanal (SVG inline) ────────────────────────── */
.chart-week {
  width: 100%; height: 180px;
  display: block;
}
.chart-week .axis { stroke: var(--line); stroke-width: 1; opacity: .55 }
.chart-week .label { fill: var(--text-mute); font: 500 11px 'SF Pro Display', sans-serif; font-feature-settings: 'tnum' }
.chart-week .line { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round }
.chart-week .area { fill: url(#chartFade) }
.chart-week .dot  { fill: var(--gold); stroke: var(--bg); stroke-width: 2 }
.chart-week .dot-active { fill: var(--gold-bright); stroke: var(--bg); stroke-width: 2.5 }
.chart-week .val-label { fill: var(--text); font: 500 10px 'SF Pro Display', sans-serif }

/* ── Login (estilo mockup manual) ────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-6) var(--s-5);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--gold-glow), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 100%, var(--navy-soft), transparent 70%),
    var(--bg);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--s-7) var(--s-6);
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-login);
}
.login-card .login-brand {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: var(--s-6);
  text-align: center;
}
.login-card .login-brand .brand-shield {
  width: 70px; height: 82px;
  margin-bottom: var(--s-4);
  display: block;
}
.login-card .login-brand .brand-mark {
  font-size: 30px; font-weight: 300;
  letter-spacing: .48em; padding-left: .48em;
  margin: 0;
}
.login-card .login-brand .brand-mark-line {
  display: block;
  width: 36px; height: 1px;
  background: var(--gold);
  margin: var(--s-3) 0 var(--s-3);
}
.login-card .login-brand .brand-tag {
  font-size: 10.5px; font-weight: 500;
  letter-spacing: .32em; text-transform: uppercase;
  color: var(--text-mute);
}
.login-card h2 {
  font-size: 19px; font-weight: 500;
  color: var(--text); text-align: center;
  margin: var(--s-3) 0 var(--s-6);
  letter-spacing: -.01em;
}

form { display: flex; flex-direction: column; gap: var(--s-4) }
label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--text); margin-bottom: var(--s-2);
  letter-spacing: -.005em;
}
input, textarea, select {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 14px 16px;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 16px /* 16px minimo: por debajo, Safari de iPhone hace zoom al tocar el campo y descoloca la pagina */;
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint) }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong) }
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
  background: var(--surface);
}
input[type="email"], input[type="password"] { font-feature-settings: 'tnum' }

/* ── Badges & estados ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 11px;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: 99px;
  background: var(--gold-soft); color: var(--gold);
  font-family: 'SF Pro Display', sans-serif;
}
.badge.success { background: rgba(76, 175, 80, .15); color: var(--success) }
.badge.warning { background: rgba(212, 160, 58, .15); color: var(--warning) }
.badge.danger  { background: rgba(200, 75, 75, .15); color: var(--danger) }
.badge.info    { background: rgba(70, 130, 180, .15); color: var(--info) }

/* ── Tables ──────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px }
table th, table td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
table th {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute);
  background: var(--surface-2);
}
table tbody tr:hover { background: var(--surface-2) }

/* ── Feature row (footer banner) ─────────────────────────── */
.features-row {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 30px;
  margin-top: 60px;
}
.features-grid {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
}
.feature-item {
  display: flex; align-items: center; gap: 14px;
}
.feature-item svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0 }
.feature-item .label {
  font-size: 13px; font-weight: 400;
  color: var(--text-soft); line-height: 1.4;
}

/* ── Footer ──────────────────────────────────────────────── */
footer.elit-footer {
  padding: 60px 30px 50px;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
  background: var(--bg);
}
footer.elit-footer .brand-mark { font-size: 20px; color: var(--text) }
footer.elit-footer a { color: var(--gold); margin: 0 8px }
.footer-tagline {
  font-size: 10px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--text-mute); margin: 6px 0 18px;
}

/* ── Dashboard ──────────────────────────────────────────── */
.dashboard {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 0 8px 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1 }
.sidebar nav a {
  padding: 10px 14px;
  color: var(--text-soft);
  font-size: 14px; font-weight: 400;
  border-radius: 6px;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--gold) }
.sidebar nav a.active {
  background: var(--gold-soft);
  color: var(--gold); font-weight: 500;
}
.sidebar .user-block {
  border-top: 1px solid var(--line);
  padding: 16px 8px 0;
  margin-top: 16px;
  font-size: 13px;
}
.sidebar .user-block .nombre { font-weight: 500; color: var(--text) }
.sidebar .user-block .rol { color: var(--text-mute); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; margin-top: 2px }
.sidebar .logout {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-mute); padding: 9px 14px;
  border-radius: var(--radius); cursor: pointer; margin-top: 12px;
  font-size: 12.5px; width: 100%;
}
.sidebar .logout:hover { border-color: var(--danger); color: var(--danger) }

.content-area {
  padding: 32px 40px;
  background: var(--bg);
}
.content-area > header.page-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 32px; gap: 20px; flex-wrap: wrap;
  background: transparent; position: static; padding: 0; border: none;
}
.content-area > header.page-head .titulos h1 {
  font-size: 30px; line-height: 1.1; margin-bottom: 4px;
  font-weight: 400;
}
.content-area > header.page-head .titulos .sub { color: var(--text-mute); font-size: 14px }

/* ── QR Scanner ──────────────────────────────────────────── */
.qr-scanner-card {
  background: var(--surface);
  border: 2px dashed var(--gold);
  border-radius: var(--radius-xl);
  padding: 30px;
  text-align: center;
}
#qr-video { width: 100%; max-width: 480px; border-radius: var(--radius); background: #000 }

/* ── Alertas ─────────────────────────────────────────────── */
.alert-item {
  background: var(--surface);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.alert-item.severidad-baja     { border-left-color: var(--info) }
.alert-item.severidad-media    { border-left-color: var(--warning) }
.alert-item.severidad-alta     { border-left-color: var(--danger) }
.alert-item.severidad-critica  { border-left-color: var(--danger); background: rgba(200, 75, 75, .05) }
.alert-item h4 { font-size: 15px; font-weight: 500; margin-bottom: 4px }
.alert-item p  { font-size: 13px; color: var(--text-soft); font-weight: 300 }
.alert-item .meta { font-size: 11px; color: var(--text-mute) }

/* ── Toast notifications ────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 10px }
.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 260px; max-width: 360px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6);
  font-size: 14px; color: var(--text);
  animation: toast-in .3s cubic-bezier(.4,0,.2,1);
}
@keyframes toast-in { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }

/* ── Pricing v4.2 · B2B premium ───────────────────────── */
.pricing .precio-box {
  margin-top: var(--s-4);
  padding: var(--s-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.pricing .precio-label {
  font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text-mute);
  font-weight: 500; margin-bottom: var(--s-2);
}
.pricing .precio-monto {
  font-size: 22px; color: var(--text); font-weight: 400;
  font-feature-settings: 'tnum'; letter-spacing: -.01em;
}
.pricing .precio-monto strong {
  font-size: 32px; font-weight: 300; color: var(--gold);
  letter-spacing: -.02em;
}
.pricing .precio-sub {
  font-size: 12.5px; color: var(--text-mute);
  margin-top: var(--s-2); font-weight: 400;
}

.pricing-extra {
  display: grid; grid-template-columns: 1fr; gap: var(--s-4);
  margin: var(--s-5) 0 var(--s-5);
}
.pricing.wide {
  flex-direction: row; gap: var(--s-5);
  align-items: stretch; padding: var(--s-5) var(--s-6);
}
.pricing.wide .tier-name {
  margin-bottom: 0; display: flex; align-items: center; gap: 10px;
}
.pricing.wide.partner {
  background: linear-gradient(135deg, rgba(184,144,85,.05), var(--surface));
}
.badge.gold-badge { background: var(--gold); color: var(--gold-on); font-weight: 700 }
@media (max-width: 720px) {
  .pricing.wide { flex-direction: column !important; padding: var(--s-5); }
  .pricing.wide > div { width: 100% !important; align-items: flex-start !important; }
}

/* ── Implementación · 8 pasos ─────────────────────────── */
.incluye-impl {
  margin: var(--s-6) 0 var(--s-5);
  padding: var(--s-6) 0 var(--s-5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.incluye-impl h3 {
  font-size: 26px; font-weight: 400;
  letter-spacing: -.015em;
}
.impl-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4); margin-top: var(--s-5);
}
.impl-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.impl-step {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 14px; font-weight: 600;
  letter-spacing: .14em; color: var(--gold);
}
.impl-titulo {
  font-size: 16px; font-weight: 600; color: var(--text);
  letter-spacing: -.005em;
}
.impl-desc {
  font-size: 13.5px; color: var(--text-soft);
  line-height: 1.55; font-weight: 300;
}

/* ── Cotizador form ──────────────────────────────────── */
.cotizador {
  margin: var(--s-6) 0 var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
}
.cotizador-head {
  margin-bottom: var(--s-5);
  max-width: 720px;
}
.cotizador-head h3 {
  font-size: 30px; font-weight: 400;
  letter-spacing: -.02em;
  margin: var(--s-2) 0 var(--s-3);
}
.cotizador-head p {
  font-size: 15px; color: var(--text-soft);
  font-weight: 300; line-height: 1.6;
}
.cotizador-form {
  display: flex; flex-direction: column; gap: var(--s-4);
}
.cotizador-form .form-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.cotizador-form .form-field { display: flex; flex-direction: column }
.cotizador-form textarea {
  resize: vertical; min-height: 78px;
  font-family: 'SF Pro Display', sans-serif;
}
.cotizador-form .form-actions {
  display: flex; align-items: center; gap: var(--s-4);
  margin-top: var(--s-2); flex-wrap: wrap;
}
.cotizador-form .form-note {
  font-size: 13px; color: var(--text-mute); font-style: italic;
}
.form-success {
  background: rgba(76,175,116,.12);
  border: 1px solid var(--success);
  color: var(--success);
  border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; font-weight: 500;
}
.form-error {
  background: rgba(216,89,89,.12);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px;
}
@media (max-width: 680px) {
  .cotizador { padding: var(--s-5) var(--s-4); }
  .cotizador-form .form-row { grid-template-columns: 1fr; }
  .impl-grid { grid-template-columns: 1fr; }
}

/* ── Calculadora de inversión ─────────────────────────── */
.calculadora {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: var(--s-6) var(--s-6) var(--s-5);
  margin: var(--s-6) 0 var(--s-5);
  box-shadow: var(--shadow-card);
}
.calc-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-5);
}
.calc-head h3 {
  font-size: 26px; font-weight: 400;
  letter-spacing: -.015em; margin-top: var(--s-2);
}
.calc-toggles {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 5px; background: var(--bg-elev);
}
.calc-pill {
  background: transparent; color: var(--text-mute);
  border: none; padding: 9px 18px;
  font-family: 'SF Pro Display', sans-serif;
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  border-radius: var(--radius-pill); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.calc-pill:hover { color: var(--text) }
.calc-pill.active { background: var(--gold); color: var(--gold-on) }
.calc-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-6); align-items: stretch;
}
.calc-input { display: flex; flex-direction: column; justify-content: center }
.calc-input label {
  font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: var(--s-3);
  letter-spacing: -.005em;
}
.slider-row { display: flex; align-items: center; gap: var(--s-4) }
.calc-input input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; background: var(--line); border-radius: 99px;
  outline: none; padding: 0;
}
.calc-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  border-radius: 99px; background: var(--gold);
  border: 3px solid var(--bg);
  box-shadow: 0 4px 12px rgba(184,144,85,.45);
  cursor: pointer;
}
.calc-val {
  font-family: 'SF Pro Display', sans-serif;
  font-size: 36px; font-weight: 300;
  color: var(--gold); min-width: 90px; text-align: right;
  font-feature-settings: 'tnum'; letter-spacing: -.02em;
}
.calc-hint { font-size: 12px; color: var(--text-mute); margin-top: var(--s-2) }
.calc-output {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.calc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; color: var(--text-soft);
  padding: 6px 0;
}
.calc-row .calc-amount {
  font-family: 'SF Pro Display', sans-serif;
  font-feature-settings: 'tnum'; font-weight: 500;
  color: var(--text);
}
.calc-row .calc-amount.big {
  font-size: 22px; font-weight: 300; letter-spacing: -.015em;
}
.calc-row .calc-amount.gold { color: var(--gold) }
.calc-row-final {
  border-top: 1px solid var(--line);
  margin-top: var(--s-2); padding-top: var(--s-3);
  font-size: 13px;
}
.calc-row-final span:first-child {
  color: var(--text); font-weight: 500;
  letter-spacing: -.005em; max-width: 60%;
}
.calc-fine {
  font-size: 12px; color: var(--text-mute);
  margin-top: var(--s-4); text-align: center;
  font-style: italic; line-height: 1.55;
}

/* ── Comparativo internacional · tabla ────────────────── */
.comp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--s-5) 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.comp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'SF Pro Display', sans-serif;
  min-width: 880px;
}
.comp-table thead th {
  font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: var(--s-4) var(--s-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  vertical-align: bottom; text-align: center;
  color: var(--text-mute);
}
.comp-table thead th.comp-feature {
  text-align: left; padding-left: var(--s-5);
  color: var(--text-soft);
}
.comp-table thead th.comp-elit {
  color: var(--gold); font-weight: 700;
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--surface-2) 100%);
}
.comp-table thead th .comp-origen {
  display: block; font-size: 10px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 400;
  margin-top: 4px;
}
.comp-table tbody td {
  font-size: 13.5px; font-weight: 400;
  padding: 13px var(--s-3);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}
.comp-table tbody td:first-child {
  text-align: left; padding-left: var(--s-5);
  color: var(--text); font-weight: 500;
}
.comp-table tbody tr:last-child td { border-bottom: none }
.comp-table tbody tr:nth-child(even) td { background: rgba(255,255,255,.012) }
.comp-table tbody td.elit-yes {
  color: var(--success); font-weight: 600;
  background: var(--success-soft);
}
.comp-table tbody td.elit-partial {
  color: var(--warning); font-weight: 500;
  background: var(--warning-soft);
}
.comp-table tbody td.comp-no { color: var(--text-faint) }
.comp-table tbody td.comp-partial { color: var(--text-mute); font-style: italic }
.comp-fine {
  font-size: 12px; color: var(--text-mute);
  margin-top: var(--s-3); text-align: center;
  font-style: italic;
}

@media (max-width: 760px) {
  .calc-grid { grid-template-columns: 1fr }
  .calc-head { flex-direction: column; align-items: flex-start; gap: var(--s-3) }
  .calc-val { font-size: 28px }
  .comp-table { font-size: 12.5px }
}

/* ── Mobile bottom nav (estilo mockup app) ───────────────── */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(22, 22, 27, .94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  padding: var(--s-2) var(--s-3) calc(var(--s-2) + env(safe-area-inset-bottom));
  z-index: 80;
}
.mobile-bottom-nav .nav-row {
  display: flex; justify-content: space-around; align-items: center;
  max-width: 600px; margin: 0 auto;
}
.mobile-bottom-nav a {
  flex: 1; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-1);
  font-size: 10.5px; font-weight: 500;
  color: var(--text-mute);
  letter-spacing: -.005em;
  text-decoration: none;
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-1);
  transition: color .2s, background-color .2s;
}
.mobile-bottom-nav a svg {
  width: 22px; height: 22px;
  stroke: currentColor; stroke-width: 1.7; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.mobile-bottom-nav a.active {
  color: var(--gold);
  background: var(--gold-soft);
}
.mobile-bottom-nav a.active svg { stroke-width: 2 }
.mobile-bottom-nav a:hover { color: var(--text) }
.mobile-bottom-nav a.active:hover { color: var(--gold-bright) }

/* ── Greeting + period selector (dashboard) ─────────────── */
.greeting {
  margin-bottom: var(--s-5);
}
.greeting h1 {
  font-size: clamp(26px, 3.5vw, 32px);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -.02em; margin-bottom: var(--s-1);
}
.greeting .sub {
  font-size: 14px; color: var(--text-mute);
  font-weight: 400;
}

/* ── Message card minimal (dashboard) ────────────────────── */
.msg-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
}
.msg-card .stat {
  display: flex; align-items: baseline; gap: var(--s-2);
}
.msg-card .stat .num {
  font-size: 38px; font-weight: 300; line-height: 1;
  color: var(--text); letter-spacing: -.02em;
  font-feature-settings: 'tnum';
}
.msg-card .stat .lbl {
  font-size: 13px; color: var(--text-mute);
}
.msg-card .icon-circle {
  width: 44px; height: 44px;
  border-radius: 99px;
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
}
.msg-card .icon-circle svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; fill: none }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 980px) {
  .dashboard { grid-template-columns: 1fr }
  .sidebar {
    position: sticky; top: 0; height: auto;
    border-right: none; border-bottom: 1px solid var(--line);
    padding: var(--s-3) var(--s-4);
    z-index: 70;
    background: rgba(22,22,27,.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    display: flex; align-items: center; justify-content: space-between;
  }
  .sidebar .brand { padding: 0; border-bottom: none; margin-bottom: 0; flex-shrink: 0 }
  .sidebar nav { display: none }
  .sidebar .user-block { display: none }
  .content-area { padding: var(--s-5) var(--s-4) 110px }
  .mobile-bottom-nav { display: block }
  main { padding: var(--s-6) var(--s-4) var(--s-7) }
  .login-card { padding: var(--s-6) var(--s-5) }
  .hero-shield { width: 120px; max-height: 150px }
  .greeting h1 { font-size: 26px }
  .kpi .val { font-size: 38px }
  .pricing-grid { grid-template-columns: 1fr }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr 1fr }
  .features-grid { grid-template-columns: 1fr 1fr }
  .top-wrap { padding: var(--s-3) var(--s-4) }
  nav.main-nav a { padding: 7px 10px; font-size: 13px }
  h1 { font-size: 32px }
  .kpi { padding: var(--s-4) }
  .kpi .val { font-size: 32px }
  .kpi .label { font-size: 12px }
  table th, table td { padding: 10px 12px; font-size: 13px }
}
