/* Финпульс — дизайн-система */
:root {
  --bg: #f5f6fa; --card: #ffffff; --card-2: #f9fafc; --ink: #12131a; --ink-2: #3b3f4f; --muted: #7a8094;
  --line: #e7e9f0; --line-soft: #eff1f6; --hover: #f3f4f9;
  --accent: #5b5bd6; --accent-2: #4747c2; --accent-soft: #c9c9f5; --accent-bg: #eeeefc; --accent-fill: rgba(91, 91, 214, .10);
  --pos: #12a594; --pos-bg: #e3f7f3; --neg: #e5484d; --neg-soft: #f4a7a9; --neg-bg: #fdecec; --neg-fill: rgba(229, 72, 77, .14);
  --warn: #f76b15; --warn-bg: #fff1e6; --c2: #0090ff; --c3: #8e4ec6; --c4: #ffb224;
  --tooltip: #1c1d26; --shadow: 0 1px 2px rgba(20, 22, 40, .04), 0 4px 16px rgba(20, 22, 40, .05);
  --shadow-lg: 0 20px 60px rgba(20, 22, 40, .18); --r: 16px; --r-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1016; --card: #181922; --card-2: #1d1e29; --ink: #eceef6; --ink-2: #c3c6d4; --muted: #8b90a5;
    --line: #2a2c3a; --line-soft: #222331; --hover: #212230;
    --accent: #7c7cf0; --accent-2: #9393f5; --accent-soft: #3b3b7a; --accent-bg: #23234a; --accent-fill: rgba(124, 124, 240, .16);
    --pos: #2ec4b0; --pos-bg: #10302c; --neg: #f2555a; --neg-soft: #7c3437; --neg-bg: #361a1d; --neg-fill: rgba(242, 85, 90, .2);
    --warn: #ff8a3d; --warn-bg: #3a2414; --tooltip: #000; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1016; --card: #181922; --card-2: #1d1e29; --ink: #eceef6; --ink-2: #c3c6d4; --muted: #8b90a5;
  --line: #2a2c3a; --line-soft: #222331; --hover: #212230;
  --accent: #7c7cf0; --accent-2: #9393f5; --accent-soft: #3b3b7a; --accent-bg: #23234a; --accent-fill: rgba(124, 124, 240, .16);
  --pos: #2ec4b0; --pos-bg: #10302c; --neg: #f2555a; --neg-soft: #7c3437; --neg-bg: #361a1d; --neg-fill: rgba(242, 85, 90, .2);
  --warn: #ff8a3d; --warn-bg: #3a2414; --tooltip: #000; --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1, 'cv11' 1; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 6px 0; }
input, select, textarea, button { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
.rot180 { transform: rotate(180deg); }
.muted { color: var(--muted); } .small { font-size: 12px; }
.pos { color: var(--pos) !important; } .neg { color: var(--neg) !important; } .warn { color: var(--warn); }
.hidden { display: none !important; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }

/* Каркас */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand .logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #8e4ec6); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(91, 91, 214, .35); }
.brand .logo .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.brand b { display: block; font-size: 16px; } .brand span { display: block; font-size: 12px; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 6px; font-weight: 600; }
.nav-sep { height: 1px; background: var(--line); margin: 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item.active { background: var(--accent-bg); color: var(--accent); }
.nav-item span { flex: 1; }
.badge { font-style: normal; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; }
.badge.danger { background: var(--neg); color: #fff; }
.sb-foot { margin-top: auto; padding-top: 16px; }
.sb-cash { background: linear-gradient(135deg, var(--accent), #8e4ec6); color: #fff; border-radius: 14px; padding: 14px 16px; }
.sb-cash span { font-size: 12px; opacity: .85; display: block; } .sb-cash b { font-size: 19px; letter-spacing: -.01em; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
.topbar h1 { font-size: 22px; font-weight: 700; flex: 1; }
.tb-actions { display: flex; gap: 8px; align-items: center; }
.view { padding: 6px 28px 48px; display: flex; flex-direction: column; gap: 16px; max-width: 1480px; }
.demo-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 28px 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-bg); }
.demo-strip strong { color: var(--accent); margin-right: 10px; }
.demo-strip span { color: var(--ink-2); }
.demo-strip .btn { flex-shrink: 0; }
.mobile-only { display: none; }

/* Кнопки и поля */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--hover); } .btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--hover); }
.btn.danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn.danger-ghost { color: var(--neg); border-color: transparent; background: transparent; } .btn.danger-ghost:hover { background: var(--neg-bg); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; } .btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 8px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--ink); } .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }
input:not([type=checkbox]), select, textarea { height: 38px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 0 12px; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0; }
textarea { height: auto; padding: 9px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fill); }
.err { border-color: var(--neg) !important; box-shadow: 0 0 0 3px var(--neg-fill) !important; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.sel { height: 34px; font-size: 13px; padding: 0 30px 0 11px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8094' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; padding-right: 30px; cursor: pointer; }

/* Карточки */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head.pad { padding: 16px 20px 0; }
.card.flush .card-head.pad { margin-bottom: 12px; }
.toolbar-card { padding: 12px 14px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dates { display: flex; align-items: center; gap: 6px; } .dates input { height: 34px; font-size: 13px; padding: 0 9px; } .dates span { color: var(--muted); }
.seg { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg.sm button { padding: 5px 11px; font-size: 13px; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg button.on.in { color: var(--pos); } .seg button.on.out { color: var(--neg); } .seg button.on.transfer { color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; flex: 1 1 260px; color: var(--muted); }
.search input { border: 0; height: 34px; padding: 0; flex: 1; box-shadow: none !important; background: transparent; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid2.top { align-items: start; }
.grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart { position: relative; } .h300 { height: 300px; } .h260 { height: 260px; } .h200 { height: 200px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; color: var(--ink); min-width: 0; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { font-size: 12px; color: var(--muted); }
.kpi.link:hover { border-color: var(--accent-soft); }
.kpi.warn { background: var(--warn-bg); border-color: transparent; } .kpi.warn b { color: var(--warn); }

/* Hero на главной */
.hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.hero-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero-main::after { content: ''; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--accent-fill), transparent 70%); pointer-events: none; }
.hero-sum { font-size: 40px; font-weight: 700; letter-spacing: -.03em; margin: 2px 0; }
.hero-sub { font-weight: 600; font-size: 13px; }
.acc-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.acc-pill { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.acc-pill i { width: 8px; height: 8px; border-radius: 50%; } .acc-pill span { color: var(--muted); }
.hero-alert { border-radius: var(--r); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; justify-content: center; color: var(--ink); border: 1px solid transparent; transition: transform .15s; }
.hero-alert:hover { transform: translateY(-1px); }
.hero-alert .ic { width: 28px; height: 28px; margin-bottom: 4px; }
.hero-alert b { font-size: 17px; } .hero-alert span { color: var(--ink-2); font-size: 13px; }
.hero-alert.ok { background: var(--pos-bg); } .hero-alert.ok .ic { color: var(--pos); }
.hero-alert.danger { background: var(--neg-bg); } .hero-alert.danger .ic, .hero-alert.danger b { color: var(--neg); }
.span2 { grid-column: span 2; }
.donut-wrap { display: flex; flex-direction: column; gap: 14px; }
.donut-wrap .chart { height: 190px; }
.donut-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-c b { font-size: 20px; } .donut-c span { font-size: 12px; color: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; } .legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend span { flex: 1; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soon { display: flex; flex-direction: column; }
.soon-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.soon-row:last-child { border: 0; }
.soon-row b { display: block; font-weight: 500; font-size: 13px; } .soon-row span { font-size: 12px; color: var(--muted); }
.onboarding .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.step { border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); transition: border-color .15s, background .15s; }
.step:hover { border-color: var(--accent); background: var(--accent-bg); }
.step .ic { width: 26px; height: 26px; color: var(--accent); margin-bottom: 6px; } .step span { font-size: 13px; color: var(--muted); }

/* Баннеры */
.banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; font-size: 14px; }
.banner > div { flex: 1; } .banner .ic { width: 22px; height: 22px; }
.banner.warn { background: var(--warn-bg); } .banner.warn .ic { color: var(--warn); }
.banner.danger { background: var(--neg-bg); } .banner.danger .ic { color: var(--neg); }
.banner.ok { background: var(--pos-bg); } .banner.ok .ic { color: var(--pos); }
.banner.info { background: var(--accent-bg); } .banner.info .ic { color: var(--accent); }
.hint { color: var(--muted); font-size: 12.5px; margin: -4px 4px 0; }

/* Таблицы */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--card); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.ops tbody tr:hover { background: var(--hover); }
table.ops tr.plan { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line-soft) 8px 9px); }
table.ops tr.sel { background: var(--accent-bg); }
table.ops tr.off { opacity: .45; }
td.chk, th.chk { width: 36px; padding-right: 0; }
td.desc { max-width: 420px; cursor: pointer; }
td.desc b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.desc span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.num[data-open] { cursor: pointer; }
.sub { font-size: 11px; color: var(--muted); }
.amt { font-weight: 600; white-space: nowrap; } .amt.pos { color: var(--pos); } .amt.neg { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--hover); color: var(--muted); margin-top: 3px; }
.tag.plan { background: var(--accent-bg); color: var(--accent); } .tag.danger { background: var(--neg-bg); color: var(--neg); }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); margin-left: 6px; }
.chip.ghost { background: var(--hover); color: var(--muted); margin: 0; } .chip .ic { width: 13px; height: 13px; }
.inline-sel { height: 30px; font-size: 13px; border-color: transparent; background-color: transparent; max-width: 220px; padding-left: 8px; }
.inline-sel:hover { border-color: var(--line); background-color: var(--card); }
.inline-sel.warn { color: var(--warn); background-color: var(--warn-bg); font-weight: 500; }
.inline-sel.ghost { color: var(--muted); max-width: 170px; }
.sumline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 2px 10px; font-size: 13px; color: var(--muted); }
.sumline .pos, .sumline .neg { font-weight: 600; } .sumline .btn { margin-left: 4px; }
.bulk { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--accent-bg); margin-bottom: 10px; }
.bulk.show { display: flex; } .bulk b { margin-right: 6px; color: var(--accent); }
.more { text-align: center; padding: 14px; }
.via { font-size: 11px; color: var(--pos); margin: 2px 0 0 8px; } .via-history { color: var(--accent); } .via-plan { color: var(--c3); }

