.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 30, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: loginModalFade 0.18s ease;
}

@keyframes loginModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-modal {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 28px;
  box-shadow: 0 24px 60px rgba(8, 15, 30, 0.28);
  animation: loginModalPop 0.2s ease;
}

@keyframes loginModalPop {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.login-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--light, #f2f6ff);
  color: var(--muted, #667);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.login-modal-close:hover {
  background: var(--blue, #185adb);
  color: #fff;
}

.login-modal .auth-brand-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-decoration: none;
}

.login-modal h2 {
  font-size: 24px;
  margin: 0 0 4px;
}

.login-modal > p {
  color: var(--muted, #667);
  margin: 0 0 20px;
  font-size: 14px;
}

.login-modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.login-modal-tabs button {
  border: 1px solid var(--line, #dce2ed);
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #667);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.login-modal-tabs button.active {
  border-color: var(--blue, #185adb);
  background: #f2f6ff;
  color: var(--blue, #185adb);
}

.login-modal form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #384358;
  margin-bottom: 16px;
}

.login-modal form input {
  display: block;
  width: 100%;
  border: 1px solid #dce2ed;
  border-radius: 8px;
  padding: 11px 12px;
  margin-top: 6px;
  outline: 0;
  background: #fff;
  color: var(--ink, #222);
  box-sizing: border-box;
}

.login-modal form input:focus {
  border-color: var(--blue, #185adb);
  box-shadow: 0 0 0 3px rgba(24, 90, 219, 0.08);
}

.login-modal .button-block {
  width: 100%;
  margin-top: 4px;
}

.login-modal .auth-switch {
  text-align: center;
  font-size: 13px;
  margin: 10px 0 0 !important;
}

.login-modal .auth-switch a {
  color: var(--blue, #185adb);
  font-weight: 700;
}

@media (max-width: 480px) {
  .login-modal {
    padding: 28px 20px 22px;
    border-radius: 12px;
  }
}
