/* ============================================================
   IJT AUTH — login / register / forgot-password / MFA pages.
   Focused centered-card layout on the off-white canvas, built on the
   Inner Join Technologies design-system tokens (colors_and_type.css).
   Load AFTER the DS stylesheets. Standalone from admin.css.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--ink-900); background: var(--canvas); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--ijt-blue); text-decoration: none; }

.auth-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px 28px; }
.auth-logo { margin-bottom: 26px; }
.auth-logo img { height: 40px; width: auto; display: block; }
.auth-card { width: 100%; max-width: 428px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 38px 36px; }
.auth-card--wide { max-width: 468px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 26px; font-weight: 700; color: var(--ink-900); letter-spacing: -.01em; margin: 0 0 8px; }
.auth-head p { font-size: 14.5px; color: var(--ink-500); margin: 0; line-height: 1.55; }

/* SSO buttons */
.sso-stack { display: flex; flex-direction: column; gap: 10px; }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; padding: 12px 16px; border: 1px solid var(--ink-300); border-radius: var(--r-md); background: #fff; font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; color: var(--ink-900); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; text-decoration: none; }
.sso-btn:hover { background: var(--canvas); border-color: var(--ink-400); box-shadow: var(--shadow-sm); }
.sso-btn svg, .sso-btn .ms { width: 20px; height: 20px; flex: none; }

/* divider */
.auth-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--ink-400); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--ink-200); }

/* form fields */
.auth-field { margin-bottom: 16px; }
.auth-field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }
.auth-field .hint { font-weight: 400; color: var(--ink-400); }
.auth-input { width: 100%; padding: 12px 14px; font-family: var(--font-sans); font-size: 15px; color: var(--ink-900); background: #fff; border: 1px solid var(--ink-300); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
.auth-input::placeholder { color: var(--ink-400); }
.auth-input:focus { outline: none; border-color: var(--ijt-blue); box-shadow: 0 0 0 3px var(--blue-100); }
.auth-pw { position: relative; }
.auth-pw .auth-input { padding-right: 44px; }
.auth-pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink-400); cursor: pointer; border-radius: 8px; }
.auth-pw__toggle:hover { color: var(--ink-700); background: var(--canvas); }
.auth-pw__toggle svg { width: 18px; height: 18px; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.auth-label-row label { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.auth-label-row a { font-size: 13px; font-weight: 600; }
.auth-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-700); cursor: pointer; user-select: none; line-height: 1.5; }
.auth-check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; flex: none; margin-top: 1px; border: 1.5px solid var(--ink-300); border-radius: 5px; background: #fff; cursor: pointer; position: relative; transition: background .13s, border-color .13s; }
.auth-check input:checked { background: var(--ijt-orange); border-color: var(--ijt-orange); }
.auth-check input:checked::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.auth-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue-100); }

.auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px 20px; border: 0; border-radius: var(--r-pill); background: var(--ijt-orange); color: #fff; font-family: var(--font-sans); font-size: 15.5px; font-weight: 700; cursor: pointer; transition: background .15s, box-shadow .15s, transform .1s; text-decoration: none; }
.auth-btn:hover { background: var(--orange-600); box-shadow: var(--shadow-accent); color: #fff; }
.auth-btn:active { transform: scale(.99); }
.auth-btn svg { width: 18px; height: 18px; }

.auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--ink-500); }
.auth-foot a { font-weight: 600; }
.auth-legal { max-width: 428px; margin: 22px auto 0; text-align: center; font-size: 12px; color: var(--ink-400); line-height: 1.55; }
.auth-legal a { color: var(--ink-500); }
.auth-page-foot { text-align: center; padding: 20px; font-size: 12.5px; color: var(--ink-400); }

/* alerts / notifications */
.auth-alert { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: var(--r-md); margin-bottom: 22px; font-size: 13.5px; line-height: 1.5; }
.auth-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.auth-alert[hidden] { display: none !important; }
.auth-alert p { margin: 0; }
.auth-alert strong { font-weight: 700; }
.auth-alert--error { background: var(--orange-100); border: 1px solid color-mix(in srgb, var(--ijt-orange) 34%, transparent); color: var(--orange-700); }
.auth-alert--info { background: var(--blue-100); border: 1px solid color-mix(in srgb, var(--ijt-blue) 30%, transparent); color: var(--blue-700); }
.auth-alert--success { background: color-mix(in srgb, var(--success) 12%, transparent); border: 1px solid color-mix(in srgb, var(--success) 34%, transparent); color: var(--success); }
.auth-alert--success .msg, .auth-alert--info .msg, .auth-alert--error .msg { color: var(--ink-800, var(--ink-900)); }

/* field error */
.auth-error { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--orange-700); }
span.field-validation-error { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--orange-700); }

/* success panel (forgot-password sent, register done) */
.auth-done { text-align: center; }
.auth-done__ic { width: 66px; height: 66px; border-radius: 50%; margin: 4px auto 20px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.auth-done__ic svg { width: 32px; height: 32px; }
.auth-done h1 { font-size: 23px; font-weight: 700; color: var(--ink-900); margin: 0 0 10px; }
.auth-done p { font-size: 14.5px; color: var(--ink-500); line-height: 1.6; margin: 0 0 8px; }
.auth-done .to-email { color: var(--ink-900); font-weight: 600; }
.auth-done__actions { margin-top: 24px; }

/* MFA code inputs */
.mfa-inputs { display: flex; gap: 10px; justify-content: center; margin: 6px 0 4px; }
.mfa-inputs input { width: 52px; height: 60px; text-align: center; font-size: 26px; font-weight: 700; color: var(--ink-900); border: 1.5px solid var(--ink-300); border-radius: var(--r-md); background: #fff; transition: border-color .15s, box-shadow .15s; font-family: var(--font-sans); }
.mfa-inputs input:focus { outline: none; border-color: var(--ijt-orange); box-shadow: 0 0 0 3px var(--orange-100); }
.mfa-inputs input.filled { border-color: var(--ijt-orange); }
.mfa-resend { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--ink-500); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.auth-back svg { width: 15px; height: 15px; }

/* two-name grid (register) */
.auth-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 480px) {
  .auth-card { padding: 30px 22px; }
  .mfa-inputs input { width: 44px; height: 54px; font-size: 22px; }
  .auth-name-grid { grid-template-columns: 1fr; }
}
