@charset "UTF-8";
.crm-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin: 0.2rem 0 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}
.crm-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  font-size: 0.86rem;
  border: 1px solid transparent;
}
.crm-nav a:hover {
  background: var(--hot);
  color: var(--fg);
}
.crm-nav a.aqui {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}

.pill.ok {
  background: color-mix(in srgb, var(--green) 18%, transparent);
  color: var(--green);
  font-weight: 700;
}
.pill.ojo {
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  color: #8a5a00;
  font-weight: 700;
}
.pill.info {
  background: color-mix(in srgb, var(--cielo, #85CEE4) 26%, transparent);
}
.pill.apagada {
  background: var(--hot);
  color: var(--faint);
}

@media (prefers-color-scheme: dark) {
  .pill.ojo {
    color: var(--amber);
  }
}
.crm-lista {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
}
.crm-lista li {
  padding: 0.32rem 0;
  border-bottom: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.crm-lista li:last-child {
  border-bottom: 0;
}

tr.crm-suelto td {
  background: color-mix(in srgb, var(--amber) 7%, transparent);
}

tr.crm-gana td {
  background: color-mix(in srgb, var(--green) 12%, transparent);
  font-weight: 700;
}

.crm-motivo {
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 3px solid var(--amber);
  padding: 0.4rem 0.7rem;
  margin-top: 0.6rem;
  background: color-mix(in srgb, var(--amber) 8%, transparent);
}

.crm-extracto {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.82rem;
}

td.n, th.n {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tfoot td {
  border-top: 2px solid var(--line);
}

td .sub {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
  max-width: 26rem;
}

td .sub.crm-origen {
  font-style: italic;
}

.crm-renombra {
  display: inline;
  margin-left: 0.3rem;
}
.crm-renombra > summary {
  display: inline;
  list-style: none;
  cursor: pointer;
  color: var(--faint);
  font-size: 0.85rem;
  padding: 0 0.2rem;
  border-radius: 4px;
}
.crm-renombra > summary::-webkit-details-marker {
  display: none;
}
.crm-renombra > summary:hover {
  color: var(--green);
  background: var(--hot);
}
.crm-renombra[open] > summary {
  color: var(--green);
}

.crm-renombra-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.35rem 0 0.2rem;
}
.crm-renombra-form input[type=text] {
  font-size: 0.85rem;
  padding: 0.25rem 0.45rem;
  min-width: 12rem;
}
.crm-renombra-form .b-go {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
}
.crm-renombra-form .vacio {
  font-size: 0.75rem;
}

.crm-siguiente {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.8rem 0;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: color-mix(in srgb, var(--green) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 25%, transparent);
}
.crm-siguiente form {
  display: inline;
  margin: 0;
}

.crm-anadir {
  margin-top: 0.8rem;
}

.crm-linea {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin: 0.5rem 0;
}
.crm-linea label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex: 1 1 14rem;
}
.crm-linea label.corto {
  flex: 0 1 7rem;
}
.crm-linea label.opt {
  flex-direction: row;
  align-items: center;
  flex: 0 0 auto;
}

.crm-amano {
  margin-top: 0.6rem;
}
.crm-amano > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
}

tr.crm-apagado td {
  color: var(--faint);
}

.crm-lista label.opt {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
}

.crm-subnav {
  display: flex;
  gap: 0.3rem;
  margin: 0 0 0.8rem;
}
.crm-subnav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.84rem;
  border: 1px solid var(--line);
}
.crm-subnav a.aqui {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}

.crm-matriz td label.opt {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  margin: 0.15rem 0.9rem 0.15rem 0;
  font-size: 0.85rem;
  min-height: auto;
}

.crm-matriz-caja {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow-x: auto;
  margin: 0.6rem 0;
}
.crm-matriz-caja table {
  width: 100%;
  border-collapse: collapse;
}
.crm-matriz-caja td, .crm-matriz-caja th {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.enlinea-sel.crm-sel-ancho {
  max-width: 16rem;
}

body.crm {
  --lado: #2E343D;
  --lado-2: #3F4652;
  --lado-txt: rgba(255,255,255,.74);
  --ok: #67AE3A;
  --warn: #EFA635;
  --bad: #C8553D;
  --sky: #85CEE4;
  --papel: #FFFFFF;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(133, 206, 228, 0.16), transparent 60%), radial-gradient(900px 400px at -10% 110%, rgba(103, 174, 58, 0.08), transparent 60%), var(--bg);
  background-attachment: fixed;
}

.crm-app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.crm-lado {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--lado-2) 0%, var(--lado) 100%);
  color: #fff;
  padding: 1.1rem 0.75rem 1rem;
  overflow-y: auto;
}

.crm-marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.55rem 1.1rem;
  text-decoration: none;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 0.7rem;
}

.crm-marca-logo {
  height: 26px;
  width: auto;
  display: block;
}

.crm-marca-mod {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.85);
}

.crm-menu {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.crm-menu-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.35rem 0;
}
.crm-menu-grupo + .crm-menu-grupo {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.crm-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.52rem 0.7rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--lado-txt);
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}
.crm-menu a .ico {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.85;
}
.crm-menu a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.crm-menu a.aqui {
  background: rgba(103, 174, 58, 0.18);
  color: #fff;
  font-weight: 700;
}
.crm-menu a.aqui::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ok);
}
.crm-menu a.aqui .ico {
  opacity: 1;
  color: #A6D98A;
}
.crm-menu a:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

.crm-menu-pie {
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.crm-cuerpo {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.crm-arriba {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  padding: 0.75rem max(16px, 1.6rem);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.crm-arriba h1 {
  font-size: 1.22rem;
  letter-spacing: 0.01em;
}

.crm-nuevo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  color: #fff;
  background: var(--ok);
  padding: 0.42rem 0.8rem 0.42rem 0.6rem;
  border-radius: 7px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 4px 12px rgba(103, 174, 58, 0.28);
}
.crm-nuevo .ico {
  width: 16px;
  height: 16px;
}
.crm-nuevo:hover {
  filter: brightness(1.05);
}

.crm-modulos {
  display: flex;
  gap: 0.15rem;
  font-size: 0.78rem;
}
.crm-modulos a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}
.crm-modulos a:hover {
  background: var(--hot);
  color: var(--fg);
}
.crm-modulos a.aqui {
  color: var(--ok);
  font-weight: 700;
  background: rgba(103, 174, 58, 0.1);
}
.crm-modulos a.luego {
  opacity: 0.4;
}

.crm-yo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--line);
}
.crm-yo form {
  margin: 0;
  display: inline;
}

