/* ─────────────────────────────────────────────────────────────────────────────
   TradeX Migration — Set New Password Theme (1:1 Matching web-terminal login)
───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Default: LIGHT THEME */
  --bg-gradient: linear-gradient(135deg, #F4F7FC 0%, #EEF2F9 50%, #F8FAFC 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-gradient: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
  --accent-muted: rgba(37, 99, 235, 0.08);

  --input-bg: rgba(0, 0, 0, 0.025);
  --input-border: rgba(0, 0, 0, 0.12);
  --input-focus-glow: 0 0 0 3px rgba(59, 130, 246, 0.15);

  --bull: #16A34A;
  --bull-muted: rgba(22, 163, 74, 0.06);
  --bull-border: rgba(22, 163, 74, 0.15);

  --bear: #DC2626;
  --bear-muted: rgba(220, 38, 38, 0.08);
  --bear-dark: rgba(220, 38, 38, 0.2);

  --ambient-glow: radial-gradient(circle, rgba(37,99,235,0.08) 0%, rgba(79,70,229,0.04) 40%, transparent 70%);
}

html.dark {
  /* DARK THEME */
  --bg-gradient: linear-gradient(135deg, #07090E 0%, #0B0E17 50%, #080B12 100%);
  --card-bg: rgba(16, 22, 36, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);

  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-gradient: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
  --accent-muted: rgba(59, 130, 246, 0.15);

  --input-bg: rgba(255, 255, 255, 0.03);
  --input-border: rgba(255, 255, 255, 0.1);
  --input-focus-glow: 0 0 0 3px rgba(59, 130, 246, 0.15);

  --bull: #22C55E;
  --bull-muted: rgba(34, 197, 94, 0.08);
  --bull-border: rgba(34, 197, 94, 0.2);

  --bear: #EF4444;
  --bear-muted: rgba(239, 68, 68, 0.1);
  --bear-dark: rgba(239, 68, 68, 0.25);

  --ambient-glow: radial-gradient(circle, rgba(37,99,235,0.12) 0%, rgba(79,70,229,0.06) 40%, transparent 70%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow background */
.ambient-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--ambient-glow);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Theme toggle button */
.theme-toggle-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Card layout */
.card-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.card {
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 36px 32px 32px;
  box-shadow: var(--card-shadow);
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardIn {
  0% { opacity: 0; transform: translateY(28px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.card-view {
  display: none;
}

.card-view.active {
  display: block;
}

/* Header */
.card-header {
  text-align: center;
  margin-bottom: 20px;
}

.logo-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 8px 20px rgba(37,99,235,0.3);
}

.header-icon {
  color: #ffffff;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.45;
}

/* Broker / Migration Widget */
.broker-widget {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
}

.broker-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.broker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.broker-text-wrap {
  display: flex;
  flex-direction: column;
}

.broker-sub {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.broker-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.broker-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #22C55E;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.08);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  display: inline-block;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Error Alert */
.error-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 18px;
  background: var(--bear-muted);
  color: var(--bear);
  border: 1px solid var(--bear-dark);
  font-size: 13px;
  line-height: 1.4;
}

/* Form controls */
#forgotForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.input-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  height: 48px;
  padding-left: 42px;
  padding-right: 44px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: var(--input-focus-glow);
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent);
}

.form-input.input-error {
  border-color: var(--bear);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.pwd-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s ease;
}

.pwd-toggle-btn:hover {
  color: var(--text-primary);
}

/* Shake Animation */
.card-shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px); }
  30% { transform: translateX(6px); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
  90% { transform: translateX(2px); }
}

/* Primary Button */
.primary-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-gradient);
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

.primary-btn:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.secondary-btn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
}

.secondary-btn:hover {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent);
}

/* Spinner */
.spinner {
  animation: spin 1s linear infinite;
}

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

/* Card footer */
.card-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.back-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}

.back-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Success View */
.success-header {
  text-align: center;
  margin-bottom: 20px;
}

.success-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16A34A, #22C55E);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(34,197,94,0.35);
  margin: 0 auto 16px;
  animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.highlight-user {
  color: var(--accent);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s ease;
  animation: stepIn 0.3s ease-out forwards;
}

@keyframes stepIn {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.step-item.step-complete {
  background: var(--bull-muted);
  border-color: var(--bull-border);
  color: var(--bull);
}

.step-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.step-item.step-complete .step-icon {
  background: #22C55E;
}

/* ── Step Progress Indicator ────────────────────────────────────────────────── */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.step-pill.active {
  color: var(--accent);
}

.step-pill.completed {
  color: var(--bull);
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.step-pill.active .step-number {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37,99,235,0.35);
}

.step-pill.completed .step-number {
  background: #22C55E;
  border-color: transparent;
  color: #ffffff;
}

.step-connector {
  flex: 0 0 30px;
  height: 2px;
  background: var(--card-border);
  border-radius: 1px;
  transition: background 0.25s ease;
}

.step-connector.active {
  background: var(--accent);
}

/* ── Verified User Badge Card (Step 2) ──────────────────────────────────────── */
.verified-user-card {
  background: var(--bull-muted);
  border: 1px solid var(--bull-border);
  border-left: 4px solid var(--bull);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeInDown 0.35s ease-out forwards;
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.verified-user-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.verified-user-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.verified-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,0.25);
}

.verified-user-info {
  display: flex;
  flex-direction: column;
}

.verified-user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.verified-user-details {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 1px;
}

.change-account-btn {
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.change-account-btn:hover {
  background: var(--accent-muted);
  border-color: var(--accent);
}

.verified-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bull);
  background: rgba(34, 197, 94, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
}

