/* =============================================================================
   Scale — кабинет (макет). Стиль и токены 1:1 с лендингом scalev2.
   Палитра/шрифт/паттерн наследуются из tokens.css. Здесь — только оболочка
   админки и её компоненты. Акцент на микроанимациях каждого действия.
   ============================================================================= */

:root {
  --sb-w: 250px;
  --tb-h: 64px;
  --card-radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body.admin { overflow-x: hidden; }

/* свой фон Scale — «сетка + знак S» (заменяет мерчевский Pattern.svg из tokens) */
body::before {
  background-image: url('../images/bg-smesh.svg');
  background-size: 480px 480px;
  background-repeat: repeat;
  background-position: center;
  opacity: .10;
}
html.dark body::before { opacity: .075; }
h1, h2, h3, h4 { letter-spacing: -.015em; }
.muted { color: var(--text-secondary); font-size: 13px; }
.muted.sm { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ta-r { text-align: right; }

/* ---------- каркас ---------- */
.app { display: flex; min-height: 100dvh; }

/* ---------- сайдбар ---------- */
.sidebar {
  width: var(--sb-w); flex: none;
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  z-index: 30;
}
.sb-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px 16px; text-decoration: none; color: var(--text-primary);
}
.sb-brand img { width: 30px; height: 30px; border-radius: 8px; clip-path: inset(2px round 6px); }
.mark-dark { display: none; } html.dark .mark-light { display: none; } html.dark .mark-dark { display: block; }
.sb-brand b { font-size: 19px; font-weight: 700; }
.sb-env {
  margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px;
}

.nav { position: relative; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.nav-ind {
  position: absolute; left: 0; right: 0; top: 0; height: 44px;
  border-radius: 11px; background: var(--contrast);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px -8px rgba(0,0,0,.25);
  transition: transform .42s var(--ease), opacity .3s ease;
  z-index: 0;
}
.nav-link {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  height: 44px; padding: 0 13px; border-radius: 11px;
  color: var(--text-secondary); text-decoration: none;
  font-size: 14.5px; font-weight: 500;
  overflow: hidden;
  transition: color .2s ease;
}
.nav-link svg { width: 19px; height: 19px; flex: none; transition: transform .3s var(--ease); }
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover svg { transform: translateY(-1px) scale(1.06); }
.nav-link.active { color: var(--text-primary); }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600;
  color: var(--text-secondary); background: var(--bg);
  border-radius: 999px; padding: 2px 7px; min-width: 22px; text-align: center;
}

.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.sb-theme {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-secondary);
  background: transparent; border: 1px solid var(--border);
  transition: color .2s, border-color .2s, background .2s;
}
.sb-theme:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.sb-theme svg { width: 18px; height: 18px; flex: none; }
.icon-moon { display: none; } html.dark .icon-sun { display: none; } html.dark .icon-moon { display: block; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.sb-ava {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
  color: var(--text-on-accent); background: var(--accent);
}
.sb-user-txt { display: grid; line-height: 1.25; }
.sb-user-txt b { font-size: 13px; }
.sb-user-txt i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); }
.sb-logout { margin-left: auto; width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 9px; cursor: pointer; color: var(--text-secondary); background: transparent; border: 1px solid var(--border); transition: color .2s, border-color .2s, transform .15s var(--ease); }
.sb-logout:hover { color: var(--status-red); border-color: var(--status-red); }
.sb-logout:active { transform: scale(.92); }
.sb-logout svg { width: 17px; height: 17px; }