/* Отчёты */
table.rep { font-size: 13.5px; }
table.rep th.first, table.rep td.first { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 260px; max-width: 320px; text-align: left; box-shadow: 1px 0 0 var(--line-soft); }
table.rep thead th { position: sticky; top: 0; z-index: 2; background: var(--card-2); } table.rep thead th.first { z-index: 3; background: var(--card-2); }
table.rep td.total, table.rep th.total { background: var(--card-2); font-weight: 600; }
table.rep tr.sec td { font-weight: 700; background: var(--card-2); } table.rep tr.sec td.first { background: var(--card-2); }
table.rep tr.sec.warn td.first { color: var(--warn); }
table.rep tr.grp td { font-weight: 600; }
table.rep tr.item td.first { padding-left: 42px; color: var(--ink-2); }
table.rep tr.item td { color: var(--ink-2); }
table.rep tr.hl td { font-weight: 700; background: var(--accent-bg); } table.rep tr.hl td.first { background: var(--accent-bg); }
table.rep tr.hl.strong td { font-size: 14.5px; }
table.rep tr.bal td { font-weight: 600; color: var(--muted); }
table.rep tr.ratio td { font-size: 12px; color: var(--muted); padding-top: 4px; padding-bottom: 8px; }
table.rep tr.check td { font-size: 12px; } table.rep tr.warn-row td { color: var(--warn); }
.ok { color: var(--pos); display: inline-flex; align-items: center; gap: 4px; } .ok .ic { width: 14px; height: 14px; }
td.click { cursor: pointer; } td.click:hover { background: var(--accent-bg) !important; color: var(--accent); }
.zero { color: var(--line); }
td.neg { color: var(--neg); }
.tg { width: 22px; height: 22px; border: 0; background: transparent; cursor: pointer; display: inline-grid; place-items: center; margin: 0 6px 0 -4px; vertical-align: -5px; color: var(--muted); border-radius: 6px; }
.tg:hover { background: var(--hover); } .tg .ic { width: 15px; height: 15px; transition: transform .15s; } .tg.open .ic { transform: rotate(90deg); }
.drill-sum { margin-bottom: 12px; color: var(--muted); }
tr.click { cursor: pointer; } tr.click:hover { background: var(--hover); }
.legend-note { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; } .sw { width: 14px; height: 10px; border-radius: 3px; display: inline-block; } .sw.neg { background: var(--neg-fill); border: 1px solid var(--neg); }

