/* @ds-v23 (затвор: только токены) — волна 3, полоса H: настройки (автоправила, настройки автоматизации, вебхуки, файлы, интеграции, банковские подключения).
 *
 * Разметка — public/screens/v23/{rules,automation-settings,webhooks,files,integrations,bank-sources}.js на компонентах DS (page-head, panel, table, field, check, modal, flag, status).
 * Здесь только то, чего в DS нет: раскладка строк окна правки правила, плитки интеграций, область загрузки файла, плашка расширения, раскладка событий вебхука.
 * Только токены; классы с префиксом w3h-. Подключает координатор (после components-v23.css и product-v23.css).
 */

html.ds23 .w3h-stack{display:flex;flex-direction:column;gap:var(--space-5);min-width:0}
html.ds23 .w3h-break{overflow-wrap:anywhere}
html.ds23 .w3h-setting{display:flex;flex-direction:column;gap:var(--space-2);max-width:760px}

/* метка «монопольное» в строке правила: слово, подсказка в title */
html.ds23 .w3h-chip{display:inline-flex;align-items:center;padding:0 var(--space-3);border-radius:var(--radius-pill);background:var(--information-subtle);color:var(--information-strong);font:var(--type-caption)}

/* окно правки правила */
html.ds23 .w3h-editor{min-width:0}
html.ds23 .w3h-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);margin:var(--space-2) 0}
html.ds23 .w3h-row .select-wrap,
html.ds23 .w3h-row .input{min-width:0;max-width:100%}
html.ds23 .w3h-row .input{flex:1 1 180px}
html.ds23 .w3h-preview{padding:var(--space-4) var(--space-5);border-radius:var(--radius-lg);background:var(--surface-sunken);color:var(--text-primary);font:var(--type-body)}
html.ds23 .w3h-preview p{margin:0 0 var(--space-3)}
html.ds23 .w3h-samples{margin:0 0 var(--space-3);padding-left:var(--space-6);color:var(--text-secondary);font:var(--type-caption)}
html.ds23 .w3h-basis{padding:var(--space-3) var(--space-4);border-radius:var(--radius-md);background:var(--surface-muted)}
html.ds23 .w3h-basis ul{margin:0;padding-left:var(--space-6);color:var(--text-secondary);font:var(--type-caption)}

/* события вебхука: группы с флажками */
html.ds23 .w3h-evgroup{margin:0 0 var(--space-5)}
html.ds23 .w3h-evhead{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3);margin-bottom:var(--space-2)}
html.ds23 .w3h-evgrid{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-6)}

/* файлы: область загрузки (перетащить или выбрать), плашка расширения */
html.ds23 .w3h-drop{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);min-height:120px;padding:var(--space-6);border:1.5px dashed var(--border-strong);border-radius:var(--radius-xl);background:var(--surface-sunken);color:var(--text-secondary);text-align:center;cursor:pointer}
html.ds23 .w3h-drop:hover,
html.ds23 .w3h-drop.is-over{border-color:var(--action-primary);background:var(--accent-mint-subtle)}
html.ds23 .w3h-drop:focus-within{outline:var(--focus-ring-width) solid var(--focus-ring);outline-offset:var(--focus-ring-offset)}
html.ds23 .w3h-drop-t{font:var(--type-body);font-weight:700;color:var(--text-primary)}
html.ds23 .w3h-drop-in{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
html.ds23 .w3h-file{display:inline-flex;align-items:center;gap:var(--space-3);min-width:0}
html.ds23 .w3h-ext{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:var(--space-1) var(--space-2);border-radius:var(--radius-md);background:var(--surface-muted);color:var(--text-secondary);font:var(--type-caption);font-weight:700}
html.ds23 .w3h-ext[data-kind="sheet"]{background:var(--positive-subtle);color:var(--positive-strong)}
html.ds23 .w3h-ext[data-kind="pdf"]{background:var(--information-subtle);color:var(--information-strong)}
html.ds23 .w3h-ext[data-kind="image"]{background:var(--warning-subtle);color:var(--warning-strong)}
html.ds23 .w3h-ext[data-kind="archive"]{background:var(--negative-subtle);color:var(--negative-strong)}

/* интеграции: плитки состояния */
html.ds23 .w3h-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:var(--space-4);padding:var(--space-5)}
html.ds23 .w3h-tile{display:flex;flex-direction:column;gap:var(--space-3);min-width:0;padding:var(--space-5);border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface)}
html.ds23 .w3h-tile-head{display:flex;align-items:center;gap:var(--space-3);min-width:0}
html.ds23 .w3h-tile-title{flex:1;min-width:0;margin:0;font:var(--type-body);font-weight:700;color:var(--text-primary);overflow-wrap:anywhere}
html.ds23 .w3h-tile-text{margin:0;color:var(--text-secondary);font:var(--type-body)}
html.ds23 .w3h-tile-actions{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-top:auto}
html.ds23 .w3h-circle{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:var(--radius-pill);background:var(--surface-muted);color:var(--text-secondary);font:var(--type-body);font-weight:700}
html.ds23 .w3h-circle[data-tone="ok"]{background:var(--positive-subtle);color:var(--positive-strong)}
html.ds23 .w3h-circle[data-tone="info"]{background:var(--information-subtle);color:var(--information-strong)}
html.ds23 .w3h-circle[data-tone="warn"]{background:var(--warning-subtle);color:var(--warning-strong)}

/* «Банковские подключения»: карточка на ленту (как у Monarch / Rocket Money) — таблица в 7 колонок не помещалась в правую колонку
   настроек, и «Настроить»/«История» стояли за правым краем. Шапка карточки и факты переносятся по ширине; дата со временем не рвётся. */
html.ds23 .w3h-feeds{list-style:none;margin:0;padding:0}
html.ds23 .w3h-feed{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-5) var(--panel-padding);border-top:1px solid var(--border)}
html.ds23 .w3h-feed.is-flagged{background:var(--row-flagged)}
html.ds23 .w3h-feed-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--space-3) var(--space-6)}
html.ds23 .w3h-feed-title,
html.ds23 .w3h-feed-state{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}
html.ds23 .w3h-feed-title b{color:var(--text-primary);font-weight:600;overflow-wrap:anywhere}
html.ds23 .w3h-feed-act{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-3)}
html.ds23 .w3h-feed-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:var(--space-3) var(--space-6);margin:0}
html.ds23 .w3h-feed-facts dt{margin-bottom:var(--space-1);font:var(--type-micro);letter-spacing:var(--type-micro-tracking);text-transform:uppercase;color:var(--text-subtle)}
html.ds23 .w3h-feed-facts dd{margin:0;display:flex;flex-direction:column;font:var(--type-caption);color:var(--text-secondary);overflow-wrap:anywhere}
html.ds23 .w3h-feed .cell-muted{color:var(--text-subtle)}
html.ds23 .w3h-when{white-space:nowrap}
