/* Светлая футуристичная тема: индиго-акцент, мягкий градиентный фон,
   объёмные карточки и кнопки с эффектом нажатия. */

:root {
  --bg-grad: linear-gradient(160deg, #f0f3ff 0%, #e9f7fa 55%, #eef0ff 100%);
  --card: #ffffff;
  --card-grad: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
  --text: #23264d;
  --muted: #8b90b0;
  --accent: #5b5ef4;
  --accent-soft: #eceeff;
  --expense: #ee5a6f;
  --income: #2ec27e;
  --warn: #f2a83c;
  --radius: 18px;
  /* Объём: двойная тень — мягкая цветная + контактная */
  --shadow-card: 0 6px 16px rgba(46, 54, 128, .10), 0 2px 4px rgba(46, 54, 128, .05);
  --shadow-key: 0 4px 12px rgba(91, 94, 244, .14), 0 1px 2px rgba(46, 54, 128, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-grad) fixed;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  /* Отключаем зум по двойному тапу: быстрые повторные нажатия кнопок
     не должны увеличивать страницу */
  touch-action: manipulation;
}

button, input { touch-action: manipulation; }

.screen {
  max-width: 430px;
  margin: 0 auto;
  padding: 12px 16px 84px; /* снизу место под таббар */
}

.hidden { display: none !important; }

/* Кто вошёл: мелкий email вверху главного экрана */
.whoami {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  opacity: .8;
  margin-bottom: 4px;
  min-height: 14px;
  cursor: pointer; /* тап открывает шторку «Аккаунт» */
}

/* Переключатель расход/доход */
.kind-switch {
  display: flex;
  background: rgba(91, 94, 244, .10);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 8px;
}
.kind-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 14px;
  cursor: pointer;
}
.kind-btn.active {
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(46, 54, 128, .14);
}

/* Сумма */
.amount-display {
  text-align: center;
  padding: 12px 0 4px;
  font-size: 44px;
  font-weight: 700;
  min-height: 66px;
}
.currency { color: var(--muted); margin-left: 6px; font-size: 32px; }

/* Режим «Доход»: зелёная подсветка суммы (не спутать с тратой) */
.income-mode .amount-display { color: var(--income); }
.income-mode .kind-btn.active { color: var(--income); }

/* «Свободно в этом месяце» под суммой: баланс без прокрутки */
.free-balance {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--income);
  margin-bottom: 2px;
}
.free-balance.negative { color: var(--expense); }

/* «Всего денег» — все счета; тап открывает шторку */
.total-money {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  cursor: pointer;
}

.account-row.active-account { outline: 2px solid var(--accent); }
.account-mark { font-size: 11px; color: var(--accent); font-weight: 700; }