/* ── 4-Digit OTP Inputs & Timer ─────────────────────────────────────────── */
.otp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resend-otp-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.resend-otp-btn:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.otp-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.otp-box {
  width: 100%;
  height: 52px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp-box:focus {
  border-color: var(--accent);
  box-shadow: var(--input-focus-glow);
  transform: translateY(-1px);
}

.otp-box.input-error {
  border-color: var(--bear);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.otp-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Dual Brand Header Banner & Logos ────────────────────────────────────── */
.brand-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.brand-box {
  flex: 1;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  overflow: hidden;
}

.tradex-brand {
  background: #1D4ED8;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}

.marketx-brand {
  background: #FFFFFF;
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2), 0 2px 6px rgba(0, 0, 0, 0.05);
}

.brand-img {
  max-height: 32px;
  max-width: 90%;
  object-fit: contain;
}

.tradex-img {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.marketx-img {
  max-height: 28px;
  width: auto;
  object-fit: contain;
}

.migration-arrow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.migration-pill {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.migration-arrow-icon {
  color: var(--accent);
  animation: pulseArrow 1.8s infinite ease-in-out;
}

@keyframes pulseArrow {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(3px); opacity: 1; }
}

/* Tagline Banner */
.tagline-banner {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #22C55E;
  margin-bottom: 20px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Verified Avatar Logo */
.verified-avatar-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Success Brand Row */
.success-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-muted);
}

.success-logo-small {
  height: 24px;
  max-width: 80px;
  object-fit: contain;
  border-radius: 6px;
}

/* ── Ticker Announcement Bars (Header & Footer Marquee) ───────────────────── */
body {
  padding-top: 54px;
  padding-bottom: 54px;
}

.ticker-bar {
  position: fixed;
  left: 0;
  right: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-style: solid;
  border-color: var(--card-border);
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.ticker-top {
  top: 0;
  border-width: 0 0 1px 0;
  border-bottom-color: rgba(37, 99, 235, 0.2);
}

.ticker-bottom {
  bottom: 0;
  border-width: 1px 0 0 0;
  border-top-color: rgba(34, 197, 94, 0.25);
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.ticker-badge.hindi-badge {
  background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.pulse-dot.orange {
  background: #F97316;
}

.ticker-content-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-text {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  transition: opacity 0.35s ease, transform 0.35s ease;
  animation: marqueeContinuous 26s linear infinite;
}

.ticker-bar:hover .ticker-text {
  animation-play-state: paused;
}

.ticker-fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

@keyframes marqueeContinuous {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ── Friendly Migration Guidelines Popup Modal ──────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: translateY(28px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--accent-muted);
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 2px;
}

.modal-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
  display: block;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border-left: 3.5px solid var(--accent);
}

.modal-info-item.position-alert {
  border-left-color: #F59E0B;
  background: rgba(245, 158, 11, 0.08);
}

.modal-info-item.balance-alert {
  border-left-color: #3B82F6;
  background: rgba(59, 130, 246, 0.08);
}

.info-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-item-content {
  flex: 1;
}

.info-heading {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-en {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
}

.info-hi {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--card-border);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.lang-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-muted);
  padding: 1.5px 5px;
  border-radius: 4px;
  margin-right: 4px;
}

.modal-action-btn {
  width: 100%;
  height: 48px;
  font-size: 14px;
}

/* ── Mobile Responsiveness & Overflow Fixes ─────────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 640px) {
  body {
    min-height: 100dvh;
    padding: 42px 12px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .ambient-glow {
    width: 360px;
    height: 360px;
    filter: blur(50px);
  }

  .theme-toggle-btn {
    top: 44px;
    right: 14px;
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 16px;
  }

  .card-container {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: auto 0;
  }

  .card {
    padding: 28px 22px 26px;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  }

  .brand-header-banner {
    gap: 8px;
    margin-bottom: 10px;
  }

  .brand-box {
    height: 48px;
    padding: 4px 8px;
    border-radius: 12px;
  }

  .brand-img {
    max-height: 28px;
  }

  .tradex-img {
    max-height: 28px;
  }

  .marketx-img {
    max-height: 25px;
  }

  .migration-pill {
    font-size: 7.5px;
    padding: 2px 5px;
  }

  .migration-arrow-icon {
    width: 16px;
    height: 16px;
  }

  .tagline-banner {
    font-size: 9px;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
  }

  .step-progress {
    gap: 8px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .step-pill {
    font-size: 11.5px;
    gap: 5px;
  }

  .step-number {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .step-connector {
    flex: 0 0 20px;
  }

  .card-header {
    margin-bottom: 16px;
  }

  .card-title {
    font-size: 20px;
  }

  .card-subtitle {
    font-size: 12px;
    line-height: 1.45;
  }

  .broker-widget {
    padding: 9px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .broker-title {
    font-size: 12px;
  }

  .form-input {
    height: 48px;
    font-size: 14px;
    padding-left: 42px;
    padding-right: 42px;
    border-radius: 12px;
  }

  .input-icon {
    left: 12px;
  }

  .pwd-toggle-btn {
    right: 12px;
  }

  .primary-btn {
    height: 48px;
    font-size: 14px;
    border-radius: 12px;
    margin-top: 4px;
  }

  .otp-wrapper {
    gap: 10px;
  }

  .otp-box {
    height: 48px;
    font-size: 20px;
    border-radius: 12px;
  }

  .verified-user-card {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .verified-user-name {
    font-size: 14px;
  }

  .verified-user-details {
    font-size: 11px;
  }

  .ticker-bar {
    height: 32px;
    padding: 0 12px;
    gap: 8px;
  }

  .ticker-badge {
    font-size: 9px;
    padding: 3px 8px;
  }

  .ticker-text {
    font-size: 11px;
  }

  .card-footer {
    margin-top: 18px;
    padding-top: 14px;
  }
}





