/* ── Login-page specific styles ───────────────────── */
body.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, color-mix(in srgb, var(--accent2) 12%, transparent), transparent);
  padding: 24px 16px;
  font-family: inherit;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  animation: fadeInUp .45s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ── */
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
  overflow: visible;
}

/* ── Header band ── */
.login-header {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 22%, var(--bg-card)),
    color-mix(in srgb, var(--accent2) 18%, var(--bg-card)));
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 32px 32px 24px;
  text-align: center;
}

.login-carrier {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: .3px;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Body ── */
.login-body-inner {
  padding: 28px 32px 32px;
}

.login-form-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-form-title svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ── Alert ── */
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.login-alert.error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: color-mix(in srgb, var(--danger) 90%, var(--text-bright));
}
.login-alert.warn {
  background: color-mix(in srgb, var(--warning, #d97706) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning, #d97706) 40%, transparent);
  color: color-mix(in srgb, var(--warning, #d97706) 88%, var(--text-bright));
}

.login-alert.success {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  color: color-mix(in srgb, var(--success) 90%, var(--text-bright));
}

.login-alert svg { flex-shrink: 0; margin-top: 1px; }

/* ── Fields ── */
.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap svg.field-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-bright);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.input-wrap input::placeholder {
  color: var(--text-muted);
  opacity: .6;
}

/* password toggle btn */
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color .15s;
}

.pw-toggle:hover { color: var(--accent); }

/* ── Submit button ── */
.btn-login {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  box-shadow: 0 3px 14px color-mix(in srgb, var(--accent) 40%, transparent);
  letter-spacing: .3px;
}

.btn-login:hover  { opacity: .9; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

/* ── Footer ── */
.login-footer {
  border-top: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.login-copyright {
  font-size: 11px;
  color: var(--text-muted);
}
.login-credit {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 10px 8px 11px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
}
.login-credit-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .35px;
  text-transform: uppercase;
  color: var(--accent);
}
.login-credit-dept {
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-bright);
}
.login-credit-org {
  margin-top: 1px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Language switcher ── */
.login-lang {
  display: flex;
  gap: 4px;
}

.login-lang a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .15s;
}

.login-lang a:hover,
.login-lang a.active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}

/* ── Theme switcher (login) ── */
.login-theme-wrap {
  position: relative;
  display: inline-flex;
}

.login-theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}

.login-theme-btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}

/* Anchored to the theme button. The login card animation uses transform, which
   would pull a position:fixed menu away from the button. */
.login-theme-dropdown {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  top: auto;
  min-width: 168px;
  max-height: min(280px, 52vh);
  overflow-y: auto;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  z-index: 30;
}

.login-theme-wrap.open .login-theme-dropdown { display: block; }

.login-theme-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .12s;
  white-space: nowrap;
  box-sizing: border-box;
}

.login-theme-opt:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.login-theme-opt.active { color: var(--accent); font-weight: 600; }

.t-swatch {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}
.t-swatch.dark-blue   { background: #00b4d8; }
.t-swatch.dark-green  { background: #00c87a; }
.t-swatch.dark-purple { background: #a855f7; }
.t-swatch.light       { background: #0ea5e9; }
.t-swatch.solarized   { background: #d4a017; }
.t-swatch.calm        { background: #4b8bb7; }

/* ── Default cred hint ── */
.login-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 16px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-radius: 7px;
  border: 1px dashed color-mix(in srgb, var(--accent) 20%, transparent);
}

.login-hint strong { color: var(--accent3); }

@media (max-width: 480px) {
  body.login-body {
    align-items: flex-start;
    padding: max(20px, env(safe-area-inset-top)) 12px max(20px, env(safe-area-inset-bottom));
  }
  .login-card { border-radius: 14px; }
  .login-header { padding: 22px 18px 18px; border-radius: 14px 14px 0 0; }
  .login-body-inner { padding: 20px 18px 22px; }
  .login-footer { padding: 12px 18px; border-radius: 0 0 14px 14px; }
  .input-wrap input { height: 46px; font-size: 16px; }
  .btn-login { height: 48px; font-size: 15px; }
  .login-lang a, .login-theme-btn { padding: 6px 10px; }
}

/* ── Sign-up link on the login card ── */
.login-alt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.login-alt::before,
.login-alt::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-ghost-auth {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  box-sizing: border-box;
}
.btn-ghost-auth:hover { background: color-mix(in srgb, var(--accent) 15%, transparent); border-color: var(--accent); }

/* ── Sign-up page ── */
.login-wrapper.is-wide { max-width: 760px; }

/* compact horizontal header */
.su-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  text-align: left;
}
.su-head .logo-mark--lg { width: 46px; height: 46px; margin: 0; flex-shrink: 0; }
.su-head .logo-mark--lg img { width: 46px; height: 46px; }
.su-head .login-carrier { font-size: 15.5px; }
.su-head .login-subtitle { margin-top: 2px; font-size: 10.5px; }
.su-head-text { flex: 1; min-width: 0; }
.su-head-back {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 7px;
  background: color-mix(in srgb, var(--bg-card) 60%, transparent);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.su-head-back:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-card)); }
.login-wrapper.is-wide .login-body-inner { padding: 16px 22px 18px; }
.login-wrapper.is-wide .login-footer { padding: 10px 22px; }

/* title + stepper */
.su-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.su-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
}
.su-title-ico {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.su-steps {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11.5px;
  color: var(--text-muted);
}
.su-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: help;
}
.su-steps li + li::before {
  content: "";
  width: 22px;
  height: 1px;
  margin: 0 8px;
  background: var(--border);
}
.su-steps b {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted);
}
.su-steps li.is-on { color: var(--text-bright); font-weight: 600; }
.su-steps li.is-on b { background: var(--accent); border-color: var(--accent); color: #fff; }

/* section cards */
.su-form { display: flex; flex-direction: column; gap: 10px; }
.su-block {
  padding: 10px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 3%, transparent);
}
.su-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-bright);
}
.su-block-head b {
  width: 20px; height: 20px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}
