/* ============================================================
   IAK split-screen auth (login) — ported from the B2B-redesign
   prototype's page-auth.jsx (light iak-red theme). Scoped to .iak-auth.
   ============================================================ */
.iak-auth {
  --au-accent: #C13538; --au-accent-deep: #A1282B; --au-orange-soft: #F8B98D;
  --au-bg-soft: #FFF8F0; --au-card: #fff; --au-ink: #18181a; --au-ink-2: #2c2c2e; --au-ink-3: #5a5a5e; --au-mute: #848688;
  --au-line: rgba(20,20,23,0.08); --au-line-2: rgba(20,20,23,0.14); --au-success: #1F8A5B;
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr);
  min-height: 80vh; background: var(--au-bg-soft); color: var(--au-ink);
}
#account-register #form-register fieldset {
    border: none;
}
/* ── Brand panel ─────────────────────────────────────────── */
.iak-auth__brand { position: relative; overflow: hidden; color: #fff; padding: 48px 52px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; background: linear-gradient(165deg, #1a0a0a 0%, #A1282B 62%, #C13538 100%); }
.iak-auth__brand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 90% 0%, rgba(241,137,87,0.4) 0%, transparent 55%); }
.iak-auth__brand::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); box-shadow: 50px 50px 0 -1px rgba(255,255,255,0.08) inset; }
.iak-auth__brand > * { position: relative; z-index: 1; }
.iak-auth__logo-chip { background: transparent; display: inline-block; padding: 0; border-radius: 0; }
.iak-auth__logo-chip img { height: 40px; display: block; }
.iak-auth__copy { max-width: 440px; }
.iak-auth__kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--au-orange-soft); margin-bottom: 16px; }
.iak-auth__title { font-size: 40px; font-weight: 800; line-height: 1.05; margin: 0 0 18px; letter-spacing: -.02em; color: #fff; }
.iak-auth__body { font-size: 16px; line-height: 1.6; opacity: .86; margin: 0; }
.iak-auth__stats { display: flex; gap: 28px; margin-bottom: 24px; }
.iak-auth__stat-n { font-size: 22px; font-weight: 800; }
.iak-auth__stat-l { font-size: 12px; opacity: .7; }
.iak-auth__badges { display: flex; gap: 10px; flex-wrap: wrap; }
.iak-auth__badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); color: #fff; }
.iak-auth__badge .fa { font-size: 12px; }

/* ── Form side ───────────────────────────────────────────── */
.iak-auth__form-side { display: flex; flex-direction: column; }
.iak-auth__topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 24px 40px; font-size: 13px; color: var(--au-mute); }
.iak-auth__ghost-btn { display: inline-flex; align-items: center; padding: 8px 16px; border: 1px solid var(--au-line-2); border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--au-ink-2) !important; background: var(--au-card); text-decoration: none; }
.iak-auth__ghost-btn:hover { border-color: var(--au-accent); color: var(--au-accent) !important; }
.iak-auth__form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 40px; }
.iak-auth__form { width: 100%; max-width: 420px; }
.iak-auth__form h1 { font-size: 30px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; color: var(--au-ink); }
.iak-auth__sub { color: var(--au-ink-3); margin: 0 0 24px; font-size: 15px; }

/* Fields */
.iak-auth__field { margin-bottom: 16px; }
.iak-auth__label { display: block; font-size: 13px; font-weight: 600; color: var(--au-ink-2); margin-bottom: 7px; }
.iak-auth__input-wrap { position: relative; }
.iak-auth__input-wrap > .fa { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--au-mute); font-size: 15px; pointer-events: none; }
.iak-auth__input { width: 100%; height: 46px; border: 1px solid var(--au-line-2); border-radius: 10px; background: var(--au-card); color: var(--au-ink); font-size: 14.5px; padding: 0 14px; transition: border-color .12s, box-shadow .12s; }
.iak-auth__input--icon { padding-left: 40px; }
.iak-auth__input--toggle { padding-right: 64px; }
.iak-auth__input:focus { outline: 0; border-color: var(--au-accent); box-shadow: 0 0 0 3px rgba(193,53,56,.12); }
.iak-auth__toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--au-mute); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 8px; }
.iak-auth__toggle:hover { color: var(--au-ink-2); }
.iak-auth__row-end { text-align: right; margin: 5px 0 6px; }
.iak-auth__row-end .iak-auth__link {
	justify-content: flex-end;
}
.iak-auth__link { color: var(--au-accent) !important; font-weight: 600; font-size: 13px; text-decoration: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.iak-auth__link:hover { color: var(--au-accent-deep) !important; text-decoration: none; }
.iak-auth__submit { width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--au-accent); color: #fff !important; font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: background .12s; }
.iak-auth__submit:hover { background: var(--au-accent-deep); }

/* Note box */
.iak-auth__note { margin-top: 24px; padding: 14px; background: var(--au-card); border: 1px solid var(--au-line); border-radius: 12px; display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--au-ink-3); line-height: 1.45; }
.iak-auth__note .fa { color: var(--au-accent); font-size: 17px; flex-shrink: 0; }
.iak-auth__note a { color: var(--au-accent) !important; font-weight: 600; text-decoration: none; }
.iak-auth__note a:hover { text-decoration: underline; }

