/* theme.css */
/* Cairo latin-ext (SIL Open Font License 1.1), alojada en el servidor */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/cairo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Cairo latin (SIL Open Font License 1.1), alojada en el servidor */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('fonts/cairo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --fondo: #ffffff;
  --panel: #ffffff;
  --borde: #d8dfe4;
  --texto: #5c6c78;
  --tenue: #5c6c78;
  --acento: #53abba;
  --critica: #b3001b;
  --relevante: #a34220;
  --anomalia: #806000;
  --ok: #217568;
  --nav: #32373c;
  --pizarra: #3b4553;
  --gris-claro: #a1afba;
  --tinta: #3d4553;
  --acento-texto: #287581;
  --superficie: #f5f7f8;
  --noche: #202a35;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 15px/1.65 "Cairo", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
a { color: var(--acento-texto); }
img { max-width: 100%; }
header {
  padding: 0;
  background: var(--nav);
  color: #ffffff;
  border: 0;
  box-shadow: none;
}

#barra .barra-interior {
  max-width: 1500px;
  min-height: 82px;
  margin: auto;
  padding: 0 40px;
  gap: 36px;
}

.marca {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.punto {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 2px;
  background: var(--acento);
  box-shadow: none;
}

.punto:after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid var(--noche);
  border-radius: 0;
  transform: rotate(45deg);
}

.barra-nav {
  align-self: stretch;
  align-items: stretch;
  gap: 4px;
}

.barra-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: #d4dce2;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
}

.barra-nav a:hover {
  color: #ffffff;
  background: #ffffff08;
}

.barra-nav a.activo {
  color: #ffffff;
  border-color: var(--acento);
  background: transparent;
}

.barra-usuario {
  margin-left: auto;
  color: #ffffff;
  text-align: right;
}

.barra-usuario small {
  display: block;
  color: #bfcbd3;
  letter-spacing: .12em;
  font-size: 11px;
}

.barra-usuario .sec {
  color: #ffffff;
  background: transparent;
  border-color: #87949f;
}

.barra-usuario .sec:hover { background: var(--pizarra); }

.page-intro {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(115deg, #202a35, #32373c);
  border-bottom: 1px solid #46525e;
}

.page-intro:after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 42%;
  opacity: .16;
  background: repeating-linear-gradient(
    135deg, transparent 0 62px, #a1afba 63px, transparent 64px 126px
  );
  mask-image: linear-gradient(90deg, transparent, #000);
  pointer-events: none;
}

.page-intro-inner {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  margin: auto;
  padding: 52px 40px 58px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--acento-texto);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.eyebrow::after,
.titulo-evidencia::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 12px;
  background: var(--acento);
}

.page-intro .eyebrow,
.acceso-hero .eyebrow { color: #75c3cf; }

.page-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1.2;
  text-transform: none;
  overflow-wrap: anywhere;
}

.page-intro p:last-child {
  max-width: 680px;
  margin: 0;
  color: #d1dbe2;
  font-size: 15px;
}

main:not(.acceso) {
  max-width: 1500px;
  margin-inline: auto;
  padding: 40px 40px 80px;
  gap: 26px;
}

.panel, .kpi, .tarjeta {
  background: var(--panel);
  border: 1px solid var(--borde);
  border-radius: 2px;
  box-shadow: none;
}

.panel { min-width: 0; padding: 28px; }

h2 {
  color: var(--tinta);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: -.4px;
  line-height: 1.35;
}

h2 small { color: var(--tenue); font-weight: 400; }
.barra-acciones h2 { font-size: 26px; margin-right: auto; }
.tenue { color: var(--tenue); }

label { color: var(--tinta); font-weight: 600; gap: 8px; }

input, select, textarea {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--tinta);
  border: 1px solid #87949f;
  border-radius: 2px;
  transition: border-color .15s, background-color .15s;
}

input::placeholder, textarea::placeholder {
  color: var(--tenue);
  opacity: 1;
}

input:hover, select:hover, textarea:hover { border-color: var(--texto); }

input:focus, select:focus, textarea:focus {
  border-color: var(--acento-texto);
  box-shadow: none;
  outline: 2px solid var(--acento-texto);
  outline-offset: 2px;
}

input[type=checkbox], input[type=radio] {
  min-height: 0;
  accent-color: var(--acento-texto);
}

button, .sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  color: #202a35;
  background: var(--acento);
  border: 1px solid var(--acento-texto);
  border-radius: 2px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}

button:hover, .sec:hover {
  color: #ffffff;
  background: var(--pizarra);
  border-color: var(--pizarra);
  box-shadow: none;
}

button:active, .sec:active { transform: none; }

.sec {
  color: var(--tinta);
  background: #ffffff;
  border-color: #87949f;
}

