/* =========================================================
   Login / Forgot / Change password - Tzumi
   Software empresarial: formulario limpio a la izquierda y, a la
   derecha, una vista previa del producto con datos de ejemplo.
   ========================================================= */

:root {
  --white: #ffffff;
  --canvas: #f2f5f8;
  --surface-2: #f8fafc;
  --ink: #0b1220;
  --ink-2: #475467;
  --ink-3: #8a94a6;
  --line: #e4e8ee;
  --line-2: #eef1f5;
  --primary: #024869;
  --primary-hover: #01374f;
  --primary-soft: rgba(2, 72, 105, .08);
  --focus: rgba(2, 72, 105, .18);
  --accent: #ef4136;
  --ok: #067647;  --ok-bg: #ecfdf3;  --ok-line: #abefc6;
  --err: #b42318; --err-bg: #fef3f2; --err-line: #fecdca;
  --warn: #b54708; --warn-bg: #fffaeb; --warn-line: #fedf89;
  --info: #175cd3; --info-bg: #eff8ff;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

/* =========================================================
   Estructura
   ========================================================= */
.page {
  display: grid;
  grid-template-columns: minmax(420px, 40%) 1fr;
  min-height: 100vh;
}

.side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px clamp(28px, 5vw, 80px);
  background: var(--white);
}

/* Fondo vivo del panel izquierdo: trama de puntos y luz suave en los colores de la marca */
.side::before,
.side::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.side::before {
  inset: 0;
  background-image: radial-gradient(rgba(2, 72, 105, .12) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 55% at 0% 0%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 0% 0%, #000 10%, transparent 70%);
}

.side::after {
  width: 520px; height: 520px;
  left: -220px; bottom: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 72, 105, .13), rgba(239, 65, 54, .06) 45%, transparent 70%);
  filter: blur(10px);
  animation: deriva 24s ease-in-out infinite alternate;
}

.side > * { position: relative; z-index: 1; }

.side__head,
.side__foot,
.panel { width: 100%; max-width: 380px; }

.side__logo { display: block; height: 48px; width: auto; margin: -9px 0 0 -10px; }

.panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
  animation: entrar .6s var(--ease) both;
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.side__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.side__foot span { display: inline-flex; align-items: center; gap: 6px; }
.side__foot svg { width: 13px; height: 13px; }

/* =========================================================
   Formulario
   ========================================================= */
.title {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.lead {
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

.lead b { color: var(--ink); font-weight: 600; }

.notice {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
  border-radius: var(--radius);
  animation: aviso .45s var(--ease) both;
}

@keyframes aviso {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: none; }
}

.notice svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }
.notice a { font-weight: 600; }
.notice--err  { color: var(--err);  background: var(--err-bg);  border-color: var(--err-line); }
.notice--warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.notice--ok   { color: var(--ok);   background: var(--ok-bg);   border-color: var(--ok-line); animation: none; }

.field { margin-bottom: 18px; }

.field__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }

.field__label { display: block; font-size: 14px; font-weight: 550; color: var(--ink); }
.field__top .field__label { margin: 0; }
.field > .field__label { margin-bottom: 6px; }

.field__control { position: relative; }

.field__input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d0d5dd;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field__input::placeholder { color: #a3abb8; }
.field__input:hover { border-color: #b7bec9; }
.field__input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--focus); }

.field__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f5f9fc inset; }

.field--invalid .field__input { border-color: var(--err); }
.field--invalid .field__input:focus { box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }

.field__toggle {
  position: absolute;
  top: 50%; right: 6px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  padding: 0;
  transform: translateY(-50%);
  color: var(--ink-3);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.field__toggle:hover { color: var(--ink-2); background: var(--surface-2); }
.field__toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.field__toggle svg { width: 18px; height: 18px; }
.field__toggle .icono-ocultar { display: none; }
.field__toggle[aria-pressed="true"] .icono-ver { display: none; }
.field__toggle[aria-pressed="true"] .icono-ocultar { display: block; }

.field__error,
.field__hint { display: none; margin-top: 6px; font-size: 13px; }
.field__error { color: var(--err); }
.field__hint { color: var(--warn); }
.field--invalid .field__error,
.field__hint.is-visible { display: block; }

.rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: -4px 0 20px;
  padding: 0;
  list-style: none;
}