.crm-yo-ini {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--lado-2), var(--ok));
}

.crm-yo-txt {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 0.8rem;
}
.crm-yo-txt small {
  color: var(--muted);
  font-size: 0.72rem;
}

.crm-salir {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 0.3rem;
  border-radius: 6px;
  cursor: pointer;
}
.crm-salir .ico {
  width: 17px;
  height: 17px;
  display: block;
}
.crm-salir:hover {
  background: var(--hot);
  color: var(--fg);
}

.crm-principal {
  padding: 1.3rem max(16px, 1.6rem) 2.5rem;
  max-width: 84rem;
  width: 100%;
}

.crm-pie {
  margin-top: 3rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--faint);
}

body.crm .aviso {
  margin: 0 0 1rem;
}

body.crm .tbox {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(63, 70, 82, 0.06), 0 6px 20px rgba(63, 70, 82, 0.06);
  border: 1px solid var(--line);
}

body.crm th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

body.crm td {
  font-size: 0.86rem;
}

body.crm tbody tr {
  transition: background 0.12s;
}

body.crm tbody tr:hover td {
  background: color-mix(in srgb, var(--sky) 8%, transparent);
}

body.crm a.opencell {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}
body.crm a.opencell:hover {
  color: var(--ok);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.crm .pill {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  white-space: nowrap;
  background: var(--hot);
  color: var(--muted);
}
body.crm .pill.ok {
  background: rgba(103, 174, 58, 0.14);
  color: #3F7D1C;
}
body.crm .pill.ojo {
  background: rgba(239, 166, 53, 0.18);
  color: #94600B;
}
body.crm .pill.mal {
  background: rgba(200, 85, 61, 0.13);
  color: #A33D27;
}
body.crm .pill.info {
  background: rgba(133, 206, 228, 0.26);
  color: #2A6F86;
}
body.crm .pill.apagada {
  background: var(--inset);
  color: var(--faint);
}

@media (prefers-color-scheme: dark) {
  body.crm .pill.ok {
    color: #A6D98A;
  }
  body.crm .pill.ojo {
    color: var(--warn);
  }
  body.crm .pill.mal {
    color: #F0A08E;
  }
  body.crm .pill.info {
    color: var(--sky);
  }
}
@media (max-width: 860px) {
  .crm-app {
    grid-template-columns: 1fr;
  }
  .crm-lado {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .crm-marca {
    border: 0;
    margin: 0;
    padding: 0 0.4rem 0 0.2rem;
  }
  .crm-marca-logo {
    height: 20px;
  }
  .crm-menu, .crm-menu-grupo {
    flex-direction: row;
    padding: 0;
    gap: 0.1rem;
  }
  .crm-menu-grupo + .crm-menu-grupo {
    border: 0;
  }
  .crm-menu a {
    white-space: nowrap;
    padding: 0.42rem 0.55rem;
    font-size: 0.8rem;
  }
  .crm-menu a.aqui::before {
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    bottom: -0.1rem;
    width: auto;
    height: 2px;
  }
  .crm-menu-pie {
    margin: 0;
    border: 0;
    padding: 0;
  }
  .crm-arriba {
    position: static;
    padding: 0.6rem 16px;
  }
  .crm-modulos, .crm-yo-txt {
    display: none;
  }
  .crm-nuevo {
    font-size: 0.8rem;
    padding: 0.38rem 0.65rem 0.38rem 0.5rem;
  }
  .crm-principal {
    padding: 1rem 16px 2rem;
  }
}
.crm-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 2px rgba(63, 70, 82, 0.06);
  overflow: hidden;
}

.crm-cifra {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1.1rem 1rem;
  text-decoration: none;
  color: var(--fg);
  border-right: 1px solid var(--line);
  transition: background 0.15s;
}
.crm-cifra::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--line);
}
.crm-cifra:hover {
  background: var(--inset);
}
.crm-cifra.activa {
  background: color-mix(in srgb, var(--sky) 14%, transparent);
}
.crm-cifra:last-child {
  border-right: 0;
}

.crm-cifra-neutro::before {
  background: var(--lado-2);
}

.crm-cifra-warn::before {
  background: var(--warn);
}

.crm-cifra-sky::before {
  background: var(--sky);
}

.crm-cifra-bad::before {
  background: var(--bad);
}

.crm-cifra-quieta::before {
  background: var(--ok);
}

.crm-cifra-quieta:hover {
  background: none;
}

