/* CEREBRO // portal — estilo "terminal premium": negro casi puro,
   cards con borde sutil, micro-labels mono uppercase, un solo acento. */

:root {
  --bg: #0a0a0b;
  --panel: #101013;
  --panel-2: #141417;
  --line: #212126;
  --line-2: #2b2b31;
  --txt: #efefec;
  --mut: #8a8a90;
  --dim: #6e6e75;
  --acc: #ff4a2d;
  --acc-dim: rgba(255, 74, 45, 0.55);
  --mono: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; }

body {
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, #18181c 1px, transparent 1.5px);
  background-size: 26px 26px;
  color: var(--txt);
  font-family: var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--acc); color: #0a0a0b; }

/* Foco visible para navegación por teclado (accesibilidad básica). */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 4px;
}

.micro {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mut);
}

/* ---------- header ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 40px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 6px;
  height: 6px;
  background: var(--acc);
  box-shadow: 9px 0 0 var(--acc), 0 9px 0 var(--txt), 9px 9px 0 var(--acc);
  margin: 0 9px 9px 0;
}
.brand-name { font-family: var(--mono); font-weight: 700; letter-spacing: 0.34em; font-size: 15px; }
.brand-domain { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--dim); }
.top-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.clock { color: var(--txt); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mut);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--panel);
  overflow-wrap: anywhere; /* emails largos en pantallas angostas */
  max-width: 100%;
}
.chip-dot { width: 6px; height: 6px; background: var(--acc); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.logout {
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.logout:hover { color: var(--acc); border-color: var(--acc); }

/* ---------- layout ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

/* ---------- hero ---------- */
.hero { padding: 38px 40px 34px; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.7; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--acc);
  margin-right: 8px;
  animation: pulse 2s infinite;
}
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 650; letter-spacing: -0.01em; margin: 26px 0 8px; }
.hero h1 em { font-style: normal; color: var(--acc); }
.date { margin-bottom: 28px; }

