/* ============================================================
   site.css — сайт и личный кабинет «Учёта».
   Цвета и шрифт — как в приложении: серый фон, белые карточки,
   зелёный бренд, Manrope. Светлая и тёмная тема.
   ============================================================ */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 400 800;
  src: url('fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 400 800;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light dark;
  --bg: #ECECF0; --card: #FCFCFE; --ink: #1B1B1F; --mut: #6D6D72; --line: #E2E2E6;
  --field: #F0F0F3; --g: #1F8F43; --g-ink: #FFFFFF; --g-bg: #E2F6E9;
  --red: #D70015; --red-bg: #FDE3E0; --amber: #B26B00; --amber-bg: #FFF4E0;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 8px 24px rgba(20, 20, 30, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E; --card: #2A2A2D; --ink: #F2F2F4; --mut: #A3A3AA; --line: #3A3A3F;
    --field: #232326; --g: #2DB84D; --g-ink: #08140C; --g-bg: #143A24;
    --red: #FF6961; --red-bg: #3A1A18; --amber: #FF9F0A; --amber-bg: #3A2A12;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
a { color: var(--g); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.top { padding: 18px 0; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand i { width: 32px; height: 32px; border-radius: 9px; background: var(--g); display: grid; place-items: center; color: var(--g-ink); font-style: normal; font-size: 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
main { padding-bottom: 56px; }
h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 10px; font-weight: 800; }
h2 { font-size: 21px; line-height: 1.2; margin: 0 0 10px; font-weight: 800; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.lead { color: var(--mut); font-size: 17px; max-width: 60ch; }
.card { background: var(--card); border-radius: 18px; padding: 22px; margin: 14px 0; box-shadow: var(--shadow); border: 1px solid var(--line); }
.muted { color: var(--mut); }
.small { font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
ul.list { padding-left: 20px; margin: 6px 0 0; }
ul.list li { margin: 5px 0; }

.btn { appearance: none; border: 0; border-radius: 14px; min-height: 48px; padding: 12px 20px; font: 700 16px Manrope, sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--g); color: var(--g-ink); }
.btn.ghost { background: var(--field); color: var(--ink); }
.btn.danger { background: var(--red-bg); color: var(--red); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--g) 50%, transparent); outline-offset: 2px; }

label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; color: var(--mut); }
input[type=email], input[type=text] { width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--field); color: var(--ink); font: 600 17px Manrope, sans-serif; padding: 12px 14px; }
input.code { letter-spacing: .4em; text-align: center; font-size: 24px; font-variant-numeric: tabular-nums; }
.msg { border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; font-size: 15px; }
.msg.err { background: var(--red-bg); color: var(--red); }
.msg.ok { background: var(--g-bg); color: var(--g); }
.msg.warn { background: var(--amber-bg); color: var(--amber); }
[hidden] { display: none !important; }

.status { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.status .big { font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: 14px; }
.pill.on { background: var(--g-bg); color: var(--g); }
.pill.off { background: var(--red-bg); color: var(--red); }
.plan { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; background: var(--field); display: flex; flex-direction: column; gap: 10px; }
.plan .sum { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.pays { width: 100%; border-collapse: collapse; font-size: 15px; }
table.pays td { padding: 10px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.pays td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }

.legal h2 { font-size: 18px; margin: 22px 0 8px; }
.legal p { font-size: 15.5px; }
.req p { margin: 4px 0; font-size: 15px; }
footer { color: var(--mut); font-size: 14px; padding: 24px 0 40px; }
footer .row { gap: 18px; }
footer a { color: var(--mut); }

dialog { border: 0; border-radius: 18px; padding: 22px; max-width: 420px; width: calc(100% - 32px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
