/* ============================================================
   Iqinvest365 — Shared Stylesheet
   styles.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #c8982a;
  --gold-light: #f0c84a;
  --gold-pale:  #fdf6e3;
  --navy:       #0d1b2e;
  --navy-mid:   #1e3452;
  --text:       #1a1a2e;
  --muted:      #7a8599;
  --border:     #e2ddd4;
  --bg:         #f7f4ef;
  --white:      #ffffff;
  --shadow:     rgba(13,27,46,0.10);
  --green:      #3a7d32;
  --green-pale: #eaf5e8;
}

html, body {
  min-height: 100%;
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* Prevent zoom on input focus and typing */
input, textarea, select, button {
  font-size: 16px;
  -webkit-user-scalable: no;
  user-scalable: no;
}

/* ── Split page layout ── */
.page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* ============================================================
   HERO PANEL (left)
   ============================================================ */
.hero {
  position: relative;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(200,152,42,0.22) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(30,52,82,0.8)    0%, transparent 70%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(13,27,46,1)      0%, transparent 100%);
  animation: meshMove 10s ease-in-out infinite alternate;
}

@keyframes meshMove {
  from { opacity: 1; }
  to   { opacity: 0.85; filter: hue-rotate(8deg); }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,152,42,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,152,42,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero > * { position: relative; z-index: 1; }

/* Logo */
.hero-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { box-shadow: 0 4px 16px rgba(200,152,42,0.30); }
  to   { box-shadow: 0 6px 28px rgba(200,152,42,0.60); }
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.logo-tag {
  font-size: 10px;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Hero body */
.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px; height: 1px;
  background: var(--gold);
}

.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 20px;
}

.hero-headline em {
  color: var(--gold-light);
  font-style: italic;
}

.hero-sub {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.75;
  max-width: 340px;
  margin-bottom: 40px;
}

/* Stats (login hero) */
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,152,42,0.2);
  border-radius: 14px;
  padding: 16px 20px;
  min-width: 110px;
  animation: floatUp 0.6s cubic-bezier(.22,1,.36,1) both;
}

.stat-card:nth-child(1) { animation-delay: 0.10s; }
.stat-card:nth-child(2) { animation-delay: 0.20s; }
.stat-card:nth-child(3) { animation-delay: 0.30s; }

.stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Benefits list (signup hero) */
.benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  animation: floatUp 0.5s cubic-bezier(.22,1,.36,1) both;
}

.benefit:nth-child(1) { animation-delay: 0.05s; }
.benefit:nth-child(2) { animation-delay: 0.12s; }
.benefit:nth-child(3) { animation-delay: 0.19s; }
.benefit:nth-child(4) { animation-delay: 0.26s; }

.benefit-dot {
  width: 20px; height: 20px;
  flex-shrink: 0;
  background: rgba(200,152,42,0.18);
  border: 1px solid rgba(200,152,42,0.35);
  border-radius: 6px;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.benefit-dot svg { width: 11px; height: 11px; color: var(--gold-light); }

/* Hero footer */
.hero-footer {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}

/* ============================================================
   FORM PANEL (right)
   ============================================================ */
.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 30px 30px 30px 35px;
  background: var(--white);
  overflow-y: auto;
  min-height: 100%;
}

