/* ============================================================
   STACK Intelligence — Base CSS
   Design tokens, reset, typography y utilidades compartidas
   entre Showcase y Command Center.
   ============================================================ */


/* ── Design Tokens ───────────────────────────────────────────
   Colores de marca PayComp — nunca usar valores hardcodeados
   fuera de este archivo.
   ──────────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --orange:      #f97316;
  --orange-2:    #fb923c;
  --orange-dim:  rgba(249, 115, 22, 0.12);
  --orange-glow: rgba(249, 115, 22, 0.40);

  --navy:        #0d1b2a;
  --navy-2:      #1a2e45;
  --navy-3:      #243b55;

  /* Semantic */
  --blue:        #3b82f6;
  --blue-2:      #60a5fa;
  --blue-dim:    rgba(59, 130, 246, 0.10);

  --green:       #22c55e;
  --green-dim:   rgba(34, 197, 94, 0.10);

  --amber:       #f59e0b;
  --amber-dim:   rgba(245, 158, 11, 0.12);

  --red:         #ef4444;
  --red-dim:     rgba(239, 68, 68, 0.10);

  /* Radii */
  --radius-sm:   6px;
  --radius:      9px;
  --radius-lg:   14px;
  --radius-xl:   18px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow:      0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);

  /* Transitions */
  --transition:  all 0.15s ease;
}


/* ── Reset ───────────────────────────────────────────────────
   Box-sizing universal + eliminar márgenes por defecto.
   ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}


/* ── Typography ──────────────────────────────────────────────
   Inter como fuente principal con fallback al sistema.
   ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ── Layout Utilities ────────────────────────────────────────
   Clases de uso general disponibles en todas las apps.
   ──────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.container--wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
}


/* ── Buttons ─────────────────────────────────────────────────
   Sistema de botones compartido. Cada app puede sobreescribir
   el color de fondo pero usa estas bases.
   ──────────────────────────────────────────────────────────── */

/* Base — todos los botones comparten esto */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

/* Orange — acción principal */
.btn--orange {
  background: var(--orange);
  color: #fff;
}
.btn--orange:hover {
  background: var(--orange-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--orange-glow);
}

/* Orange large — hero CTAs */
.btn--orange-lg {
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--orange);
  color: #fff;
  border-radius: var(--radius);
}
.btn--orange-lg:hover {
  background: var(--orange-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--orange-glow);
}

/* Ghost — acción secundaria sobre fondo oscuro */
.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* Ghost large */
.btn--ghost-lg {
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: var(--radius);
}
.btn--ghost-lg:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* Outline — sobre fondo claro */
.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(0, 0, 0, 0.18);
}
.btn--outline:hover {
  border-color: var(--navy);
  background: rgba(0, 0, 0, 0.03);
}


/* ── Badges / Tags ───────────────────────────────────────────
   Estados: live, in_progress, blocked, etc.
   ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge--green  { background: var(--green-dim);  color: var(--green); border-color: rgba(34,197,94,0.25); }
.badge--orange { background: var(--orange-dim); color: var(--orange); border-color: rgba(249,115,22,0.25); }
.badge--blue   { background: var(--blue-dim);   color: var(--blue);  border-color: rgba(59,130,246,0.20); }
.badge--amber  { background: var(--amber-dim);  color: var(--amber); border-color: rgba(245,158,11,0.25); }
.badge--red    { background: var(--red-dim);    color: var(--red);   border-color: rgba(239,68,68,0.20); }
.badge--gray   { background: rgba(100,116,139,0.10); color: #64748b; border-color: rgba(100,116,139,0.20); }


/* ── STACK Phase Badges ──────────────────────────────────────
   S T A C K  — usados en ambas apps.
   ──────────────────────────────────────────────────────────── */
.phase-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.78rem;
  color: #fff;
}
.phase-badge--s,
.phase-badge--t,
.phase-badge--a { background: var(--blue); }
.phase-badge--c,
.phase-badge--k { background: var(--orange); }


/* ── Accessibility ───────────────────────────────────────────
   Focus visible para navegación por teclado.
   ──────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
