:root {
  --auth-navy: #1e3a56;
  --auth-navy-hover: #16304a;
  --auth-ink: #232830;
  --auth-ink-2: #545b66;
  --auth-label: #7c8798;
  --auth-ok: #3e8e5c;
  --auth-warn: #c6862f;
  --auth-err: #c25248;
}

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

body.auth-v6 {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  color: var(--auth-ink);
  font: 300 14px/1.6 "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 15%, rgba(116, 172, 231, .28), transparent 32%),
    radial-gradient(circle at 84% 18%, rgba(151, 134, 229, .25), transparent 34%),
    radial-gradient(circle at 58% 92%, rgba(93, 198, 180, .17), transparent 34%),
    #edf3fb;
  -webkit-font-smoothing: antialiased;
}

.auth-v6 a { color: var(--auth-navy); }

.auth-v6 .login-shell,
.auth-v6 .shell,
.auth-v6 .auth-shell {
  width: 100%;
  max-width: 440px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 18px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 24px 60px rgba(30, 58, 86, .12), 0 4px 14px rgba(30, 58, 86, .06);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.auth-v6 .login-brand,
.auth-v6 .brand,
.auth-v6 .auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-v6 .login-brand-icon,
.auth-v6 .brand-icon,
.auth-v6 .auth-brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--auth-navy);
  border: 1px solid rgba(30, 58, 86, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .64);
}

.auth-v6 .login-brand-icon svg,
.auth-v6 .brand-icon svg,
.auth-v6 .auth-brand-icon svg {
  width: 22px;
  height: 22px;
  color: currentColor;
}

.auth-v6 .login-brand-name,
.auth-v6 .brand-name,
.auth-v6 .auth-brand-name {
  color: var(--auth-navy);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.02em;
}

.auth-v6 .login-brand-sub,
.auth-v6 .brand-sub,
.auth-v6 .auth-brand-sub {
  margin-top: 1px;
  color: var(--auth-label);
  font-size: 12px;
  font-weight: 300;
}

