/* ── Login Page Specific ─────────────────────── */
body {
  background: linear-gradient(135deg, #1e3a8a 0%, #2B5CE6 50%, #3b82f6 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-wrapper {
  display: flex;
  width: 100%;
  max-width: 900px;
  min-height: 520px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

/* Left panel — branding */
.login-brand {
  flex: 1;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: white;
  text-align: center;
}

.login-brand-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
}

.login-brand h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.login-brand p {
  font-size: 14px;
  opacity: 0.75;
  line-height: 1.7;
  max-width: 260px;
}

.login-brand-modules {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.login-brand-modules span {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
}

/* Right panel — form */
.login-form-panel {
  width: 380px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}

.login-form-panel h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 6px;
}

.login-form-panel .login-sub {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 32px;
}

.login-field {
  margin-bottom: 18px;
}

.login-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  font-size: 15px;
}

.login-input-wrap input {
  width: 100%;
  padding: 11px 12px 11px 38px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  color: #1F2937;
  background: #F9FAFB;
  transition: all 0.2s;
  outline: none;
}

.login-input-wrap input:focus {
  border-color: #2B5CE6;
  background: white;
  box-shadow: 0 0 0 3px rgba(43,92,230,0.1);
}

.login-input-wrap input.is-invalid {
  border-color: #DC2626;
}

/* Password show/hide toggle */
.login-input-wrap--pw input {
  padding-right: 40px;
}

.login-pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
  color: #9CA3AF;
  font-size: 15px;
  line-height: 1;
}

.login-pw-toggle:hover {
  color: #6B7280;
}

/* Reset the generic left-icon positioning for the toggle's own icon */
.login-pw-toggle i {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  color: inherit;
}

.login-error {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-error.d-none {
  display: none;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: #2B5CE6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.login-btn:hover {
  background: #1f4db8;
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #374151;
}

/* ── Two-factor step ─────────────────────────────────────── */
.login-2fa-setup {
  margin-bottom: 18px;
}

.login-2fa-help {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 12px;
}

.login-2fa-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-2fa-qr img {
  width: 180px;
  height: 180px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.login-2fa-secret {
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  line-height: 1.6;
}

.login-2fa-secret code {
  font-size: 13px;
  color: #111827;
  background: #F3F4F6;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
  word-break: break-all;
}

.login-2fa-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
}

.login-2fa-links a {
  color: var(--primary, #2B5CE6);
  text-decoration: none;
}

.login-2fa-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .login-brand { display: none; }
  .login-form-panel { width: 100%; }
}
