/* Мини-приложение ЕРЦ в MAX: стиль сайта erc05.ru (main.css), плоский, плитки как у МФЦ.
   Долг — бордовый, «нет долга» и переплата — зелёные (решения владельца 13.10.2026). */
:root {
  --green: #1aa571; --green-700: #0d7a50; --green-tint: #e3f5ec;
  --red: #a8323e; --red-tint: #f7e8ea; --amber: #b7791f;
  --ink: #1c2a35; --grey: #6b7a86; --line: #e3e9ee;
  --bg: #f3f7f5; --card: #ffffff; --shadow: 0 6px 22px rgba(28, 42, 53, .08);
  --radius: 20px;
  --font: -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #2bbf86; --green-700: #5fd3a3; --green-tint: #173a2c;
    --red: #e0707b; --red-tint: #3d2226; --amber: #e0b060;
    --ink: #e8eef2; --grey: #9aa8b3; --line: #2a3640;
    --bg: #11181d; --card: #1a242b; --shadow: 0 6px 22px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
}
button, input, select { font: inherit; color: inherit; }
.top { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; }
.top__logo { width: 44px; height: 44px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow); }
.top__logo img { width: 34px; height: auto; display: block; }
.top__name { font-weight: 700; font-size: 17px; }
#view { max-width: 640px; margin: 0 auto; }
.loading, .empty { color: var(--grey); padding: 32px 4px; text-align: center; }
h1 { font-size: 22px; margin: 16px 4px 12px; }
h2 { font-size: 15px; color: var(--grey); font-weight: 600; margin: 20px 4px 8px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin: 12px 0; }
.card--tap { cursor: pointer; display: block; width: 100%; text-align: left; border: 0; }
.card--tap:active { transform: scale(.99); }
.addr { font-weight: 700; font-size: 18px; line-height: 1.25; }
.muted { color: var(--grey); font-size: 14px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pill { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 13px;
  font-weight: 700; margin-top: 10px; }
.pill--debt { color: var(--red); background: var(--red-tint); }
.pill--ok { color: var(--green-700); background: var(--green-tint); }
.sum { font-weight: 800; font-size: 34px; letter-spacing: -.5px; margin: 6px 0 2px; }
.debt { color: var(--red); font-weight: 700; white-space: nowrap; }
.ok { color: var(--green-700); font-weight: 700; white-space: nowrap; }
.note { color: var(--amber); font-size: 13px; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.tile { background: var(--card); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; min-height: 96px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; }
.tile:active { transform: scale(.98); }
.tile__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--green-tint);
  display: grid; place-items: center; }
