/* ==========================================================================
   MONSTER · Login — capa «Bisel»

   El login es la primera pantalla del aparato: misma barra superior negra,
   mismo riel de marca, misma superficie de papel y tarjeta con borde de un
   pixel que el resto de la app. El amarillo solo marca la identidad y el
   foco; el rojo queda para la acción de entrar.
   ========================================================================== */

.login-body {
  background: var(--night);
}

.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night);
}

/* --------------------------------------------------------------------------
   Barra superior (equivalente a .topbar de la app)
   -------------------------------------------------------------------------- */
.login-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  height: var(--topbar-h, 60px);
  padding: 0 26px;
  border-bottom: 1px solid var(--night-line);
  background: var(--night);
}

.login-topbar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--yellow);
}

.login-topbar .brand {
  flex: 0 0 auto;
  text-decoration: none;
}

.login-topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--night-line);
}

.login-topbar-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--night-muted);
  white-space: nowrap;
}

.login-topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--night-line);
  border-radius: 6px;
  background: var(--night-2);
  color: var(--night-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.login-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 228, 0, 0.12);
}

.login-chip-quiet {
  background: transparent;
}

/* --------------------------------------------------------------------------
   Estructura: riel de marca + superficie de papel
   -------------------------------------------------------------------------- */
.login-shell {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

/* --------------------------------------------------------------------------
   Riel de marca
   -------------------------------------------------------------------------- */
.login-brand-panel {
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(36px, 4vw, 58px);
  overflow: hidden;
  border-right: 1px solid var(--night-line);
  background: var(--night);
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.login-brand-top,
.login-brand-copy,
.login-brand-foot {
  position: relative;
  z-index: 1;
}

.login-brand-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* Wordmark hueco con el teléfono en la «o», como el logo. */
.login-wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: transparent;
  -webkit-text-stroke: 2px var(--yellow);
}

.login-wordmark .wm-phone {
  display: inline-flex;
  width: 0.5em;
  height: 0.82em;
  margin: 0 0.015em;
  transform: translateY(-0.02em);
}

.login-wordmark .wm-phone svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--night-muted);
}

.login-brand-copy {
  max-width: 560px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px 10px;
  border: 1px solid var(--night-line);
  border-radius: 3px;
  color: var(--night-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 228, 0, 0.14);
}

.login-brand-copy h1 {
  color: #fff;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.login-brand-copy h1 span {
  color: var(--yellow);
}

.login-brand-copy p {
  max-width: 44ch;
  margin-top: 16px;
  color: var(--night-text);
  font-size: 13px;
  line-height: 1.6;
}

/* Cuatro especificaciones con separadores de un pixel, como las fichas
   de la app: número mono, título y detalle. */
.login-features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 28px;
  padding: 0;
  border-top: 1px solid var(--night-line);
  list-style: none;
}

.login-features li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--night-line);
}

.feat-num {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.feat-body {
  display: block;
  min-width: 0;
}

.feat-body strong {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feat-body span {
  display: block;
  margin-top: 2px;
  color: var(--night-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.login-brand-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.login-store-stamp {
  padding: 4px 8px;
  border: 1px solid var(--night-line);
  border-radius: 3px;
  color: var(--night-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-brand-version {
  margin-left: auto;
  color: var(--night-muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Panel del formulario
   -------------------------------------------------------------------------- */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 424px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.login-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(17, 17, 16, 0.2);
}

/* Sello negro con letra amarilla: la señal de marca de la app. */
.login-card-stamp {
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--night);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-heading {
  margin-bottom: 20px;
}

.login-heading h2 {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.login-heading p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Formulario
   -------------------------------------------------------------------------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form .form-group {
  gap: 7px;
}

.login-form .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-form .form-group .required {
  color: var(--red);
  font-size: 11px;
}

.login-form input {
  min-height: 46px;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.login-form input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.login-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(245, 228, 0, 0.5);
}

.login-password {
  position: relative;
}

.login-password input {
  padding-right: 88px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 32px;
  padding: 0 9px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.login-password-toggle:hover {
  border-color: var(--ink);
  background: var(--surface);
  color: var(--ink);
}

.login-password-toggle:active {
  border-color: var(--yellow-dim);
  background: var(--yellow-soft);
}

.login-error {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #f3c4c6;
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  background: var(--danger-soft);
  color: #8f1420;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.login-error[hidden] {
  display: none;
}

.login-submit {
  min-height: 48px;
  margin-top: 4px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.login-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.login-hint kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

/* --------------------------------------------------------------------------
   Credenciales de desarrollo
   -------------------------------------------------------------------------- */
.demo-creds {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.demo-creds summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.demo-creds summary::-webkit-details-marker {
  display: none;
}

.demo-creds summary::before {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1;
}

.demo-creds[open] summary::before {
  content: "−";
}

.demo-list {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.demo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.demo-item:hover {
  border-color: var(--line-strong);
  background: var(--yellow-soft);
}

.demo-item .demo-role {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-item .demo-mail {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10.5px;
}

.demo-item > .small {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-item:hover > .small {
  border-color: var(--yellow-dim);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Pie: ficha de metadatos
   -------------------------------------------------------------------------- */
.login-meta {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.login-meta-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
}

.login-meta dt {
  padding-top: 1px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-meta dd {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 960px) {
  .login-shell {
    grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
  }

  .login-brand-panel {
    display: flex;
  }

  .login-panel {
    padding: 48px 40px;
  }
}

/* El riel solo tiene ancho para dos columnas de especificaciones en
   pantallas grandes. */
@media (min-width: 1200px) {
  .login-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-features li:nth-child(odd) {
    padding-right: 20px;
  }

  .login-features li:nth-child(even) {
    padding-left: 20px;
    border-left: 1px solid var(--night-line);
  }
}

@media (max-width: 959px) {
  .login-topbar {
    height: 56px;
    padding: 0 16px;
    gap: 10px;
  }

  .login-topbar-divider,
  .login-topbar-tag,
  .login-chip-quiet {
    display: none;
  }

  .login-topbar .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .login-topbar .brand-mark svg {
    width: 12px;
    height: 18px;
  }

  .login-topbar .brand-text {
    font-size: 13.5px;
  }

  .login-panel {
    padding: 28px 16px 36px;
  }

  .login-card {
    padding: 20px;
  }

  .login-heading h2 {
    font-size: 25px;
  }
}

@media (max-width: 400px) {
  .login-panel {
    padding: 20px 12px 28px;
  }

  .login-card {
    padding: 18px;
  }

  .login-card-stamp {
    display: none;
  }

  .demo-creds summary {
    align-items: flex-start;
    line-height: 1.35;
  }

  .demo-creds summary::before {
    margin-top: 1px;
  }

  .login-meta-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}