.rules li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }

.rules li::before {
  content: "";
  flex: 0 0 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #d0d5dd;
  background: var(--white) center / 10px no-repeat;
  transition: background-color .15s, border-color .15s;
}

.rules li.is-ok { color: var(--ink); }
.rules li.is-ok::before {
  border-color: var(--ok);
  background-color: var(--ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 24px;
  font-size: 14px;
}

.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }

/* Interruptor (Remember me): el checkbox real sigue enviando Rememberme=1 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative;
  width: 34px; height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background .2s;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
  transition: transform .25s var(--ease);
}
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px var(--focus); }

.link { color: var(--primary); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(180deg, #035a83, var(--primary));
  border: 1px solid var(--primary-hover);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .12);
  cursor: pointer;
  transition: filter .15s, transform .05s, box-shadow .15s;
}

.btn {
  overflow: hidden;
  background: linear-gradient(135deg, #0a6f9c 0%, var(--primary) 55%, #013a55 100%);
  box-shadow: 0 10px 22px -10px rgba(2, 72, 105, .7), inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* Brillo que recorre el boton cada pocos segundos y al pasar el mouse */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent);
  transform: skewX(-20deg);
  animation: brillo 6s ease-in-out infinite 2s;
  pointer-events: none;
}

.btn:hover::after { animation: brillo .9s ease-out; }

@keyframes brillo {
  0%   { left: -60%; }
  18%, 100% { left: 130%; }
}

.btn__arrow { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.is-sending .btn__arrow { display: none; }

.btn:hover { filter: brightness(1.07); box-shadow: 0 14px 28px -12px rgba(2, 72, 105, .75), inset 0 1px 0 rgba(255, 255, 255, .16); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }

.btn__spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: girar .7s linear infinite;
}

.is-sending .btn { pointer-events: none; }
.is-sending .btn__spinner { display: inline-block; }

@keyframes girar { to { transform: rotate(360deg); } }

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}

.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }

.help {
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--ink-3);
}

/* =========================================================
   Panel derecho: vista previa del producto
   ========================================================= */
.showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 72px 0 0 clamp(40px, 5vw, 80px);
  border-left: 1px solid var(--line);
  background:
    radial-gradient(900px 600px at 105% -10%, rgba(2, 72, 105, .16), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(239, 65, 54, .07), transparent 60%),
    linear-gradient(180deg, #f5f8fb, #edf1f5);
}

.showcase__copy { max-width: 540px; padding-right: 40px; }

.showcase__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.showcase__eyebrow i {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--primary-soft) center / 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23024869' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.showcase__title {
  margin: 18px 0 12px;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.028em;
}

.showcase__lead { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }

.stage { position: relative; flex: 1; min-height: 520px; margin-top: 44px; }

/* ---------- Fondo vivo del panel derecho: manchas de luz que se desplazan ---------- */
.glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  animation: deriva 22s ease-in-out infinite alternate;
}