/* «Можно тратить N в день» под суммой */
.daily-allowance {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Клавиатура: объёмные скруглённые клавиши с нажатием */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.key {
  border: none;
  background: linear-gradient(180deg, #ffffff 0%, #eef0fd 100%);
  border-radius: 22px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  padding: 13px 0;
  cursor: pointer;
  box-shadow: var(--shadow-key), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .08s ease, box-shadow .08s ease;
}
.key:active {
  transform: translateY(2px);
  box-shadow: 0 1px 4px rgba(91, 94, 244, .18);
  background: linear-gradient(180deg, #f2f3ff 0%, #e6e9fb 100%);
}
.key-back { color: var(--accent); }

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

/* Чипы даты операции */
.date-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  position: relative;
}
.date-chip {
  border: none;
  background: #eceefb;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.date-chip.selected { background: var(--accent); color: #fff; }
.custom-date-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Категории: объёмные карточки */
.categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.category {
  border: none;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 12px 4px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .8);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  transition: transform .08s ease, box-shadow .08s ease;
}
.category:active {
  transform: translateY(2px) scale(.97);
  box-shadow: 0 2px 6px rgba(46, 54, 128, .12);
}
/* Заметка к операции */
.note-input { margin-bottom: 8px; }

/* Ссылка и список «Изменить категории» */
.cat-edit-link {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: block;
  margin: -12px auto 12px;
  padding: 6px;
  text-decoration: underline;
}
.cat-edit-row { display: flex; align-items: center; gap: 10px; }
.cat-edit-row .icon { font-size: 20px; }
.cat-edit-row .name { flex: 1; font-size: 14px; font-weight: 600; }
.cat-row-btn {
  border: none;
  background: #eceefb;
  color: var(--accent);
  border-radius: 10px;
  font-size: 15px;
  padding: 7px 12px;
  cursor: pointer;
}

/* Признак «обязательная/гибкая» в форме категории */
.essential-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.essential-hint { font-size: 11px; color: var(--muted); flex-basis: 100%; }

/* Плитка «добавить свою категорию» */
.category-add {
  background: transparent;
  border: 2px dashed rgba(91, 94, 244, .4);
  box-shadow: none;
  color: var(--accent);
}
.category-add .icon { font-size: 22px; color: var(--accent); }
.category-add .name { color: var(--accent); }

/* Последняя использованная категория — подсвечена (умный дефолт) */
.category.last-used {
  outline: 2px solid var(--accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
}
.category .icon { font-size: 24px; }

/* 3D-иконки: картинка масштабируется под размер шрифта родителя */
.icon-img {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.22em;
  object-fit: contain;
}
.tab-icon .icon-img { width: 24px; height: 24px; vertical-align: middle; }
.save-offer-goal .icon-img { width: 22px; height: 22px; vertical-align: -5px; }
.category .name {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Итоги месяца */
.month-totals {
  display: flex;
  justify-content: space-between;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.total { display: flex; flex-direction: column; gap: 2px; }
.total-label { font-size: 12px; color: var(--muted); }
.total-value { font-size: 16px; font-weight: 700; }
.total-value.expense { color: var(--expense); }
.total-value.income { color: var(--income); }
.total-value.saved { color: var(--accent); }

/* Сворачиваемый заголовок списка операций */
.ops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card-grad);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.ops-header .chevron {
  color: var(--accent);
  font-size: 16px;
  transition: transform .2s ease;
}
.ops-header.collapsed .chevron { transform: rotate(-90deg); }

/* Лента операций */
.operations { list-style: none; }
.operations.collapsed { display: none; }
.operation {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.operation .icon { font-size: 20px; }
.operation .info { flex: 1; min-width: 0; }
.operation .cat { font-size: 14px; font-weight: 600; }
.operation .date { font-size: 12px; color: var(--muted); }
.operation .sum { font-weight: 700; font-size: 15px; }
.operation .sum.expense { color: var(--expense); }
.operation .sum.income { color: var(--income); }
.operation .delete {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
}
/* Переводы в ленте */
.transfer-op .icon { color: var(--accent); font-weight: 700; }
.transfer-sum { color: var(--accent); }

/* Операции, отвергнутые сервером */
.failed-op { outline: 1px solid rgba(238, 90, 111, .4); }
.failed-label { color: var(--expense); }
.fix-btn {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Двухшаговое удаление операции: ✕ → «Точно?» */
.operation .delete.confirm {
  color: #fff;
  background: var(--expense);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Экран «Отчёт» ---------- */

.month-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 6px 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.month-arrow {
  border: none;
  background: transparent;
  font-size: 26px;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 14px;
}
.month-title { font-size: 16px; font-weight: 700; text-transform: capitalize; }

.donut-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.donut-total { font-size: 22px; font-weight: 700; }
.donut-label { font-size: 12px; color: var(--muted); }

.compare-line {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  min-height: 18px;
}

/* Столбики за полгода */
.history-card {
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 12px 12px 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.history-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.income-dot { background: var(--income); }
.expense-dot { background: var(--expense); }

.report-categories { list-style: none; }
.report-cat {
  background: var(--card-grad);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.report-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  cursor: pointer;
}
.report-cat .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.report-cat .icon { font-size: 20px; }
.report-cat .name { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; }
.report-cat .pct { font-size: 12px; color: var(--muted); margin-right: 6px; }
.report-cat .sum { font-weight: 700; font-size: 14px; }

/* Раскрытый список трат категории (drill-down) */
.report-cat-ops { list-style: none; border-top: 1px solid #eceefb; }
.report-cat-ops li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 8px 44px;
  font-size: 13px;
  color: var(--text);
}
.report-cat-ops .op-date { color: var(--muted); flex-shrink: 0; }
.report-cat-ops .op-note {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.report-empty {
  text-align: center;
  color: var(--muted);
  margin-top: 24px;
}

/* ---------- Экран «Лимиты» ---------- */

.limits-header { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.limits-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.limits-list { list-style: none; }
.limit-item {
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.limit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.limit-row .icon { font-size: 20px; }
.limit-row .name { flex: 1; font-size: 14px; font-weight: 600; }
.limit-row .amounts { font-size: 13px; color: var(--muted); }
.limit-row .amounts b { color: var(--text); }

/* «Резервуар»: полоса заполнения тратами месяца */
.reservoir {
  height: 12px;
  background: #e7e9f7;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(46, 54, 128, .12);
}
.reservoir-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #43d492, var(--income));
  transition: width .3s ease;
}
.reservoir-fill.warn {
  background: linear-gradient(180deg, #f7bc5e, var(--warn));  /* от 75% */
}
.reservoir-fill.danger {
  background: linear-gradient(180deg, #f57f90, var(--expense)); /* от 90% */
}

.limit-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.limit-hint.over { color: var(--expense); font-weight: 600; }

.limit-none {
  font-size: 13px;
  color: var(--muted);
}

/* Инлайн-форма задания лимита */
.limit-edit {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.limit-edit input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d3d7f0;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 15px;
  background: #fff;
}
.limit-edit button {
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.limit-save { background: var(--accent); color: #fff; box-shadow: var(--shadow-key); }
.limit-remove { background: #eceefb; color: var(--muted); }

/* ---------- Экран «Копилка» ---------- */

.goals-list { list-style: none; }
.goal-item {
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.goal-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.goal-top .icon { font-size: 26px; }
.goal-top .name { flex: 1; font-size: 15px; font-weight: 700; }
.goal-top .delete {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 6px;
}
.goal-top .delete.confirm {
  color: #fff;
  background: var(--expense);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

.goal-amounts { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.goal-amounts b { color: var(--text); font-size: 15px; }

.goal-bar {
  height: 14px;
  background: #e7e9f7;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(46, 54, 128, .12);
  margin-bottom: 6px;
}
.goal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6d70ff, var(--accent));
  transition: width .4s ease;
}
.goal-bar-fill.done { background: linear-gradient(90deg, #43d492, var(--income)); }

.goal-forecast { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.goal-done-label { color: var(--income); font-weight: 700; }

/* Меню цели: убрать / перенести */
.goal-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  border-top: 1px solid #eceefb;
  padding-top: 10px;
}
.goal-menu-btn {
  border: none;
  background: #eceefb;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.goal-menu-btn.danger { background: #fdeaea; color: var(--expense); }

/* Онбординг */
.onb-body { display: flex; flex-direction: column; gap: 8px; }
.onb-limit-row { display: flex; align-items: center; gap: 10px; }
.onb-limit-row .name { flex: 1; font-size: 14px; font-weight: 600; }
.onb-limit-row .onb-limit-input { width: 130px; }

/* Ссылки выгрузки CSV в шторке аккаунта */
.export-links { display: flex; gap: 8px; }
.export-links .goal-menu-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  display: block;
}

.goal-deposit-btn {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.goal-add-btn {
  width: 100%;
  border: 2px dashed rgba(91, 94, 244, .4);
  background: transparent;
  color: var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 14px;
}

.goal-form {
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.goal-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.goal-icon-opt {
  border: none;
  background: #f1f2fc;
  border-radius: 12px;
  font-size: 22px;
  padding: 8px 10px;
  cursor: pointer;
}
.goal-icon-opt.selected { outline: 2px solid var(--accent); background: var(--accent-soft); }

.save-percent-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  color: var(--muted);
}
.percent-options { display: flex; gap: 6px; }
.percent-opt {
  border: none;
  background: #f1f2fc;
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.percent-opt.selected { background: var(--accent); color: #fff; }

/* Предложение отложить процент дохода (нижняя шторка) */
.save-offer {
  position: fixed;
  inset: 0;
  background: rgba(35, 38, 77, .45);
  display: flex;
  align-items: flex-end;
  z-index: 20;
}
.save-offer-card {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(46, 54, 128, .25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.save-offer-title { font-size: 17px; font-weight: 800; text-align: center; }
.save-offer-sub { font-size: 13px; color: var(--muted); text-align: center; }
.save-offer-goals { display: flex; flex-direction: column; gap: 8px; }
.save-offer-goal {
  border: none;
  background: linear-gradient(180deg, #6d70ff, var(--accent));
  color: #fff;
  border-radius: 14px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-key);
}
.save-offer-goal:active { transform: translateY(1px); }

/* ---------- Экран «План» ---------- */

.plan-section { font-size: 15px; font-weight: 700; margin: 14px 0 8px; }

.plan-advice { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.advice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--card-grad);
  border-radius: var(--radius);
  padding: 11px 13px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  line-height: 1.45;
}
.advice-card .icon-img { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.advice-card.warn { border-left: 4px solid var(--warn); }
.advice-card.info { border-left: 4px solid var(--accent); }
.advice-card.ok { border-left: 4px solid var(--income); }

.plan-avg { font-size: 12px; color: var(--muted); }
.plan-amount { font-size: 14px; font-weight: 700; }
.plan-amount.empty { color: var(--muted); font-weight: 500; }

/* ---------- Экран входа ---------- */

.auth-screen {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-bottom: 16px;
}
.auth-card {
  width: 100%;
  background: var(--card-grad);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 12px 32px rgba(46, 54, 128, .16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-title { font-size: 24px; font-weight: 800; text-align: center; }
.auth-sub {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.4;
}
.auth-input {
  border: 1px solid #d3d7f0;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
}
.auth-input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.auth-error {
  color: var(--expense);
  font-size: 13px;
  text-align: center;
  min-height: 16px;
}
.auth-btn {
  border: none;
  background: linear-gradient(180deg, #6d70ff, var(--accent));
  color: #fff;
  border-radius: 14px;
  padding: 13px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-key);
}
.auth-btn:active { transform: translateY(1px); opacity: .9; }
.auth-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
}

/* Блок аккаунта внизу «Лимитов» */
.account-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding: 10px 14px;
  background: var(--card-grad);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.account-email { font-size: 13px; color: var(--muted); }
.logout-btn {
  border: none;
  background: #eceefb;
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Нижняя навигация: «стеклянная» панель ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(91, 94, 244, .12);
  box-shadow: 0 -4px 16px rgba(46, 54, 128, .08);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 10;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}
.tab.active { color: var(--accent); font-weight: 600; }
.tab-icon { font-size: 20px; }

/* Всплывающее уведомление */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px; /* над таббаром */
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: all .25s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(35, 38, 77, .3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.has-action { pointer-events: auto; }
.toast-btn {
  border: none;
  background: rgba(255, 255, 255, .18);
  color: #a8b0ff;
  border-radius: 999px;
  padding: 5px 12px;
  margin-left: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
