/* SDL IT — мини-приложение. Своя палитра: светлая по умолчанию, тёмная —
   переключателем в «Профиле» (html[data-theme="dark"]). Тему Telegram не
   берём, чтобы приложение у всех выглядело одинаково. */

:root {
  --bg: #f1f3f7;
  --card: #ffffff;
  --text: #111827;
  --hint: #8a94a6;
  --sub: #6b7280;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --link: var(--accent);
  --danger: #e5484d;
  --header: var(--hint);
  --ok: #22a45d;
  --warn: #f5a524;
  --warn-text: #c27c06;
  --sep: color-mix(in srgb, var(--hint) 22%, transparent);
  --soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --soft-2: color-mix(in srgb, var(--hint) 12%, transparent);
  --radius: 16px;
  --radius-s: 12px;
  --tabbar-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px rgba(15, 23, 42, .05);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1116;
  --card: #181c23;
  --text: #e9edf2;
  --hint: #7b8494;
  --sub: #a3abb8;
  --accent: #3d8bff;
  --link: #5b9dff;
  --danger: #ff5c63;
  --ok: #34c173;
  --warn-text: #f0b440;
  --sep: color-mix(in srgb, var(--hint) 18%, transparent);
  --soft: color-mix(in srgb, var(--accent) 18%, transparent);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- каркас */

#app { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }
#app.no-tabbar { padding-bottom: calc(var(--safe-b) + 16px); }
.screen { animation: enter .22s ease both; padding: 0 16px; max-width: 640px; margin: 0 auto; }
.screen.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } }

.boot { display: grid; place-items: center; height: 70vh; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--soft-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 4px 12px; }
.topbar h1 { font-size: 30px; line-height: 1.1; font-weight: 750; letter-spacing: -.4px; margin: 0; }
.topbar .eyebrow { font-size: 13px; color: var(--hint); margin-bottom: 4px; font-weight: 500; }
.topbar .actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--accent); box-shadow: var(--shadow);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.94); }

.section-title {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  color: var(--header); margin: 22px 8px 8px;
}
.section-title.flat { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); margin-left: 4px; }
.note { font-size: 13px; color: var(--hint); margin: 8px 8px 0; line-height: 1.45; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 12px; }
.pad { padding: 16px; }

/* ----------------------------------------------------------------- списки */