/* Бюджет */
.plan-inp { width: 130px; height: 32px; text-align: right; font-size: 13px; border-color: transparent; background: var(--card-2); }
.plan-inp:hover { border-color: var(--line); }
.bar-cell { min-width: 150px; white-space: nowrap; } .bar-cell span { font-size: 12px; color: var(--muted); margin-left: 8px; }
.pbar { display: inline-block; width: 100px; height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; vertical-align: middle; }
.pbar i { display: block; height: 100%; background: var(--pos); border-radius: 4px; } .pbar.over i { background: var(--neg); }
table.budget td.first { min-width: 220px; }
.month-nav { display: flex; align-items: center; gap: 6px; } .month-nav b { min-width: 140px; text-align: center; font-size: 15px; }

/* Календарь */
.cal-list { display: flex; flex-direction: column; }
.cal-day { display: grid; grid-template-columns: 120px 1fr 150px; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.cal-day.gap { background: linear-gradient(90deg, var(--neg-bg), transparent 60%); border-radius: 10px; padding-left: 10px; }
.cal-date b { font-size: 24px; display: block; line-height: 1; } .cal-date span { font-size: 12px; color: var(--muted); }
.cal-date em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); display: block; margin-top: 3px; }
.cal-ops { display: flex; flex-direction: column; gap: 6px; }
.cal-op { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--card-2); cursor: pointer; }
.cal-op:hover { background: var(--hover); }
.cal-op b { display: block; font-weight: 500; font-size: 13.5px; } .cal-op span { font-size: 12px; color: var(--muted); } .cal-op i { font-style: normal; }
.cal-bal { text-align: right; } .cal-bal span { font-size: 11px; color: var(--muted); display: block; } .cal-bal b { font-size: 15px; }

