@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root {
  --primary: #4C1D95;
  --primary-dark: #3b1480;
  --primary-light: #f5f3ff;
  --primary-mid: #7c3aed;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --bg-alt: #f8fafc;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  display: flex;
  height: 100vh;
}

/* ===== TWO COLUMN LAYOUT ===== */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100vh;
}

/* LEFT — Form Panel */
.auth-left {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 40px 56px;
  background: white;
}
.auth-left-inner {
  max-width: 420px;
  width: 100%;
  margin: auto;
}

/* RIGHT — Brand Panel */
.auth-right {
  background: linear-gradient(145deg, #1e0a4a 0%, #4c1d95 45%, #7c3aed 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.auth-right::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  top: -100px; right: -100px;
  border-radius: 50%;
}
.auth-right::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  bottom: -80px; left: -80px;
  border-radius: 50%;
}
.auth-right-content { position: relative; z-index: 1; text-align: center; color: white; max-width: 380px; }
.auth-right-content img { height: 36px; filter: brightness(0) invert(1); margin-bottom: 48px; }
.auth-right-mockup {
  width: 100%; max-width: 320px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 24px;
  margin: 0 auto 40px;
}
.auth-right-mockup .stat {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.auth-right-mockup h2 { font-size: 28px; font-weight: 800; color: white; margin-bottom: 4px; }
.auth-right-mockup p { font-size: 12px; color: rgba(255,255,255,0.6); }
.auth-right-mockup .trend { font-size: 12px; color: #10b981; font-weight: 600; background: rgba(16,185,129,0.15); padding: 3px 8px; border-radius: 20px; }
.auth-right-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 6px 14px; border-radius: 20px; font-size: 12px; color: rgba(255,255,255,0.8); margin-bottom: 16px; }
.auth-right h2 { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.auth-right > .auth-right-content > p { font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.7; }
.auth-feature-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.pill { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); padding: 6px 14px; border-radius: 20px; font-size: 12px; color: rgba(255,255,255,0.85); font-weight: 500; }

/* Logo on left */
.auth-logo-left { margin-bottom: 40px; }
.auth-logo-left img { height: 28px; object-fit: contain; }

/* Auth header */
.auth-header { margin-bottom: 28px; text-align: left; }
.auth-header h1 { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 8px; color: var(--text-main); }
.auth-header p { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px; font-size: 14px;
  font-family: inherit; outline: none;
  transition: border-color 0.2s; background: white; color: var(--text-main);
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.08); }
.input-with-icon { position: relative; }
.input-with-icon input { padding-left: 42px; }
.input-with-icon .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 14px; }
.input-with-icon .toggle-pw { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 14px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Checkbox */
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.checkbox-label input[type="checkbox"] { margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.checkbox-label a { color: var(--primary); }

/* Forgot link */
.form-footer-link { text-align: right; margin-bottom: 16px; }
.form-footer-link a, .link { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 500; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; width: 100%; transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: white; color: var(--text-main); border: 1.5px solid var(--border-color); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn + .btn { margin-top: 10px; }

/* Divider */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 12px; color: var(--text-light); font-weight: 500; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

/* Social */
.social-btns { display: flex; gap: 10px; }
.social-btns .btn { flex: 1; padding: 11px; font-size: 13px; }

/* Bottom text */
.auth-bottom { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted); }
.auth-bottom a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-bottom a:hover { text-decoration: underline; }

/* Back btn */
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; font-weight: 500; margin-bottom: 24px; cursor: pointer; background: none; border: none; font-family: inherit; }
.back-btn:hover { color: var(--primary); }

/* OTP */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.otp-row input { width: 52px; height: 56px; text-align: center; font-size: 20px; font-weight: 700; border: 2px solid var(--border-color); border-radius: 12px; outline: none; transition: border-color 0.2s; }
.otp-row input:focus { border-color: var(--primary); }

/* Info box */
.info-box { background: var(--primary-light); border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: 13px; color: var(--primary); display: flex; gap: 10px; align-items: flex-start; }

/* Success */
.success-circle { width: 80px; height: 80px; background: #d1fae5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; color: var(--success); margin: 0 auto 20px; }

/* Method cards (2FA) */
.method-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 2px solid var(--border-color); border-radius: 14px; cursor: pointer; margin-bottom: 12px; transition: all 0.2s; }
.method-card:hover, .method-card.selected { border-color: var(--primary); background: var(--primary-light); }
.method-icon { width: 44px; height: 44px; background: var(--primary-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary); flex-shrink: 0; }
.method-card.selected .method-icon { background: var(--primary); color: white; }
.method-text h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.method-text p { font-size: 12px; color: var(--text-muted); }
.method-radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-color); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.method-card.selected .method-radio { border-color: var(--primary); background: var(--primary); }
.method-card.selected .method-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: white; }

/* QR / Backup */
.qr-box { width: 160px; height: 160px; background: var(--bg-alt); border: 2px dashed var(--border-color); border-radius: 16px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.secret-key { background: var(--bg-alt); border: 1px solid var(--border-color); border-radius: 10px; padding: 12px 16px; font-family: monospace; font-size: 13px; letter-spacing: 2px; text-align: center; color: var(--text-main); margin-bottom: 16px; word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.backup-code { background: var(--bg-alt); border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; font-family: monospace; font-size: 13px; text-align: center; font-weight: 600; }

/* ===== RESPONSIVENESS AND MOBILE ADAPTATION ===== */
@media (max-width: 992px) {
  html, body {
    height: auto;
    overflow: auto;
  }
  
  body {
    min-height: 100vh;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .auth-left {
    padding: 48px 24px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-left-inner {
    max-width: 440px;
    margin: auto 0;
  }

  .auth-right {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .social-btns {
    flex-direction: column;
    gap: 8px;
  }
  
  .social-btns .btn {
    width: 100%;
  }

  .otp-row {
    gap: 6px;
  }

  .otp-row input {
    width: 42px;
    height: 48px;
    font-size: 16px;
    border-radius: 8px;
  }
}

@media (max-width: 360px) {
  .backup-codes {
    grid-template-columns: 1fr;
  }
}

