/* ===========================================================
   SYNTHEDGE — AUTH PAGES CSS
   File: css/auth.css
   Used by: login.html, register.html
   Depends on: variables.css, base.css, landing.css (buttons)
   =========================================================== */

.auth-body { min-height: 100vh; background: var(--bg-base); display: flex; align-items: stretch; }
.auth-layout { display: flex; width: 100%; min-height: 100vh; }

/* ---------- LEFT PANEL ---------- */
.auth-left {
  flex: 1; background: var(--bg-raised);
  border-right: 1px solid var(--border);
  padding: var(--space-10) var(--space-12);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; top: -100px; left: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, var(--green-soft) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content: ''; position: absolute; bottom: -80px; right: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, var(--blue-soft) 0%, transparent 70%);
  pointer-events: none;
}

.auth-logo { margin-bottom: var(--space-16); position: relative; z-index: 1; }
.auth-left-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 440px; position: relative; z-index: 1; }
.auth-left-content h1 {
  font-size: clamp(1.8rem, 3vw, var(--text-3xl));
  font-weight: 800; line-height: 1.12; letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.auth-left-content p { color: var(--text-2); font-size: var(--text-md); line-height: 1.7; margin-bottom: var(--space-10); }

.auth-stats { display: flex; gap: var(--space-8); flex-wrap: wrap; }
.as-num { display: block; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--green); }
.as-label { font-size: var(--text-xs); color: var(--text-3); margin-top: 2px; display: block; }

.auth-checklist { display: flex; flex-direction: column; gap: var(--space-3); position: relative; z-index: 1; }
.auth-checklist li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--text-md); color: var(--text-2); }
.ck-icon { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ---------- RIGHT PANEL ---------- */
.auth-right { width: 480px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: var(--space-10) var(--space-6); overflow-y: auto; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card-header { margin-bottom: var(--space-7, 28px); }
.auth-card-header h2 { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-2); }
.auth-card-header p { color: var(--text-3); font-size: var(--text-md); }

/* ---------- SERVER ERROR BANNER (real, populated by JS) ---------- */
.form-banner {
  background: var(--red-soft); border: 1px solid var(--red-border);
  border-radius: var(--r-sm); padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); color: var(--red);
  margin-bottom: var(--space-5);
}
.form-banner.success { background: var(--green-soft); border-color: var(--green-border); color: var(--green); }

/* ---------- FORM ---------- */
.auth-form { display: flex; flex-direction: column; gap: var(--space-5); }
.form-group { display: flex; flex-direction: column; gap: var(--space-2); }
.form-group label {
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
  display: flex; justify-content: space-between; align-items: center;
}
.label-link { font-size: 11px; font-weight: 500; color: var(--green); text-transform: none; letter-spacing: 0; transition: opacity var(--dur-fast) var(--ease); }
.label-link:hover { opacity: .8; }
.label-optional { font-weight: 400; color: var(--text-3); text-transform: none; letter-spacing: 0; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; color: var(--text-3); pointer-events: none; flex-shrink: 0; }
.auth-input {
  width: 100%; padding: 10px 40px 10px 38px;
  font-family: var(--font-body); font-size: var(--text-base);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance: none;
}
.auth-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.auth-input.error { border-color: var(--red); }
.auth-input.success { border-color: var(--green); }
.auth-select { cursor: pointer; }
.auth-select option { background: var(--bg-card); color: var(--text-1); }

.pw-toggle { position: absolute; right: 12px; color: var(--text-3); transition: color var(--dur-fast) var(--ease); padding: 2px; }
.pw-toggle:hover { color: var(--text-1); }

/* ---------- PASSWORD STRENGTH ---------- */
.pw-strength { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.pws-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.pws-fill { height: 100%; width: 0%; border-radius: 2px; transition: width var(--dur-base) var(--ease), background var(--dur-base) var(--ease); }
.pws-label { font-size: 11px; color: var(--text-3); white-space: nowrap; min-width: 60px; text-align: right; }

.field-error { font-size: 11px; color: var(--red); min-height: 14px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

/* ---------- CHECKBOX ---------- */
.checkbox-label { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-sm); color: var(--text-2); cursor: pointer; line-height: 1.4; }
.checkbox-label input { display: none; }
.checkbox-custom {
  width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: var(--bg-card);
  transition: all var(--dur-fast) var(--ease); position: relative;
}
.checkbox-label input:checked + .checkbox-custom { background: var(--green); border-color: var(--green); }
.checkbox-label input:checked + .checkbox-custom::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: 2px solid var(--text-on-accent);
  border-top: none; border-left: none; transform: rotate(45deg);
}
.checkbox-label a { color: var(--green); }
.form-row-check { margin-top: -4px; }

.auth-submit { margin-top: var(--space-1); padding: 12px 24px; font-size: var(--text-md); justify-content: center; gap: var(--space-3); }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(7,20,14,0.3); border-top-color: var(--text-on-accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-footer-link { text-align: center; margin-top: var(--space-6); font-size: var(--text-sm); color: var(--text-3); }
.auth-footer-link a { color: var(--green); }

.auth-security-note { display: flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: 11px; color: var(--text-3); margin-top: var(--space-4); }
.auth-security-note svg { color: var(--green); flex-shrink: 0; }

/* ---------- RESPONSIVE ----------
   This is the real mobile fix: below 900px the marketing left
   panel is dropped entirely (it's decorative, not functional)
   so the form takes the full, usable width on phones. ---------- */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; }
}
@media (max-width: 480px) {
  .auth-right { padding: var(--space-6) var(--space-4); }
  .form-row-2 { grid-template-columns: 1fr; }
}