/* «ИИ-бухгалтер» → «Автоматизация» (Алекс 23.11.2026) — ai-accountant-automation.js (window.ACCA).
   Каркас, плитки, чипы, выключатель, карточка справа — классы раздела (ai-accountant.css, ai-accountant-reports.css,
   ai-accountant-contracts.css): здесь только своё — группы, строка автоматизации, форма настроек, список «можно включить».
   Цвета — токены раздела (--acc-*), обе темы. Цветных полос слева нет: группу показывает значок. */

.acca { display: flex; flex-direction: column; gap: 14px; }
.acca-top { padding: 12px; }
.acca-par { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--acc-soft); color: var(--text-muted); border: 1px solid var(--acc-line); }
.acca-par.on { background: var(--acc-ok-bg); color: var(--acc-ok); border-color: transparent; }
.acca-par.off { background: var(--acc-bad-bg); color: var(--acc-bad); border-color: transparent; }

/* группа */
.acca-group { display: flex; flex-direction: column; gap: 8px; }
.acca-gh { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; padding: 4px 2px 0; }
.acca-gh h4 { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 700; }
.acca-gh h4 i { font-style: normal; padding: 0 7px; border-radius: 999px; background: var(--acc-soft); border: 1px solid var(--acc-line); color: var(--text-muted); font-size: 11.5px; font-weight: 600; }
.acca-gh > span { font-size: 12.5px; color: var(--text-muted); }
.acca-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; flex: none; background: var(--acc-soft); color: var(--text-muted); }
.acca-ic.small { width: 26px; height: 26px; border-radius: 8px; align-self: center; }
.acca-ic.g-client { background: var(--acc-warn-bg); color: var(--acc-warn); }
.acca-ic.g-staff { background: var(--acc-ai-bg); color: var(--acc-ai); }
.acca-ic.g-data { background: var(--acc-info-bg); color: var(--acc-info); }
.acca-ic.g-lk2 { background: var(--acc-report-bg); color: var(--acc-report); }
.acca-ic.g-idea { background: var(--acc-soft); color: var(--text-muted); }

/* строка автоматизации */
.acca-list { display: flex; flex-direction: column; border: 1px solid var(--acc-line); border-radius: var(--acc-radius); background: var(--card-bg); overflow: hidden; }
.acca-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px 210px; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--border-light, var(--acc-line)); cursor: pointer; transition: background var(--transition, .15s); }
.acca-row:first-child { border-top: 0; }
.acca-row:hover { background: var(--acc-soft); }
.acca-row:focus-visible { outline: 2px solid var(--primary-color); outline-offset: -2px; }
.acca-row.lk2 { cursor: default; }
.acca-row.lk2:hover { background: transparent; }
.acca-row.is-off .acca-who > div > b, .acca-row.is-off .acca-n b { color: var(--text-muted); }
.acca-c { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.acca-c .dim { color: var(--text-muted); }
.acca-who { flex-direction: row; align-items: flex-start; gap: 12px; }
.acca-who > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.acca-who b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.acca-new { font-style: normal; display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--acc-ok-bg); color: var(--acc-ok); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.acca-trig { display: flex; align-items: flex-start; gap: 5px; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
.acca-trig svg { flex: none; margin-top: 2px; }
.acca-tags { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.acca-tags em { font-style: normal; font-size: 11.5px; color: var(--text-muted); }
.acca-n b { font-size: 17px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.acca-n span { color: var(--text-muted); line-height: 1.35; }
.acca-n em { font-style: normal; display: inline-flex; align-items: flex-start; gap: 4px; line-height: 1.35; }
.acca-n em svg { flex: none; margin-top: 2px; }
.acca-n em.bad { color: var(--acc-bad); font-weight: 600; }
.acca-st { align-items: flex-start; gap: 5px; }
.acca-st > span { color: var(--text-muted); line-height: 1.35; }
.acca-st .acc-switch { font-weight: 600; }

/* «можно включить после решения» */
.acca-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.acca-idea { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px dashed var(--acc-line); border-radius: var(--acc-radius); background: var(--card-bg); }
.acca-idea b { font-size: 13.5px; line-height: 1.3; }
.acca-idea p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.acca-idea span { display: inline-flex; align-items: center; gap: 5px; margin-top: auto; font-size: 12px; color: var(--acc-warn); }

/* карточка */
.acca-dl { display: grid; grid-template-columns: 122px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13px; line-height: 1.45; }
.acca-dl dt { color: var(--text-muted); }
.acca-dl dd { margin: 0; }
.acca-swl { display: flex; flex-direction: column; gap: 4px; }
.acca-swl > span { font-size: 12px; color: var(--text-muted); }
.acca-swl .acca-st > span { display: none; }
.acca-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.acca-kpis > div { flex: 1 1 96px; display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px; background: var(--acc-soft); }
.acca-kpis b { font-size: 18px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.acca-kpis span { font-size: 11.5px; line-height: 1.3; color: var(--text-muted); }
.acca-kpis .bad b { color: var(--acc-bad); }
.acca-fr { grid-template-columns: 86px minmax(0, 1fr) auto; }
.acca-fr .acca-res { color: var(--acc-ok); }
.acca-fr .acca-bad { color: var(--acc-bad); font-weight: 600; }
.acca-fr .acca-wait { color: var(--text-color); }
.acca-fr > div b .acc-tag { vertical-align: 1px; margin-left: 4px; }
.acca-fa { display: flex; gap: 4px; }
.acca-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 12px; margin: 10px 0 14px; }
.acca-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.acca-form label > span { font-weight: 600; }
.acca-form input { height: 34px; padding: 0 10px; border: 1px solid var(--acc-line); border-radius: 9px; background: var(--card-bg); color: var(--text-color); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; }
.acca-form input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-light, rgba(7, 71, 131, .12)); }
.acca-form input:disabled { background: var(--acc-soft); color: var(--text-muted); }
.acca-form small { font-size: 11.5px; line-height: 1.35; color: var(--text-muted); }
.acca-dry { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 11px 13px; border-radius: 10px; background: var(--acc-soft); font-size: 12.5px; line-height: 1.45; }
.acca-dry b { font-size: 13.5px; }
.acca-dry em { font-style: normal; color: var(--text-muted); }

@media (max-width: 1100px) {
    .acca-row { grid-template-columns: minmax(0, 1fr) 190px; }
    .acca-row .acca-st { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; padding-left: 46px; }
}
@media (max-width: 720px) {
    .acca-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
    .acca-row .acca-n, .acca-row .acca-st { padding-left: 46px; }
    .acca-n b { font-size: 15px; display: inline; margin-right: 6px; }
    .acca-n { display: block; }
    .acca-n span, .acca-n em { display: inline; }
    .acca-n em { display: flex; }
    .acca-gh > span { flex-basis: 100%; }
    .acca-dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    .acca-dl dd { margin-bottom: 8px; }
    .acca-fr { grid-template-columns: minmax(0, 1fr) auto; }
}
