/* ЛК — визуальный макет в фирменном стиле НЕРИС, левое меню */
/* Относительные пути без кавычек: CSS-компрессор Bitrix ломает url("/...") */
@font-face {
  font-family: "OpenSans";
  src: url(../fonts/OpenSans.woff2) format("woff2");
  font-display: swap;
  font-weight: 125 950;
  font-style: normal;
}
@font-face {
  font-family: "Inter";
  src: url(../fonts/Inter.woff2) format("woff2");
  font-display: swap;
  font-weight: 125 950;
  font-style: normal;
}

:root {
  --green-bright: #4ead33;
  --green: #2f6b1c;
  --green-dark: #1f4d12;
  --green-mid: #3a8326;
  --green-soft: #eef6eb;
  --green-line: #6e8a66;
  --ink: #12250c;
  --ink-muted: #4a5c46;
  --ink-faint: #5c6e58;
  --bg: #ffffff;
  --bg-soft: #f7f9f6;
  --border: #e3ebe0;
  --header: #12250c;
  --radius: 12px;
  --sidebar-w: 260px;
  --max: 1080px;
  --max-wide: 1280px;
  --font: "OpenSans", "Open Sans", system-ui, -apple-system, sans-serif;
  --font-cabinet: "Inter", system-ui, sans-serif;
  --shadow-soft: 0 8px 28px rgba(18, 37, 12, 0.06);
  --warn: #b54708;
  --danger: #b42318;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body,
body.neris-lk {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-family: var(--font-cabinet);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 16px;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr auto;
  -webkit-tap-highlight-color: rgba(47, 107, 28, .12);
}
/* Заголовки / цифры KPI — Open Sans; основной текст UI — Inter (как в макете) */
body.neris-lk .sec,
body.neris-lk .card-title,
body.neris-lk .kpi .val,
body.neris-lk .next-pay-full,
body.neris-lk .about-title {
  font-family: "OpenSans", "Open Sans", system-ui, -apple-system, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; max-width: 100%; }
.wrap-wide { width: min(var(--max-wide), calc(100% - 40px)); }

.kicker {
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--green); font-weight: 700; margin-bottom: 8px;
}
.sec {
  font-family: var(--font);
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700; letter-spacing: -.02em; color: var(--ink); line-height: 1.2;
}
.lead { font-size: 15px; color: var(--ink-muted); max-width: 46em; }
.help-lead {
  max-width: none;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .help-lead { white-space: normal; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(47,107,28,.18); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green-dark); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--green); }
.btn-on-dark { background: var(--green-bright); color: #fff; }
.btn-on-dark-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn.full { width: 100%; }
.btn-details {
  background: #f59e0b; color: #fff; border-color: #f59e0b;
  padding: 8px 14px; border-radius: 8px; font-size: 13px;
}
.btn-details:hover { background: #d97706; border-color: #d97706; }

/* —— Левое меню: тёмное —— */
.sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky; top: 0; align-self: start;
  height: 100vh; height: 100dvh;
  width: var(--sidebar-w);
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(78,173,51,.22), transparent 55%),
    linear-gradient(180deg, #152a12 0%, #0e1c0a 55%, #12250c 100%);
  color: #fff;
  border-right: 1px solid rgba(78,173,51,.22);
  display: flex; flex-direction: column;
  padding: 0;
  z-index: 40;
  transition: width .2s ease;
}
.sidebar-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: 64px;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1;
}
.sidebar-brand img { height: 32px; width: auto; flex-shrink: 0; }
.sidebar-brand-text { min-width: 0; }
.sidebar-brand-text strong {
  display: block; font-size: 13px; font-weight: 800; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-brand-text span {
  display: block; font-size: 11px; color: rgba(255,255,255,.55); font-weight: 600;
  white-space: nowrap;
}
.sidebar-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.sidebar-toggle:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(78,173,51,.45);
  color: #fff;
}
.sidebar-toggle svg {
  width: 18px; height: 18px;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Desktop: меню скрыто */
@media (min-width: 901px) {
  body.sidebar-hidden {
    grid-template-columns: 1fr;
  }
  body.sidebar-hidden .sidebar {
    display: none;
  }
  body.sidebar-hidden .shell {
    grid-column: 1;
  }
  body.sidebar-hidden .menu-btn {
    display: inline-flex;
  }
}

.side-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 10px 8px;
  -webkit-overflow-scrolling: touch;
}
.nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  padding: 8px 10px 6px;
}
.side-nav { display: grid; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,.72);
  position: relative;
  transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
  animation: sideIn .45s ease both;
}
.side-nav .side-link:nth-child(1) { animation-delay: .05s; }
.side-nav .side-link:nth-child(2) { animation-delay: .12s; }
.side-nav .side-link:nth-child(3) { animation-delay: .19s; }
.side-nav .side-link:nth-child(4) { animation-delay: .26s; }
.side-nav .side-link:nth-child(5) { animation-delay: .33s; }
.side-nav .side-link:nth-child(6) { animation-delay: .4s; }
.side-link:hover {
  background: rgba(255,255,255,.08); color: #fff;
  transform: translateX(4px);
}
.side-link.is-active {
  background: rgba(78,173,51,.22);
  color: #fff;
}
.side-link.is-active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--green-bright);
  animation: barIn .35s ease both;
}
.side-ico {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.7);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.side-link:hover .side-ico {
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: none;
  transform: scale(1.08);
}
.side-link.is-active .side-ico {
  background: rgba(78,173,51,.35);
  color: #fff;
  box-shadow: none;
}
.side-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-link .label { min-width: 0; flex: 1; line-height: 1.25; }
.side-link .dot {
  margin-left: auto;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--green-bright); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center;
  animation: pulseDot 2.2s ease-in-out infinite;
}

.sidebar-foot {
  margin-top: auto;
  padding: 10px 8px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: grid; gap: 8px;
  background: transparent;
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
a.user-card:hover {
  background: rgba(255,255,255,.12);
}
a.user-card:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 2px;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--green-bright); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.user-meta { min-width: 0; }
.user-meta b {
  display: block; font-size: 12px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-meta span {
  display: block; font-size: 11px; color: rgba(255,255,255,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-logout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: transparent; color: rgba(255,255,255,.7); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.btn-logout:hover {
  color: #fff; border-color: rgba(240,199,188,.45);
  background: rgba(180,35,24,.22);
  transform: translateX(3px);
}
.btn-logout .side-ico { background: transparent; box-shadow: none; color: inherit; }

/* —— Основная колонка —— */
.shell {
  grid-column: 2;
  min-width: 0;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; width: min(var(--max), calc(100% - 40px)); margin: 0 auto;
}
.org-chip,
.hello {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  animation: helloIn .45s ease both;
}
.hello b {
  color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hello span { font-size: 13px; color: var(--ink-muted); font-weight: 500; }
.org-chip { font-size: 12px; color: var(--ink-muted); }
.org-chip b { color: var(--ink); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--green-dark);
  flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-icon:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(47,107,28,.12);
}
.btn-icon.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--green-dark);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(18,37,12,.45);
}

.page { flex: 1; padding: 28px 0 48px; }
.page-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-bottom: 22px; align-items: flex-end;
}

