/* Ruby Rose Studio — sistema visual
   Dark cinematográfico DCEO con el acento fucsia de Ruby Rose. */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --bg: #0a070e;
  --panel: #140d1a;
  --panel-2: #1b1224;
  --panel-3: #221630;
  --border: #2c1d38;
  --border-2: #40294f;
  --ink: #f7f2f8;
  --muted: #a695b1;
  --dim: #6f6079;

  --a1: #ff2d78;
  --a2: #c061ff;
  --cyan: #22d3ee;
  --green: #34d399;
  --gold: #f4c152;
  --red: #fb7185;

  --grad: linear-gradient(135deg, var(--a1), var(--a2));
  --radius: 16px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Aurora de fondo ------------------------------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.24;
}
.aurora i:nth-child(1) {
  width: 520px;
  height: 520px;
  background: var(--a1);
  top: -180px;
  left: -120px;
}
.aurora i:nth-child(2) {
  width: 460px;
  height: 460px;
  background: var(--a2);
  top: 20%;
  right: -160px;
  opacity: 0.18;
}
.aurora i:nth-child(3) {
  width: 380px;
  height: 380px;
  background: var(--cyan);
  bottom: -160px;
  left: 30%;
  opacity: 0.1;
}
.dotgrid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 40%, transparent 100%);
}

/* Estructura ------------------------------------------------------------ */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.side {
  border-right: 1px solid var(--border);
  background: rgba(12, 8, 16, 0.72);
  backdrop-filter: blur(14px);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* Marca del cliente. El wordmark original es #B92255, que sobre este fondo
   queda en 3.26:1 — ilegible. Se usa una variante con el MISMO tono (340°)
   y la luminosidad subida hasta 4.69:1. El carmesí original se reserva para
   superficies claras (ver .paper). */
.brand {
  padding: 2px 8px 0;
}
.brand .logo {
  display: block;
  width: 124px;
  height: auto;
}
.brand .brand-sub {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0 10px;
  margin-bottom: 8px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: 0.16s;
}
.nav button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.nav button.on {
  background: linear-gradient(90deg, rgba(255, 45, 120, 0.16), rgba(192, 97, 255, 0.06));
  border-color: rgba(255, 45, 120, 0.32);
  color: var(--ink);
}
.nav button.soon {
  opacity: 0.38;
  cursor: default;
}
.nav button.soon:hover {
  background: transparent;
  color: var(--muted);
}

/* Iconos: trazo, nunca relleno; heredan el color del contenedor. */
svg.ico {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}
.nav button.on svg.ico {
  opacity: 1;
  color: var(--a1);
}
svg.ico.sm {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
  opacity: 1;
}
svg.ico.lg {
  width: 20px;
  height: 20px;
}
svg.ico.xl {
  width: 26px;
  height: 26px;
  stroke-width: 1.5;
}
.nav button .badge {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--a1);
  color: #fff;
  font-weight: 700;
}
.nav button .badge.mute {
  background: var(--panel-3);
  color: var(--muted);
}

.side-foot {
  margin-top: auto;
  font-size: 11px;
  color: var(--dim);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  line-height: 1.5;
}
.link-traza {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.16s;
}
.link-traza:hover {
  border-color: var(--a1);
  background: rgba(255, 45, 120, 0.08);
}

.main {
  padding: 26px 32px 70px;
  max-width: 1320px;
  width: 100%;
}

/* Cabecera -------------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--a1);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a1);
  box-shadow: 0 0 10px var(--a1);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}
.topbar h1 {
  font-size: 26px;
}
.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  background: var(--panel);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.chip .dot.off {
  background: var(--dim);
  box-shadow: none;
}
.chip .dot.warn {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

/* Superficies ----------------------------------------------------------- */

