/* 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-bottom: env(safe-area-inset-bottom, 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: #3f5aa0; 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%, #10275d 58%, #0b1c44 100%);
  color: #eef2fb; 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 {
  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: #eef2fb; }

/* ─── список заявок ─── */
.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; }

/* ─── бейджи статусов ─── */
.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: #e9effb; color: #2650b6; }
.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; }
.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; }
.composer input { flex: 1; }
.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: #eef2fb; }
.choice-grid button:disabled { opacity: 0.5; cursor: not-allowed; }
.choice-grid button:disabled small { color: #9a6a5e; }

/* ─── пропуска ─── */
.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: 24px; text-align: center; color: #edf1fb;
}
.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; top: 18px; right: 18px; font-size: 20px; color: #ccd8f0; }

/* ─── сообщения УК ─── */
.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: #eef2fb;
  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: #10275d; 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: #e9effb; color: #2650b6; }

.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: #2650b6; }

.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.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: #2650b6; }

.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 .mark { width: 42px; height: 42px; border-radius: 12px; background: #10275d; color: #e9effb; 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: #e9effb; color: #2650b6;
  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: #2650b6; }
.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 > button { align-items: flex-start; gap: 10px; }
.notices > button.unread { background: #f7f9fd; }
.notice-ico {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: #e9effb; 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; }

/* левый верхний угол — ссылка на главный экран */
.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; }
.tabbar .tab-dot {
  position: absolute; top: 2px; right: 50%; margin-right: -16px;
  width: 6px; height: 6px; border-radius: 50%; background: #2650b6;
}

/* ─── динамические поля заявки ─── */
.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: #2650b6; 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: #eef2fb; 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: #e9effb; 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: #e9effb; 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 92px minmax(0, 1fr) 128px 108px;
    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 92px minmax(0, 1fr) 128px 108px;
    gap: 14px; align-items: center; padding: 14px 18px;
  }
  .ticket-row:hover { background: #f7f9fd; }
  /* строки раскладываются в те же колонки, что и шапка */
  .ticket-row .body, .ticket-row .side { display: contents; }
  .ticket-row .t-emoji { width: auto; font-size: 15px; }
  .ticket-row .num { font-size: 11.5px; color: var(--muted); }
  .ticket-row h3 { margin: 0; font-size: 14px; }
  .ticket-row .meta { display: none; }
  .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) {
  .screen { max-width: 1200px; }
  .home-grid { grid-template-columns: minmax(0, 2.4fr) minmax(340px, 1fr); }
}

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

: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; }
.notices > button.unread { background: #f7f8fb; }

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

@media (min-width: 1024px) {
  .sidebar { width: 260px; 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 { display: block; }
@media (min-width: 1024px) {
  .shell.auth { display: block; max-width: none; background: var(--bg); }
  .shell.auth .login { max-width: 460px; margin: 0 auto; 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; }
}
