.login-card {
  width: min(460px, 100%);
  margin: 9vh auto;
  padding: 36px;
  max-height: none;
  overflow: visible;
}

body.auth-screen .login-card {
  margin: 0 auto;
}

body.auth-screen {
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
}

body.auth-screen .container {
  min-height: 100dvh;
  height: auto;
  padding: 16px 12px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-icon {
  display: block;
  width: min(180px, 48vw);
  height: auto;
  max-width: 100%;
  max-height: 110px;
  margin: 0 auto 16px;
  object-fit: contain;
}

.login-header h1 {
  margin: 8px 0;
  font-size: 2.2rem;
  color: var(--primary);
  font-weight: 800;
}

.login-subtitle {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 1rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.checkbox-group {
  margin-bottom: 22px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
}

.auth-links {
  margin: 0;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.auth-links a:hover {
  text-decoration: underline;
}

.message {
  min-height: 1.25rem;
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.95rem;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--success);
}

.btn-google-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(12, 34, 24, 0.88);
  color: var(--text, #e8f7ee);
  padding: 12px 16px;
  font-weight: 800;
  text-decoration: none;
  margin-bottom: 0;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.sso-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-rl-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(45, 122, 63, 0.16);
  color: var(--text, #e8f7ee);
  padding: 12px 16px;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn-rl-login:hover {
  background: rgba(45, 122, 63, 0.26);
  border-color: rgba(251, 191, 36, 0.7);
  transform: translateY(-1px);
}

.auth-step + .auth-step {
  margin-top: 18px;
}

.login-footer-brand {
  margin-top: 22px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.login-footer-brand img {
  width: min(220px, 56vw);
  height: auto;
  display: block;
  object-fit: contain;
}

.login-footer-brand strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--text-dim, #93b7a1);
}

.btn-microsoft-login {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(14, 30, 45, 0.88);
  color: var(--text, #e8f7ee);
  padding: 12px 16px;
  font-weight: 800;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.btn-microsoft-login:hover {
  background: rgba(9, 20, 32, 0.94);
  border-color: rgba(96, 165, 250, 0.68);
  transform: translateY(-1px);
}

.btn-google-login:hover {
  background: rgba(9, 26, 19, 0.94);
  border-color: rgba(74, 222, 128, 0.65);
  transform: translateY(-1px);
}

.google-g-mark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #4285f4;
  font-weight: 900;
  line-height: 1;
}

.microsoft-mark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  font-weight: 900;
  line-height: 1;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-dim, #93b7a1);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(147, 183, 161, 0.35);
}

.auth-policy-note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  text-align: center;
  color: var(--text-dim, #93b7a1);
}

.auth-policy-note.error {
  color: var(--danger, #ef4444);
  font-weight: 700;
}

.biometric-actions {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.biometric-login-btn {
  width: 100%;
  margin-top: 0;
  border-radius: 999px;
}

.biometric-enroll-btn {
  width: 100%;
  margin-top: 0;
  border: none;
  background: transparent;
  color: var(--text-dim, #93b7a1);
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 4px;
}

.biometric-enroll-btn:hover {
  color: var(--primary, #4ade80);
}

.biometric-login-btn.hidden,
.biometric-enroll-btn.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .login-card {
    margin: 12px auto;
    padding: 24px 16px;
    border-radius: 14px;
  }

  .login-header {
    margin-bottom: 20px;
  }

  .login-icon {
    width: min(160px, 58vw);
    max-height: 96px;
    margin-bottom: 12px;
  }

  .sso-buttons-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