.sec:hover {
  color: var(--tinta);
  background: #edf3f5;
  border-color: var(--acento-texto);
}

.enlace {
  display: inline;
  min-height: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--acento-texto);
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.enlace:hover {
  color: var(--tinta);
  background: none;
  border: 0;
  box-shadow: none;
  text-decoration: underline;
}

.peligro {
  color: #982039;
  background: #fff0f2;
  border-color: #bc6c7c;
}

.peligro:hover {
  color: #ffffff;
  background: #982039;
  border-color: #982039;
  box-shadow: none;
}

button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .tarjeta:focus-visible {
  outline: 3px solid var(--acento-texto);
  outline-offset: 3px;
}

header a:focus-visible, header button:focus-visible {
  outline-color: #75c3cf;
}

button:disabled, input:disabled, select:disabled, textarea:disabled {
  color: var(--texto);
  background: #edf0f2;
  border-color: #b8c2ca;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
}

.barra-acciones {
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.barra-acciones input, .barra-acciones select, .fila input, .fila select {
  width: auto;
  max-width: 100%;
}

.barra-acciones input[type=search] {
  min-width: min(220px, 100%);
}

.kpis {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 0;
}

.kpi {
  position: relative;
  overflow: hidden;
  padding: 26px 24px;
  background: var(--pizarra);
  color: #ffffff;
  border-color: #72808d;
  border-radius: 0;
}

.kpi:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--acento);
}

.kpi .v {
  color: #ffffff;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.kpi .e {
  margin-top: 12px;
  color: #e0e6eb;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.tarjetas { gap: 22px; }

.tarjeta {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 26px;
  transition: border-color .15s, background-color .15s;
}

.tarjeta:before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  width: 60px;
  height: 2px;
  background: var(--acento);
}

.tarjeta:hover {
  border-color: var(--acento-texto);
  background: #fafcfc;
  box-shadow: none;
  transform: none;
}

.tarjeta h3 {
  margin: 6px 0 12px;
  color: var(--tinta);
  font-size: 23px;
  font-weight: 300;
  letter-spacing: -.3px;
  overflow-wrap: anywhere;
}

.tarjeta .meta {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--borde);
  line-height: 1.7;
}

.estado {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}

.estado:before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

