/**
 * SNIPDGEN — el panel.
 *
 * Rojo #ff1738, negro y blanco; verde solo para el dinero que entra y un rosa
 * claro para el que sale (el rojo es la marca: no puede significar «pierdes»).
 * Todo cuelga de `.sd-panel` y los reseteos van a peso cero (`:where`), para no
 * pisar a la terminal ni a PARTIS.
 */

.sd-suelto {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0b0b0c;
}

:where(.sd-panel) :where(button) {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
}

:where(.sd-panel) :where(input) {
  font: inherit;
  color: inherit;
}

:where(.sd-panel) :where(ul) {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sd-panel {
  --sd-rojo: #ff1738;
  --sd-rojo-suave: rgb(255 23 56 / 12%);
  --sd-negro: #0b0b0c;
  --sd-caja: #141416;
  --sd-caja-2: #1b1b1e;
  --sd-linea: #26262a;
  --sd-texto: #ffffff;
  --sd-tenue: #9a9aa1;
  --sd-muy-tenue: #5f5f66;
  --sd-gana: #19ff94;
  --sd-pierde: #ff8a8a;

  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background:
    linear-gradient(180deg, rgb(255 23 56 / 9%), transparent 140px),
    var(--sd-negro);
  color: var(--sd-texto);
  font-family: Geist, Inter, -apple-system, system-ui, sans-serif;
  font-size: 13px;
  overflow: hidden;
}

.sd-panel [data-signo="mas"] {
  color: var(--sd-gana);
}

.sd-panel [data-signo="menos"] {
  color: var(--sd-pierde);
}

/* ─── Barra de arriba: solo la marca y el saldo ─── */

.sd-barra {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.sd-barra-marca {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-saldo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
  font-variant-numeric: tabular-nums;
}

.sd-saldo b {
  font-size: 13px;
  font-weight: 700;
}

.sd-saldo i {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-style: normal;
  font-size: 10px;
  color: var(--sd-tenue);
}

.sd-saldo:hover {
  border-color: #3a3a40;
}

/* ─── Inicio ─── */

.sd-inicio {
  position: relative;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 0 0;
}

/* Las cifras del día bajan junto al menú: el hueco vacío se queda donde crecen los chips. */
.sd-inicio > .sd-mini {
  margin-top: auto;
}

/* Emergente a la medida: las cifras van justo bajo los chips (el alto lo pone el contenido). */
.sd-panel[data-ajustado] .sd-inicio > .sd-mini {
  margin-top: 0;
}

.sd-panel[data-vista="inicio"] .sd-cuerpo {
  display: flex;
  flex-direction: column;
}

/* «Reset PnL»: pequeño, a la derecha, bajo el aro. */
.sd-reset {
  position: absolute;
  right: 0;
  top: 336px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid #2c2c31;
  background: rgb(18 18 20 / 88%);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sd-tenue);
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.sd-reset svg {
  width: 11px;
  height: 11px;
}

.sd-reset:hover {
  color: #fff;
  border-color: #4a4a52;
}

.sd-reset[data-hecho] {
  color: var(--sd-gana);
  border-color: rgb(25 255 148 / 45%);
}

/* El botón central: el escáner (control.css). En Inicio la cabecera flota encima de sus
   esquinas transparentes (si no, el cuerpo con scroll le cortaba el aro), y el control queda
   donde en el master de Codex: a 41 px del borde del panel. */

.sd-panel[data-vista="inicio"] .sd-barra {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  pointer-events: none;
}

.sd-panel[data-vista="inicio"] .sd-barra > * {
  pointer-events: auto;
}

.sd-panel[data-vista="inicio"] .sd-cuerpo {
  padding-top: 0;
}

.sd-inicio > .sd-ctl {
  margin: 35px 0 -22px;
}

/* La línea de lo último que ha pasado. */

.sd-ticker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  font-size: 12px;
  color: var(--sd-tenue);
  text-align: center;
}

.sd-ticker b {
  color: #fff;
  font-weight: 700;
}

.sd-ticker > button {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
  white-space: nowrap;
  overflow: hidden;
}

.sd-ticker > button b[data-tipo="entrada"] {
  color: var(--sd-rojo);
  letter-spacing: 0.06em;
}

.sd-ticker > button b[data-tipo="escalon"],
.sd-ticker > button b[data-tipo="cierre"] {
  color: var(--sd-gana);
  letter-spacing: 0.06em;
}

.sd-ticker em {
  font-style: normal;
  font-weight: 700;
  color: #fff;
}

.sd-ticker span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-ticker-logo {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 8px;
}

.sd-ticker-punto {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sd-muy-tenue);
}