/* Импорт */
.import-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.dropzone { border: 2px dashed var(--accent-soft); border-radius: 20px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; cursor: pointer; transition: all .2s; min-height: 340px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-bg); }
.dz-ic { width: 72px; height: 72px; border-radius: 22px; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.dz-ic .ic { width: 34px; height: 34px; }
.dropzone h2 { font-size: 20px; } .dropzone p { color: var(--muted); }
.how ol { padding-left: 20px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); }
.banks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; } .banks span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--hover); color: var(--ink-2); font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.stats div { background: var(--card-2); border-radius: 12px; padding: 12px 14px; } .stats span { display: block; font-size: 12px; color: var(--muted); } .stats b { font-size: 18px; } .stats small { font-size: 12px; color: var(--muted); font-weight: 400; }
.import-acc { display: flex; gap: 12px; align-items: end; } .import-acc label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.sticky-foot { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 0; margin-top: 8px; background: var(--card); border-top: 1px solid var(--line); flex-wrap: wrap; }
.mapping { background: var(--card-2); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.map-grid { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0 4px; }
.map-col { display: flex; flex-direction: column; gap: 4px; min-width: 150px; } .map-col small { font-weight: 600; } .map-col select { height: 32px; font-size: 13px; } .map-col span { font-size: 11px; }

/* Правила */
.rules { display: flex; flex-direction: column; gap: 8px; }
.rule { display: grid; grid-template-columns: 32px 1fr 24px 1fr 120px auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s; }
.rule:hover { border-color: var(--accent-soft); } .rule.off { opacity: .5; }
.rule-n { width: 28px; height: 28px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.rule small { display: block; font-size: 12px; color: var(--muted); } .rule b { font-weight: 600; }
.rule-arrow { color: var(--muted); } .rule-hits { font-size: 12px; color: var(--muted); text-align: right; }
.rule-act { display: flex; align-items: center; gap: 2px; }
.switch { position: relative; width: 36px; height: 20px; margin: 0 6px; cursor: pointer; } .switch input { opacity: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 10px; transition: .2s; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(16px); }
.rule-form { display: flex; flex-direction: column; gap: 12px; }
.rf-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .rf-line span { color: var(--muted); min-width: 110px; } .rf-line input, .rf-line select { flex: 1; }
.rf-preview { background: var(--card-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.mini-op { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Справочники */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; padding: 10px 16px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--accent); border-color: var(--accent); }
#tab-body { display: flex; flex-direction: column; gap: 16px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.acc-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.acc-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.acc-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.acc-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.acc-bal { font-size: 22px; font-weight: 700; margin-top: 10px; letter-spacing: -.02em; }
table.cats td { padding: 6px 10px; } table.cats th { padding: 10px; }
.cell-inp, .cell-sel { height: 32px; font-size: 13px; border-color: transparent; background-color: transparent; width: 100%; }
.cell-inp:hover, .cell-sel:hover { border-color: var(--line); }
.proj-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.proj { display: flex; align-items: center; gap: 10px; } .proj i { width: 12px; height: 12px; border-radius: 4px; } .proj .cell-inp { max-width: 340px; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 12px; }
.colors { display: flex; gap: 8px; } .clr { width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; } .clr.on { border-color: var(--card); box-shadow: 0 0 0 2px var(--ink); }

/* Пустые состояния */
.empty { text-align: center; padding: 48px 20px; }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; margin: 0 auto 12px; }
.empty p { color: var(--muted); max-width: 420px; margin: 6px auto 16px; }

/* Модалки */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15, 16, 25, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.modal-backdrop.show { opacity: 1; }
.modal { background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; transform: translateY(10px) scale(.98); transition: transform .18s; }
.modal.wide { width: min(900px, 100%); }
.modal-backdrop.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; } .modal-head h3 { font-size: 18px; }
.modal-body { padding: 10px 22px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 14px; } .form-grid.one { grid-template-columns: 1fr; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form-grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 400; }
.form-grid label small { color: var(--pos); font-size: 12px; min-height: 0; }
.big-amount { position: relative; } .big-amount input { height: 54px; font-size: 26px; font-weight: 700; padding-right: 40px; } .big-amount span { position: absolute; right: 16px; bottom: 14px; font-size: 20px; color: var(--muted); }
.modal .seg { width: 100%; } .modal .seg button { flex: 1; }

/* Тосты */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--tooltip); color: #fff; padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; opacity: 0; transform: translateY(10px); transition: all .25s; max-width: min(560px, calc(100vw - 32px)); }
.toast.show { opacity: 1; transform: none; } .toast.err { background: var(--neg); }
.toast .link { color: #b4b4ff; margin-left: 6px; text-decoration: underline; }

/* Адаптив */
@media (max-width: 1100px) {
  .grid-dash, .grid2, .hero, .import-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .rule { grid-template-columns: 28px 1fr auto; } .rule-arrow, .rule-hits { display: none; } .rule-then { grid-column: 2; } .rule-act { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .mobile-only { display: inline-grid; }
  .topbar { padding: 12px 16px; } .topbar h1 { font-size: 18px; }
  .tb-actions .btn span { display: none; } .tb-actions .btn { padding: 0 9px; }
  .view { padding: 4px 16px 40px; }
  .demo-strip { margin-inline: 16px; }
  .demo-strip span { display: block; font-size: 12px; }
  .hero-sum { font-size: 32px; }
  .onboarding .steps { grid-template-columns: 1fr; }
  .cal-day { grid-template-columns: 1fr; gap: 8px; } .cal-bal { text-align: left; }
  .cal-op { grid-template-columns: 1fr auto; } .cal-op .btn { grid-column: span 2; justify-self: start; }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; }
  table.rep th.first, table.rep td.first { min-width: 170px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi b { font-size: 18px; }
  .card { padding: 16px; }
}
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Доработка UI ---------- */
/* Появление экрана при переходе */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view.enter > * { animation: fadeUp .32s cubic-bezier(.2, .7, .2, 1) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; } .view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; } .view.enter > *:nth-child(n+5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .view.enter > * { animation: none; } }

/* Главная */
.hero-chart { position: relative; height: 88px; margin: 16px -6px -6px; }
.hero-chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 2px 6px 0; }
.spark { display: block; width: 100%; height: 30px; margin: 6px 0 2px; overflow: visible; }

