.auth-shell {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}

.auth-card {
  width: min(100%, 440px);
  border: 1px solid rgba(108, 117, 125, .16);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.auth-card-wide {
  width: min(100%, 560px);
}

.auth-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(108, 117, 125, .12);
  background:
    radial-gradient(circle at top right, rgba(13, 110, 253, .09), transparent 38%),
    color-mix(in srgb, var(--bs-primary) 4%, var(--bs-body-bg));
}

.auth-header h1 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
}

.auth-body {
  padding: 24px 28px 28px;
}

.auth-card .form-label {
  margin-bottom: 6px;
  font-weight: 600;
}

.auth-card .input-group-text,
.auth-card .form-control,
.auth-card .form-select,
.auth-card .btn {
  min-height: 44px;
}

.auth-card .input-group-text {
  border-color: rgba(108, 117, 125, .18);
}

.auth-card .form-control,
.auth-card .form-select {
  border-color: rgba(108, 117, 125, .18);
  box-shadow: none;
}

.auth-card .form-control:focus,
.auth-card .form-select:focus {
  border-color: rgba(13, 110, 253, .4);
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .08);
}

.auth-card .input-group {
  border-radius: 12px;
}

.auth-card .input-group > .form-control,
.auth-card .input-group > .form-select,
.auth-card .input-group > .input-group-text,
.auth-card .input-group > .btn {
  border-radius: 12px;
}

.auth-card .input-group > .input-group-text {
  padding-inline: .85rem;
}

.auth-card .btn-primary,
.auth-card .btn-outline-primary {
  border-radius: 12px;
  font-weight: 600;
}

.auth-card .btn-outline-secondary {
  border-color: rgba(108, 117, 125, .18);
}

.auth-captcha {
  width: 112px;
  height: 44px;
  cursor: pointer;
  object-fit: contain;
  flex: 0 0 112px;
  border: 1px solid rgba(108, 117, 125, .18);
}

.auth-passkey {
  margin-top: 18px;
}

.auth-passkey-primary {
  margin-top: 0;
}

.auth-passkey-btn {
  box-shadow: 0 14px 30px rgba(13, 110, 253, .14);
}

.auth-password-block {
  margin-top: 18px;
}

.auth-password-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(108, 117, 125, .16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(108, 117, 125, .05), rgba(108, 117, 125, .025));
  color: var(--bs-body-color);
  text-align: left;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease, border-radius .2s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  border-color: rgba(13, 110, 253, .28);
  background:
    linear-gradient(180deg, rgba(13, 110, 253, .06), rgba(13, 110, 253, .03));
  box-shadow: 0 10px 22px rgba(13, 110, 253, .08);
  outline: none;
}

.auth-password-toggle[aria-expanded="true"] {
  border-color: rgba(13, 110, 253, .34);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background:
    linear-gradient(180deg, rgba(13, 110, 253, .08), rgba(13, 110, 253, .04));
  box-shadow: none;
}

.auth-password-toggle-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-password-toggle-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 110, 253, .1);
  color: var(--bs-primary);
  flex: 0 0 36px;
}

.auth-password-toggle-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-password-toggle-title {
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.2;
}

.auth-password-toggle-subtitle {
  font-size: .78rem;
  color: var(--bs-secondary-color);
  margin-top: 2px;
}

.auth-password-toggle-chevron {
  color: var(--bs-secondary-color);
  flex: 0 0 auto;
  transition: transform .2s ease, color .2s ease;
}

.auth-password-toggle[aria-expanded="true"] .auth-password-toggle-chevron {
  transform: rotate(90deg);
  color: var(--bs-primary);
}

.auth-password-panel {
  margin-top: 0;
  padding: 16px 16px 0;
  border: 1px solid rgba(13, 110, 253, .34);
  border-top: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 110, 253, .03), rgba(13, 110, 253, .015));
}

.auth-success-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(25, 135, 84, .22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(25, 135, 84, .08), rgba(25, 135, 84, .04));
  color: #146c43;
  text-align: center;
}

.auth-success-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 135, 84, .12);
  color: #198754;
  flex: 0 0 28px;
}

.auth-success-text {
  font-size: .94rem;
  font-weight: 600;
  letter-spacing: 0;
}

.auth-success-spinner {
  color: #198754;
  flex: 0 0 auto;
}

