/* === Макет под base.html === */

.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 16px;
}

.content {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* === Карточка авторизации === */

.auth-page {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-card {
  background: rgba(10, 10, 10, 0.96);
  border-radius: 16px;
  padding: 26px 28px;
  width: 100%;
  border: 1px solid rgba(255, 165, 0, 0.35);
  box-shadow: 0 0 30px rgba(255, 165, 0, 0.3);
}

.auth-card h2 {
  color: #ffa500;
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
}

/* === Форма === */

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-card input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #f5f5f5;
  color: #000;
  font-size: 14px;
}

.auth-card input::placeholder {
  color: #888;
}

.auth-card form > button[type="submit"] {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: #ffa500;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.25s;
}

.auth-card form > button[type="submit"]:hover {
  transform: scale(1.03);
}

.auth-card form > button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-password-input-wrap {
  position: relative;
}

.auth-password-input {
  padding-right: 46px !important;
}

.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 165, 0, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: #ffd27a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0 !important;
}

.auth-eye {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-eye svg {
  width: 18px;
  height: 18px;
  display: block;
}

.auth-eye-open {
  display: none;
}

.auth-password-toggle.is-active .auth-eye-closed {
  display: none;
}

.auth-password-toggle.is-active .auth-eye-open {
  display: inline-flex;
}

.auth-password-toggle:hover {
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.4);
}

.auth-password-toggle.is-active {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 165, 0, 0.22);
}

.password-rules {
  margin: -2px 0 2px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.password-rules li {
  font-size: 13px;
  color: #b8b8b8;
  line-height: 1.25;
  position: relative;
  padding-left: 18px;
}

.password-rules li::before {
  content: "•";
  position: absolute;
  left: 5px;
  top: 0;
  color: #8f8f8f;
}

.password-rules li.is-ok {
  color: #70d58f;
}

.password-rules li.is-ok::before {
  content: "✓";
  left: 3px;
  color: #70d58f;
}

.password-rules li.is-missing {
  color: #b8b8b8;
}

/* Кнопка в кулдауне (если используешь эту же логику тут) */
.disabled-btn {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === Ссылка "Зарегистрироваться" === */

.switch-link {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: #ccc;
}

.switch-link a {
  color: #ffa500;
  text-decoration: none;
}

.switch-link a:hover {
  color: #ffa500;
  text-shadow: 0 0 8px #ffa500;
}

/* === Flash-сообщения (используют базовый стиль из base.css, здесь только отступы) === */

.flash-messages {
  margin-bottom: 10px;
}

/* === Адаптив === */

@media (max-width: 600px) {
  .auth-card {
    padding: 22px 18px;
  }

  .auth-card h2 {
    font-size: 18px;
  }
}

/* === Светлая тема для login === */

body.light-theme .auth-card {
  background: #ffffff;
  color: #000;
  border: 1px solid #bbb;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.12);
}

body.light-theme .auth-card input {
  background: #ffffff;
  border: 1px solid #bbb;
  color: #000;
}

body.light-theme .auth-card input::placeholder {
  color: #777;
}

body.light-theme .auth-card form > button[type="submit"] {
  background: #cfcfcf;
  border: 1px solid #bbb;
  color: #000;
}

body.light-theme .auth-password-toggle {
  background: #f3f3f3;
  color: #444;
  border-color: #cfcfcf;
}

body.light-theme .auth-password-toggle:hover {
  background: #e9e9e9;
  border-color: #bdbdbd;
}

body.light-theme .auth-password-toggle.is-active {
  background: #f3f3f3;
  border-color: #cfcfcf;
  color: #444;
}

body.light-theme .switch-link {
  color: #555;
}

body.light-theme .switch-link a {
  color: #e19b00;
}

body.light-theme .auth-card h2 {
    color: #000;
}

body.light-theme .password-rules li.is-missing {
  color: #777;
}

body.light-theme .password-rules li.is-ok {
  color: #2f9f54;
}