.estado.borrador { color: #455461; background: #edf0f2; border-color: #a1afba; }
.estado.recibido { color: #245d83; background: #edf5fa; border-color: #86aec8; }
.estado.en_proceso { color: #805413; background: #fff5e5; border-color: #bd985b; }
.estado.entregado { color: #216b52; background: #edf7f1; border-color: #79af97; }
.estado.cerrado { color: #625080; background: #f3eff8; border-color: #a899c2; }

.sev {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 0;
  font-size: 12px;
  font-weight: 600;
}

.sev.critica { color: var(--critica); background: #fff0f2; }
.sev.relevante { color: var(--relevante); background: #fff2ec; }
.sev.anomalia { color: var(--anomalia); background: #fff8e3; }
.sev.ok { color: var(--ok); background: #edf7f3; }

.tabla-caja {
  max-width: 100%;
  max-height: 500px;
  overflow: auto;
  border-color: var(--borde);
  border-radius: 2px;
}

table { border-collapse: collapse; }
th {
  background: #edf0f2;
  color: var(--tinta);
  padding: 13px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
td { padding: 13px 16px; border-color: var(--borde); }
tbody tr:hover { background: #f5f8f9; }
tbody tr.sel { background: #e6f2f4; }

.zona {
  padding: 34px;
  background: var(--superficie);
  border: 1px dashed #87949f;
  border-radius: 2px;
}

.zona:hover, .zona.activa {
  background: #edf6f7;
  border-color: var(--acento-texto);
}

.vacio {
  padding: 42px 24px;
  background: var(--superficie);
  border-color: #a1afba;
  color: var(--texto);
}

.dict.ok, .exito { background: #edf7f1; border-color: #79af97; color: #216b52; }
.dict.mal, .error { background: #fff0f2; border-color: #bc6c7c; color: #982039; }
.error, .exito { padding: 12px 16px; border-radius: 2px; }

.linea, .bitacora li {
  border-color: var(--borde);
  padding-top: 12px;
  padding-bottom: 12px;
}

.linea span:last-child { overflow-wrap: anywhere; text-align: right; }
.bitacora time { color: var(--tenue); }
.cargador, .barra { background: #e4e9ed; border-radius: 0; }
.cargador i { background: var(--acento-texto); }
.barra i { background: var(--acento-texto); }
.barra i.alta { background: var(--relevante); }

.titulo-evidencia {
  margin-bottom: 22px;
  color: var(--acento-texto);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.pagina-acceso {
  display: block;
  min-height: 100vh;
  background: #ffffff;
}

.acceso-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  min-height: 100vh;
}

.acceso-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px clamp(32px, 5vw, 88px);
  color: #ffffff;
  background: radial-gradient(circle at 90% 65%, #53abba18, transparent 45%),
              linear-gradient(145deg, #202a35, #32373c);
}

.acceso-hero:before {
  content: "";
  position: absolute;
  width: 510px;
  height: 510px;
  right: -145px;
  top: 12%;
  border: 1px solid #a1afba35;
  border-radius: 0;
  transform: rotate(35deg);
  box-shadow: none;
  pointer-events: none;
}

.acceso-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .09;
  background: repeating-linear-gradient(
    90deg, transparent 0 100px, #a1afba 101px, transparent 102px 202px
  );
  mask-image: linear-gradient(0deg, #000, transparent 80%);
  pointer-events: none;
}

.acceso-hero > * { position: relative; z-index: 1; }
.acceso-hero .marca { font-size: 20px; }
.acceso-hero-copy { max-width: 610px; margin: auto 0; padding: 80px 0; }

.acceso-hero h1 {
  max-width: 580px;
  margin: 0 0 24px;
  font-size: clamp(40px, 4.3vw, 64px);
  line-height: 1.16;
  letter-spacing: -1px;
  font-weight: 200;
  text-transform: none;
  overflow-wrap: anywhere;
}

.acceso-hero-copy > p:last-child {
  max-width: 490px;
  color: #d1dbe2;
  font-size: 16px;
  line-height: 1.75;
}

.acceso-hero-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #bdc9d2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.acceso-hero-footer span + span:before {
  content: "•";
  margin-right: 15px;
  color: var(--acento);
}

.acceso-panel { display: grid; place-items: center; min-width: 0; padding: 48px; }
.acceso { width: min(100%, 440px); max-width: none; padding: 0; text-align: left; }
.acceso .eyebrow { color: var(--acento-texto); }
.acceso h2 { margin: 0 0 12px; font-size: 36px; font-weight: 300; letter-spacing: -.6px; }
.acceso-subtitulo { margin: 0 0 32px; color: var(--tenue); font-size: 15px; }
.acceso .panel { padding: 30px; box-shadow: none; }
.rejilla-login { gap: 20px; }
.rejilla-login input { min-height: 46px; }
.rejilla-login button { min-height: 46px; font-size: 15px; }
.acceso-pie { margin: 26px 0 0; color: var(--tenue); font-size: 12px; text-align: center; }

@media (max-width: 980px) {
  .acceso-layout { grid-template-columns: minmax(0, .85fr) minmax(390px, 1fr); }
  .acceso-hero { padding: 36px; }
}

@media (max-width: 720px) {
  #barra .barra-interior {
    padding: 12px 18px 0;
    min-height: 62px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .barra-interior .marca { font-size: 15px; }
  .barra-interior .punto { width: 30px; height: 30px; }
  .barra-nav {
    order: 3;
    width: 100%;
    min-height: 44px;
    overflow-x: auto;
  }
  .barra-nav a { flex-shrink: 0; padding: 0 14px; font-size: 13px; }
  .barra-usuario { gap: 8px; font-size: 12px; }
  .barra-usuario .sec { min-height: 36px; padding: 7px 10px; }
  .page-intro-inner { padding: 34px 20px 38px; }
  .page-intro:after { width: 70%; }
  main:not(.acceso) { padding: 24px 16px 48px; gap: 20px; }
  .panel { padding: 20px; }
  .barra-acciones h2 { width: 100%; }
  .barra-acciones .derecha { margin-left: 0; }
  .tarjetas { grid-template-columns: 1fr; }
  .acceso-layout { grid-template-columns: 1fr; }
  .acceso-hero { min-height: 280px; padding: 28px 24px; }
  .acceso-hero-copy { padding: 30px 0 8px; }
  .acceso-hero h1 { max-width: 440px; margin-bottom: 16px; font-size: 38px; }
  .acceso-hero-copy > p:last-child { margin: 0; font-size: 15px; }
  .acceso-hero-footer { display: none; }
  .acceso-panel { padding: 36px 20px 50px; }
  .acceso .panel { padding: 24px; }
}

@media (max-width: 400px) {
  #barra .barra-interior { padding-inline: 14px; }
  .barra-usuario { max-width: 52%; overflow-wrap: anywhere; }
  .barra-usuario small { letter-spacing: .04em; }
  .barra-acciones input, .barra-acciones select { width: 100%; }
  .kpi { padding: 22px 18px; }
  .tarjeta { padding: 22px 18px; }
  .acceso-panel { padding-inline: 16px; }
  .acceso .panel { padding: 20px; }
  .acceso h2 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