/* Операции: группы по дням и аватары */
table.ops tr.day td { background: var(--card-2); padding: 7px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
table.ops tr.day div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
table.ops tr.day b { font-weight: 600; } table.ops tr.day .pos, table.ops tr.day .day-out { font-weight: 600; font-size: 12.5px; }
table.ops tr.day .day-out { color: var(--ink-2); }
table.ops tr.day:hover { background: none; }
.desc-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.desc-row > div { min-width: 0; }
.av { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: var(--hover); color: var(--ink-2); }
.av.in { background: var(--pos-bg); color: var(--pos); } .av.out { background: var(--neg-bg); color: var(--neg); } .av.transfer { background: var(--accent-bg); color: var(--accent); }
.av .ic { width: 16px; height: 16px; }
td.desc { max-width: 520px; }
td.desc b .tag, td.desc b i.tag { font-style: normal; vertical-align: 1px; margin: 0 0 0 4px; }
.acc-cell { color: var(--ink-2); font-size: 13px; }

/* Отчёты: иерархия и подсветка строк */
table.rep tr.subgrp td.first { padding-left: 34px; }
table.rep tr.subgrp td { color: var(--ink); }
table.rep tbody tr:hover td, table.rep tbody tr:hover td.first { background: var(--hover); }
table.rep tr.hl:hover td, table.rep tr.hl:hover td.first { background: var(--accent-bg); }
table.rep td.num { min-width: 112px; }
table.rep tr.sec + tr td { border-top: 0; }
.toolbar-card .icon-btn { border: 1px solid var(--line); }
.hero-chart-legend { position: relative; } .hero-chart-legend .t { position: absolute; left: 75%; transform: translateX(-50%); }
table.ops .inline-sel { max-width: 200px; } table.ops .inline-sel.ghost { max-width: 140px; }
table.ops td.desc { max-width: 380px; width: 100%; }
table.ops td.num { padding-right: 16px; }
@media (max-width: 1280px) { table.ops th:nth-child(5), table.ops td:nth-child(5) { display: none; } table.ops tr.day td { display: table-cell !important; } }

/* ===== Вход, настройка компании, профиль, команда ===== */
[hidden] { display: none !important; }
.auth { display: grid; grid-template-columns: minmax(360px, 44%) 1fr; min-height: 100vh; }
.auth-aside { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 32px 40px; color: #fff;
  background: radial-gradient(120% 80% at 0% 0%, #7a7af0 0%, transparent 60%), linear-gradient(150deg, #4b4bc9 0%, #6c3fb8 100%); }
.brand.light { padding: 0; } .brand.light .logo { background: rgba(255, 255, 255, .18); box-shadow: none; } .brand.light span { color: rgba(255, 255, 255, .75); }
.auth-pitch { margin: auto 0; max-width: 420px; position: relative; z-index: 1; }
.auth-pitch h1 { font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin-bottom: 28px; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-pitch li { display: flex; gap: 14px; align-items: flex-start; }
.auth-pitch li > .ic { width: 40px; height: 40px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); flex: none; }
.auth-pitch li b { display: block; font-size: 15px; } .auth-pitch li span { display: block; font-size: 13.5px; opacity: .8; }
.auth-art { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; opacity: .9; pointer-events: none; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; animation: fadeUp .35s ease both; }
.auth-card h2 { font-size: 26px; font-weight: 700; margin-top: 6px; } .auth-card > p { margin: -8px 0 4px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.auth-card input { height: 44px; font-size: 15px; }
.auth-tabs { align-self: flex-start; }
.auth-demo { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-bg); border: 1px solid var(--accent-soft); color: var(--ink); }
.auth-demo:hover { border-color: var(--accent); }
.auth-demo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-demo-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--card); color: var(--accent); }
.auth-demo strong, .auth-demo small { display: block; }
.auth-demo small { color: var(--ink-2); }
.auth-demo-arrow { margin-left: auto; color: var(--accent); }
.auth-err { color: var(--neg); font-size: 13px; min-height: 18px; margin: -4px 0; }
.pw { position: relative; display: block; } .pw input { width: 100%; padding-right: 44px; }
.pw .icon-btn { position: absolute; right: 5px; top: 5px; }
.btn.block { width: 100%; justify-content: center; }
.center { text-align: center; }
.setup { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, var(--accent-bg), var(--bg)); }
.setup-card { width: 100%; max-width: 640px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 32px; animation: fadeUp .35s ease both; }
.setup-card .brand { padding: 0 0 22px; } .setup-card h1 { font-size: 26px; font-weight: 700; }
.setup-card.center { max-width: 440px; } .setup-card.center .btn { margin-top: 14px; }
.setup-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 22px; }
.setup-opts button { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.setup-opts button:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.setup-opts .ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); margin-bottom: 6px; }
.setup-opts b { font-size: 15px; } .setup-opts span { font-size: 13px; color: var(--muted); }

