/* ═══════════════════════════════════════════════════════════
   components.css — Reusable Components (Golpe 533)
   Load AFTER tokens.css. Defines ALL shared UI components.
   Uses ONLY tokens.css variables — no hardcoded colors.
   Golpe 576: @layer removed — unlayered styles win cascade over legacy CSS.
   
   Pages should load: tokens.css → components.css → page-overrides
   ═══════════════════════════════════════════════════════════ */



/* ═══ RESET & BASE ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  interpolate-size: allow-keywords;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: var(--fs-body);
  min-height: 100dvh;
  overflow-x: hidden;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg, video { max-width: 100%; display: block; }

/* Focus ring for interactive elements — gold, inequívoco (F2 4.1) */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 1px solid var(--gold);   /* Terminal: focus ring más fino */
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Terminal: sin box-shadow en focus */
.btn:focus-visible, .tab:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--green);
  color: #ffffff;
  /* fallback */
  color: #ffffff;
  color: oklch(1 0 0);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus-visible {
  top: 8px;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}


/* ═══ LAYOUT ═══ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.section {
  padding: var(--section-py) var(--section-px);
}

.section-alt {
  background: var(--bg-card);
}

.section h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
}

.section-sub {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  max-width: 600px;
  margin: 0 auto 32px;
  text-align: center;
}

/* Grids */
.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.row { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }

/* Header */
.header {
  background: var(--bg-deep);                /* Terminal: sólido, sin blur */
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  padding: 0;
}

.header .container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  /* golpe 5101: altura natural = contenido; min-height conserva los 80px en
     nav corto. padding-block:0 evita que el padding genérico de .container
     infle la barra. */
  padding-block: 0;
  min-height: var(--nav-height);
  flex-wrap: nowrap;
}
.header .container > * {
  flex-shrink: 0;
  align-self: center;
}


.header .container .header-nav {
  margin-left: auto;
  /* golpe 5101: el nav puede encogerse y envolver sus enlaces antes de
     desbordar el viewport (fix del scroll horizontal 769–1360px). */
  flex-shrink: 1;
  min-width: 0;
}

.header-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 44px;
}
.header-logo:hover { text-decoration: none; }


.header-logo .accent { color: var(--green); }
.header-logo-img { height: var(--logo-h); width: auto; display: block; }

.header-nav {
  display: flex;
  /* golpe 5101: gap fluido para que el nav largo quepa en una fila en
     escritorio y solo envuelva en pantallas estrechas. */
  gap: clamp(10px, 1.1vw, 24px);
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  row-gap: 0;
}
.header-nav a {
  color: var(--fg-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 4px;
  transition: color 0.15s;
}
.header-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}
.header-nav a.active {
  color: var(--green);
  font-weight: 600;
}


.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 1.3rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}

/* Mobile nav: hamburger visible, nav hidden by default */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-deep);             /* Terminal: sólido */
  flex-direction: column;
  justify-content: flex-start;
  padding: 96px 24px 24px;
  gap: 12px;
  z-index: 9998;
}
.header-nav a {
  font-size: 1.1rem;
  padding: 12px 0;
}

  .header-nav.open {
    display: flex;
  }
}

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer a {
  color: var(--fg-muted);
  padding: 8px 4px;
  display: inline-block;
  min-height: 44px;
  line-height: 28px;
}
.footer a:hover { color: var(--fg); }


/* ═══ HERO ═══ */
.hero {
  padding-block: min(80px, 8vh) min(60px, 6vh);
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--radius);
  font-size: var(--fs-body);
  font-weight: 600;
  border: none;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--ease-out), border-color var(--ease-out),
              transform 0.1s ease-out, box-shadow var(--ease-out);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }


.btn-primary {
  background: var(--green);
  color: #ffffff;
  /* fallback */
  color: #ffffff;
  color: oklch(1 0 0);
}
.btn-primary:hover { background: var(--green-dim); }


.btn-secondary {
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--elev-border-1);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--elev-border-2); }


.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
}
.btn-ghost:hover { color: var(--fg); background: var(--bg-hover); }


.btn-accent {
  background: var(--blue);
  color: #ffffff;
  /* fallback */
  color: #ffffff;
  color: oklch(1 0 0);
}
.btn-accent:hover { background: var(--blue-dim); }


.btn-danger {
  background: var(--red);
  color: #ffffff;
  /* fallback */
  color: #ffffff;
  color: oklch(1 0 0);
}
.btn-danger:hover { background: color-mix(in oklch, var(--red) 80%, black); }