.sd-ticker[data-modo="vivo"] .sd-ticker-punto {
  background: var(--sd-rojo);
  animation: sd-radar 1.4s ease-out infinite;
}

.sd-ticker[data-modo="freno"] .sd-ticker-punto {
  background: #f5b740;
}

@keyframes sd-radar {
  0% {
    box-shadow: 0 0 0 0 rgb(255 23 56 / 60%);
  }
  100% {
    box-shadow: 0 0 0 8px rgb(255 23 56 / 0%);
  }
}

/* Las posiciones, en chips. */

.sd-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}

.sd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
  font-size: 12px;
}

.sd-chip[data-gana] {
  border-color: rgb(46 229 157 / 35%);
}

.sd-chip:hover {
  border-color: #fff;
}

.sd-chip b {
  font-weight: 700;
}

.sd-chip i {
  font-style: normal;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sd-chip-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 8px;
}

.sd-chips-vacio {
  font-size: 12px;
  color: var(--sd-muy-tenue);
}

.sd-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin-top: 4px;
  border-top: 1px solid var(--sd-linea);
  padding-top: 12px;
}

.sd-mini span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sd-mini b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sd-mini i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--sd-tenue);
}

.sd-pagina {
  padding-bottom: 16px;
}

/* La ficha de una posición. */

.sd-ficha header {
  gap: 10px;
  justify-content: flex-start;
}

.sd-ficha header > button {
  margin-left: auto;
  color: var(--sd-tenue);
}

.sd-ficha-nombre {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sd-ficha-nombre i {
  font-style: normal;
  font-size: 11px;
  color: var(--sd-tenue);
}

.sd-ficha-pnl {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  padding: 18px 14px 6px;
  font-variant-numeric: tabular-nums;
}

.sd-ficha-pnl b {
  font-size: 30px;
  font-weight: 800;
}

.sd-ficha-pnl i {
  font-style: normal;
  font-size: 14px;
  font-weight: 700;
}

.sd-ficha-datos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 14px 0;
}

.sd-ficha-datos div {
  padding: 8px;
  border-radius: 8px;
  background: var(--sd-caja);
  border: 1px solid var(--sd-linea);
  text-align: center;
}

.sd-ficha-datos dt {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-tenue);
}

.sd-ficha-datos dd {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
}

.sd-ficha-datos em {
  font-style: normal;
  color: var(--sd-gana);
}

.sd-ficha-botones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px;
}

.sd-ficha-botones button {
  height: 40px;
  border-radius: 10px;
  background: #fff;
  color: #0b0b0c;
  font-weight: 800;
  text-align: center;
}

.sd-ficha-botones button[data-peligro] {
  background: var(--sd-rojo);
  color: #fff;
}

.sd-ficha-botones button:disabled {
  opacity: 0.4;
}

/* ─── El cajón del feed ─── */

.sd-cajon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 64px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--sd-linea);
  background: var(--sd-negro);
  box-shadow: 0 -12px 30px rgb(0 0 0 / 45%);
  transform: translateY(104%);
  visibility: hidden;
  transition:
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 320ms;
}