.user-btn { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; }
.user-btn:hover { background: var(--hover); } .user-btn > .ic { width: 16px; height: 16px; color: var(--muted); }
.u-av { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #12a594, #0090ff); }
.u-txt { flex: 1; min-width: 0; } .u-txt b, .u-txt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-txt b { font-size: 13px; font-weight: 600; } .u-txt small { font-size: 11.5px; color: var(--muted); }
.menu-pop { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: fadeUp .15s ease both; }
.menu-pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 9px; cursor: pointer; text-align: left; color: var(--ink-2); }
.menu-pop button:hover { background: var(--hover); color: var(--ink); } .menu-pop button span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop button .ic { width: 16px; height: 16px; } .menu-pop button.on { color: var(--accent); font-weight: 600; } .menu-pop button.danger { color: var(--neg); }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .menu-head b, .menu-head small { display: block; } .menu-head small { color: var(--muted); font-size: 12px; }
.menu-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; font-weight: 600; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.co-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; flex: none !important; }

.sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.sync .ic { width: 14px; height: 14px; }
.sync.ok { color: var(--pos); background: var(--pos-bg); } .sync.wait { color: var(--muted); background: var(--hover); } .sync.err { color: var(--neg); background: var(--neg-bg); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.members { display: flex; flex-direction: column; margin: 0 -8px 12px; }
.member { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; }
.member:hover { background: var(--hover); } .member b, .member small { display: block; } .member small { color: var(--muted); font-size: 12px; }
.member .u-av { width: 38px; height: 38px; border-radius: 12px; }
.copy-row { display: flex; gap: 8px; margin-top: 12px; } .copy-row input { flex: 1; font-size: 13px; }

@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside { padding: 22px 20px 26px; } .auth-pitch { margin: 22px 0 0; } .auth-pitch h1 { font-size: 24px; margin-bottom: 0; }
  .auth-pitch ul, .auth-art { display: none; }
  .setup-card { padding: 22px; }
  .member { grid-template-columns: auto 1fr; } .member .chip, .member .btn { grid-column: 2; justify-self: start; margin: 0; }
}

