/* Standalone styling for the auth pages (/login, /2fa, /forget-password,
   /password-reset, /register, /accept-invite). Self-contained on purpose: the
   portal static assets live behind requirePortalSession, so these pages must not
   reference /portal/*. Values mirror the original auth screen in portal.css. */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a2e;
}

/* ── Layout ── */
#auth-screen { display: flex; min-height: 100vh; background: #0f0a1a; }

.auth-left {
  flex: 1;
  background: linear-gradient(160deg, #3c096c 0%, #240046 50%, #10002b 100%);
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px 44px;
  position: relative; overflow: hidden;
}
.auth-left::before { content: ''; position: absolute; top: -100px; right: -100px; width: 300px; height: 300px; background: rgba(255,255,255,.04); border-radius: 50%; }
.auth-left::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 200px; height: 200px; background: rgba(255,255,255,.03); border-radius: 50%; }
.auth-left > * { position: relative; z-index: 1; }
.auth-left .logo { font-size: 32px; font-weight: 800; display: flex; align-items: center; gap: 12px; margin-bottom: 16px; letter-spacing: -.02em; }
.auth-left .tagline { font-size: 20px; font-weight: 500; opacity: .9; margin-bottom: 40px; }

.auth-usp { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; position: relative; }
.auth-usp .usp-icon { width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-usp .usp-icon svg { width: 18px; height: 18px; stroke: #c77dff; fill: none; stroke-width: 2; }
.auth-usp .usp-text h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.auth-usp .usp-text span, .auth-usp .usp-text p { font-size: 13px; opacity: .65; }

.auth-right { width: 480px; display: flex; flex-direction: column; justify-content: center; padding: 48px 44px; background: #fff; }
.auth-right .auth-form-title { font-size: 22px; font-weight: 700; color: #0f0a1a; margin-bottom: 6px; }
.auth-right .auth-form-sub { font-size: 14px; color: #6b7280; margin-bottom: 28px; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; margin-bottom: 32px; transition: color .2s; position: relative; z-index: 1; }
.back-link:hover { color: #fff; }

/* ── Form fields ── */
.form-row { margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.auth-right label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #374151; }
.auth-right input:not([type="checkbox"]) {
  width: 100%; padding: 12px 16px; border: 1.5px solid #e5e7eb; border-radius: 12px;
  font-size: 14px; outline: none; font-family: inherit; transition: all .2s;
  background: #fafbfc; color: #1a1a2e;
}
.auth-right input:not([type="checkbox"]):focus { border-color: #3c096c; box-shadow: 0 0 0 3px rgba(60,9,108,.08); background: #fff; }
.auth-right input::placeholder { color: #b0b7c3; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; font-family: inherit; text-decoration: none; transition: all .2s; }
.btn-primary { width: 100%; padding: 14px; background: #3c096c; color: #fff; border-radius: 12px; font-size: 15px; font-weight: 600; }
.btn-primary:hover { background: #240046; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(60,9,108,.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-remember { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; color: #4b5563; }
.auth-remember input { width: 16px; height: 16px; accent-color: #3c096c; }
.auth-remember label { margin-bottom: 0; color: #374151; font-weight: 400; }

.auth-links { text-align: center; margin-top: 20px; font-size: 13px; color: #9ca3af; }
.auth-links a { color: #3c096c; text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

.auth-link-right { text-align: right; margin-top: 8px; }
.auth-link-right a { color: #3c096c; font-size: 13px; text-decoration: none; }
.auth-back { text-align: center; margin-top: 12px; }
.auth-back a { color: #3c096c; font-size: 13px; text-decoration: none; }

.auth-trust { display: flex; gap: 24px; justify-content: center; margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.auth-trust span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9ca3af; }
.auth-trust svg { width: 14px; height: 14px; }

.auth-heading { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #1a1a2e; }
.auth-sub { font-size: 14px; color: #6b7280; margin-bottom: 16px; }
.auth-message { margin-top: 12px; font-size: 13px; text-align: center; display: none; }
.auth-error { color: #dc2626; font-size: 13px; margin-top: 12px; text-align: center; display: none; }

/* ── Register-specific ── */
.signup-badge { display: inline-flex; align-items: center; gap: 6px; background: #f0fdf4; color: #15803d; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-bottom: 24px; width: fit-content; }
.signup-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.signup-error { background: #fef2f2; color: #dc2626; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; display: none; border: 1px solid #fecaca; }
.promo-toggle { background: none; border: none; padding: 0; color: #3c096c; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.promo-row { display: flex; gap: 8px; margin-top: 12px; }
.promo-row input { flex: 1; text-transform: uppercase; letter-spacing: 1px; }
.promo-check { padding: 12px 16px; border: 1.5px solid #e5e7eb; border-radius: 12px; background: #fafbfc; cursor: pointer; font-size: 13px; font-weight: 600; color: #3c096c; font-family: inherit; white-space: nowrap; transition: all .2s; }
.promo-check:hover { background: #f1f5f9; }
.promo-result { font-size: 12px; margin-top: 6px; display: none; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; color: #6b7280; cursor: pointer; }
.consent-row input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: #3c096c; cursor: pointer; }
.consent-row a { color: #3c096c; text-decoration: underline; font-weight: 500; }
.consent-row a:hover { color: #240046; }
.signup-success { text-align: center; padding: 20px 0; display: none; }
.signup-success h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: #0f0a1a; }
.signup-success p { color: #6b7280; font-size: 14px; line-height: 1.6; }
.portal-link { display: inline-block; padding: 14px 32px; background: #3c096c; color: #fff; border-radius: 12px; font-weight: 600; text-decoration: none; font-size: 14px; transition: all .2s; }
.portal-link:hover { background: #240046; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(60,9,108,.2); border-top-color: #3c096c; border-radius: 50%; animation: spin .8s linear infinite; }

/* ── Utilities ── */
.hidden { display: none !important; }
.mt-12 { margin-top: 12px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .auth-left { display: none; }
  .auth-right { width: 100%; padding: 32px 24px; }
}
