:root {
  --auth-blue-900: #062c5e;
  --auth-blue-800: #0b3a7a;
  --auth-blue-700: #0b4da2;
  --auth-blue-600: #1361c0;
  --auth-blue-500: #1b74e4;
  --auth-blue-050: #eef4fc;
  --auth-ink: #1f2937;
  --auth-muted: #64748b;
  --auth-line: #e2e8f0;
  --auth-amber: #ffc94d;
  --auth-shadow: 0 18px 45px -14px rgba(10, 42, 85, 0.22);
}

.auth-body {
  margin: 0;
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
  color: var(--auth-ink);
  background: #f4f6fb;
  -webkit-font-smoothing: antialiased;
}

.auth-body *, .auth-body *::before, .auth-body *::after {
  box-sizing: border-box;
}

/* ---------- Split shell ---------- */
.auth-shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------- Brand panel (left) ---------- */
.auth-brand {
  position: relative;
  flex: 1 1 56%;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 44px 52px 36px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(165deg, #0d4f9f 0%, #0b3a7a 48%, #062c5e 100%);
}

@media (min-width: 992px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 520px at 88% -12%, rgba(37, 120, 230, 0.5), transparent 62%),
    radial-gradient(620px 500px at -12% 112%, rgba(96, 170, 255, 0.28), transparent 60%);
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 35% 22%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at 35% 22%, #000 35%, transparent 78%);
}

.auth-brand > * {
  position: relative;
  z-index: 1;
  animation: authFadeUp 0.55s ease both;
}

.auth-brand-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.auth-brand-logo {
  background: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.45);
  display: inline-block;
}

.auth-brand-logo img {
  width: 120px;
  height: auto;
  display: block;
}

.auth-brand-chip {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, 0.45);
}

.auth-brand-chip img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.auth-brand-word {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.auth-brand-tag {
  margin-top: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.auth-brand-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 0 28px;
  max-width: 520px;
}

.auth-brand-title {
  margin: 0;
  font-size: 2.1rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.auth-brand-title em {
  font-style: normal;
  color: var(--auth-amber);
}

.auth-brand-copy {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.auth-features {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-feature-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-feature-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.auth-feature-text {
  margin-top: 2px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.66);
}

.auth-brand-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-badge i {
  font-size: 1.05rem;
  color: var(--auth-amber);
}

/* ---------- Form side (right) ---------- */
.auth-form {
  flex: 1 1 44%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 36px 24px;
  background:
    radial-gradient(900px 620px at 112% -10%, #dfeafb 0%, transparent 55%),
    radial-gradient(760px 560px at -18% 112%, #eef3fc 0%, transparent 52%),
    #f4f6fb;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: auto 0;
}

.auth-mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 26px;
}

@media (min-width: 992px) {
  .auth-mobile-brand {
    display: none;
  }
}

.auth-mobile-brand img {
  width: 115px;
  height: auto;
  display: block;
}

.auth-card-box {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  box-shadow: var(--auth-shadow);
  padding: 42px 40px 36px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--auth-blue-600);
}

.auth-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--auth-amber);
}

.auth-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--auth-ink);
}

.auth-sub {
  margin: 9px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--auth-muted);
}

.auth-form-fields {
  margin-top: 28px;
}

.auth-field + .auth-field {
  margin-top: 18px;
}

.auth-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--auth-ink);
}

.auth-control {
  position: relative;
}

.auth-control > i.bx {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: #8b98ad;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 49px;
  border: 1px solid #d7deea;
  border-radius: 11px;
  padding: 0 15px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--auth-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-control .auth-input {
  padding-left: 43px;
}

.auth-control.has-toggle .auth-input {
  padding-right: 48px;
}

.auth-input::placeholder {
  color: #a3aec2;
}

.auth-input:focus {
  border-color: var(--auth-blue-600);
  box-shadow: 0 0 0 4px rgba(27, 116, 228, 0.14);
}

.auth-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

select.auth-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 14px;
  padding-right: 42px;
}

.auth-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #7c88a0;
  font-size: 1.2rem;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
}

.auth-toggle:hover {
  color: var(--auth-blue-600);
}

.auth-hint {
  display: block;
  margin-top: 7px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--auth-muted);
}

