/* client.css — клиентские экраны Штула (index.html).
   Подключается после client-base.css; токены и кнопки — оттуда. Отчёты этот файл не грузят. */

html.client { --line-strong: #cbd5e1; --text-soft: #334155; }
html.client body { font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Сброс глобальных стилей полей из client-base.css. Специфичность (0,0,1), как у них: побеждаем
   порядком подключения, а любой класс компонента (.btn, .icon-btn…) побеждает этот сброс. */
:where(html.client) button,
:where(html.client) input,
:where(html.client) select,
:where(html.client) textarea { margin: 0; }
:where(html.client) button { width: auto; padding: 0; background: none; border: 0; color: inherit; font: inherit; }
:where(html.client) a { color: var(--brand-fill); }

:where(html.client) [hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ───── Поля ───── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}
.field-label .count { font-weight: 400; color: var(--color-text-muted); }
.field-label .count.bad { color: var(--err); font-weight: 500; }
.field-hint { font-size: 0.75rem; line-height: 1.45; color: var(--color-text-muted); }
.inp,
html.client .field input,
html.client .field textarea,
html.client .field select {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--input-line);
  border-radius: var(--radius-md);
}
html.client .field textarea { min-height: 132px; resize: vertical; }
html.client .field input::placeholder,
html.client .field textarea::placeholder { color: #6b7789; }
html.client .field [aria-invalid="true"] { border-color: var(--err); }
html.client .field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .25); }

/* ───── Вход и регистрация ───── */
html.client main.container { width: 100%; }
html.client header { padding: 2rem 1.5rem 0; }
html.client header .container { display: flex; justify-content: center; padding: 0; }
.auth-card {
  max-width: 400px;
  width: 100%;
  margin: 0 auto 2rem;
  padding: 1.5rem;
}
.auth-title { font-size: 1.25rem; margin: 0 0 1rem; text-align: center; }
.auth-sub { margin: -0.5rem 0 1.25rem; text-align: center; font-size: 0.875rem; color: var(--color-text-muted); }
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 1.25rem;
  background: var(--color-border-muted);
  border-radius: var(--radius-md);
  padding: 3px;
}
.tab {
  flex: 1;
  min-height: 36px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--muted-strong);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tab[aria-selected="true"] {
  background: var(--color-surface);
  color: var(--color-text-strong);
  box-shadow: var(--shadow-edge);
}
.tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.auth-form .alert { margin: 0 0 1rem; }
.auth-form .btn.full { margin-top: 1.25rem; min-height: 42px; }
.password-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.auth-back { display: block; margin: 1rem auto 0; }
#resend-verification-btn { margin: -0.25rem 0 1rem; }

/* ───── Сайдбар: клиентские дополнения ───── */
.sidebar-item .i { width: 18px; height: 18px; }
.sidebar-profile .btn .i { width: 14px; height: 14px; }
.sidebar-profile .btn.full { min-height: 32px; padding: 0.35rem 0.75rem; font-size: 0.8125rem; }
.sidebar-balance { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 0.25rem; }
.sb-label { font-size: 0.75rem; color: var(--color-text-muted); }
.sb-value {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
  white-space: nowrap;
}
.sb-value .credit-icon { width: 14px; height: 14px; }
.sk-inline {
  display: inline-block;
  width: 96px;
  height: 1em;
  border-radius: 4px;
  background: var(--color-border-muted);
  vertical-align: middle;
}
.nav-account-btn { display: none; }
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-fill);
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}

/* ───── Раздел ───── */
.service-panel { display: none; max-width: 880px; }
.service-panel.active { display: block; }
.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.panel-title { display: flex; align-items: baseline; gap: 12px; flex: 1; min-width: 0; flex-wrap: wrap; }
.panel-title h1 { margin: 0; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: var(--color-text); }
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-strong) !important;
  text-decoration: none;
}
.doc-link:hover { color: var(--brand-fill) !important; text-decoration: underline; text-underline-offset: 2px; }
.doc-link .i { width: 13px; height: 13px; }
.panel-header .btn { flex: none; }
#app-error-msg { margin-bottom: 1rem; }

