:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #e4e9f2;
  --txt: #1b2430;
  --muted: #66738c;
  --accent: #2563eb;
  --accent-hover: #1d4fd7;
  --red: #dc2626;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --rad: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); background: var(--bg); color: var(--txt);
  padding: 20px;
  background-image: radial-gradient(1200px 500px at 70% -10%, #dce7ff55, transparent 60%),
    radial-gradient(900px 400px at 10% 110%, #e9e2ff55, transparent 60%);
}
.login-card {
  width: 100%; max-width: 380px; margin: 0 auto;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 30px 28px 26px;
  animation: popIn .2s ease;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: none; color: #fff; font-size: 18px;
  box-shadow: none;
}
.brand-mark > img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; display: block;
}
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.brand-sub { font-size: 12px; color: var(--muted); }
h2 { margin: 18px 0 4px; font-size: 17px; }
.sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
input {
  width: 100%; padding: 11px 13px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--txt);
  background: #fbfcfe; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #2563eb22; background: #fff; }
.btn {
  width: 100%; margin-top: 4px; padding: 12px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  font-family: inherit; transition: background-color .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn:disabled { opacity: .6; cursor: default; }
.err { display: none; color: var(--red); font-size: 13px; margin: 12px 0 6px; }
.err.show { display: block; }
.foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; }
/* ссылки на документы (оферта/тарифы/политика) — публичны без входа */
.doc-links {
  margin-top: 14px; display: flex; justify-content: center;
  gap: 14px; flex-wrap: wrap; font-size: 12px;
}
.doc-links a { color: var(--accent); text-decoration: none; }
.doc-links a:hover { text-decoration: underline; }
/* обратная связь без входа: окно справа от формы логина (на узких экранах — под ней) */
.feedback-card {
  position: fixed; top: 50%; right: 20px; transform: translateY(-50%);
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 22px 24px 20px;
  display: flex; flex-direction: column;
}
.feedback-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.feedback-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.feedback-title i { color: var(--accent); }
.feedback-sub { color: var(--muted); font-size: 12px; line-height: 1.5; }
.feedback-card textarea {
  width: 100%; flex: 1 1 auto; min-height: 76px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--txt);
  background: #fbfcfe; resize: vertical;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.feedback-card textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #2563eb22; background: #fff;
}
.btn-out {
  width: 100%; margin-top: 10px; padding: 11px;
  border: 1px solid var(--accent); border-radius: 10px; cursor: pointer;
  background: #fff; color: var(--accent); font-size: 14px; font-weight: 600;
  font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s ease, color .15s ease;
}
.btn-out:hover:not(:disabled) { background: var(--accent); color: #fff; }
.btn-out:disabled { opacity: .6; cursor: default; }
#feedback-result { display: block; margin-top: 10px; font-size: 13px; min-height: 18px; }
#feedback-result.ok { color: #16a34a; }
#feedback-result.bad { color: var(--red); }
@media (max-width: 860px) {
  .feedback-card { position: static; transform: none; margin: 18px auto 0; }
}
/* iOS Safari зумит страницу при фокусе в поле с шрифтом <16px */
@media (max-width: 640px) {
  input, textarea { font-size: 16px; }
  body { padding: 14px; }
}
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }