/* Shell Impulsa2 — alineado a ag2Liberación */
:root {
  --primary-blue: #1b2a47;
  --card-blue: #0f172a;
  --deep-blue: #0d1627;
  --accent-orange: #f39c12;
  --accent-yellow: #f1c40f;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --surface: #ffffff;
  --surface-soft: #f4f6f9;
  --line: #e2e8f0;
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.12);
  --font-main: "Roboto", -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-pill: 999px;
  /* alias legacy */
  --i2-border: var(--line);
  --i2-muted: #64748b;
  --i2-max: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body.impulsa2-app,
body.landing {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: var(--deep-blue);
  color: var(--text-white);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body.impulsa2-app a,
body.landing a {
  color: var(--accent-orange);
  text-decoration: none;
}

body.impulsa2-app a:hover,
body.landing a:hover {
  text-decoration: underline;
}

/* ── Header ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 5%;
  background: var(--primary-blue);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  text-decoration: none;
}

.brand__img {
  height: 52px;
  width: auto;
}

.brand__text strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-white);
}

.brand__text small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.topbar__nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}

.topbar__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.topbar__pill,
.topbar__link {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  white-space: nowrap;
}

.topbar__pill:hover,
.topbar__link:hover {
  text-decoration: none;
  color: var(--text-white);
}

.topbar__link.is-active {
  background: rgba(243, 156, 18, 0.18);
  color: var(--accent-orange);
  border-color: rgba(243, 156, 18, 0.4);
}

.topbar__pill--accent {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow));
  color: var(--primary-blue);
  border: none;
}

.topbar__pill--accent:hover {
  color: var(--primary-blue);
  filter: brightness(1.05);
}

.topbar__user {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(300px, 42vw, 400px);
  padding: 48px 5% 52px;
  overflow: hidden;
  background: var(--deep-blue);
  display: flex;
  align-items: center;
}

.hero--compact {
  min-height: clamp(200px, 28vw, 280px);
  padding: 32px 5% 44px;
}

.hero__eagle-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.hero__eagle {
  position: absolute;
  top: 50%;
  right: -4%;
  left: auto;
  transform: translateY(-50%);
  width: min(78vw, 820px);
  height: auto;
  max-height: 108%;
  object-fit: contain;
  object-position: right center;
  opacity: 0.88;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
}

.hero--compact .hero__eagle {
  opacity: 0.55;
  width: min(65vw, 620px);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(13, 22, 39, 0.94) 0%,
    rgba(27, 42, 71, 0.82) 32%,
    rgba(27, 42, 71, 0.45) 55%,
    rgba(27, 42, 71, 0.08) 78%,
    transparent 100%
  );
  pointer-events: none;
}

.hero__overlay::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 22, 39, 0.85) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin: 0 0 12px;
}

.hero h1 {
  margin: 0 0 16px;
  font-weight: 900;
  line-height: 1.05;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.hero--compact h1 {
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  margin-bottom: 10px;
}

.hero__line {
  display: block;
  color: var(--text-white);
  font-weight: 300;
}

.hero__line--sub {
  font-size: 0.55em;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero__highlight {
  display: block;
  color: var(--accent-orange);
  font-weight: 900;
}

.hero__desc {
  font-size: 16px;
  line-height: 1.55;
  color: #cbd5e1;
  max-width: 560px;
  margin: 0 0 20px;
}

.hero--compact .hero__desc {
  font-size: 15px;
  margin-bottom: 14px;
}

.hero__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__channel {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 156, 18, 0.35);
  color: var(--text-white);
}

/* ── Layout & cards ───────────────────────────────────── */
.layout {
  max-width: 980px;
  margin: -28px auto 32px;
  padding: 0 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 2;
}

.layout--narrow {
  max-width: 480px;
}

.layout--wide {
  max-width: var(--i2-max);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
  color: #1e293b;
  border: 1px solid var(--line);
}

.card--flat {
  padding: 20px 24px;
}

.card__head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-blue);
}

.card__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-blue);
}

.card__sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}