/* ───── Папки ───── */
.folder-bar { margin-bottom: 1rem; }
.folder-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fchip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--muted-strong);
  font-size: 0.8125rem;
  font-weight: 400;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  max-width: 260px;
}
.fchip:hover { background: var(--color-bg); border-color: var(--line-strong); }
.fchip.active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-fill); font-weight: 500; }
.fchip.drag-over { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-fill); }
.fchip-main {
  height: 100%;
  padding: 0 12px !important;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.fchip:has(.fchip-more) .fchip-main { padding-right: 4px !important; }
.fchip-more {
  width: 0;
  height: 24px;
  margin-right: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.15s, width 0.15s;
}
.fchip:hover .fchip-more,
.fchip:focus-within .fchip-more,
.fchip.active .fchip-more,
.fchip-more[aria-expanded="true"] { width: 24px; margin-right: 4px; opacity: 1; }
.fchip-more:hover { background: rgba(15, 23, 42, .06); }
.fchip-main:focus-visible,
.fchip-more:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (hover: none) {
  .fchip.active .fchip-more { width: 24px; margin-right: 4px; opacity: 1; } /* на таче меню — у выбранной папки */
}
.fchip.add { border-style: dashed; }
.fchip.add .fchip-main { display: inline-flex; align-items: center; gap: 4px; }
.fchip-input {
  height: 32px;
  width: 160px;
  padding: 0 12px;
  font-size: 0.8125rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  box-shadow: var(--ring);
  background: var(--color-surface);
  color: var(--color-text);
}
.fchip-input:focus { outline: none; }

/* Меню (действия с папкой, перенос в папку) */
.menu {
  position: fixed;
  z-index: 600;
  min-width: 210px;
  max-width: 280px;
  max-height: min(360px, calc(100vh - 32px));
  overflow-y: auto;
  padding: 4px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
}
.menu-head { padding: 6px 10px 4px; font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); }
.menu-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  min-height: 34px;
  padding: 0 10px !important;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  text-align: left;
  color: var(--color-text);
  cursor: pointer;
}
.menu-item:hover { background: var(--color-border-muted); }
.menu-item:focus-visible { background: var(--color-border-muted); outline: 2px solid var(--brand); outline-offset: -2px; }
.menu-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .i { width: 14px; height: 14px; }
.menu-item[aria-checked="true"] { color: var(--brand-fill); font-weight: 500; }
.menu-item.danger { color: var(--err); }
.menu-item.accent { color: var(--brand-fill); }
.menu-sep { height: 1px; background: var(--color-border-muted); margin: 4px 0; }
.menu-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  font-size: 0.8125rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--ring);
}

/* ───── Карточка анализа ───── */
.job-list { display: flex; flex-direction: column; gap: 12px; }
.job {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-edge);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}
.job:hover { border-color: var(--line-strong); }
.job[draggable="true"] { cursor: grab; }
.job.dragging { opacity: 0.5; }
.job-head { display: flex; align-items: flex-start; gap: 10px; }
.job-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: var(--radius-sm);
  flex: none;
  display: grid;
  place-items: center;
  background: var(--color-border-muted);
  color: var(--color-text-muted);
  overflow: hidden;
}
.job-icon { position: relative; }
.job-icon img { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; display: block; opacity: 0; }
.job-icon.has-fav { background: transparent; }
.job-icon.has-fav img { opacity: 1; }
.job-icon.has-fav .i { visibility: hidden; }
.job-icon .i { width: 13px; height: 13px; }
.job-main { flex: 1; min-width: 0; }
.job-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  overflow-wrap: anywhere;
}
.job-sub { margin: 2px 0 0; font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.45; }
.job-actions { display: flex; gap: 2px; margin: -4px -8px 0 0; flex: none; }
.job-actions .job-more { display: none; }
.job-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 75ch;
}
.job-foot {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-muted);
}
.job-when { font-size: 0.8125rem; color: var(--color-text-muted); }
.job-when.ok { color: var(--ok); font-weight: 500; }
.job-when.warn { color: var(--warn); font-weight: 500; }
.job-foot > .btn { margin-left: auto; } /* действие всегда справа, и при переносе строки тоже */
.job-report .i { width: 14px; height: 14px; }

/* Чип состояния */
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.state.run { background: var(--run-bg); color: var(--run); }
.state.run::before { background: var(--run-dot); animation: pulse-dot 1.8s ease-in-out infinite; }
.state.slow { background: var(--warn-bg); color: var(--warn); }
.state.slow::before { background: var(--warn-dot); }
.state.done { background: var(--ok-bg); color: var(--ok); }
.state.done::before { background: var(--ok-dot); }
.state.error { background: var(--err-bg); color: var(--err); }
.state.error::before { background: var(--err-dot); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Интент: запросы и бары */
.qchips { display: flex; flex-wrap: wrap; gap: 6px; }
.qchip {
  max-width: 240px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qchip.more { color: var(--color-text-muted); }
.ibars { display: flex; flex-direction: column; gap: 8px; }
.ibar-row { display: grid; grid-template-columns: 16px 1fr; gap: 4px 8px; align-items: center; }
.ibar-row img { width: 16px; height: 16px; display: block; }
.ibar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.ibar span { height: 100%; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .14); } /* пастель .t-* без края сливается с белым */
.ibar-sum { grid-column: 2; font-size: 0.75rem; color: var(--color-text-muted); }

/* Ссылки: цифры */
.stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; }
.stat { display: flex; flex-direction: column-reverse; }
.stat dt { font-size: 0.75rem; color: var(--color-text-muted); }
.stat dd { margin: 0; font-size: 1.0625rem; font-weight: 500; color: var(--text-soft); line-height: 1.3; }

