/* Личный кабинет Заявкина в Telegram. Цвета — из темы Telegram (переменные
   --tg-theme-* ставит telegram-web-app.js), запасные — для страниц оплаты в браузере. */
:root {
  --bg: var(--tg-theme-secondary-bg-color, #eff1f5);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #14171c);
  --hint: var(--tg-theme-hint-color, #7d8592);
  --accent: var(--tg-theme-button-color, #1e60e6);
  --on-accent: var(--tg-theme-button-text-color, #ffffff);
  --link: var(--tg-theme-link-color, #1e60e6);
  --danger: var(--tg-theme-destructive-text-color, #d93a3a);
  --ok: #24935a;
  --line: color-mix(in srgb, var(--hint) 22%, transparent);
  --soft: color-mix(in srgb, var(--accent) 10%, var(--card));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tg]) { --bg: #101215; --card: #1b1e23; --text: #eef0f3; --hint: #8f97a3; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.screen { max-width: 520px; margin: 0 auto; padding: 20px 16px 120px; }
.page .screen { padding-top: 48px; text-align: center; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--hint); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.brand img { width: 24px; height: 24px; border-radius: 8px; object-fit: cover; }
.step { color: var(--hint); font-size: 14px; margin: 14px 0 4px; }
h1 { font-size: 26px; line-height: 1.2; margin: 10px 0 8px; font-weight: 700; }
.lead { color: var(--hint); margin: 0 0 18px; }

.card { background: var(--card); border-radius: 16px; padding: 16px; margin: 0 0 12px; }
.card h2 { font-size: 15px; margin: 0 0 10px; color: var(--hint); font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.list li + li { border-top: 1px solid var(--line); }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--soft); position: relative; margin-top: 1px; }
.tick::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 10px; border: solid var(--accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.note { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; font-size: 15px; }
.note b { display: block; margin-bottom: 2px; }
.shield { flex: none; width: 22px; height: 26px; margin-top: 1px; background: var(--accent); clip-path: polygon(50% 0, 100% 16%, 100% 52%, 50% 100%, 0 52%, 0 16%); }

.price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price .sum { font-size: 28px; font-weight: 700; white-space: nowrap; }
.price .per { color: var(--hint); font-size: 15px; }
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
.rows div + div { border-top: 1px solid var(--line); }
.rows dt { color: var(--hint); white-space: nowrap; }
.rows dd { margin: 0; text-align: right; font-weight: 500; }

label.field { display: block; margin: 0 0 12px; }
label.field span { display: block; font-size: 14px; color: var(--hint); margin: 0 0 6px; }
.input { display: flex; align-items: center; background: var(--card); border-radius: 14px; border: 1.5px solid transparent; }
.input:focus-within { border-color: var(--accent); }
.input input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 14px 16px; outline: none; }
.input button { border: 0; background: none; color: var(--link); font: inherit; font-size: 15px; padding: 0 16px; cursor: pointer; }
.hint { color: var(--hint); font-size: 14px; margin: -4px 0 16px; }

.check { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 14px; padding: 14px 16px; margin: 0 0 10px; cursor: pointer; font-size: 15px; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--hint); margin-top: 1px; position: relative; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--link); }

.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.bar > * { max-width: 488px; margin-left: auto; margin-right: auto; }
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 16px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--link); font-weight: 500; padding: 12px 16px; }
.btn.second { background: var(--card); color: var(--link); }
.bar small { display: block; text-align: center; color: var(--hint); font-size: 13px; margin-top: 8px; }
.page .btn { max-width: 360px; margin: 24px auto 0; }

.status { display: flex; gap: 12px; align-items: center; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.off { background: var(--danger); box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 16%, transparent); }
.status b { display: block; font-size: 18px; }
.status span { color: var(--hint); font-size: 15px; }
.row-btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-btn button { border: 0; background: none; color: var(--link); font: inherit; padding: 0; cursor: pointer; }
.soon { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; }
.soon + .soon { border-top: 1px solid var(--line); }
.soon p { margin: 2px 0 0; color: var(--hint); font-size: 14px; }
.tag { flex: none; font-size: 13px; color: var(--hint); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; }

.result { text-align: center; padding-top: 28px; }
.result .lead { margin-left: auto; margin-right: auto; max-width: 400px; }
.big { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px; position: relative; background: color-mix(in srgb, var(--ok) 16%, transparent); }
.big::after { content: ""; position: absolute; left: 27px; top: 17px; width: 14px; height: 28px; border: solid var(--ok); border-width: 0 4px 4px 0; transform: rotate(45deg); }
.big.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.big.bad::after, .big.bad::before { content: ""; position: absolute; left: 34px; top: 20px; width: 4px; height: 32px; border: 0; background: var(--danger); transform: rotate(45deg); }
.big.bad::before { transform: rotate(-45deg); }
.spin { width: 56px; height: 56px; margin: 8px auto 12px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

/* Несколько УК, места, приглашения (24.10.2026) */
.uk { display: block; cursor: pointer; }
.uk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.uk-top b { font-size: 18px; }
.chev { flex: none; width: 9px; height: 9px; border: solid var(--hint); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.uk-line { display: flex; gap: 10px; align-items: center; margin-top: 10px; color: var(--hint); font-size: 15px; }
.uk-line .dot { width: 10px; height: 10px; box-shadow: none; }
.uk-line + .uk-line { margin-top: 6px; }
.warn, .uk-line.warn, .people .who span.warn, .check .grow small.warn { color: var(--danger); }
.grp { color: var(--hint); font-size: 14px; font-weight: 600; margin: 18px 2px 8px; }
.people .p { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; cursor: pointer; }
.people .p + .p { border-top: 1px solid var(--line); }
.people .who { min-width: 0; }
.people .who b { display: block; font-weight: 500; }
.people .who span { display: block; color: var(--hint); font-size: 14px; }
.people .until { font-size: 15px; text-align: right; white-space: nowrap; }
.people .until.no { color: var(--danger); }
.people .until.wait { color: var(--hint); }
.p-left { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ava { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.ava.big2 { width: 56px; height: 56px; font-size: 22px; margin: 0 auto 12px; }
.add { display: flex; align-items: center; gap: 10px; color: var(--link); font-weight: 500; padding: 12px 0 2px; border-top: 1px solid var(--line); margin-top: 2px; cursor: pointer; }
.plus { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px dashed var(--link); display: grid; place-items: center; font-size: 22px; line-height: 1; }
.linkbox { background: var(--card); border-radius: 14px; padding: 14px 16px; font-size: 15px; word-break: break-all; margin: 0 0 10px; border: 1.5px dashed var(--line); user-select: all; }
.two { display: flex; gap: 10px; }
.two .btn { flex: 1; }
.btn + .btn, .btn + .btn.ghost { margin-top: 10px; }
.two .btn + .btn { margin-top: 0; }
.danger-link { display: block; width: 100%; border: 0; background: none; color: var(--danger); font: inherit; font-weight: 500; padding: 14px 16px; margin-top: 4px; text-align: center; cursor: pointer; }
.pay .check { margin: 0 0 8px; align-items: center; }
.check .grow { flex: 1; min-width: 0; }
.check .grow small { display: block; color: var(--hint); font-size: 14px; }
.pay .check .sum1 { white-space: nowrap; font-weight: 500; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 0; font-size: 17px; }
.total b { font-size: 24px; }
.small-note { color: var(--hint); font-size: 14px; margin: 8px 2px 0; }
.sw { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 14px; padding: 14px 16px; margin: 0 0 10px; font-size: 15px; cursor: pointer; }
.sw .grow { flex: 1; }
.sw .grow small { display: block; color: var(--hint); font-size: 14px; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.tgl { flex: none; width: 51px; height: 31px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.tgl::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: left .2s; }
.sw input:checked + .tgl { background: var(--accent); }
.sw input:checked + .tgl::after { left: 22px; }
.upsell p { margin: 0 0 6px; }
.upsell p:last-child { margin: 0; }
@media (prefers-reduced-motion: reduce) { .tgl, .tgl::after { transition: none; } }

/* Квитанция и «сделано» вместо всплывающих плашек (выбор владельца 24.10.2026) */
.okcard { display: flex; gap: 12px; align-items: center; background: color-mix(in srgb, var(--ok) 11%, var(--card)); border-radius: 16px; padding: 14px 16px; margin: 14px 0 4px; font-size: 15px; }
.okcard .grow { flex: 1; min-width: 0; }
.okic { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); position: relative; }
.okic::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.until.okc { color: var(--ok); font-weight: 600; }
.receipt .p { cursor: default; }
.big.draw { animation: pop .4s ease-out both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .big.draw { animation: none; } }
