/* =============================================================================
   login.css — Estilos de la pantalla de login
   SGSI-Proyectos · A LA PAR
   ============================================================================= */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px 16px;
}

/* Fondo decorativo teal muy suave */
.login-body::before {
  content: '';
  position: fixed;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(46,153,161,.12) 0%, transparent 70%);
  pointer-events: none;
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------------------------------------------------------------------------
   Cabecera
   --------------------------------------------------------------------------- */
.login-header {
  text-align: center;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--teal);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  flex-shrink: 0;
}

.login-app-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.login-app-org {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-hint);
}

/* ---------------------------------------------------------------------------
   Card
   --------------------------------------------------------------------------- */
.login-card {
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------------------
   Campo contraseña con botón ojo
   --------------------------------------------------------------------------- */
.input-password-wrap {
  position: relative;
}

.input-password-wrap .form-input {
  padding-right: 40px;
}

.toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-hint);
  padding: 2px;
  display: flex;
  align-items: center;
  font-size: 16px;
  transition: color .15s;
}

.toggle-pass:hover {
  color: var(--teal);
}

/* ---------------------------------------------------------------------------
   Desplegable "Acceder con contraseña"
   --------------------------------------------------------------------------- */
.login-toggle-pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 2px;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-hint);
  margin-top: 14px;
  transition: color .15s;
  font-family: var(--font-base);
}

.login-toggle-pass:hover {
  color: var(--text-muted);
}

/* Contenedor del formulario local (colapsable) */
.login-local-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .25s ease, margin-top .25s;
  opacity: 0;
  margin-top: 0;
}

.login-local-form.open {
  max-height: 300px;
  opacity: 1;
  margin-top: 14px;
}

/* ---------------------------------------------------------------------------
   Botón Microsoft
   --------------------------------------------------------------------------- */
.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
  margin-bottom: 16px;
}

.btn-microsoft:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: #111827;
}

/* Separador "o accede con contraseña" */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-hint);
  font-size: 11px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-md);
}

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--text-hint);
  line-height: 1.6;
}