.card {
  background: linear-gradient(180deg, var(--panel), rgba(15, 10, 20, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card.tight {
  padding: 14px;
}
.card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.card .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 14px;
}

.grid {
  display: grid;
  gap: 14px;
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* Rejillas asimétricas: en clase, no inline, para que el media query las
   pueda colapsar en pantallas angostas. */
.g-side {
  grid-template-columns: minmax(0, 1fr) 320px;
}
.g-tablero {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.75;
}
.tile .k {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tile .v {
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 6px;
}
.tile .n {
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
}

/* Bandeja --------------------------------------------------------------- */

.docs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.16s;
}
.doc:hover {
  border-color: var(--border-2);
  transform: translateX(2px);
  background: var(--panel-2);
}
.doc.done {
  opacity: 0.55;
}
.doc .env {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--muted);
}
.doc:hover .env {
  color: var(--a1);
  border-color: rgba(255, 45, 120, 0.4);
}
.doc .t {
  font-weight: 600;
  font-size: 14px;
}
.doc .m {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.doc .m code {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--dim);
}
.doc .r {
  text-align: right;
}
.doc .amount {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 14px;
}
.doc .when {
  font-size: 11px;
  color: var(--dim);
  margin-top: 2px;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.03em;
  border: 1px solid;
}
.tag.pend {
  color: var(--gold);
  border-color: rgba(244, 193, 82, 0.4);
  background: rgba(244, 193, 82, 0.1);
}
.tag.ok {
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.1);
}
.tag.live {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.1);
}
.tag.warn {
  color: var(--red);
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.1);
}

/* Detalle de causación --------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.paper {
  background: #f7f4f2;
  color: #1a1420;
  border-radius: 12px;
  padding: 22px 22px 36px; /* espacio inferior para el sello */
  font-size: 11.5px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  position: relative;
}
.paper h4 {
  font-size: 14px;
  color: #1a1420;
  margin-bottom: 2px;
}
.paper .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #1a1420;
  padding-bottom: 10px;
  margin-bottom: 12px;
}
.paper .meta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #5b4f63;
}
.paper .meta.nw {
  white-space: nowrap;
}
.paper .head > div:last-child {
  flex: none;
  padding-left: 12px;
}
.paper table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}
.paper th {
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b5d73;
  border-bottom: 1px solid #d6cdd8;
  padding-bottom: 5px;
}
.paper td {
  padding: 7px 0;
  border-bottom: 1px solid #ece5ee;
  vertical-align: top;
}
.paper .totals {
  margin-top: 10px;
  border-top: 2px solid #1a1420;
  padding-top: 8px;
}
.paper .totals div {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
/* Sobre papel claro sí va el carmesí original de la marca. */
.paper .cliente {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.paper .cliente img {
  width: 76px;
  height: auto;
}
.paper mark {
  background: rgba(255, 45, 120, 0.2);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
  box-shadow: inset 0 -1px 0 rgba(255, 45, 120, 0.55);
}
.paper .stamp {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a496ab;
}

.viewer-frame {
  width: 100%;
  height: 460px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #fff;
}

/* Campos extraídos ------------------------------------------------------ */

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.field {
  background: var(--panel);
  padding: 11px 13px;
}
.field .k {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field .v {
  font-weight: 600;
  margin-top: 3px;
  word-break: break-word;
}
.field .v.mono {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  font-size: 12.5px;
}
.field.wide {
  grid-column: 1 / -1;
}
.field.low {
  background: linear-gradient(180deg, rgba(244, 193, 82, 0.09), var(--panel));
}
.field.fixed {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.09), var(--panel));
}
.conf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
}
.conf .bar {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}
.conf .bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--green);
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.conf.mid .bar i {
  background: var(--gold);
}
.conf.low .bar i {
  background: var(--red);
}
.conf.mid {
  color: var(--gold);
}
.conf.low {
  color: var(--red);
}
.conf.hi {
  color: var(--green);
}

/* Validaciones ---------------------------------------------------------- */