.auth-hint b {
  color: var(--auth-ink);
}

.invalid-feedback {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #dc3545;
}

/* ---------- Buttons ---------- */
.auth-btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--auth-blue-500), var(--auth-blue-700));
  color: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 24px -12px rgba(11, 77, 162, 0.6);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.auth-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 18px 28px -12px rgba(11, 77, 162, 0.65);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-btn-outline {
  background: #fff;
  color: var(--auth-blue-700);
  border: 1px solid #c9d6ea;
  box-shadow: none;
}

.auth-btn-outline:hover {
  background: var(--auth-blue-050);
  border-color: var(--auth-blue-600);
  box-shadow: none;
  filter: none;
}

/* ---------- Options / check row ---------- */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--auth-muted);
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--auth-blue-600);
  cursor: pointer;
}

.auth-link {
  color: var(--auth-blue-600);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--auth-muted);
}

.auth-foot a {
  color: var(--auth-blue-600);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot a:hover {
  text-decoration: underline;
}

.auth-row {
  display: flex;
  gap: 14px;
}

.auth-row > * {
  flex: 1;
  min-width: 0;
}

/* ---------- Alerts ---------- */
.auth-alert {
  border-radius: 12px;
  font-size: 0.87rem;
  line-height: 1.55;
}

.auth-alert ul {
  margin: 0;
  padding-left: 18px;
}

.auth-alert .close {
  font-size: 1.2rem;
  line-height: 1;
}

/* ---------- Step indicator ---------- */
.auth-steps {
  display: flex;
  margin: 26px 0 2px;
}

.auth-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.auth-step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(-50% + 21px);
  right: calc(50% + 21px);
  height: 2px;
  background: #e4eaf4;
}

.auth-step:first-child::before {
  display: none;
}

.auth-step-dot {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #8b98ad;
  background: #fff;
  box-shadow: 0 0 0 1px #dbe2ee;
}

.auth-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-muted);
}

.auth-step.is-active .auth-step-dot {
  color: #fff;
  background: var(--auth-blue-700);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--auth-blue-600);
}

.auth-step.is-active .auth-step-label {
  color: var(--auth-blue-800);
}

.auth-step.is-done .auth-step-dot {
  color: #fff;
  background: var(--auth-blue-600);
  box-shadow: 0 0 0 1px var(--auth-blue-600);
}

.auth-step.is-done::before {
  background: var(--auth-blue-600);
}

/* ---------- Success icon block ---------- */
.auth-success-icon {
  width: 74px;
  height: 74px;
  margin: 6px auto 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.1rem;
  color: var(--auth-blue-600);
  background: var(--auth-blue-050);
  border: 1px solid #d3e4fb;
}

/* ---------- Polish & micro-interactions ---------- */
@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-brand > *:nth-child(2) {
  animation-delay: 0.1s;
}

.auth-brand > *:nth-child(3) {
  animation-delay: 0.2s;
}

.auth-card-box {
  animation: authFadeUp 0.55s ease both;
}

.auth-card-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-blue-600), var(--auth-blue-500) 50%, var(--auth-amber));
  border-radius: 18px 18px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand > *,
  .auth-card-box {
    animation: none;
  }
}

.auth-input:hover:not(:focus):not(.is-invalid) {
  border-color: #b7c5da;
}

.auth-toggle:focus-visible,
.auth-btn:focus-visible,
.auth-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 116, 228, 0.3);
  border-radius: 6px;
}

.auth-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 24px -12px rgba(11, 77, 162, 0.6);
}

.auth-features li {
  transition: transform 0.18s ease;
}

.auth-features li:hover {
  transform: translateX(4px);
}