.tile__icon svg { width: 20px; height: 20px; stroke: var(--green-700); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile__label { font-weight: 700; font-size: 15px; margin-top: 10px; }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 14px 16px;
  font-weight: 700; font-size: 16px; cursor: pointer; margin: 10px 0;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.btn--primary { background: var(--green); color: #fff; box-shadow: none; }
.btn--danger { color: var(--red); }
.btn--link { background: none; box-shadow: none; color: var(--green-700); padding: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.prov { padding: 0; overflow: hidden; }
.prov > button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: 16px 18px;
  cursor: pointer; }
.prov__name { font-weight: 700; }
.prov__body { border-top: 1px solid var(--line); padding: 12px 18px 16px; }
.svc { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.svc + .svc { border-top: 1px dashed var(--line); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px;
  vertical-align: middle; background: var(--green-700); }
.dot--debt { background: var(--red); }
.field { display: block; width: 100%; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; background: var(--card); margin: 8px 0; font-size: 18px; }
.field:focus { outline: 2px solid var(--green); border-color: transparent; }
.qr { display: block; width: 100%; max-width: 300px; margin: 8px auto; border-radius: 12px;
  background: #fff; padding: 8px; image-rendering: pixelated; }
.center { text-align: center; }
.ann { border-left: 4px solid var(--amber); }
.ann--emergency { border-left-color: var(--red); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px;
  border-radius: 12px; font-size: 14px; max-width: 90%; }
.big-ok { font-size: 52px; line-height: 1; color: var(--green); }
.list-pay { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; }
.list-pay + .list-pay { border-top: 1px solid var(--line); }
a { color: var(--green-700); }
.mt { margin-top: 10px; }
.back { border: 0; background: none; color: var(--green-700); font-weight: 700; padding: 6px 2px; cursor: pointer; }

/* ── картинки и обновление (владелец 14.10.2026: «не хватает картинок», «не видно
   обновления данных») ── */
.chip { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-grid;
  place-items: center; background: var(--green-tint); }
.chip svg { width: 22px; height: 22px; fill: none; stroke: var(--green-700); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.chip--tile { width: 44px; height: 44px; }
.chip--home-debt { background: var(--red-tint); }
.chip--home-debt svg { stroke: var(--red); }
.chip--water { background: #e3edfc; } .chip--water svg { stroke: #2f6fdb; }
.chip--power { background: #fdf3e1; } .chip--power svg { stroke: #b7791f; }
.chip--gas { background: #fdeedd; } .chip--gas svg { stroke: #d9822b; }
.chip--heat { background: #f9e4e2; } .chip--heat svg { stroke: #c2453a; }
.chip--trash { background: #e6f0e9; } .chip--trash svg { stroke: #4f7a5a; }
.chip--repair { background: #ece9fb; } .chip--repair svg { stroke: #6b5bd2; }
.chip--bill { background: #edf1f4; } .chip--bill svg { stroke: #6b7a86; }
@media (prefers-color-scheme: dark) {
  .chip--water, .chip--power, .chip--gas, .chip--heat, .chip--trash, .chip--repair, .chip--bill {
    background: rgba(255, 255, 255, .08); }
}
.hero { position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px; margin: 8px 0 4px;
  color: #fff; background: linear-gradient(135deg, #1aa571 0%, #0d7a50 100%);
  box-shadow: 0 10px 26px rgba(13, 122, 80, .28); display: flex; align-items: center; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%;
  background: rgba(255, 255, 255, .10); }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.hero::after { width: 140px; height: 140px; right: 40px; bottom: -80px; background: rgba(255, 255, 255, .07); }
.hero__text { position: relative; flex: 1; }
.hero__hello { font-weight: 700; font-size: 18px; }
.hero__label { opacity: .85; font-size: 14px; margin-top: 10px; }
.hero__sum { font-weight: 800; font-size: 30px; letter-spacing: -.5px; }
.hero__art { position: relative; width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .16);
  display: grid; place-items: center; }
.hero__art svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.acc { display: flex; gap: 14px; align-items: flex-start; }
.acc__body { flex: 1; min-width: 0; }
.tile .chip { margin-bottom: 4px; }
.prov__head { display: flex; align-items: center; gap: 12px; }
.prov__main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.prov__main .debt, .prov__main .ok { white-space: normal; }
.caret { color: var(--grey); font-size: 22px; line-height: 1; transition: transform .2s; }
.prov > button[aria-expanded="true"] .caret { transform: rotate(90deg); }
.prov--debt { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.row--top { align-items: flex-start; }
.icon-btn { flex: 0 0 auto; border: 0; background: var(--green-tint); width: 40px; height: 40px;
  border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--green-700); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active svg { transform: rotate(-90deg); transition: transform .2s; }
/* заготовки с мерцанием */
.skel-wrap { padding-top: 8px; }
.skel { border-radius: var(--radius); margin: 12px 0; background: var(--card);
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0, rgba(26, 165, 113, .10) 50%, rgba(0, 0, 0, 0) 100%);
  background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer 1.2s linear infinite;
  box-shadow: var(--shadow); }
.skel--s { height: 64px; } .skel--m { height: 96px; } .skel--l { height: 140px; } .skel--xl { height: 200px; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
/* обновление данных у поставщиков */
.spinner { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--green-tint);
  border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.refresh-banner { display: flex; gap: 12px; align-items: center; margin: 8px 0; padding: 14px 16px;
  border-radius: 16px; background: var(--green-tint); color: var(--green-700); font-weight: 600; font-size: 14px; }
.wait { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--grey);
  font-size: 14px; margin: 12px 0; }
/* оплата получена */
.paid__ring { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: var(--green-tint); margin: 6px auto 12px; animation: pop .35s ease-out; }
.paid__check { width: 44px; height: 44px; fill: none; stroke: var(--green); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24;
  animation: draw .5s .2s ease-out forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step__n { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--green-tint);
  color: var(--green-700); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.list-pay { align-items: center; }
@media (prefers-reduced-motion: reduce) { .skel, .spinner, .paid__ring, .paid__check { animation: none; }
  .paid__check { stroke-dashoffset: 0; } }/* крупный шрифт телефона (14.10.2026, «чуть налезают»): длинные слова переносим,
   суммы в раскрытом блоке уходят на новую строку, если не помещаются */
.prov__name, .addr, .svc > span:first-child { overflow-wrap: anywhere; }
.svc { flex-wrap: wrap; }
.svc > span:first-child { flex: 1 1 55%; min-width: 0; }
.svc > span:last-child { margin-left: auto; text-align: right; }
.acc .row { flex-wrap: wrap; }