.vals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.val {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 12.5px;
}
.val .i {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.val.ok {
  border-color: rgba(52, 211, 153, 0.28);
}
.val.ok .i {
  background: rgba(52, 211, 153, 0.16);
  color: var(--green);
}
.val.aviso {
  border-color: rgba(244, 193, 82, 0.3);
  background: linear-gradient(90deg, rgba(244, 193, 82, 0.07), var(--panel));
}
.val.aviso .i {
  background: rgba(244, 193, 82, 0.17);
  color: var(--gold);
}
.val.error {
  border-color: rgba(251, 113, 133, 0.4);
}
.val.error .i {
  background: rgba(251, 113, 133, 0.16);
  color: var(--red);
}
.val b {
  display: block;
  font-size: 12.5px;
}
.val span {
  color: var(--muted);
}

/* Tablas ---------------------------------------------------------------- */

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data th {
  text-align: left;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(44, 29, 56, 0.6);
  vertical-align: middle;
}
table.data tr:last-child td {
  border-bottom: none;
}
table.data tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.num {
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}
.tot td {
  border-top: 1px solid var(--border-2) !important;
  font-weight: 700;
  background: rgba(255, 45, 120, 0.05);
}
.scroller {
  overflow-x: auto;
}

/* Botones --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: 0.16s;
}
.btn:hover {
  border-color: var(--a1);
  background: var(--panel-3);
}
.btn.primary {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--a1);
}
.btn.primary:hover {
  filter: brightness(1.09);
}
.btn.ghost {
  background: transparent;
}
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 9px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  padding: 7px 10px;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--a1);
}
label.lbl {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 5px;
}

/* Barras y gráficas ----------------------------------------------------- */

.bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.bar-row .top {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 5px;
}
.bar-row .top span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
}
.track {
  height: 7px;
  border-radius: 4px;
  background: var(--panel-3);
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--grad);
  width: 0;
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cal {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 160px;
  padding-top: 10px;
}
.cal .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cal .col .stack {
  width: 100%;
  border-radius: 5px 5px 2px 2px;
  background: var(--grad);
  min-height: 3px;
  transition: height 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.cal .col.hot .stack {
  background: linear-gradient(180deg, var(--red), var(--a1));
}
.cal .col .d {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--dim);
  white-space: nowrap;
}
.cal .col:hover .stack {
  filter: brightness(1.3);
}

/* Timeline de proceso --------------------------------------------------- */

.flow {
  display: flex;
  gap: 0;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.flow .step {
  flex: 1;
  min-width: 128px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--panel);
  position: relative;
}
.flow .step:first-child {
  border-radius: 12px 0 0 12px;
}
.flow .step:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
}
.flow .step .n {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--dim);
}
.flow .step .l {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 3px;
}
.flow .step.done {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.1), var(--panel));
}
.flow .step.done .l {
  color: var(--green);
}
.flow .step.now {
  background: linear-gradient(180deg, rgba(255, 45, 120, 0.14), var(--panel));
  border-color: rgba(255, 45, 120, 0.4);
}

/* Toast ------------------------------------------------------------------ */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast .t {
  min-width: 280px;
  max-width: 380px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast .t.ok {
  border-color: rgba(52, 211, 153, 0.45);
}
.toast .t.err {
  border-color: rgba(251, 113, 133, 0.5);
}
.toast .t b {
  display: block;
  font-size: 13px;
}
.toast .t span {
  color: var(--muted);
  font-size: 12px;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Estados de carga ------------------------------------------------------- */

.thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.thinking .sp {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--panel-3);
  border-top-color: var(--a1);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.rv {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

.drop {
  border: 1.5px dashed var(--border-2);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  transition: 0.16s;
}
.drop.hot {
  border-color: var(--a1);
  background: rgba(255, 45, 120, 0.07);
}
.drop input {
  display: none;
}

.muted {
  color: var(--muted);
}
.dim {
  color: var(--dim);
}
.mono {
  font-family: "JetBrains Mono", monospace;
}
.right {
  text-align: right;
}
.sep {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.stack-sm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hide {
  display: none !important;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .nav {
    flex-direction: row;
  }
  .nav .eyebrow,
  .side-foot {
    display: none;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .g4,
  .g3,
  .g2,
  .g-side,
  .g-tablero {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 20px 16px 60px;
  }
}