.captcha-row {
  flex-wrap: nowrap;
  align-items: stretch;
}

.captcha-row .form-control {
  min-width: 0;
}

@media (max-width: 575.98px) {
  .auth-shell {
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .auth-card {
    border-radius: 14px;
  }

  .auth-header,
  .auth-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .auth-header {
    padding-top: 20px;
    padding-bottom: 14px;
  }

  .auth-body {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .auth-header h1 {
    font-size: 1.2rem;
  }

  .auth-password-toggle {
    padding: 13px 14px;
  }

  .auth-password-toggle-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .auth-password-panel {
    padding: 14px 14px 0;
  }

  .auth-success-notice {
    align-items: flex-start;
  }

  .captcha-row {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .auth-captcha {
    width: 96px;
    height: 42px;
    flex: 0 0 96px;
  }
}

html[data-bs-theme="dark"] .auth-card {
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 26px 64px rgba(0, 0, 0, .28);
}

html[data-bs-theme="dark"] .auth-header {
  border-bottom-color: rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at top right, rgba(110, 168, 254, .16), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
}

html[data-bs-theme="dark"] .auth-card .input-group-text,
html[data-bs-theme="dark"] .auth-card .form-control,
html[data-bs-theme="dark"] .auth-card .form-select,
html[data-bs-theme="dark"] .auth-captcha,
html[data-bs-theme="dark"] .auth-card .btn-outline-secondary,
html[data-bs-theme="dark"] .auth-card .btn-outline-primary,
html[data-bs-theme="dark"] .auth-password-toggle,
html[data-bs-theme="dark"] .auth-password-panel,
html[data-bs-theme="dark"] .auth-success-notice {
  border-color: rgba(255, 255, 255, .1);
}

html[data-bs-theme="dark"] .auth-password-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
}

html[data-bs-theme="dark"] .auth-password-toggle:hover,
html[data-bs-theme="dark"] .auth-password-toggle:focus,
html[data-bs-theme="dark"] .auth-password-toggle[aria-expanded="true"],
html[data-bs-theme="dark"] .auth-password-panel {
  background:
    linear-gradient(180deg, rgba(110, 168, 254, .1), rgba(110, 168, 254, .05));
}

html[data-bs-theme="dark"] .auth-password-toggle-icon {
  background: rgba(110, 168, 254, .14);
  color: #9ec5fe;
}

html[data-bs-theme="dark"] .auth-success-notice {
  background: linear-gradient(180deg, rgba(32, 201, 151, .14), rgba(32, 201, 151, .08));
  color: #75b798;
}

html[data-bs-theme="dark"] .auth-success-icon,
html[data-bs-theme="dark"] .auth-success-spinner {
  color: #20c997;
}

html[data-bs-theme="dark"] .auth-success-icon {
  background: rgba(32, 201, 151, .14);
}

html[data-bs-theme="dark"] .auth-card .form-control,
html[data-bs-theme="dark"] .auth-card .form-select,
html[data-bs-theme="dark"] .auth-card .input-group-text {
  background-color: rgba(255, 255, 255, .03);
}

/* Site UI coordination: keep auth surfaces aligned with global theme. */
.auth-card,
.auth-card .input-group,
.auth-card .input-group > .form-control,
.auth-card .input-group > .form-select,
.auth-card .input-group > .input-group-text,
.auth-card .input-group > .btn,
.auth-card .btn-primary,
.auth-card .btn-outline-primary,
.auth-password-toggle,
.auth-password-panel,
.auth-success-notice {
  border-radius: var(--holxn-radius, 8px);
}

.auth-password-toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-password-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Modern UI coordination pass */
.auth-card {
  border-radius: var(--holxn-radius, 8px);
  border-color: var(--holxn-border-soft, rgba(108, 117, 125, 0.18));
  background: var(--holxn-surface, rgba(255, 255, 255, 0.82));
  box-shadow: var(--holxn-shadow-md, 0 0.8rem 2rem rgba(15, 23, 42, 0.08));
}

.auth-header,
.auth-password-toggle,
.auth-password-panel,
.auth-success-notice {
  background: var(--holxn-surface-muted, rgba(248, 250, 252, 0.88));
}

.auth-passkey-btn {
  box-shadow: var(--holxn-shadow-sm, 0 0.35rem 1rem rgba(15, 23, 42, 0.055));
}