.su-block-hint {
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

/* dense fields */
.su-form .form-field { margin-bottom: 0; }
.su-form .form-field + .form-field { margin-top: 10px; }
.su-form .su-grid .form-field + .form-field { margin-top: 0; }
.su-form .form-field label {
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .3px;
}
.su-form .input-wrap input { height: 36px; font-size: 13px; padding-left: 34px; border-radius: 7px; }
.su-form .input-wrap svg.field-icon { left: 11px; width: 15px; height: 15px; }
.su-form .pw-toggle { right: 6px; }
.su-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.su-grid--work { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 110px; }
.su-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.su-grid .is-full { grid-column: 1 / -1; }
.form-field .req { color: var(--danger); margin-left: 2px; }
.su-help { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.input-wrap select,
.form-field textarea,
.input-wrap input.no-icon { padding-left: 12px; }
.input-wrap select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-bright);
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
.form-field textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-bright);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}
.form-field textarea::placeholder { color: var(--text-muted); opacity: .6; }
.input-wrap select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: var(--danger); }
.form-field .su-err { display: block; margin-top: 4px; font-size: 11px; color: var(--danger); }

/* module chips */
.su-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.su-form .form-field label.su-module {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-input);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.su-module span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-module input { position: absolute; opacity: 0; pointer-events: none; }
.su-module i {
  flex: 0 0 14px;
  height: 14px;
  border: 1.5px solid color-mix(in srgb, var(--text-muted) 70%, transparent);
  border-radius: 4px;
  transition: background .15s, border-color .15s;
}
.su-module:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); }
.su-module:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-input));
  color: var(--text-bright);
  font-weight: 600;
}
.su-module input:checked + i {
  border-color: var(--accent);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.su-module input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* agree + submit */
.su-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 14px;
  align-items: center;
  margin-top: 2px;
}
.su-submit-row .btn-login { margin-top: 0; height: 42px; }
.su-form .form-field label.su-agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.su-agree input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.su-foot-link { margin-top: 12px; text-align: center; }
.su-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pw-meter { height: 3px; margin-top: 5px; border-radius: 2px; background: var(--border); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }

/* done / check modes */
.su-done { text-align: center; padding: 6px 0 4px; }
.su-done-icon {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success);
}
.su-done h2 { margin: 0 0 6px; font-size: 18px; color: var(--text-bright); }
.su-done p { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.su-ref {
  display: inline-block; margin: 0 0 14px; padding: 8px 18px; border-radius: 8px;
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border));
  font-family: var(--font-mono, Consolas, monospace); font-size: 18px; font-weight: 800; letter-spacing: 1px; color: var(--accent);
}
.su-status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.su-status.is-pending  { background: color-mix(in srgb, var(--warning, #d97706) 16%, transparent); color: var(--warning, #d97706); }
.su-status.is-approved { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.su-status.is-rejected { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.su-check { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.su-check-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.su-check-row .btn-ghost-auth { margin-top: 0; height: 42px; padding: 0 16px; width: auto; }
.su-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.su-back:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .su-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .su-grid--work, .su-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .su-grid--3 .form-field:first-child { grid-column: 1 / -1; }
  .su-steps { display: none; }
}
@media (max-width: 520px) {
  .su-head { padding: 12px 14px; }
  .su-head-back { padding: 4px 8px; font-size: 11px; }
  .login-wrapper.is-wide .login-body-inner { padding: 14px 12px 16px; }
  .su-block { padding: 10px 10px 12px; }
  .su-grid, .su-grid--work, .su-grid--3 { grid-template-columns: 1fr; }
  .su-submit-row { grid-template-columns: 1fr; }
  .su-check-row { grid-template-columns: 1fr; }
  .su-check-row .btn-ghost-auth { width: 100%; }
  .su-form .input-wrap input, .input-wrap select { height: 44px; font-size: 16px; }
  .form-field textarea { font-size: 16px; }
}

/* ══ Login — split layout (login.php only) ═══════════════ */
body.auth-page {
  padding: 28px 20px;
  background-image:
    radial-gradient(ellipse 70% 55% at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
    radial-gradient(ellipse 55% 45% at 100% 100%, color-mix(in srgb, var(--accent2) 12%, transparent), transparent);
}
.auth-split {
  width: 100%;
  max-width: 940px;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(8, 30, 60, .35), 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
  animation: fadeInUp .5s cubic-bezier(.2, .7, .2, 1) both;
}

/* brand panel — fixed airline palette in every theme */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 30px 32px 26px;
  color: #e7f0fa;
  background:
    radial-gradient(circle at 85% 12%, rgba(91, 192, 235, .28), transparent 42%),
    radial-gradient(circle at 10% 95%, rgba(212, 166, 74, .18), transparent 40%),
    linear-gradient(155deg, #0a2747 0%, #0d3a66 52%, #0b5c92 100%);
  overflow: hidden;
  isolation: isolate;
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 18px 18px;
  mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
  -webkit-mask-image: linear-gradient(160deg, #000 10%, transparent 75%);
}
.auth-brand-route {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%; height: 62%;
  z-index: -1;
  color: rgba(212, 166, 74, .7);
}
.auth-brand-plane {
  position: absolute;
  right: 26px;
  top: 33%;
  width: 26px;
  height: 26px;
  z-index: -1;
  color: #f1c873;
  transform: rotate(62deg);
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
  animation: authFloat 6s ease-in-out infinite;
}
@keyframes authFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: -6px -8px; }
}
.auth-brand-top,
.auth-mobile-brand { display: flex; align-items: center; gap: 12px; }
.auth-logo {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #f1c873, rgba(255, 255, 255, .35));
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}
.auth-logo img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.auth-carrier { font-size: 15px; font-weight: 700; letter-spacing: .2px; color: #fff; line-height: 1.2; }
.auth-portal { margin-top: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: #9fc3e4; }
.auth-brand-mid { margin-top: auto; }
.auth-headline {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.3px;
  color: #fff;
}
.auth-tagline { margin: 0 0 22px; max-width: 360px; font-size: 13px; line-height: 1.65; color: #b9d2ea; }
.auth-feats { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.auth-feats li { display: flex; gap: 11px; align-items: center; }
.auth-feats strong { display: block; font-size: 12.5px; font-weight: 700; color: #fff; }
.auth-feats li > span:last-child { font-size: 11.5px; color: #9fc3e4; line-height: 1.4; }
.auth-feat-ico {
  width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #f1c873;
  backdrop-filter: blur(4px);
}
.auth-credit {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 18, 36, .35);
  border: 1px solid rgba(255, 255, 255, .1);
  border-left: 3px solid #d4a64a;
  backdrop-filter: blur(6px);
}
.auth-credit-kicker { font-size: 9.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #f1c873; }
.auth-credit-name { margin-top: 3px; font-size: 12.5px; font-weight: 700; color: #fff; }
.auth-credit-dept { margin-top: 1px; font-size: 11px; color: #9fc3e4; }

/* form panel */
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 18px 34px 18px;
  background: var(--bg-card);
}
.auth-panel-top { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.auth-panel-top .login-theme-dropdown { left: auto; right: 0; top: calc(100% + 6px); bottom: auto; }
.auth-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 22px 0;
}
.auth-mobile-brand { display: none; }
.auth-welcome { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.3px; color: var(--text-bright); }
.auth-welcome-sub { margin: 0 0 22px; font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.auth-welcome, .auth-headline, .auth-carrier { line-height: 1.25; }
.auth-credit > div, .auth-portal { line-height: 1.35; }
.auth-page .form-field { margin-bottom: 14px; }
.auth-page .form-field label { font-size: 11.5px; letter-spacing: .3px; text-transform: none; font-weight: 600; color: var(--text-primary); }
.auth-page .input-wrap input {
  height: 44px;
  border-radius: 10px;
  background: var(--bg-input);
  border-color: color-mix(in srgb, var(--border) 85%, var(--text-muted));
}
.auth-page .input-wrap input:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.auth-page .input-wrap input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.auth-page .input-wrap:focus-within svg.field-icon { color: var(--accent); }
.auth-caps {
  margin-top: 6px;
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--warning, #d97706);
  background: color-mix(in srgb, var(--warning, #d97706) 12%, transparent);
}
.auth-caps[hidden] { display: none; }
.auth-page .btn-login {
  height: 46px;
  margin-top: 6px;
  border-radius: 10px;
  font-size: 14.5px;
}
.auth-page .btn-login svg { transition: transform .2s; }
.auth-page .btn-login:hover svg { transform: translateX(3px); }
.auth-page .btn-login.is-loading { opacity: .75; cursor: progress; }
.auth-page .btn-login.is-loading svg { animation: authNudge .8s ease-in-out infinite; }
@keyframes authNudge { 50% { transform: translateX(5px); } }
.auth-page .login-alt { margin-top: 20px; }
.auth-page .btn-ghost-auth { height: 42px; border-radius: 10px; }
.auth-page .login-alert { border-radius: 10px; }
.auth-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.auth-secure { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.auth-secure svg { color: var(--success); }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); max-width: 440px; min-height: 0; }
  .auth-panel, .auth-form-wrap { min-width: 0; }
  .auth-brand { display: none; }
  .auth-mobile-brand {
    display: flex;
    margin: 0 -34px 22px;
    padding: 16px 34px;
    background: linear-gradient(155deg, #0a2747 0%, #0d3a66 52%, #0b5c92 100%);
  }
  .auth-form-wrap { padding: 8px 0 18px; }
  .auth-panel { padding-top: 0; }
  .auth-panel-top { order: 3; justify-content: center; padding: 12px 0 4px; }
  .auth-panel-foot { order: 4; justify-content: center; text-align: center; }
  .auth-panel-top .login-theme-dropdown { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
}
@media (max-width: 480px) {
  body.auth-page { padding: 0; align-items: stretch; }
  .auth-split { max-width: none; min-height: 100vh; border-radius: 0; border: 0; }
  .auth-panel { padding: 0 18px 14px; }
  .auth-mobile-brand { margin: 0 -18px 20px; padding: max(16px, env(safe-area-inset-top)) 18px 16px; }
  .auth-page .input-wrap input { height: 48px; font-size: 16px; }
  .auth-panel-top { flex-wrap: wrap; row-gap: 8px; }
  .auth-panel-top.has-left .auth-panel-left { flex-basis: 100%; display: flex; justify-content: center; margin-right: 0; }
}

/* ── Shared shell extras (login + sign-up) ── */
.auth-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #f1c873;
}
.auth-step-num { font-size: 13px; font-weight: 800; color: #f1c873; }
.auth-panel-top.has-left .auth-panel-left { margin-right: auto; }

/* change-password: signed-in account chip + live match hint */
.auth-user-chip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}
.auth-user-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: linear-gradient(135deg, #0b2a4a, #1d4f86);
  color: #e9d38a; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 2px color-mix(in srgb, #c9a227 45%, transparent);
}
.auth-user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.auth-user-meta b { font-size: 13.5px; color: var(--text-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-user-meta small { font-size: 11.5px; color: var(--text-muted); }
.pw-match { margin-top: 5px; font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.pw-match.is-ok { color: var(--success); }
.pw-match.is-bad { color: var(--danger); }
.pw-match[hidden] { display: none; }
.auth-page .su-done .btn-login { text-decoration: none; }
.auth-page .su-done .btn-ghost-auth { margin-top: 10px; }

/* change-password: two-step reset flow */
.pw-steps {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pw-steps li {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card); color: var(--text-muted);
  font-size: 11.5px; line-height: 1.3; min-width: 0;
}
.pw-steps b {
  flex-shrink: 0; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--bg-input); font-size: 11px; font-weight: 800; color: var(--text-muted);
}
.pw-steps span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pw-steps li.is-on {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  color: var(--text-bright); font-weight: 650;
}
.pw-steps li.is-on b { background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-steps li.is-done {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  color: var(--text-primary);
}
.pw-steps li.is-done b {
  background: color-mix(in srgb, var(--success) 16%, var(--bg-input));
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
  color: var(--success);
}
.pw-card {
  margin: 0 0 14px; padding: 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--bg-input) 55%, var(--bg-card));
}
.pw-card-head {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 12px;
}
.pw-card-ico {
  flex-shrink: 0; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
}
.pw-card-ico .field-icon { position: static; transform: none; width: 16px; height: 16px; }
.pw-card-head strong { display: block; font-size: 13px; color: var(--text-bright); line-height: 1.3; }
.pw-card-head small { display: block; margin-top: 2px; font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.pw-verified {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 9px 12px;
  border-radius: 10px; font-size: 12px; font-weight: 600; line-height: 1.35;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border));
}
.pw-strength-lbl { margin-top: 4px; font-size: 11px; font-weight: 650; }
.pw-strength-lbl.is-weak { color: var(--danger); }
.pw-strength-lbl.is-fair { color: var(--warning, #d97706); }
.pw-strength-lbl.is-good,
.pw-strength-lbl.is-strong { color: var(--success); }
.pw-form .btn-ghost-auth {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; margin-top: 10px; padding: 10px 12px;
  border-radius: 10px; text-decoration: none;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  border: 1px solid transparent; background: transparent;
}
.pw-form .btn-ghost-auth:hover {
  color: var(--text-bright);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-color: var(--border);
}
@media (max-width: 480px) {
  .pw-steps { grid-template-columns: 1fr; }
}

/* ── Two-factor (email OTP) ── */
.twofa-card { margin-bottom: 12px; }
.twofa-otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.twofa-digit {
  width: 100%;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  font-family: Consolas, 'Courier New', monospace;
  letter-spacing: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-bright);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  caret-color: var(--accent);
}
.twofa-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.twofa-trust {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-card));
  cursor: pointer;
}
.twofa-trust input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.twofa-trust span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.twofa-trust strong { font-size: 12.5px; color: var(--text-bright); line-height: 1.3; }
.twofa-trust small { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.twofa-resend-form { margin-top: 8px; }
.twofa-resend-form .btn-ghost-auth,
.twofa-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.twofa-resend-form .btn-ghost-auth:hover:not(:disabled),
.twofa-cancel:hover {
  color: var(--text-bright);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-color: var(--border);
}
.twofa-resend-form .btn-ghost-auth:disabled {
  opacity: .55;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  .twofa-digit { height: 48px; font-size: 20px; }
  .twofa-otp { gap: 6px; }
}

/* Compact 2FA setup */
.auth-form-wrap--twofa {
  padding-top: 4px;
  padding-bottom: 12px;
}
.auth-form-wrap--twofa .auth-welcome { font-size: 20px; margin: 0 0 2px; }
.auth-form-wrap--twofa .auth-welcome-sub { margin: 0; font-size: 12.5px; }
.twofa-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.twofa-user-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  max-width: 42%;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-card));
  font-size: 12px;
  font-weight: 600;
  color: var(--text-bright);
}
.twofa-user-mini .auth-user-avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.twofa-user-mini span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pw-steps--mini {
  margin: 0 0 12px;
  gap: 6px;
}
.pw-steps--mini li {
  padding: 6px 8px;
  font-size: 11.5px;
}
.pw-steps--mini b {
  width: 20px;
  height: 20px;
  font-size: 11px;
}
.auth-form-wrap--twofa .login-alert { margin-bottom: 10px; padding: 8px 10px; font-size: 12.5px; }

.twofa-setup-grid {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px 16px;
  align-items: start;
  margin-bottom: 8px;
}
.twofa-setup-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.twofa-qr {
  width: 140px;
  height: 140px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}
.twofa-qr svg { width: 100%; height: 100%; display: block; }
.twofa-manual {
  width: 100%;
  font-size: 11.5px;
  color: var(--text-muted);
}
.twofa-manual summary {
  cursor: pointer;
  text-align: center;
  list-style: none;
  color: var(--accent);
  font-weight: 600;
  padding: 2px 0;
}
.twofa-manual summary::-webkit-details-marker { display: none; }
.twofa-manual[open] summary { margin-bottom: 6px; }
.twofa-manual-key {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.twofa-manual-key code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
  line-height: 1.35;
  word-break: break-all;
  color: var(--text-bright);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  text-align: center;
}
.twofa-manual-key .btn-ghost-auth {
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  font-size: 11.5px;
}
.twofa-setup-form-col { margin: 0; min-width: 0; }
.twofa-code-lbl {
  display: block;
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-bright);
}
.twofa-setup-form-col .twofa-otp { margin-bottom: 10px; }
.twofa-setup-form-col .btn-login { margin-top: 0; }
.twofa-apps-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: center;
}
.twofa-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
  margin-top: 4px;
}
.twofa-foot-links .btn-ghost-auth {
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
}
.auth-form-wrap--twofa .twofa-digit {
  height: 44px;
  font-size: 18px;
  border-radius: 8px;
}
.auth-form-wrap--twofa .twofa-otp { gap: 6px; }
.auth-form-wrap--twofa .twofa-trust {
  margin: 0 0 10px;
  padding: 8px 10px;
}
.auth-form-wrap--twofa .auth-user-chip { display: none; }

@media (max-width: 560px) {
  .twofa-setup-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }
  .twofa-setup-form-col { width: 100%; }
  .twofa-head-row { flex-direction: column; gap: 8px; }
  .twofa-user-mini { max-width: 100%; }
}
.twofa-recovery-box {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-card));
}
.twofa-recovery-box ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.twofa-recovery-box code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-bright);
}
.twofa-recovery-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
  font-family: Consolas, 'Courier New', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-bright);
  outline: none;
}
.twofa-recovery-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ── Sign-up on the split shell ── */
.auth-split--wide { max-width: 1180px; grid-template-columns: 330px minmax(0, 1fr); }
.auth-split--wide .auth-brand { padding: 28px 26px 24px; }
.auth-split--wide .auth-brand-mid { margin-top: 40px; }
.auth-split--wide .auth-brand-plane { top: 96px; right: 24px; }
.auth-split--wide .auth-credit { margin-top: auto; }
.auth-split--wide .auth-headline { font-size: 24px; }
.auth-split--wide .auth-panel { padding: 18px 28px; }
.auth-form-wrap--wide { max-width: none; justify-content: flex-start; padding: 14px 0 18px; }
.auth-form-wrap--wide .auth-welcome-sub { margin-bottom: 16px; }
.auth-page .su-form .form-field { margin-bottom: 0; }
.auth-page .su-form .form-field label { font-size: 11px; }
.auth-page .su-form .input-wrap input { height: 40px; font-size: 13px; border-radius: 9px; }
.auth-page .su-form .form-field textarea { border-radius: 9px; }
.auth-page .su-form .su-block { border-radius: 12px; }
.auth-page .su-submit-row .btn-login { height: 44px; }

/* one-screen sign-up: dense grid, help text in section heads */
body.auth-page--wide { padding: 6px 14px; }
.auth-split--wide { min-height: 0; }
.auth-split--wide .auth-panel { padding: 8px 20px 6px; }
.auth-split--wide .auth-panel-foot { padding-top: 4px; }
.auth-form-wrap--wide { padding: 2px 0 4px; }
.su-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.su-head-row .auth-welcome { font-size: 17px; margin-bottom: 0; }
.su-head-row .auth-welcome-sub { margin: 0; font-size: 11px; }
.su-head-row .su-back { font-size: 11.5px; white-space: nowrap; }
.auth-page .su-form { gap: 6px; line-height: 1.3; }
.auth-page .su-form .form-field label,
.auth-page .su-form .su-block-head,
.auth-page .su-form .su-module span,
.su-head-row .auth-welcome-sub,
.su-head-row .su-back,
.auth-split--wide .auth-panel-top,
.auth-split--wide .auth-panel-foot { line-height: 1.25; }
.auth-page .su-form .su-block-head b,
.auth-page .su-form .su-block-hint { line-height: 1; }
.su-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.su-row2 .su-grid--work { grid-template-columns: minmax(0, 1fr) 88px; }
.auth-page .su-form .su-block { padding: 6px 10px 7px; }
.auth-page .su-form .su-block-head { margin-bottom: 4px; font-size: 11.5px; gap: 6px; }
.auth-page .su-form .su-block-head b { width: 18px; height: 18px; font-size: 10px; border-radius: 5px; }
.su-block-note {
  margin-left: 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}
.su-block-note--end { margin-left: auto; }
.auth-page .su-form .su-grid { gap: 6px 8px; }
.auth-page .su-form .form-field label { margin-bottom: 2px; font-size: 10.5px; }
.auth-page .su-form .input-wrap input { height: 30px; font-size: 12.5px; border-radius: 7px; }
.auth-page .su-form .input-wrap svg.field-icon { width: 13px; height: 13px; left: 10px; }
.auth-page .su-form .form-field + .form-field { margin-top: 6px; }
.auth-page .su-form .su-grid .form-field + .form-field { margin-top: 0; }
.auth-page .su-form .form-field textarea { min-height: 34px; height: 34px; padding: 5px 10px; font-size: 12.5px; }
.auth-split--wide .su-modules { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.auth-page .su-form .form-field label.su-module { padding: 3px 6px; font-size: 11px; }
.auth-page .su-submit-row { gap: 8px; margin-top: 2px; }
.auth-page .su-submit-row .btn-login { height: 36px; font-size: 13px; }
.auth-page .su-form .form-field label.su-agree { font-size: 10.5px; line-height: 1.35; }
.auth-page .su-form .field-error { font-size: 10.5px; margin-top: 2px; }
.auth-page .login-alert { margin-bottom: 6px; padding: 6px 9px; font-size: 12px; }

@media (min-width: 861px) and (max-height: 760px) {
  body.auth-page--wide { padding: 4px 12px; }
  .auth-split--wide .auth-panel { padding: 6px 18px 4px; }
  .su-head-row { margin-bottom: 4px; }
  .su-head-row .auth-welcome-sub { display: none; }
  .auth-page .su-form,
  .su-row2 { gap: 4px; }
  .auth-page .su-form .su-grid { gap: 4px 8px; }
  .auth-page .su-form .su-block { padding: 4px 8px 5px; }
  .auth-page .su-form .input-wrap input { height: 28px; }
  .auth-page .su-form .form-field textarea { min-height: 30px; height: 30px; }
  .auth-page .su-submit-row .btn-login { height: 32px; }
}
@media (max-width: 1100px) {
  .auth-split--wide .su-modules { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .su-row2 { grid-template-columns: 1fr; }
  .auth-split--wide .su-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .su-block-note { display: none; }
  .su-head-row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .auth-split--wide .su-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.auth-page--wide { padding: 0; }
}

@media (max-width: 1100px) {
  .auth-split--wide { grid-template-columns: 280px minmax(0, 1fr); }
  .auth-split--wide .auth-brand .auth-tagline { font-size: 12px; }
}
@media (max-width: 860px) {
  .auth-split--wide { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
  .auth-split--wide .auth-panel { padding: 0 22px 14px; }
  .auth-split--wide .auth-mobile-brand { margin: 0 -22px 18px; padding: 14px 22px; }
}
@media (max-width: 480px) {
  .auth-split--wide .auth-panel { padding: 0 14px 14px; }
  .auth-split--wide .auth-mobile-brand { margin: 0 -14px 16px; padding: max(14px, env(safe-area-inset-top)) 14px 14px; }
  .auth-page .su-form .input-wrap input { height: 44px; font-size: 16px; }
}

/* ── Signup Authenticator (step art + detail popup) ── */
.su-2fa-block { overflow: visible; }
.su-2fa-howto {
  margin: 0 0 6px;
  padding: 4px;
  border-radius: 8px;
}
.su-2fa-howto .twofa-howto-cards { gap: 4px; }
.su-2fa-howto .twofa-howto-card {
  padding: 4px 6px 5px;
  border-radius: 8px;
  gap: 1px;
}
.su-2fa-howto .twofa-howto-art {
  max-height: 40px;
}
.su-2fa-howto .twofa-howto-art svg {
  height: 40px;
}
.su-2fa-howto .twofa-howto-num {
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  font-size: 9px;
}
.su-2fa-howto .twofa-howto-card > strong {
  font-size: 10.5px;
  padding-right: 14px;
}
.su-2fa-howto .twofa-howto-card > small {
  display: none;
}
.su-2fa-howto .twofa-howto-more-btn {
  font-size: 9.5px;
  margin-top: 0;
}
.su-2fa-howto .twofa-howto-arrow { font-size: 11px; }
.su-2fa-setup {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 2px;
}
.su-2fa-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.su-2fa-qr {
  width: 128px;
  height: 128px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}
.su-2fa-qr svg { width: 100%; height: 100%; display: block; }
.su-2fa-manual { width: 100%; font-size: 10px; color: var(--text-muted); }
.su-2fa-manual summary {
  cursor: pointer;
  text-align: center;
  list-style: none;
  color: var(--accent);
  font-weight: 600;
  padding: 1px 0;
}
.su-2fa-manual summary::-webkit-details-marker { display: none; }
.su-2fa-manual[open] summary { margin-bottom: 4px; }
.su-2fa-manual-key {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.su-2fa-manual-key code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2px;
  word-break: break-all;
  text-align: center;
  padding: 4px 5px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 7%, var(--bg-card));
  color: var(--text-bright);
}
.su-2fa-manual-key .btn-ghost-auth {
  width: 100%;
  margin: 0;
  padding: 4px 6px;
  font-size: 10.5px;
}
.su-2fa-confirm-col { min-width: 0; }
.su-2fa-code-lbl {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-bright);
}
.su-2fa-otp { margin-bottom: 2px; gap: 5px; }
.su-2fa-otp .twofa-digit { height: 34px; font-size: 15px; border-radius: 7px; }
.su-2fa-apps {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--text-muted);
}
.su-2fa-block.has-error .su-2fa-otp .twofa-digit {
  border-color: color-mix(in srgb, var(--danger, #dc2626) 55%, var(--border));
}
@media (max-width: 720px) {
  .su-2fa-setup { grid-template-columns: 1fr; justify-items: center; }
  .su-2fa-confirm-col { width: 100%; }
  .su-2fa-howto .twofa-howto-card > small { display: block; font-size: 10px; }
}

/* Compact illustrated 2FA how-to (keeps original form width) */
.twofa-howto {
  margin: 0 0 12px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, #0b2a4a 5%, var(--bg-card)), color-mix(in srgb, #c9a227 7%, var(--bg-card)));
  border: 1px solid var(--border);
}
.twofa-howto-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 6px;
  align-items: stretch;
}
.twofa-howto-arrow {
  align-self: center;
  font-size: 13px;
  font-weight: 700;
  color: color-mix(in srgb, #0b2a4a 45%, var(--text-muted));
  opacity: .7;
}
.twofa-howto-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px 8px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid transparent;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.twofa-howto-card.is-on {
  border-color: color-mix(in srgb, #0b2a4a 40%, var(--border));
  box-shadow: 0 3px 10px color-mix(in srgb, #0b2a4a 10%, transparent);
}
.twofa-howto-card.is-done {
  border-color: color-mix(in srgb, #16a34a 35%, var(--border));
}
.twofa-howto-card.is-done .twofa-howto-num {
  background: color-mix(in srgb, #16a34a 18%, transparent);
  color: #166534;
}
.twofa-howto-art {
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  border: 1px solid color-mix(in srgb, #0b2a4a 8%, var(--border));
  max-height: 52px;
}
.twofa-howto-art svg {
  width: 100%;
  height: 52px;
  display: block;
  object-fit: cover;
}
.twofa-howto-num {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  background: color-mix(in srgb, #0b2a4a 12%, transparent);
  color: #0b2a4a;
  z-index: 1;
}
.twofa-howto-card > strong {
  font-size: 11.5px;
  font-weight: 750;
  color: var(--text-bright);
  line-height: 1.25;
  padding-right: 16px;
}
.twofa-howto-card > small {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-muted);
}
.twofa-howto-more-btn {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  color: var(--accent, #0b2a4a);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.twofa-howto-more-btn:hover { color: #c9a227; }
.twofa-howto-payload { display: none; }

.twofa-howto-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.twofa-howto-popup[hidden] { display: none !important; }
.twofa-howto-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 48, .55);
  backdrop-filter: blur(2px);
}
.twofa-howto-popup-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(90vh, 560px);
  overflow: auto;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(8, 30, 60, .28);
  animation: fadeInUp .28s cubic-bezier(.2, .7, .2, 1) both;
}
.twofa-howto-popup-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, #0b2a4a 8%, transparent);
  color: var(--text-bright);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.twofa-howto-popup-x:hover {
  background: color-mix(in srgb, #0b2a4a 14%, transparent);
}
.twofa-howto-popup-top {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 28px 12px 0;
}
.twofa-howto-popup-art {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  line-height: 0;
}
.twofa-howto-popup-art svg {
  width: 100%;
  height: auto;
  display: block;
}
.twofa-howto-popup-head {
  position: relative;
  min-width: 0;
}
.twofa-howto-popup-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-bottom: 6px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  background: color-mix(in srgb, #0b2a4a 12%, transparent);
  color: #0b2a4a;
}
.twofa-howto-popup-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.25;
}
.twofa-howto-popup-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.twofa-howto-popup-body {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #0b2a4a 4%, var(--bg-card));
  border: 1px solid var(--border);
}
.twofa-howto-popup-body ul {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: disc;
}
.twofa-howto-popup-body li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-bright);
  margin: 0 0 8px;
}
.twofa-howto-popup-body li:last-child { margin-bottom: 0; }
.twofa-howto-popup-body li::marker { color: #c9a227; }
.twofa-howto-popup-ok {
  width: 100%;
  margin: 0;
}
body.twofa-popup-open { overflow: hidden; }
@media (max-width: 420px) {
  .twofa-howto-popup-top {
    grid-template-columns: 1fr;
    margin-right: 0;
  }
  .twofa-howto-popup-art { max-width: 140px; }
}
.twofa-howto--done {
  padding: 8px;
  margin-bottom: 12px;
}
.twofa-howto-cards--mini .twofa-howto-card {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}
.twofa-howto-cards--mini .twofa-howto-num {
  position: static;
  flex: 0 0 auto;
}
.twofa-howto-cards--mini strong {
  font-size: 11.5px;
  padding: 0;
}
.twofa-qr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .2px;
  color: #0b2a4a;
  background: color-mix(in srgb, #c9a227 28%, #fff);
  border: 1px solid color-mix(in srgb, #c9a227 45%, transparent);
}
.auth-form-wrap--twofa .twofa-setup-qr-col {
  align-items: center;
}
@media (max-width: 560px) {
  .twofa-howto-cards {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .twofa-howto-arrow { display: none; }
  .twofa-howto-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 8px;
    align-items: start;
  }
  .twofa-howto-art {
    grid-row: 1 / span 3;
    max-height: none;
    align-self: stretch;
  }
  .twofa-howto-art svg { height: 100%; min-height: 64px; }
}