/* Alerts inside the form */
.iak-auth__form .alert { border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; padding: 11px 14px; }

/* ── Dark mode (same mechanism as the site's dark-mode.css) ── */
[data-theme="dark"] .iak-auth { --au-bg-soft: #0f0f10; --au-card: #1a1a1c; --au-ink: #f5f5f7; --au-ink-2: #e4e4e7; --au-ink-3: #b8b8bb; --au-mute: #8a8a8e; --au-line: rgba(255,255,255,.08); --au-line-2: rgba(255,255,255,.18); --au-accent: #E0524F; --au-accent-deep: #F26B5F; }
[data-theme="dark"] .iak-auth__input:focus { box-shadow: 0 0 0 3px rgba(224,82,79,.18); }

/* ── Full-screen: hide the site chrome on auth pages ─────── */
#wrapper:has(.iak-auth) > *:not(.main-content) { display: none !important; }
html:has(.iak-auth), body:has(.iak-auth) { margin: 0 !important; padding: 0 !important; }
body:has(.iak-auth) .main-content { margin: 0 !important; padding: 0 !important; border: 0 !important; }
body:has(.iak-auth) #wrapper { padding: 0 !important; margin: 0 !important; }
/* style.css gives #account-login/#account-register padding-top:1.625rem +
   padding-bottom:7.5rem (the white strip on top + extra bottom space) — kill it. */
body:has(.iak-auth) #account-login, body:has(.iak-auth) #account-register, body:has(.iak-auth) #account-forgotten, body:has(.iak-auth) #account-reset, body:has(.iak-auth) #account-success { padding: 0 !important; margin: 0 !important; }
.iak-auth { min-height: 100vh; }
.iak-auth__brand, .iak-auth__form-side { margin: 0; }

/* ── Slim auth footer (mockup) ───────────────────────────── */
.iak-auth__footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 40px; font-size: 12px; color: var(--au-mute); border-top: 1px solid var(--au-line); }
.iak-auth__footer-links { display: flex; gap: 18px; }
.iak-auth__footer a { color: var(--au-mute) !important; text-decoration: none; }
.iak-auth__footer a:hover { color: var(--au-ink-2) !important; }
.iak-auth__footer a.iak-auth__footer-back { color: var(--au-accent) !important; font-weight: 600; }

/* ── "or continue with" + social (visual-only) ───────────── */
.iak-auth__divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; }
.iak-auth__divider::before, .iak-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--au-line); }
.iak-auth__divider span { font-size: 12px; color: var(--au-mute); }
.iak-auth__social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iak-auth__social-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px solid var(--au-line-2); border-radius: 10px; background: var(--au-card); color: var(--au-ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.iak-auth__social-btn svg { width: 17px; height: 17px; }
.iak-auth__social-btn[disabled] { opacity: .6; cursor: not-allowed; position: relative; }
.iak-auth__social-btn[disabled]:hover::after { content: "Coming soon"; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--au-ink); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }

/* ── "Keep me signed in" ─────────────────────────────────── */
.iak-auth__remember { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--au-ink-2); cursor: pointer; margin-bottom: 4px; }
.iak-auth__remember input { accent-color: var(--au-accent); width: 16px; height: 16px; }

/* ── Register extras ─────────────────────────────────────── */
.iak-auth__grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.iak-auth__field textarea.iak-auth__input { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.iak-auth__field select.iak-auth__input { padding: 0 14px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23848688' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.iak-auth__choices { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 2px; }
.iak-auth__choices label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--au-ink-2); cursor: pointer; }
.iak-auth__choices input { accent-color: var(--au-accent); width: 15px; height: 15px; }