/* Скелет, пусто, ещё */
.job.sk { gap: 14px; }
.sk-bar {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.empty {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-fill);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.empty-ico .i { width: 20px; height: 20px; }
.empty h2 { margin: 0; font-size: 1rem; font-weight: 500; color: var(--color-text); }
.empty p { margin: 0 0 8px; max-width: 52ch; font-size: 0.875rem; color: var(--color-text-muted); }
.list-error {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.load-more-wrap { display: flex; justify-content: center; padding: 1rem 0 0; }
.load-more-wrap:empty { display: none; }

/* ───── Диалоги ───── */
dialog.dlg {
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
dialog.dlg[open] { display: flex; flex-direction: column; animation: dlg-in 0.18s cubic-bezier(.16, 1, .3, 1); }
dialog.dlg.wide { width: min(640px, calc(100vw - 32px)); }
dialog.dlg.xwide { width: min(760px, calc(100vw - 32px)); }
dialog.dlg::backdrop { background: rgba(15, 23, 42, .45); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dlg-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 4px; }
.dlg-head h2 { color: var(--color-text); margin: 0; flex: 1; min-width: 0; font-size: 1.125rem; line-height: 1.4; overflow-wrap: anywhere; }
.dlg-head .icon-btn { margin: -4px -8px 0 0; }
.dlg-body { padding: 12px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.dlg-body > p { margin: 0 0 12px; font-size: 0.9375rem; line-height: 1.55; }
.dlg-body > .alert { margin: 16px 0 0; }
.dlg-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-muted);
  background: #fcfdfe;
}
.dlg-foot .grow { flex: 1; }
.dlg-foot .btn { min-height: 38px; }
.price { flex: 1 1 100%; display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 2px; min-width: 0; font-size: 0.8125rem; color: var(--muted-strong); line-height: 1.45; }
.price b { color: var(--color-text); font-weight: 500; }
.price:empty { display: none; } /* без строки цены в подвале остаются только кнопки */
.price .short { color: var(--err); font-weight: 500; }
.dlg-note { margin: 12px 0 0; font-size: 0.8125rem; color: var(--color-text-muted); }
.dlg-foot-note { margin: 0; font-size: 0.8125rem; line-height: 1.45; color: var(--color-text-muted); }
.dlg-head h2:focus { outline: none; }

/* Факты в деталях анализа */
.facts { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; margin: 0; font-size: 0.875rem; }
.facts dt { color: var(--color-text-muted); }
.facts dd { margin: 0; color: var(--color-text); overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8125rem; }
.with-copy { display: inline-flex; align-items: center; gap: 6px; }
.with-copy .icon-btn { width: 26px; height: 26px; }
.listbox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 8px; font-size: 0.8125rem; font-weight: 500; color: var(--color-text); }
.listbox {
  margin: 0;
  padding: 4px 12px;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border-muted);
  border-radius: var(--radius-md);
}
.listbox li { padding: 6px 0; font-size: 0.8125rem; border-bottom: 1px solid var(--color-border-muted); overflow-wrap: anywhere; }
.listbox li:last-child { border-bottom: 0; }
.warnbox {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border-radius: var(--radius-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.5;
}
.warnbox .i { color: var(--warn); margin-top: 2px; }

/* ───── Форма интента ───── */
.form-block + .form-block { margin-top: 20px; }
.form-block-title { margin: 0 0 8px; font-size: 0.8125rem; font-weight: 500; color: var(--color-text); }
.engines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.engine { display: flex; flex-direction: column; gap: 6px; }
.engine-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--muted-strong);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.engine-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.engine-opt img { width: 18px; height: 18px; opacity: .55; }
.engine-opt .tick {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--input-line);
  display: grid;
  place-items: center;
  color: transparent;
}
.engine-opt .tick .i { width: 12px; height: 12px; stroke-width: 3; }
.engine-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-fill); }
.engine-opt:has(input:checked) img { opacity: 1; }
.engine-opt:has(input:checked) .tick { background: var(--brand-fill); border-color: var(--brand-fill); color: #fff; }
.engine-opt:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
html.client .engine select {
  width: 100%;
  min-height: 38px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-md);
  background-color: var(--color-surface);
}
html.client .engine select:disabled { opacity: .5; cursor: not-allowed; }
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-md);
  background: var(--color-border-muted);
}
.seg button {
  min-width: 56px;
  min-height: 32px;
  padding: 0 12px !important;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-strong);
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-text-strong); box-shadow: var(--shadow-edge); }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.seg-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg-row .field-hint { flex: 1; min-width: 180px; }