.glow--a { width: 520px; height: 520px; top: -160px; right: -120px; background: #9fd0ea; }
.glow--b { width: 420px; height: 420px; bottom: -140px; left: 10%; background: #ffc9c2; animation-duration: 26s; animation-delay: -8s; }
.glow--c { width: 360px; height: 360px; top: 38%; right: 18%; background: #c7d7ff; opacity: .4; animation-duration: 30s; animation-delay: -14s; }

@keyframes deriva {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-60px, 40px) scale(1.08); }
  100% { transform: translate(40px, -30px) scale(.95); }
}

.showcase::before {
  /* trama de puntos que se desvanece */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(2, 72, 105, .16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.showcase__copy, .stage { position: relative; z-index: 1; }

/* ---------- Ventana de la app ---------- */
.window {
  position: absolute;
  top: 0; left: 0;
  width: max(780px, calc(100% + 24px)); /* se sale apenas del borde derecho */
  display: grid;
  grid-template-rows: 36px auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .6),
    0 60px 100px -40px rgba(16, 24, 40, .35),
    0 24px 40px -24px rgba(16, 24, 40, .22);
  overflow: hidden;
  transform-origin: 15% 30%;
  transition: transform 1.2s var(--ease);
}

.is-sending .window { transform: scale(1.035) translate(-10px, -6px); }

.window__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 10px; height: 10px; border-radius: 50%; background: #e2e5ea; }
.window__dots i:nth-child(1) { background: #ff8a80; }
.window__dots i:nth-child(2) { background: #ffd27d; }
.window__dots i:nth-child(3) { background: #7ddc9f; }

.window__url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 12px;
  font-size: 11px;
  color: var(--ink-3);
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 6px;
}

.window__url svg { width: 10px; height: 10px; }

.app { display: grid; grid-template-columns: 176px 1fr; min-height: 0; }

.app__nav { padding: 16px 12px; border-right: 1px solid var(--line-2); background: var(--surface-2); }
.app__brand { display: block; height: 32px; width: auto; margin: -7px 0 14px -6px; }

.app__group {
  margin: 14px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.app__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-radius: 7px;
  transition: color .3s, background .3s;
}

.app__item svg { flex: 0 0 15px; width: 15px; height: 15px; opacity: .7; }
.app__item.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.app__item.is-active svg { opacity: 1; }
.app__item.is-active::before {
  content: "";
  position: absolute;
  left: -12px; top: 7px; bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.app__main { display: grid; grid-template-rows: 48px auto; min-width: 0; }

.app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-2);
}

.app__search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.app__search svg { width: 13px; height: 13px; }
.app__search kbd { margin-left: auto; font: inherit; font-size: 10px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }

.app__user { display: flex; align-items: center; gap: 14px; }

.team { display: flex; align-items: center; }
.team i, .team em {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  margin-left: -6px;
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  color: #fff;
  background: var(--c, #98a2b3);
  border: 2px solid var(--white);
  border-radius: 50%;
}
.team i:first-child { margin-left: 0; }
.team em { color: var(--ink-2); background: var(--line-2); }

.app__bell { position: relative; width: 16px; height: 16px; color: var(--ink-3); }
.app__bell svg { width: 16px; height: 16px; }
.app__bell b { position: absolute; top: -1px; right: -1px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--white); }

.app__avatar {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #035a83, #0b7fb0);
  border-radius: 50%;
}

/* Las pantallas comparten la misma celda: el alto lo da la mas alta y nunca se enciman */
.screens { display: grid; }

.screen {
  grid-area: 1 / 1;
  min-width: 0;
  padding: 16px 18px 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .35s, transform .35s, visibility 0s .35s;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .45s .4s, transform .45s .4s, visibility 0s .4s;
}

.screen__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.screen__crumb { display: block; margin-bottom: 3px; font-size: 11px; color: var(--ink-3); }
.screen__title { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 650; letter-spacing: -.015em; white-space: nowrap; }
.screen__actions { display: flex; gap: 8px; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: 10px;
}

.live i { width: 6px; height: 6px; border-radius: 50%; background: #12b76a; animation: latido 1.8s ease-out infinite; }

@keyframes latido {
  0%   { box-shadow: 0 0 0 0 rgba(18, 183, 106, .55); }
  100% { box-shadow: 0 0 0 7px rgba(18, 183, 106, 0); }
}

/* ---------- Botones de la app ---------- */
.ui-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.ui-btn svg { width: 13px; height: 13px; }

.ui-btn--primary {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #036391, var(--primary));
  border-color: var(--primary-hover);
  box-shadow: 0 4px 10px -4px rgba(2, 72, 105, .6), inset 0 1px 0 rgba(255, 255, 255, .15);
}

.ui-btn--primary::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  animation: brillo 5s ease-in-out infinite 1.5s;
}

.ui-btn--ghost {
  margin-top: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  border-color: transparent;
  box-shadow: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: color .3s, background .3s, border-color .3s, box-shadow .3s;
}

.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.is-disabled { opacity: .35; }
.icon-btn.is-ready { color: #fff; background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---------- Pestanas ---------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 12px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
}

.tabs__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 7px;
}

.tabs__item em { font-style: normal; font-size: 10px; color: var(--ink-3); }
.tabs__item.is-active { color: var(--ink); font-weight: 600; background: var(--white); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px var(--line-2); }

/* ---------- Tarjetas y tablas ---------- */
.card { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; min-width: 0; background: var(--white); }
.card--flush { padding: 4px 6px; margin-bottom: 10px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.card__title { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.card__title svg { width: 14px; height: 14px; color: #f79009; }
.card__link { font-size: 11px; font-weight: 600; color: var(--primary); white-space: nowrap; }

.table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.table th { padding: 8px; font-weight: 500; text-align: left; color: var(--ink-3); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .code { font-weight: 600; color: var(--ink); }
.table .muted { color: var(--ink-2); }
.table .sub { display: block; font-size: 10.5px; color: var(--ink-3); }

.table tr.flash td { animation: resalta 1.8s ease-out; }

@keyframes resalta {
  0%, 30% { background: rgba(2, 72, 105, .07); }
  100% { background: transparent; }
}

.report { display: flex; align-items: center; gap: 10px; }
.report b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); }
.report small { display: block; font-size: 10.5px; color: var(--ink-3); max-width: 210px; overflow: hidden; text-overflow: ellipsis; }

/* La ventana mide distinto segun la pantalla: en ventanas angostas se oculta "Last run" para que quepan estado y descarga */
.window { container-type: inline-size; }

@container (max-width: 880px) {
  .table--reports .col-last { display: none; }
  .report small { max-width: 170px; }
}

.with-icon { display: inline-flex; align-items: center; gap: 5px; }
.with-icon svg { width: 12px; height: 12px; color: var(--ink-3); }

.filetype {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px; height: 34px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  border-radius: 5px;
  clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%);
}

.filetype--xlsx { background: #1d8a52; }
.filetype--pdf  { background: #d92d20; }
.filetype--csv  { background: #1570ef; }

/* Reporte generandose en vivo */
.gen { display: inline-flex; align-items: center; gap: 8px; }
.gen__bar { width: 70px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.gen__bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #0b7fb0, var(--primary)); transition: width .25s linear; }
.gen__pct { font-size: 10.5px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 10px;
  white-space: nowrap;
}

.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--ok      { color: var(--ok);   background: var(--ok-bg); }
.status--info    { color: var(--info); background: var(--info-bg); }
.status--warn    { color: var(--warn); background: var(--warn-bg); }
.status--err     { color: var(--err);  background: var(--err-bg); }
.status--neutral { color: var(--ink-2); background: var(--line-2); }

/* ---------- Encabezado de informe ---------- */
.report-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; font-size: 11px; color: var(--ink-2); }
.report-meta span { display: inline-flex; align-items: center; gap: 5px; }
.report-meta svg { width: 12px; height: 12px; color: var(--ink-3); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }

.kpi {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--white), var(--surface-2));
}

.kpi__label { display: block; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__value { display: block; margin: 5px 0 3px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi__note { display: block; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__note--up { color: var(--ok); }
.kpi__note--down { color: var(--err); }
.kpi__note--flat { color: var(--ink-3); }

.grid2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }

/* Hallazgos clave del informe */
.card--insights { background: linear-gradient(180deg, #fffdf7, var(--white)); }
.insights { margin: 0 0 4px; padding: 0; list-style: none; }

.insights__item {
  position: relative;
  padding: 7px 0 7px 16px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-2);
  border-bottom: 1px dashed var(--line-2);
}

.insights__item:last-child { border-bottom: 0; }
.insights__item b { color: var(--ink); font-weight: 600; }
.insights__item::before { content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.insights__item--ok::before { background: #12b76a; }
.insights__item--warn::before { background: #f79009; }
.insights__item--info::before { background: #0b7fb0; }

/* Antiguedad de ordenes de compra */
.aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }

.aging__item {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-top: 3px solid var(--tono);
  border-radius: 10px;
}

.aging__item--ok   { --tono: #12b76a; }
.aging__item--info { --tono: #0b7fb0; }
.aging__item--warn { --tono: #f79009; }
.aging__item--err  { --tono: #f04438; }

.aging__label { display: block; font-size: 11px; color: var(--ink-3); }
.aging__value { display: block; margin: 4px 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.aging__value small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.aging__share { display: block; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.aging__share i { display: block; height: 100%; width: var(--v); background: var(--tono); border-radius: 2px; }
.is-drawn .aging__share i { animation: llenar 1s .3s var(--ease) both; }
.aging__pct { display: block; margin-top: 6px; font-size: 10.5px; color: var(--ink-3); }

@keyframes llenar { from { width: 0; } }

.days { font-weight: 600; }
.days--late { color: var(--err); }

/* ---------- Exportaciones recientes ---------- */
.card--feed { margin-top: 0; }

.feed { margin: 0; padding: 0; list-style: none; overflow: hidden; }

.feed__item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  height: 42px;
  border-bottom: 1px solid var(--line-2);
  font-size: 11.5px;
  color: var(--ink-2);
}

.feed__item:last-child { border-bottom: 0; }
.feed__item .filetype { width: 24px; height: 28px; font-size: 7.5px; }
.feed__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__text b { color: var(--ink); font-weight: 600; }
.feed__time { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.feed__item.is-new { animation: entra .6s var(--ease) both; }
.feed__item.is-new .feed__time { color: var(--ok); font-weight: 600; }

@keyframes entra {
  from { opacity: 0; transform: translateY(-14px); background: rgba(2, 72, 105, .06); }
  to   { opacity: 1; transform: none; background: transparent; }
}

/* ---------- Tarjetas flotantes ---------- */
.float {
  position: absolute;
  z-index: 2;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 60px -24px rgba(16, 24, 40, .35), 0 8px 16px -8px rgba(16, 24, 40, .12);
  animation: flotar 7s ease-in-out infinite;
}

@keyframes flotar { 50% { transform: translateY(-6px); } }

.float--ship { left: -62px; top: 430px; width: 246px; padding: 14px 16px 16px; animation-delay: -2s; }
.float--sync { right: 48px; top: -20px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; font-size: 12px; animation-delay: -4s; }

.sync__icon { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ok); background: var(--ok-bg); border-radius: 50%; }
.sync__icon svg { width: 13px; height: 13px; }
.float--sync.is-syncing .sync__icon svg { animation: girar 1s linear; }
.float--sync b { font-weight: 600; }
.float--sync small { color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }

.ship__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ship__label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.ship__time { font-size: 11px; color: var(--ink-3); }
.ship__body { transition: opacity .3s, transform .3s; }
.ship__body.is-changing { opacity: 0; transform: translateY(4px); }
.ship__title { font-size: 13.5px; font-weight: 600; }
.ship__sub { margin: 2px 0 14px; font-size: 12px; color: var(--ink-2); }

.track { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); --paso: 2; }

.track::before,
.track::after {
  content: "";
  position: absolute;
  top: 6px; left: 12.5%;
  height: 2px;
  border-radius: 1px;
}

.track::before { right: 12.5%; background: var(--line); }
.track::after { width: calc(var(--paso) * 25%); background: var(--primary); transition: width .8s var(--ease); }

.track__step { position: relative; z-index: 1; text-align: center; font-size: 10.5px; color: var(--ink-3); transition: color .3s; }
.track__step i {
  display: block;
  width: 14px; height: 14px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  transition: background .3s, border-color .3s, box-shadow .3s;
}

.track__step.is-done { color: var(--ink-2); }
.track__step.is-done i { background: var(--primary); border-color: var(--primary); }
.track__step.is-now { color: var(--primary); font-weight: 600; }
.track__step.is-now i { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1180px) {
  .page { grid-template-columns: 1fr; }
  .showcase { display: none; }
}

@media (max-width: 520px) {
  .side { padding: 24px 16px; }
  .panel { padding: 36px 0; }
  .title { font-size: 26px; }
  .rules { grid-template-columns: 1fr; }
  .side__foot { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .screen, .window, .track::after, .ship__body, .gen__bar i { transition: none; }
}
