/* Модальное окно входа — тёмная тема, те же токены, что в chrome.css */

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--sh-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

.login-modal[hidden] {
  display: none;
}

.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.login-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #121822;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  color: var(--sh-text, #e6eaf2);
}

.login-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sh-text-soft, #9aa7ba);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.login-modal__close:hover {
  color: var(--sh-text, #e6eaf2);
  background: rgba(148, 163, 184, 0.1);
}

.login-modal__title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-modal__alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.login-modal__alert[hidden] {
  display: none;
}

.login-modal__field {
  margin-bottom: 14px;
}

.login-modal__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sh-text-soft, #9aa7ba);
}

.login-modal__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(10, 14, 22, 0.65);
  color: var(--sh-text, #e6eaf2);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-modal__field input:focus {
  outline: none;
  border-color: var(--sh-accent, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.login-modal__submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--sh-accent, #3b82f6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.login-modal__submit:hover:not(:disabled) {
  background: var(--sh-accent-hover, #2f6fd8);
}

.login-modal__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-modal__links {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--sh-text-soft, #9aa7ba);
}

.login-modal__links a {
  color: var(--sh-accent, #3b82f6);
  text-decoration: none;
}

.login-modal__links a:hover {
  text-decoration: underline;
}

body.login-modal-open {
  overflow: hidden;
}
