@font-face {
  font-family: "Archivo";
  src: url("fuentes/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --marino: #0F2A47;      /* azul de eimportacion.com.mx */
  --eagle: #3B66AE;       /* ala del logo */
  --eagle-hover: #2E5596;
  --rojo: #D7313B;        /* IMPORTACION del logo; sólo avisos */
  --verde: #2E7D4F;
  --suelo: #EDF0F4;
  --papel: #FFFFFF;
  --regla: #D5DCE5;
  --tinta: #0F2A47;
  --tinta-2: #51627A;
  --radio: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* que ningún display: flex le gane al atributo hidden */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--suelo);
  color: var(--tinta);
  font-family: "Archivo", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid #8FB4F0; outline-offset: 2px; border-radius: 4px; }

/* Íconos de los botones de Joker: candado sin sesión, flecha con sesión */
.candado, .bajar { width: 15px; height: 15px; flex: none; }
.sin-sesion .bajar, .con-sesion .candado { display: none; }

/* ---------- Banda superior ---------- */

.banda {
  position: relative;
  overflow: hidden;
  background: var(--marino);
  color: #fff;
  padding: 0 clamp(16px, 5vw, 64px);
}
.banda__barra {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 0 auto; padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { width: 112px; height: auto; }
.barra__acciones { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.btn-borde {
  font-size: 15px; font-weight: 600; color: #fff;
  background: transparent; border: 1.5px solid rgba(255, 255, 255, .45); border-radius: 999px;
  padding: 8px 18px; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn-borde:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-borde[aria-expanded="true"] { background: #fff; color: var(--marino); border-color: #fff; }
.con-sesion #btn-entrar { display: none; }

.sesion { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: rgba(255, 255, 255, .85); }
.sesion__nombre { font-weight: 600; color: #fff; }
.sesion__nombre::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #6BD39A; margin-right: 8px; vertical-align: 1px;
}
.btn-texto {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: rgba(255, 255, 255, .8); font-size: 15px; text-decoration: underline; text-underline-offset: 3px;
}
.btn-texto:hover { color: #fff; }
.btn-texto.oscuro { color: var(--tinta-2); }
.btn-texto.oscuro:hover { color: var(--tinta); }

.banda__hero {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(28px, 4.5vw, 52px) 0 clamp(40px, 5vw, 64px);
}
.banda__hero h1 {
  margin: 0;
  font-size: clamp(56px, 8.4vw, 108px);
  font-weight: 800; font-stretch: 125%;
  line-height: .92; letter-spacing: -.015em;
}
.banda__hero p {
  margin: 18px 0 0; max-width: 36ch;
  font-size: clamp(18px, 1.9vw, 22px); line-height: 1.35;
  color: rgba(255, 255, 255, .78);
}
.hero__acciones { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 28px; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px;
  background: #fff; color: var(--marino);
  border: 0; border-radius: 8px; cursor: pointer;
  font-size: 18px; font-weight: 700; font-stretch: 110%;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .0);
  transition: transform .12s, box-shadow .15s;
}
.btn-hero:hover { box-shadow: 0 0 0 5px rgba(255, 255, 255, .16); }
.btn-hero:active { transform: translateY(1px); }
.btn-hero .candado, .btn-hero .bajar { width: 18px; height: 18px; color: var(--eagle); }
.hero__nota { max-width: 30ch; font-size: 14.5px; line-height: 1.35; color: rgba(255, 255, 255, .7); }

.ala {
  position: absolute; z-index: 1;
  right: max(-3vw, calc(50% - 700px)); bottom: 22px;
  width: min(42vw, 560px); opacity: .42; pointer-events: none;
}

.tira { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 8px; display: flex; }
.tira span { flex: 1; background: var(--c); transform-origin: left; animation: tramo .5s cubic-bezier(.2, .7, .2, 1) both; }
.tira span:nth-child(1)  { animation-delay: .00s; } .tira span:nth-child(2)  { animation-delay: .04s; }
.tira span:nth-child(3)  { animation-delay: .08s; } .tira span:nth-child(4)  { animation-delay: .12s; }
.tira span:nth-child(5)  { animation-delay: .16s; } .tira span:nth-child(6)  { animation-delay: .20s; }
.tira span:nth-child(7)  { animation-delay: .24s; } .tira span:nth-child(8)  { animation-delay: .28s; }
.tira span:nth-child(9)  { animation-delay: .32s; } .tira span:nth-child(10) { animation-delay: .36s; }
.tira span:nth-child(11) { animation-delay: .40s; } .tira span:nth-child(12) { animation-delay: .44s; }
.tira span:nth-child(13) { animation-delay: .48s; }
@keyframes tramo { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Avisos bajo la banda ---------- */

.aviso { background: var(--rojo); color: #fff; padding: 12px clamp(16px, 5vw, 64px); }
.aviso__in, .listo__in { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.listo { background: #E7F4EC; border-bottom: 1px solid #BFE0CB; padding: 14px clamp(16px, 5vw, 64px); color: var(--tinta); }
.listo strong { color: var(--verde); }
.listo .btn-cerrar { margin-left: auto; }

/* ---------- Pasos para equipo nuevo ---------- */

.pasos { background: var(--papel); border-bottom: 1px solid var(--regla); padding: 0 clamp(16px, 5vw, 64px); }
.pasos ol {
  max-width: 1240px; margin: 0 auto; padding: 18px 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 32px;
  counter-reset: paso;
}
.pasos li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: baseline; counter-increment: paso; }
.pasos li::before {
  content: counter(paso);
  grid-row: span 2; align-self: center;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--marino); color: #fff;
  font-weight: 700; font-stretch: 112%; font-size: 15px;
}
.pasos b { font-weight: 700; font-stretch: 108%; }
.pasos span { color: var(--tinta-2); font-size: 14.5px; line-height: 1.3; }

/* ---------- Ayuda ---------- */

.ayuda { background: var(--papel); border-bottom: 1px solid var(--regla); padding: 28px clamp(16px, 5vw, 64px) 32px; }
.ayuda__in { max-width: 1240px; margin: 0 auto; }
.ayuda__cab { display: flex; align-items: center; justify-content: space-between; }
.ayuda h2 { margin: 0; font-size: 22px; font-weight: 750; font-stretch: 115%; }
.btn-cerrar {
  font-size: 28px; line-height: 1; width: 40px; height: 40px; flex: none;
  color: var(--tinta-2); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.btn-cerrar:hover { background: var(--suelo); color: var(--tinta); }
.ayuda dl { margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 32px; }
.ayuda dl > div { border-left: 3px solid var(--eagle); padding-left: 14px; }
.ayuda dt { font-weight: 650; }
.ayuda dd { margin: 4px 0 0; color: var(--tinta-2); }
.ayuda dd b { color: var(--tinta); font-weight: 650; }
.ayuda__pie { margin: 22px 0 0; color: var(--tinta-2); }

/* ---------- Tablero de módulos ---------- */

.tablero {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) clamp(16px, 5vw, 64px) 40px;
  box-sizing: content-box;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px;
}
.area h2 {
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--tinta);
  font-size: 19px; font-weight: 750; font-stretch: 118%; letter-spacing: -.005em;
}
.area ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.mod {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 16px 16px 12px;
  background: var(--papel); border: 1px solid var(--regla); border-radius: var(--radio);
  transition: border-color .15s;
}
.mod:hover { border-color: var(--c); }
.mod > img { width: 56px; height: 56px; }
.mod__txt h3 { margin: 0; font-size: 18px; font-weight: 700; font-stretch: 108%; line-height: 1.15; }
.mod__txt p { margin: 3px 0 0; font-size: 14px; color: var(--tinta-2); line-height: 1.3; }
.mod__pie {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--suelo);
}
.mod__co {
  grid-column: 1 / -1; justify-self: end; margin-top: -6px;
  font-size: 13px; color: var(--tinta-2); text-decoration: underline; text-decoration-color: var(--regla);
  text-underline-offset: 3px;
}
.mod__co:hover { color: var(--tinta); text-decoration-color: currentColor; }

.ver { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ver__n { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ver__f { font-size: 13px; color: var(--tinta-2); white-space: nowrap; }
.ver__f:empty { display: none; }
.ver__nueva { display: inline-flex; align-items: center; gap: 6px; color: var(--tinta); font-weight: 600; }
.ver__nueva::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(15, 42, 71, .08); }

.btn-inst {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border: 0; border-radius: 6px; cursor: pointer;
  background: var(--eagle); color: #fff;
  font-size: 15px; font-weight: 650; font-stretch: 105%;
  transition: background-color .15s;
}
.btn-inst:hover { background: var(--eagle-hover); }
.btn-inst:active { transform: translateY(1px); }
.btn-inst.grande { height: 44px; padding: 0 22px; font-size: 16px; }
.btn-inst[disabled] { opacity: .6; cursor: progress; }

/* ---------- Pie ---------- */

.pie {
  max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 5vw, 64px) 40px; box-sizing: content-box;
  display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between;
  color: var(--tinta-2); font-size: 14px;
}

/* ---------- Iniciar sesión ---------- */

.entrar {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px;
  color: var(--tinta); background: var(--papel);
  box-shadow: 0 24px 60px rgba(15, 42, 71, .35);
}
.entrar::backdrop { background: rgba(15, 42, 71, .55); }
.entrar__cab { background: var(--marino); color: #fff; padding: 22px 24px 18px; border-bottom: 4px solid var(--eagle); }
.entrar__cab h2 { margin: 0; font-size: 21px; font-weight: 750; font-stretch: 112%; }
.entrar__cab p { margin: 4px 0 0; font-size: 14.5px; color: rgba(255, 255, 255, .72); }
.entrar__cuerpo { padding: 20px 24px 6px; display: grid; gap: 14px; }
.entrar label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tinta-2); }
.entrar input {
  font: inherit; font-size: 16px; color: var(--tinta);
  height: 44px; padding: 0 12px;
  border: 1.5px solid var(--regla); border-radius: 6px; background: #fff;
}
.entrar input:focus { outline: none; border-color: var(--eagle); box-shadow: 0 0 0 3px rgba(59, 102, 174, .18); }
.entrar__error { margin: 0; color: var(--rojo); font-size: 14.5px; font-weight: 600; }
.entrar__pie { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 16px 24px 22px; }

/* ---------- Responsivo ---------- */

@media (max-width: 1100px) { .tablero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pasos ol { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .tablero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .logo { width: 92px; }
  .ala { width: 78vw; right: -26vw; bottom: 30px; opacity: .3; }
  .btn-borde { padding: 7px 13px; font-size: 14px; }
  .btn-hero { width: 100%; justify-content: center; }
  .mod {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas: "ico txt btn" "ico ver btn" "co co co";
    gap: 2px 12px; padding: 12px 12px 10px 14px;
  }
  .mod > img { grid-area: ico; width: 44px; height: 44px; align-self: center; }
  .mod__txt { grid-area: txt; }
  .mod__txt p { display: none; }
  .mod__pie { display: contents; }
  .ver { grid-area: ver; flex-direction: row; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
  .ver__n { font-size: 14px; }
  .btn-inst { grid-area: btn; height: 36px; padding: 0 12px; }
  .mod__co { grid-area: co; margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .tira span { animation: none; }
  .mod, .btn-inst, .btn-borde, .btn-hero { transition: none; }
}

/* ---------- Cuenta: cambiar contraseña y usuarios (master) ---------- */

.sesion .btn-texto { font-size: 14.5px; }
.entrar.ancho { width: min(560px, calc(100vw - 32px)); }
.entrar__ok { margin: 0; color: var(--verde); font-size: 14.5px; font-weight: 600; }
.usuarios { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--regla); border-radius: 8px; overflow: hidden; }
.usuarios li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--suelo); }
.usuarios li:first-child { border-top: 0; }
.usuarios__quien { flex: 1; min-width: 0; line-height: 1.25; }
.usuarios__quien b { display: block; font-weight: 650; }
.usuarios__quien span { font-size: 13.5px; color: var(--tinta-2); }
.etiqueta { font-size: 12.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--suelo); color: var(--tinta-2); white-space: nowrap; }
.etiqueta.admin { background: var(--marino); color: #fff; }
.etiqueta.temporal { background: #FFF1D6; color: #8A5A00; }
.etiqueta.inactivo { background: #FBE3E4; color: var(--rojo); }
.btn-chico { height: 32px; padding: 0 12px; font-size: 14px; }
.temporal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  padding: 12px 14px; border-radius: 8px; background: #FFF6E2; border: 1px solid #F1D9A6;
}
.temporal code { font: 700 20px/1.2 "Archivo", monospace; font-stretch: 105%; letter-spacing: .04em; color: var(--tinta); }
.temporal small { width: 100%; color: #8A5A00; font-size: 13px; }
@media (max-width: 640px) { .sesion { flex-wrap: wrap; justify-content: flex-end; } }
