/* ============================================================
   TRADE GRID — login.css
   Split layout: form left, illustration right
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:        #0D3B3B;
  --accent:         #0FA3B1;
  --light:          #B5EAF0;
  --bg:             #F0FAFB;
  --text:           #1A1A1A;
  --white:          #FFFFFF;
  --primary-dark:   #082828;
  --border:         rgba(13,59,59,0.12);
  --border-card:    rgba(13,59,59,0.10);
  --text-secondary: #4a6464;
  --text-muted:     #7a9a9a;
  --font:           'Inter', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--primary);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.login-page {
  display: grid;
  grid-template-columns: 480px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ============================================================
   LEFT: FORM PANEL
   FIX: overflow hidden + flex centering keeps content on screen
   ============================================================ */
.form-panel {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 52px;
  position: relative;
  z-index: 2;
  box-shadow: 4px 0 40px rgba(0,0,0,0.15);
  overflow: hidden;        /* no scrollbar */
}

.form-inner {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Brand logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.01em;
}
.brand-logo svg { stroke: var(--accent); }

/* Heading */
.form-heading h1 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}
.form-heading p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Login type row */
.login-type-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}
.back-link:hover { color: var(--primary); }
.back-link i { font-size: 1rem; }

.login-type-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(15,163,177,0.1);
  border: 1px solid rgba(15,163,177,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}
.login-type-badge i { font-size: 14px; }

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border-card);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,163,177,0.12);
  background: var(--white);
}

/* Password wrapper */
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 46px; }

.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--primary); }

/* Forgot link */
.forgot-link {
  font-size: 0.83rem;
  color: var(--accent);
  font-weight: 500;
  align-self: flex-start;
  transition: color 0.2s;
}
.forgot-link:hover { color: var(--primary); }

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 4px;
}
.btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Sign up prompt */
.signup-prompt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
}
.signup-prompt a {
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s;
}
.signup-prompt a:hover { color: var(--primary); }

/* ============================================================
   FORGOT PASSWORD MODAL
   ============================================================ */
.forgot-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 40, 40, 0.58);
  backdrop-filter: blur(5px);
}

.forgot-modal-backdrop.open {
  display: flex;
}

.forgot-modal {
  width: min(100%, 420px);
  position: relative;
  background: var(--white);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.forgot-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--primary);
  cursor: pointer;
  font-size: 18px;
}

.forgot-heading {
  padding-right: 30px;
  margin-bottom: 18px;
}

.forgot-heading h2 {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.forgot-heading p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.forgot-form.hidden {
  display: none;
}

.forgot-form label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.forgot-form input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border-card);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
}

.forgot-form input:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(15,163,177,0.12);
}

/* ============================================================
   RIGHT: VISUAL PANEL
   ============================================================ */
.visual-panel {
  background: linear-gradient(145deg, #082828 0%, #0D3B3B 45%, #0f4848 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Decorative blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}
.blob-1 { width: 400px; height: 400px; background: var(--accent); top: -100px; right: -80px; }
.blob-2 { width: 300px; height: 300px; background: var(--light); bottom: -60px; left: -60px; }
.blob-3 { width: 200px; height: 200px; background: #0FA3B1; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* Illustration container */
.illustration-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 40px;
  max-width: 560px;
}

.trade-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(15,163,177,0.2));
}

/* Grid overlay */
.visual-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(181,234,240,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181,234,240,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Tagline */
.visual-tagline {
  text-align: center;
  position: relative;
  z-index: 2;
}
.visual-tagline h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}
.visual-tagline h2 span { color: var(--light); }
.visual-tagline p {
  font-size: 0.9rem;
  color: rgba(181,234,240,0.7);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  body { overflow: auto; }
  .login-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }
  .visual-panel { display: none; }
  .form-panel {
    padding: 48px 32px;
    min-height: 100vh;
    box-shadow: none;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .form-panel { padding: 36px 24px; }
  .form-heading h1 { font-size: 1.6rem; }
}
