/* ============================================================
   SDM — Login Page Styles
   ============================================================ */

body.login-page {
  background: #000 url("../avatars/wallp.jpg") center/cover no-repeat fixed;
}

body.login-page .bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, .35);
  backdrop-filter: blur(6px);
  z-index: 0;
}

body.login-page .floaters-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

body.login-page .avatar-random {
  position: absolute;
  width: 90px;
  z-index: 2;
}

body.login-page .login-wrapper {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
}

body.login-page .logo-sdm {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 3;
}

body.login-page .logo-sdm img {
  height: 150px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45));
}

body.login-page .login-card {
  width: 100%;
  max-width: 380px;
  padding: 26px 26px 30px;
  background: rgba(255, 255, 255, .55);
  color: var(--rm-text);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .28), 0 4px 10px rgba(0, 0, 0, .12);
  position: relative;
  z-index: 4;
}

body.login-page .login-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: .03em;
  color: #000;
  text-align: center;
}

body.login-page .login-subtitle {
  font-size: 12px;
  text-align: center;
  margin-bottom: 18px;
  color: rgba(0, 0, 0, .55);
}

body.login-page .login-field {
  margin-bottom: 12px;
}

body.login-page .login-label {
  font-size: 12px;
  margin-bottom: 4px;
  opacity: .9;
}

body.login-page .login-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, .10);
  background: rgba(255, 255, 255, .35);
  color: #000;
  font-size: 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

body.login-page .login-input:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, .25);
  background: rgba(255, 255, 255, .9);
}

/* ── Password wrapper & toggle ── */
body.login-page .login-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

body.login-page .login-pw-wrap .login-input {
  padding-right: 36px;
  font-size: 13px;
}

body.login-page .login-pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
  line-height: 0;
}

body.login-page .login-pw-toggle:hover {
  color: rgba(0, 0, 0, .75);
}

/* ── Remember me custom checkbox ── */
body.login-page .login-remember {
  margin: 8px 0 4px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 12px;
}

body.login-page .rm-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

body.login-page .rm-check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

body.login-page .rm-check-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(0, 0, 0, .25);
  background: rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
  color: transparent;
}

body.login-page .rm-check-input:checked+.rm-check-box {
  background: #007aff;
  border-color: #007aff;
  color: #fff;
}

body.login-page .rm-check-input:focus-visible+.rm-check-box {
  box-shadow: 0 0 0 2px rgba(0, 122, 255, .35);
}

body.login-page .rm-check-text {
  color: rgba(0, 0, 0, .65);
  font-size: 12px;
}

body.login-page .login-footer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
}

body.login-page .login-button {
  padding: 8px 22px;
  min-width: 120px;
  background: #007aff;
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  box-shadow: 0 10px 20px rgba(0, 122, 255, .35);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body.login-page .login-button:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
}

body.login-page .login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 122, 255, .45);
  background: #1a84ff;
}

body.login-page .input-error {
  border-color: #ff3b30 !important;
  box-shadow: 0 0 0 1px rgba(255, 59, 48, .4) !important;
}

body.login-page .login-error-msg {
  margin-top: 6px;
  font-size: 11px;
  color: #ff3b30;
  min-height: 14px;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

body.login-page .shake {
  animation: shake .25s ease-in-out;
}

/* ── Spinner ── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body.login-page .spin {
  animation: spin .8s linear infinite;
}

body.login-page .login-btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}