/* PFM24 · Личный кабинет арендатора — визуальный слой.
   Палитра, шрифт и отступы сняты с экранов ЛК (PFM24 Tenant — экраны ЛК.pdf):
   глубокий навy #10275D, синий акцент #2650B6, фон #F2F3F7,
   Golos Text, карточки радиусом 14, поля 16. */

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/golos-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/golos-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/golos-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/golos-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/golos-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/golos-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --navy: #10275d;
  --navy-700: #0c1e49;
  --blue: #2650b6;
  --blue-soft: #e9effb;
  --green: #10275d;        /* исторический алиас: герой и бренд */
  --green-600: #1b3576;
  --green-100: #e9effb;
  --bg: #f2f3f7;
  --card: #ffffff;
  --line: #e4e7ef;
  --ink: #1d232b;
  --muted: #697692;
  --sage: #e9effb;
  --sand: #fbf4e7;
  --amber: #b08e66;
  --danger: #a2533c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 39, 93, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #e9ebf2;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid #dde1ec; border-radius: 12px;
  background: #fff; padding: 13px 14px; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: #6a86c9; box-shadow: 0 0 0 3px rgba(106, 147, 130, 0.14); }
textarea { resize: vertical; min-height: 96px; }
:focus-visible { outline: 3px solid #a9b9e0; outline-offset: 2px; }

/* ─── каркас ─── */
.shell {
  max-width: 480px; margin: 0 auto; min-height: 100dvh;
  background: var(--bg); position: relative;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(30, 60, 50, 0.08);
}
@media (min-width: 900px) { .shell { margin: 24px auto; min-height: calc(100dvh - 48px); border-radius: 26px; overflow: hidden; } }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px;
  background: linear-gradient(var(--bg) 70%, rgba(246, 247, 244, 0));
  backdrop-filter: blur(6px);
}
.topbar .who { flex: 1; min-width: 0; }
.topbar .who b { display: block; font-size: 13px; font-weight: 600; }
.topbar .who span { display: block; font-size: 11px; color: var(--muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--green-100); color: #2f4a86;
}

.screen { flex: 1; padding: 4px 18px 110px; }
.screen.flush { padding-left: 0; padding-right: 0; }

/* ─── нижняя навигация ─── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%); z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-bottom));
}
.tabbar button {
  display: grid; justify-items: center; gap: 3px;
  font-size: 10px; color: #6f7c96; padding: 6px 0; border-radius: 12px;
}
.tabbar button .ico { font-size: 17px; line-height: 1; filter: grayscale(1); opacity: 0.65; }
.tabbar button.active { color: var(--blue); font-weight: 600; }
.tabbar button.active .ico { filter: none; opacity: 1; }

/* ─── шапка экрана ─── */
.page-head { padding: 10px 0 16px; }
.page-head h1 { font-size: 27px; line-height: 1.18; letter-spacing: -0.8px; margin: 0; font-weight: 600; }
.page-head p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: #7280a0; font-weight: 600; }