.auth-feature-ico {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.auth-features li:hover .auth-feature-ico {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.auth-badge {
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.auth-badge:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.auth-link {
  transition: color 0.15s ease;
}

.auth-title {
  letter-spacing: -0.02em;
}

.auth-sub {
  line-height: 1.65;
}

/* ---------- Compact form (multi-step register) ---------- */
.auth-card-box--compact {
  padding: 30px 32px 26px;
}

.auth-card-box--compact .auth-eyebrow {
  margin-bottom: 8px;
}

.auth-card-box--compact .auth-title {
  font-size: 1.35rem;
}

.auth-card-box--compact .auth-sub {
  font-size: 0.88rem;
  margin-top: 6px;
}

.auth-card-box--compact .auth-steps {
  margin: 20px 0 0;
}

.auth-card-box--compact .auth-form-fields {
  margin-top: 22px;
}

.auth-card-box--compact .auth-field + .auth-field {
  margin-top: 13px;
}

.auth-card-box--compact .auth-row > .auth-field {
  margin-top: 0 !important;
}

.auth-card-box--compact .auth-field--submit {
  margin-top: 18px;
}

.auth-card-box--compact .auth-label {
  margin-bottom: 6px;
  font-size: 0.83rem;
}

.auth-card-box--compact .auth-input {
  height: 45px;
  font-size: 0.92rem;
}

.auth-card-box--compact .auth-hint {
  margin-top: 4px;
  font-size: 0.78rem;
}

.auth-card-box--compact .auth-btn {
  height: 47px;
}

.auth-row {
  margin-top: 14px;
}

.auth-row > .auth-field {
  margin-top: 0;
}

.auth-field--submit {
  margin-top: 18px;
}

/* ---------- Responsive tweaks ---------- */
@media (max-height: 760px) {
  .auth-brand {
    padding: 24px 44px 20px;
  }

  .auth-brand-logo img {
    width: 92px;
  }

  .auth-brand-body {
    padding: 16px 0 14px;
  }

  .auth-brand-title {
    font-size: 1.55rem;
  }

  .auth-brand-copy {
    font-size: 0.84rem;
  }

  .auth-feature-text {
    display: none;
  }

  .auth-features {
    margin-top: 14px;
    gap: 8px;
  }
}

@media (max-height: 620px) {
  .auth-brand-copy {
    display: none;
  }

  .auth-brand-logo img {
    width: 80px;
  }

  .auth-feature-title {
    font-size: 0.8rem;
  }
}

@media (max-height: 860px) {
  .auth-card-box--compact {
    padding: 22px 28px 20px;
  }

  .auth-card-box--compact .auth-input {
    height: 42px;
  }

  .auth-card-box--compact .auth-field + .auth-field,
  .auth-card-box--compact .auth-field--submit {
    margin-top: 11px;
  }

  .auth-card-box--compact .auth-sub {
    display: none;
  }

  .auth-card-box--compact .auth-steps {
    margin-top: 14px;
  }

  .auth-card-box--compact .auth-form-fields {
    margin-top: 16px;
  }
}

@media (max-height: 760px) {
  .auth-card-box--compact .auth-hint {
    display: none;
  }

  .auth-card-box--compact .auth-form-fields {
    margin-top: 12px;
  }
}

@media (max-width: 575.98px) {
  .auth-form {
    padding: 24px 14px;
  }

  .auth-card-box {
    padding: 26px 20px 22px;
  }

  .auth-mobile-brand {
    margin-bottom: 20px;
  }

  .auth-mobile-brand img {
    width: 128px;
  }

  .auth-eyebrow {
    font-size: 0.68rem;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .auth-sub {
    font-size: 0.88rem;
  }

  .auth-btn {
    height: 48px;
  }

  .auth-step-label {
    font-size: 0.62rem;
  }

  .auth-row {
    flex-direction: column;
    gap: 0;
  }
}

/* enrollment intent chip (step 1) */
.auth-intent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #eef4fc, #f7fbff);
  border: 1px solid #dbe7f6;
  border-left: 4px solid #1b74e4;
  border-radius: 10px;
}

.auth-intent-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  color: #1b74e4;
  font-size: 1.2rem;
  box-shadow: 0 2px 6px rgba(27, 116, 228, 0.15);
}

.auth-intent-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748b;
}

.auth-intent-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f2740;
  line-height: 1.35;
}

.auth-intent-num {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: #e4edfb;
  color: #1b74e4;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 2px;
}

/* terms & conditions consent */
.auth-field--terms {
  margin-top: 16px;
}

.auth-field--terms .auth-check {
  align-items: flex-start;
}

.auth-field--terms .auth-check span {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #64748b;
}

.auth-field--terms .auth-check a {
  color: var(--auth-blue-600);
  font-weight: 600;
}

