/* ============================================================
   Design tokens — "страховой полис / архив полисов"
   Тёмно-синий "архив" + тёплая бумага для карточек-полисов
   с перфорацией и вырезом, как у настоящего отрывного бланка.
   ============================================================ */
:root {
  --ink-navy: #4A93D8;
  --surface-navy: #5AA3E0;
  --surface-navy-2: #3D7CC2;
  --paper: #F6F1E6;
  --paper-2: #EFE7D6;
  --pine: #2E6F5E;
  --pine-dark: #235749;
  --amber: #C98A2E;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.78);
  --text-on-paper: #2A2417;
  --text-on-paper-muted: #6B6252;
  --danger: #B4553F;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 14px;
  --shadow-stub: 0 1px 2px rgba(18, 33, 59, 0.08), 0 4px 10px rgba(18, 33, 59, 0.06);
}

* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  height: 100vh;
  height: 100dvh;
  height: var(--app-vh, 100dvh);
  overflow: hidden;
}

body {
  margin: 0;
  padding: 0;
  background: var(--ink-navy);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  height: 100vh;
  height: 100dvh;
  height: var(--app-vh, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}

button { font-family: inherit; }

a { color: inherit; }

::selection { background: var(--amber); color: var(--ink-navy); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --- header --- */
.app-header {
  padding: 18px 20px 14px;
  background: linear-gradient(180deg, var(--ink-navy) 0%, #0F1B30 100%);
  border-bottom: 1px solid rgba(232, 234, 240, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-header__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.2px;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.app-header__title .stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.app-header__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}

.back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-on-dark-muted);
  font-size: 14px;
  padding: 4px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.back-btn:hover { color: var(--text-on-dark); }
.back-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* --- main scroll area --- */
.app-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 110px;
}

.screen { display: none; animation: fade-in 180ms ease-out; }
.screen.active { display: block; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-on-dark-muted);
  margin: 0 2px 10px;
}

/* --- профильная панель (только на главном экране) --- */
.profile-bar {
  display: none; /* показывается через JS только на screen-home */
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.profile-bar.visible { display: flex; }

.profile-bar__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.25);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
}
.profile-bar__avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-bar__spacer { flex: 1; }

.profile-bar__icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.06);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-bar__icon-btn:hover { background: rgba(255,255,255,0.1); }
.profile-bar__icon-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.profile-bar__dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  border: 1.5px solid var(--ink-navy);
  display: none;
}
.profile-bar__dot.show { display: block; }

.profile-bar__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid var(--ink-navy);
}
.profile-bar__badge.show { display: flex; }

.profile-bar__news-btn {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.profile-bar__news-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* --- чат с менеджером --- */
#screen-manager.active, #screen-admin-chat.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 320px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}

.chat-bubble-row { display: flex; flex-direction: column; max-width: 82%; }
.chat-bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.chat-bubble-row.theirs { align-self: flex-start; align-items: flex-start; }

.chat-bubble {
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.4;
}
.chat-bubble-row.theirs .chat-bubble {
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: 13px 13px 13px 3px;
}
.chat-bubble-row.mine .chat-bubble {
  background: var(--pine);
  color: #fff;
  border-radius: 13px 13px 3px 13px;
}

.chat-bubble-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-on-dark-muted);
  margin: 3px 6px 0;
}

.chat-input-row {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}

.chat-input {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 11px 15px;
  font-size: 13.5px;
  font-family: inherit;
  background: var(--paper);
  color: var(--text-on-paper);
}
.chat-input:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--pine);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-send-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.chat-send-btn:disabled { opacity: 0.5; cursor: default; }

.chat-attach-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
}
.chat-attach-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.admin-filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.admin-filter-btn {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-dark-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-filter-btn.active { background: #fff; color: var(--ink-navy); }
.admin-filter-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.chat-bubble--file {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: left;
}
.chat-bubble--file .chat-file-icon { font-size: 18px; flex-shrink: 0; }
.chat-bubble--file .chat-file-name { font-size: 12.5px; word-break: break-word; }

/* --- экран "Пригласить друга" (по согласованному макету) --- */
.referral-gift-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 6px;
}

.referral-caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-on-dark);
  text-align: center;
  line-height: 1.4;
  max-width: 280px;
  margin: 0 auto 18px;
}

.referral-share-row {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

.referral-copy-btn {
  width: 48px;
  border-radius: 11px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-on-dark);
  font-size: 19px;
  cursor: pointer;
  flex-shrink: 0;
}
.referral-copy-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.referral-how-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-on-dark);
  margin: 0 0 12px;
}

.referral-steps { margin-bottom: 18px; }

.referral-step { display: flex; gap: 10px; align-items: flex-start; }

.referral-step__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--pine);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.referral-step__num--gift { background: var(--amber); color: #fff; font-size: 13px; }

.referral-step__text {
  font-size: 13.5px;
  color: var(--text-on-dark);
  margin: 2px 0 10px;
}

.referral-step__divider {
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.3);
  margin-left: 12px;
}

.profile-bar__gift {
  animation: gift-wiggle 2.6s ease-in-out infinite;
}
@keyframes gift-wiggle {
  0%, 78%, 100% { transform: rotate(0deg); }
  81% { transform: rotate(-12deg); }
  84% { transform: rotate(10deg); }
  87% { transform: rotate(-8deg); }
  90% { transform: rotate(4deg); }
  93% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .profile-bar__gift { animation: none; }
}

/* --- рекламная карусель --- */
.promo-carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
  height: 108px;
  box-shadow: var(--shadow-stub);
}

.promo-track {
  display: flex;
  height: 100%;
  transition: transform 420ms ease;
}

.promo-slide {
  min-width: 100%;
  height: 100%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  color: #fff;
  background: linear-gradient(120deg, var(--pine-dark), var(--pine) 70%);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.promo-slide--amber { background: linear-gradient(120deg, #8C5F1F, var(--amber) 70%); }

.promo-slide__title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin: 0;
}
.promo-slide__text {
  font-size: 12.5px;
  opacity: 0.92;
  margin: 0;
}

.promo-dots {
  position: absolute;
  bottom: 8px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.promo-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}
.promo-dot.active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .promo-track { transition: none; }
}

/* ============================================================
   "Стаб полиса" — фирменный элемент: карточка на бумаге с
   перфорацией и полукруглым вырезом сбоку, как у отрывного талона
   ============================================================ */
.stub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stub {
  position: relative;
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-stub);
  padding: 16px 18px 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.stub:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(18,33,59,0.1), 0 8px 16px rgba(18,33,59,0.1); }
.stub:active { transform: translateY(0); }
.stub:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

/* вырез-полукруг справа + перфорация */
.stub::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-navy);
}

.stub__perf {
  position: absolute;
  right: 54px;
  top: 8px;
  bottom: 8px;
  width: 0;
  border-left: 2px dashed rgba(42, 36, 23, 0.22);
}

.stub__icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stub__body { flex: 1; min-width: 0; }

.stub__title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stub__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-on-paper-muted);
  margin: 0;
}

.stub__chevron {
  color: var(--text-on-paper-muted);
  font-size: 18px;
  margin-right: 14px;
  flex-shrink: 0;
}

.stub__download-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: var(--pine);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 6px;
  transition: opacity 120ms ease;
}
.stub__download-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.stub__badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 14px;
  flex-shrink: 0;
  white-space: nowrap;
}
.stub__badge--new { background: rgba(46, 111, 94, 0.14); color: var(--pine-dark); }
.stub__badge--inwork { background: rgba(201, 138, 46, 0.16); color: var(--amber); }
.stub__badge--paid { background: rgba(46, 111, 94, 0.14); color: var(--pine-dark); }
.stub__badge--due { background: rgba(180, 85, 63, 0.14); color: var(--danger); }

/* --- главное меню: сетка 3 колонки для основных разделов --- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tile-grid--2col {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.tile-grid--2col .tile {
  padding: 16px 12px 14px;
  min-height: 88px;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
}
.tile-grid--2col .tile__icon-wrap { width: 34px; height: 34px; }
.tile-grid--2col .tile__icon { font-size: 18px; }
.tile-grid--2col .tile__title { font-size: 13px; }
.tile-grid--2col .tile--wide { grid-column: span 2; }

.tile {
  position: relative;
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: 12px;
  box-shadow: var(--shadow-stub);
  border: none;
  padding: 12px 6px 10px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 82px;
  transition: transform 120ms ease;
}
.tile:hover { transform: translateY(-1px); }
.tile:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

.tile__icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tile__icon { font-size: 17px; line-height: 1; }
.tile__title { font-weight: 600; font-size: 10.5px; line-height: 1.2; }

.tile::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 0;
  border-top: 2px dashed rgba(42, 36, 23, 0.1);
}

/* Цветные кружки-иконки под категории — используются и в плитках, и в списке снизу */
.tint-blue   { background: #E6F1FB; }
.tint-teal   { background: #E1F5EE; }
.tint-coral  { background: #FAECE7; }
.tint-green  { background: #EAF3DE; }
.tint-amber  { background: #FAEEDA; }
.tint-pink   { background: #FBEAF0; }
.tint-purple { background: #F0E9FA; }

/* --- нижняя панель --- */
.tab-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface-navy);
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  gap: 4px;
  z-index: 30;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 2px;
  font-size: 10px;
  cursor: pointer;
  border-radius: 12px;
  transition: background 120ms ease, color 120ms ease;
}
.tab-btn__icon { width: 20px; height: 20px; }
.tab-btn.active { color: #fff; background: rgba(255,255,255,0.2); }
.tab-btn:hover:not(.active) { background: rgba(255,255,255,0.08); }
.tab-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

/* --- контентная карточка (детали раздела) --- */
.detail-card {
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-stub);
  padding: 20px;
  margin-bottom: 16px;
}

.detail-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 14px;
  display: block;
}

.intro-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}
.detail-card.intro-card { text-align: center; }
.detail-card.intro-card p { margin: 0; }

.detail-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 10px;
}

.detail-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-on-paper-muted);
  margin: 0;
}