.sd-cajon[data-abierto] {
  transform: none;
  visibility: visible;
  border-top-color: var(--sd-rojo);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sd-cajon-asa {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding-top: 7px;
  font-size: 11px;
  color: var(--sd-tenue);
}

.sd-cajon-asa b {
  color: #fff;
  letter-spacing: 0.08em;
}

.sd-cajon-raya {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #3a3a40;
}

.sd-cajon-cuerpo {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 14px 80px;
  scrollbar-width: thin;
  scrollbar-color: #2c2c31 transparent;
}

/* ─── Pestañas ─── */

.sd-tabs {
  display: flex;
  gap: 2px;
  margin: 10px 14px 0;
  padding: 3px;
  border-radius: 10px;
  background: var(--sd-caja);
  border: 1px solid var(--sd-linea);
}

.sd-tabs button {
  flex: 1;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--sd-tenue);
  transition: background 140ms ease, color 140ms ease;
}

.sd-tabs button:hover {
  color: var(--sd-texto);
}

.sd-tabs button[data-activo] {
  background: #fff;
  color: #0b0b0c;
}

.sd-cuerpo {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: #2c2c31 transparent;
}

.sd-vacio {
  margin: 14px 0;
  font-size: 12px;
  color: var(--sd-tenue);
  text-align: center;
}

.sd-sec-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sd-tenue);
}

.sd-sec-cab:first-child {
  margin-top: 4px;
}

/* ─── Feed ─── */

.sd-sec-nota {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sd-muy-tenue);
}

.sd-radar-fila + .sd-radar-fila {
  margin-top: 0;
}

.sd-radar-fila > button {
  padding: 8px 10px;
}

.sd-filtros {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.sd-filtros button {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--sd-linea);
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-tenue);
}

.sd-filtros button[data-activo] {
  border-color: var(--sd-rojo);
  color: #fff;
  background: var(--sd-rojo-suave);
}