.section-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.muted {
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.oculto,
.hidden {
  display: none !important;
}

/* ── Tabs ─────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0 18px;
}

.tab {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.tab:hover {
  border-color: var(--accent-orange);
  color: var(--primary-blue);
}

.tab--active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(27, 42, 71, 0.25);
}

/* ── Forms & buttons ──────────────────────────────────── */
.row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.row--actions {
  flex-wrap: wrap;
}

.form-field label,
.login-field label {
  display: block;
  font-weight: 700;
  margin: 8px 0;
  font-size: 13px;
  color: var(--primary-blue);
}

.form-field input,
.login-field input,
.form-consulta input[type="text"],
.form-consulta input:not([type]) {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid var(--line);
  font-size: 16px;
  font-family: var(--font-main);
  background: var(--surface-soft);
  color: var(--card-blue);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-consulta input {
  flex: 1;
  font-family: ui-monospace, "Consolas", monospace;
  letter-spacing: 0.5px;
}

.form-field input:focus,
.login-field input:focus,
.form-consulta input:focus {
  outline: none;
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
  background: var(--surface);
}

.login-field {
  margin-bottom: 0.85rem;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 3rem !important;
}

.password-field__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-field__toggle:hover {
  color: var(--accent-orange);
  background: rgba(243, 156, 18, 0.12);
}

.password-field__toggle:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.password-field__svg {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font-main);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  text-decoration: none !important;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn--primary {
  background: var(--accent-orange);
  color: var(--primary-blue);
  border: 2px solid var(--accent-yellow);
  box-shadow: 0 4px 16px rgba(243, 156, 18, 0.35);
}

.btn--primary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.45);
  text-decoration: none !important;
}

.btn--ghost {
  background: var(--surface-soft);
  color: var(--primary-blue);
  border: 2px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--accent-orange);
  text-decoration: none !important;
}

.btn--block {
  width: 100%;
}

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: var(--primary-blue);
  padding: 32px 5%;
  border-top: 3px solid var(--accent-orange);
  margin-top: auto;
}

.footer__inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer__logo {
  height: 48px;
  width: auto;
  opacity: 0.95;
}

.footer strong {
  color: var(--text-white);
  font-size: 15px;
}

.footer__muted {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer__link {
  color: var(--accent-orange);
}

.footer--simple {
  text-align: center;
}

.footer--simple p {
  max-width: 980px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.footer--simple strong {
  color: var(--text-white);
}

/* ── FAB WhatsApp ─────────────────────────────────────── */
.fab-wa {
  position: fixed;
  left: 0;
  top: 58%;
  transform: translateY(-50%);
  background: var(--text-white);
  padding: 14px 18px;
  border-radius: 0 28px 28px 0;
  box-shadow: 2px 0 14px rgba(0, 0, 0, 0.25);
  z-index: 1001;
  transition: transform 0.2s, background 0.2s;
}

.fab-wa:hover {
  transform: translateY(-50%) scale(1.05);
  background: #f0f0f0;
  text-decoration: none;
}

.fab-wa img {
  width: 32px;
  height: 32px;
  display: block;
}

/* ── Login error & NIT modal ──────────────────────────── */
.login-error {
  display: none;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.88rem;
}

.login-error.is-visible {
  display: block;
}

.nit-dv-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.nit-dv-modal.is-open {
  display: flex;
}

.nit-dv-modal__card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  color: #1e293b;
}

.nit-dv-modal__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.nit-dv-modal__actions button {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.nit-dv-modal__actions button.primary {
  background: var(--accent-orange);
  border-color: var(--accent-yellow);
  color: var(--primary-blue);
}

/* ── KPI grid (landing) ───────────────────────────────── */
.grid {
  display: grid;
  gap: 12px;
}

.grid--benefits {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.kpi {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent-orange);
}

.kpi__label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.kpi__val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.35;
}

.card--benefits {
  padding: 22px 28px 24px;
}

.action-panel__desc {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}

.action-panel__hint {
  margin: 14px 0 0;
  font-size: 14px;
}

.demo-links {
  margin-top: 20px;
  font-size: 14px;
}

.demo-links summary {
  cursor: pointer;
  color: var(--accent-orange);
  font-weight: 600;
}

.demo-links ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.demo-links li {
  margin: 6px 0;
  color: #475569;
}

@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar__nav {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar__actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }

  .hero {
    min-height: 280px;
    padding: 36px 20px 40px;
  }

  .hero--compact {
    min-height: 220px;
    padding: 28px 20px 36px;
  }

  .hero__eagle {
    right: 50%;
    transform: translate(50%, -42%);
    width: 130%;
    max-height: 70%;
    opacity: 0.22;
    object-position: center bottom;
  }

  .hero__overlay {
    background: linear-gradient(
      180deg,
      rgba(13, 22, 39, 0.9) 0%,
      rgba(27, 42, 71, 0.82) 50%,
      rgba(13, 22, 39, 0.92) 100%
    );
  }

  .hero__content {
    max-width: 100%;
  }

  .tabs {
    flex-direction: column;
  }

  .row {
    flex-direction: column;
  }

  .btn--primary,
  .btn--ghost {
    width: 100%;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .fab-wa {
    padding: 12px 14px;
  }
}
