/* ===================================================
   Login Page - Modern Design (matches Admin portal)
   =================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 2rem 1rem;
  position: relative;
}

.login-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0e0e0;
  padding: 2rem 2rem;
  width: 100%;
  max-width: 500px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  max-height: 45px;
  margin-bottom: 0.5rem;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333333;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.875rem;
  color: #666666;
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-form {
  margin-bottom: 0;
}

.login-form-group {
  margin-bottom: 1rem;
  position: relative;
}

.login-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #333333;
  margin-bottom: 0.4rem;
  display: block;
}

.login-form-control {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #d0d0d0;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
  color: #333333;
}

.login-form-control:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
  background-color: white;
}

.login-form-control::placeholder {
  color: #adb5bd;
}

.login-forgot {
  text-align: right;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.login-forgot a {
  font-size: 0.8125rem;
  color: #3498db;
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s ease;
}

.login-forgot a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.login-btn-primary {
  background: #3498db;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.login-btn-primary:hover {
  background: #2980b9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  color: white;
}

.login-btn-primary:active {
  transform: scale(0.98);
}

.login-btn-secondary {
  background: white;
  color: #333333;
  border: 1px solid #d0d0d0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
}

.login-btn-secondary svg {
  flex-shrink: 0;
  margin-right: 0;
}

.login-btn-secondary:hover {
  background: #f5f5f5;
  border-color: #b0b0b0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  color: #999999;
  font-size: 0.8125rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.login-divider span {
  padding: 0 0.75rem;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.login-footer p {
  font-size: 0.75rem;
  color: #999999;
  margin: 0;
  line-height: 1.4;
}

.login-error {
  background-color: #fee;
  border: 1px solid #fcc;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-error-icon {
  color: #d32f2f;
  font-size: 1.125rem;
  flex-shrink: 0;
  line-height: 1;
}

.login-error-text {
  color: #c62828;
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.4;
  flex: 1;
}

.login-error-text ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-error-text li {
  margin: 0;
  padding: 0;
}

.login-form-control:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 1px;
}

.login-btn-primary:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.login-btn-secondary:focus-visible {
  outline: 2px solid #666666;
  outline-offset: 2px;
}

.login-form .text-danger {
  color: #d32f2f;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
}

/* ===== Success Messages (2FA Setup, QR Code) ===== */
.login-success {
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.login-success-icon {
  color: #388e3c;
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 0.125rem;
}

.login-success > div {
  flex: 1;
  min-width: 0;
}

.login-success-text {
  color: #2e7d32;
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  font-weight: 600;
}

.login-success-instruction {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.login-success a {
  color: #1b5e20;
  font-weight: 600;
  text-decoration: underline;
}

.login-success a:hover {
  color: #0d3d10;
}

.login-success .qr-code-container {
  text-align: center;
  margin: 1rem 0;
}

.login-success .qr-code-container img {
  width: 200px;
  height: 200px;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

.login-success .manual-setup-code {
  font-size: 0.75rem;
  color: #2e7d32;
  margin: 0.5rem 0 0 0;
  word-wrap: break-word;
  line-height: 1.5;
}

.login-success .manual-setup-code strong {
  display: block;
  margin-bottom: 0.25rem;
}

.login-success .manual-setup-code code {
  background: #c8e6c9;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  display: inline-block;
  margin-top: 0.25rem;
  font-family: 'Courier New', Courier, monospace;
  color: #1b5e20;
  word-break: break-all;
  line-height: 1.4;
  border: 1px solid #a5d6a7;
}

.login-help-text {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #666666;
  line-height: 1.4;
}

/* VerifyAuthenticatorCode: wider card for QR code */
.verify-auth-card .login-card {
  max-width: 520px;
}

@media (max-width: 767px) {
  .login-page {
    padding: 1rem;
  }
  .login-card {
    padding: 1.5rem;
    max-width: 100%;
  }
  .login-title {
    font-size: 1.375rem;
  }
  .login-form-control {
    font-size: 16px;
  }
}

/* Back / secondary nav link (Forgot password, etc.) */
.login-back {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.login-back a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.login-back a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.login-error .validation-summary-errors {
  list-style: none;
  margin: 0;
  padding: 0;
}

.login-error .validation-summary-errors li {
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.25rem;
  }
  .login-btn {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
  }
}
