*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: url(background.svg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ── Page layout ── */
.page-wrapper {
  display: flex;
  width: 100%;
  max-width: 960px;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04), 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* ── Left promo panel ── */
.promo-panel {
  flex: 1;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 44px;
  color: #f8fafc;
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid texture */
.promo-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* Decorative arc — top right */
.promo-panel::after {
  content: '';
  position: absolute;
  top: -180px;
  right: -140px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.promo-inner {
  position: relative;
  z-index: 1;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-logo {
  height: 34px;
  width: auto;
}

/* Promo copy */
.promo-text {
  margin-bottom: 22px;
}

.promo-headline {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  color: #f8fafc;
}

.promo-sub {
  font-size: 13px;
  color: rgba(248, 250, 252, 0.55);
  line-height: 1.6;
  max-width: 400px;
}

/* Feature list */
.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: rgba(248, 250, 252, 0.7);
}

.feature-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 16px;
  height: 16px;
  color: rgba(248, 250, 252, 0.6);
}

/* App download */
.app-download {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-download-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.38);
  margin-bottom: 10px;
}

.app-btns {
  display: flex;
  gap: 10px;
}

.app-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  flex: 1;
}

.app-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.app-btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.88;
}

.app-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.app-btn-sub {
  font-size: 10px;
  color: rgba(248, 250, 252, 0.48);
  letter-spacing: 0.1px;
}

.app-btn-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

/* ── Right login panel ── */
.login-panel {
  width: 420px;
  flex-shrink: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 44px;
  border-left: 1px solid #e2e8f0;
}

.login-card {
  width: 100%;
}

/* Login brand mark */
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.login-logo {
  height: 30px;
  width: auto;
}
.login-left-brand-name{
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.1px;
}
.login-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.1px;
}

/* Login header */
.login-header {
  margin-bottom: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-sub {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* ── Form ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  letter-spacing: 0.1px;
}

.field input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
  width: 100%;
  -webkit-appearance: none;
}

.field input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #fff;
}

.field input:hover:not(:focus) {
  border-color: #cbd5e1;
}

.field input::placeholder {
  color: #94a3b8;
}

/* Password wrapper */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #94a3b8;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  line-height: 0;
}

.toggle-password:hover {
  color: #475569;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Custom checkbox */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-label input:checked ~ .checkmark {
  background: #2563eb;
  border-color: #2563eb;
}

.checkbox-label input:checked ~ .checkmark::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 7px;
  border: 1.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-0.5px, -1px);
}

/* Error banner */
.error-banner {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 16px;
  line-height: 1.4;
}

.error-banner.visible {
  display: block;
}

/* Login button */
.btn-login {
  width: 100%;
  height: 44px;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  letter-spacing: 0.1px;
}

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

.btn-login:active {
  transform: scale(0.99);
}

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

.btn-login .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  display: none;
}

.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-text { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* OR divider */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: 0.3px;
  margin: 12px 0;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Google button */
#google-btn {
  display: flex;
  justify-content: center;
}

/* Footer */
.footer-text {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  body { padding: 24px 16px; }

  .page-wrapper {
    max-width: 420px;
    min-height: unset;
    border-radius: 14px;
  }

  .promo-panel { display: none; }

  .login-panel {
    width: 100%;
    border-left: none;
    padding: 44px 36px;
  }
}

@media (max-width: 400px) {
  body { padding: 0; }

  .page-wrapper { border-radius: 0; box-shadow: none; }

  .login-panel { padding: 40px 24px; }
}

/* ── Forgot password link ── */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #2563eb;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: color 0.15s;
}

.link-btn:hover:not(:disabled) {
  color: #1d4ed8;
  text-decoration: underline;
}

.link-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

/* ── FP screens shared ── */
.fp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 20px;
  transition: color 0.15s;
}

.fp-back-btn:hover {
  color: #0f172a;
}

.fp-header {
  margin-bottom: 20px;
}

.fp-action-btn {
  margin-top: 16px;
}

/* ── OTP inputs ── */
.otp-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.otp-input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

.otp-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #fff;
}

.otp-input.filled {
  border-color: #2563eb;
  background: #eff6ff;
}

/* ── Resend row ── */
.otp-resend-row {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #64748b;
}

/* ── Success banner ── */
.success-banner {
  display: none;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  color: #16a34a;
  margin-bottom: 16px;
  line-height: 1.4;
}

.success-banner.visible {
  display: block;
}

@media (max-width: 360px) {
  .otp-group { gap: 5px; }
  .otp-input { width: 38px; height: 46px; font-size: 18px; }
}

/* ── Two-Factor Authentication ── */
.twofa-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #2563eb;
}

.twofa-icon-wrap svg {
  width: 26px;
  height: 26px;
}

.twofa-cancel-link {
  color: #64748b;
  font-size: 13px;
}

.twofa-cancel-link:hover:not(:disabled) {
  color: #0f172a;
}