.btn-sm {
  padding: 10px 16px;
  font-size: 0.85rem;
  min-height: 44px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.1rem;
}

.btn-block { width: 100%; justify-content: center; }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ═══ CARDS ═══ */
.card {
  container-type: inline-size;
  container-name: card;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);      /* Terminal: sharp corners */
  padding: var(--card-py) var(--card-px);
  transition: border-color var(--ease-normal);
}
.card:hover {
  border-color: var(--border);
  background: var(--bg-card);        /* Terminal: flat — elevación por luminosidad */
}


.card-header {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-sm);
}

@container card (max-width: 250px) {
  .card { padding: 14px; }
  .card-header { font-size: 0.75rem; }
}

/* Feature card (for module/service features) */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);      /* Terminal: sharp corners */
  padding: var(--card-py) var(--card-px);
  text-align: center;
  transition: border-color var(--ease-normal);
}
.feature-card:hover {
  border-color: var(--gold-glass);
}


.feature-card .icon { font-size: 2rem; margin-bottom: 8px; }
.feature-card h3 { font-size: var(--fs-h3); margin-bottom: 4px; color: var(--fg); }
.feature-card .desc { font-size: var(--fs-sm); color: var(--fg-muted); line-height: 1.5; }

/* Stat card (for landing page stats) */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--card-py) var(--card-px);
  text-align: center;
}

.stat-card .num {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);              /* Terminal: mono data */
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.stat-card .lbl {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-top: 4px;
}

/* Problem card ("te suena familiar?" pain points) */
.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: var(--card-py) var(--card-px);
}

.problem-card h3 { font-size: var(--fs-h3); color: var(--red); margin-bottom: 4px; }
.problem-card .solution { font-size: var(--fs-sm); color: var(--fg-muted); }

/* Pricing card */
.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);      /* Terminal: sharp corners */
  padding: var(--card-py) var(--card-px);
  text-align: center;
  transition: border-color var(--ease-normal);
}
.pricing-card:hover { border-color: var(--green); }


.pricing-card.featured {
  border-color: var(--green);
}
.pricing-card.featured:hover { border-color: var(--gold-glass); }

.pricing-card .price {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--fg);
  margin: 12px 0 4px;
}

.pricing-card .price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--fg-muted);
}

.pricing-card .features {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  text-align: left;
}
.pricing-card .features li {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pricing-card .features li::before {
  content: "▸";
  color: var(--green);
  font-size: 0.7rem;
}


/* ═══ INPUTS & FORMS (F2 4.3) ═══ */
.input, input:not([type="checkbox"]):not([type="radio"]),
textarea, select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--elev-border-1);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--fg);
  font-size: max(0.9rem, 16px);
  font-family: var(--font);
  min-height: 44px;
  transition: border-color var(--ease-out), box-shadow var(--ease-out),
              background var(--ease-out);
}
.input:hover, input:not([type="checkbox"]):not([type="radio"]):hover,
textarea:hover, select:hover {
  border-color: var(--elev-border-2);
}
.input:focus, input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}
.input:disabled, input:disabled, textarea:disabled, select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-subtle);
}
/* Error: clase consumible por JS sin tocar HTML existente */
.input-error, .input.is-error, input.is-error, textarea.is-error {
  border-color: var(--red);
}
/* Terminal: sin glow en error focus */
.input-error:focus, .input.is-error:focus, input.is-error:focus {
}
.input::placeholder, input:not([type="checkbox"]):not([type="radio"])::placeholder, textarea::placeholder, select::placeholder { color: var(--fg-dim); }


textarea.input { resize: vertical; }
select { cursor: pointer; }

label {
  display: block;
  font-size: var(--fs-sm);
  color: var(--fg);
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
label .hint, .field-hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-top: 4px;
}

.form-group { margin-bottom: var(--space-md); }
.form-row {
  display: flex;
  gap: var(--space-sm);
}
.form-row > * { flex: 1; }


/* ═══ BADGES ═══ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 2px;               /* Terminal: badge cuadrado */
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge-green { background: var(--green-glass); color: var(--green); border-color: color-mix(in oklch, var(--green) 30%, transparent); }
.badge-yellow { background: var(--yellow-glass); color: var(--yellow); border-color: color-mix(in oklch, var(--yellow) 30%, transparent); }
.badge-red { background: var(--red-glass); color: var(--red); border-color: color-mix(in oklch, var(--red) 30%, transparent); }
.badge-blue { background: var(--blue-glass); color: var(--blue); border-color: color-mix(in oklch, var(--blue) 30%, transparent); }
.badge-purple { background: var(--purple-glass); color: var(--purple); border-color: color-mix(in oklch, var(--purple) 30%, transparent); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--fg-muted); }