/* Field-level error text */
.iak-auth__err { color: var(--au-accent); font-size: 12px; margin-top: 5px; }

/* Password strength meter */
.iak-auth__pw-meter { margin-top: 8px; }
.iak-auth__pw-bars { display: flex; gap: 4px; margin-bottom: 5px; }
.iak-auth__pw-bar { flex: 1; height: 4px; border-radius: 999px; background: var(--au-line-2); transition: background .15s; }
.iak-auth__pw-label { font-size: 11.5px; color: var(--au-mute); }

/* Agree-to-terms row */
.iak-auth__agree { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--au-ink-2); line-height: 1.5; cursor: pointer; margin: 4px 0 4px; }
.iak-auth__agree input { accent-color: var(--au-accent); width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.iak-auth__agree a { color: var(--au-accent) !important; font-weight: 600; }

.iak-auth__submit:disabled { opacity: .55; cursor: not-allowed; }

/* OTP / verification step */
.iak-auth__otp-icon { display: inline-flex; padding: 16px; border-radius: 999px; background: rgba(193,53,56,.1); color: var(--au-accent); margin-bottom: 16px; }
.iak-auth__otp-icon .fa { font-size: 26px; }
.iak-auth__otp-email { font-weight: 700; font-size: 15px; margin: 2px 0 22px; color: var(--au-ink); }
.iak-auth__otp-input { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 700; padding: 0 14px !important; }
.iak-auth__back-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; color: var(--au-mute); font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 18px; cursor: pointer; }
.iak-auth__back-btn:hover { color: var(--au-ink-2); }
.iak-auth__muted-link { background: none; border: 0; color: var(--au-accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }

/* Captcha wrapper — neutralise the extension's Bootstrap grid (.col-sm-2 label
   was squeezing the text to one word per line) and style it like a field. */
.iak-auth__field .form-group { margin: 0; display: block; }
.iak-auth__field .control-label { display: block; float: none; width: auto; text-align: left; padding: 0 0 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--au-ink-2); white-space: normal; }
.iak-auth__field .col-sm-2, .iak-auth__field .col-sm-10, .iak-auth__field [class*="col-"] { display: block; float: none; width: 100%; max-width: 100%; flex: 0 0 100%; padding: 0; margin: 0; }
.iak-auth__field .g-recaptcha { transform-origin: 0 0; }
.iak-auth__field .g-recaptcha, .iak-auth__field img { max-width: 100%; }
.iak-auth__field .text-danger { color: var(--au-accent); font-size: 12px; margin-top: 5px; }

/* ── Registration-success confirmation ───────────────────── */
.iak-auth__form--center { text-align: center; }
.iak-auth__otp-icon--success { background: rgba(31,138,91,.1); color: var(--au-success); }
.iak-auth__success-msg { color: var(--au-ink-3); font-size: 15px; line-height: 1.6; margin: 4px 0 8px; }
.iak-auth__success-msg p { margin: 0 0 10px; }
.iak-auth__success-msg p:last-child { margin-bottom: 0; }
.iak-auth__success-msg a { color: var(--au-accent) !important; font-weight: 600; text-decoration: none; }
.iak-auth__success-msg a:hover { text-decoration: underline; }
.iak-auth__success-list { list-style: none; margin: 20px 0 4px; padding: 0; text-align: left; display: inline-block; }
.iak-auth__success-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--au-ink-2); line-height: 1.5; margin-bottom: 12px; }
.iak-auth__success-list li:last-child { margin-bottom: 0; }
.iak-auth__success-list .fa { color: var(--au-success); font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.iak-auth__submit--link { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 24px; }
.iak-auth__submit--link:hover { text-decoration: none; }
.iak-auth__ghost-btn--block { display: flex; justify-content: center; width: 100%; height: 46px; margin-top: 12px; }

/* ── Responsive: stack, brand panel on top ───────────────── */
@media (max-width: 860px) {
  .iak-auth { grid-template-columns: 1fr; min-height: 0; }
  .iak-auth__brand { padding: 36px 28px; gap: 24px; }
  .iak-auth__title { font-size: 30px; }
  .iak-auth__topbar { padding: 18px 24px; }
  .iak-auth__form-wrap { padding: 24px 24px 40px; }
  .iak-auth__footer { padding: 18px 24px; flex-direction: column; align-items: flex-start; gap: 8px; }
}