/* ===== Интеграции ===== */
.int-intro p { margin: 0 4px 14px; max-width: 760px; }
.int-card { padding: 0; overflow: hidden; margin-bottom: 16px; }
.int-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; flex-wrap: wrap; }
.int-head > .grow { min-width: 240px; } .int-head h2 { flex-wrap: wrap; } .int-head p { margin: 2px 0 0; }
.bank-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; }
.bank-ic .ic { width: 22px; height: 22px; }
.bank-ic.sber { background: linear-gradient(135deg, #21a038, #0f8a6e); box-shadow: 0 6px 16px rgba(33, 160, 56, .3); }
.bank-ic.other { background: var(--hover); color: var(--muted); width: 38px; height: 38px; }
.chip.ok { background: var(--pos-bg); color: var(--pos); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.int-body, .int-setup { padding: 0 20px 20px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.int-setup ol { margin: 8px 0; padding-left: 20px; } .int-setup li { margin: 6px 0; }
.int-setup code, .int-body code { background: var(--hover); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.int-steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.int-steps li { display: flex; gap: 10px; align-items: flex-start; background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); }
.int-steps .ic { color: var(--accent); margin-top: 1px; }
.int-org { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 12px; }
.int-body .banner { margin-bottom: 12px; }
.int-acc td { vertical-align: middle; } .int-acc td small { display: block; }
.int-acc .dates input { width: 140px; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.bank-tile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 12px; color: var(--ink); transition: border-color .15s, background .15s; }
.bank-tile:hover { border-color: var(--accent-soft); background: var(--hover); } .bank-tile > .ic { color: var(--muted); width: 16px; }
.bank-tile > div { flex: 1; min-width: 0; } .bank-tile b, .bank-tile small { display: block; } .bank-tile small { color: var(--muted); font-size: 12px; }
.st { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-ok { background: var(--pos-bg); color: var(--pos); } .st-wait { background: var(--warn-bg); color: var(--warn); }
.st-info { background: var(--accent-bg); color: var(--accent); } .st-err { background: var(--neg-bg); color: var(--neg); }
td .st + small { display: block; margin-top: 3px; font-size: 12px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 14px; }
.pay-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 500; }
.pay-grid .span2 { grid-column: 1 / -1; }
.pay-grid textarea { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.4; }
.pay-grid small { font-weight: 400; } .modal p.small .ic { width: 14px; height: 14px; vertical-align: -2px; color: var(--pos); }
.empty-state { text-align: center; padding: 40px 20px; }
@media (max-width: 820px) {
  .pay-grid { grid-template-columns: 1fr; }
  .int-acc .dates { display: flex; width: 100%; } .int-acc .dates input { width: auto; flex: 1; min-width: 0; }
  .sync { padding: 6px; } .sync .sync-t { display: none; }
  .int-acc thead { display: none; } .int-acc tr { display: grid; gap: 8px; padding: 10px 0; } .int-acc td { border: 0; padding: 0 4px; text-align: left; }
}
.block { display: block; }

/* ===== Автозагрузка ===== */
.auto-col { text-align: center; width: 64px; }
.auto-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card-2); transition: border-color .2s, background .2s; }
.auto-box.on { border-color: var(--accent-soft); background: var(--accent-fill); }
.auto-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.auto-head .grow { min-width: 220px; } .auto-head p { margin: 2px 0 0; }
.auto-head select { height: 32px; font-size: 13px; }
.auto-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0 52px; font-size: 13px; }
.auto-status .warn { display: inline-flex; gap: 6px; align-items: center; } .auto-status .ic { width: 15px; height: 15px; }
.auto-box .banner { margin: 12px 0 0; }
.switch.big { width: 42px; height: 24px; margin: 0; }
.switch.big span::after { width: 18px; height: 18px; }
.switch.big input:checked + span::after { transform: translateX(18px); }
.switch input[disabled] + span { opacity: .45; cursor: not-allowed; }
@media (max-width: 820px) { .auto-status { margin-left: 0; } .auto-col { text-align: left; width: auto; } }
.auto-col .switch, .switch.big { display: inline-block; vertical-align: middle; flex: none; } .switch.big span { border-radius: 12px; }
.auto-acc { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 6px; cursor: pointer; }
.auto-acc .switch { display: inline-block; margin: 0 4px 0 0; flex: none; } .auto-acc.on { color: var(--accent); font-weight: 500; }
