:root {
    --navy: #0b163a;
    --navy-2: #121b4d;
    --gold: #d4b449;
    --paper: #f7f8fae7;
    --ink: #10141c;
    --ink-soft: #5b6270;
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    color: var(--ink);
  }

  .wrap {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
  }

  /* ---------- Panel de marca ---------- */
  .brand {
    position: relative;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 4rem;
  }

  .circuit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .brand-content {
    position: relative;
    z-index: 1;
    max-width: 26rem;
  }

  .brand-mark {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--gold);
  }

  .brand-content h1 {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 1.25;
    color: #f4f2ea;
    margin: 1.5rem 0 1rem;
  }

  .brand-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #c7cede;
    max-width: 22rem;
  }

  .corner-rule {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 6rem;
    height: 3px;
    background: var(--gold);
  }

  /* ---------- Panel de formulario ---------- */
  .panel {
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .panel-inner {
    width: 100%;
    max-width: 22rem;
  }

  .eyebrow-line {
    display: block;
    width: 2.5rem;
    height: 3px;
    background: var(--gold);
    margin-bottom: 1.25rem;
  }

  .panel-head h2 {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    margin: 0 0 0.4rem;
  }

  .panel-head p {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin: 0 0 2rem;
  }

  .field {
    display: block;
    margin-bottom: 1.1rem;
  }

  .field span {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--ink);
  }

  .field input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid #d7dae1;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    background: #fff;
    transition: border-color 0.15s ease;
  }

  .field input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18);
  }

  /* Campo de contraseña con botón para mostrarla u ocultarla. */
  .field-pwd .pwd {
    position: relative;
    display: block;
  }

  .field-pwd .pwd input {
    padding-right: 2.6rem;
  }

  .ver-pwd {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    width: 32px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
  }

  .ver-pwd svg {
    width: 19px;
    height: 19px;
  }

  .ver-pwd .tacha {
    display: none;
  }

  .ver-pwd.activo .tacha {
    display: block;
  }

  .ver-pwd:hover,
  .ver-pwd:focus-visible {
    color: var(--navy);
    background: rgba(201, 162, 75, 0.16);
    outline: none;
  }

  .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.4rem 0 1.6rem;
    font-size: 0.82rem;
  }

  .check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--ink-soft);
  }

  .check input {
    accent-color: var(--navy);
  }

  .forgot {
    color: var(--navy-2);
    text-decoration: none;
    font-weight: 500;
  }

  .forgot:hover {
    text-decoration: underline;
  }

  button[type='submit'] {
    width: 100%;
    padding: 0.8rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  button[type='submit']:hover {
    background: var(--navy-2);
  }

  button[type='submit']:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }

  .footnote {
    margin-top: 1.75rem;
    font-size: 0.75rem;
    color: #97a0ae;
    text-align: center;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 860px) {
    .wrap {
      grid-template-columns: 1fr;
    }
    .brand {
      padding: 2.5rem;
      min-height: 16rem;
    }
    .brand-content h1 {
      font-size: 1.7rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }

.error {
  margin: 0 0 1.1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #7a1f1f;
  background: #fbeaea;
  border-left: 3px solid #b3261e;
  border-radius: 2px;
}


/* Aviso de sesión terminada por inactividad: es informativo, no un error de credenciales. */
.aviso-sesion {
  margin: 0 0 1.1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  color: #123a6b;
  background: #e8f1fb;
  border-left: 3px solid #0d47a1;
  border-radius: 2px;
}
