/* Основа: цвета и шрифты из дизайна, каркас страницы, карточки, кнопки. */
:root {
  --bg: #eef4fa;
  --card: #ffffff;
  --ink: #16324f;
  --ink-2: #26456a;
  --ink-3: #3c5a78;
  --muted: #5b7590;
  --muted-2: #6d8db0;
  --line: #e4ecf5;
  --line-2: #eef3f9;
  --border: #d8e4f0;
  --border-hover: #b9cee3;
  --blue: #2a7fd4;
  --blue-dark: #1f5f9e;
  --blue-soft: #e8f2fc;
  --soft: #f4f8fc;
  --chip: #f0f5fa;
  --track: #dce7f2;
  --warn-bg: #fdf1de;
  --warn: #9a6716;
  --ok-bg: #e2f4f0;
  --ok: #1f7566;
  --ok-icon: #2c9c86;
  --bad-bg: #f4e6e6;
  --bad: #8d4141;
  --shadow: 0 1px 2px rgba(22, 50, 79, 0.04), 0 14px 34px -26px rgba(22, 50, 79, 0.4);
  --shadow-hero: 0 1px 2px rgba(22, 50, 79, 0.04), 0 18px 40px -28px rgba(22, 50, 79, 0.45);
  --font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Geologica, Manrope, system-ui, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(42, 127, 212, 0.35); outline-offset: 2px; border-radius: 12px; }

/* Каркас */
.layout { display: flex; align-items: stretch; min-height: 100vh; }
.sidebar {
  flex: 0 0 256px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.main { flex: 1 1 auto; min-width: 0; padding: 40px 44px 64px; }
.container { max-width: 1020px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.stack { display: flex; flex-direction: column; gap: 26px; }
.topbar, .tabbar { display: none; }

.logo { display: flex; align-items: center; gap: 11px; padding-left: 6px; }
.logo-mark { flex: 0 0 auto; display: block; }
.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-name { font-family: var(--font-display); font-weight: 500; font-size: 21px; letter-spacing: 0.02em; color: var(--ink); line-height: 1.1; }
.logo-sub { font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  position: relative;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-3);
}
.nav-item:hover { background: var(--soft); }
.nav-item.is-active { background: var(--blue-soft); color: var(--ink); }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}
.sidebar-contacts { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; background: var(--soft); border-radius: 20px; }
.sidebar-phone { font-family: var(--font-display); font-size: 16px; color: var(--ink); }

/* Текст */
.h1 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 31px; letter-spacing: -0.01em; color: var(--ink); line-height: 1.2; }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--ink); line-height: 1.3; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.sub { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.muted-sm { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.text { font-size: 14.5px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.text-dark { font-size: 16px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Карточки */
.card { background: var(--card); border-radius: 24px; padding: 26px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.card-hero { border-radius: 28px; padding: 32px 34px; box-shadow: var(--shadow-hero); }
.card-soft { background: var(--blue-soft); box-shadow: none; }
.card-list { padding-bottom: 12px; gap: 6px; }
.grid-2 { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.grid-2 > * { flex: 1 1 320px; min-width: 0; }
.columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--muted); font-weight: 600; padding: 14px 20px; }
.btn-secondary:hover { border-color: var(--border-hover); color: var(--ink); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--blue-dark); font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 14px; }
.btn-outline:hover { background: var(--soft); border-color: var(--border-hover); color: var(--blue-dark); }
.btn-disabled { background: var(--chip); color: #9db0c4; cursor: default; }
.btn-block { width: 100%; }
.btn-self { align-self: flex-start; }
.btn-row { display: flex; flex-direction: column; gap: 9px; }
.link-btn { border: none; background: transparent; padding: 0; color: var(--blue); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--blue-dark); }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; border: none; background: transparent; padding: 4px 0; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.back-link:hover { color: var(--blue-dark); }
.icon-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 11px; padding: 9px; background: #fff; color: var(--blue-dark); cursor: pointer; }
.icon-btn:hover { background: var(--soft); border-color: var(--border-hover); }

/* Метки */
.badge { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-ok .icon { color: var(--ok-icon); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.pill { display: inline-flex; padding: 4px 11px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-grey { background: var(--chip); color: var(--muted); }
.kind { flex: 0 0 46px; text-align: center; padding: 5px 0; border-radius: 9px; background: var(--chip); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }

/* Уведомление внизу экрана */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 16px 34px -18px rgba(22, 50, 79, 0.6);
  max-width: calc(100vw - 32px);
}
.toast .icon { color: #8fd3c4; flex: 0 0 auto; }
.toast.is-in { animation: toast-in 0.25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