/* --- кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 11px;
  padding: 15px 18px;
  font-size: 16.5px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: filter 120ms ease, transform 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost { background: rgba(255,255,255,0.06); color: var(--text-on-dark); }
.btn--ghost:hover { background: rgba(255,255,255,0.1); }

.btn--paper { background: var(--ink-navy); color: var(--paper); }

.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { width: auto; flex: 1; }

/* --- формы / загрузка файлов --- */
.upload-zone {
  border: 2px dashed rgba(42, 36, 23, 0.28);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  color: var(--text-on-paper-muted);
  background: var(--paper-2);
  margin: 14px 0;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.upload-zone:hover { background: rgba(46, 111, 94, 0.08); border-color: var(--pine); }
.upload-zone:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

.file-chip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}

.file-chip {
  background: var(--surface-navy-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.docs-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--text-on-paper-muted);
  line-height: 1.6;
}

.apply-comment-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-on-paper-muted);
  margin: 14px 0 6px;
}
.apply-comment-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(42, 36, 23, 0.18);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-on-paper);
  background: var(--paper-2);
  box-sizing: border-box;
  resize: vertical;
  margin-bottom: 4px;
}
.apply-comment-input:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
input[type="date"].apply-comment-input {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

/* --- FAQ аккордеон --- */
.faq-item {
  background: var(--paper);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-stub);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-on-paper);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.faq-answer {
  display: none;
  padding: 0 16px 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-on-paper-muted);
}

.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-question__chevron { transform: rotate(180deg); }
.faq-question__chevron { transition: transform 150ms ease; color: var(--text-on-paper-muted); }

/* --- пустые состояния --- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-on-dark-muted);
}
.empty-state__icon { font-size: 34px; margin-bottom: 10px; }
.empty-state__title { font-family: var(--font-display); font-size: 17px; color: var(--text-on-dark); margin: 0 0 6px; }
.empty-state__text { font-size: 13.5px; margin: 0; }

/* --- тост --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink-navy);
  color: var(--text-on-dark);
  border: 1px solid rgba(232,234,240,0.15);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

/* --- реферальная ссылка --- */
.referral-box {
  background: var(--surface-navy-2);
  border-radius: var(--radius);
  padding: 16px;
  margin: 14px 0;
}
.referral-code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--ink-navy);
  padding: 10px 12px;
  border-radius: 8px;
  word-break: break-all;
  margin: 10px 0;
}

.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(232,234,240,0.25);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- маленький индикатор загрузки на кнопках отправки файла --- */
.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn-spinner--dark {
  border: 2px solid rgba(42, 36, 23, 0.25);
  border-top-color: var(--text-on-paper);
}

/* --- таймлайн прогресса заявки (светлая карточка) --- */
.app-timeline { display: flex; flex-direction: column; }
.app-timeline-step { display: flex; gap: 10px; align-items: center; }
.app-timeline-step__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--text-on-paper-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  border: 2px solid rgba(42, 36, 23, 0.15);
}
.app-timeline-step__dot--done {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
}
.app-timeline-step__label {
  font-size: 13px;
  color: var(--text-on-paper-muted);
  margin: 0;
}
.app-timeline-step__label--done {
  color: var(--text-on-paper);
  font-weight: 600;
}
.app-timeline-step__line {
  width: 2px;
  height: 16px;
  background: rgba(42, 36, 23, 0.15);
  margin-left: 11px;
}
.app-timeline-step__line--done { background: var(--pine); }

/* --- быстрые ответы в чате админа --- */
.admin-quick-replies {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  flex-shrink: 0;
}
.admin-quick-reply-btn {
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-on-dark);
  font-size: 12px;
  padding: 7px 12px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-quick-reply-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* --- внутренние вкладки экрана "Личный кабинет" --- */
.cabinet-subtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.cabinet-subtab-btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-dark-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 6px;
  cursor: pointer;
}
.cabinet-subtab-btn.active { background: #fff; color: var(--ink-navy); }
.cabinet-subtab-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