.crm-cifra-tit {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.crm-cifra-num {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.crm-cifra-bad .crm-cifra-num {
  color: var(--bad);
}

.crm-papel {
  position: relative;
  overflow: hidden;
  background: var(--papel);
  color: #3F4652;
  border-radius: 4px;
  padding: 3.6rem 2.6rem 2.2rem;
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: 0 1px 1px rgba(63, 70, 82, 0.06), 0 10px 30px rgba(63, 70, 82, 0.12), 0 30px 60px -30px rgba(63, 70, 82, 0.25);
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  aspect-ratio: auto;
}

.crm-cinta {
  position: absolute;
  top: 22px;
  left: -46px;
  width: 170px;
  transform: rotate(-45deg);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.32rem 0;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.crm-cinta-gris {
  background: #8A929E;
}
.crm-cinta-sky {
  background: #3E9BBA;
}
.crm-cinta-ok {
  background: var(--ok);
}
.crm-cinta-mal {
  background: var(--bad);
}

.crm-papel-cab {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.crm-papel-logo {
  height: 36px;
  width: auto;
  margin-top: 0.3rem;
}

.crm-papel-tit {
  text-align: right;
}

.crm-papel-tipo {
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.crm-papel-ref {
  color: #6B7280;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.crm-papel-saldo {
  margin-top: 0.8rem;
}
.crm-papel-saldo small {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.crm-papel-saldo b {
  font-size: 1.2rem;
}

.crm-papel-emisor {
  margin-top: 1rem;
  font-size: 0.78rem;
}

.crm-papel-partes {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
}

.crm-papel-cliente small {
  display: block;
  color: #6B7280;
}
.crm-papel-cliente b {
  display: block;
  font-size: 0.95rem;
}

.crm-papel-fechas {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.2rem 1.6rem;
  margin: 0;
  align-self: flex-end;
}
.crm-papel-fechas dt {
  color: #6B7280;
  text-align: right;
}
.crm-papel-fechas dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.crm-papel-asunto {
  margin-top: 1.3rem;
}
.crm-papel-asunto small {
  color: #6B7280;
}

body.crm .crm-papel-lineas {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.3rem;
  font-size: 0.82rem;
}
body.crm .crm-papel-lineas th {
  background: #3F4652;
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.78rem;
  padding: 0.55rem 0.6rem;
  text-align: left;
}
body.crm .crm-papel-lineas td {
  padding: 0.6rem;
  border-bottom: 1px solid #E5E7EB;
  vertical-align: top;
  background: transparent !important;
}
body.crm .crm-papel-lineas small {
  display: block;
  color: #6B7280;
  font-size: 0.72rem;
}
body.crm .crm-papel-lineas .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.crm .crm-papel-totales {
  margin: 0.6rem 0 0 auto;
  border-collapse: collapse;
  min-width: 260px;
}
body.crm .crm-papel-totales td {
  padding: 0.35rem 0.6rem;
  text-align: right;
  background: transparent !important;
  font-size: 0.84rem;
}
body.crm .crm-papel-totales tr.total td {
  font-weight: 700;
  background: #F3F4F2 !important;
  padding-block: 0.55rem;
}
body.crm .crm-papel-totales .n {
  font-variant-numeric: tabular-nums;
}

.crm-papel-nota {
  margin-top: 1.4rem;
  font-size: 0.76rem;
}

.crm-papel-bloque {
  margin-top: 1.2rem;
}
.crm-papel-bloque h4 {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 400;
}
.crm-papel-bloque p {
  margin: 0;
  font-size: 0.76rem;
}

@media (max-width: 640px) {
  .crm-papel {
    padding: 3.8rem 1rem 1.4rem;
  }
  .crm-papel-cab {
    flex-wrap: wrap;
  }
  .crm-papel-logo {
    height: 24px;
  }
  .crm-papel-tipo {
    font-size: 1.35rem;
  }
  body.crm .crm-papel-lineas {
    font-size: 0.72rem;
  }
  body.crm .crm-papel-lineas th, body.crm .crm-papel-lineas td {
    padding: 0.4rem 0.25rem;
  }
  body.crm .crm-papel-lineas .n {
    white-space: normal;
  }
  .crm-papel-fechas {
    align-self: flex-start;
  }
  .crm-papel-fechas dt, .crm-papel-fechas dd {
    text-align: left;
  }
}
.crm-volver {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}
.crm-volver:hover {
  color: var(--fg);
}

.crm-doc-cab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 0.9rem;
}
.crm-doc-cab .crm-volver {
  flex-basis: 100%;
}

.crm-doc-id {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.crm-doc-id h2 {
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.crm-doc-id h2.tachado {
  text-decoration: line-through;
  color: var(--faint);
}

.crm-doc-quien {
  font-size: 0.88rem;
}
.crm-doc-quien a {
  color: var(--fg);
  font-weight: 700;
}

.crm-herramientas {
  display: flex;
  flex-wrap: wrap;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(63, 70, 82, 0.05);
}
.crm-herramientas form {
  margin: 0;
  display: contents;
}

.crm-herr {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.8rem;
  font-size: 0.82rem;
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.crm-herr .ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.crm-herr:hover {
  background: var(--inset);
}
.crm-herr:hover .ico {
  color: var(--ok);
}
.crm-herr:last-child {
  border-right: 0;
}

.crm-herr-suave {
  color: var(--muted);
}

.crm-lineas-ed .crm-herr {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
}

body.crm .crm-siguiente {
  margin: 0 0 1.1rem;
  padding: 0.75rem 1rem;
  gap: 0.6rem 0.9rem;
  background: linear-gradient(90deg, rgba(103, 174, 58, 0.1), rgba(133, 206, 228, 0.1));
  border: 1px solid rgba(103, 174, 58, 0.25);
  border-radius: 10px;
  font-size: 0.86rem;
}
body.crm .crm-siguiente b {
  color: var(--fg);
}

.crm-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.4rem;
  align-items: start;
}

.crm-doc-hoja {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.crm-doc-lado {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: sticky;
  top: 72px;
}

@media (max-width: 1180px) {
  .crm-doc {
    grid-template-columns: minmax(0, 1fr);
  }
  .crm-doc-lado {
    position: static;
  }
}
.crm-caja {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(63, 70, 82, 0.05);
}
.crm-caja h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.crm-caja > summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
}

.crm-peligro[open] {
  border-color: rgba(200, 85, 61, 0.35);
}

.crm-datos {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.38rem 0.9rem;
  margin: 0;
  font-size: 0.85rem;
}
.crm-datos dt {
  color: var(--muted);
}
.crm-datos dd {
  margin: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.crm-rojo {
  color: var(--bad);
}

.crm-form-lado {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.crm-form-lado fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
.crm-form-lado label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.76rem;
  color: var(--muted);
}
.crm-form-lado input, .crm-form-lado select, .crm-form-lado textarea {
  width: 100%;
}
.crm-form-lado .btn {
  align-self: flex-start;
}

.crm-dos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.crm-destinos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.3rem;
}
.crm-destinos .mono {
  font-size: 0.76rem;
  background: var(--inset);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
}

.crm-lineas-ed {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
}
.crm-lineas-ed li {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.84rem;
}
.crm-lineas-ed form {
  margin: 0;
}

.crm-num-linea {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.crm-lineas-txt {
  min-width: 0;
}
.crm-lineas-txt small {
  display: block;
}

.crm-lineas-cif {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crm-aviso-txt {
  color: #94600B;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .crm-lineas-ed li {
    grid-template-columns: 1.4rem 1fr;
  }
  .crm-lineas-ed li .crm-lineas-cif, .crm-lineas-ed li form {
    grid-column: 2;
  }
  .crm-herramientas {
    margin-left: 0;
    width: 100%;
  }
}
body.crm p.vacio {
  white-space: normal;
  max-width: 70rem;
}

.crm-ajuste {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 2px rgba(63, 70, 82, 0.05);
}
.crm-ajuste .campos {
  align-items: end;
}
.crm-ajuste label.opt {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}
.crm-ajuste .pacts {
  border-top: 0;
  padding-top: 0.3rem;
}

.crm-ajuste-cab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.crm-ajuste-cab b {
  font-size: 0.95rem;
}

body.crm .b-out {
  border-color: color-mix(in srgb, var(--fg) 25%, transparent);
}

.crm-cuenta-banco {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  margin: 0;
}
.crm-cuenta-banco label {
  flex: 1 1 9rem;
}
.crm-cuenta-banco label.corto {
  flex: 0 1 6.5rem;
}

.crm-botones {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.crm-botones form {
  margin: 0;
}

.crm-informes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.crm-informes-lista {
  list-style: none;
  margin: 0;
  padding: 0;
}
.crm-informes-lista li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line);
}
.crm-informes-lista li:last-child {
  border-bottom: 0;
}
.crm-informes-lista a {
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
}
.crm-informes-lista a:hover {
  color: var(--ok);
  text-decoration: underline;
}
.crm-informes-lista .vacio {
  font-size: 0.78rem;
}

.crm-periodo {
  margin: 0 0 0 auto;
  align-items: flex-end;
}
.crm-periodo label {
  flex: 0 1 9rem;
}

body.crm tfoot td {
  background: linear-gradient(var(--inset), var(--inset)), var(--surface);
}

.crm-informe th, .crm-informe td {
  padding: 0.6rem 0.8rem;
}
.crm-informe td.vacio {
  color: var(--faint);
}

.crm-emitir {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin: 0;
  width: 100%;
}

.crm-historico {
  flex-basis: 100%;
  font-size: 0.82rem;
}
.crm-historico > summary {
  cursor: pointer;
  color: var(--muted);
}
.crm-historico .crm-linea {
  margin: 0.4rem 0 0;
}
.crm-historico .vacio {
  font-size: 0.74rem;
  margin: 0.2rem 0 0;
}

body.crm .campos .pill {
  white-space: normal;
  display: inline-block;
  line-height: 1.35;
}

body.crm thead th:not(:has(.ht)) {
  padding: 0.55rem 0.7rem;
}

.crm-app {
  background: linear-gradient(to right, var(--lado) 236px, transparent 236px);
}

@media (max-width: 860px) {
  .crm-app {
    background: none;
  }
}
.crm-doc-id {
  min-width: 0;
  max-width: 100%;
}

.crm-doc-quien {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  gap: 0.3rem;
  align-items: baseline;
}

.crm-corta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 40rem;
  display: inline-block;
  vertical-align: bottom;
}

body.crm select, body.crm input, body.crm textarea {
  max-width: 100%;
}

.crm-linea label {
  min-width: 0;
}

.crm-linea select {
  width: 100%;
}

.crm-doc-quien {
  flex-wrap: wrap;
}

.crm-doc-quien > a {
  flex: none;
}

.crm-corta {
  flex: 1 1 12rem;
}

body.crm .tira-der {
  min-width: 0;
  flex-wrap: wrap;
}

body.crm .tira-der .atajo {
  white-space: normal;
}

@media (hover: none), (max-width: 640px) {
  body.crm .tira-der .atajo {
    display: none;
  }
}
body.crm .bar > span, body.crm .bar .vacio, body.crm .tools .vacio,
body.crm .crm-siguiente > span, body.crm .crm-siguiente .vacio {
  white-space: normal;
  min-width: 0;
}

.crm-subnav {
  flex-wrap: wrap;
}

.crm-app {
  grid-template-columns: 252px minmax(0, 1fr);
  background: linear-gradient(to right, var(--lado) 252px, transparent 252px);
}

.crm-marca {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem 1.1rem;
}

.crm-marca-logo {
  height: 38px;
  width: auto;
  max-width: 100%;
}

.crm-papel-logo {
  height: 38px;
}

@media (max-width: 860px) {
  .crm-app {
    background: none;
    grid-template-columns: minmax(0, 1fr);
  }
  .crm-marca {
    flex-direction: row;
    align-items: center;
    padding: 0 0.4rem 0 0.2rem;
    flex: none;
  }
  .crm-marca-logo {
    height: 38px;
  }
}
body.crm input[type=number], body.crm input[type=file] {
  font: inherit;
  font-size: 0.84rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.34rem 0.5rem;
  max-width: 100%;
}

.crm-pago-nuevo {
  max-width: 56rem;
}

.crm-form-pago {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.crm-form-pago label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.crm-form-pago input, .crm-form-pago select, .crm-form-pago textarea {
  width: 100%;
}
.crm-form-pago .pacts {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.crm-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.8rem;
}

.crm-adjuntar input[type=file] {
  padding: 0.5rem;
  background: var(--inset);
  border-style: dashed;
}

.crm-adjuntos {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}
.crm-adjuntos li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
}
.crm-adjuntos a {
  font-weight: 700;
  color: var(--fg);
}

.crm-adjunto-img {
  flex-basis: 100%;
  max-width: 100%;
  max-height: 22rem;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

@media (max-width: 860px) {
  .crm-app {
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }
  .crm-lado {
    align-self: start;
  }
  .crm-arriba {
    gap: 0.5rem 0.8rem;
  }
  .crm-arriba h1 {
    font-size: 1.05rem;
    flex: 1 1 auto;
    min-width: 0;
  }
}
.crm-extracto {
  flex-wrap: wrap;
  max-width: 100%;
}
.crm-extracto input[type=file] {
  min-width: 0;
  flex: 1 1 12rem;
}

.crm-menus {
  display: contents;
}

@media (max-width: 860px) {
  .crm-lado {
    flex-wrap: wrap;
    overflow: visible;
    padding: 0.5rem 16px 0.3rem;
    row-gap: 0.25rem;
  }
  .crm-marca {
    flex: 1 0 100%;
    padding: 0;
  }
  .crm-menus {
    display: flex;
    flex: 1 0 100%;
    min-width: 0;
    gap: 0.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 0.15rem;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 2.2rem), transparent);
  }
  .crm-menus::-webkit-scrollbar {
    display: none;
  }
  .crm-menus .crm-menu {
    flex: none;
  }
  .crm-menu a {
    padding: 0.45rem 0.6rem;
  }
}
.crm-enlace {
  width: 100%;
  font-size: 0.74rem;
  padding: 0.35rem 0.5rem;
}

.crm-alertas {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.crm-alerta {
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.86rem;
  border-left: 4px solid;
}
.crm-alerta.mal {
  background: rgba(200, 85, 61, 0.1);
  border-color: var(--bad);
}
.crm-alerta.ojo {
  background: rgba(239, 166, 53, 0.14);
  border-color: var(--warn);
}
.crm-alerta.bien {
  background: rgba(103, 174, 58, 0.1);
  border-color: var(--ok);
}

.crm-saldos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

body.crm-publico {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.crm-publico-caja {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem 2rem 1.4rem;
  max-width: 30rem;
  width: 100%;
  box-shadow: 0 10px 30px rgba(63, 70, 82, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.crm-publico-caja h1 {
  font-size: 1.25rem;
}
.crm-publico-caja .crm-papel-logo {
  height: 32px;
  align-self: flex-start;
}

.crm-publico-pie {
  color: var(--faint);
  font-size: 0.74rem;
  margin: 0.6rem 0 0;
}

:root {
  --bg: #F5F7F4;
  --surface: #FFFFFF;
  --fg: #3F4652;
  --muted: rgba(63,70,82,.64);
  --faint: rgba(63,70,82,.45);
  --line: rgba(63,70,82,.14);
  --inset: rgba(63,70,82,.05);
  --hot: rgba(63,70,82,.09);
  --green: #67AE3A;
  --amber: #EFA635;
  --shadow: 0 2px 8px rgba(63,70,82,.10);
  --pop: 0 6px 24px rgba(63,70,82,.22);
  --radius: 8px;
  --sans: 'Helvetica Now Text','Helvetica Neue',Helvetica,Arial,sans-serif;
  --mono: ui-monospace,SFMono-Regular,Menlo,monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #2B3039;
    --surface: #3F4652;
    --fg: #FFFFFF;
    --muted: rgba(255,255,255,.68);
    --faint: rgba(255,255,255,.48);
    --line: rgba(255,255,255,.16);
    --inset: rgba(255,255,255,.06);
    --hot: rgba(255,255,255,.10);
    --shadow: 0 2px 10px rgba(0,0,0,.30);
    --pop: 0 6px 24px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --bg: #2B3039;
  --surface: #3F4652;
  --fg: #FFFFFF;
  --muted: rgba(255,255,255,.68);
  --faint: rgba(255,255,255,.48);
  --line: rgba(255,255,255,.16);
  --inset: rgba(255,255,255,.06);
  --hot: rgba(255,255,255,.10);
  --shadow: 0 2px 10px rgba(0,0,0,.30);
  --pop: 0 6px 24px rgba(0,0,0,.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.5;
  margin: 0;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-wrap: balance;
}

a {
  color: inherit;
}

.wrap {
  max-width: 78rem;
  margin: 0 auto;
  padding-block: 1.75rem 3rem;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

h1 {
  font-size: 1.5rem;
}

.lede {
  margin: 0.85rem 0 0;
  color: var(--muted);
  max-width: 42rem;
  font-size: 0.95rem;
}

.modulos {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.82rem;
}

.modulos a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.modulos a:hover {
  background: var(--hot);
  color: var(--fg);
}
.modulos a.aqui {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}
.modulos a.luego {
  opacity: 0.4;
  cursor: default;
}
.modulos a.luego:hover {
  background: none;
  color: var(--muted);
}

.yosoy {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  align-items: baseline;
  margin-top: 1.3rem;
  padding-block: 0.7rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.bar b {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.bar .grow {
  flex: 1 1 auto;
  min-width: 0;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.tools .spacer {
  flex: 1 1 auto;
}

#lookup {
  flex: 0 1 19rem;
  min-width: 9rem;
}

.tira {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  min-width: 0;
}

.tira-fijo {
  flex: 0 0 auto;
}

.tira-rueda {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  padding-block: 0.2rem;
}
.tira-rueda > * {
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--green);
  color: var(--fg);
  border-radius: 999px;
  padding: 0.2rem 0.3rem 0.2rem 0.6rem;
  box-shadow: var(--shadow);
}
.chip b {
  font-weight: 700;
}
.chip a, .chip button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.1rem 0.3rem;
  border-radius: 999px;
  text-decoration: none;
}
.chip a:hover, .chip button:hover {
  color: var(--fg);
  background: var(--hot);
}

.vacio {
  color: var(--faint);
  font-size: 0.8rem;
  white-space: nowrap;
}
.vacio b {
  color: var(--muted);
}

.tbox {
  margin-top: 0.9rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: min(68vh, 720px);
  overscroll-behavior: contain;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.86rem;
}

.tbox td, .tbox thead th {
  max-width: 17rem;
}

.tbox td.t-numero, .tbox td.t-fecha {
  white-space: nowrap;
}

.tbox td.t-texto {
  min-width: 6.5rem;
}

tfoot td {
  padding: 0.45rem 0.7rem;
  vertical-align: top;
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--line);
}

.total {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}
.total b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.total .lbl {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.b-quiet.puesto {
  color: var(--green);
  font-weight: 700;
}

.tbox td select, .tbox td .enlinea {
  max-width: 100%;
}

thead th {
  text-align: left;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  background: var(--surface);
  white-space: normal;
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: inset 0 -1px 0 var(--line);
  position: relative;
}

.hcell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.7rem;
}

th[data-col] .hcell {
  padding-right: 1.5rem;
}

.ht {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-wrap: balance;
}

.dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--green);
  display: none;
}

th.filtered .dot {
  display: inline-block;
}

th.filtered .ht {
  color: var(--fg);
}

.tirador {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 7px;
  cursor: col-resize;
  z-index: 6;
  touch-action: none;
}
.tirador::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  left: 3px;
  width: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.12s;
}
.tirador:hover::after {
  opacity: 1;
  background: var(--green);
}

body.redimensionando {
  cursor: col-resize;
  user-select: none;
}

.hbtns {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0.1rem;
  align-items: center;
  background: var(--surface);
  box-shadow: -8px 0 7px -5px var(--surface), -16px 0 10px -10px var(--surface);
  border-radius: 4px;
}

.hbtns .fpanel > summary .hb {
  opacity: 0.5;
  transition: opacity 0.12s;
}

.hbtns > a.hb {
  opacity: 0;
  transition: opacity 0.12s;
}

th:hover .hbtns > a.hb, th:focus-within .hbtns > a.hb {
  opacity: 1;
}

th:hover .hbtns .fpanel > summary .hb,
th:focus-within .hbtns .fpanel > summary .hb {
  opacity: 1;
}

th.sorted .hbtns > a.hb, th.open .hbtns > a.hb {
  opacity: 1;
}

th.filtered .hbtns .fpanel > summary .hb {
  opacity: 1;
}

.hb {
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.22rem 0.3rem;
  border-radius: 4px;
  font-family: var(--sans);
  text-decoration: none;
  display: inline-block;
}
.hb:hover {
  color: var(--fg);
  background: var(--hot);
}
.hb.on {
  color: #fff;
  background: var(--green);
}
.hb:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  opacity: 1;
}

tbody td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.busy {
  background: linear-gradient(90deg, var(--amber) 0 3px, transparent 3px);
}

tbody tr.run {
  background: linear-gradient(90deg, var(--green) 0 3px, transparent 3px);
}

tbody tr.done td {
  color: var(--muted);
}

td.c-nombre {
  font-weight: 700;
  min-width: 13rem;
}

tr.done td.c-nombre {
  font-weight: 400;
}

td.c-nombre .sub {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
  max-width: 26rem;
}

.mono {
  font-family: var(--mono);
}

.nw {
  white-space: nowrap;
}

td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.opencell {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.opencell:hover {
  text-decoration-color: var(--green);
}

.fpanel {
  position: relative;
}

.fpanel > summary {
  list-style: none;
  cursor: pointer;
}
.fpanel > summary::-webkit-details-marker {
  display: none;
}

.fpanel[open] > summary .hb {
  color: #fff;
  background: var(--green);
}

.panel {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 17rem;
  max-width: min(24rem, 86vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--fg);
}
.panel h3 {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.pitems {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  max-height: 14rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.26rem 0.2rem;
  border-radius: 4px;
  cursor: pointer;
}
.opt:hover {
  background: var(--hot);
}
.opt input {
  accent-color: var(--green);
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex: 0 0 auto;
}
.opt .lb {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.opt .ct {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.pacts {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

button, .btn, input[type=submit], input[type=button], input[type=reset] {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.84rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 0.36rem 0.72rem;
  transition: filter 0.12s;
  text-decoration: none;
  display: inline-block;
}
button:focus-visible, .btn:focus-visible, input[type=submit]:focus-visible, input[type=button]:focus-visible, input[type=reset]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
button[disabled], .btn[disabled], input[type=submit][disabled], input[type=button][disabled], input[type=reset][disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

.b-go {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 700;
}
.b-go:hover {
  filter: brightness(1.07);
}

.b-out {
  background: transparent;
  color: var(--fg);
  border-color: var(--line);
}
.b-out:hover {
  border-color: var(--faint);
}

.b-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--faint);
  padding: 0.24rem 0.36rem;
  font-size: 0.78rem;
}
.b-quiet:hover {
  color: var(--fg);
  background: var(--hot);
}

.b-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
}

select, input[type=text], input[type=date], input[type=email], input[type=password], textarea {
  font: inherit;
  font-size: 0.84rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.34rem 0.5rem;
  max-width: 100%;
}
select:focus-visible, input[type=text]:focus-visible, input[type=date]:focus-visible, input[type=email]:focus-visible, input[type=password]:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
}

.pie {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.pie b {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.pie .sp {
  flex: 1 1 auto;
}
.pie select {
  width: auto;
}
.pie a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
  padding: 0.1rem 0.35rem;
}
.pie a:hover {
  text-decoration: underline;
}
.pie .actual {
  color: var(--fg);
  font-weight: 700;
}

.skillbox {
  background: var(--amber);
  color: #3F4652;
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.87rem;
  line-height: 1.55;
}
.skillbox code {
  font-family: var(--mono);
  background: rgba(63, 70, 82, 0.16);
  border-radius: 5px;
  padding: 0.08rem 0.4rem;
  font-size: 0.85rem;
  word-break: break-all;
}
.skillbox h2 {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.skillbox details > summary {
  cursor: pointer;
}

.skillhead {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.skillhead .cuenta {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-left: auto;
  white-space: nowrap;
}

.sk {
  border-top: 1px solid rgba(63, 70, 82, 0.22);
}
.sk:first-child {
  border-top: 0;
}

.skbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.15rem;
}
.skbar .nm {
  font-weight: 700;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.skbar .v {
  font-family: var(--mono);
  font-size: 0.78rem;
  opacity: 0.75;
  white-space: nowrap;
}
.skbar .por {
  font-size: 0.78rem;
  opacity: 0.8;
  white-space: nowrap;
}
.skbar .por b {
  font-weight: 700;
}
.skbar .fecha {
  font-weight: 700;
  font-size: 0.78rem;
  background: rgba(63, 70, 82, 0.15);
  border-radius: 5px;
  padding: 0.12rem 0.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.skbody {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.1rem 0.15rem 0.75rem 1.35rem;
}
.skbody p {
  margin: 0;
  font-size: 0.82rem;
  max-width: 64ch;
}

.fich {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.ficha {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.ficha header {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ficha header h2 {
  flex: 1 1 16rem;
}
.ficha h2 {
  font-size: 1.25rem;
  min-width: 0;
}

.detsec h3 {
  margin: 0 0 0.4rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.detsec p {
  margin: 0 0 0.5rem;
  max-width: 62ch;
}
.detsec p:last-child {
  margin-bottom: 0;
}
.detsec + .detsec {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.pasos {
  list-style: none;
  counter-reset: p;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.pasos li {
  counter-increment: p;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.6rem;
  align-items: start;
}
.pasos li::before {
  content: counter(p);
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.pasos .pcuerpo {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pasos li > *:not(.pcuerpo) {
  grid-column: 2;
  min-width: 0;
}
.pasos .pt {
  font-weight: 700;
}
.pasos code {
  display: block;
  margin-top: 0.25rem;
  background: var(--inset);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.subl {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.subi {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--inset);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  border-left: 3px solid var(--line);
}
.subi.e-laeuft, .subi.e-pruefung {
  border-left-color: var(--amber);
}
.subi.e-fertig {
  border-left-color: var(--green);
}
.subi.e-fertig .subt {
  color: var(--muted);
  font-weight: 400;
}
.subi code {
  display: block;
  margin-top: 0.1rem;
  background: var(--surface);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.subtop {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subn {
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  font-weight: 700;
  flex: 0 0 1.1rem;
}

.subt {
  font-weight: 700;
  flex: 1 1 12rem;
  min-width: 0;
}

.subq, .sube {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.subd {
  margin: 0;
  max-width: 62ch;
}

.subm {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.subm b {
  color: var(--fg);
  font-weight: 700;
}

.shots {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.shots img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: block;
}
.shots figcaption {
  font-size: 0.8rem;
  color: var(--muted);
}

.sinimagen {
  background: var(--inset);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.sinimagen code {
  font-size: 0.74rem;
}

.tbchips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.fchip {
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 999px;
  padding: 0.26rem 0.8rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.fchip:hover {
  background: var(--hot);
}
.fchip.puesta {
  border-color: var(--green);
  color: var(--green);
  font-weight: 700;
}

.tarjetas {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr));
}

.tarj {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 3px solid var(--line);
}
.tarj.libre {
  border-left-color: var(--amber);
}
.tarj.mia {
  border-left-color: var(--green);
}
.tarj h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}
.tarj h3 a {
  text-decoration: none;
}
.tarj .meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.tarj .pie {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.barrita {
  height: 5px;
  border-radius: 3px;
  background: var(--inset);
  overflow: hidden;
}
.barrita i {
  display: block;
  height: 100%;
  background: var(--green);
}

.pregn {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}
.pregn.cero {
  color: var(--faint);
  font-weight: 400;
}

.sinasig {
  font-size: 0.78rem;
  color: var(--amber);
  font-weight: 700;
}

.marcapreg {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
}

.hilos {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hilo {
  background: var(--inset);
  border-radius: 6px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-left: 3px solid var(--amber);
}
.hilo.cerrada {
  border-left-color: var(--line);
  opacity: 0.75;
}
.hilo.contestada {
  border-left-color: var(--green);
}
.hilo .hcab {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.hilo .hcab b {
  color: var(--fg);
}
.hilo .hest {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}
.hilo .hasunto {
  font-weight: 700;
}

.msg1 {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.86rem;
}
.msg1 .qn {
  font-size: 0.76rem;
  color: var(--muted);
}
.msg1 .qn b {
  color: var(--fg);
}
.msg1 p {
  margin: 0;
  white-space: pre-wrap;
  max-width: 62ch;
}

.aviso {
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}
.aviso.bien {
  background: rgba(103, 174, 58, 0.14);
  border-left: 3px solid var(--green);
}
.aviso.ojo {
  background: rgba(239, 166, 53, 0.18);
  border-left: 3px solid var(--amber);
}

.empty {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.2rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.empty strong {
  color: var(--fg);
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.4rem;
}

.trail {
  margin-top: 2.3rem;
}
.trail h2 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
}
.trail ol {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}
.trail li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.55rem;
  font-size: 0.83rem;
  color: var(--muted);
  padding-block: 0.35rem;
  border-bottom: 1px solid var(--line);
}
.trail time {
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  flex: 0 0 9.5rem;
}
.trail b {
  color: var(--fg);
}

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.acceso {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.pista {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.acceso-caja {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 1.6rem;
  width: 100%;
  max-width: 23rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.acceso-caja label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}
.acceso-caja input {
  font-size: 16px;
}

@media (hover: none) {
  .hbtns > a.hb, .hbtns .fpanel > summary .hb {
    opacity: 1;
  }
  .hcell {
    min-height: 46px;
  }
  th[data-col] .hcell {
    padding-right: 4.2rem;
  }
  .panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-width: none;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 80vh;
    overflow-y: auto;
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
  }
  .opt {
    min-height: 46px;
  }
  .tarjetas {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
:root {
  --cielo: #85CEE4;
  --tira-alto: 24px;
}

@media (hover: none) {
  :root {
    --tira-alto: 40px;
  }
}
.tira {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  min-width: 0;
  line-height: 1;
}
.tira > *, .tira .tira-rueda > * {
  display: flex;
  align-items: center;
}
.tira .btn, .tira button, .tira .chip, .tira .vchip, .tira .pieza, .tira .vacio, .tira .atajo, .tira summary > .btn {
  min-height: var(--tira-alto);
  line-height: 1;
}

.tira-fijo {
  flex: 0 0 auto;
}

.tira-der {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tira .b-ic {
  padding-block: 0;
}

.tira .chip {
  padding-block: 1px;
}

.tira-rueda {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scroll-padding-inline: 1.7rem;
  padding-block: 0.2rem;
}
.tira-rueda > * {
  flex: 0 0 auto;
}
.tira-rueda::-webkit-scrollbar {
  height: 6px;
}
.tira-rueda::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}

.tira-vistas {
  margin-top: 1rem;
}

.chip {
  border-color: var(--cielo);
}
.chip b {
  font-weight: 700;
  color: color-mix(in srgb, var(--cielo) 55%, var(--fg));
}

th.filtered .dot {
  background: var(--cielo);
}

.vchip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.24rem 0.75rem;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.vchip:hover {
  background: var(--hot);
}
.vchip.puesta {
  border-color: var(--green);
  color: var(--green);
}
.vchip .vcam {
  font-weight: 400;
  color: var(--amber);
}

.pieza {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pieza .lbl {
  color: var(--muted);
  padding: 0.2rem 0.05rem 0.2rem 0.6rem;
}
.pieza .niv {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
  border-radius: 999px;
}
.pieza .niv:hover, .pieza .niv:focus-within {
  background: var(--hot);
}
.pieza .sep {
  color: var(--faint);
  padding: 0 0.22rem;
  font-size: 0.95rem;
}
.pieza a {
  opacity: 0;
  width: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.12s;
  color: var(--muted);
  text-decoration: none;
}
.pieza .niv:hover a, .pieza .niv:focus-within a {
  opacity: 1;
  width: auto;
  padding: 0 0.12rem;
}

@media (hover: none) {
  .pieza a {
    opacity: 1;
    width: auto;
    padding: 0.2rem 0.3rem;
  }
}
.atajo {
  color: var(--faint);
  font-size: 0.78rem;
  white-space: nowrap;
}
.atajo b {
  color: var(--muted);
}

.sombra {
  display: none;
  opacity: 0.7;
  font-size: 0.7rem;
}

body.mayus .hbtns > a.hb {
  opacity: 1;
}
body.mayus .hb .sombra {
  display: inline;
}
body.mayus .hb {
  color: var(--green);
}
body.mayus .atajo, body.mayus .atajo b {
  color: var(--green);
}

.plegar {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.74rem;
  padding: 0.18rem 0.4rem;
  border-radius: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.plegar:hover {
  background: var(--hot);
  color: var(--fg);
}
.plegar::before {
  content: "⌄";
  display: inline-block;
  transition: transform 0.14s;
}
.plegar[aria-expanded=true]::before {
  transform: rotate(180deg);
}
.plegar[aria-expanded=true] .cerrado {
  display: none;
}

.fpanel > summary {
  list-style: none;
  cursor: pointer;
}
.fpanel > summary::-webkit-details-marker {
  display: none;
}

.fpanel[open] > summary .hb {
  color: #fff;
  background: var(--green);
}

.panel.flotando {
  position: fixed;
  z-index: 60;
}

.panel {
  min-width: 17rem;
  max-width: min(24rem, 90vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--pop);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.5;
}
.panel form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.panel .psec {
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
.panel .miss {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0;
}
.panel .estado {
  margin: 0 0 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.panel .estado b {
  color: var(--fg);
}

.colpanel {
  min-width: 18rem;
  max-height: 70vh;
  overflow-y: auto;
}

.collista {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.colrow {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.colrow form {
  flex: 0 0 auto;
}
.colrow form:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.colrow .colbtn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--fg);
  padding: 0.26rem 0.2rem;
  border-radius: 4px;
  font-size: 0.84rem;
}
.colrow .colbtn:hover {
  background: var(--hot);
}
.colrow .colbtn .marca {
  color: var(--green);
  width: 1rem;
}
.colrow .colbtn.apagada {
  color: var(--muted);
}
.colrow .colbtn.apagada .marca {
  color: var(--faint);
}
.colrow .opt.locked {
  flex: 1 1 auto;
  cursor: not-allowed;
  opacity: 0.75;
}
.colrow .opt.locked .ct {
  color: var(--cielo);
}
.colrow .mv {
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 4px;
  font-size: 0.8rem;
}
.colrow .mv:hover:not([disabled]) {
  color: var(--fg);
  background: var(--hot);
}
.colrow .mv[disabled] {
  opacity: 0.3;
}

th.th-cols, td.c-cols {
  width: 3rem;
  padding-left: 0.25rem;
  padding-right: 0.35rem;
}

thead th.th-cols {
  position: sticky;
  right: 0;
  background: var(--surface);
  z-index: 7;
}

.b-ic {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.cuentita {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  font-weight: 700;
}

.xtxt {
  font-size: 0.76rem;
}

.ht .agarre {
  display: inline-block;
  width: 11px;
  margin-right: 1px;
  opacity: 0;
  transition: opacity 0.12s;
  font-size: 11px;
  color: var(--faint);
}

th:hover .ht .agarre, th:focus-within .ht .agarre {
  opacity: 0.6;
}

.hb sup {
  font-size: 0.6rem;
  vertical-align: super;
}

.enlinea {
  display: inline;
}

.enlinea-sel {
  font-size: 0.8rem;
  padding: 0.18rem 1.1rem 0.18rem 0.35rem;
  max-width: 9rem;
  border-color: transparent;
  background-color: transparent;
}
.enlinea-sel:hover {
  border-color: var(--line);
  background: var(--surface);
}
.enlinea-sel:focus {
  border-color: var(--green);
  background: var(--surface);
}

.vlista {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.vfila {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 5px;
}
.vfila.puesta {
  background: var(--inset);
}
.vfila .vsel {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  color: var(--fg);
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.3rem 0.4rem;
  border-radius: 5px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vfila .vsel:hover {
  background: var(--hot);
}
.vfila .vren {
  flex: 0 0 auto;
  display: flex;
}
.vfila .vren input {
  width: 5rem;
  font-size: 0.76rem;
}
.vfila .ic {
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
  padding: 0.24rem 0.3rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
}
.vfila .ic:hover {
  color: var(--fg);
  background: var(--hot);
}
.vfila .ic.malo:hover {
  color: #fff;
  background: #b1400a;
}

.vnota {
  margin: 0;
  font-size: 0.76rem;
  color: var(--faint);
}

.campos {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.campos label {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}
.campos label span {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
}
.campos label.ancho {
  grid-column: 1/-1;
}
.campos input, .campos select, .campos textarea {
  width: 100%;
}

.buscador {
  display: contents;
}

.detsec.acordado {
  border-left: 3px solid var(--green);
  padding-left: 0.9rem;
  background: var(--inset);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-block: 0.8rem;
  padding-right: 0.9rem;
}
.detsec.acordado p {
  max-width: 68ch;
}
.detsec.acordado strong {
  font-weight: 700;
}

.detsec.contexto {
  border-left: 3px solid var(--cielo);
  padding-left: 0.9rem;
  background: color-mix(in srgb, var(--cielo) 9%, transparent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-block: 0.8rem;
  padding-right: 0.9rem;
}
.detsec.contexto p {
  max-width: 68ch;
}

.detsec.reglas .reggrupo {
  margin: 0 0 1rem;
  padding: 0.1rem 0 0.1rem 0.85rem;
  border-left: 3px solid var(--cielo);
}
.detsec.reglas .reghead {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cielo) 60%, var(--fg));
}
.detsec.reglas .reglist {
  margin: 0;
  padding: 0;
  list-style: none;
}
.detsec.reglas .reglist li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: baseline;
  gap: 0.1rem 0.15rem;
  margin: 0 0 0.3rem;
  line-height: 1.45;
}
.detsec.reglas .regn {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--muted);
}
.detsec.reglas .pcuerpo {
  min-width: 0;
  overflow-wrap: anywhere;
}
.detsec.reglas .regnota {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.tcat {
  table-layout: fixed;
}
.tcat thead th {
  padding: 0.4rem 0.5rem;
  white-space: normal;
  line-height: 1.25;
}
.tcat td {
  padding: 0.3rem 0.5rem;
  vertical-align: middle;
}
.tcat tbody tr + tr td {
  border-top: 1px solid var(--line);
}
.tcat input[type=text] {
  width: 100%;
}
.tcat code {
  font-size: 0.78rem;
}
.tcat .tcacc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  align-items: center;
}

.filanueva {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.filanueva input[type=text] {
  flex: 1;
  min-width: 0;
}

.nodisp {
  font-size: 0.78rem;
  color: var(--muted);
  cursor: help;
}

.pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 3px;
  font-size: 0.68rem;
  background: color-mix(in srgb, var(--cielo) 22%, transparent);
  color: color-mix(in srgb, var(--cielo) 55%, var(--fg));
}

.d-none {
  display: none;
}

.btn.apagado {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
  color: var(--muted);
}

td.c-note {
  font-weight: 400;
}

.desc {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 24rem;
  line-height: 1.4;
}
