.auth-center-wrap {
  min-height: 100vh;
}

body {
  background: var(--bs-body-bg) !important;
}

.auth-center-wrap,
.auth-center-wrap * {
  font-family: Vazirmatn, Vazir, "IRANSansX", "Segoe UI", Tahoma, sans-serif;
}

.auth-center-wrap .app-brand-text,
.login-brand-wrap .app-brand-text {
  font-family: Orbitron, sans-serif !important;
  letter-spacing: 0.04em;
}


.auth-login-card {
  width: 100%;
}

.auth-login-body {
  padding: 2rem;
}

.auth-title {
  font-weight: 600;
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-login-form .form-control {
  min-height: 2.6rem;
}

.auth-login-form .input-group-text {
  background: transparent;
}

.auth-login-form .btn {
  min-height: 2.6rem;
}

.login-brand-wrap {
  display: inline-flex;
  align-items: center;
}

.login-brand-logo {
  height: 40px;
  width: auto;
}

.login-brand-wrap .app-brand-text {
  margin-inline-start: 12px;
  font-size: 1.375rem;
  letter-spacing: 0.25px;
}

[dir="rtl"] .auth-back-chevron {
  transform: scaleX(-1);
}

.theme-corner-switch {
  --theme-switch-well: color-mix(in srgb, var(--bs-body-bg) 82%, #b8d9f2 18%);
  --theme-switch-knob: var(--bs-body-bg);
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

/* Recessed 3D track (indented well) */
.theme-corner-switch::before {
  content: "";
  position: absolute;
  inset: 0.28rem;
  border-radius: inherit;
  pointer-events: none;
  background: var(--theme-switch-well);
  box-shadow:
    inset 0 3px 8px rgb(0 0 0 / 0.22),
    inset 0 1px 2px rgb(0 0 0 / 0.16),
    inset 0 -1px 1px rgb(255 255 255 / 0.12);
}

[data-bs-theme="dark"] .theme-corner-switch {
  --theme-switch-well: color-mix(in srgb, var(--bs-body-bg) 50%, #000 50%);
  --theme-switch-knob: color-mix(in srgb, var(--bs-body-bg) 88%, #fff 12%);
}

.theme-icon-btn {
  position: relative;
  z-index: 1;
  height: 2.2rem;
  min-width: 2.2rem;
  padding: 0 0.3rem;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  overflow: hidden;
  background: var(--theme-switch-knob);
  color: var(--bs-secondary-color);
  box-shadow:
    0 3px 6px rgb(0 0 0 / 0.28),
    0 1px 1px rgb(0 0 0 / 0.18),
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    inset 0 -1px 1px rgb(0 0 0 / 0.18);
  transition:
    min-width 0.28s ease,
    padding 0.28s ease,
    gap 0.28s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-radius 0.28s ease,
    transform 0.2s ease;
}

.theme-icon-btn__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
}

.theme-icon-btn__label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  transform: translateX(0.4rem);
  transition:
    max-width 0.28s ease,
    opacity 0.2s ease,
    transform 0.28s ease,
    margin 0.28s ease;
}

.theme-icon-btn:hover,
.theme-icon-btn:focus-visible {
  min-width: 5.5rem;
  padding-inline: 0.4rem 0.65rem;
  gap: 0.3rem;
  border-radius: 999px;
  color: var(--bs-emphasis-color);
  background: var(--theme-switch-knob);
  box-shadow:
    0 4px 10px rgb(0 0 0 / 0.28),
    0 2px 3px rgb(0 0 0 / 0.18),
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    inset 0 -1px 1px rgb(0 0 0 / 0.16);
  outline: none;
  transform: translateY(-1px);
}

.theme-icon-btn:hover .theme-icon-btn__label,
.theme-icon-btn:focus-visible .theme-icon-btn__label {
  max-width: 4.5rem;
  opacity: 1;
  margin-inline-start: 0.1rem;
  transform: translateX(0);
}

.theme-icon-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.25),
    inset 0 2px 4px rgb(0 0 0 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.theme-icon-btn.is-active {
  color: var(--crm-primary-main);
  background: var(--theme-switch-knob);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.22),
    inset 0 1px 0 rgb(255 255 255 / 0.3),
    inset 0 -1px 1px rgb(0 0 0 / 0.16),
    0 0 0 1px rgb(var(--crm-primary-rgb) / 0.35);
}

[dir="rtl"] .theme-corner-switch {
  right: auto;
  left: 1rem;
}

[dir="rtl"] .theme-icon-btn__label {
  transform: translateX(-0.4rem);
}

[dir="rtl"] .theme-icon-btn:hover .theme-icon-btn__label,
[dir="rtl"] .theme-icon-btn:focus-visible .theme-icon-btn__label {
  transform: translateX(0);
}

.auth-ornament-wrap {
  position: relative;
  width: 100%;
  max-width: 450px;
}

.auth-loading-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--bs-primary-rgb) / 0.2);
  background: rgb(var(--bs-primary-rgb) / 0.05);
  color: var(--crm-primary-main);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

.auth-loading-banner:not(.d-none) {
  display: flex;
}

@media (min-width: 768px) {
  .auth-ornament-wrap::before {
    content: "";
    position: absolute;
    z-index: -1;
    height: 234px;
    width: 238px;
    top: -80px;
    left: -45px;
    border-radius: 12px;
    border: 1px solid rgb(var(--bs-primary-rgb) / 0.16);
    background: rgb(var(--bs-primary-rgb) / 0.08);
  }

  .auth-ornament-wrap::after {
    content: "";
    position: absolute;
    z-index: -1;
    height: 180px;
    width: 180px;
    left: -57px;
    bottom: -64px;
    border-radius: 20px;
    border: 2px dashed rgb(var(--bs-primary-rgb) / 0.16);
    background: rgb(var(--bs-primary-rgb) / 0.08);
  }
}

#loginSubmit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