/* ─── карточки ─── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.card + .card { margin-top: 12px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; margin: 0; letter-spacing: -0.3px; font-weight: 600; }
.section-head .count { font-size: 12px; color: var(--muted); }
.section-head .link { margin-left: auto; font-size: 12px; color: var(--blue); font-weight: 500; }

/* ─── пропуск на главной ─── */
.pass-hero {
  position: relative; overflow: hidden; text-align: left;
  width: 100%; margin-top: 8px;
  background: radial-gradient(120% 140% at 100% 0%, #1b3a7d 0%, var(--navy) 58%, #0b1c44 100%);
  color: var(--blue-soft); border-radius: 20px; padding: 20px;
  box-shadow: 0 18px 36px rgba(16, 39, 93, 0.28);
}
.pass-hero .row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b8c6e4; }
.pass-hero strong { display: block; margin-top: 14px; font-size: 20px; letter-spacing: 2.5px; font-weight: 500; }
.pass-hero small { display: block; margin-top: 8px; font-size: 11px; color: #aab9dd; }
.pass-hero .ring {
  position: absolute; right: -46px; bottom: -46px; width: 150px; height: 150px;
  border: 1px solid rgba(165, 198, 172, 0.28); border-radius: 50%;
  box-shadow: 0 0 0 16px rgba(165, 198, 172, 0.1), 0 0 0 32px rgba(165, 198, 172, 0.06);
}
.pass-hero:active { transform: scale(0.995); }

/* ─── быстрые действия ─── */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.quick button:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* крупные действия на главной: на всю ширину и чуть выше остальных */
.quick button.wide { grid-column: 1 / -1; padding: 17px 16px; font-size: 14.5px; }
.quick button.wide span.ico { font-size: 20px; }
.quick button {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; font-size: 13px; font-weight: 500; text-align: left;
}
.quick button span.ico { font-size: 18px; }
.quick button:active { background: var(--blue-soft); }

/* ─── список заявок ─── */
.tickets { display: grid; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.thead { display: none; }
.ticket-row {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 15px 16px; border-bottom: 1px solid var(--line);
}
.ticket-row .t-emoji { font-size: 16px; line-height: 1.2; flex: none; width: 20px; text-align: center; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:active { background: #f5f7fc; }
.ticket-row .body { flex: 1; min-width: 0; }
.ticket-row .num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket-row h3 { margin: 3px 0 0; font-size: 14px; font-weight: 550; line-height: 1.35; }
.ticket-row .meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.ticket-row .side { display: grid; gap: 6px; justify-items: end; flex: none; }
.ticket-row .side time { font-size: 10px; color: var(--muted); white-space: nowrap; }

/* акции УК: баннер над пропуском */
.promo { margin-bottom: 12px; }
.promo-card {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  border-radius: 16px; overflow: hidden; position: relative; text-align: left;
}
.promo-card img { display: block; width: 100%; height: auto; border-radius: 16px; }
.promo-skeleton { display: block; height: 120px; border-radius: 16px; background: #eef1f7; }
.promo-close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(18, 28, 40, 0.55); color: #fff;
  display: grid; place-items: center; font-size: 12px; line-height: 1;
  padding: 0; backdrop-filter: blur(2px);
}
.promo-close:active { background: rgba(18, 28, 40, 0.75); }
.promo-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; gap: 5px; justify-content: center; pointer-events: none;
}
.promo-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.55); }
.promo-dots i.on { background: #fff; }

/* строка заявки на главной: текст — кнопка, справа закрепление */
.ticket-row.home-row .body {
  background: none; border: 0; padding: 0; margin: 0; text-align: left;
  font: inherit; color: inherit; cursor: pointer; min-width: 0; flex: 1;
}
.ticket-row .preview {
  margin: 5px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ticket-row.home-row.pinned { background: #fbfcfe; }
.ticket-row .pin {
  background: none; border: 0; padding: 2px; cursor: pointer; color: #c3cad8;
  align-self: start; justify-self: end; border-radius: 6px;
}
.ticket-row .pin:hover { color: var(--blue); background: var(--blue-soft); }
.ticket-row .pin.on { color: var(--blue); }

/* ─── бейджи статусов ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 500; padding: 4px 8px; border-radius: 6px;
  background: #eef1f8; color: #6f7c96; white-space: nowrap;
  letter-spacing: 0.1px;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.ok { background: #e7f0ea; color: #2f6a4f; }
.badge.active { background: var(--blue-soft); color: var(--blue); }
.badge.warn { background: #fbf4e7; color: #8a6a2f; }
.badge.danger { background: #fbeae5; color: #9c5340; }
.badge.info { background: #edf0fa; color: #5d6a85; }
.badge.muted { background: #eef1f8; color: #6f7c96; }

/* ─── пустые состояния ─── */
.empty { text-align: center; padding: 34px 20px; }
.empty .ico { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.8; }
.empty h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty p { margin: 0; font-size: 12px; color: var(--muted); }

/* ─── кнопки ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid #dde1ec; background: #fff; font-size: 14px; font-weight: 550;
  color: #2b3f6b; width: 100%;
}
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:active { background: #1e43a0; }
.btn.ghost { border-color: transparent; background: transparent; color: #3d5688; }
.btn.danger { color: var(--danger); border-color: #e7cfc8; background: #fff8f6; }
.btn:disabled { opacity: 0.5; }
.btn.small { min-height: 36px; font-size: 12px; padding: 0 12px; width: auto; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }

/* ─── вход ─── */
.login { padding: 40px 22px; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
/* экран блокировки: всё по центру — логотип, заголовок и пояснение */
.login.lock { text-align: center; }
.login.lock .lead { max-width: 36ch; margin-left: auto; margin-right: auto; }
.login.lock .hint { text-align: center; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.brand .mark {
  width: 48px; height: 48px; border-radius: 14px; background: var(--green);
  color: #dbe4f7; display: grid; place-items: center; font-size: 17px; font-weight: 700; letter-spacing: -0.5px;
}
.brand b { display: block; font-size: 16px; font-weight: 650; }
.brand span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.3px; }
.login h1 { font-size: 26px; letter-spacing: -0.8px; margin: 0 0 8px; }
.login p.lead { font-size: 13px; color: var(--muted); margin: 0 0 26px; }
.login label { display: block; font-size: 12px; font-weight: 550; color: #4f5f7f; margin: 16px 0 6px; }
.code-input { letter-spacing: 8px; font-size: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--muted); margin-top: 14px; }
.hint b { color: var(--green); font-size: 14px; letter-spacing: 2px; }
.error { color: var(--danger); font-size: 13px; margin-top: 12px; }

/* ─── карточка заявки ─── */
.detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.back { font-size: 18px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); }
.detail-head .num { font-size: 12px; color: var(--muted); }
.detail h1 { font-size: 22px; line-height: 1.28; letter-spacing: -0.5px; margin: 0 0 12px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin: 16px 0; }
.facts div { background: #f7f9fd; padding: 12px 14px; }
.facts span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.facts strong { font-size: 13px; font-weight: 550; }
.prose { font-size: 14px; white-space: pre-wrap; margin: 0; }

.timeline { list-style: none; margin: 18px 0 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 1px; background: #dfe5f2; }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 11px; height: 11px; border-radius: 50%; background: #ccd8f0; border: 2px solid #fff; box-shadow: 0 0 0 1px #d8e1f4; flex: none; margin-top: 5px; }
.timeline .txt { flex: 1; }
.timeline .txt b { display: block; font-size: 13px; font-weight: 550; }
.timeline .txt time { font-size: 10px; color: var(--muted); }
.timeline .txt p { margin: 6px 0 0; font-size: 13px; white-space: pre-wrap; }
.timeline .msg { background: #f4f6fc; border: 1px solid #e3e9f6; border-radius: 12px; padding: 12px; }

.composer { display: flex; gap: 8px; margin-top: 16px; align-items: flex-end; }
.composer input, .composer textarea { flex: 1; }
.composer textarea {
  resize: none; overflow-y: auto; font: inherit; line-height: 21px;
  /* по умолчанию — три строки, дальше растёт до пяти */
  min-height: 77px; max-height: 120px; padding: 11px 12px;
}
.composer button { width: 48px; min-height: 48px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 17px; }

.stars { display: flex; gap: 6px; margin: 12px 0; }
.stars button { font-size: 26px; line-height: 1; filter: grayscale(1); opacity: 0.4; }
.stars button.on { filter: none; opacity: 1; }

/* ─── новая заявка ─── */
.steps { display: flex; gap: 8px; margin: 4px 0 20px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: #e2e8f5; }
.steps span.on { background: #8ba4d6; }
.choice-grid { display: grid; gap: 8px; }
.choice-grid button {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: #fff;
}
.choice-grid button .ico { font-size: 19px; }
.choice-grid button b { display: block; font-size: 14px; font-weight: 550; }
.choice-grid button small { display: block; font-size: 11px; color: var(--muted); }
.choice-grid button.on { border-color: #8ba4d6; background: var(--blue-soft); }
.choice-grid button:disabled { opacity: 0.5; cursor: not-allowed; }
.choice-grid button:disabled small { color: #9a6a5e; }

/* ─── новая заявка: группы видов обращения ─── */
.sv-group { margin-bottom: 18px; }
.sv-group:last-child { margin-bottom: 0; }
.sv-group-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 2px 8px;
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.sv-group-head .sv-emoji { font-size: 13px; letter-spacing: 0; line-height: 1; }
.sv-group-head i {
  margin-left: auto; font-style: normal; font-weight: 500;
  font-size: 10px; letter-spacing: 0; padding: 1px 7px;
  border-radius: 999px; background: #eceff4; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ─── пропуска ─── */
.wallet { display: grid; gap: 12px; }
.wallet .pass {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
}
.wallet .pass .qr { width: 62px; height: 62px; border-radius: 10px; background: #fff; border: 1px solid var(--line); flex: none; padding: 5px; }
.wallet .pass .qr svg { display: block; width: 100%; height: 100%; }
.wallet .pass b { display: block; font-size: 14px; font-weight: 600; }
.wallet .pass small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.wallet .pass .code { font-size: 12px; letter-spacing: 1.6px; color: #45557a; margin-top: 6px; font-variant-numeric: tabular-nums; }

.passsheet {
  position: fixed; inset: 0; z-index: 60; background: #0b1c44;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  text-align: center; color: #edf1fb;
  transition: transform .18s ease;
  overscroll-behavior: contain;
}
.passsheet .big-qr { background: #fff; padding: 16px; border-radius: 18px; }
.passsheet .big-qr svg { display: block; width: min(68vw, 260px); height: min(68vw, 260px); }
.passsheet b { display: block; margin-top: 22px; font-size: 17px; font-weight: 600; }
.passsheet .code { font-size: 22px; letter-spacing: 4px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.passsheet small { color: #a9b8dd; font-size: 12px; margin-top: 10px; display: block; max-width: 260px; }
.passsheet .close {
  position: absolute; right: 10px; top: calc(10px + env(safe-area-inset-top));
  width: 44px; height: 44px; display: grid; place-items: center;
  font-size: 20px; color: #ccd8f0; border-radius: 12px;
}
.passsheet .close:active { background: rgba(233, 239, 251, .12); }
.passsheet-close {
  margin-top: 18px; padding: 12px 28px; border-radius: 12px;
  border: 1px solid rgba(233, 239, 251, .35); background: transparent;
  color: #e9effb; font-size: 14px; font-weight: 600; font-family: inherit;
  min-width: 180px;
}
.passsheet-close:active { background: rgba(233, 239, 251, .12); }

/* ─── сообщения УК ─── */
.thread { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.thread li { display: flex; }
.thread li.me { justify-content: flex-end; }
.thread .bubble {
  max-width: 84%; padding: 12px 14px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.thread li.me .bubble {
  background: var(--navy); border-color: var(--navy); color: var(--blue-soft);
  border-bottom-left-radius: 16px; border-bottom-right-radius: 6px;
}
.thread .who { display: block; font-size: 10px; letter-spacing: 0.3px; color: var(--muted); margin-bottom: 4px; }
.thread li.me .who { color: #b8c6e4; }
.thread p { margin: 0; font-size: 14px; white-space: pre-wrap; }
.thread time { display: block; margin-top: 6px; font-size: 10px; color: #8b95a8; }
.thread li.me time { color: #a9b8dd; }
.chat .composer { position: sticky; bottom: calc(78px + var(--safe-bottom)); background: linear-gradient(var(--bg) 60%, rgba(246, 247, 244, 0.9)); padding: 10px 0 6px; }

/* ─── прочее ─── */
.rows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rows > div, .rows > button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.rows > :last-child { border-bottom: 0; }
.rows .k { color: var(--muted); font-size: 13px; }
.rows .v { margin-left: auto; font-size: 13px; font-weight: 500; text-align: right; }

.offline-bar {
  display: flex; align-items: center; gap: 8px;
  background: #f8f1de; color: #7d6733; font-size: 12px;
  padding: 9px 18px; border-bottom: 1px solid #efe3c4;
}

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: var(--navy); color: #eaf0fb; padding: 12px 16px; border-radius: 12px;
  font-size: 13px; z-index: 80; max-width: 340px; text-align: center;
  box-shadow: 0 12px 30px rgba(20, 45, 38, 0.3);
  animation: pop 0.16s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

.skeleton { background: linear-gradient(90deg, #eceff8 25%, #f5f7fc 37%, #eceff8 63%); background-size: 400% 100%; animation: sk 1.2s infinite; border-radius: 10px; height: 14px; }
@keyframes sk { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

.footnote { font-size: 11px; color: #8b95a8; text-align: center; padding: 22px 10px 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ─── ритм и типографика по экранам ЛК (PDF) ─────────────────────────────
   В референсе плотная сетка: карточки 14, поля 16, заголовок экрана 24,
   строка списка 13.5, подписи 10–11. Переопределяем точечно, чтобы не
   тащить правки по всем правилам выше. */
body { font-size: 14px; line-height: 1.45; }
.shell { max-width: 430px; box-shadow: none; border-radius: 0; }
@media (min-width: 900px) {
  .shell { margin: 20px auto; min-height: calc(100dvh - 40px); border-radius: 22px; box-shadow: 0 30px 80px rgba(16, 39, 93, 0.12); }
}
.topbar { padding: 12px 16px 8px; }
.topbar .who b { font-size: 12.5px; }
.topbar .who span { font-size: 10.5px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; background: var(--blue-soft); color: var(--blue); }

.screen { padding: 2px 16px 104px; }
.page-head { padding: 8px 0 12px; }
.page-head h1 { font-size: 24px; letter-spacing: -0.7px; line-height: 1.2; font-weight: 600; }
.page-head p { margin-top: 6px; font-size: 12.5px; color: #697692; }
.eyebrow { font-size: 9.5px; letter-spacing: 1.2px; color: #7280a0; }

.card { border-radius: 14px; padding: 14px; }
.section { margin-top: 22px; }
.section-head { margin-bottom: 10px; }
.section-head h2 { font-size: 15px; letter-spacing: -0.2px; }
.section-head .count, .section-head .link { font-size: 11.5px; }
.section-head .link { color: var(--blue); }

.pass-hero { border-radius: 16px; padding: 16px; }
.pass-hero strong { font-size: 18px; letter-spacing: 2px; margin-top: 12px; }
.pass-hero small { font-size: 10.5px; }
.pass-hero .row { font-size: 11px; }

.quick { gap: 8px; margin-top: 12px; }
.quick button { border-radius: 12px; padding: 12px; font-size: 12.5px; gap: 8px; }
.quick button span.ico { font-size: 16px; }

.tickets { border-radius: 14px; }
.ticket-row { padding: 13px 14px; gap: 10px; }
.ticket-row .num { font-size: 10.5px; }
.ticket-row h3 { font-size: 13.5px; margin-top: 2px; }
.ticket-row .meta { font-size: 10.5px; margin-top: 4px; }
.ticket-row .side time { font-size: 9.5px; }

.btn { min-height: 44px; border-radius: 10px; font-size: 13.5px; }
/* кнопка в работе: текст «Проверяем…» и лёгкая пульсация, чтобы нажатие
   было видно сразу, даже если сервер отвечает несколько секунд */
.btn.is-busy { opacity: .85; animation: busyPulse 1.1s ease-in-out infinite; }
@keyframes busyPulse { 0%, 100% { opacity: .85; } 50% { opacity: .55; } }
.choice-grid button.is-busy { opacity: .7; }
.btn.small { min-height: 32px; font-size: 11.5px; }
.btn-row { gap: 8px; margin-top: 12px; }

.detail h1 { font-size: 20px; letter-spacing: -0.4px; }
.detail-head { margin-bottom: 8px; }
.detail-head .num { font-size: 11px; }
.facts { margin: 14px 0; border-radius: 12px; }
.facts div { padding: 10px 12px; }
.facts span { font-size: 9.5px; }
.facts strong { font-size: 12.5px; }
.prose { font-size: 13px; line-height: 1.55; }
.timeline li { padding-bottom: 14px; gap: 10px; }
.timeline .txt b { font-size: 12.5px; }
.timeline .txt p { font-size: 12.5px; margin-top: 5px; }
.timeline .msg { border-radius: 10px; padding: 10px; background: #f5f7fc; border-color: #e4e7ef; }

.choice-grid { gap: 7px; }
.choice-grid button { padding: 12px; border-radius: 12px; gap: 10px; }
.choice-grid button b { font-size: 13px; }
.choice-grid button small { font-size: 10.5px; }
.choice-grid button .ico { font-size: 17px; }

.steps { margin: 2px 0 16px; }
.steps span { height: 3px; background: #e4e7ef; }
.steps span.on { background: var(--blue); }

.wallet { gap: 10px; }
.wallet .pass { padding: 13px; border-radius: 14px; gap: 12px; }
.wallet .pass b { font-size: 13px; }
.wallet .pass small { font-size: 10.5px; }
.wallet .pass .code { font-size: 11.5px; letter-spacing: 1.4px; }

.rows { border-radius: 14px; }
.rows > div, .rows > button { padding: 13px 14px; font-size: 13px; }
.rows .k { font-size: 12px; }
.rows .v { font-size: 12.5px; }

.tabbar { padding: 4px 2px calc(4px + var(--safe-bottom)); border-top-color: #e4e7ef; }
.tabbar button { font-size: 9.5px; gap: 2px; padding: 6px 0; border-radius: 10px; }
.tabbar button .ico { font-size: 16px; }

.login { padding: 34px 20px; }
.brand { margin-bottom: 28px; gap: 10px; }
.brand-logo { display: block; height: 30px; width: auto; max-width: 170px; object-fit: contain; }
.brand .mark { width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: var(--blue-soft); font-size: 15px; }
.brand b { font-size: 15px; }
.brand span { font-size: 10.5px; }
.login h1 { font-size: 23px; letter-spacing: -0.6px; margin-bottom: 6px; }
.login p.lead { font-size: 12.5px; margin-bottom: 20px; line-height: 1.5; }
.login label { font-size: 11.5px; margin: 14px 0 5px; color: #4f5f7f; }
.hint { font-size: 11.5px; color: #697692; line-height: 1.45; }
.error { font-size: 12px; }
input, textarea, select { padding: 11px 12px; border-radius: 10px; font-size: 13.5px; }
.code-input { font-size: 20px; letter-spacing: 7px; }

.thread { gap: 8px; }
.thread .bubble { padding: 10px 12px; border-radius: 14px; }
.thread p { font-size: 13px; }
.thread .who { font-size: 9.5px; }
.thread time { font-size: 9.5px; }
.composer input { padding: 11px 12px; }
.composer button { width: 44px; min-height: 44px; border-radius: 10px; }

.toast { border-radius: 10px; font-size: 12.5px; }
.footnote { font-size: 10.5px; color: #8b95a8; }

/* ─── иконки-плитки в стиле экранов ЛК ─── */
.quick button span.ico {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 0;
}
.tabbar button { color: #8b95a8; }
.tabbar button .ico { font-size: 0; filter: none; opacity: 1; display: grid; place-items: center; }
.tabbar button.active .ico { filter: none; opacity: 1; }
.tabbar button.active { color: var(--blue); }
.pass-hero .row svg { width: 14px; height: 14px; }
.pass-hero .row { gap: 6px; }

/* ─── уведомления ─── */
.bell {
  position: relative; width: 34px; height: 34px; flex: none;
  display: grid; place-items: center; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); color: #4f5f7f;
}
.bell i {
  position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px;
  border-radius: 8px; background: var(--blue); color: #fff;
  font-size: 9px; font-style: normal; font-weight: 600;
  display: grid; place-items: center; padding: 0 4px;
}
.notices > .notice-row { display: block; padding: 0; }
.notice-main {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 15px 16px; background: none; border: 0; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
}
.notice-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  padding: 0 16px 13px;
}
.notice-actions .doc-link {
  font-size: 12px; color: var(--blue); background: none; border: 0;
  padding: 0; text-decoration: underline; cursor: pointer; text-align: left;
}
.notice-actions .link { font-size: 12px; }

/* непрочитанное — белая карточка с цветной полосой, прочитанное — приглушено */
.notices > .notice-row.unread { background: var(--card); }
.notices > .notice-row.unread .notice-body b { font-weight: 700; }
.notices > .notice-row.read { background: var(--bg); }
.notices > .notice-row.read .notice-body b { font-weight: 500; color: var(--muted); }
.notices > .notice-row.read .notice-body small { color: #9aa3b4; }
.notices > .notice-row.read .notice-ico { opacity: .55; }

.notice-group { margin-bottom: 16px; }
.notice-group:last-child { margin-bottom: 0; }
.notice-group-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 2px 8px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.notice-group-head i {
  font-style: normal; font-size: 10px; letter-spacing: 0;
  padding: 1px 7px; border-radius: 999px; background: #eceff4; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.notice-group-head.fresh { color: var(--ink); }
.notice-group-head.fresh::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue); flex: none;
}
.notice-group-head.fresh i { background: var(--blue); color: #fff; }
.notice-ico {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: var(--blue-soft); color: var(--blue); display: grid; place-items: center;
}
.notice-body { flex: 1; min-width: 0; text-align: left; }
.notice-body b { display: block; font-size: 12.5px; font-weight: 600; }
.notice-body small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.notice-side { display: grid; justify-items: end; gap: 5px; flex: none; }
.notice-side time { font-size: 9.5px; color: #8b95a8; white-space: nowrap; }
.dot-warn { width: 7px; height: 7px; border-radius: 50%; background: #b08e66; }
.dot-new { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }

/* левый верхний угол — ссылка на главный экран */
.topbar .home-link {
  display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
  text-align: left; padding: 0; border-radius: 10px;
}
.topbar .home-link:active { opacity: 0.7; }
.topbar .home-link .avatar { display: grid; }
.topbar .who { display: block; }

.tabbar button { position: relative; }
.tab-dot {
  display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
}
.tabbar .tab-dot {
  position: absolute; top: 2px; right: 50%; margin-right: -16px;
}

/* ─── динамические поля заявки ─── */
.field-block { margin-top: 14px; }
.fl { display: block; font-size: 11.5px; font-weight: 550; color: #4f5f7f; margin-bottom: 5px; }
.trow { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 8px; position: relative; }
.trow .tcell span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.trow .row-del { position: absolute; top: 6px; right: 8px; font-size: 12px; color: #9c5340; }
.row-add { width: 100%; border: 1px dashed #c7d1e6; border-radius: 10px; padding: 9px; font-size: 12px; color: var(--blue); background: #f7f9fd; }

/* ─── сводка заявки ─── */
.sum { margin: 10px 0 0; }
.sum-line { display: flex; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sum-line:last-child { border-bottom: 0; }
.sum-block { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sum-block .k { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.sum-row { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; padding: 4px 0; }
.sum-row span { color: var(--muted); }
.sum-row b { color: var(--ink); font-weight: 550; }

/* ─── файлы в чате ─── */
.attach-box { margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.attach-head { font-size: 10.5px; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.attach-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.attach-row + .attach-row { border-top: 1px solid #f0f3f9; }
.attach-row .file-ico { font-size: 15px; }
.attach-row .file-meta { flex: 1; min-width: 0; }
.attach-row b { display: block; font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-row small { display: block; font-size: 10px; color: var(--muted); }
.attach-row button { font-size: 12px; color: #9c5340; padding: 4px 6px; }
.composer .clip { width: 38px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 15px; }
.msg-img { display: block; margin-top: 8px; border-radius: 10px; overflow: hidden; background: var(--blue-soft); max-width: 220px; }
.msg-img img { display: block; width: 100%; height: auto; }
.img-stub { display: block; padding: 18px 12px; font-size: 11px; color: #4f5f7f; text-align: center; }
.msg-file { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #f2f5fd; text-align: left; max-width: 240px; }
.thread li.me .msg-file { background: rgba(255,255,255,.12); }
.msg-file .file-ico { font-size: 16px; }
.msg-file b { display: block; font-size: 11.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.msg-file small { display: block; font-size: 10px; color: var(--muted); }
.thread li.me .msg-file small { color: #b8c6e4; }

/* ═════════════════════════ ПК-версия ═════════════════════════
   До 1023px — прежний мобильный кабинет с нижней навигацией.
   От 1024px — сайдбар, широкие списки и таблицы, без «телефонной» рамки. */

.sidebar { display: none; }

@media (min-width: 1024px) {
  body { background: #eef0f5; }

  .shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    max-width: none;
    margin: 0;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg);
  }

  .tabbar { display: none; }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 14px 18px;
    background: #fff;
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100dvh;
  }

  .side-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 14px; text-align: left;
  }
  .side-brand .mark {
    width: 38px; height: 38px; border-radius: 11px; background: var(--navy);
    color: var(--blue-soft); display: grid; place-items: center; font-weight: 700; font-size: 14px;
  }
  .side-brand b { display: block; font-size: 15px; }
  .side-brand small { display: block; font-size: 10.5px; color: var(--muted); }

  .side-org {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 12px; background: #f7f9fd;
  }
  .side-org b { display: block; font-size: 12px; font-weight: 600; }
  .side-org small { display: block; font-size: 10.5px; color: var(--muted); }

  .side-nav { display: grid; gap: 2px; margin-top: 4px; }
  .side-nav button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px; font-size: 13px; color: #4f5f7f; text-align: left;
  }
  .side-nav button .ico { display: grid; place-items: center; color: #6f7c96; }
  .side-nav button:hover { background: #f4f6fb; }
  .side-nav button.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
  .side-nav button.active .ico { color: var(--blue); }
  .side-nav .tab-dot { position: static; margin-left: auto; }

  .side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
  .side-foot button {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px; font-size: 12.5px; color: #4f5f7f;
  }
  .side-foot button:hover { background: #f4f6fb; }
  .side-badge {
    margin-left: auto; background: var(--blue); color: #fff; font-size: 9.5px; font-style: normal;
    min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
  }

  .content { display: flex; flex-direction: column; min-width: 0; }
  .topbar { padding: 16px 32px 12px; }
  .topbar .who b { font-size: 13.5px; }
  .topbar .who span { font-size: 11.5px; }
  .bell { width: 38px; height: 38px; }

  .screen { padding: 8px 32px 48px; width: 100%; max-width: 1120px; margin: 0 auto; }
  .page-head { padding: 12px 0 18px; }
  .page-head h1 { font-size: 30px; letter-spacing: -1px; }
  .page-head p { font-size: 13.5px; }

  /* главная: заявки слева, пропуск и быстрые действия справа */
  .home-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
  .home-col-main { grid-column: 1; grid-row: 1; min-width: 0; }
  .home-col-side { grid-column: 2; grid-row: 1; display: grid; gap: 12px; }
  .home-grid .section { margin-top: 0; }
  .home-col-side .pass-hero, .home-col-side .card { margin: 0; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .quick button { padding: 16px; font-size: 13.5px; }
  .pass-hero { padding: 24px; }
  .pass-hero strong { font-size: 22px; }

  /* заявки: таблица */
  .tickets { border-radius: 16px; }
  .thead {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 140px 100px;
    gap: 14px; padding: 12px 18px; font-size: 10.5px; letter-spacing: .4px;
    text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: #fbfcfe;
  }
  .ticket-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 140px 100px;
    gap: 14px; align-items: start; padding: 14px 18px;
  }
  .ticket-row:hover { background: #f7f9fd; }
  /* статус и дата — отдельные колонки, тело строки — одна */
  .ticket-row .side { display: contents; }
  .ticket-row .body { display: block; }
  /* на главной строка — карточка: текст, автор и превью остаются одной кнопкой */
  .ticket-row.home-row { grid-template-columns: 24px minmax(0, 1fr) auto auto 26px; align-items: start; }
  .ticket-row.home-row .body { display: block; }
  .ticket-row.home-row .side { display: grid; }
  .ticket-row.home-row .meta { display: block; }
  .ticket-row.home-row .badge { justify-self: end; }
  .ticket-row .t-emoji { width: auto; font-size: 15px; }
  .ticket-row .num { font-size: 11.5px; color: var(--muted); }
  .ticket-row h3 { margin: 3px 0 0; font-size: 14px; }
  .ticket-row .meta { display: block; margin-top: 5px; font-size: 11.5px; }
  .ticket-row .side time { font-size: 11px; white-space: nowrap; text-align: right; }
  .ticket-row .badge { justify-self: start; }

  /* заявка: шире, факты в две колонки */
  .detail { max-width: 900px; margin: 0 auto; }
  .detail h1 { font-size: 26px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .timeline .txt p { font-size: 13px; }

  /* пропуска: сетка карточек */
  .wallet { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .wallet .pass { padding: 16px; }
  .wallet .pass:hover { border-color: #c7d1e6; }

  /* новый пропуск / заявка: форма по центру */
  .screen form[data-act="new-step2"] { max-width: 760px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* чат: панель по центру, композер у нижнего края */
  .chat { max-width: 860px; margin: 0 auto; }
  .thread .bubble { max-width: 72%; }
  .chat .composer { position: sticky; bottom: 12px; }

  /* логин: карточка по центру экрана */
  .login { max-width: 460px; margin: 0 auto; min-height: 100dvh; }

  /* полноэкранный пропуск превращается в модальное окно */
  .passsheet { background: rgba(16, 39, 93, .55); backdrop-filter: blur(4px); }
  .passsheet .big-qr { padding: 20px; border-radius: 20px; box-shadow: 0 30px 80px rgba(11, 28, 68, .45); }
}

@media (min-width: 1440px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
}

/* ═════════════════════════ приведение к одному языку ═════════════════════════
   Направление: кабинет арендатора в деловом центре. Спокойный, деловой,
   чуть бумажный: как пропускной бланк на ресепшене. Нейтрали — тёплый
   графит, акцент — глубокий синий из фирменных экранов ЛК.
   Богатство — в одном месте: карточка пропуска как настоящий бланк.
   Подпись продукта — перфорация и «штамп» срока на пропуске. */

:root {
  --ink: #1b2430;
  --muted: #66707c;
  --line: rgba(27, 36, 48, 0.1);
  --bg: #f3f4f6;
  --card: #ffffff;
  --navy: #10275d;
  --blue: #2650b6;
  --r-control: 8px;
  --r-card: 12px;
  --r-panel: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 45, 0.05);
}

body { background: var(--bg); color: var(--ink); }

/* типографика: два веса, спокойные размеры, без трекинга на мелочи */
.eyebrow {
  font-size: 12px; letter-spacing: 0; text-transform: none;
  color: var(--muted); font-weight: 400;
}
.page-head h1 { font-size: 26px; letter-spacing: -0.6px; font-weight: 600; }
.page-head p { font-size: 13px; color: var(--muted); }
.section-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.1px; }
.section-head .count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.section-head .link { font-size: 12px; font-weight: 500; color: var(--blue); }

/* поверхности: одинаковая тихая граница, малая тень */
.card, .rows, .tickets, .wallet .pass, .attach-box {
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  box-shadow: none;
}
.card { padding: 20px; }
.card + .card { margin-top: 12px; }

/* кнопки: 8px, без «пилюль» и объёма */
.btn { border-radius: var(--r-control); min-height: 40px; font-weight: 500; font-size: 13.5px; }
.btn.primary { background: var(--navy); border-color: var(--navy); }
.btn.primary:active { background: #0b1c44; }
.btn.small { min-height: 32px; font-size: 12px; }
.quick button {
  border-radius: var(--r-card); border: 1px solid var(--line);
  background: #fff; padding: 14px 16px; font-weight: 500; font-size: 13px;
  gap: 12px;
}
.quick button span.ico {
  width: auto; height: auto; background: none; color: var(--muted);
  display: grid; place-items: center;
}
.quick button:hover { border-color: rgba(27, 36, 48, 0.2); }

/* статусы: точка + текст, без капсулы */
.badge {
  background: none !important; padding: 0; border-radius: 0;
  font-size: 12px; gap: 6px; color: var(--muted); font-weight: 500;
}
.badge::before { width: 6px; height: 6px; }
.badge.ok { color: #2f6a4f; }
.badge.active { color: var(--blue); }
.badge.warn { color: #8a6a2f; }
.badge.danger { color: #9c5340; }
.badge.info, .badge.muted { color: var(--muted); }

/* пропуск: настоящий бланк, а не градиентная открытка */
.pass-card {
  position: relative; display: block; width: 100%; text-align: left;
  background: var(--navy); color: #eef2f9;
  border-radius: var(--r-panel); padding: 20px 20px 16px;
  border: 0; box-shadow: none; overflow: hidden;
  transition: background-color 160ms ease;
}
.pass-card:hover { background: #0d2050; }
.pass-card .pass-notch {
  position: absolute; right: -10px; top: 50%; width: 20px; height: 20px;
  margin-top: -10px; border-radius: 50%; background: var(--bg);
}
.pass-card .pass-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 11.5px; color: #a9b8dd;
}
.pass-card .pass-kind { color: #c9d6ef; }
.pass-card .pass-holder { display: block; margin-top: 14px; font-size: 14px; font-weight: 500; }
.pass-card .pass-num {
  display: block; margin-top: 6px; padding-top: 12px;
  border-top: 1px dashed rgba(201, 214, 239, 0.28);
  font-size: 21px; letter-spacing: 2px; font-variant-numeric: tabular-nums; color: #fff;
}
.pass-card .pass-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; font-size: 11.5px; color: #a9b8dd;
}
.pass-card .pass-open { color: #c9d6ef; display: grid; place-items: center; }

/* строки заявок: спокойные, без «карточек в карточке» */
.tickets { background: var(--card); }
.ticket-row { padding: 14px 16px; }
.ticket-row h3 { font-size: 13.5px; font-weight: 500; letter-spacing: 0; }
.ticket-row .num, .ticket-row .side time { font-variant-numeric: tabular-nums; }
.ticket-row .num { color: var(--muted); }
.ticket-row:hover, .ticket-row:active { background: #f7f8fa; }
.tickets .thead { background: #fbfbfc; letter-spacing: 0; text-transform: none; font-size: 11px; }

/* формы и поля */
input, textarea, select { border-radius: var(--r-control); border-color: rgba(27, 36, 48, 0.14); }
.fl { font-size: 12px; font-weight: 500; color: var(--muted); }

/* вложения */
.attach-box { padding: 14px 16px; }
.attach-head { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.attach-row .file-ico, .msg-file .file-ico { color: var(--muted); display: grid; place-items: center; }

/* чат */
.composer button { background: var(--navy); border-radius: var(--r-control); }
.composer .clip { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: var(--r-control); }
.thread .bubble { border-radius: 12px; border-color: var(--line); }
.thread li.me .bubble { background: var(--navy); border-color: var(--navy); }

/* пустые состояния: иконка-линия, а не эмодзи */
.empty .ico { font-size: 0; color: #9aa3b0; margin-bottom: 12px; }
.empty h3 { font-size: 14px; font-weight: 500; }

/* уведомления */
.notice-ico { background: #f1f3f7; color: var(--muted); border-radius: 8px; }


/* нижняя навигация и сайдбар: одинаковый ритм 4px */
.tabbar button { font-size: 10px; }
.tabbar button.active { color: var(--navy); }
.tabbar .tab-dot { background: var(--blue); }

@media (min-width: 1024px) {
  .sidebar { padding: 24px 16px; }
  .side-nav button, .side-foot button { padding: 8px 12px; border-radius: var(--r-control); font-size: 13px; }
  .side-nav button.active { background: #eef1f7; color: var(--navy); font-weight: 500; }
  .side-nav button.active .ico { color: var(--navy); }
  .side-org { background: #f7f8fa; border-radius: var(--r-card); }
  .page-head h1 { font-size: 30px; }
  .card { padding: 24px; }
  .screen { padding: 8px 32px 48px; }
  .ticket-row { padding: 16px 20px; }
  .tickets .thead { padding: 12px 20px; }
  .pass-card { padding: 24px 24px 20px; }
}

/* экран входа, заставка и карточка бренда: без сайдбара и сетки приложения */
.shell.auth, .shell.bare { display: block; }
@media (min-width: 1024px) {
  .shell.auth, .shell.bare { display: block; max-width: none; background: var(--bg); }
  .shell.auth .login { max-width: 460px; margin: 0 auto; min-height: 100dvh; }
  .shell.bare .splash, .shell.bare .brand-intro { min-height: 100dvh; }
}

/* быстрые действия: в узкой боковой колонке — строками, без сжатых плиток */
@media (min-width: 1024px) {
  .home-col-side .quick { grid-template-columns: 1fr; gap: 8px; }
  .home-col-side .quick button { justify-content: flex-start; padding: 12px 14px; white-space: nowrap; }
}

/* сообщение и его вложения — один блок */
.timeline .msg p { margin: 0; }
.timeline .msg .msg-img, .timeline .msg .msg-file { margin-top: 8px; }
.timeline .msg .msg-file { background: #fff; border: 1px solid var(--line); }

/* на ПК страница прокручивается целиком, сайдбар держится сверху */
@media (min-width: 1024px) {
  .shell { overflow: visible; }
  .sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; overflow: auto; }
}

/* ─── база знаний ─── */
.kb-composer { margin: 0 0 16px; }
.kb-thread { margin-bottom: 18px; }
.thread .bubble.bot { max-width: 96%; }
.thread .bubble .muted { color: var(--muted); font-size: 11.5px; margin-top: 8px; }
.kb-hit + .kb-hit { margin-top: 12px; }
.kb-hit blockquote {
  margin: 0 0 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5;
  color: #22314f; background: #f4f7fc; border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
}
.kb-src {
  display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.kb-src .ico { color: var(--blue); flex: none; margin-top: 1px; }
.kb-src b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.kb-src small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.kb-hello { display: flex; gap: 12px; align-items: flex-start; }
.kb-hello .ico { color: var(--blue); flex: none; }
.kb-hello b { font-size: 14px; }
.kb-hello p { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.kb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.kb-chips button {
  font-size: 12px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: #33456b;
}
.kb-tree .kb-topic {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  margin-bottom: 8px; overflow: hidden;
}
.kb-topic > summary {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px;
  cursor: pointer; list-style: none; font-size: 13px; font-weight: 600;
}
.kb-topic > summary::-webkit-details-marker { display: none; }
.kb-topic > summary i { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.kb-topic > summary::after {
  content: ''; width: 7px; height: 7px; margin-left: 6px; flex: none;
  border-right: 1.5px solid #8c99b3; border-bottom: 1.5px solid #8c99b3;
  transform: rotate(45deg) translateY(-2px);
}
.kb-topic[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.kb-topic .kb-topic { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.kb-link {
  display: flex; gap: 8px; align-items: center; width: 100%; text-align: left;
  padding: 10px 14px; font-size: 12.5px; border-top: 1px solid #eef1f7; background: #fff;
}
.kb-link .ico { color: #7d8aa4; flex: none; }
.kb-empty { padding: 10px 14px; font-size: 12px; color: var(--muted); }

.kb-article .kb-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kb-bar button { font-size: 12.5px; color: var(--blue); }
.kb-pdf {
  margin-left: auto; display: inline-flex; gap: 6px; align-items: center;
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.kb-meta { margin: 6px 0 16px; font-size: 12px; color: var(--muted); }
.md { font-size: 14px; line-height: 1.62; color: #1d2942; }
.md h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; letter-spacing: -0.5px; }
.md h2 { margin: 22px 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.md h3, .md h4 { margin: 18px 0 6px; font-size: 15px; }
.md p { margin: 0 0 12px; }
.md ul, .md ol { margin: 0 0 12px; padding-left: 20px; }
.md li { margin: 4px 0; }
.md a { color: #2a4b93; text-decoration: underline; }
.md img {
  display: block; max-width: 100%; height: auto; margin: 8px 0;
  border-radius: 10px; border: 1px solid var(--line);
}
.md blockquote {
  margin: 0 0 12px; padding: 10px 14px; background: #f4f7fc;
  border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0;
}
.md code { background: #eef1f7; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.md pre { margin: 0 0 12px; padding: 12px; border-radius: 10px; background: #0f1b33; color: #e8eefb; overflow: auto; }
.md pre code { background: none; color: inherit; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.md-table { overflow-x: auto; margin: 0 0 14px; }
.md table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.md th { background: #f4f7fc; font-weight: 600; }
.kb-files { display: grid; gap: 8px; margin-top: 18px; }
.kb-files b { font-size: 12px; color: var(--muted); text-transform: none; }
.kb-files a {
  display: flex; gap: 8px; align-items: center; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px;
}
.kb-print-head, .kb-print-foot { display: none; }

@media print {
  @page { margin: 16mm 14mm; }
  html, body { background: #fff !important; }
  .sidebar, .tabbar, .topbar, .kb-bar, .offline-bar, .toast,
  .bell, .home-link, nav { display: none !important; }
  .shell { display: block !important; min-height: 0; }
  .content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .screen { padding: 0 !important; }
  .kb-print-head {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 9pt; color: #666; padding-bottom: 6px; margin-bottom: 14px;
    border-bottom: 1px solid #ddd;
  }
  .kb-print-foot {
    display: block; margin-top: 20px; padding-top: 6px; border-top: 1px solid #eee;
    font-size: 8.5pt; color: #777;
  }
  .kb-article h1 { font-size: 18pt; }
  .md { font-size: 11pt; color: #000; }
  .md a { color: #000; text-decoration: none; }
  .md a::after { content: ' (' attr(href) ')'; font-size: 8.5pt; color: #666; }
  .md img { max-width: 75%; page-break-inside: avoid; }
  .md h2, .md h3 { page-break-after: avoid; }
  .kb-files a { border-color: #ddd; }
  .kb-files a::after { content: ''; }
}

/* ─── выбор помещений в заявке ─── */
.fl-hint { font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.room-grid { display: grid; gap: 8px; margin-bottom: 4px; }
.room-opt {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.room-opt input[type="checkbox"] {
  width: 16px; height: 16px; min-height: 0; margin: 3px 0 0;
  accent-color: var(--blue); flex: none;
}
.room-opt b { display: block; font-size: 13px; font-weight: 600; }
.room-opt small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.room-opt:has(input:checked) { border-color: #8ba4d6; background: var(--blue-soft); }

/* ответ помощника по базе знаний */
.kb-answer { font-size: 14px; line-height: 1.55; margin-bottom: 8px; }

/* ─── арендуемые помещения с сводке профиля ─── */
.rooms { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.room-row { display: flex; gap: 12px; align-items: baseline; padding: 13px 16px; background: var(--card); }
.room-code { font-size: 14px; font-weight: 600; min-width: 64px; }
.room-meta { font-size: 12px; color: var(--muted); }

/* ─── оценка выполненной заявки ─── */
.rate-card { display: grid; gap: 10px; }
.rate-card .stars { margin: 2px 0 0; }
.rate-card .stars button { font-size: 30px; }
.rate-card #rate-comment { width: 100%; }
.rate-card .btn.primary { width: 100%; }
.rate-card .btn.primary[disabled] { opacity: 0.55; cursor: default; }
.rate-note { margin: 0; font-size: 11.5px; color: var(--muted); }
.rate-saved { margin: 0; font-size: 15px; letter-spacing: 2px; color: var(--amber); }
.rate-comment { margin: 0; font-size: 12.5px; color: var(--muted); }
.rate-card .link { justify-self: start; padding: 0; font-size: 12px; color: var(--blue); }
.rate-saved { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 22px; letter-spacing: 2px; color: var(--amber); }
.rate-saved span { font-size: 11.5px; letter-spacing: 0; color: var(--muted); }

/* ─── показания счётчиков ─── */
.meter-room {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px 16px; margin-bottom: 12px;
}
/* помещение — самый заметный элемент: по нему резидент ищет счётчик */
.meter-room-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px;
  margin: 0 -16px 2px; padding: 12px 16px;
  background: var(--sage); border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.meter-room-label {
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
}
.meter-room-head b {
  font-size: 19px; line-height: 1.1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.meter-room-floor { font-size: 11.5px; color: var(--muted); }
.meter-room-count { margin-left: auto; font-size: 11px; color: var(--muted); }

.meter { border-top: 1px solid var(--line); padding: 14px 0 2px; }
.meter:first-of-type { border-top: 0; padding-top: 12px; }
.meter-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.meter-head b { font-size: 13.5px; }
.meter-kind { font-size: 11.5px; color: var(--muted); }
.meter-room-tag {
  margin-left: auto; padding: 2px 9px; border: 1px solid var(--line);
  border-radius: 999px; background: #fbfbfc; font-size: 11px; color: var(--muted);
  white-space: nowrap;
}
.meter-last { margin: 6px 0 12px; font-size: 12.5px; color: var(--muted); }
.meter-last b { color: var(--ink); font-size: 14px; }

.meter-ok {
  margin: 0 0 12px; padding: 10px 12px;
  border-radius: 9px; background: var(--green-100); color: var(--green-600);
  font-size: 12px; line-height: 1.45;
}
.meter-ok b { font-variant-numeric: tabular-nums; }

.meter form { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.meter-field { display: grid; gap: 4px; min-width: 0; }
.meter-field span {
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meter-field input { width: 100%; }
.meter-send {
  grid-column: 1 / -1; width: 100%; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.meter-send-ico { font-size: 13px; opacity: .9; }
.meter-send.busy::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: meterSpin .7s linear infinite;
}
.meter-send.busy .meter-send-ico { display: none; }
.meter form.is-sending input { opacity: .5; }
.meter-progress {
  grid-column: 1 / -1; margin: 2px 0 0; font-size: 11.5px; color: var(--muted);
}
@keyframes meterSpin { to { transform: rotate(360deg); } }
@media (max-width: 359px) {
  .meter form { grid-template-columns: minmax(0, 1fr); }
}

/* эмодзи вида ресурса у счётчика */
.meter-head .meter-emoji { font-size: 15px; line-height: 1; flex: none; }

/* позвать оператора из базы знаний */
.kb-ask-op {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  margin: 14px 0 18px; padding: 14px 16px;
  background: var(--blue-soft); border-radius: var(--radius);
}
/* у .btn ширина 100%: в flex-строке она съедала всю ширину, и текст
   сжимался в колонку в одно слово. Тексту — остаток, кнопке — своё */
.kb-ask-op > div { flex: 1 1 auto; min-width: 0; }
.kb-ask-op b { display: block; font-size: 13.5px; }
.kb-ask-op p { margin: 4px 0 0; font-size: 12px; color: var(--muted); max-width: 42ch; }
.kb-ask-op .btn { flex: none; width: auto; }
@media (max-width: 520px) {
  .kb-ask-op { flex-direction: column; align-items: stretch; }
  .kb-ask-op .btn { width: 100%; }
}

/* ─── логотип на экране входа ─── */
.brand.brand-stack { display: block; margin: 6px 0 30px; text-align: center; }
.brand-lockup { display: block; max-height: 48px; width: auto; margin: 0 auto; }
.brand-lockup-pfm { width: 148px; max-height: none; }
.brand-tagline { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.brand-mark { height: 34px; width: auto; }

/* помещения в заявке: объект → этаж → помещения */
.room-groups { display: grid; gap: 14px; }
.room-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); }
.room-group-head { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.room-floor { margin: 10px 0 6px; font-size: 11.5px; color: var(--muted); }
.room-group .room-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.room-group .room-opt { padding: 9px 11px; }

/* ─── уборки: календарь на главной ─── */
.clean-cal {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px;
  scrollbar-width: none;
}
.clean-cal::-webkit-scrollbar { display: none; }
.cal-day {
  flex: none; width: 46px; padding: 8px 0 7px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  display: grid; justify-items: center; gap: 2px; color: var(--muted);
}
.cal-day .dow { font-size: 10px; text-transform: lowercase; }
.cal-day b { font-size: 15px; font-weight: 600; color: var(--ink); }
.cal-day i { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); opacity: 0; }
.cal-day.on { border-color: var(--blue); background: var(--blue-soft); }
.cal-day.on i { opacity: 1; }
.clean-list { display: grid; gap: 8px; }
.clean-card {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px;
}
.clean-ico { font-size: 18px; flex: none; }
.clean-body { min-width: 0; }
.clean-body b { display: block; font-size: 13.5px; }
.clean-body small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.clean-rating { margin-left: auto; font-size: 15px; letter-spacing: 1px; color: var(--amber); white-space: nowrap; }
.clean-soon { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.clean-stars { margin-left: auto; display: flex; gap: 1px; }
.clean-stars button { font-size: 17px; line-height: 1; color: #cfd3dc; padding: 2px; }
.clean-stars button:hover { color: var(--amber); }
.clean-empty { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ─── экран загрузки: сборка логотипа ─── */
.splash {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center;
  padding: 24px; background: var(--bg);
}
.splash-logo { position: relative; width: 190px; height: 190px; }
.splash-mark { position: relative; z-index: 2; width: 100%; height: 100%; }
.splash-glow {
  position: absolute; inset: 16%; border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 166, 169, 0.18) 0%, transparent 70%);
  animation: splashGlow 2.4s ease-in-out infinite;
}
.splash-p { position: absolute; width: 4px; height: 4px; border-radius: 50%; opacity: 0; }
.splash-p.p1 { background: #26a6a9; top: 22%; left: 26%; animation: splashP 3s ease-in-out 1.1s infinite; }
.splash-p.p2 { background: #daa520; top: 34%; right: 22%; animation: splashP 3.4s ease-in-out 1.3s infinite; }
.splash-p.p3 { background: #26a6a9; bottom: 30%; left: 22%; animation: splashP 2.8s ease-in-out 1.5s infinite; }
.splash-p.p4 { background: #daa520; bottom: 26%; right: 28%; animation: splashP 3.2s ease-in-out 1.2s infinite; }

.splash-mark .cube-1 { opacity: 0; transform-origin: center; animation: splashCube .55s cubic-bezier(.34, 1.56, .64, 1) .05s forwards; }
.splash-mark .cube-2 { opacity: 0; transform-origin: center; animation: splashCube .55s cubic-bezier(.34, 1.56, .64, 1) .14s forwards; }
.splash-mark .cube-3 { opacity: 0; transform-origin: center; animation: splashCube .55s cubic-bezier(.34, 1.56, .64, 1) .23s forwards; }
.splash-mark .wave-path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: splashWave .7s ease-out forwards; }
.splash-mark .wave-1 { animation-delay: .30s; }
.splash-mark .wave-2 { animation-delay: .38s; }
.splash-mark .wave-3 { animation-delay: .46s; }
.splash-mark .wave-4 { animation-delay: .54s; }
.splash-mark .wave-5 { animation-delay: .62s; }

.splash-word {
  margin-top: 22px; font-size: 38px; font-weight: 800; letter-spacing: 4px;
  color: #0d2b45; opacity: 0; animation: splashWord .5s ease .5s forwards;
}
.splash-sub {
  margin-top: 6px; font-size: 10.5px; letter-spacing: 5px; text-transform: uppercase;
  color: #7a8fa6; opacity: 0; animation: splashFade .4s ease .75s forwards;
}
.splash-bar {
  margin-top: 28px; width: 120px; height: 3px; border-radius: 2px;
  background: #e8ecf0; overflow: hidden; opacity: 0; animation: splashFade .3s ease .55s forwards;
}
.splash-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #26a6a9, #0d2b45); animation: splashFill 1.1s ease-in-out .55s forwards; }

@keyframes splashCube { 0% { opacity: 0; transform: scale(.3) rotate(-15deg); } 60% { opacity: 1; transform: scale(1.05) rotate(2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes splashWave { to { stroke-dashoffset: 0; } }
@keyframes splashWord { from { opacity: 0; transform: translateY(16px); letter-spacing: 12px; } to { opacity: 1; transform: none; letter-spacing: 4px; } }
@keyframes splashFade { to { opacity: 1; } }
@keyframes splashFill { 0% { width: 0; } 40% { width: 45%; } 75% { width: 78%; } 100% { width: 100%; } }
@keyframes splashGlow { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .8; transform: scale(1.12); } }
@keyframes splashP { 0%, 100% { opacity: 0; transform: translateY(0) scale(0); } 25% { opacity: .8; transform: translateY(-10px) scale(1); } 60% { opacity: .35; transform: translateY(-18px) scale(.8); } }

@media (prefers-reduced-motion: reduce) {
  .splash-mark .cube-1, .splash-mark .cube-2, .splash-mark .cube-3,
  .splash-mark .wave-path, .splash-word, .splash-sub, .splash-bar, .splash-bar i,
  .splash-glow, .splash-p { animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
  .splash-bar i { width: 100%; }
}

/* слово PFM24 под маркой на входе */
.brand .brand-word { display: block; margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: 4px; color: #0d2b45; }
.brand .brand-tagline { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.brand-mark-svg { width: 116px; height: auto; max-height: none; }

/* ─── лист оценки уборки ─── */
.clean-card { width: 100%; text-align: left; cursor: pointer; }
.clean-torate { margin-left: auto; font-size: 12px; color: var(--blue); white-space: nowrap; }
.sheet {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end;
  justify-content: center; background: rgba(10, 18, 35, 0.45); padding: 0;
}
.sheet-card {
  position: relative; width: min(480px, 100%); background: var(--card);
  border-radius: 18px 18px 0 0; padding: 22px 20px calc(20px + var(--safe-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
}
.sheet-card h3 { margin: 6px 0 0; font-size: 20px; }
.sheet-meta { margin: 6px 0 16px; font-size: 12.5px; color: var(--muted); }
.sheet-close { position: absolute; top: 14px; right: 16px; font-size: 18px; color: var(--muted); }
.sheet-rate b { display: block; font-size: 13.5px; margin-bottom: 8px; }
.sheet-stars { display: flex; gap: 4px; margin-bottom: 12px; }
.sheet-stars button { font-size: 30px; line-height: 1; color: #cfd3dc; padding: 0 2px; }
.sheet-stars button.on { color: var(--amber); }
.sheet-comment { width: 100%; margin-bottom: 12px; }
.sheet-save { width: 100%; }
.sheet-note { font-size: 12.5px; color: var(--muted); margin: 0; }
@media (min-width: 720px) {
  .sheet { align-items: center; }
  .sheet-card { border-radius: 18px; }
}

/* кнопка установки пропуска на главный экран */
.passsheet-install {
  margin-top: 18px; padding: 11px 18px; border-radius: 12px;
  border: 1px solid rgba(233, 239, 251, 0.35); background: transparent;
  color: #dfe8fa; font-size: 13px; font-weight: 600; font-family: inherit;
}

/* ═════════════════════════ десктоп: ритм и тихие состояния ═════════════════════════
   То же направление, что и в мобильной версии, но на большом экране:
   колонки выровнены по одной сетке, действия — строки, а не стопка кнопок,
   и ничего не тянется на всю ширину без нужды. */

/* заявки: сегмент вместо двух кнопок-пилюль */
.filters { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.filters .btn.small { margin-left: auto; }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.seg button { min-height: 30px; padding: 0 10px; border-radius: 6px; font-size: 12px; color: var(--muted); }
.seg button.on { background: var(--bg); color: var(--ink); font-weight: 500; }

/* профиль: идентификация строкой */
.profile-top { display: grid; gap: 12px; }
.profile-id { display: flex; align-items: center; gap: 14px; text-align: left; }
.profile-id .avatar { width: 44px; height: 44px; border-radius: 10px; font-size: 14px; margin: 0; flex: none; }
.profile-id b { font-size: 15px; }
.profile-id p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

@media (min-width: 1024px) {
  /* контент использует ширину экрана, но не растягивается бесконечно */
  .screen { max-width: 1600px; padding: 20px 40px 56px; }
  .topbar { max-width: 1600px; width: 100%; margin: 0 auto; padding: 16px 40px 12px; }
  .page-head { padding: 8px 0 20px; }
  .section { margin-top: 28px; }

  /* сайдбар: ровные строки 36, тихое активное состояние */
  .shell { grid-template-columns: 260px minmax(0, 1fr); }
  .sidebar { padding: 20px 12px 16px; gap: 12px; }
  .side-brand { padding: 2px 10px 10px; }
  .side-org { background: none; padding: 6px 10px; border-radius: 8px; }
  .side-org .avatar { width: 32px; height: 32px; border-radius: 8px; font-size: 11px; }
  .side-nav { margin-top: 6px; gap: 0; }
  .side-nav button, .side-foot button { min-height: 36px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
  .side-nav button.active { background: var(--bg); color: var(--ink); font-weight: 500; }
  .side-nav button.active .ico { color: var(--ink); }
  .side-foot { padding-top: 10px; }
  .side-badge { background: none; color: var(--muted); font-size: 11px; min-width: 0; height: auto; padding: 0; }

  /* главная: колонки от одной линии, действия — список строк */
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 24px; }
  .home-col-side { gap: 16px; }
  .home-col-side .quick {
    grid-template-columns: 1fr; gap: 0; margin-top: 0;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r-card); overflow: hidden;
  }
  .quick button { border: 0; border-radius: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
  .quick button:last-child { border-bottom: 0; }
  .quick button:hover { background: #f7f8fa; }

  /* таблица заявок: заголовок без капса, строки одной высоты */
  .thead {
    font-size: 11.5px; letter-spacing: 0; text-transform: none; color: var(--muted);
    padding: 10px 16px; background: #fbfbfc;
  }
  .ticket-row { padding: 12px 16px; }
  .ticket-row h3 { font-size: 13.5px; }
  .thead, .ticket-row { grid-template-columns: 24px minmax(0, 1fr) 140px 100px; gap: 12px; }
  /* на главной в строке нет номера — колонки другие, иначе тема попадает
     в узкую колонку номера и переносится по слову */
  .ticket-row.home-row { grid-template-columns: 24px minmax(0, 1fr) auto auto 26px; }
  .ticket-row.home-row .preview { -webkit-line-clamp: 3; font-size: 12.5px; }
  .home-tickets .ticket-row { padding: 14px 16px; }
  .ticket-row.home-row .badge, .ticket-row.home-row time { justify-self: end; }
  .thead span:last-child { text-align: right; }
  .ticket-row .side { justify-items: end; }
  .filters { margin: 0 0 16px; gap: 12px; }

  /* профиль: идентификация и реквизиты рядом */
  .profile-top { grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
  .profile-actions { max-width: 340px; }

  /* счётчики: счётчик слева, форма справа */
  .meter {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 520px);
    column-gap: 28px; align-items: start;
  }
  .meter { padding: 16px 0 6px; }
  .meter-head { min-height: 40px; align-items: center; }
  .meter-room-tag { margin-left: 2px; }
  .meter-head, .meter-last, .meter-ok { grid-column: 1; }
  .meter-last { margin: 4px 0 0; }
  .meter-ok { margin: 8px 0 0; }
  .meter form {
    grid-column: 2; grid-template-columns: minmax(0, 1fr) 140px 210px;
    align-items: end;
  }
  .meter-send { grid-column: auto; height: 42px; }
  .meter-progress { grid-column: 1 / -1; }
  .meter-room { padding: 0 18px 16px; }
  .meter-room-head { margin: 0 -18px 2px; padding: 12px 18px; }

  /* пропуска: активный — полосой, остальные — сеткой */
  .wallet { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
  .wallet-active { grid-template-columns: 1fr; }
  .wallet-active .pass { padding: 20px; }
  .wallet-active .pass .qr { width: 84px; height: 84px; }

  /* чтение: колонка, а не строка на весь экран */
  .kb { max-width: 900px; margin: 0 auto; }
  .kb-article .md { max-width: 760px; }
  .chat { max-width: 820px; margin: 0 auto; }
  .chat .composer { bottom: 0; background: var(--bg); padding: 12px 0 10px; }
}

/* на широких экранах контент тянется, ограничение задано выше (1600) */

/* поле прикрепления файлов в новой заявке */
.file-pick {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px dashed var(--line-strong, #c9ccd6);
  border-radius: var(--r-control, 8px); background: var(--card);
  font-size: 13px; color: var(--ink); font-family: inherit;
}
.file-pick:active { background: var(--bg); }
.attach-list { display: grid; gap: 2px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-control, 8px); background: var(--card); }

/* фото уборки в листе */
.sheet-photos { display: flex; gap: 8px; margin: 4px 0 14px; overflow-x: auto; padding-bottom: 2px; }
.sheet-photo {
  width: 96px; height: 96px; flex: none; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center;
}
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-photo .photo-stub { color: var(--muted); display: grid; place-items: center; }

/* просмотр фото уборки */
.photo-view {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 22, 0.92);
  display: grid; place-items: center; padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.photo-view img { max-width: 100%; max-height: 100%; border-radius: 8px; display: block; }
.photo-view-close {
  position: absolute; right: 12px; top: calc(12px + env(safe-area-inset-top));
  width: 44px; height: 44px; border-radius: 12px; color: #eef2fb; font-size: 20px;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.12);
}

/* поиск по заявкам */
.search {
  flex: 1; min-width: 160px; max-width: 320px;
  padding: 9px 12px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); border-radius: var(--r-control, 8px);
  background: var(--card); color: var(--ink);
}
.search::placeholder { color: var(--muted); }
@media (max-width: 720px) {
  .filters { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .filters .btn.small { margin-left: auto; }
}

/* файлы к оценке уборки */
.sheet-files { margin-bottom: 12px; }
.sheet-files .attach-list { margin-top: 8px; }

/* строки таблиц в заявке: на десктопе в одну линию */
@media (min-width: 1024px) {
  .trow {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) 32px;
    align-items: end; gap: 10px; padding: 10px 12px;
  }
  .trow .tcell { display: grid; gap: 4px; }
  .trow .tcell:last-of-type { grid-column: span 1; }
  .trow .row-del { position: static; align-self: end; padding: 0 0 10px; }
  .trow .tcell input, .trow .tcell select { margin: 0; }
}

/* ─── уведомления: галочки по каналам ─── */
.notify-prefs { padding: 6px 16px; }
.pref { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pref:last-child { border-bottom: 0; }
.pref-ico { font-size: 17px; flex: none; width: 22px; text-align: center; }
.pref-text { flex: 1; min-width: 0; }
.pref-text b { display: block; font-size: 13.5px; font-weight: 500; }
.pref-text small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pref input[type='checkbox'] { width: 20px; height: 20px; accent-color: var(--blue); flex: none; }
.pref.off { opacity: 0.55; cursor: default; }

/* карточка бренда после загрузки */
.brand-intro {
  min-height: 100dvh; display: grid; place-content: center; justify-items: center;
  gap: 14px; padding: 24px; background: var(--bg); text-align: center;
}
.brand-intro-logo { max-width: min(78vw, 320px); max-height: 84px; width: auto; height: auto; animation: brandIntro .45s ease both; }
.brand-intro-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.brand-intro-tag { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
@keyframes brandIntro { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* группы заявок по типу */
.tgroup {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: #fbfbfc;
  border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-weight: 500;
}
.tgroup .t-emoji { font-size: 14px; width: 20px; text-align: center; }
.tgroup .tgroup-name { color: var(--ink); font-weight: 500; }
.tgroup i { margin-left: auto; font-style: normal; font-variant-numeric: tabular-nums; }
.ticket-row .num { white-space: nowrap; }


/* ─── iOS: статус-бар и полноэкранный режим ───
   В установленном PWA iOS рисует содержимое под часами и «чёлкой»
   (apple-mobile-web-app-status-bar-style: black-translucent). Поэтому сверху
   остаётся полоса высотой safe-area: красим её в цвет бренда, чтобы белые
   иконки статус-бара читались, и опускаем под неё шапку и экраны.
   В браузере и на десктопе env(...) = 0, правила ничего не меняют. */
body::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0;
  height: var(--safe-top); background: var(--navy);
  z-index: 60; pointer-events: none;
}
.topbar { padding-top: calc(12px + var(--safe-top)); }
.login {
  padding-top: calc(34px + var(--safe-top));
  padding-bottom: calc(34px + var(--safe-bottom));
  padding-left: calc(20px + var(--safe-left));
  padding-right: calc(20px + var(--safe-right));
}
.splash, .brand-intro {
  padding-top: calc(24px + var(--safe-top));
  padding-bottom: calc(24px + var(--safe-bottom));
}
/* чат: поле ввода не должно прятаться под индикатором «домой» */
.chat .composer { padding-bottom: calc(6px + var(--safe-bottom)); }

/* iOS Safari увеличивает страницу при фокусе на поле с кеглем меньше 16px:
   после этого экран «не влезает» справа. 16px — единственный способ
   отключить зум, не запрещая сам масштаб. */
@media (max-width: 899px) {
  input, textarea, select { font-size: 16px; }
  .code-input { font-size: 22px; }
  .composer input { font-size: 16px; }
}


/* главная без заголовка «Главная»: объект и дата вместо него */
.home-head { padding: 6px 0 14px; }
.home-head p { margin-top: 6px; }

/* ─── сотрудники резидента ─── */
.staff-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px;
}
.staff-card.pending { border-color: #d9c3a8; background: #fdfaf5; }
.staff-top { display: flex; align-items: center; gap: 12px; }
.staff-top .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; }
.staff-who { flex: 1; min-width: 0; }
.staff-who b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.staff-who small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.staff-badge {
  flex: none; font-size: 10.5px; padding: 4px 9px; border-radius: 999px;
  white-space: nowrap; font-weight: 500;
}
.staff-badge.on { background: var(--green-100); color: var(--green-600); }
.staff-badge.off { background: #f6e9e6; color: #9c5340; }
.staff-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.staff-actions .btn { min-height: 36px; }
.staff-note { margin: 12px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.staff-list .v { font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.staff-list .v.on { color: var(--green-600); }
.staff-list .v.off { color: #9c5340; }

/* файлы на шаге «Проверьте заявку»: превью, а не строка в сетке фактов */
.review-files { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.review-files-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.review-files-head i { font-style: normal; letter-spacing: 0; font-size: 10px; }
.review-files-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-file { margin: 0; width: 96px; }
.review-file img {
  display: block; width: 96px; height: 96px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); background: #f4f5f8;
}
.review-file figcaption {
  margin-top: 4px; font-size: 10.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.review-file.doc {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fd;
}
.review-file-meta { min-width: 0; }
.review-file-meta b {
  display: block; font-size: 12.5px; font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.review-file-meta small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.review-files-empty { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* ─── просмотр файла из чата ─── */
.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(16, 39, 93, .18); border-top-color: var(--blue);
  animation: meterSpin .8s linear infinite; vertical-align: -2px;
}
.spinner.big { width: 26px; height: 26px; border-width: 3px; }
.msg-img .img-stub { display: inline-flex; align-items: center; gap: 8px; }

.viewer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.viewer-backdrop { position: absolute; inset: 0; background: rgba(12, 20, 38, .62); backdrop-filter: blur(2px); }
.viewer-box {
  position: relative; width: min(880px, 100%); max-height: 90dvh;
  display: flex; flex-direction: column; background: var(--card);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.viewer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.viewer-head b {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.viewer-close {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: var(--muted);
}
.viewer-body {
  flex: 1; min-height: 0; display: grid; place-items: center;
  background: #f4f5f8; overflow: auto;
}
.viewer-body img { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.viewer-body iframe { width: 100%; height: 70dvh; border: 0; background: #fff; }
.viewer-state {
  display: grid; justify-items: center; gap: 10px; padding: 44px 20px;
  color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; max-width: 360px;
}
.viewer-state p { margin: 0; }
.viewer-state .file-ico { color: var(--muted); }
.viewer-actions { display: flex; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.viewer-actions .btn { text-decoration: none; }
@media (max-width: 700px) {
  .viewer { padding: 0; }
  .viewer-box { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .viewer-body iframe { height: 68dvh; }
}

.viewer-box.doc { width: min(560px, 100%); }
.viewer-body pre {
  margin: 0; padding: 16px; width: 100%; max-height: 60dvh; overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; line-height: 1.55; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; background: #fff;
}
@media (max-width: 700px) { .viewer-body pre { max-height: 74dvh; } }

/* ─── внутри Telegram: ярлык «на главный экран» не нужен ─── */
:root[data-tg] .passsheet-install { display: none; }

/* ─── онбординг ─── */
.onboard { position: fixed; inset: 0; z-index: 90; }
.onboard-spot {
  position: fixed; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(12, 20, 38, .62), 0 0 0 2px var(--blue);
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
.onboard-card {
  position: fixed; z-index: 2; width: min(380px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 18px 16px; box-shadow: 0 24px 60px rgba(12, 20, 38, .35);
}
.onboard-count {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.onboard-card h2 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.3px; }
.onboard-card p { margin: 0 0 16px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.onboard-actions { display: flex; gap: 8px; justify-content: flex-end; }
.onboard-actions .btn { min-height: 40px; }
@media (max-width: 719px) {
  .onboard-card { border-radius: 16px 16px 12px 12px; }
}

/* ─── центр уведомлений: вкладки и дата ─── */
.notice-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.notice-tabs button {
  flex: 1; min-height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); font-size: 13px; color: var(--muted);
}
.notice-tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
.notice-tabs button i {
  font-style: normal; font-size: 11px; margin-left: 4px;
  background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 1px 6px;
}
.notice-tabs button:not(.on) i { background: #eceff4; color: var(--muted); }

.notice-date { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.notice-date label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.notice-date input { width: 160px; padding: 8px 10px; font-size: 13px; }

/* ─── срочное оповещение на главной ─── */
.urgent-banner {
  margin: 8px 0 14px; padding: 14px 16px; border-radius: 12px;
  background: #fdecea; border: 1px solid #f3c4bd; color: #7d2b21;
}
.urgent-banner .urgent-head {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  margin-bottom: 6px;
}
.urgent-banner p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; }
.urgent-banner .btn { background: #7d2b21; border-color: #7d2b21; color: #fff; }
.urgent-banner .btn.ghost { background: transparent; color: #7d2b21; border-color: #d9a49b; }
.urgent-files { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.urgent-files .doc-link {
  text-align: left; font-size: 12.5px; color: #7d2b21; text-decoration: underline;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.urgent-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* данные заявки: подписи слева, значения справа */
.detail-fields { display: flex; flex-direction: column; gap: 8px; }
.detail-fields .fact-row { display: flex; gap: 12px; font-size: 13px; }
.detail-fields .fact-row span { color: var(--muted); min-width: 120px; flex: 0 0 38%; }
.detail-fields .fact-row b { font-weight: 600; white-space: pre-line; }
.detail-files { display: flex; flex-direction: column; gap: 6px; }
.detail-files .doc-link { text-align: left; }

/* ─── настройки: категории и тихие часы ─── */
.pref-group { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.pref-group-head {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.pref-group-head span { display: block; margin-top: 3px; letter-spacing: 0; text-transform: none; font-size: 11px; }
.quiet-row { display: flex; gap: 12px; padding: 4px 0 8px; }
.quiet-row label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.quiet-row input { width: 108px; padding: 8px 10px; font-size: 13px; }

/* боты для привязки мессенджеров */
.bot-links { display: grid; gap: 8px; padding: 2px 0 8px; }
.bot-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; text-decoration: none;
}
.bot-links a:active { background: var(--sage); }
.bot-links .bot-ico { font-size: 16px; }
.bot-links b { display: block; font-size: 13px; font-weight: 550; }
.bot-links small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }

/* обязательные поля в формах */
.req { color: #b3261e; font-weight: 600; }
.req-hint {
  margin: 0 0 12px; font-size: 11.5px; color: var(--muted);
}
.req-hint span { color: #b3261e; font-weight: 600; }
.req, .trow .tcell span.req, .fl span.req { display: inline; white-space: nowrap; }

/* чат: вложения и поле ввода — один блок, чтобы поле не уезжало */
.chat .composer.chat-composer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end; gap: 8px;
}
.chat .composer .chat-attach {
  grid-column: 1 / -1; margin: 0 0 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.chat .composer .chat-attach .attach-head { margin-bottom: 4px; }
.chat .composer .chat-attach .attach-row { padding: 4px 0; border: 0; }
.chat .composer .chat-attach .attach-row + .attach-row { border-top: 1px solid var(--line); }
/* кнопка «убрать файл» в композере — тихая, а не синяя кнопка отправки */
.chat .composer .chat-attach .attach-row button {
  width: 30px; min-height: 30px; padding: 0; border: 0;
  background: transparent; color: var(--muted);
  border-radius: 8px; font-size: 13px;
}
.chat .composer .chat-attach .attach-row button:active { background: var(--blue-soft); }

/* ─── установка на рабочий стол ─── */
.install-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.install-head h3 { margin: 2px 0 0; }
.install-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.install-lead { margin: 12px 0 18px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.install-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.install-steps li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px;
  align-items: start; font-size: 13px; line-height: 1.45;
}
.install-steps .n {
  width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft);
  color: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.install-ico { display: inline-flex; vertical-align: -3px; color: var(--blue); }
.install-actions { display: grid; gap: 8px; }
.install-note { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }

/* плашка установки: ловит событие Chrome, если оно пришло позже листа */
.install-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(78px + var(--safe-bottom));
  z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}
.install-bar img { border-radius: 8px; flex: none; }
.install-bar-text { flex: 1; min-width: 0; }
.install-bar-text b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-bar-text small { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.install-bar-go {
  min-height: 34px; padding: 0 12px; border-radius: 9px;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 600; flex: none;
}
.install-bar-x { width: 28px; height: 28px; color: var(--muted); font-size: 13px; flex: none; }
@media (min-width: 720px) {
  .install-bar { left: auto; right: 24px; bottom: 24px; width: 340px; }
}

/* ─── документооборот ─── */
.doc-card { display: block; }
.doc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.doc-date { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.doc-num { color: var(--muted); font-size: 12px; white-space: nowrap; }
.doc-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-files li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; line-height: 1.4; }
.doc-files a { color: var(--blue); text-decoration: none; word-break: break-word; }
.doc-files a:active { opacity: 0.6; }
.doc-sum { color: var(--muted); font-size: 12px; white-space: nowrap; }
.doc-files .doc-file { gap: 10px; }
.doc-files .doc-link {
  padding: 0; margin: 0; border: 0; background: none; cursor: pointer;
  color: var(--blue); font-size: 13px; line-height: 1.4; text-align: left;
  word-break: break-word; min-height: 0; font-weight: 400;
}
.doc-files .doc-link:active { opacity: 0.6; }

/* ошибка на форме входа: красное поле, подпись, встряска */
.form-err { margin: 6px 0 0; font-size: 12.5px; color: var(--danger, #a2533c); font-weight: 600; }
.code-input.err { border-color: var(--danger, #a2533c); box-shadow: 0 0 0 3px rgba(209, 67, 67, 0.15); }
.code-input.shake { animation: code-shake 0.35s; }
@keyframes code-shake {
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* недействующие пропуска: свёрнутая группа, чтобы не занимали экран */
.pass-archive { margin-top: 18px; }
.pass-archive > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  list-style: none; padding: 10px 2px; font-size: 15px; font-weight: 600; color: var(--ink);
}
.pass-archive > summary::-webkit-details-marker { display: none; }
.pass-archive > summary::after {
  content: '▾'; margin-left: 4px; color: var(--muted); font-size: 12px; transition: transform 0.15s;
}
.pass-archive[open] > summary::after { transform: rotate(180deg); }
.pass-archive > summary .count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.pass-archive > .wallet { margin-top: 10px; }

/* подсказка про спам на экране кода из письма */
.mail-tip {
  margin: 0 0 18px; padding: 10px 12px; border-radius: 10px;
  background: var(--sand); color: #6b5a3d; font-size: 12.5px; line-height: 1.45;
}
.mail-tip b { color: #4f4229; }

/* ── сканер QR ── */
.scan-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #0b0f16; color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
}
.scan-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 600; }
.scan-close {
  border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 16px;
  background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
}
.scan-stage {
  position: relative; flex: 1; margin: 14px 0; min-height: 260px;
  border-radius: 18px; overflow: hidden; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute; width: min(64vw, 260px); aspect-ratio: 1;
  border: 3px solid #fff; border-radius: 18px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}
.scan-hint {
  position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; padding: 0 16px;
  text-align: center; font-size: 12.5px; color: #e7ecf5; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.scan-actions { display: flex; gap: 10px; }
.scan-actions .btn {
  flex: 1; width: auto; background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25); color: #fff;
}
.scan-file { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.scan-result { padding: 22px 18px; text-align: center; width: 100%; }
.scan-kind { font-size: 11.5px; letter-spacing: 0.4px; text-transform: uppercase; color: #9fb0c9; }
.scan-value { margin: 10px 0 18px; font-size: 15px; line-height: 1.5; word-break: break-all; color: #fff; }
.scan-result-actions { display: grid; gap: 10px; }
.scan-result-actions .btn {
  width: 100%; background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25); color: #fff;
}
.scan-result-actions .btn.primary { background: var(--blue); border-color: var(--blue); }

/* подпись разработчика внизу «Ещё» */
.made-by { margin: 26px 0 10px; text-align: center; font-size: 12px; color: var(--muted); }
.made-by a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* догрузка списка заявок */
.tickets-more { display: grid; gap: 6px; justify-items: center; padding: 16px; }
.tickets-more .btn { width: auto; min-width: 220px; }
.tickets-more span { font-size: 11.5px; color: var(--muted); }