/* ---------- основная зона ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--tb-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 600; }
.tb-search {
  margin-left: 8px; flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-light);
  transition: border-color .2s, box-shadow .2s;
}
.tb-search.inline { max-width: 320px; margin: 0; }
.tb-search svg { width: 16px; height: 16px; flex: none; color: var(--text-secondary); }
.tb-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 14px; color: var(--text-primary);
}
.tb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.tb-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-secondary);
}
.tb-live.sm { font-size: 11.5px; }
.tb-live i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--status-green);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-green) 60%, transparent);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--status-green) 55%, transparent); } 70%,100% { box-shadow: 0 0 0 7px transparent; } }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; color: var(--text-secondary);
  background: var(--bg-light); border: 1px solid var(--border);
  transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.icon-btn.spin svg { animation: spin .7s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

.content { padding: clamp(18px, 3vw, 30px); flex: 1; }

/* ---------- переключение разделов ---------- */
.view { display: none; }
.view.active { display: block; }
/* восстановление активной вкладки ДО запуска JS (без мигания); JS снимает data-sv */
html[data-sv] .view.active { display: none; }
html[data-sv="overview"] .view[data-view="overview"],
html[data-sv="payments"] .view[data-view="payments"],
html[data-sv="sweep"] .view[data-view="sweep"],
html[data-sv="wallets"] .view[data-view="wallets"],
html[data-sv="settings"] .view[data-view="settings"] { display: block; }
/* появление карточек со ступенчатой задержкой (--d ставит JS) */
.anim { opacity: 0; transform: translateY(16px); }
.view.active .anim { animation: cardIn .55s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes cardIn { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .anim { opacity: 1; transform: none; animation: none !important; }
}

/* ---------- карточки ---------- */
.card {
  background: var(--contrast); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 20px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .2s;
}
.card.pad0 { padding: 0; overflow: hidden; }
.card.wide { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; }

/* статы */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 116px; overflow: hidden; }
.stat:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(0,0,0,.4); }
.stat-lab { font-size: 12.5px; color: var(--text-secondary); }
.stat-val { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 12px; color: var(--text-secondary); }
.stat-delta.up { color: hsl(145, 50%, 42%); }
html.dark .stat-delta.up { color: var(--status-green); }
.stat-delta.down { color: hsl(1, 60%, 50%); }
html.dark .stat-delta.down { color: var(--status-red); }
.apply-err { font-size: 12.5px; color: hsl(1, 60%, 50%); margin: 8px 2px 0; }
html.dark .apply-err { color: var(--status-red); }
.stat-link { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; width: fit-content; }
.stat-link:hover { text-decoration: underline; }
.spark { position: absolute; right: 0; bottom: 0; width: 60%; height: 36px; opacity: .5; pointer-events: none; }

/* двухколоночная зона */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

/* активы */
.assets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.asset { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; transition: background .2s; }
.asset:hover { background: var(--bg-light); }
.asset img { width: 30px; height: 30px; }
.asset-name { display: grid; line-height: 1.25; }
.asset-name b { font-size: 14px; }
.asset-name i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); }
.asset-val { text-align: right; display: grid; line-height: 1.3; }
.asset-val b { font-size: 14px; font-variant-numeric: tabular-nums; }
.asset-val i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); }
.asset-bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.asset-bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); width: 0; transition: width 1s var(--ease) .2s; }