/* reloj pixel */
.pix-clock { --ps: 9px; display: flex; gap: calc(var(--ps) * 1.4); margin-bottom: 36px; }
.pix-digit { display: grid; grid-template-columns: repeat(3, var(--ps)); grid-auto-rows: var(--ps); gap: calc(var(--ps) * 0.32); }
.pix-digit i { display: block; }
.pix-digit i.on { background: var(--txt); }
.pix-clock .pix-digit:nth-child(3) { animation: blink 1s steps(1) infinite; }
.pix-clock .pix-digit:nth-child(3) i.on { background: var(--acc); }
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------- mission control strip (CER-19) ---------- */
.mc-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 8px;
}
.mc-tile {
  background: rgba(16, 16, 19, 0.65);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  min-width: 0;
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}
.mc-tile:hover {
  background: rgba(20, 20, 24, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
}
.mc-tile.has-pending {
  border-color: rgba(232, 185, 62, 0.35);
  background: linear-gradient(180deg, rgba(232, 185, 62, 0.05), rgba(16, 16, 19, 0.7));
}
.mc-tile.has-pending:hover {
  border-color: rgba(232, 185, 62, 0.6);
  box-shadow: 0 4px 20px rgba(232, 185, 62, 0.08);
}
.mc-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mc-tile-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mut);
  font-weight: 600;
}
.mc-tile-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  display: inline-block;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.mc-tile-dot.ok {
  background: #3ddc84;
  box-shadow: 0 0 6px rgba(61, 220, 132, 0.45);
}
.mc-tile-dot.amber {
  background: #e8b93e;
  box-shadow: 0 0 6px rgba(232, 185, 62, 0.45);
}
.mc-tile-dot.down {
  background: var(--acc);
  box-shadow: 0 0 6px rgba(255, 74, 45, 0.5);
}
.mc-tile-dot.offline {
  background: var(--dim);
  opacity: 0.5;
}
.mc-tile-dot.pulse {
  animation: pulse 2s infinite;
}
.mc-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.mc-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--txt);
  line-height: 1.1;
  transition: opacity 0.2s;
}
.mc-unit {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.12em;
}
.mc-delta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1;
}
.mc-delta.delta-up {
  color: #e8b93e;
  background: rgba(232, 185, 62, 0.1);
  border: 1px solid rgba(232, 185, 62, 0.25);
}
.mc-delta.delta-down {
  color: #3ddc84;
  background: rgba(61, 220, 132, 0.1);
  border: 1px solid rgba(61, 220, 132, 0.25);
}
.mc-delta.delta-flat {
  color: var(--dim);
  background: rgba(255, 255, 255, 0.04);
}
.mc-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--mut);
  background: var(--bg);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-badge-ok {
  color: #3ddc84;
  border-color: rgba(61, 220, 132, 0.35);
  background: rgba(61, 220, 132, 0.08);
}
.mc-badge-amber {
  color: #e8b93e;
  border-color: rgba(232, 185, 62, 0.4);
  background: rgba(232, 185, 62, 0.1);
}
.mc-badge-down {
  color: var(--acc);
  border-color: var(--acc-dim);
  background: rgba(255, 74, 45, 0.1);
}
.mc-chip-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--acc);
  background: rgba(255, 74, 45, 0.12);
  border: 1px solid var(--acc-dim);
  border-radius: 6px;
  padding: 3px 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.mc-chip-link:hover {
  background: rgba(255, 74, 45, 0.22);
  border-color: var(--acc);
  transform: translateX(2px);
  box-shadow: 0 0 10px rgba(255, 74, 45, 0.2);
}
.mc-tile-foot {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 16px;
}
.mc-sub-label {
  color: var(--dim);
  letter-spacing: 0.16em;
  font-size: 9.5px;
  flex-shrink: 0;
}
.mc-sub-val {
  color: var(--mut);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Sparkline de gasto 7 días (CER-20) */
.mc-sparkline {
  width: 100%;
  height: 38px;
  flex: none;
  opacity: 0.95;
}
.mc-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.mc-sparkline .mc-spark-line {
  fill: none;
  stroke: #e8b93e;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.mc-sparkline .mc-spark-fill {
  fill: url(#mc-spend-spark-fill);
}
.mc-sparkline .mc-spark-dot {
  fill: #e8b93e;
}

/* Animación sutil de actualización (flash 200ms) */
@keyframes mcFlash {
  0% {
    opacity: 0.35;
    filter: brightness(1.6);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}
.mc-flash {
  animation: mcFlash 0.2s ease-out;
}

/* Gasto del mes por socio (CER-23): lista compacta bajo el strip, oculta
   hasta que /api/metrics trae spend_by_person con al menos una fila. */
.mc-by-person {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-by-person-label {
  color: var(--dim);
}
.mc-by-person-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.mc-by-person-row {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.mc-by-person-name {
  color: var(--txt);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mc-by-person-val {
  color: var(--mut);
}

/* ---------- grilla de cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 20px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 5px;
  height: 5px;
  background: var(--acc);
  opacity: 0.9;
}
.card:hover {
  border-color: var(--acc);
  transform: translateY(-3px);
  box-shadow: 0 10px 34px rgba(255, 74, 45, 0.09);
}
.card-head { display: flex; justify-content: space-between; margin-bottom: 30px; }
.card-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--mut);
  background: var(--bg);
  transition: color 0.25s, border-color 0.25s;
}
.card:hover .card-icon { color: var(--acc); border-color: var(--acc-dim); }
.card-icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card p { font-size: 13px; line-height: 1.55; color: var(--mut); margin-bottom: 26px; }
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.card-arrow { font-family: var(--mono); color: var(--dim); transition: color 0.25s, transform 0.25s; }
.card:hover .card-arrow { color: var(--acc); transform: translateX(3px); }

/* ---------- footer ---------- */
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 40px 34px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- login ---------- */
.login-wrap { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 38px 34px 32px;
  position: relative;
}
.login-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 5px;
  height: 5px;
  background: var(--acc);
}
.login-logo {
  width: 8px;
  height: 8px;
  background: var(--acc);
  box-shadow:
    11px 0 0 var(--acc), 22px 0 0 var(--txt),
    0 11px 0 var(--txt), 11px 11px 0 var(--acc), 22px 11px 0 var(--acc);
  margin-bottom: 45px;
}
.login-card h1 { font-size: 22px; font-weight: 620; margin: 10px 0 4px; }
.login-sub { margin-bottom: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 8px; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 74, 45, 0.12); }
.btn {
  width: 100%;
  margin-top: 8px;
  background: var(--acc);
  color: #0d0503;
  border: 0;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 14px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.login-error {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--acc);
  border: 1px solid rgba(255, 74, 45, 0.4);
  background: rgba(255, 74, 45, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}
.shake { animation: shake 0.5s; }
.shake .field input { border-color: var(--acc); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.login-foot { margin-top: 26px; text-align: center; color: var(--dim); }

/* ---------- nav del portal ---------- */
.top-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top-nav a {
  color: var(--mut);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.top-nav a:hover { color: var(--acc); border-color: var(--acc-dim); }
.top-nav a[aria-current="page"] { color: var(--acc); border-color: var(--line-2); }

/* ---------- páginas internas (agentes / aprobaciones) ---------- */
.page-head { padding: 30px 34px 26px; }
.page-head h1 { font-size: clamp(22px, 3vw, 32px); font-weight: 650; margin: 14px 0 10px; }
.page-sub { font-size: 13.5px; line-height: 1.6; color: var(--mut); max-width: 640px; }
.page-sub a, .status-detail a { color: var(--acc); text-decoration: none; }
.page-sub a:hover, .status-detail a:hover { text-decoration: underline; }
.page-actions { margin-top: 22px; }
.crumb { color: var(--mut); text-decoration: none; }
.crumb:hover { color: var(--acc); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--bg);
}
.tag-acc { color: var(--acc); border-color: var(--acc-dim); }

.form-card { padding: 30px 34px; max-width: 720px; }
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--txt);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 74, 45, 0.12); }
.field-static { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn-inline { width: auto; margin-top: 0; padding: 11px 22px; display: inline-block; text-decoration: none; text-align: center; }
.btn-ghost {
  background: transparent;
  color: var(--mut);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { color: var(--acc); border-color: var(--acc-dim); filter: none; }

.notice {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--txt);
  border: 1px solid var(--line-2);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px 14px;
}
.empty { padding: 26px 4px; color: var(--dim); }
.grid .empty { grid-column: 1 / -1; } /* empty state full-width, no celda huérfana */
.count-pill { color: var(--acc); }

/* ---------- overlay "ejecutando" ---------- */
.espera {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 11, 0.88);
  padding: 24px;
}
.espera[hidden] { display: none; }
.espera-box {
  max-width: 420px;
  text-align: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 38px 34px;
}
.espera-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--acc);
  margin-bottom: 22px;
  animation: pulse 1s infinite;
}
.espera-title { color: var(--txt); margin-bottom: 12px; }
.espera-msg { line-height: 1.8; text-transform: none; letter-spacing: 0.06em; }

/* ---------- status del run ---------- */
.status {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px 18px;
}
.status-dot { width: 8px; height: 8px; margin-top: 4px; background: var(--txt); flex: none; }
.status-ok { border-color: var(--line-2); }
.status-ok .status-dot { background: var(--txt); }
.status-pending { border-color: var(--acc-dim); }
.status-pending .status-dot { background: var(--acc); animation: pulse 2s infinite; }
.status-title { color: var(--txt); margin-bottom: 6px; }
.status-detail { font-size: 13px; line-height: 1.6; color: var(--mut); }

/* ---------- output markdown ---------- */
.output-card { padding: 26px 30px; }
.output-head { margin-bottom: 14px; color: var(--dim); }
.md { font-size: 14px; line-height: 1.7; color: var(--txt); }
.md h3, .md h4, .md h5, .md h6 { margin: 22px 0 8px; font-weight: 620; letter-spacing: -0.01em; }
.md h3 { font-size: 19px; }
.md h4 { font-size: 16px; }
.md h5, .md h6 { font-size: 14px; }
.md h3:first-child, .md h4:first-child, .md p:first-child { margin-top: 0; }
.md p { margin: 0 0 12px; color: var(--txt); }
.md ul, .md ol { margin: 0 0 12px 22px; }
.md li { margin-bottom: 5px; }
.md strong { color: var(--acc); font-weight: 650; }
.md code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
.md pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 12px;
}
.md pre code { background: none; border: 0; padding: 0; }