.auth-v6 .login-heading,
.auth-v6 h1,
.auth-v6 h2 {
  margin: 0 0 6px;
  color: var(--auth-navy);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.auth-v6 h3 {
  margin-bottom: 6px;
  color: var(--auth-navy);
  font-size: 16px;
  font-weight: 400;
}

.auth-v6 .login-sub,
.auth-v6 .sub,
.auth-v6 .auth-sub {
  margin-bottom: 26px;
  color: var(--auth-ink-2);
  font-size: 14px;
  font-weight: 300;
}

.auth-v6 .form-group { margin-bottom: 16px; }
.auth-v6 .auth-label-row {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-v6 .auth-label-row .form-label { margin-bottom: 0; }
.auth-v6 .auth-forgot-link {
  flex: 0 0 auto;
  color: var(--auth-navy);
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}
.auth-v6 .auth-remember {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-v6 .auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-navy);
  cursor: pointer;
}
.auth-v6 .auth-remember label {
  margin: 0;
  color: var(--auth-ink-2);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.auth-v6 .form-label,
.auth-v6 label {
  display: block;
  margin-bottom: 6px;
  color: var(--auth-label);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.auth-v6 .form-input,
.auth-v6 input:not([type="hidden"]):not([type="checkbox"]) {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--auth-ink);
  border: 1px solid rgba(35, 45, 70, .14);
  border-radius: 10px;
  outline: none;
  background: rgba(255, 255, 255, .82);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.auth-v6 .form-input:focus,
.auth-v6 input:not([type="hidden"]):not([type="checkbox"]):focus {
  border-color: var(--auth-navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 58, 86, .12);
}

.auth-v6 .form-input::placeholder,
.auth-v6 input::placeholder { color: #9aa4b3; }
.auth-v6 .form-input[readonly] { color: var(--auth-ink-2); background: rgba(240, 244, 249, .9); }
.auth-v6 .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-v6 .password-wrap { position: relative; }
.auth-v6 .password-wrap .form-input { padding-right: 44px; }

.auth-v6 .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  color: var(--auth-label);
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-v6 .password-toggle:hover,
.auth-v6 .password-toggle:focus-visible { color: var(--auth-navy); }

.auth-v6 .btn,
.auth-v6 .btn-submit,
.auth-v6 .auth-primary {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 10px 18px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: var(--auth-navy);
  box-shadow: 0 10px 24px rgba(30, 58, 86, .18);
  font: 400 14px/1.4 "Outfit", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s, transform .16s, box-shadow .16s;
}
.auth-v6 .auth-primary {
  display: grid;
  place-items: center;
}

.auth-v6 .btn:hover,
.auth-v6 .btn-submit:hover,
.auth-v6 .auth-primary:hover {
  background: var(--auth-navy-hover);
  box-shadow: 0 12px 28px rgba(30, 58, 86, .22);
  transform: translateY(-1px);
}

.auth-v6 .back-link,
.auth-v6 .auth-secondary {
  display: block;
  margin-top: 20px;
  color: var(--auth-ink-2);
  font-size: 13px;
  font-weight: 300;
  text-align: center;
  text-decoration: none;
}

.auth-v6 .back-link:hover,
.auth-v6 .auth-secondary:hover { color: var(--auth-navy); }

.auth-v6 .error-box,
.auth-v6 .success-box,
.auth-v6 .invite-badge,
.auth-v6 .warning,
.auth-v6 .auth-client {
  margin-bottom: 20px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 300;
}

.auth-v6 .error-box { color: #8b332d; border: 1px solid rgba(194, 82, 72, .22); background: rgba(252, 235, 235, .84); }
.auth-v6 .success-box { color: #2f7048; border: 1px solid rgba(62, 142, 92, .2); background: rgba(232, 246, 237, .82); }
.auth-v6 .invite-badge,
.auth-v6 .auth-client { color: var(--auth-ink-2); border: 1px solid rgba(107, 126, 201, .2); background: rgba(238, 241, 252, .82); }
.auth-v6 .warning { color: #875a18; border: 1px solid rgba(198, 134, 47, .22); background: rgba(252, 245, 230, .86); }

.auth-v6 .error-box svg,
.auth-v6 .success-box svg,
.auth-v6 .invite-badge svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.auth-v6 .login-footer { margin-top: 22px; color: var(--auth-label); font-size: 12px; font-weight: 300; text-align: center; }
.auth-v6 .pw-strength { height: 4px; margin-top: 7px; overflow: hidden; border-radius: 2px; background: rgba(35, 45, 70, .08); }
.auth-v6 .pw-bar { width: 0; height: 100%; border-radius: inherit; transition: width .3s, background .3s; }
.auth-v6 .pw-hint { min-height: 19px; margin-top: 4px; color: var(--auth-label); font-size: 12px; }
.auth-v6 .invalid-box { padding: 14px 0 4px; text-align: center; }
.auth-v6 .invalid-box svg { width: 40px; height: 40px; margin: 0 auto 12px; display: block; color: var(--auth-err); }
.auth-v6 .auth-consent-copy { margin: 14px 0; color: var(--auth-ink-2); }
.auth-v6 strong { font-weight: 500; }
.auth-v6 .auth-client { display: block; overflow-wrap: anywhere; }
.auth-v6 .auth-scope-list { margin: 10px 0 0; padding-left: 20px; color: var(--auth-ink-2); }
.auth-v6 code { font-family: "Outfit", sans-serif; font-weight: 400; }
.auth-v6 .auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.auth-v6 .auth-actions .auth-primary,
.auth-v6 .auth-actions .auth-secondary { margin: 0; display: grid; place-items: center; }
.auth-v6 .auth-actions .auth-secondary { min-height: 44px; padding: 10px 18px; border: 1px solid rgba(30, 58, 86, .18); border-radius: 12px; background: rgba(255, 255, 255, .6); }

@media (max-width: 520px) {
  body.auth-v6 { align-items: flex-start; padding: 16px; }
  .auth-v6 .login-shell,
  .auth-v6 .shell,
  .auth-v6 .auth-shell { margin: auto 0; padding: 28px 22px; }
  .auth-v6 .row,
  .auth-v6 .auth-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-transparency: reduce) {
  .auth-v6 .login-shell,
  .auth-v6 .shell,
  .auth-v6 .auth-shell {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