/* лента платежей */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.feed .dp-st, .feed .dp-coin, .feed .dp-sum, .feed .dp-time { flex: none; }
.feed li:last-child { border-bottom: 0; }
.feed li.fresh { animation: feedIn .55s var(--ease); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-10px); background: color-mix(in srgb, var(--accent) 10%, transparent); } to { opacity: 1; transform: none; } }
.dp-st { width: 9px; height: 9px; border-radius: 50%; }
.dp-st.ok { background: var(--status-green); }
.dp-st.wait { background: var(--status-yellow); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.dp-id { flex: 1; min-width: 0; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-coin { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.dp-sum { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dp-time { font-size: 11.5px; color: var(--text-secondary); }

/* столбики объёма */
.bars { display: flex; align-items: flex-end; gap: clamp(5px, 1.4vw, 14px); height: 150px; padding-top: 8px; }
.bar { flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); height: 0; transition: height .8s var(--ease); position: relative; cursor: pointer; }
.bar:hover { filter: brightness(1.08); }
.bar::after { content: attr(data-v); position: absolute; top: -22px; left: 50%; transform: translateX(-50%) scale(.8); opacity: 0; font-size: 11px; font-weight: 600; white-space: nowrap; background: var(--text-primary); color: var(--bg); padding: 2px 7px; border-radius: 6px; transition: opacity .2s, transform .2s; pointer-events: none; }
.bar:hover::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* платежи сегодня (воронка) */
.today-grid { display: grid; grid-template-columns: 210px 1fr; gap: clamp(20px, 4vw, 44px); align-items: center; }
.today-conv { display: flex; flex-direction: column; gap: 3px; }
.today-conv .stat-val { font-size: 42px; line-height: 1; }
.conv-meta { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; }
.today-funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.today-funnel li { display: grid; grid-template-columns: 86px 1fr 34px; align-items: center; gap: 14px; font-size: 13.5px; }
.tf-lab { color: var(--text-secondary); }
.tf-bar { height: 8px; border-radius: 999px; background: var(--bg-light); overflow: hidden; }
.tf-bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s var(--ease) .25s; }
.today-funnel li.ok .tf-bar span { background: var(--status-green); }
.today-funnel li.wait .tf-bar span { background: var(--status-yellow); }
.today-funnel li.exp .tf-bar span { background: var(--text-tertiary); }
.today-funnel li b { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- платежи (таблица) ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.chips { display: inline-flex; gap: 6px; background: var(--bg-light); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.chip { font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: transparent; border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer; transition: color .2s, background .2s; }
.chip:hover { color: var(--text-primary); }
.chip.active { color: var(--text-primary); background: var(--contrast); box-shadow: 0 2px 8px -4px rgba(0,0,0,.3); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-secondary); padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl .ta-r { text-align: right; }              /* перебивает .tbl th — шапка и ячейки выровнены одинаково */
.tbl .ta-c { text-align: center; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: var(--bg-light); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .mono { font-variant-numeric: tabular-nums; }
.cell-coin { display: inline-flex; align-items: center; gap: 8px; }
.cell-coin img { width: 20px; height: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: hsl(145, 45%, 38%); background: color-mix(in srgb, var(--status-green) 22%, transparent); }
html.dark .pill.ok { color: var(--status-green); }
.pill.wait { color: hsl(38, 70%, 40%); background: color-mix(in srgb, var(--status-yellow) 26%, transparent); }
.pill.exp { color: var(--text-secondary); background: var(--bg); }
.tbl-empty { padding: 40px; text-align: center; color: var(--text-secondary); font-size: 14px; }

/* ---------- сбор средств ---------- */
.sweep-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.sweep-top .stat-val { font-size: 30px; }
.sweep-top p { margin: 0; flex: 1; min-width: 240px; max-width: 520px; }
.sweep-grid, .wal-grid, .set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sw-card { display: flex; flex-direction: column; gap: 4px; }
.sw-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sw-head img { width: 28px; height: 28px; }
.sw-head b { font-size: 14.5px; }
.sw-head i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); }
.sw-amt { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sw-rub { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px; }
.sw-card .btn { width: 100%; justify-content: center; }

/* ---------- кошельки ---------- */
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-head h3 { margin: 0; font-size: 16px; }
.wal { display: flex; flex-direction: column; gap: 10px; }
.wal-top { display: flex; align-items: center; gap: 10px; }
.wal-top img { width: 26px; height: 26px; }
.wal-top b { font-size: 14px; }
.wal-top i { font-style: normal; font-size: 11.5px; color: var(--text-secondary); margin-left: auto; }
.wal-addr { display: flex; align-items: center; gap: 8px; background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.wal-addr span { flex: 1; min-width: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.wal-gas { display: flex; align-items: center; justify-content: space-between; }
.wal-gas b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- настройки ---------- */
.set-grid { grid-template-columns: repeat(2, 1fr); }
.fee-tiers { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.fee-tiers li { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.fee-tiers li:last-child { border-bottom: 0; }
.fee-tiers b { font-variant-numeric: tabular-nums; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row > div { display: grid; line-height: 1.4; }
.set-row b { font-size: 13.5px; }
.switch { width: 46px; height: 27px; flex: none; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); cursor: pointer; padding: 0; position: relative; transition: background .25s; }
.switch span { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: var(--text-tertiary); transition: transform .25s var(--ease), background .25s; }
.switch.on { background: var(--accent); border-color: transparent; }
.switch.on span { transform: translateX(19px); background: #fff; }
/* подписи строк настроек + поле ввода (подключение к API) */
.set-label { font-size: 13.5px; font-weight: 500; }
.set-desc { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-light); color: var(--text-primary); font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- кнопки + ripple ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  text-decoration: none; transition: transform .15s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
/* основная кнопка — инверсная по теме: тёмная тема = белая, светлая = тёмная */
.btn-primary { background: var(--text-primary); color: var(--bg); }
.btn-primary:hover { background: color-mix(in srgb, var(--text-primary) 86%, var(--accent)); }
.btn-contrast { background: var(--text-primary); color: var(--bg); }
.btn-contrast:hover { background: color-mix(in srgb, var(--text-primary) 86%, var(--accent)); }
.btn-primary .ripple, .btn-contrast .ripple { background: color-mix(in srgb, var(--bg) 40%, transparent); }
.btn-ghost { background: var(--bg-light); color: var(--text-primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-tertiary); }
.btn svg { width: 16px; height: 16px; }
.ripple { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0); background: rgba(255,255,255,.45); pointer-events: none; animation: ripple .6s var(--ease); }
.btn-ghost .ripple, .chip .ripple, .nav-link .ripple { background: color-mix(in srgb, var(--accent) 30%, transparent); }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* ---------- модалки + scrim + тост ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--text-primary) 30%, transparent); backdrop-filter: blur(3px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-host { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.modal { pointer-events: auto; width: 100%; max-width: 460px; background: var(--contrast); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); animation: modalIn .35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal .m-sub { margin: 0 0 18px; color: var(--text-secondary); font-size: 13.5px; }
.modal.lg { max-width: 540px; }
.m-ttl { display: flex; align-items: center; gap: 12px; }
.m-ttl h3 { margin: 0; }
.m-ttl .pill { margin-left: auto; }
.m-info { list-style: none; margin: 14px 0 16px; padding: 0; display: flex; flex-direction: column; }
.m-info li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.m-info li:last-child { border-bottom: 0; }
.m-info .mi-k { color: var(--text-secondary); }
.m-info b { font-variant-numeric: tabular-nums; text-align: right; }
.m-fields { display: flex; flex-direction: column; gap: 11px; margin: 0 0 18px; }
.mi-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.mi-field > span { font-size: 12px; color: var(--text-secondary); }
.mi-row { display: flex; align-items: center; gap: 8px; min-width: 0; background: var(--bg-light); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px 8px 12px; }
.mi-row code { flex: 1; min-width: 0; font-family: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.mi-act { flex: none; display: inline-flex; gap: 6px; }
.mi-ico { width: 31px; height: 31px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: var(--contrast); color: var(--text-secondary); cursor: pointer; transition: color .2s, border-color .2s, transform .15s var(--ease); }
.mi-ico:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.mi-ico:active { transform: scale(.92); }
.mi-ico svg { width: 15px; height: 15px; }
.mi-row input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-family: inherit; font-size: 13.5px; color: var(--text-primary); }

/* строка 2FA в настройках (включено) */
.tfa-on { display: inline-flex; align-items: center; gap: 10px; }

/* модалка 2FA */
.tfa-wrap { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: center; margin: 6px 0 14px; }
.tfa-qr { width: 168px; height: 168px; flex: none; border: 1px solid var(--border); border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 9px; }
.tfa-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.tfa-side { display: flex; flex-direction: column; gap: 14px; }
.tfa-code { display: grid; gap: 7px; }
.tfa-code > span { font-size: 12px; color: var(--text-secondary); }
.tfa-code b { font-size: 27px; font-weight: 700; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.tfa-count { height: 5px; border-radius: 999px; background: var(--bg-light); overflow: hidden; }
.tfa-count span { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 999px; transition: width 1s linear; }
.tfa-disable { display: block; width: 100%; margin: 0 0 12px; padding: 10px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--status-red); background: transparent; border: 1px solid var(--border); transition: border-color .2s; }
.tfa-disable:hover { border-color: var(--status-red); }
@media (max-width: 540px) { .tfa-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.m-plan { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.m-plan li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 10px; background: var(--bg-light); font-size: 13.5px; }
.m-plan li b { font-variant-numeric: tabular-nums; }
.m-actions { display: flex; gap: 10px; }
.m-actions .btn { flex: 1; justify-content: center; }
.m-seed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 18px; }
.m-seed span { background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; font-size: 12.5px; color: var(--text-secondary); }
.m-seed.revealed span { color: var(--text-primary); }
.m-note { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.m-prog { height: 6px; border-radius: 999px; background: var(--bg-light); overflow: hidden; margin: 4px 0 18px; }
.m-prog span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s var(--ease); }
.m-done-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--status-green); animation: pop .4s var(--ease); }
.m-done-ico svg { width: 28px; height: 28px; }
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.m-center { text-align: center; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--text-primary); color: var(--bg); font-size: 13.5px; font-weight: 500; padding: 12px 18px; border-radius: 12px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.5); transition: opacity .3s, transform .3s var(--ease); display: flex; align-items: center; gap: 9px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; }

/* ---------- мобильный ---------- */
.burger { display: none; flex-direction: column; gap: 4px; width: 40px; height: 40px; align-items: center; justify-content: center; background: var(--bg-light); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.burger span { width: 16px; height: 2px; border-radius: 2px; background: var(--text-primary); transition: transform .3s, opacity .3s; }
.sidebar.open { transform: translateX(0); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sweep-grid, .wal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .35s var(--ease); box-shadow: 0 0 60px rgba(0,0,0,.3); }
  .burger { display: flex; }
  .grid-2, .set-grid { grid-template-columns: 1fr; }
  .today-grid { grid-template-columns: 1fr; }
  .tb-search { display: none; }
}
@media (max-width: 600px) {
  .stats, .sweep-grid, .wal-grid { grid-template-columns: 1fr; }
}
