/* ===== Базовые токены под твой 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:
    radial-gradient(1200px 600px at 10% -10%, rgba(102,126,234,.10), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(118,75,162,.10), transparent 60%),
    linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

/* ===== Контейнер карточки ===== */
.auth{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.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;
  box-shadow: var(--shadow-lg);
}

/* ===== Левая панель бренда ===== */
.auth-brand{
  position: relative;
  padding: 48px 44px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  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;
}
.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);
}

/* ===== Правая панель формы ===== */
.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: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display:grid; place-items: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){
  .auth-card{
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .auth-brand{
    padding: 36px 28px;
  }
  .auth-form{
    padding: 28px;
  }
  .brand-footer{
    position: static; margin-top: 24px;
  }
}