/* ===== Базовые токены под твой navbar (#667eea → #764ba2) ===== */
:root{
  --accent-1: #667eea;
  --accent-2: #764ba2;
  --accent-3: #5563df;

  --text: #0f172a;
  --muted: #6b7280;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #d8dee9;
  --error: #e65c5c;

  --radius: 14px;
  --shadow-lg: 0 22px 50px rgba(15,23,42,.12);
  --shadow-md: 0 10px 28px rgba(15,23,42,.10);
}

/* ===== Сброс / база ===== */
*{ box-sizing: border-box; }
html,body{ height:100%; }


body{
  margin:0;
  zoom: 0.8;
  color: var(--text);
  font: 16px/1.5 "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background:
    /* Увеличиваем прозрачность для лучшей читаемости */
    linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(248,250,252,0.8) 100%),
    /* Ваше фоновое фото */
    url('../img/login_bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  /* Добавляем размытие фона */
  backdrop-filter: blur(1px);
}




/* ===== Контейнер карточки ===== */
.auth{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}

.company-name {
  text-align: center;
  margin: 25px 0;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.company-name h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.company-name p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* Стеклянная подложка-доска */
.auth::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, 95vw);
  height: 650px;

  /* Интенсивный стеклянный эффект */
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.05) 70%,
    rgba(255, 255, 255, 0.2) 100%
  );

  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);

  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.5);

  /* Сильные глянцевые блики */
  box-shadow:
    0 45px 90px rgba(15, 23, 42, 0.35),
    inset 0 2px 1px rgba(255, 255, 255, 0.8),
    inset 0 -2px 1px rgba(255, 255, 255, 0.3),
    inset 2px 0 1px rgba(255, 255, 255, 0.2),
    inset -2px 0 1px rgba(255, 255, 255, 0.2);

  z-index: 0;
}

.auth-card{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  /*width: min(1024px, 96vw);*/
  min-height: 580px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 1;
  /* Усиливаем тень основной карты */
  box-shadow:
    0 32px 64px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);

  /* Центрируем карту точно по центру доски */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

}

/* ===== Левая панель бренда ===== */
.auth-brand{
  position: relative;
  padding: 48px 44px;
  color: #fff;
  background:
    /* Градиент с текстурами для производства */
    linear-gradient(135deg, var(--accent-1), var(--accent-2)),
    /* Символические узоры */
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 40%);
  isolation: isolate;
}
.auth-brand::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(300px 160px at 15% 20%, rgba(255,255,255,.12), transparent 60%),
    radial-gradient(400px 220px at 85% 80%, rgba(255,255,255,.12), transparent 60%);
  opacity:.9;
  z-index:-1;
}
.brand-top{ margin-bottom: 28px; }
.brand-mark{
  width:56px; height:56px;
  display:grid; place-items:center;
  border-radius:14px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  margin-bottom: 16px;
}
.brand-mark i{ font-size: 22px; }
.brand-title{
  margin:0 0 6px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing:.2px;
}
.brand-subtitle{
  margin:0;
  color: rgba(255,255,255,.9);
  font-size: 15px;
}

.brand-points{
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.brand-points li{
  display:flex; align-items:center; gap:10px;
  font-size: 14px;
  color: rgba(255,255,255,.95);
}
.brand-points i{ color: #dbeafe; }

.brand-footer{
  margin-top: auto;
  position: absolute;
  left: 44px; right: 44px; bottom: 28px;
  color: rgba(255,255,255,.8);
  z-index: 1;
}

/* ===== Правая панель формы ===== */
.auth-form{
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}
.form-header h2{
  margin:0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: #1f2937;
}
.form-header p{
  margin:0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

/* Сообщения */
.messages{ margin-bottom: 14px; display:grid; gap:10px; }
.msg{
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.msg-success{ border-color: #16a34a33; background:#16a34a10; }
.msg-error{ border-color: #ef444433; background:#ef444410; }

/* Поля формы */
.form-group{ margin-bottom: 18px; }
.form-group label{
  display:block; margin-bottom: 8px;
  font-size: 13px; font-weight: 600; color:#0f172a;
}
.form-control{
  width:100%;
  height: 46px;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}
.form-control::placeholder{ color:#9aa7b6; }
.form-control:hover{ border-color:#b7c2d1; }
.form-control:focus{
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 .2rem rgba(102,126,234,.20);
}

/* Ошибка поля */
.field-error{
  display:block;
  margin-top:6px;
  color: var(--error);
  font-size: 12px;
}

/* Пароль + переключатель */
.password-toggle{ position:relative; }
.toggle-password{
  position:absolute;
  right: 12px;
  top: 32px;
  width: 34px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
}
.toggle-password:hover{ background:#f1f5f9; }

/* Ряд с «Запомнить меня» */
.form-row{
  display:flex; align-items:center; justify-content:space-between;
  gap: 14px; margin: 8px 0 18px;
}
.checkbox{ display:flex; align-items:center; gap:8px; font-size:14px; color:#374151; }
.checkbox input{ width:16px; height:16px; accent-color: var(--accent-1); }
.link-muted{ color: var(--muted); text-decoration:none; font-size:14px; }
.link-muted:hover{ color:#374151; text-decoration:underline; }

/* Кнопка входа */
.btn-primary{
  width:100%;
  height: 46px;
  border:none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  color:#fff;
  cursor:pointer;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: var(--shadow-md);
  transition: transform .06s ease, filter .2s ease;
}
.btn-primary:hover{ filter: brightness(1.03); }
.btn-primary:active{ transform: translateY(1px); }

/* Низ формы */
.form-footer{
  margin-top: 18px;
  text-align:center;
  color: var(--muted);
  font-size: 12px;
}

/* ===== Адаптив ===== */
/* ===== Адаптив для мобильных ===== */
@media (max-width: 980px){
  body {
    /* Убираем фоновое фото на мобильных */
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  }

  .auth-card{
    grid-template-columns: 1fr;
    min-height: auto;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 95vw;
    margin: 20px auto;
  }

  .auth::before {
    display: none; /* Скрываем стеклянную доску на мобильных */
  }

  .auth::after {
    display: none; /* Скрываем блики */
  }

  .auth-brand{
    padding: 30px 24px;
  }

  .auth-form{
    padding: 24px;
  }

  .brand-footer{
    position: static;
    margin-top: 24px;
  }

  .company-name {
    margin: 20px 0;
    padding: 12px;
  }
}

@media (max-width: 480px){
  body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  }

  .auth{
    padding: 16px;
    zoom: 1; /* Убираем zoom на мобильных */
  }

  .auth-card{
    width: 100%;
    margin: 10px auto;
  }

  .auth-brand{
    padding: 24px 20px;
  }

  .auth-form{
    padding: 20px;
  }

  .brand-title {
    font-size: 20px;
  }

  .company-name h3 {
    font-size: 16px;
  }

  .company-name p {
    font-size: 12px;
  }

  .form-header h2 {
    font-size: 22px;
  }
}