/* Páginas de autenticación */
.auth-page {
  min-height: 100vh;
  display: flex;
}

/* Panel izquierdo — brand */
.auth-aside {
  width: 420px;
  flex-shrink: 0;
  background: var(--azul);
  display: flex;
  flex-direction: column;
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
}
.auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/isotipo-blanco.png') no-repeat center / 320px auto;
  opacity: .04;
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 56px; }
.auth-brand img { height: 36px; width: auto; }

.auth-aside-body { flex: 1; }
.auth-aside-body h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--blanco);
  line-height: 1.2;
  margin-bottom: 16px;
}
.auth-aside-body h1 .accent { color: var(--naranja); }
.auth-aside-body p {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.auth-trust { display: flex; flex-direction: column; gap: 12px; }
.auth-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.8);
  font-size: .82rem;
}
.auth-trust-item svg {
  width: 16px; height: 16px;
  stroke: var(--naranja);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.auth-aside-footer {
  color: rgba(255,255,255,.35);
  font-size: .72rem;
  margin-top: 40px;
}

/* Panel derecho — formulario */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--claro);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--blanco);
  border-radius: 12px;
  box-shadow: var(--sombra);
  padding: 44px 40px;
}
.auth-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 6px;
}
.auth-card .auth-sub {
  color: var(--gris);
  font-size: .85rem;
  margin-bottom: 32px;
}

/* Campos */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--azul);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio);
  font-size: .88rem;
  color: var(--azul);
  background: var(--blanco);
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--naranja); }
.form-group input.error { border-color: #dc3545; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: .82rem;
}
.form-footer a { color: var(--naranja); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: .9rem; border-radius: var(--radio); }

.auth-card .auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: .82rem;
  color: var(--gris);
}
.auth-card .auth-link a { color: var(--naranja); font-weight: 600; }
.auth-card .auth-link a:hover { text-decoration: underline; }

/* Password toggle */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 44px; }
.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris);
  padding: 0;
  display: flex;
}
.toggle-pass svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.toggle-pass:hover svg { stroke: var(--azul); }

/* Spinner en botón */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.btn.loading .btn-text { display: none; }
.btn.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 768px) {
  .auth-aside { display: none; }
  .auth-card { padding: 32px 24px; }
}
