/* ===== Авторизационная модалка (логин/регистрация) ===== */
/* Скопировать в отдельный файл и подключить в base.html ПОСЛЕ base.css и modals.css */

/* Оверлей */
.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.45);
  z-index:2000; /* выше фиксированной шапки */
}

/* Контейнер */
.modal__content{
  width:min(380px,92vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  color:#111;
  padding:20px;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.2);
  position:relative;
}

/* Хедер и крестик */
.modal__header{
  position:sticky; top:0;
  background:inherit;
  display:flex; justify-content:flex-end;
  padding:4px 0 8px;
  margin-bottom:8px;
  border-bottom:1px solid #e5e7eb;
  z-index:10;
}
.modal__close{
  background:transparent; border:0;
  font-size:18px; line-height:1;
  color:#6b7280; cursor:pointer;
}
.modal__close:hover{ color:#b91c1c; }

/* Заголовок */
.welcome-title{
  margin:0 0 16px;
  font-size:18px; font-weight:600; text-align:center;
  color:#111;
}

/* Формы */
form{ display:flex; flex-direction:column; gap:12px; }
label span{ display:block; font-size:12px; color:#6b7280; margin-bottom:4px; }
input{
  width:100%; padding:10px;
  border:1px solid #e5e7eb; border-radius:6px;
  font-size:14px; background:#f9fafb; color:#111;
}
input:focus{
  border-color:#2563eb; outline:none;
  box-shadow:0 0 0 2px rgba(37,99,235,.3);
}
.error{ color:#b91c1c; font-size:13px; min-height:18px; }

/* Нижний блок действий */
.actions{
  display:flex; gap:10px; margin-top:4px;
}
.actions .btn{
  flex:1; /* две кнопки одинаковой ширины */
}

/* Кнопки — локальные стили для светлой карточки */
.modal__content .btn{
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:6px;
  background:#f3f4f6;
  color:#111;
  font-size:14px; font-weight:600;
  cursor:pointer;
}
.modal__content .btn:hover{ background:#e5e7eb; }
.modal__content .btn.primary{
  background:#2563eb; border-color:#2563eb; color:#fff;
}

/* Google */
.google-btn{
  display:flex; align-items:center; justify-content:center; gap:6px;
  width:100%; margin-top:12px; padding:10px;
  border:1px solid #e5e7eb; border-radius:6px;
  background:#fff; color:#111; font-size:14px; font-weight:600;
  cursor:pointer;
}
.google-btn:hover{ background:#f8fafc; }
.google-btn img{ width:18px; height:18px; }

/* Блокируем скролл фона при открытой модалке */
body.modal-open{ overflow:hidden; }

/* Мобильные правки */
@media (max-width:420px){
  .modal__content{ padding:16px; border-radius:12px; }
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.switch-link {
  margin-top: 10px;
  font-size: 13px;
  text-align: center;
}
.switch-link a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.switch-link a:hover {
  text-decoration: underline;
}