.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; min-height: 56px; position: relative;
}
.row + .row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 62px; height: 1px; background: var(--sep);
}
.row.plain + .row.plain::before { left: 14px; }
button.row:active, a.row:active { background: var(--soft-2); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .subtitle { color: var(--sub); font-size: 14px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.row .time { font-size: 12px; color: var(--hint); }
.row .chev { color: var(--hint); opacity: .6; }
.row .chev svg { width: 18px; height: 18px; }
.row .value { color: var(--hint); font-size: 15px; }

.tile {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 38px;
  background: var(--soft); color: var(--accent);
}
.tile svg { width: 20px; height: 20px; }
.tile.green { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tile.orange { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-text); }
.tile.gray { background: var(--soft-2); color: var(--hint); }
.tile.red { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }

.badge {
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; background: var(--danger); color: #fff;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.new { color: var(--accent); background: var(--soft); }
.pill.work { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.pill.done { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.cancel { color: var(--hint); background: var(--soft-2); }
.pill.off::before { display: none; }

/* ----------------------------------------------------------------- кнопки */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 50px; border-radius: 14px; font-weight: 650; font-size: 16px;
  background: var(--accent); color: var(--accent-text); transition: transform .08s, opacity .15s;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; }
.btn.secondary { background: var(--soft); color: var(--accent); }
.btn.ghost { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.btn.danger { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.btn.small { height: 36px; font-size: 14px; border-radius: 10px; width: auto; padding: 0 14px; }
.btn-row { display: flex; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sticky-bottom {
  position: sticky; bottom: calc(var(--safe-b) + 10px); margin-top: 18px; z-index: 5;
}
.no-tabbar .sticky-bottom { bottom: calc(var(--safe-b) + 10px); }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 20;
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px; display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-text); font-weight: 650;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent);
}
.fab svg { width: 22px; height: 22px; }
.fab:active { transform: scale(.96); }

/* ---------------------------------------------------------------- главная */

.hello { padding: 22px 4px 6px; }
.hello .date { color: var(--hint); font-size: 14px; font-weight: 500; }
.hello h1 { font-size: 28px; margin: 4px 0 0; font-weight: 750; letter-spacing: -.3px; }

.hero {
  margin-top: 14px; border-radius: 20px; padding: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #6b21a8));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 30%, transparent);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.hero .label { font-size: 14px; opacity: .85; }
.hero .big { font-size: 40px; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.hero .sub { font-size: 14px; opacity: .9; margin-top: 4px; }
.hero .btn { margin-top: 14px; background: rgba(255, 255, 255, .2); color: #fff; height: 44px; backdrop-filter: blur(8px); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-top: 14px; }
.quick button {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; min-height: 96px;
}
.quick button:active { transform: scale(.98); }
.quick .q-title { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.quick .q-sub { font-size: 12.5px; color: var(--hint); margin-top: -6px; }

/* --------------------------------------------------------------- сегменты */

.segmented {
  display: flex; background: var(--soft-2); border-radius: 12px; padding: 3px; gap: 3px; margin: 4px 0 14px;
}
.segmented button {
  flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--sub);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.segmented button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented.theme { margin: 0 0 6px; }
.segmented.theme button { height: 40px; font-size: 15px; }
.segmented button svg { width: 18px; height: 18px; }
.segmented .count { font-size: 12px; color: var(--hint); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.chip svg { width: 18px; height: 18px; }
.chip.on { background: var(--accent); color: var(--accent-text); }

/* ------------------------------------------------------------------ формы */

.field { display: block; margin-bottom: 12px; }
.field .label { font-size: 13px; font-weight: 600; color: var(--header); margin: 0 6px 6px; display: block; }
.input {
  width: 100%; border: 1.5px solid transparent; background: var(--card); border-radius: 14px;
  padding: 13px 14px; outline: none; box-shadow: var(--shadow); font-size: 16px; resize: none;
  transition: border-color .15s;
}
.input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.input.bad { border-color: var(--danger); }
textarea.input { min-height: 120px; line-height: 1.45; }
.field .hint { font-size: 12.5px; color: var(--hint); margin: 6px 6px 0; line-height: 1.4; }
.field .error { font-size: 13px; color: var(--danger); margin: 6px 6px 0; }
.counter { text-align: right; font-size: 12px; color: var(--hint); margin: 4px 6px 0; }

.photo-pick {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; width: 100%;
  border: 1.5px dashed color-mix(in srgb, var(--hint) 45%, transparent); color: var(--accent); background: var(--card);
  font-weight: 600;
}
.photo-pick svg { width: 22px; height: 22px; flex: 0 0 22px; }
.photo-pick > span { display: flex; flex-direction: column; text-align: left; }
.photo-pick .ph-sub { font-size: 12.5px; color: var(--hint); font-weight: 500; margin-top: 1px; }
.photo-preview { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.photo-preview img { width: 100%; max-height: 260px; object-fit: cover; display: block; }
.photo-preview .remove {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center;
}
.photo-preview .remove svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------- категории */

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px;
  display: flex; flex-direction: column; gap: 12px; text-align: left; min-height: 104px;
  border: 1.5px solid transparent; transition: transform .08s;
}
.cat:active { transform: scale(.98); }
.cat .name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }

.steps { display: flex; gap: 6px; margin: 2px 4px 16px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--soft-2); }
.steps span.on { background: var(--accent); }

.summary .row { min-height: 50px; }
.summary .row .k { color: var(--hint); font-size: 14px; flex: 0 0 34%; }
.summary .row .v { flex: 1; font-size: 15px; word-break: break-word; }

/* ---------------------------------------------------------- успех / пусто */

.done-screen { text-align: center; padding: 60px 20px 20px; }
.done-mark {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); animation: pop .4s ease both;
}
.done-mark svg { width: 44px; height: 44px; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
.done-screen h2 { margin: 0 0 8px; font-size: 24px; }
.done-screen p { color: var(--sub); margin: 0 0 24px; line-height: 1.5; }

.empty { text-align: center; padding: 42px 24px; color: var(--sub); }
.empty .art {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--soft); color: var(--accent);
}
.empty .art svg { width: 38px; height: 38px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 18px; }
.empty p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; }
.empty .btn { max-width: 260px; margin: 0 auto; }

.skeleton { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sk-row { display: flex; gap: 12px; padding: 14px; align-items: center; }
.sk-row + .sk-row { border-top: 1px solid var(--sep); }
.sk { background: linear-gradient(90deg, var(--soft-2) 25%, color-mix(in srgb, var(--hint) 6%, transparent) 37%, var(--soft-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ------------------------------------------------------------ заявка/чат */

.t-head { padding: 16px 4px 8px; }
.t-head .num { color: var(--hint); font-size: 14px; font-weight: 600; }
.t-head h2 { font-size: 22px; margin: 4px 0 10px; line-height: 1.25; }

.timeline { display: flex; align-items: center; padding: 16px 14px 14px; }
.timeline .stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.timeline .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: var(--soft-2); color: var(--hint);
}
.timeline .dot svg { width: 15px; height: 15px; }
.timeline .stage.on .dot { background: var(--accent); color: var(--accent-text); }
.timeline .stage.cancel .dot { background: var(--soft-2); color: var(--danger); }
.timeline .stage span { font-size: 12px; color: var(--hint); font-weight: 600; text-align: center; }
.timeline .stage.on span { color: var(--text); }
.timeline .stage + .stage::before {
  content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--soft-2);
}
.timeline .stage.on + .stage.on::before { background: var(--accent); }

.chat { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 4px; }
.day-sep { align-self: center; font-size: 12px; color: var(--hint); font-weight: 600; margin: 10px 0 4px;
  background: var(--soft-2); padding: 3px 10px; border-radius: 999px; }
.bubble {
  max-width: 82%; padding: 9px 12px 7px; border-radius: 18px; font-size: 15.5px; line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06); word-wrap: break-word; white-space: pre-wrap;
}
.bubble.them { align-self: flex-start; background: var(--card); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 6px; }
.bubble .who { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.bubble .at { font-size: 11px; opacity: .6; text-align: right; margin-top: 2px; }
.bubble .pic { margin: -4px -8px 6px; border-radius: 14px; overflow: hidden; min-height: 60px; min-width: 160px;
  background: var(--soft-2); display: grid; place-items: center; }
.bubble .pic img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.bubble.me .who { color: inherit; }

.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 10px calc(var(--safe-b) + 8px);
  background: var(--card); border-top: 1px solid var(--sep); display: flex; align-items: flex-end; gap: 8px;
}
.composer .input { box-shadow: none; background: var(--soft-2); border-radius: 20px; padding: 9px 14px; min-height: 40px;
  max-height: 140px; font-size: 16px; }
.composer .c-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 40px; color: var(--hint);
}
.composer .c-btn.send { background: var(--accent); color: var(--accent-text); }
.composer .c-btn.send:disabled { opacity: .4; }
.composer .c-btn svg { width: 22px; height: 22px; }
.composer-pad { height: 72px; }
.attach-chip { position: fixed; left: 12px; bottom: calc(var(--safe-b) + 66px); z-index: 31; }
.attach-chip .photo-preview { width: 92px; height: 92px; }
.attach-chip img { width: 92px; height: 92px; object-fit: cover; }
.closed-note { text-align: center; color: var(--hint); font-size: 14px; padding: 14px; }

/* ----------------------------------------------------------- кондиционеры */

.room-card { display: flex; align-items: center; gap: 14px; padding: 14px; width: 100%; text-align: left; }
.room-card + .room-card { border-top: 1px solid var(--sep); }
.room-card .temp { font-size: 26px; font-weight: 750; letter-spacing: -.5px; min-width: 64px; text-align: right; }
.room-card .temp small { font-size: 14px; color: var(--hint); font-weight: 600; }

.dial-wrap { display: grid; place-items: center; padding: 26px 0 10px; }
.dial {
  width: 220px; height: 220px; border-radius: 50%; position: relative; display: grid; place-items: center;
  background: conic-gradient(var(--dial-color, var(--accent)) calc(var(--p, 0) * 1%), var(--soft-2) 0);
  transition: --p .3s;
}
.dial::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); }
.dial .inner { position: relative; text-align: center; }
.dial .t { font-size: 64px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.dial .t sup { font-size: 24px; font-weight: 700; vertical-align: top; position: relative; top: 8px; }
.dial .cap { font-size: 13px; color: var(--hint); margin-top: 6px; font-weight: 600; }
.dial.off { --dial-color: var(--hint); }
.dial.off .t { color: var(--hint); }
.temp-ctrl { display: flex; align-items: center; justify-content: center; gap: 26px; margin: 6px 0 4px; }
.round {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--accent); box-shadow: var(--shadow);
}
.round svg { width: 26px; height: 26px; }
.round:active { transform: scale(.94); }
.round:disabled { opacity: .4; }
.power {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft-2); color: var(--hint); transition: background .2s, color .2s;
}
.power.on { background: var(--accent); color: var(--accent-text); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.power svg { width: 28px; height: 28px; }
.modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mode {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--sub);
}
.mode svg { width: 22px; height: 22px; }
.mode.on { background: var(--accent); color: var(--accent-text); }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.switch-row .main { flex: 1; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--soft-2); position: relative; flex: 0 0 51px; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(20px); }
.busy { opacity: .55; pointer-events: none; }
.offline { display: flex; gap: 10px; align-items: center; padding: 12px 14px; color: var(--danger); font-size: 14px; }

/* ----------------------------------------------------------------- Wi-Fi */

.wifi-card { padding: 18px; }
.wifi-card .top { display: flex; align-items: center; gap: 12px; }
.wifi-card .ssid { font-size: 20px; font-weight: 750; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--sep); }
.kv:first-of-type { margin-top: 14px; }
.kv .k { color: var(--hint); font-size: 14px; }
.kv .v { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .2px; }
.copy { color: var(--accent); }
.copy svg { width: 18px; height: 18px; }
.meter { display: flex; gap: 4px; }
.meter i { width: 18px; height: 6px; border-radius: 3px; background: var(--soft-2); }
.meter i.on { background: var(--ok); }
.howto ol { margin: 0; padding: 4px 16px 14px 36px; }
.howto li { padding: 7px 0; line-height: 1.45; font-size: 15px; }
.howto li b { font-weight: 650; }
.howto code { font-family: ui-monospace, Menlo, monospace; background: var(--soft-2); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.secret { margin-bottom: 12px; border: 1.5px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.pw-box { margin-top: 2px; padding: 14px; border-radius: var(--radius-s); background: var(--soft-2); }
.pw-box .k { color: var(--hint); font-size: 13px; }
.pw-value { margin: 6px 0 12px; font-size: 24px; font-weight: 650; letter-spacing: 1.5px; word-break: break-all;
  -webkit-user-select: text; user-select: text; }
.pw-value.masked { letter-spacing: 3px; color: var(--sub); -webkit-user-select: none; user-select: none; }
.pw-actions { display: flex; gap: 8px; }
.pw-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px;
  border-radius: 10px; background: var(--card); color: var(--accent); font-weight: 600; font-size: 14.5px; }
.pw-btn svg { width: 18px; height: 18px; }
.pw-btn:active { opacity: .7; }
.info-strip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 13.5px; color: var(--sub); line-height: 1.45; }
.info-strip svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; color: var(--accent); }

