/* ===== Палитра: тёмно-синий / тёмно-зелёный ===== */
:root {
  --bg-1: #04101d;
  --bg-2: #06231d;
  --card-bg-1: rgba(10, 28, 46, 0.92);
  --card-bg-2: rgba(8, 30, 25, 0.92);
  --accent-green: #2fd48e;
  --accent-blue: #3b9be0;
  --text: #dce8f2;
  --muted: #7f95a9;
  --border: rgba(125, 175, 215, 0.16);
  --danger-bg: rgba(229, 72, 77, 0.10);
  --danger-border: rgba(229, 72, 77, 0.45);
  --danger-text: #ff9298;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(59, 155, 224, 0.16), transparent 60%),
    radial-gradient(900px 520px at 8% 108%, rgba(47, 212, 142, 0.13), transparent 60%),
    linear-gradient(135deg, var(--bg-1) 0%, #061a29 48%, var(--bg-2) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Фоновый узор: абстрактные «узлы сети» (встроенный SVG, без внешних картинок) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%234aa3df' stroke-opacity='0.10'%3E%3Cpath d='M24 36 L78 18 L132 44 L120 104 L52 118 Z'/%3E%3Cpath d='M78 18 L78 80 L120 104'/%3E%3Cpath d='M24 36 L78 80 L52 118'/%3E%3C/g%3E%3Cg%3E%3Ccircle cx='24' cy='36' r='3' fill='%232fd48e' fill-opacity='0.30'/%3E%3Ccircle cx='78' cy='18' r='2.5' fill='%234aa3df' fill-opacity='0.35'/%3E%3Ccircle cx='132' cy='44' r='3' fill='%232fd48e' fill-opacity='0.30'/%3E%3Ccircle cx='120' cy='104' r='2.5' fill='%234aa3df' fill-opacity='0.35'/%3E%3Ccircle cx='52' cy='118' r='3' fill='%232fd48e' fill-opacity='0.30'/%3E%3Ccircle cx='78' cy='80' r='2' fill='%239ecbff' fill-opacity='0.30'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

/* ===== Верхняя плашка ===== */
.topbar {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 14, 24, 0.55);
  backdrop-filter: blur(4px);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.topbar-inner b { color: var(--text); font-weight: 600; }
.topbar-icon {
  display: inline-block;
  margin-right: 6px;
  color: var(--accent-blue);
}

/* ===== Центральная карточка ===== */
.wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.card {
  width: min(430px, 100%);
  background: linear-gradient(160deg, var(--card-bg-1), var(--card-bg-2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 34px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.logo {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(47, 212, 142, 0.18), rgba(59, 155, 224, 0.18));
  border: 1px solid var(--border);
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.subtitle {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--muted);
}

/* ===== Блок ошибки ===== */
.alert {
  text-align: left;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.alert-title {
  color: var(--danger-text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.alert-text {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 12px;
}

/* ===== Поля формы ===== */
.field {
  display: block;
  text-align: left;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: rgba(4, 12, 21, 0.65);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #5b7186; }
.field input:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(47, 212, 142, 0.15);
}

/* ===== Ряд: запомнить / забыли пароль ===== */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.remember input { accent-color: var(--accent-green); }

.link {
  color: var(--accent-blue);
  text-decoration: none;
}
.link:hover { text-decoration: underline; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.6px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: filter .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #04140c;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  width: auto;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ===== Подвал карточки и страницы ===== */
.card-version {
  margin-top: 22px;
  font-size: 11.5px;
  color: #55708a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 18px;
  text-align: center;
  font-size: 12px;
  color: #55708a;
  border-top: 1px solid var(--border);
  background: rgba(4, 14, 24, 0.4);
}