.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
  box-shadow: 0 14px 36px rgba(18,37,12,.1);
  border-color: #c5d8bf;
}
.card-pad { padding: 20px; }
.card-title { font-family: var(--font); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.card-title--accent {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--green-dark);
  padding: 2px 0 10px 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--green-bright);
  line-height: 1.25;
}
.card--docs .card-title--accent {
  color: #124a9a;
  border-left-color: #1d6fd0;
}
.form-spotlight .card-title--accent {
  color: var(--green-dark);
  border-left-color: var(--green-bright);
}
.card-note { font-size: 14px; color: var(--ink-muted); margin-bottom: 16px; }
.card--hist {
  background:
    linear-gradient(180deg, #f3f8f1 0%, #fafcf9 40%, #ffffff 100%);
  border-color: #c5d8bf;
}
.card--docs {
  background:
    linear-gradient(180deg, #eef3fb 0%, #f7f9fd 42%, #ffffff 100%);
  border-color: #c9daf0;
}
.card--hist .table-wrap,
.card--hist .pager {
  background: rgba(255,255,255,.72);
}
.card--docs .doc {
  background: rgba(255,255,255,.88);
}
.card--docs .pager {
  background: rgba(255,255,255,.72);
}

.next-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f7fcf5 0%, #fff 56%);
  border: 1px solid #cfe0c8;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.next-pay .lbl {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 700;
  margin: 0;
}
.next-pay-when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
  margin: 0;
}
.next-pay-full {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}
.next-pay-in {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 1px solid #cfe0c8;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.pay-qr {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
  margin: 0 0 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.cession-sheet {
  display: flex;
  align-items: center;
  gap: 12px 16px;
  background: linear-gradient(180deg, #fffdf8, #fff);
  border: 1px solid #e2d6c4;
  border-radius: 8px;
  padding: 10px 12px 10px 14px;
  box-shadow: 0 4px 12px rgba(18,37,12,.05);
  min-width: 0;
}
.cession-sheet-main {
  flex: 1;
  min-width: 0;
}
.cession-sheet h2 {
  margin: 0 0 2px;
  font-size: 15px;
  color: var(--ink);
}
.cession-meta {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-muted);
}
.cession-dl {
  margin: 0 0 8px;
  display: grid;
  gap: 2px;
}
.cession-dl div { display: grid; grid-template-columns: 7.2em 1fr; gap: 6px; font-size: 12.5px; line-height: 1.35; }
.cession-dl dt { color: var(--ink-muted); font-weight: 600; }
.cession-dl dd { margin: 0; }
.cession-pdf-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: none;
}
.cession-sheet.is-pending .cession-pdf-icon {
  opacity: .55;
}
.cession-req {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cession-req:hover { color: var(--green); }
.pay-qr-head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 36em;
}
.pay-qr-figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.pay-qr-hit {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 8px;
  line-height: 0;
  position: relative;
}
.pay-qr-hit:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.pay-qr-hit.is-stub,
.pay-qr.is-qr-pending .pay-qr-hit {
  cursor: default;
}
.pay-qr-figure img {
  width: 168px;
  height: 168px;
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  image-rendering: pixelated;
  pointer-events: none;
}
.pay-qr-figure img[hidden] { display: none; }
.pay-qr-stub {
  width: 168px;
  height: 168px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #f7faf5, #eef4ea);
  border: 1px dashed #b7cbb0;
  border-radius: 8px;
  color: var(--green-dark);
  overflow: hidden;
  box-sizing: border-box;
}
.pay-qr-stub--doc {
  width: 148px;
  height: 148px;
}
.pay-qr-stub-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
}
.cession-doc-qr.is-qr-pending img { display: none; }
.cession-doc-qr.is-qr-pending .pay-qr-stub { display: grid; }
.pay-qr:not(.is-qr-pending) .pay-qr-stub { display: none; }
.pay-qr:not(.is-qr-pending) .pay-qr-hit { cursor: zoom-in; }
.qr-zoom {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  cursor: zoom-out;
}
.qr-zoom[hidden] { display: none !important; }
.qr-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 8, .78);
}
.qr-zoom-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 18px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, .4);
  text-align: center;
  max-width: 96vw;
  cursor: default;
}
.qr-zoom-card img {
  width: min(78vw, 72vh, 420px);
  height: auto;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  background: #fff;
  image-rendering: pixelated;
}
.qr-zoom-card p {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.qr-zoom-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.qr-zoom-close:hover { background: rgba(18, 37, 12, .08); }
.pay-qr-figure figcaption {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--ink-muted);
  text-align: center;
  max-width: 220px;
}
.pay-qr-figure figcaption code {
  font-size: 10.5px;
}
.pay-qr-empty {
  margin: 0;
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.kpi-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.kpi {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; min-width: 0; box-shadow: var(--shadow-soft);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.kpi:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(18,37,12,.1);
  border-color: #c5d8bf;
}
.kpi .lbl { font-size: 12px; color: var(--ink-muted); font-weight: 700; margin-bottom: 8px; }
.kpi .val {
  font-family: var(--font); font-size: clamp(15px, 1.5vw, 20px);
  letter-spacing: -.02em; color: var(--ink); word-break: break-word;
  transition: color .25s ease;
}
.kpi.warn { border-color: #f0c7bc; background: #fff8f6; }
.kpi.warn .val { color: var(--danger); }
.kpi.accent { border-color: #c5d8bf; background: linear-gradient(180deg, #f7fcf5, #fff); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; min-width: 680px; }
table.data th, table.data td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-size: 14px; vertical-align: top;
}
table.data th {
  font-size: 12px; color: var(--ink-muted); font-weight: 700;
  background: var(--bg-soft); white-space: nowrap;
}
table.data tr { transition: background .2s ease; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f4faf1; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-muted); }
.mono { font-size: 12px; color: var(--ink-faint); }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease;
}
.badge:hover { transform: scale(1.05); }
.badge.new { background: #fff1e6; color: var(--warn); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.paid { background: #e8f0ff; color: #1849a9; }
.badge.sold { background: #f2f2f2; color: #5c5c5c; }
.badge.wait { background: #f4eee0; color: #7a5a12; }
.badge.in { background: #e8f0ff; color: #1849a9; }
.badge.out { background: var(--green-soft); color: var(--green-dark); }

.hist-table { min-width: 760px; }
.hist-table td:first-child { white-space: nowrap; width: 1%; }
.hist-table td:nth-child(3) {
  white-space: nowrap;
  width: 1%;
  max-width: 12.5rem;
}
.hist-table td:nth-child(4) { white-space: nowrap; width: 1%; }
.hist-table .file-actions,
.hist-table .file-actions-item {
  max-width: 100%;
  min-width: 0;
}
.hist-table .file-chip {
  max-width: 11.5rem;
}
.hist-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
}
.msg-stack { display: grid; gap: 8px; }
.msg-bubble {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.msg-bubble.is-out {
  background: #eef6eb;
  border-color: #c5d8bf;
}
.msg-bubble.is-in {
  background: #eef3fb;
  border-color: #c9daf0;
}
.msg-bubble.is-reply {
  margin-left: 22px;
  position: relative;
  box-shadow: inset 3px 0 0 var(--green);
}
.msg-bubble.is-reply::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0;
  width: 16px;
  height: 18px;
  border-left: 2px solid #c5d8bf;
  border-bottom: 2px solid #c5d8bf;
  border-bottom-left-radius: 8px;
}
.msg-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.msg-who time {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}
.msg-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.hist-table tr:hover td { background: transparent; }
.hist-table tr:hover .msg-bubble.is-out { background: #e4f0df; }
.hist-table tr:hover .msg-bubble.is-in { background: #e4ecf8; }

.pay-list { display: grid; }
.pay {
  display: grid; grid-template-columns: 110px 120px 1fr; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); align-items: start;
}
.pay:last-child { border-bottom: 0; }
.pay .sum { font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.pay .when { font-size: 13px; color: var(--ink-muted); }
.pay .txt { font-size: 14px; color: var(--ink); }

table.data-wide { min-width: 980px; }
table.data-wide th, table.data-wide td { font-size: 13px; padding: 10px 12px; }
.row-status td {
  border-left: 0;
  transition: background .2s ease;
}
.row-status--ok td { background: #f2f8ef; }
.row-status--ok td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.row-status--paid td { background: #eef3fb; }
.row-status--paid td:first-child { box-shadow: inset 4px 0 0 #1d6fd0; }
.row-status--sold td { background: #f4f4f4; }
.row-status--sold td:first-child { box-shadow: inset 4px 0 0 #8a8a8a; }
.row-status--wait td { background: #fff8ec; }
.row-status--wait td:first-child { box-shadow: inset 4px 0 0 #c47a0a; }
.row-status--new td { background: #fff5ec; }
.row-status--new td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
table.data tr.row-status:hover td { background: inherit; filter: brightness(0.97); }
table.data tr.row-status--ok:hover td { background: #e7f2e2; }
table.data tr.row-status--paid:hover td { background: #e2eaf8; }
table.data tr.row-status--sold:hover td { background: #ebebeb; }

.about-neris {
  min-width: 0; display: flex; flex-direction: column; gap: 16px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #c5d8bf;
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(78,173,51,.16), transparent 55%),
    linear-gradient(165deg, #f4faf1 0%, #ffffff 55%, #eef6eb 100%);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.about-neris::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(78,173,51,.18), transparent 70%);
  pointer-events: none;
}
.about-head { position: relative; z-index: 1; }
.about-head .kicker { margin-bottom: 6px; }
.about-title {
  font-family: var(--font);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700; letter-spacing: -.02em;
  color: var(--ink); margin-bottom: 8px; line-height: 1.2;
}
.about-lead {
  font-size: 14px; color: var(--ink-muted); line-height: 1.5; max-width: 36em;
}
.about-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  position: relative; z-index: 1;
}
.about-grid-stack {
  grid-template-columns: 1fr;
  flex: 1;
  gap: 10px;
}
.about-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(197,216,191,.9);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(18,37,12,.04);
  display: grid; grid-template-columns: 48px 1fr; gap: 12px 14px;
  align-items: start;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.about-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 14px 28px rgba(18,37,12,.1);
  border-color: #a8c8a0;
}
.about-card-accent {
  background: linear-gradient(135deg, #2f6b1c 0%, #3a8326 55%, #4ead33 100%);
  border-color: transparent;
  color: #fff;
}
.about-card-accent:hover {
  border-color: transparent;
  box-shadow: 0 16px 32px rgba(47,107,28,.32);
}
.about-ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--green-soft); border: 1px solid #c5d8bf;
  display: grid; place-items: center;
  transition: transform .3s ease, background .3s ease;
}
.about-card:hover .about-ico { transform: scale(1.08) rotate(-4deg); }
.about-card-accent .about-ico {
  background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.28);
}
.about-ico svg {
  width: 24px; height: 24px; fill: none; stroke: var(--green); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.about-card-accent .about-ico svg { stroke: #fff; }
.about-body h3 {
  font-family: var(--font);
  font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--ink);
}
.about-card-accent .about-body h3 { color: #fff; }
.about-body p,
.about-card p {
  font-size: 13.5px; color: var(--ink-muted); line-height: 1.45; margin: 0;
}
.about-card-accent .about-body p { color: rgba(255,255,255,.88); }

.contact-map {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; margin-top: 16px;
  align-items: stretch;
}
.contact-map .map-fold {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.contact-map .map-card {
  flex: 1;
  min-height: 100%; height: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(18,37,12,.1);
  border-color: #c5d8bf;
}
.contact-map .map-card iframe { min-height: 400px; height: 100%; }
.operator {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; margin-top: 16px;
}
.op-card {
  background: linear-gradient(160deg, #12250c 0%, #214517 100%);
  color: #fff; padding: 24px; border-radius: var(--radius); min-height: 280px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-soft);
}
.op-card .kicker { color: var(--green-bright); }
.op-card h2 { font-family: var(--font); font-size: 22px; margin-bottom: 10px; }
.op-card p { color: rgba(255,255,255,.82); font-size: 14px; margin-bottom: 14px; }
.op-meta { display: grid; gap: 8px; margin-top: auto; }
.op-meta a, .op-meta span { font-size: 14px; color: #fff; }
.op-meta a:hover { color: var(--green-bright); }
.op-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.help-layout {
  display: grid;
  gap: 16px;
  margin-top: 0;
}
.help-layout .faq { width: 100%; }
.help-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.help-quick-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #9bbf90;
  background: #fff;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(47,107,28,.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.help-quick-link:hover {
  transform: translateY(-2px);
  background: var(--green-soft);
  border-color: var(--green);
  box-shadow: 0 6px 16px rgba(47,107,28,.14);
}
.help-quick-link.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47,107,28,.2);
}
.faq-group-title,
#contacts {
  scroll-margin-top: 88px;
}
.faq-groups {
  display: grid;
  gap: 20px;
  width: 100%;
}
.faq-group-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.op-card--bright {
  min-height: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 28px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #2f6b1c 0%, #3a8326 45%, #4ead33 100%);
  box-shadow: 0 12px 32px rgba(47,107,28,.28);
}
.op-card--bright .kicker {
  width: 100%;
  color: rgba(255,255,255,.88);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
}
.op-card--bright h2 {
  width: 100%;
  margin: 0 0 4px;
  font-size: 26px;
  color: #fff;
}
.op-card--bright p {
  flex: 1 1 280px;
  margin: 0;
  color: rgba(255,255,255,.95);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  max-width: 52ch;
}
.op-card--bright .op-meta {
  margin: 0;
  gap: 6px;
  min-width: 200px;
}
.op-card--bright .op-meta a,
.op-card--bright .op-meta span {
  font-size: 15px;
  font-weight: 700;
}
.op-card--bright .op-meta a:hover { color: #e8ffe0; }
.op-card--bright .op-actions {
  margin: 0;
  align-self: center;
}
.op-card--bright .btn-on-dark {
  background: #fff;
  color: #1a4a10;
  border-color: #fff;
  font-weight: 800;
}
.op-card--bright .btn-on-dark:hover {
  background: #e8ffe0;
  border-color: #e8ffe0;
}
@media (max-width: 720px) {
  .op-card--bright {
    flex-direction: column;
    align-items: stretch;
  }
  .op-card--bright .op-actions { align-self: stretch; }
  .op-card--bright .btn-on-dark { width: 100%; justify-content: center; }
}
.map-fold {
  margin: 0;
  min-height: 0;
  align-self: stretch;
}
.map-fold > .map-fold-sum {
  display: none;
  list-style: none;
}
.map-fold > .map-fold-sum::-webkit-details-marker { display: none; }
.map-card {
  border: 1px solid var(--border); background: #fff; border-radius: var(--radius);
  min-height: 280px; position: relative; overflow: hidden; box-shadow: var(--shadow-soft);
}
.map-card iframe { width: 100%; height: 100%; min-height: 280px; border: 0; }
.map-cap {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  background: rgba(18,37,12,.92); color: #fff; padding: 12px 14px;
  border-radius: 10px; font-size: 13px;
  display: grid; gap: 2px;
}
.map-cap strong { font-size: 14px; font-weight: 700; }
.map-cap span { color: rgba(255,255,255,.78); font-size: 12.5px; }

.form .row { display: grid; gap: 12px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--border); background: #fff; padding: 12px 14px;
  border-radius: 10px; color: var(--ink);
}
.field textarea { min-height: 120px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.chip:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 6px 14px rgba(47,107,28,.12); }
.chip.is-on { background: var(--green); color: #fff; border-color: var(--green); }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-muted); }
.form-spotlight {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--green-bright);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(78,173,51,.18), transparent 55%),
    linear-gradient(180deg, #f3faf0 0%, #ffffff 48%);
  box-shadow:
    0 0 0 4px rgba(78,173,51,.12),
    0 14px 36px rgba(47,107,28,.12);
}
.form-spotlight::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--green-bright), var(--green));
}
.form-spotlight .card-title {
  color: var(--green-dark);
  font-size: 20px;
}
.form-spotlight .card-note {
  color: var(--ink);
  font-weight: 600;
}
.form-spotlight .field textarea {
  min-height: 168px;
  border: 2px solid #b7d4ad;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(18,37,12,.04);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-spotlight .field textarea::placeholder {
  white-space: pre-wrap;
  line-height: 1.45;
  color: var(--ink-faint);
}
.form-spotlight .field textarea:focus {
  outline: none;
  border-color: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(78,173,51,.18);
}
.form-spotlight .file-drop {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(238,246,235,.9);
  border: 1px dashed #8fbf7a;
}
.form-spotlight .file-drop.is-drag {
  border-color: var(--green);
  background: #e8f4e3;
}
.form-spotlight .file-drop.is-full .file-btn {
  opacity: .45;
  pointer-events: none;
}
.form-spotlight .file-btn {
  font-size: 14px;
}
.file-drop-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
}
.file-count {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
}
.form-spotlight .btn-primary {
  background: var(--green-bright);
  font-size: 15px;
  padding: 14px 20px;
  box-shadow: 0 8px 20px rgba(78,173,51,.28);
}
.form-spotlight .btn-primary:hover {
  background: var(--green);
  box-shadow: 0 10px 24px rgba(47,107,28,.32);
}
.req-compose-bar { display: none; }
.req-sheet-handle { display: none; }
.req-sheet-close {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(18, 37, 12, .06);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.req-sheet-close:hover { background: rgba(18, 37, 12, .1); }
.req-sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.req-sheet-title-row .card-title { margin: 0; }

.howto {
  margin: 0 0 4px;
  padding: 16px 18px;
  border: 1px solid #c5d8bf;
  border-radius: 14px;
  background: linear-gradient(165deg, #f7faf5 0%, #fff 70%);
  box-shadow: var(--shadow-soft);
}
.howto--track {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(78,173,51,.1), transparent 55%),
    linear-gradient(180deg, #fbfdfb 0%, #fff 100%);
}
.howto-track {
  list-style: none;
  margin: 0;
  padding: 8px 4px 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  position: relative;
}
.howto-track::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, #2f6b1c, #4ead33 50%, #1d6fd0);
  opacity: .35;
  z-index: 0;
  transform-origin: left center;
  transform: scaleX(0);
}
.howto-track::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 12%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(78,173,51,.22), 0 0 16px rgba(78,173,51,.45);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
}
.howto.is-in .howto-track::before,
.howto:not(.reveal) .howto-track::before {
  animation: howtoLineDraw .9s .15s cubic-bezier(.22,.9,.3,1) forwards;
}
.howto.is-in .howto-track::after,
.howto:not(.reveal) .howto-track::after {
  animation: howtoBead 3.6s 1.1s ease-in-out infinite;
}
.howto-track li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 0 14px;
  opacity: 1;
  transform: none;
}
.howto.is-in .howto-track li:nth-child(1),
.howto:not(.reveal) .howto-track li:nth-child(1) {
  animation: howtoStepIn .55s .2s cubic-bezier(.22,.9,.3,1) forwards;
}
.howto.is-in .howto-track li:nth-child(2),
.howto:not(.reveal) .howto-track li:nth-child(2) {
  animation: howtoStepIn .55s .4s cubic-bezier(.22,.9,.3,1) forwards;
}
.howto.is-in .howto-track li:nth-child(3),
.howto:not(.reveal) .howto-track li:nth-child(3) {
  animation: howtoStepIn .55s .6s cubic-bezier(.22,.9,.3,1) forwards;
}
.howto-track .howto-ico {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--green);
  border: 2px solid #9bbf90;
  box-shadow: 0 6px 16px rgba(47,107,28,.12);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  position: relative;
}
.howto-track .howto-ico::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 2px solid transparent;
  opacity: 0;
  pointer-events: none;
}
.howto.is-in .howto-track li:nth-child(1) .howto-ico,
.howto:not(.reveal) .howto-track li:nth-child(1) .howto-ico {
  animation: howtoPulseGreen 3.6s 1s ease-in-out infinite;
}
.howto.is-in .howto-track li:nth-child(2) .howto-ico,
.howto:not(.reveal) .howto-track li:nth-child(2) .howto-ico {
  animation: howtoPulseBlue 3.6s 2.2s ease-in-out infinite;
}
.howto.is-in .howto-track li:nth-child(3) .howto-ico,
.howto:not(.reveal) .howto-track li:nth-child(3) .howto-ico {
  animation: howtoPulseAmber 3.6s 3.4s ease-in-out infinite;
}
.howto-track .howto-ico svg {
  width: 24px;
  height: 24px;
  overflow: visible;
}
.howto-track li:nth-child(2) .howto-ico {
  color: #1d6fd0;
  border-color: #8eb4e4;
}
.howto-track li:nth-child(3) .howto-ico {
  color: #b54708;
  border-color: #e2bf8a;
}
.howto.is-in .howto-track li:nth-child(2) .howto-ico svg path:last-child,
.howto:not(.reveal) .howto-track li:nth-child(2) .howto-ico svg path:last-child {
  transform-origin: 12px 12px;
  animation: howtoTick 2.4s 1.2s ease-in-out infinite;
}
.howto.is-in .howto-track li:nth-child(3) .howto-ico svg circle[fill],
.howto:not(.reveal) .howto-track li:nth-child(3) .howto-ico svg circle[fill] {
  transform-origin: 17.5px 7px;
  animation: howtoBadge 1.8s 1.4s ease-in-out infinite;
}
.howto-track strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.howto-track span {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
  max-width: 18em;
}
.howto-track li:hover .howto-ico {
  transform: translateY(-4px) scale(1.07);
  box-shadow: 0 12px 24px rgba(47,107,28,.18);
}
@keyframes howtoLineDraw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: .4; }
}
@keyframes howtoStepIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes howtoTitlePop {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes howtoBead {
  0% { left: 12%; opacity: 0; transform: scale(.6); }
  8% { opacity: 1; transform: scale(1); }
  46% { left: calc(50% - 5px); background: #4ead33; box-shadow: 0 0 0 4px rgba(78,173,51,.22), 0 0 16px rgba(78,173,51,.45); }
  88% { left: calc(88% - 10px); background: #1d6fd0; box-shadow: 0 0 0 4px rgba(29,111,208,.2), 0 0 16px rgba(29,111,208,.4); opacity: 1; }
  100% { left: calc(88% - 10px); opacity: 0; transform: scale(.6); }
}
@keyframes howtoPulseGreen {
  0%, 28%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(47,107,28,.12); border-color: #9bbf90; }
  14% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(78,173,51,.16), 0 10px 22px rgba(47,107,28,.18); border-color: var(--green-bright); }
}
@keyframes howtoPulseBlue {
  0%, 28%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(29,111,208,.1); border-color: #8eb4e4; }
  14% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(29,111,208,.16), 0 10px 22px rgba(29,111,208,.18); border-color: #1d6fd0; }
}
@keyframes howtoPulseAmber {
  0%, 28%, 100% { transform: scale(1); box-shadow: 0 6px 16px rgba(181,71,8,.1); border-color: #e2bf8a; }
  14% { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(245,158,11,.18), 0 10px 22px rgba(181,71,8,.16); border-color: #f59e0b; }
}
@keyframes howtoTick {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(18deg); }
  55% { transform: rotate(14deg); }
}
@keyframes howtoBadge {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.35); }
  55% { transform: scale(1.1); }
}
.howto-extra {
  margin-top: 14px;
  border-top: 1px dashed #c5d8bf;
  padding-top: 12px;
}
.howto-extra-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.howto-extra-head strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--green-dark);
}
.howto-extra p {
  margin: 10px 0 8px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 52em;
}
.channel-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.channel-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--green-dark);
  box-shadow: 0 2px 6px rgba(18,37,12,.06);
}
.channel-ico svg { width: 16px; height: 16px; }
.channel-icons .channel-ico:nth-child(1) { color: #229ED9; border-color: #b6e0f5; background: #f0f9fd; }
.channel-icons .channel-ico:nth-child(2) { color: #1a1a1a; border-color: #d8d8d8; background: #f6f6f6; }
.channel-icons .channel-ico:nth-child(3) { color: #25D366; border-color: #b8efcb; background: #f0fbf4; }
.channel-icons .channel-ico:nth-child(4) { color: #1d6fd0; border-color: #c9daf0; background: #eef4fb; }
.channel-icons .channel-ico:nth-child(5) { color: #0039a6; border-color: #c5d0ef; background: #eef1fb; }
.channel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.channel-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.channel-list .channel-ico {
  width: 26px;
  height: 26px;
}
.channel-list li:nth-child(1) .channel-ico { color: #229ED9; background: #f0f9fd; border-color: #b6e0f5; }
.channel-list li:nth-child(2) .channel-ico { color: #1a1a1a; background: #f6f6f6; border-color: #d8d8d8; }
.channel-list li:nth-child(3) .channel-ico { color: #25D366; background: #f0fbf4; border-color: #b8efcb; }
.channel-list li:nth-child(4) .channel-ico { color: #1d6fd0; background: #eef4fb; border-color: #c9daf0; }
.channel-list li:nth-child(5) .channel-ico { color: #0039a6; background: #eef1fb; border-color: #c5d0ef; }
@media (max-width: 900px) {
  .howto-track {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .howto-track::before {
    top: 24px;
    bottom: 24px;
    left: 27px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, #2f6b1c, #4ead33 50%, #1d6fd0);
    transform-origin: top center;
    transform: scaleY(0);
  }
  .howto.is-in .howto-track::before,
  .howto:not(.reveal) .howto-track::before {
    animation: howtoLineDrawY .9s .15s cubic-bezier(.22,.9,.3,1) forwards;
  }
  .howto-track::after {
    top: 24px;
    left: 23px;
  }
  .howto.is-in .howto-track::after,
  .howto:not(.reveal) .howto-track::after {
    animation: howtoBeadY 3.6s 1.1s ease-in-out infinite;
  }
  .howto-track li {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    justify-items: start;
    text-align: left;
    padding: 0 0 0 4px;
  }
  .howto-track .howto-ico { grid-row: 1 / span 2; }
  .howto-track span { max-width: none; }
}
@keyframes howtoLineDrawY {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: .4; }
}
@keyframes howtoBeadY {
  0% { top: 24px; opacity: 0; transform: scale(.6); }
  8% { opacity: 1; transform: scale(1); }
  46% { top: 50%; background: #4ead33; }
  88% { top: calc(100% - 34px); background: #1d6fd0; opacity: 1; }
  100% { top: calc(100% - 34px); opacity: 0; transform: scale(.6); }
}

.intro-panel {
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(78,173,51,.14), transparent 55%),
    linear-gradient(165deg, #f4faf1 0%, #fff 60%);
  border: 1px solid #c5d8bf;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 4px;
  animation: fadeUp .5s ease both;
}
.intro-panel__lead {
  margin: 0 0 16px;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
  max-width: none;
  width: 100%;
  animation: fadeUp .45s .08s ease both;
}
.intro-accents {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.intro-accents li {
  display: grid;
  gap: 4px;
  padding: 12px 14px 12px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid transparent;
  border-left-width: 4px;
  box-shadow: 0 4px 14px rgba(18,37,12,.04);
  opacity: 0;
  transform: translateY(22px) scale(.94);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
  will-change: transform, opacity;
  position: relative;
  overflow: hidden;
}
.intro-panel.is-in .intro-accents li,
.intro-panel:not(.reveal) .intro-accents li {
  animation: accentIn .7s cubic-bezier(.22,1.15,.36,1) forwards;
}
.intro-accents li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  transform: translateX(-120%);
  pointer-events: none;
}
.intro-panel.is-in .intro-accents li::after,
.intro-panel:not(.reveal) .intro-accents li::after {
  animation: accentShine 2.8s .9s ease-in-out infinite;
}
.intro-accents li:nth-child(1) {
  background: linear-gradient(135deg, #2f6b1c 0%, #3a8326 55%, #4ead33 100%);
  border-color: transparent;
  border-left-color: #1a3f10;
  box-shadow: 0 10px 28px rgba(47,107,28,.28);
  color: #fff;
  animation-delay: .08s;
}
.intro-accents li:nth-child(1) strong {
  color: #fff;
  font-size: 14px;
}
.intro-accents li:nth-child(1) span {
  color: rgba(255,255,255,.92);
  font-weight: 600;
}
.intro-accents li:nth-child(1):hover {
  box-shadow: 0 14px 32px rgba(47,107,28,.36);
}
.intro-accents li:nth-child(2) {
  background: #eef4fb;
  border-color: #c9daf0;
  border-left-color: #1d6fd0;
  animation-delay: .2s;
}
.intro-accents li:nth-child(2) strong { color: #124a9a; }
.intro-accents li:nth-child(2)::after { animation-delay: 1.2s; }
.intro-accents li:nth-child(3) {
  background: #fff7e8;
  border-color: #f0d9a8;
  border-left-color: #c47a0a;
  animation-delay: .32s;
}
.intro-accents li:nth-child(3) strong { color: #8a5200; }
.intro-accents li:nth-child(3)::after { animation-delay: 1.5s; }
.intro-accents li:nth-child(4) {
  background: linear-gradient(135deg, #124a9a 0%, #1d6fd0 55%, #3b8ef0 100%);
  border-color: transparent;
  border-left-color: #0a2f66;
  box-shadow: 0 10px 28px rgba(29,111,208,.28);
  color: #fff;
  animation-delay: .44s;
}
.intro-accents li:nth-child(4) strong {
  color: #fff;
  font-size: 14px;
}
.intro-accents li:nth-child(4) span {
  color: rgba(255,255,255,.92);
  font-weight: 600;
}
.intro-accents li:nth-child(4):hover {
  box-shadow: 0 14px 32px rgba(29,111,208,.36);
}
.intro-accents li:nth-child(4)::after { animation-delay: 1.8s; }
.intro-accents li:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 14px 28px rgba(18,37,12,.12);
}
.intro-accents strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition: transform .3s ease;
}
.intro-accents span {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-muted);
  opacity: 0;
  transform: translateY(6px);
}
.intro-panel.is-in .intro-accents strong,
.intro-panel:not(.reveal) .intro-accents strong {
  animation: accentTitleIn .45s ease forwards;
}
.intro-panel.is-in .intro-accents span,
.intro-panel:not(.reveal) .intro-accents span {
  animation: accentTextIn .5s ease forwards;
}
.intro-panel.is-in .intro-accents li:nth-child(1) strong,
.intro-panel:not(.reveal) .intro-accents li:nth-child(1) strong { animation-delay: .28s; }
.intro-panel.is-in .intro-accents li:nth-child(1) span,
.intro-panel:not(.reveal) .intro-accents li:nth-child(1) span { animation-delay: .38s; }
.intro-panel.is-in .intro-accents li:nth-child(2) strong,
.intro-panel:not(.reveal) .intro-accents li:nth-child(2) strong { animation-delay: .4s; }
.intro-panel.is-in .intro-accents li:nth-child(2) span,
.intro-panel:not(.reveal) .intro-accents li:nth-child(2) span { animation-delay: .5s; }
.intro-panel.is-in .intro-accents li:nth-child(3) strong,
.intro-panel:not(.reveal) .intro-accents li:nth-child(3) strong { animation-delay: .52s; }
.intro-panel.is-in .intro-accents li:nth-child(3) span,
.intro-panel:not(.reveal) .intro-accents li:nth-child(3) span { animation-delay: .62s; }
.intro-panel.is-in .intro-accents li:nth-child(4) strong,
.intro-panel:not(.reveal) .intro-accents li:nth-child(4) strong { animation-delay: .64s; }
.intro-panel.is-in .intro-accents li:nth-child(4) span,
.intro-panel:not(.reveal) .intro-accents li:nth-child(4) span { animation-delay: .74s; }
.intro-accents li:hover strong { transform: translateX(3px); }
@media (max-width: 720px) {
  .intro-accents { grid-template-columns: 1fr; }
}
.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
  padding: 10px 16px 10px 12px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(47, 107, 28, .1);
  min-height: 44px;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.file-btn-ico {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}
.file-btn:hover {
  background: var(--green-soft);
  border-color: var(--green-dark);
  box-shadow: 0 6px 14px rgba(47, 107, 28, .14);
}
.file-btn:focus-within {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
  overflow: visible;
}
.filters-end { justify-content: flex-end; }
.docs-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 16px;
  border: 2px solid #9bbf90;
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(47,107,28,.08);
  white-space: nowrap;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.docs-download-all:hover {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(47,107,28,.16);
}
.card--hist,
.card--docs,
.card--hist .card-pad,
.card--docs .card-pad { overflow: visible; }
.filters select {
  border: 2px solid #9bbf90;
  background: #fff;
  padding: 10px 36px 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(47,107,28,.08);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232f6b1c' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.filters select:hover,
.filters select:focus {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(47,107,28,.16);
  outline: none;
}
.filter-date input {
  border: 2px solid #9bbf90;
  background: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  min-width: 14em;
  box-shadow: 0 2px 8px rgba(47,107,28,.08);
  cursor: pointer;
}
.filter-date input:hover,
.filter-date input:focus {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(47,107,28,.16);
  outline: none;
}
.filter-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 10px;
  border: 2px solid #9bbf90;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(47,107,28,.08);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
  font: inherit;
  color: inherit;
}
.filter-period:hover,
.filter-period:focus-within,
.period-trigger[aria-expanded="true"] {
  border-color: var(--green);
  box-shadow: 0 4px 14px rgba(47,107,28,.16);
}
.filter-period-ico {
  display: inline-flex;
  color: var(--green);
  flex-shrink: 0;
}
.filter-period-sep {
  color: var(--ink-muted);
  font-weight: 800;
  font-size: 13px;
  user-select: none;
}
.filter-period input {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  width: 6.6em;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  outline: none;
}
.filter-period label { display: inline-flex; margin: 0; }
.period-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.period-picker {
  position: relative;
  display: inline-flex;
  overflow: visible;
}
.period-pop {
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
  left: auto;
  z-index: 90;
  width: min(320px, calc(100vw - 32px));
  min-width: min(260px, calc(100vw - 32px));
  max-width: calc(100vw - 28px);
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #c5d8bf;
  background: #fff;
  box-shadow: 0 16px 40px rgba(18,37,12,.16);
  display: grid;
  gap: 12px;
  box-sizing: border-box;
}
.period-pop.is-above {
  top: auto;
  bottom: calc(100% + 8px);
  box-shadow: 0 -12px 40px rgba(18,37,12,.14);
}
.period-pop[hidden] { display: none !important; }
.filters:has(.period-pop:not([hidden])) {
  z-index: 90;
}
.card--hist:has(.period-pop:not([hidden])),
.card--docs:has(.period-pop:not([hidden])) {
  position: relative;
  z-index: 90;
}
.period-pop-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.period-pop-fields {
  display: grid;
  gap: 10px;
}
.period-pop-fields label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.period-pop-fields input[type="date"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.period-pop-fields input[type="date"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(78,173,51,.18);
}
.period-pop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.pager {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  background: #fbfdfa;
  border-radius: 0 0 var(--radius) var(--radius);
}
.pager-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  width: 100%;
  min-width: 0;
}
.pager-meta {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
}
.pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}
.pager-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.pager-btn,
.pager-page {
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--ink); font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.pager-btn:hover:not(:disabled),
.pager-page:hover {
  border-color: var(--green); color: var(--green-dark); transform: translateY(-1px);
}
.pager-page.is-active {
  background: var(--green); border-color: var(--green); color: #fff;
}
.api-strip {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef3f8;
  border: 1px solid #c9daf0;
  font-size: 12px;
  line-height: 1.4;
}
.api-strip-badge {
  flex-shrink: 0;
  display: inline-grid; place-items: center;
  min-width: 40px; height: 22px; padding: 0 8px;
  border-radius: 6px;
  background: #1d6fd0; color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
}
.api-strip code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: #163a66;
  word-break: break-all;
  white-space: pre-wrap;
}
.file-policy {
  display: grid; gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f7f3;
  border: 1px dashed #b7cbb0;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.file-policy strong { color: var(--green-dark); font-size: 12px; }
.file-policy code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  background: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.pager-limit {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-muted);
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.pager-limit select {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  font: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.consent-journal .badge { white-space: nowrap; }
.consent-source { font-size: 12px; color: var(--ink-muted); }
.consent-empty {
  padding: 28px 16px; text-align: center; color: var(--ink-muted); font-size: 14px;
}
.consent-revoke {
  padding: 8px 12px;
  font-size: 12.5px;
  min-height: 36px;
  color: #8a3b2a;
  border-color: #e2b4a8;
  background: #fff8f6;
}
.consent-revoke:hover {
  border-color: #c56a52;
  background: #ffeee9;
  color: #6e2c1e;
}
.consent-row--revoked td { opacity: .78; }
.consent-journal table.data { min-width: 920px; }
.consent-journal .table-wrap { overflow-x: auto; }
.pager-btn:disabled {
  opacity: .45; cursor: not-allowed; transform: none;
}
.pager-in-card {
  margin-top: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.file-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: min(100%, 11.5rem);
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--green);
  background: #fff; cursor: pointer; font-family: inherit;
  min-width: 0;
}
.file-chip:hover { border-color: var(--green); background: var(--green-soft); }
.file-chip-name {
  display: inline-block;
  max-width: 9.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.file-picked {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.file-picked li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  min-width: 0;
}
.file-picked-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}
.file-picked-type {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
}
.file-picked-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-picked-rm {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.file-picked-rm:hover { color: var(--danger); }
.file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 12.5rem;
  min-width: 0;
}
.file-actions-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}
.file-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px dashed #9bbf90;
  background: #f3f8f1;
  color: var(--green-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.file-more:hover {
  border-style: solid;
  border-color: var(--green);
  background: var(--green-soft);
}
.file-dl {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  color: var(--green-dark); font-weight: 800; cursor: pointer;
  text-decoration: none; box-sizing: border-box;
}
.file-dl:hover { border-color: var(--green); background: var(--green-soft); }
.file-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f0;
  border: 1px solid #f0c7bc;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}
.read-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff1e6;
  color: var(--warn);
}
.read-pill.is-done {
  background: #eef2f0;
  color: var(--ink-muted);
}
.msg-bubble.is-unread {
  box-shadow: 0 0 0 2px rgba(181,71,8,.18);
}
.msg-bubble.is-unread {
  cursor: pointer;
}
.msg-bubble.is-unread:hover {
  filter: brightness(0.98);
}
.empty-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 36px 24px 40px;
}
.empty-state[hidden] { display: none !important; }
.empty-state-ico { font-size: 32px; line-height: 1; }
.empty-state h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.empty-state p {
  margin: 0 0 8px;
  max-width: 36em;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.45;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 999px;
}
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}
.pdf-modal[hidden] { display: none !important; }
.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18,37,12,.55);
}
.pdf-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(18,37,12,.28);
  border: 1px solid #c5d8bf;
}
.pdf-modal-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pdf-modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.pdf-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pdf-preview {
  padding: 20px;
  background: #eef2ef;
}
.pdf-preview:has(#pdfPreviewFrame:not([hidden])),
.pdf-preview:has(#pdfPreviewImage:not([hidden])) {
  padding: 0;
  background: #dfe6dd;
}
.pdf-modal-dialog.is-frame {
  width: min(960px, 100%);
}
.pdf-modal-frame {
  display: block;
  width: 100%;
  min-height: min(70vh, 720px);
  height: 70vh;
  border: 0;
  background: #fff;
}
.pdf-modal-frame[hidden],
.pdf-modal-image[hidden] { display: none !important; }
.pdf-modal-image {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 720px);
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}
.pdf-preview-sheet {
  min-height: 360px;
  background: #fff;
  border: 1px solid #d7e0d5;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(18,37,12,.08);
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 40px 24px;
}
.pdf-preview-sheet[hidden],
.cession-doc[hidden] { display: none !important; }
#pdfPreviewOpenTab[hidden] { display: none !important; }
.pdf-preview-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f6b1c, #4ead33);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.pdf-preview-name { margin: 0; font-weight: 800; color: var(--ink); }
.pdf-preview-note { margin: 0; color: var(--ink-muted); font-size: 13px; }
.pdf-modal-dialog.is-cession { width: min(760px, 100%); }
.cession-doc {
  background: #fff;
  border: 1px solid #d7cfc3;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(18,37,12,.08);
  padding: 22px 26px 20px;
  color: var(--ink);
}
.cession-doc-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--green);
}
.cession-doc-head img,
.cession-doc-logo {
  width: 200px;
  height: auto;
  flex: 0 0 auto;
  display: block;
}
.cession-doc-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
}
.cession-doc-org {
  font-size: 14px !important;
  font-weight: 800;
  color: var(--ink) !important;
  margin-bottom: 4px !important;
}
.cession-doc-title {
  margin: 0;
  text-align: center;
  font-size: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cession-doc-num {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
}
.cession-doc-sub {
  margin: 4px 0 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.cession-doc-body p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.55;
}
.cession-doc-body dl {
  margin: 12px 0 0;
  display: grid;
  gap: 6px;
}
.cession-doc-body dl div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 8px;
  font-size: 13px;
}
.cession-doc-body dt { color: var(--ink-muted); font-weight: 600; }
.cession-doc-body dd { margin: 0; }
.cession-doc-qr {
  margin: 18px 0 0;
  padding: 14px 12px 12px;
  border: 1px dashed #c5d8bf;
  border-radius: 10px;
  background: #f7faf5;
  display: grid;
  justify-items: center;
  gap: 8px;
}
.cession-doc-qr img {
  width: 148px;
  height: 148px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  image-rendering: pixelated;
  cursor: zoom-in;
}
.cession-doc-qr img[hidden] { display: none; }
.cession-doc-qr.is-qr-pending { cursor: default; }
.cession-doc-qr figcaption {
  font-size: 12.5px;
  color: var(--ink-muted);
  text-align: center;
}
.cession-doc-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}
@media (max-width: 600px) {
  .cession-doc-head { flex-direction: column; gap: 8px; }
  .cession-doc-body dl div { grid-template-columns: 1fr; gap: 2px; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; justify-content: space-between; }
.docs { display: grid; gap: 8px; }
.doc {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.doc:hover {
  transform: translateY(-2px);
  border-color: #c5d8bf;
  box-shadow: 0 10px 22px rgba(18,37,12,.08);
}
.app-swipe-actions { display: none; }
.app-swipe-front {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-areas: "info actions badge";
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
}
.doc-info { grid-area: info; min-width: 0; }
.doc-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.app-swipe-front > .badge { grid-area: badge; }
.file-chip-label { display: none; }
.file-dl-label { display: none; }

.faq { display: grid; gap: 8px; }
.faq details {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.faq details:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18,37,12,.08); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: -3px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
.faq details[open] { border-color: #c5d8bf; }
.faq details[open] summary {
  background: var(--green-soft);
  border-radius: var(--radius) var(--radius) 0 0;
}
.faq details[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}
.faq .a { padding: 0 16px 16px; color: var(--ink-muted); font-size: 14px; }

.toast {
  position: fixed; right: 16px; bottom: 24px; z-index: 80;
  background: var(--header); color: #fff; padding: 12px 16px;
  border-radius: var(--radius); font-size: 13px; display: none;
  box-shadow: var(--shadow-soft);
  max-width: min(360px, calc(100vw - 32px));
}
.toast.show {
  display: block;
  animation: toastIn .35s ease both;
}
.toast.is-error {
  background: #7a1f18;
  border: 1px solid rgba(255,180,170,.35);
}
.toast.is-warn {
  background: #7a4a10;
}

/* —— Уведомления —— */
.notif { position: relative; }
.notif .btn-icon { position: relative; }
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 99px;
  background: var(--green-bright);
  color: #fff;
  font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
  animation: pulseDot 2.2s ease-in-out infinite;
}
.notif-dot[hidden] { display: none; }
.notif-panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: min(360px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(18,37,12,.16);
  z-index: 60;
  overflow: hidden;
  animation: helloIn .25s ease both;
}
.notif-panel[hidden] { display: none; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--green-soft);
}
.notif-head strong { font-size: 14px; color: var(--ink); }
.notif-head button {
  border: 0; background: transparent; color: var(--green);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; }
.notif-item {
  display: grid; gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left; width: 100%;
  background: #fff; border-left: 0; border-right: 0; border-top: 0;
  cursor: pointer; font: inherit; color: inherit;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f7faf5; }
.notif-item.is-unread { background: #f3faf0; }
.notif-item .n-title { font-size: 13px; font-weight: 800; color: var(--ink); }
.notif-item .n-text { font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }
.notif-item .n-meta { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.notif-empty {
  padding: 28px 16px; text-align: center; color: var(--ink-muted); font-size: 13px;
}

/* —— Канал ответа + согласия —— */
.channel-pick {
  border: 1px solid #c5d8bf;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.72);
}
.channel-pick legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-dark);
}
.channel-pick-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.channel-pick-toggle input { margin-top: 3px; accent-color: var(--green); }
.channel-fields { margin-top: 12px; display: grid; gap: 10px; }
.channel-fields[hidden] { display: none; }
.channel-options {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.channel-option {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.channel-option:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
}
.channel-option input { accent-color: var(--green); }
.consent-block {
  display: grid; gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f7f3;
  border: 1px dashed #b7cbb0;
}
.consent-block label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-muted);
  cursor: pointer;
}
.consent-block label[hidden] {
  display: none;
}
.consent-block label input { margin-top: 3px; flex-shrink: 0; accent-color: var(--green); }
.consent-block a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.field-error {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--danger);
}
.field-error[hidden] { display: none; }

/* —— Ошибки / демо-бар —— */
.demo-bar {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(18,37,12,.92);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 10px 28px rgba(18,37,12,.25);
  max-width: min(520px, calc(100vw - 32px));
}
.demo-bar > span { font-weight: 700; color: var(--green-bright); margin-right: 2px; }
.demo-bar button {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.demo-bar button:hover { background: rgba(78,173,51,.35); border-color: rgba(78,173,51,.55); }
.error-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(18,37,12,.48);
  display: grid; place-items: center;
  padding: 20px;
}
.error-overlay[hidden] { display: none; }
.error-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 48px rgba(18,37,12,.22);
  text-align: center;
  animation: accentIn .4s ease both;
}
.error-card .error-ico {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: #fdeceb;
  color: var(--danger);
}
.error-card .error-ico.is-warn { background: #fff4e5; color: var(--warn); }
.error-card .error-ico svg {
  width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.error-card h2 { margin: 0 0 8px; font-size: 20px; color: var(--ink); }
.error-card p { margin: 0 0 16px; font-size: 14px; color: var(--ink-muted); line-height: 1.45; }
.error-card .error-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.error-card .error-ico.is-exit { background: #f3f6f2; color: var(--green-dark); }
.error-overlay.is-session { z-index: 96; }

/* —— Онбординг —— */
.onboard {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(18,37,12,.55);
  display: grid; place-items: center;
  padding: 20px;
}
.onboard[hidden] { display: none; }
.onboard-card {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(18,37,12,.28);
  animation: accentIn .45s ease both;
}
.onboard-visual {
  padding: 28px 24px 18px;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(78,173,51,.2), transparent 55%),
    linear-gradient(180deg, #eef6eb 0%, #fff 100%);
  text-align: center;
}
.onboard-visual .ov-ico {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: #fff;
  color: var(--green);
  border: 2px solid #9bbf90;
  box-shadow: 0 10px 24px rgba(47,107,28,.14);
}
.onboard-visual .ov-ico svg {
  width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.onboard-body { padding: 8px 22px 20px; }
.onboard-body .kicker { margin-bottom: 6px; }
.onboard-body h2 { margin: 0 0 8px; font-size: 22px; color: var(--ink); }
.onboard-body p { margin: 0; font-size: 14.5px; color: var(--ink-muted); line-height: 1.5; }
.onboard-dots {
  display: flex; justify-content: center; gap: 6px; margin: 16px 0 4px;
}
.onboard-dots span {
  width: 8px; height: 8px; border-radius: 99px; background: #c5d8bf;
  transition: width .25s ease, background .25s ease;
}
.onboard-dots span.is-on { width: 22px; background: var(--green); }
.onboard-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  padding: 0 22px 20px;
}
.onboard-actions .btn { min-width: 110px; }

@media (max-width: 720px) {
  .demo-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .notif-panel { right: -40px; }
}

/* —— Футер как на основном сайте —— */
.site-footer {
  position: relative;
  overflow: hidden;
  color: rgba(255,255,255,0.78);
  font-size: 13.5px;
  padding: 28px 0 20px;
  background:
    radial-gradient(ellipse 70% 80% at 12% -20%, rgba(78,173,51,0.28), transparent 55%),
    radial-gradient(ellipse 55% 60% at 95% 110%, rgba(58,131,38,0.22), transparent 50%),
    linear-gradient(165deg, #152a12 0%, #0e1c0a 48%, #12250c 100%);
  border-top: 1px solid rgba(78,173,51,0.22);
}
.site-footer .container {
  width: min(100% - 40px, var(--max-wide));
  margin-inline: auto;
}
.footer-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(78,173,51,0.06) 50%, transparent),
    repeating-linear-gradient(
      -12deg, transparent, transparent 48px,
      rgba(255,255,255,0.012) 48px, rgba(255,255,255,0.012) 49px
    );
  opacity: 0.9;
}
.footer-top {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; column-gap: 32px; row-gap: 16px;
  padding-bottom: 20px;
}
.footer-logo { display: block; flex-shrink: 0; line-height: 0; }
.footer-logo img { height: 64px; width: auto; }
.footer-contacts {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px; min-width: 0; width: 100%;
}
.footer-contacts a {
  color: rgba(255,255,255,0.92); font-weight: 500; font-size: 14.5px;
  white-space: nowrap; text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.42);
}
.footer-contacts a:hover {
  color: var(--green-bright); text-decoration-color: var(--green-bright);
}
.footer-contacts span {
  color: rgba(255,255,255,0.55); font-size: 13.5px; white-space: nowrap;
}
.footer-login {
  flex-shrink: 0; padding: 11px 20px; justify-self: end;
  border-radius: 999px;
}
.footer-nav {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 6px 4px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-nav a {
  color: rgba(255,255,255,0.82); font-size: 13px; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
  transition: color .2s, background .2s, text-decoration-color .2s;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.35);
}
.footer-nav a:hover {
  color: #fff; background: rgba(78,173,51,0.18);
  text-decoration-color: rgba(255,255,255,0.75);
}
.footer-nav a[aria-current="page"] {
  color: #fff; background: rgba(78,173,51,0.22);
}
.footer-bottom {
  position: relative; z-index: 1; padding-top: 16px; display: grid; gap: 14px;
}
.footer-req-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  align-items: start;
}
.footer-req-col { min-width: 0; }
.footer-req-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--green-bright);
}
.footer-req-title--bank { margin-top: 0; }
.footer-req-note {
  margin: 12px 0 0; font-size: 11.5px; line-height: 1.45;
  color: rgba(255,255,255,0.42); max-width: none;
}
.footer-req-note a {
  color: rgba(255,255,255,0.82); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.4);
}
.footer-req-note a:hover { color: #fff; text-decoration-color: #fff; }
.footer-req-list {
  margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
}
.footer-req-list > div { display: grid; gap: 1px; min-width: 0; }
.footer-req-list dt {
  margin: 0; font-size: 11px; color: rgba(255,255,255,0.42); font-weight: 500;
}
.footer-req-list dd {
  margin: 0; font-size: 12.5px; color: rgba(255,255,255,0.78); line-height: 1.35;
  overflow-wrap: anywhere; word-break: break-word;
}
.footer-req-wide { grid-column: 1 / -1; }
.footer-disc {
  margin: 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11.5px; color: rgba(255,255,255,0.38); line-height: 1.45; max-width: 70em;
}
.footer-req-more { margin: 12px 0 0; font-size: 13px; }
.footer-req-more a {
  color: rgba(255,255,255,0.88); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-color: rgba(255,255,255,0.42);
}
.footer-req-more a:hover { color: #fff; text-decoration-color: #fff; }
.footer-mock { margin: 0; font-size: 11px; color: var(--green-bright); }

.profile-form { display: grid; gap: 14px; }
.profile-form .field input[readonly] {
  background: #e8eee6;
  color: var(--ink);
  border-color: #d5dfd2;
}
.profile-form .field input[type="password"] {
  background: #fff;
}
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

body.nav-open { overflow: hidden; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .app-swipe-front { grid-template-columns: 1fr auto auto; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 220px; }
  .operator, .contact-map { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr 1fr; }
  .pay .txt { grid-column: 1 / -1; }
  .help-lead { white-space: normal; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  body {
    display: block;
  }
  .menu-btn { display: inline-flex; }
  .sidebar-backdrop { display: block; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  body.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open .topbar { z-index: 55; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(288px, 86vw);
    height: 100vh; height: 100dvh;
    transform: translateX(-105%);
    transition: transform .28s ease;
    z-index: 50;
    box-shadow: 8px 0 32px rgba(18,37,12,.2);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .shell { width: 100%; min-height: 100vh; min-height: 100dvh; }
  .sidebar-toggle { display: none; }
  .topbar-inner {
    width: calc(100% - 24px);
    gap: 10px;
  }
  .hello b { font-size: 14px; }
  .hello span { font-size: 12px; }
  .top-actions .btn { padding: 8px 12px; font-size: 13px; }
  .page { padding: 18px 0 36px; }
  .filters { justify-content: stretch; }
  .filters-end { justify-content: stretch; }
  .card--hist .filters select,
  .card--hist .period-picker,
  .card--hist .filter-period { width: 100%; }
  .card--hist .period-trigger { width: 100%; justify-content: flex-start; }
  .card--docs .filters {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .card--docs .filters select {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
  }
  .card--docs .period-picker {
    flex: 0 0 auto;
    width: auto;
  }
  .card--docs .filter-period,
  .card--docs .period-trigger {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }
  .card--docs .period-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .card--docs .docs-download-all {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .period-pop {
    left: auto;
    right: 0;
    width: min(320px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }
  .period-pop.is-above {
    top: auto;
    bottom: calc(100% + 8px);
  }
  .hist-table { min-width: 0; }
  .msg-bubble.is-reply { margin-left: 10px; }
  .card-title--accent { font-size: 18px; }
  .help-quick { gap: 8px; }
  .help-quick-link { flex: 1 1 calc(50% - 8px); text-align: center; }
  .pdf-modal { padding: 12px; }
  .pdf-modal-head { flex-direction: column; align-items: stretch; }
  .pdf-modal-actions { width: 100%; }
  .pdf-modal-actions .btn { flex: 1; }

  /* История + документы: PDF и Скачать в одну строку, один стиль */
  .file-chip-name { display: none; }
  .file-chip-label { display: inline; }
  .file-dl-ico { display: none; }
  .file-dl-label { display: inline; }
  .hist-table .file-actions,
  .hist-table .file-actions-item,
  .doc-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 8px;
    max-width: 100%;
    width: 100%;
    min-width: 0;
  }
  .hist-table .file-chip,
  .hist-table .file-dl,
  .doc-actions .file-chip,
  .doc-actions .btn,
  .doc-actions .doc-dl {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    max-width: none;
    width: auto;
    min-height: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transform: none;
    white-space: nowrap;
  }
  .hist-table .file-chip,
  .doc-actions .file-chip {
    color: var(--green);
  }
  .hist-table .file-dl,
  .doc-actions .btn,
  .doc-actions .doc-dl {
    color: var(--green-dark);
  }
  .hist-table .file-chip:hover,
  .hist-table .file-dl:hover,
  .doc-actions .file-chip:hover,
  .doc-actions .btn:hover,
  .doc-actions .doc-dl:hover {
    border-color: var(--green);
    background: var(--green-soft);
  }
  .app-swipe-front {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "info badge"
      "actions actions";
    gap: 8px 10px;
    align-items: start;
  }
  .app-swipe-actions {
    display: none !important;
  }
}
@media (max-width: 720px) {
  .wrap, .wrap-wide, .topbar-inner { width: calc(100% - 24px); }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px; }
  .kpi .val { font-size: 18px; }
  table.data { min-width: 0; }
  .consent-journal table.data { min-width: 0; }
  .consent-journal .table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .consent-journal .consent-revoke {
    width: 100%;
    min-height: 44px;
  }
  .table-wrap { border: 0; background: transparent; overflow: visible; box-shadow: none; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 8px; padding: 8px 0; box-shadow: var(--shadow-soft);
  }
  table.data td {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
    min-width: 0;
  }
  table.data td::before {
    content: attr(data-label);
    font-size: 11px; font-weight: 800; color: var(--ink-muted);
    line-height: 1.3;
  }
  table.data td:last-child { border-bottom: 0; }
  .hist-table td:first-child,
  .hist-table td:nth-child(3),
  .hist-table td:nth-child(4) {
    white-space: normal;
    width: auto;
  }
  .period-label { white-space: normal; }
  .row-status td:first-child { box-shadow: none; border-left: 4px solid transparent; }
  .row-status--ok td:first-child { border-left-color: var(--green); }
  .row-status--paid td:first-child { border-left-color: #1d6fd0; }
  .row-status--sold td:first-child { border-left-color: #8a8a8a; }

  .card--hist .api-strip,
  .card--docs .api-strip { display: none; }
  .card--hist,
  .card--docs {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
  }
  .card--hist:hover,
  .card--docs:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
  }
  .card--hist .card-pad,
  .card--docs .card-pad {
    padding: 4px 16px 10px;
  }
  .card--hist .table-wrap,
  .card--hist .pager,
  .card--docs .pager {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .card--hist .pager,
  .card--docs .pager {
    margin: 0 16px;
    padding: 12px 0;
    border-top: 1px solid #e4ebe1;
  }
  .card--hist .card-note,
  .card--docs .card-note {
    font-size: 13px;
    margin-bottom: 10px;
  }
  /* Фильтры истории и документов — один паттерн */
  .card--hist .filters,
  .card--docs .filters {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 12px;
    z-index: 8;
  }
  .card--hist .filters select,
  .card--docs .filters select {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 44px;
    height: 44px;
    font-size: 15px;
    font-weight: 700;
    padding: 0 34px 0 14px;
    border-radius: 12px;
    border-width: 2px;
  }
  .card--hist .period-picker,
  .card--docs .period-picker {
    flex: 0 0 auto;
    width: auto;
    grid-column: auto;
    position: static;
  }
  .card--hist .filter-period,
  .card--hist .period-trigger,
  .card--docs .filter-period,
  .card--docs .period-trigger {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
  }
  .card--hist .period-pop,
  .card--docs .period-pop {
    top: calc(100% + 6px);
    bottom: auto;
    right: 0;
    left: auto;
    width: min(300px, calc(100vw - 24px));
    min-width: min(240px, calc(100vw - 24px));
  }
  .card--hist .period-pop.is-above,
  .card--docs .period-pop.is-above {
    top: auto;
    bottom: calc(100% + 6px);
  }
  .card--hist .period-label,
  .card--docs .period-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  /* Документы: Статус · календарь · Скачать все — одна строка */
  .card--docs .filters {
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .card--docs .filters select {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
  .card--docs .period-picker {
    flex: 0 0 auto;
    width: auto;
  }
  .card--docs .docs-download-all {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    border-width: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  table.data.hist-table,
  table.data.hist-table tbody {
    display: block;
  }
  table.data.hist-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date status"
      "msg msg"
      "files files";
    gap: 8px 10px;
    align-items: start;
    padding: 16px;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #e4ebe1;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }
  table.data.hist-table tr:first-child {
    border-top: 1px solid #e4ebe1;
  }
  table.data.hist-table td {
    display: block;
    padding: 0;
    border: 0;
    width: auto;
    min-width: 0;
  }
  table.data.hist-table td::before { display: none; content: none; }
  table.data.hist-table td[data-label="Дата/время"] {
    grid-area: date;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-muted);
    line-height: 1.35;
  }
  table.data.hist-table td[data-label="Статус"] {
    grid-area: status;
    justify-self: end;
    align-self: start;
  }
  table.data.hist-table td[data-label="Содержание обращения"] { grid-area: msg; }
  table.data.hist-table td[data-label="Файлы"] { grid-area: files; }
  table.data.hist-table td[data-label="Файлы"]:has(.muted) { display: none; }
  table.data.hist-table .badge {
    padding: 3px 8px;
    font-size: 10.5px;
  }
  table.data.hist-table .msg-bubble {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  table.data.hist-table .msg-bubble.is-out,
  table.data.hist-table .msg-bubble.is-in {
    background: transparent;
  }
  table.data.hist-table .msg-bubble.is-reply {
    margin-left: 0;
    padding-top: 8px;
    border-top: 1px solid #eef2ec;
  }
  table.data.hist-table .msg-bubble.is-reply::before { display: none; }
  table.data.hist-table .msg-bubble.is-unread {
    box-shadow: none;
    border-left: 3px solid var(--warn);
    padding-left: 10px;
  }
  table.data.hist-table .msg-bubble p { font-size: 14px; line-height: 1.4; }
  table.data.hist-table .msg-stack { gap: 10px; }
  .file-more {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    border-radius: 12px;
  }
  table.data.hist-table tr:hover .msg-bubble.is-out,
  table.data.hist-table tr:hover .msg-bubble.is-in { background: transparent; }

  .docs {
    gap: 0;
    border-top: 1px solid #e4ebe1;
  }
  .doc {
    border: 0;
    border-bottom: 1px solid #e4ebe1;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: none;
  }
  .doc:hover {
    transform: none;
    box-shadow: none;
    border-color: #e4ebe1;
  }
  .app-swipe {
    position: relative;
    overflow: hidden;
    background: #fff;
  }
  .app-swipe-front {
    position: relative;
    z-index: 1;
    padding: 16px;
    min-height: 44px;
    background: #fff;
    transition: transform .22s ease;
    will-change: transform;
  }
  .app-swipe.is-open .app-swipe-front {
    transform: none;
  }
  .doc-info b {
    font-size: 14px;
    line-height: 1.3;
  }
  .doc .muted { font-size: 12px; }
  .app-swipe-front > .badge {
    padding: 3px 8px;
    font-size: 10.5px;
    align-self: start;
  }
  .channel-icons {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .channel-ico {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
  }
  .channel-ico svg { width: 20px; height: 20px; }
  .btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 15px;
  }
  .pager {
    padding: 14px 16px 16px;
    gap: 12px;
  }
  .pager-bar { gap: 10px; }
  .pager-meta {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: normal;
  }
  .pager-limit {
    font-size: 14px;
    color: var(--ink);
  }
  .pager-limit select {
    min-height: 44px;
    min-width: 56px;
    padding: 8px 10px;
    font-size: 15px;
    border-radius: 12px;
  }
  .pager-btn,
  .pager-page {
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border-radius: 12px;
  }
  .pager-controls {
    justify-content: space-between;
    gap: 8px;
  }
  .pager-pages { gap: 6px; }
  .form-spotlight { padding-left: 18px; }

  /* Skeletons + pull-to-refresh */
  .list-refresh-host {
    position: relative;
  }
  .list-skel {
    display: none;
    gap: 0;
  }
  .list-refresh-host.is-loading > .list-skel {
    display: grid;
  }
  .list-refresh-host.is-loading > table,
  .list-refresh-host.is-loading > .doc {
    display: none !important;
  }
  .sk-row {
    padding: 16px;
    border-bottom: 1px solid #e4ebe1;
    background: #fff;
    display: grid;
    gap: 10px;
  }
  .sk-line {
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, #e8eee6 0%, #f4f7f3 45%, #e8eee6 100%);
    background-size: 220% 100%;
    animation: skShimmer 1.1s ease-in-out infinite;
  }
  .sk-line--sm { width: 36%; height: 12px; }
  .sk-line--md { width: 68%; }
  .sk-line--btn {
    width: 46%;
    height: 44px;
    border-radius: 12px;
    margin-top: 2px;
  }
  .sk-row-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
  .sk-pill {
    width: 72px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(90deg, #e8eee6 0%, #f4f7f3 45%, #e8eee6 100%);
    background-size: 220% 100%;
    animation: skShimmer 1.1s ease-in-out infinite;
  }
  @keyframes skShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
  }
  .ptr-bar {
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(180deg, #f3f8f1, rgba(243,248,241,0));
    transition: height .2s ease, opacity .2s ease;
  }
  .ptr-bar.is-visible {
    height: 52px;
    opacity: 1;
  }
  .ptr-bar.is-arming {
    height: 44px;
    opacity: .85;
  }
  .ptr-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid #c5d8bf;
    border-top-color: var(--green);
    border-radius: 50%;
  }
  .ptr-bar.is-loading .ptr-spinner {
    animation: ptrSpin .7s linear infinite;
  }
  @keyframes ptrSpin {
    to { transform: rotate(360deg); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .sk-line,
  .sk-pill { animation: none; }
  .ptr-bar.is-loading .ptr-spinner { animation: none; }
}
@media (max-width: 480px) {
  .next-pay { padding: 10px 12px; gap: 8px; }
  .next-pay-full { font-size: 15px; }
  .help-quick-link { flex: 1 1 100%; }
  .top-actions .btn { padding: 8px 10px; }
  .hello b { max-width: 46vw; }
}
@media (max-width: 720px) {
  .req-compose-bar {
    display: block;
    margin: 12px 0 4px;
    position: sticky;
    top: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 12;
  }
  .req-compose-open {
    width: 100%;
    min-height: 48px;
    box-shadow: 0 8px 22px rgba(78, 173, 51, .28);
  }
  .form-spotlight {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 70;
    margin: 0 !important;
    max-height: min(92dvh, 920px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px 18px 0 0;
    border: 1px solid #c5d8bf;
    border-bottom: 0;
    padding: 8px 14px calc(18px + 64px + env(safe-area-inset-bottom, 0px));
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s ease, visibility 0s linear .28s;
    box-shadow: 0 -18px 48px rgba(18, 37, 12, .22);
  }
  .form-spotlight::before { display: none; }
  body.req-sheet-open .form-spotlight,
  body.req-sheet-open .form-spotlight.reveal,
  body.req-sheet-open .form-spotlight.reveal.is-in {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    transition: transform .28s ease, visibility 0s;
  }
  .form-spotlight.reveal,
  .form-spotlight.reveal.is-in {
    opacity: 1;
    transform: translateY(110%);
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  body.req-sheet-open {
    overflow: hidden;
  }
  body.req-sheet-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(10, 18, 8, .38);
  }
  .form-spotlight .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -14px;
    padding: 10px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 28%);
  }
  .req-sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 0 8px;
    padding: 4px 0 8px;
    background: linear-gradient(180deg, #f3faf0 0%, #f7fbf4 70%, rgba(247,251,244,0));
  }
  .req-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 2px auto 10px;
    border-radius: 999px;
    background: #c5d8bf;
  }
  .req-sheet-title-row .card-title {
    padding: 2px 0 2px 12px;
    font-size: 18px;
  }
  .req-sheet-close { display: inline-grid; place-items: center; }
  .form-spotlight .field textarea { min-height: 120px; }
  .contact-map .map-fold {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }
  .contact-map .map-fold > .map-fold-sum {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    min-height: 52px;
    padding: 12px 14px;
  }
  .map-fold-sum-text {
    display: grid;
    gap: 2px;
    min-width: 0;
  }
  .map-fold-sum-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
  }
  .map-fold-sum-text span {
    font-size: 12.5px;
    color: var(--ink-muted);
  }
  .map-fold > .map-fold-sum::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg);
    transition: transform .2s ease;
    flex-shrink: 0;
  }
  .map-fold[open] > .map-fold-sum::after {
    transform: rotate(-135deg);
    margin-top: 4px;
  }
  .contact-map .map-fold .map-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 0;
  }
  .contact-map .map-fold .map-card iframe {
    min-height: 220px;
    height: 220px;
  }
  .contact-map .map-fold .map-cap {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
  }
}
@media (max-width: 980px) {
  .footer-top {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .footer-logo { grid-column: 1; }
  .footer-login { grid-column: 2; width: auto; }
  .footer-contacts {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 20px;
  }
  .footer-logo img { height: 56px; }
  .footer-nav { gap: 4px; }
  .footer-req-cols { gap: 12px 20px; }
}
@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-login { grid-column: 1; width: 100%; text-align: center; }
  .footer-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 8px 12px;
  }
  .site-footer .container { width: min(100% - 28px, var(--max-wide)); }
  .footer-req-cols { gap: 12px 14px; }
  .footer-req-list { gap: 6px 10px; }
}

/* Нижняя панель — вместе с off-canvas меню (≤900px) */
.tabbar {
  display: none;
}

@media (max-width: 900px) {
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px rgba(18, 37, 12, .1);
  }
  .tabbar-notif-ico {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
  }
  .tabbar-notif-ico svg {
    width: 22px;
    height: 22px;
  }
  .tabbar-notif-dot {
    top: -4px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    font-size: 9px;
  }
  body.notif-in-tabbar .top-actions #notifBtn {
    display: none;
  }
  body.notif-in-tabbar .top-actions .notif {
    position: static;
    width: 0;
    height: 0;
    margin: 0;
    overflow: visible;
  }
  .top-actions > a.btn-icon[href="profile.html"] {
    display: none;
  }
  .tabbar a,
  .tabbar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    border: 0;
    background: transparent;
    color: var(--ink-muted);
    font: 700 12px/1.15 var(--font-cabinet);
    cursor: pointer;
    text-decoration: none;
    border-radius: 12px;
    padding: 6px 2px;
  }
  .tabbar a.is-on,
  .tabbar button.is-on {
    color: var(--green-dark);
    background: var(--green-soft);
  }
  .tabbar svg {
    width: 22px; height: 22px;
    stroke: currentColor; fill: none;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  }
  body.nav-open .tabbar { pointer-events: none; }
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .page {
    padding-bottom: 28px;
  }
  .toast {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  body > .notif-panel,
  .notif-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    top: auto;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(58dvh, 420px);
    overflow: auto;
    z-index: 70;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(18, 37, 12, .22);
  }
  .notif-scrim {
    position: fixed;
    inset: 0;
    z-index: 65;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 18, 8, .28);
    cursor: pointer;
  }
  .notif-scrim[hidden] { display: none; }
  body.notif-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .page {
    padding-bottom: 32px;
  }
  .demo-bar {
    display: none;
  }
  .toast {
    left: 12px;
    right: 12px;
    max-width: none;
  }
  .topbar {
    padding-top: env(safe-area-inset-top, 0px);
  }
  .hello b {
    font-size: 14px;
    max-width: none;
  }
  .hello span { display: none; }
  .topbar-inner {
    padding: 10px 0;
    width: calc(100% - 20px);
  }
  .wrap, .wrap-wide {
    width: calc(100% - 20px);
  }
  .page { padding-top: 14px; }
  .page-head { margin-bottom: 14px; gap: 10px; }
  .sec { font-size: 22px; }
  .card-pad { padding: 14px; }
  .next-pay { padding: 10px 12px; }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
  }
  .kpi.warn {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    min-height: 0;
  }
  .kpi.warn .lbl {
    margin: 0;
    font-size: 12px;
  }
  .kpi.warn .val {
    font-size: 22px;
    line-height: 1.1;
    word-break: break-word;
  }
  .kpi:not(.warn) {
    padding: 8px 10px;
    min-height: 0;
  }
  .kpi:not(.warn) .lbl {
    margin-bottom: 3px;
    font-size: 11px;
    line-height: 1.25;
  }
  .kpi:not(.warn) .val {
    font-size: 14px;
    line-height: 1.2;
    word-break: break-word;
  }
  .pay-qr {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: stretch;
    text-align: left;
    padding: 10px;
    gap: 10px;
    margin-bottom: 12px;
  }
  .pay-qr-figure {
    justify-items: center;
    gap: 4px;
  }
  .pay-qr-hit img,
  .pay-qr-figure img,
  .pay-qr-stub {
    width: 76px;
    height: 76px;
    aspect-ratio: 1;
    padding: 6px;
  }
  .pay-qr-stub {
    gap: 0;
    place-content: center;
  }
  .pay-qr-stub svg {
    width: 42px;
    height: 42px;
  }
  /* Подпись «Скоро» в 76px-квадрате налазила на иконку — текст уже в figcaption */
  .pay-qr-stub-label {
    display: none;
  }
  .pay-qr-figure figcaption {
    font-size: 11px;
    max-width: 7.5em;
    line-height: 1.25;
    text-align: center;
  }
  .cession-sheet {
    flex-direction: row;
    align-items: center;
    text-align: left;
    width: 100%;
    padding: 8px 10px;
    gap: 8px;
    min-height: 0;
  }
  .cession-sheet h2 {
    font-size: 13px;
    margin: 0 0 2px;
  }
  .cession-meta {
    margin: 0 0 2px;
    font-size: 11px;
    line-height: 1.3;
  }
  .cession-pdf-icon {
    display: none;
  }
  .cession-req {
    min-height: 0;
    margin-top: 2px;
    font-size: 12px;
  }
  .cession-dl div { grid-template-columns: 1fr; gap: 0; }
  .file-actions, .channel-icons { width: 100%; }
  .btn.full { min-height: 44px; }
  .hist-table .file-chip,
  .doc .file-chip { min-height: 32px; }
  .field input,
  .field textarea,
  .field select,
  .filters select,
  .period-pop-fields input[type="date"] {
    font-size: 16px;
    min-height: 48px;
  }
  .chip { min-height: 44px; padding: 10px 16px; }
  .side-link, .btn-logout { min-height: 48px; }
  .topbar-inner .hello {
    flex: 1;
    min-width: 0;
  }
  .pdf-modal-frame { min-height: 55dvh; }
  .qr-zoom img { min-width: min(86vw, 360px); }
  .site-footer {
    margin-top: 12px;
    padding: 10px 0 8px;
  }
  .site-footer .container {
    width: calc(100% - 20px);
  }
  .site-footer--collapsible .footer-top {
    grid-template-columns: 1fr;
    padding-bottom: 0;
    border-bottom: 0;
    gap: 0;
  }
  .site-footer--collapsible .footer-logo img { height: 34px; }
  .site-footer--collapsible .footer-nav,
  .site-footer--collapsible .footer-login {
    display: none;
  }
  .footer-more {
    position: relative;
    z-index: 1;
    margin: 0;
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 0;
  }
  .footer-more > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.92);
  }
  .footer-more > summary::-webkit-details-marker { display: none; }
  .footer-more > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255,255,255,.7);
    border-bottom: 2px solid rgba(255,255,255,.7);
    transform: rotate(45deg);
    transition: transform .2s ease;
    flex-shrink: 0;
  }
  .footer-more[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 4px;
  }
  .footer-more-body {
    display: grid;
    gap: 12px;
    padding: 0 0 10px;
  }
  .footer-more .footer-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 6px 12px;
  }
  .footer-more .footer-contacts a,
  .footer-more .footer-contacts span {
    font-size: 12.5px;
    white-space: normal;
  }
  .footer-more .footer-contacts span { opacity: .72; }
  .footer-more .footer-bottom {
    padding: 0;
    gap: 10px;
  }
  .footer-req-cols {
    grid-template-columns: 1fr 1fr;
    gap: 12px 12px;
  }
  .footer-req-title {
    margin: 0 0 6px;
    font-size: 10.5px;
    letter-spacing: .03em;
  }
  .footer-req-title--bank { margin-top: 0; }
  .footer-req-list {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .footer-req-list dd { font-size: 11.5px; }
  .footer-req-list dt { font-size: 10px; }
  .footer-req-note,
  .footer-disc {
    font-size: 11px;
  }
  .footer-req-more { margin-top: 8px; font-size: 12px; }
  .site-footer--slim .footer-top { padding-bottom: 0; border: 0; }
}