/* ---------- cola de aprobaciones ---------- */
.approval-card { padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; }
.approval-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.approval-agent { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--acc); }
.approval-preview { font-size: 13px; line-height: 1.6; color: var(--mut); }
.approval-details summary {
  cursor: pointer;
  color: var(--mut);
  padding: 8px 0;
  border-top: 1px solid var(--line);
  transition: color 0.2s;
}
.approval-details summary:hover { color: var(--acc); }
.approval-details[open] summary { margin-bottom: 14px; color: var(--acc); }
.approval-details pre.inputs {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--mut);
  overflow-x: auto;
  margin: 0 0 16px;
}
.approval-actions { display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.approval-actions form { margin: 0; }
.approval-actions button:disabled { opacity: 0.45; cursor: default; }

/* ---------- CTAs y decisiones ---------- */
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.decisions-card { padding: 22px 26px; }
.decisions-list { display: flex; flex-direction: column; gap: 10px; }
.decision-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.decision-row:last-child { border-bottom: 0; padding-bottom: 0; }
.decision-id { color: var(--txt); }
.decision-when { margin-left: auto; color: var(--dim); }
.espera-actions { margin-top: 22px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .mc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .top, main, footer { padding-left: 18px; padding-right: 18px; }
  .hero { padding: 26px 22px; }
  .pix-clock { --ps: 6px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  .page-head, .form-card { padding: 22px 20px; }
  .output-card, .approval-card { padding: 20px 18px; }
}
@media (max-width: 520px) {
  .mc-strip { grid-template-columns: 1fr; gap: 10px; }
  .mc-num { font-size: 20px; }
}

/* ---------- sonda de salud por card (GET /api/health) ---------- */
.card-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dim, #555);
  opacity: 0.5;
  transition: background 0.4s, opacity 0.4s, box-shadow 0.4s;
}
.card-status[data-status="ok"] {
  background: #3ddc84;
  opacity: 1;
  box-shadow: 0 0 8px rgba(61, 220, 132, 0.45);
}
.card-status[data-status="down"] {
  background: var(--acc, #ff4a2d);
  opacity: 1;
  box-shadow: 0 0 8px rgba(255, 74, 45, 0.5);
  animation: pulse 2s infinite;
}
.hero-status.degraded i { background: #e8b93e; }
.hero-status.down i { background: var(--acc, #ff4a2d); }