/* ═══ TABLES ═══ */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-family: var(--font-mono); /* Terminal: datos en mono */ }

th {
  background: var(--bg);
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
}

tbody tr { transition: background var(--ease-out); }
tbody tr:hover td { background: var(--bg-subtle); }

/* ═══ TABS ═══ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}

.tab {
  padding: 12px 20px;
  font-size: max(0.9rem, 14px);
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
  min-height: 44px;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}
.tab:hover { color: var(--fg); }


.tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.tab-pill {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tab-pill .tab {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 16px;
  background: var(--bg-card);
}

.tab-pill .tab.active {
  background: var(--green);
  color: #ffffff; /* fallback */
  color: oklch(1 0 0);
  border-color: var(--green);
}

/* ═══ HEALTH BARS (F2 4.5) ═══ */
.health-bar {
  height: 4px;                    /* Terminal: más delgado */
  border-radius: var(--radius-sm);
  background: var(--bg-hover);    /* la pista no debe parecer borde */
  overflow: hidden;
  margin: 4px 0;
}

.health-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width var(--ease-emphasis);
}

.fill-green { background: var(--green); }
.fill-yellow { background: var(--yellow); }
.fill-red { background: var(--red); }
.fill-blue { background: var(--blue); }

/* ═══ GAUGES (F2 4.4 — clases nuevas; el SVG usa stroke="var(--g-high|g-mid|g-low)", nunca hex) ═══ */
.gauge-wrap {
  display: grid;
  place-items: center;
  gap: 4px;
}
.gauge-wrap svg {
  /* Terminal: sin glow — la precisión vive en los datos */
}
.gauge-track {
  stroke: var(--bg-hover);        /* pista del arco: un paso sobre el card bg */
  stroke-linecap: round;
}
.gauge-value {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--fg-heading);
}
.gauge-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}
.gauge-fill {
  transition: stroke-dashoffset var(--ease-emphasis);
}

/* ═══ STATUS DOTS (F2 4.6 — anillo expansivo opt-in, el estado nunca parpadea) ═══ */
.status-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}
.status-dot.pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.6;
  animation: dot-ring 2s cubic-bezier(0.2, 0, 0, 1) infinite;
}
@keyframes dot-ring {
  0%   { transform: scale(0.6); opacity: 0.7; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
.status-dot.green { color: var(--green); background: var(--green); }
.status-dot.yellow { color: var(--yellow); background: var(--yellow); }
.status-dot.red { color: var(--red); background: var(--red); }
.status-dot.blue { color: var(--blue); background: var(--blue); }
/* Variantes neutras — sin color semántico; idle nunca lleva .pulse (golpe 1678 parte 2) */
.status-dot.gray { background: var(--fg-muted); opacity: 0.5; }
.status-dot.idle { background: var(--fg-muted); opacity: 0.3; }
@media (prefers-reduced-motion: reduce) {
  .status-dot.pulse::after { animation: none; opacity: 0; }
}

/* ═══ METRIC ROW ═══ */
.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid oklch(from var(--border) l c h / 0.4);
}
.metric:last-child { border-bottom: none; }


.metric .label { color: var(--fg-muted); }

/* Big number display */
.big-num {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);              /* Terminal: datos en mono */
  font-variant-numeric: tabular-nums;
}

/* ═══ LOGIN ═══ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);      /* Terminal: sharp corners */
  padding: 32px;
  width: min(100%, 380px);
}
.login-card h2 {
  margin-bottom: 24px;
  text-align: center;
}


.login-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
}

.login-card .form-group { margin-bottom: 16px; }

/* ═══ TOAST ═══ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-size: 0.85rem;
  z-index: var(--z-toast);
  animation: toast-in 0.3s ease;
}

.toast-success { border-left: 4px solid var(--green); }
.toast-error { border-left: 4px solid var(--red); }
.toast-warning { border-left: 4px solid var(--yellow); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ EMPTY STATE (F2 4.7) ═══ */
.empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  color: var(--fg-muted);
  border: 1px dashed var(--elev-border-1);
  border-radius: var(--radius);      /* Terminal: sharp corners */
  background: var(--bg-subtle);
}

