/* Стиль в духе типичных NVR web-панелей (Hikvision/Dahua-like), без копирования брендов */
:root {
  --bg-dark: #0f1724;
  --bg-panel: #152238;
  --accent: #1e6fd9;
  --accent-hover: #2580f0;
  --text: #e8eef7;
  --text-muted: #8fa3bf;
  --border: #243552;
  --danger: #e85d5d;
  --card: #ffffff;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #e9eef4;
  color: #1a2636;
  min-height: 100vh;
}

.page {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  .brand { min-height: 200px; }
}

.brand {
  background: linear-gradient(145deg, var(--bg-dark) 0%, var(--bg-panel) 55%, #1a3a5c 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.brand-inner { max-width: 360px; }

.logo {
  width: 56px;
  height: 56px;
  color: #5eb3ff;
  margin-bottom: 1.25rem;
}

.brand h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.features {
  list-style: none;
  margin: 2rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.features li {
  padding: 0.35rem 0;
  padding-left: 1.1rem;
  position: relative;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.ver {
  font-size: 0.75rem;
  color: #5a7088;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(180deg, #f0f4f9 0%, #e4eaf2 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid #d8e0ea;
  overflow: hidden;
}

.login-header {
  padding: 1.75rem 2rem 0.5rem;
  border-bottom: 1px solid #eef2f7;
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: #e8f2ff;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.login-header h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a2636;
}

.login-header p {
  font-size: 0.85rem;
  color: #6b7d93;
  margin-top: 0.35rem;
}

.login-form { padding: 1.5rem 2rem 1.75rem; }

.field {
  display: block;
  margin-bottom: 1.1rem;
}

.field span {
  display: block;
  font-size: 0.8rem;
  color: #5a6d82;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c5d0de;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 111, 217, 0.15);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #5a6d82;
  cursor: pointer;
}

.check input { width: auto; }

#lang {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #c5d0de;
  border-radius: 4px;
  color: #3d4f63;
}

.alert {
  font-size: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert.error {
  background: #fff0f0;
  border: 1px solid #f5c4c4;
  color: #b33a3a;
}

.alert.warn {
  background: #fff8e6;
  border: 1px solid #f0dfa8;
  color: #8a6d1a;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-primary:disabled {
  opacity: 0.75;
  cursor: wait;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.login-footer {
  padding: 0.75rem 2rem 1.25rem;
  border-top: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.muted { color: #8a9bb0; text-decoration: none; }