/* ───── Пополнение ───── */
.pay-balance { margin: 0 0 16px; font-size: 0.875rem; color: var(--muted-strong); }
.pay-balance b { color: var(--color-text); font-weight: 500; }
.payment-packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.payment-pkg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px 16px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.payment-pkg.pkg-featured { border-color: var(--brand-line); background: var(--brand-soft); }
.pkg-badge {
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-fill);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.pkg-amount { display: flex; align-items: center; gap: 6px; font-size: 1.625rem; font-weight: 600; color: var(--color-text); line-height: 1.15; letter-spacing: -0.01em; }
.pkg-token { width: 20px; height: 20px; }
.pkg-label { font-size: 0.8125rem; color: var(--color-text-muted); }
.pkg-features { list-style: none; margin: 12px 0; padding: 0; flex: 1; }
.pkg-features li { padding: 4px 0; font-size: 0.8125rem; color: var(--muted-strong); border-bottom: 1px solid var(--color-border-muted); }
.pkg-featured .pkg-features li { border-bottom-color: #dbeafe; }
.pkg-featured .pkg-label,
.pkg-featured .pkg-unit { color: var(--muted-strong); } /* #64748b на голубом не дотягивает до 4.5 */
.pkg-features li:last-child { border-bottom: 0; }
.pkg-price { font-size: 1.0625rem; font-weight: 500; color: var(--color-text); margin: 0 0 10px; }
.pkg-unit { font-size: 0.8125rem; font-weight: 400; color: var(--color-text-muted); }
.pkg-buy-btn { min-height: 38px; }

/* ───── Шторка аккаунта (мобила) ───── */
dialog.sheet {
  margin: auto 0 0;
  width: 100%;
  max-width: 100%;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 16px 16px 0 0;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-pop);
}
dialog.sheet[open] { display: flex; flex-direction: column; gap: 12px; animation: sheet-in 0.22s cubic-bezier(.16, 1, .3, 1); }
dialog.sheet::backdrop { background: rgba(15, 23, 42, .45); }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 36px; height: 4px; margin: 0 auto 4px; border-radius: 99px; background: var(--color-border); }
.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head .sidebar-user { min-width: 0; }
.sheet-head .icon-btn { width: 40px; height: 40px; margin-right: -8px; }
.sheet-balance { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 14px; border-radius: var(--radius-md); background: var(--color-bg); }
.sheet-balance .sb-value { font-size: 1rem; }
dialog.sheet .btn { min-height: 44px; }
dialog.sheet .sheet-logout { margin-top: 8px; color: var(--err); }

/* ───── Тосты ───── */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-text-strong);
  color: #f8fafc;
  box-shadow: var(--shadow-pop);
  font-size: 0.875rem;
  line-height: 1.45;
  animation: toast-in 0.22s cubic-bezier(.16, 1, .3, 1);
}
.toast .i { margin-top: 2px; color: #4ade80; }
.toast .msg { flex: 1; min-width: 0; }
.toast .icon-btn { width: 24px; height: 24px; color: var(--line-strong); }
.toast .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.toast.error { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--err-line); }
.toast.error .i { color: var(--err); }
.toast.error .icon-btn { color: var(--color-text-muted); }
.toast.error .icon-btn:hover { background: var(--color-border-muted); color: var(--color-text-strong); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───── Мобила ───── */
@media (max-width: 768px) {
  .nav-account-btn { display: flex; }
  .service-panel { max-width: none; }
  .panel-title h1 { font-size: 1.25rem; }
  .panel-header .btn { min-height: 40px; }
  .job { padding: 14px 16px; }
  .job-actions .icon-btn { display: none; }
  .job-actions .job-more { display: inline-flex; width: 40px; height: 40px; }
  .job-actions { margin: -10px -12px 0 0; }
  .job-foot .job-report { min-height: 40px; }
  .fchip { height: 40px; }
  .fchip-input { height: 40px; }
  .fchip.active .fchip-more { width: 32px; height: 32px; margin-right: 4px; opacity: 1; }
  .menu-item { min-height: 44px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .engines { grid-template-columns: 1fr; }
  .payment-packages { grid-template-columns: 1fr; gap: 16px; }
  .dlg-foot .btn { min-height: 44px; }
  .dlg-head .icon-btn { width: 40px; height: 40px; margin: -8px -10px 0 0; }
  .toasts { left: 16px; right: 16px; bottom: 76px; width: auto; }
  .seg button { min-height: 40px; }
}
@media (max-width: 480px) {
  dialog.dlg,
  dialog.dlg.wide,
  dialog.dlg.xwide { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dlg-foot { padding: 12px 16px; }
  .dlg-foot .grow { display: none; }
  .dlg-foot .btn { flex: 1; }
}

/* Сумма с монеткой-токеном в строке цены */
.coin-i { width: 13px; height: 13px; margin-left: 3px; vertical-align: -2px; }