/* --------------------------------------------------------------- профиль */

.profile-head { display: flex; flex-direction: column; align-items: center; padding: 26px 0 8px; text-align: center; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; font-weight: 750; color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #7c3aed));
}
.profile-head h2 { margin: 12px 0 2px; font-size: 22px; }
.profile-head p { margin: 0; color: var(--hint); font-size: 14px; }
.check { color: var(--accent); }
.check svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------- таб-бар */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex;
  padding: 6px 6px calc(var(--safe-b) + 6px); height: calc(var(--tabbar-h) + var(--safe-b));
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px); border-top: 1px solid var(--sep);
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--hint); font-size: 11px; font-weight: 600; position: relative; border-radius: 12px;
}
.tabbar button svg { width: 25px; height: 25px; transition: transform .15s; }
.tabbar button.on { color: var(--accent); }
.tabbar button.on svg { transform: translateY(-1px); }
.tabbar button .badge { position: absolute; top: 2px; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 11px; }

/* ----------------------------------------------------------------- тосты */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: rgba(20, 22, 28, .92); color: #fff; padding: 11px 16px; border-radius: 14px; font-size: 14.5px;
  max-width: calc(100% - 32px); text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.gate { text-align: center; padding: 70px 26px; }
.gate .art { width: 88px; height: 88px; border-radius: 28px; margin: 0 auto 18px; display: grid; place-items: center;
  background: var(--soft); color: var(--accent); }
.gate .art svg { width: 44px; height: 44px; }
.gate h2 { margin: 0 0 8px; }
.gate p { color: var(--sub); line-height: 1.5; margin: 0 0 22px; }

/* В тёмной теме «карточка» почти сливается с подложкой — выбранный пункт светлее */
:root[data-theme="dark"] .segmented button.on { background: color-mix(in srgb, var(--hint) 30%, var(--card)); box-shadow: none; }