.sd-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sd-feed-fila {
  animation: sd-entra 380ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sd-entra {
  from {
    opacity: 0;
    transform: translateY(-6px);
    background: rgb(255 23 56 / 20%);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sd-feed-fila > button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
  transition: border-color 140ms ease, background 140ms ease;
}

.sd-feed-fila > button:hover {
  border-color: #3a3a40;
  background: var(--sd-caja-2);
}

.sd-feed-fila[data-estado="fuera"] > button {
  opacity: 0.62;
}

.sd-feed-fila[data-estado="dentro"] > button {
  border-color: var(--sd-rojo);
  background: linear-gradient(90deg, rgb(255 23 56 / 16%), rgb(255 23 56 / 4%) 70%), var(--sd-caja);
}

.sd-feed-arriba {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sd-feed-logo,
.sd-pos-logo,
.sd-sc-logo,
.sd-cartel-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #222 center / cover no-repeat;
  font-size: 11px;
  font-weight: 700;
  color: var(--sd-tenue);
  text-transform: uppercase;
}

.sd-feed-nombre {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sd-feed-nombre b {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-feed-nombre i {
  font-style: normal;
  font-size: 11px;
  color: var(--sd-tenue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-feed-mc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.sd-feed-mc b {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sd-feed-mc i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--sd-muy-tenue);
}

.sd-nota {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 2px solid var(--sd-muy-tenue);
  color: var(--sd-tenue);
}

.sd-nota[data-nivel="medio"] {
  border-color: #fff;
  color: #fff;
}

.sd-nota[data-nivel="alto"] {
  border-color: var(--sd-rojo);
  background: var(--sd-rojo);
  color: #fff;
}

.sd-feed-abajo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.sd-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.sd-check {
  display: inline-flex;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #1f1f23;
  font-size: 10px;
  color: var(--sd-tenue);
  white-space: nowrap;
}

.sd-check b {
  font-weight: 700;
  color: var(--sd-texto);
}

.sd-check[data-estado="ok"] b {
  color: var(--sd-gana);
}

.sd-check[data-estado="mal"] {
  background: rgb(255 23 56 / 14%);
}

.sd-check[data-estado="mal"] b {
  color: var(--sd-pierde);
}

.sd-check[data-estado="nd"] b {
  color: var(--sd-muy-tenue);
}

.sd-pill {
  flex: none;
  max-width: 46%;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--sd-linea);
  color: var(--sd-tenue);
}

.sd-pill[data-tono="pass"] {
  color: #fff;
  border-color: #3a3a40;
}

.sd-pill[data-tono="watch"] {
  color: #f5b740;
  border-color: rgb(245 183 64 / 40%);
}

.sd-pill[data-tono="lock"] {
  color: #fff;
  border-color: var(--sd-rojo);
  animation: sd-parpadeo 0.9s steps(2, start) infinite;
}

.sd-pill[data-tono="snipe"] {
  color: #fff;
  background: var(--sd-rojo);
  border-color: var(--sd-rojo);
}

@keyframes sd-parpadeo {
  to {
    background: rgb(255 23 56 / 30%);
  }
}

.sd-sucesos li > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 0;
  border-bottom: 1px solid #1c1c20;
}

.sd-sc-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 9px;
}

.sd-sc-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.sd-sc-txt b {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sd-sucesos li[data-tipo="entrada"] .sd-sc-txt b {
  color: var(--sd-rojo);
}

.sd-sc-txt b em {
  font-style: normal;
  color: #fff;
  letter-spacing: 0;
}

.sd-sc-txt i {
  font-style: normal;
  font-size: 11px;
  color: var(--sd-tenue);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sd-sc-cifra {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.sd-sc-cifra i {
  font-style: normal;
  color: var(--sd-muy-tenue);
}

/* ─── Historial ─── */

.sd-atajos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sd-atajos button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
}

.sd-atajos button:hover {
  border-color: var(--sd-rojo);
}

.sd-atajos b {
  font-weight: 700;
}

.sd-atajos span {
  font-size: 11px;
  color: var(--sd-tenue);
}

.sd-resumen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.sd-resumen div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: var(--sd-caja);
  border: 1px solid var(--sd-linea);
}

.sd-resumen b {
  font-size: 15px;
  font-weight: 700;
}

.sd-resumen span {
  font-size: 10px;
  color: var(--sd-tenue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sd-cerrada {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 0;
  border-bottom: 1px solid #1c1c20;
  font-size: 12px;
}

.sd-cerrada b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-cerrada span {
  color: var(--sd-tenue);
  font-size: 11px;
}

.sd-cerrada-motivo {
  min-width: 56px;
  text-align: right;
}

.sd-cerrada em {
  font-style: normal;
  font-weight: 700;
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sd-hoja {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
}

.sd-hoja-velo {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 60%);
}

.sd-hoja-caja {
  position: relative;
  width: 100%;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  border-radius: 14px 14px 0 0;
  border-top: 2px solid var(--sd-rojo);
  background: var(--sd-negro);
}

.sd-hoja-caja header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sd-linea);
}

.sd-hoja-cuerpo {
  overflow-y: auto;
  padding: 12px 14px 16px;
}

/* ─── Calendario y estadísticas ─── */

.sd-cal-cab {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 11px;
  color: var(--sd-tenue);
}

.sd-cal-cab b {
  font-size: 13px;
}

.sd-cal-dias,
.sd-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.sd-cal-dias span {
  font-size: 10px;
  text-align: center;
  color: var(--sd-muy-tenue);
}

.sd-cal-celda {
  position: relative;
  min-height: 44px;
  padding: 4px;
  border-radius: 6px;
  background: var(--sd-caja);
  border: 1px solid #1d1d21;
  overflow: hidden;
}

.sd-cal-celda i {
  position: absolute;
  inset: 0;
}

.sd-cal-celda[data-signo="mas"] i {
  background: var(--sd-gana);
}

.sd-cal-celda[data-signo="menos"] i {
  background: var(--sd-rojo);
}

.sd-cal-celda b,
.sd-cal-celda em {
  position: relative;
  display: block;
  color: #fff;
}

.sd-cal-celda b {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
}

.sd-cal-celda em {
  margin-top: 6px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgb(0 0 0 / 50%);
}

.sd-tramos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.sd-tramo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: var(--sd-caja);
  border: 1px solid var(--sd-linea);
}

.sd-tramo span {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sd-tenue);
}

.sd-tramo b {
  font-size: 15px;
}

.sd-tramo i {
  font-style: normal;
  font-size: 10px;
  color: var(--sd-tenue);
}

.sd-fila-dato {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #1c1c20;
  font-size: 12px;
}

.sd-fila-dato > span:first-child {
  flex: 1;
  color: var(--sd-tenue);
}

.sd-fila-dato-n {
  min-width: 40px;
  text-align: right;
  color: var(--sd-tenue);
}

.sd-fila-dato b {
  min-width: 70px;
  text-align: right;
}

/* ─── Ajustes ─── */

.sd-grupo {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
}

.sd-grupo > header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.sd-grupo > header b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sd-grupo > header span {
  font-size: 11px;
  line-height: 1.4;
  color: var(--sd-tenue);
}

.sd-grupo-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sd-modos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sd-modos button {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-negro);
}

