/* ============================================================
   COMPONENTES · piezas reutilizables
   ============================================================ */

/* --- Botones --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 40px;
  padding: 0 var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn__icon { width: 18px; height: 18px; }
.btn__icon svg { width: 100%; height: 100%; stroke-width: 1.7; }

.btn--icon { width: 40px; padding: 0; flex-shrink: 0; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--electric-bright), var(--electric));
  border-color: transparent;
  box-shadow: 0 6px 18px -8px rgba(47,107,255,0.6);
}
.btn--primary:hover { filter: brightness(1.06); color: #fff; }

/* --- Panel base ------------------------------------------ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.panel__head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line);
}
.panel__title { font-family: var(--font-display); font-size: var(--t-md); font-weight: 600; }
.panel__body { padding: var(--s-6); }
.panel__head .mono-label { margin-left: auto; }

/* --- Marcas de esquina (retículo de precisión) ----------- */
/* Detalle de firma: pequeñas escuadras en las esquinas de un panel */
.reticle { position: relative; }
.reticle::before, .reticle::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border-color: var(--line-strong); border-style: solid; pointer-events: none;
}
.reticle::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.reticle::after  { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

/* --- Tarjeta de herramienta (acceso) --------------------- */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-5);
  min-height: 148px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease),
              background var(--dur-2) var(--ease);
  text-align: left;
  width: 100%;
}
.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.tool-card:hover .tool-card__icon {
  color: var(--electric-bright);
  border-color: color-mix(in srgb, var(--electric) 40%, var(--line));
}
/* barrido de luz muy sutil al pasar el cursor */
.tool-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 160px at var(--mx, 80%) -10%, var(--electric-soft), transparent 70%);
  opacity: 0; transition: opacity var(--dur-2) var(--ease);
  pointer-events: none;
}
.tool-card:hover::after { opacity: 1; }

.tool-card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.tool-card__icon svg { width: 22px; height: 22px; stroke-width: 1.6; }
.tool-card__title { font-family: var(--font-display); font-size: var(--t-md); font-weight: 600; }
.tool-card__desc { font-size: var(--t-sm); color: var(--text-3); line-height: var(--lh-snug); }
.tool-card__foot { margin-top: auto; display: flex; align-items: center; gap: var(--s-2); }

/* --- Badge de estado ------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--text-3);
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.badge--soon { color: var(--text-3); }
.badge--live { color: var(--electric-bright); border-color: color-mix(in srgb, var(--electric) 32%, var(--line)); }
.badge--live .badge__dot { background: var(--electric); box-shadow: 0 0 0 3px var(--electric-soft); animation: pulse 2.6s var(--ease) infinite; }

/* --- Chip ------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2);
}

/* --- Divisor con etiqueta -------------------------------- */
.section-label {
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-10) 0 var(--s-5);
}
.section-label:first-child { margin-top: 0; }
.section-label__line { flex: 1; height: 1px; background: var(--line); }