.empty .icon { opacity: 0.5; color: var(--fg-dim); } /* icono Lucide hereda color */
.empty-title {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}
.empty-body {
  font-size: var(--fs-sm);
  max-width: 40ch;
  margin: 0 auto var(--space-md);
}

/* ═══ SKELETONS (F2 4.8 — versión canónica: sheen, no "respiración") ═══ */
.skeleton {
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  transform: translateX(-100%);
  animation: skeleton-sheen 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes skeleton-sheen {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* ═══ SCROLL PROGRESS ═══ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  z-index: 999;
  transition: width 0.1s linear;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .header-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  .header-nav.open { display: flex; }
  .footer .container { flex-direction: column; text-align: center; }
  .form-row { flex-direction: column; }
}

/* ═══ UTILITIES ═══ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--fg-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }

.hidden { display: none !important; }
.visible { display: block; }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-0 { margin-top: 0; }    .mb-0 { margin-bottom: 0; }
.mt-sm { margin-top: var(--space-sm); }  .mb-sm { margin-bottom: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }  .mb-md { margin-bottom: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }  .mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }  .mb-xl { margin-bottom: var(--space-xl); }

.w-full { width: 100%; }

/* Print styles */
@media print {
  .no-print { display: none !important; }
  body { background: var(--bg-card) !important; color: black !important; }
  .card, .feature-card, .stat-card, .pricing-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}

/* ═══════════════════════════════════════════════════════════
   nav-dropdown — Más ▾ links (Golpe 930)
   Shows dropdown content on hover + click fallback for mobile */
.nav-dropdown { position:relative; display:inline-block; }
.nav-dropdown-content {
  display:none; position:absolute; top:100%; right:0;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius,8px); padding:8px 0; min-width:200px; z-index:1100;
}
.nav-dropdown-content a {
  display:block; padding:8px 16px; color:var(--text-muted,var(--fg-muted));
  text-decoration:none; font-size:0.82rem; white-space:nowrap;
}
.nav-dropdown-content a:hover { background:var(--bg-hover,rgba(0, 137, 237, 0.06)); color:var(--text,var(--color-text)); } /* fallback */
.nav-dropdown-content a:hover { background:var(--bg-hover,oklch(0.62 0.18 250 / 0.06)); color:var(--text,var(--color-text)); }
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.open .nav-dropdown-content { display:block; }
.nav-dropdown:focus-within .nav-dropdown-content { display:block; }
@media(hover:none) {
  .nav-dropdown:hover .nav-dropdown-content { display:none; }
  .nav-dropdown.open .nav-dropdown-content { display:block; }
}

/* ═══ Geometric background particles (Golpe 1684) ═══ */
.bg-particles {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none;
}
.bg-particles .particle {
  position: absolute;
  border: 1px solid color-mix(in oklch, var(--gold) 22%, transparent);
  border: 1px solid rgba(224, 170, 8, 0.22);
  border-radius: 4px;
  animation: float-particle 18s linear infinite;
}
.bg-particles .particle:nth-child(1) { width: 32px; height: 32px; left: 8%; top: 30%; animation-delay: 0s; }
.bg-particles .particle:nth-child(2) { width: 20px; height: 20px; left: 25%; top: 65%; animation-delay: -3s; }
.bg-particles .particle:nth-child(3) { width: 40px; height: 40px; left: 75%; top: 20%; animation-delay: -7s; }
.bg-particles .particle:nth-child(4) { width: 24px; height: 24px; left: 88%; top: 50%; animation-delay: -11s; }
.bg-particles .particle:nth-child(5) { width: 16px; height: 16px; left: 50%; top: 80%; animation-delay: -15s; }
.bg-particles .particle:nth-child(6) { width: 28px; height: 28px; left: 60%; top: 40%; animation-delay: -5s; }
.bg-particles .particle:nth-child(7) { width: 14px; height: 14px; left: 15%; top: 45%; animation-delay: -13s; }
.bg-particles .particle:nth-child(8) { width: 18px; height: 18px; left: 92%; top: 35%; animation-delay: -1s; }

@keyframes float-particle {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.85; }
  90%  { opacity: 0.85; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-particles .particle { animation: none; }
}

/* ═══ Terminal: scanline overlay for cards — opt-in via .card-scanline (Golpe 1685) ═══ */
.card-scanline {
  position: relative;
}
.card-scanline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 1px,
    var(--line-glow) 1px, var(--line-glow) 2px
  );
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}