.sd-modos button[data-activo] {
  border-color: var(--sd-rojo);
  background: var(--sd-rojo-suave);
}

.sd-modos b {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sd-modos span {
  font-size: 11px;
  line-height: 1.35;
  color: var(--sd-tenue);
}

.sd-modos em {
  font-style: normal;
  font-size: 10px;
  color: var(--sd-muy-tenue);
}

.sd-campo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.sd-campo > span:first-child {
  color: #d6d6db;
}

.sd-campo-caja {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-negro);
}

.sd-campo-caja input {
  width: 72px;
  border: 0;
  outline: 0;
  background: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sd-campo-caja i {
  font-style: normal;
  font-size: 11px;
  color: var(--sd-tenue);
  min-width: 14px;
}

.sd-campo-caja:focus-within {
  border-color: var(--sd-rojo);
}

.sd-interruptor {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #2a2a2f;
  transition: background 140ms ease;
}

.sd-interruptor i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 140ms ease;
}

.sd-interruptor[data-on] {
  background: var(--sd-rojo);
}

.sd-interruptor[data-on] i {
  transform: translateX(14px);
}

.sd-desplegar {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--sd-rojo);
}

.sd-wallet {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.sd-wallet span {
  color: var(--sd-tenue);
}

.sd-linea {
  display: flex;
  gap: 6px;
}

.sd-linea input,
.sd-entrada-larga {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-negro);
  outline: 0;
}

.sd-linea input:focus,
.sd-entrada-larga:focus {
  border-color: var(--sd-rojo);
}

.sd-linea button {
  height: 30px;
  padding: 0 14px;
  border-radius: 7px;
  background: #fff;
  color: #0b0b0c;
  font-size: 12px;
  font-weight: 800;
}

.sd-linea button[data-peligro] {
  background: var(--sd-rojo);
  color: #fff;
}

.sd-cuenta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sd-cuenta > button:first-child {
  flex: 1;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-negro);
}

.sd-cuenta[data-activa] > button:first-child {
  border-color: var(--sd-rojo);
}

.sd-cuenta span {
  font-size: 11px;
  color: var(--sd-tenue);
}

.sd-cuenta-borrar {
  width: 28px;
  height: 28px;
  color: var(--sd-tenue);
}

.sd-sitios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sd-sitios button {
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--sd-linea);
  font-size: 11px;
  text-align: center;
  color: var(--sd-tenue);
}

.sd-sitios button[data-activo] {
  border-color: var(--sd-rojo);
  color: #fff;
}

.sd-deslizador {
  accent-color: var(--sd-rojo);
  width: 140px;
}

/* ─── Aviso ─── */

.sd-aviso {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 76px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #0b0b0c;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgb(0 0 0 / 50%);
}

.sd-aviso span {
  flex: 1;
}