.form-box {
  width: 100%;
  max-width: 420px;
  animation: slideIn 0.55s cubic-bezier(.22,1,.36,1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.form-head { margin-bottom: 32px; }

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-subtitle {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.form-subtitle a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.form-subtitle a:hover { opacity: 0.75; }

/* ── Field groups ── */
.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.input-wrap { position: relative; }

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #c5c5d0;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap.focused .input-icon { color: var(--gold); }

input[type="email"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(200,152,42,0.10);
}

input::placeholder { color: #c0bdb6; }

.toggle-pw {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-pw:hover { color: var(--gold); }

/* ── Password strength ── */
.strength-wrap { margin-top: 7px; display: none; }
.strength-wrap.show { display: block; }

.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.sbar {
  flex: 1; height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.3s;
}

.strength-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ── Validation messages ── */
.validation-message {
  font-size: 11px;
  font-weight: 500;
  margin-top: 5px;
  min-height: 16px;
  display: none;
  letter-spacing: 0.05em;
}

.validation-message.show { display: block; }

.validation-message.success {
  color: var(--green);
}

.validation-message.error {
  color: #e05252;
}

/* ── Row: remember + forgot (login) ── */
.row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.check-label input[type=checkbox] {
  accent-color: var(--gold);
  width: 15px; height: 15px;
  cursor: pointer;
}

.forgot-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  transition: opacity 0.2s;
}

.forgot-link:hover { opacity: 0.7; }

/* ── Terms checkbox (signup) ── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 20px;
  margin-top: 4px;
}

.check-row input[type=checkbox] {
  accent-color: var(--gold);
  width: 15px; height: 15px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.check-row label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  margin-bottom: 0;
  display: block;
}

.check-row a { color: var(--gold); font-weight: 600; text-decoration: none; }
.check-row a:hover { text-decoration: underline; }

/* ── Referral banner ── */
.referral-banner {
  display: none;
  background: var(--green-pale);
  border: 1.5px solid #b0d9ab;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  gap: 10px;
  align-items: flex-start;
}

.referral-banner.show { display: flex; }

.ref-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: #c7e8c2;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.ref-icon svg { width: 16px; height: 16px; color: var(--green); }

.ref-text { flex: 1; }

.ref-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.ref-sub {
  font-size: 11px;
  color: #5a9e50;
  line-height: 1.5;
}

.ref-code {
  font-family: 'Outfit', monospace;
  font-weight: 600;
  color: var(--green);
}

/* ── Primary button ── */
.btn-primary {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 13px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
  margin-bottom: 20px;
}

/* Login button — navy */
.btn-primary.navy {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
}

.btn-primary.navy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,152,42,0.18) 0%, transparent 60%);
  pointer-events: none;
}

.btn-primary.navy:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(13,27,46,0.28);
}

/* Signup button — gold */
.btn-primary.gold {
  background: linear-gradient(135deg, var(--gold) 0%, #a87920 100%);
  color: var(--navy);
}

.btn-primary.gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 60%);
  pointer-events: none;
}

.btn-primary.gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(200,152,42,0.35);
}

/* Disabled button state */
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary:disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-primary:active { transform: translateY(0); }

.btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.spinner.dark {
  border-color: rgba(13,27,46,0.25);
  border-top-color: var(--navy);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 11px;
  color: #c0bdb6;
  white-space: nowrap;
  letter-spacing: 0.06em;
}

/* ── Social buttons ── */
.socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-social:hover {
  background: var(--white);
  border-color: #c5c0b5;
  box-shadow: 0 2px 10px var(--shadow);
  transform: translateY(-1px);
}

.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Trust strip ── */
.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #bbb;
}

.trust svg { width: 13px; height: 13px; color: #a3c57a; }

/* ── Success overlay ── */
.success-overlay {
  display: none;
  text-align: center;
  padding: 20px 0;
  animation: fadeIn 0.4s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.success-check {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #d4ead0, #b8ddb2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}

.success-check svg { width: 32px; height: 32px; color: var(--green); }

.success-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 10px;
}

.success-msg {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 24px;
}

.success-link {
  display: inline-block;
  padding: 13px 32px;
  background: linear-gradient(135deg, var(--gold), #a87920);
  color: var(--navy);
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: box-shadow 0.2s, transform 0.15s;
}

.success-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,152,42,0.3);
}

/* ── Animations ── */
@keyframes floatUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* Ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transform: scale(0);
  animation: rpl 0.6s linear;
  pointer-events: none;
}

@keyframes rpl { to { transform: scale(4); opacity: 0; } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .page { grid-template-columns: 1fr; }
  .hero { display: none; }
  .form-panel { padding: 40px 24px; }
  .field-row { grid-template-columns: 1fr; }
}