@media (max-width: 380px) {
  .footer-more .footer-contacts,
  .footer-contacts {
    grid-template-columns: 1fr;
  }
  .tabbar a,
  .tabbar button {
    font-size: 10.5px;
    gap: 2px;
    padding: 4px 1px;
  }
  .tabbar svg,
  .tabbar-notif-ico,
  .tabbar-notif-ico svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpi.warn { grid-column: 1 / -1; }
  .kpi.warn .val { font-size: 20px; }
  .help-quick-link { flex: 1 1 100%; min-height: 44px; }
  .top-actions { gap: 8px; }
  .error-overlay { padding: 12px; align-items: end; }
  .error-card {
    width: 100%;
    border-radius: 16px 16px 8px 8px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

@media (hover: none) {
  .btn:hover,
  .card:hover,
  .kpi:hover,
  .doc:hover,
  .chip:hover,
  .faq details:hover {
    transform: none;
  }
}

/* —— Анимации появления —— */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes barIn {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 1; }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(78,173,51,.45); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(78,173,51,0); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes helloIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes accentIn {
  0% { opacity: 0; transform: translateY(22px) scale(.94); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes accentShine {
  0%, 55% { transform: translateX(-120%); }
  75% { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}
@keyframes accentTitleIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes accentTextIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.top-actions { animation: helloIn .45s .08s ease both; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > .reveal:nth-child(1) { transition-delay: .04s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: .1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: .16s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: .22s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: .28s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: .34s; }

.page-head { animation: fadeUp .5s ease both; }
.kpi-grid .kpi { animation: fadeUp .5s ease both; }
.kpi-grid .kpi:nth-child(1) { animation-delay: .05s; }
.kpi-grid .kpi:nth-child(2) { animation-delay: .1s; }
.kpi-grid .kpi:nth-child(3) { animation-delay: .15s; }
.kpi-grid .kpi:nth-child(4) { animation-delay: .2s; }
.kpi-grid .kpi:nth-child(5) { animation-delay: .25s; }

.map-card { transition: transform .35s ease, box-shadow .35s ease; }
.map-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(18,37,12,.14); }
.about-neris { animation: fadeUp .55s .12s ease both; }
.contact-map .map-card { animation: fadeUp .55s .2s ease both; }

.sidebar-brand { animation: sideIn .4s ease both; }
.user-card { animation: sideIn .45s .25s ease both; }
.btn-logout { animation: sideIn .45s .32s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .intro-accents li,
  .intro-accents strong,
  .intro-accents span {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  .intro-accents li::after {
    display: none;
  }
  .howto-track li {
    opacity: 1 !important;
    transform: none !important;
  }
  .howto-track::before {
    transform: none !important;
    opacity: .35 !important;
  }
  .howto-track::after {
    display: none;
  }
}