/* ─── Pantalla entera (fuera de la extensión) ─── */

.sd-panel:not([data-compacto]) .sd-cuerpo {
  padding-left: 18px;
  padding-right: 18px;
}

/* ─── La ventana flotante del calendario ─── */

.sd-ventana {
  padding: 14px;
  overflow-y: auto;
}

.sd-ventana .sd-panel {
  height: auto;
  min-height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .sd-feed-fila,
  .sd-ticker[data-modo="vivo"] .sd-ticker-punto,
  .sd-pill[data-tono="lock"] {
    animation: none;
  }
}

/* ─── La píldora de abajo ─── */

.sd-cuerpo {
  padding-bottom: 80px;
}

.sd-pildora {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, 48px);
  height: 48px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid #2a2a2f;
  background: rgb(18 18 20 / 92%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgb(0 0 0 / 55%);
  transform: translateX(-50%);
}

.sd-pildora-marca {
  position: absolute;
  top: 6px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sd-rojo);
  box-shadow: 0 0 16px rgb(255 23 56 / 50%);
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.sd-pildora[data-en="feed"] .sd-pildora-marca {
  transform: translateX(48px);
}

.sd-pildora[data-en="historial"] .sd-pildora-marca {
  transform: translateX(96px);
}

.sd-pildora[data-en="ajustes"] .sd-pildora-marca {
  transform: translateX(144px);
}

.sd-pildora button {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--sd-tenue);
  text-align: center;
}

.sd-pildora button:hover {
  color: #fff;
}

.sd-pildora button[data-activo] {
  color: #fff;
}

.sd-pildora svg {
  width: 18px;
  height: 18px;
}

/* ─── Settings en apartados ─── */

.sd-ajustes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sd-apartados {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--sd-linea);
  background: var(--sd-caja);
}

.sd-apartados button {
  height: 28px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: var(--sd-tenue);
}

.sd-apartados button[data-activo] {
  background: #fff;
  color: #0b0b0c;
}

.sd-apartado {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sd-rotulo-seccion {
  margin: 4px 0 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sd-tenue);
  user-select: none;
  -webkit-user-select: none;
}

.sd-rotulo-boton {
  align-self: flex-start;
  cursor: default;
}

.sd-modos-cuatro button {
  min-height: 58px;
}

.sd-modos-cuatro span {
  font-size: 10px;
}

.sd-nota-auto {
  margin: 0;
  font-size: 11px;
  color: var(--sd-muy-tenue);
}

.sd-boton-reglas {
  align-self: stretch;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--sd-rojo);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.sd-cuentas-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 112px;
  overflow-y: auto;
}

.sd-hoja-alta {
  max-height: 92%;
}

.sd-reglas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── El menú de desarrollador ─── */

.sd-dev {
  position: absolute;
  top: 70px;
  left: 16px;
  right: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgb(255 23 56 / 70%);
  background: #050505;
  box-shadow: 0 24px 60px rgb(0 0 0 / 70%);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  animation: sd-dev-entra 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sd-dev-entra {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

.sd-dev header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--sd-rojo);
}

.sd-dev-modo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--sd-linea);
}

.sd-dev-modo[data-on] {
  border-color: var(--sd-rojo);
  background: rgb(255 23 56 / 10%);
}

.sd-dev-modo span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sd-dev-modo b {
  font-size: 13px;
  letter-spacing: 0.1em;
}

.sd-dev-modo i {
  font-style: normal;
  font-size: 10px;
  line-height: 1.45;
  color: var(--sd-tenue);
}

.sd-dev-datos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
}

.sd-dev-datos div {
  padding: 6px;
  border-radius: 6px;
  background: var(--sd-caja);
  text-align: center;
}

.sd-dev-datos dt {
  font-size: 9px;
  color: var(--sd-tenue);
}

.sd-dev-datos dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.sd-dev-borrar {
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--sd-linea);
  font-size: 11px;
  color: var(--sd-tenue);
  text-align: center;
}

