/* Свои стили SOC комбайна поверх общего style.css */
/* подсказки страницы (как в tg_parser) */
.page-help { margin: 0 0 16px; border: 1px solid var(--blue-line); border-radius: var(--radius); background: var(--blue-soft); }
.page-help > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-weight: 600; color: var(--blue-ink); display: flex; align-items: center; gap: 10px; user-select: none; }
.page-help > summary::-webkit-details-marker { display: none; }
.page-help > summary::after { content: '▾'; margin-left: auto; }
.page-help[open] > summary::after { content: '▴'; }
.ph-ico { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font: italic 700 14px/1 Georgia, serif; }
.ph-body { padding: 0 16px 14px; }
.ph-body ul { margin: 0; padding-left: 18px; }
.ph-body li { margin: 4px 0; }
/* требует внимания */
.att-list { display: grid; }
.att-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line-2); color: var(--ink); }
.att-row:first-child { border-top: 0; }
.att-row:hover { background: var(--u-hover); text-decoration: none; color: var(--ink); }
.att-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.att-row.att-err .att-dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.att-go { color: var(--blue-ink); font-weight: 600; font-size: 13px; white-space: nowrap; }
/* вкладки настроек и периодов */
.set-tabs, .period-tabs { display: flex; gap: 4px; padding: 3px; background: var(--u-fill); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.set-tabs { margin-bottom: 16px; width: max-content; max-width: 100%; }
.set-tabs a, .period-tabs a { padding: 7px 14px; border-radius: 9px; color: var(--soft); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; }
.set-tabs a.on, .period-tabs a.on { background: var(--surface); color: var(--blue-ink); box-shadow: var(--u-shadow-sm); }
.stats-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.stats-head .ph1 { margin: 0 auto 0 0; }

/* ---------- общее ---------- */
.mono, textarea.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.btn .icon { width: 17px; height: 17px; }
.pad { padding: 14px 20px; margin: 0; }
.stats-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.stats-head .ph1 { margin: 0 auto 0 0; }
.side-new { padding: 0 12px 10px; }
.side-install { padding: 0 12px 10px; }
.side-install:has(> [hidden]) { display: none; }
a.tg-state:hover { text-decoration: none; }
.tg-state span:last-child { overflow: hidden; text-overflow: ellipsis; }
.main > .wrap.wide, .main > .wrap:has(.composer), .main > .wrap:has(.cal) { max-width: 1480px; }
a.tile:hover { text-decoration: none; color: var(--ink); border-color: var(--blue-mid); }
a.tile { color: var(--ink); }
.set-tabs, .period-tabs { display: flex; gap: 4px; padding: 3px; background: var(--u-fill); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; scrollbar-width: none; }
.set-tabs { margin-bottom: 16px; width: max-content; max-width: 100%; }
.set-tabs a, .period-tabs a { padding: 7px 14px; border-radius: 9px; color: var(--soft); font-weight: 600; font-size: 13.5px; white-space: nowrap; text-decoration: none; }
.set-tabs a.on, .period-tabs a.on { background: var(--surface); color: var(--blue-ink); box-shadow: var(--u-shadow-sm); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.note ul { margin: 6px 0 0; padding-left: 18px; }
.more > summary { color: var(--blue-ink); font-weight: 650; font-size: 14px; }
.more[open] > summary { margin-bottom: 12px; }
.danger-zone { padding-top: 12px; border-top: 1px solid var(--u-line-2); }
.api-doc pre { overflow-x: auto; padding: 12px; margin: 0; border-radius: var(--radius-s); background: var(--u-fill); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.token { font-size: 15px; user-select: all; }
.device-code { font: 700 22px ui-monospace, Menlo, monospace; letter-spacing: .12em; user-select: all; }
.logo-full { display: block; width: 56px; height: 56px; margin-bottom: 14px; filter: drop-shadow(0 8px 16px color-mix(in srgb, var(--blue) 30%, transparent)); }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: var(--radius-s); border: 1px solid var(--green-line); background: var(--green-soft); color: var(--green-ink); box-shadow: 0 14px 40px #0003; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.toast.bad { border-color: var(--red-line); background: var(--red-soft); color: var(--red-ink); }
dialog.dlg { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px #0006; }
dialog.dlg::backdrop { background: color-mix(in srgb, #0b1220 55%, transparent); backdrop-filter: blur(2px); }

/* ---------- значки сетей ---------- */
.net { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--c); vertical-align: middle; }
.net img { width: 14px; height: 14px; filter: brightness(0) invert(1); }
.net-rutube img, .net-dzen img, .net-max img, .net-vkvideo img { width: 22px; height: 22px; filter: none; }
.nets { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.att-row .nets { min-width: 22px; max-width: 80px; }
.att-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.att-text { min-width: 0; display: block; }
.att-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-text .sub { overflow-wrap: anywhere; }

/* ---------- графики обзора ---------- */
.bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 130px; }
.bars-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bars-fill { width: 100%; min-height: 2px; border-radius: 4px 4px 2px 2px; background: var(--blue); }
.bars-col span { font-size: 10px; color: var(--muted); margin-top: 4px; height: 12px; }
.spark { width: 120px; height: 28px; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }

/* ---------- календарь ---------- */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-bar .grow { flex: 1; }
.cal-scroll { overflow-x: auto; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { padding: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.cal-day { min-height: 118px; padding: 5px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day.other { background: var(--surface-2); }
.cal-day.past .cal-date span { color: var(--muted); }
.cal-day.drop { outline: 2px dashed var(--blue); outline-offset: -3px; background: var(--blue-soft); }
.cal-date { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; }
.cal-day.today .cal-date span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; }
.cal-add { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; font-size: 17px; line-height: 1; opacity: .35; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; background: var(--blue-soft); text-decoration: none; }
.chip { display: block; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid var(--muted); background: var(--surface); color: var(--ink); font-size: 11.5px; line-height: 1.3; cursor: grab; }
.chip:hover { text-decoration: none; color: var(--ink); box-shadow: var(--u-shadow-sm), var(--shadow); }
.chip-top { display: flex; justify-content: space-between; gap: 4px; align-items: center; }
.chip .net { width: 15px; height: 15px; border-radius: 5px; }
.chip .net img { width: 10px; height: 10px; }
.chip .net-rutube img, .chip .net-dzen img, .chip .net-max img, .chip .net-vkvideo img { width: 15px; height: 15px; }
.chip-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); }
.st-scheduled { border-left-color: var(--blue); background: var(--blue-soft); }
.st-done { border-left-color: var(--green); background: var(--green-soft); cursor: pointer; }
.st-failed { border-left-color: var(--red); background: var(--red-soft); }
.st-partial { border-left-color: var(--orange); background: var(--orange-soft); }

/* ---------- редактор ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 0 18px; align-items: start; }
.composer-main, .composer-side { min-width: 0; }
@media (max-width: 1279px) { .composer { grid-template-columns: minmax(0, 1fr); } }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--soft); font: 600 13.5px var(--font); cursor: pointer; }
.pick .net { filter: grayscale(1); opacity: .6; }
.pick.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-ink); box-shadow: var(--u-ring); }
.pick.on .net { filter: none; opacity: 1; }
.pick.off span:last-child { text-decoration: underline dotted var(--orange); }
.pick:disabled { cursor: default; }
span.pick { cursor: default; }
.net-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 3px; background: var(--u-fill); border: 1px solid var(--line); border-radius: 12px; }
.net-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 0; border-radius: 9px; background: none; color: var(--soft); font: 600 13px var(--font); white-space: nowrap; cursor: pointer; }
.net-tabs button.on { background: var(--surface); color: var(--blue-ink); box-shadow: var(--u-shadow-sm); }
.net-tabs .own { color: var(--orange); font-size: 18px; line-height: 0; }
.composer .field > input, .composer .field > textarea, .dlg .field > input, .dlg .field > textarea { max-width: none; }
.counter { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.counter span { display: inline-flex; align-items: center; gap: 5px; }
.counter .over { color: var(--red-ink); font-weight: 700; }
.counter .net { width: 16px; height: 16px; border-radius: 5px; }
.counter .net img { width: 10px; height: 10px; }
.drop-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px; border: 1.5px dashed var(--u-field-line); border-radius: var(--radius); background: var(--u-fill); }
.drop-zone.over { border-color: var(--blue); background: var(--blue-soft); }
.drop-zone input[type=file] { flex: 1 1 220px; width: auto; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-grid:empty { display: none; }
.media-tile { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.media-tile img, .media-tile video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--track); }
.media-tile figcaption { min-width: 0; font-size: 12px; }
.media-tile figcaption span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-tile figcaption small { color: var(--muted); }
.pv-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pv-head small { margin-left: auto; color: var(--muted); }
.pv-card > img, .pv-card > video { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #000; }
.pv-more { display: block; padding: 6px 12px 0; }
.pv-title { padding: 10px 12px 0; font-weight: 700; }
.pv-text { padding: 8px 12px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-height: 360px; overflow-y: auto; }
.pv-text.box { border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--u-fill); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chips .sum-label { width: 100%; font-weight: 700; font-size: 13px; color: var(--soft); }
.ai-chips .btn { white-space: normal; text-align: left; }
.ai-result:empty { display: none; }
.ai-result { display: flex; flex-direction: column; gap: 8px; }
.composer-side select { width: 100%; }

/* ---------- подключения ---------- */
details.acc > summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .att-text { flex: 1; }
details.acc > summary .sub { white-space: normal; }
details.acc[open] > summary { border-bottom: 1px solid var(--u-line-2); }
details.acc .net { width: 34px; height: 34px; border-radius: 10px; }
details.acc .net img { width: 20px; height: 20px; }
details.acc .net-rutube img, details.acc .net-dzen img, details.acc .net-max img, details.acc .net-vkvideo img, .net-card .net img[src*="rutube"], .net-card .net img[src*="dzen"], .net-card .net img[src*="max"], .net-card .net img[src*="vkvideo"] { width: 34px; height: 34px; }
.net-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.btn.net-card { justify-content: flex-start; min-height: 62px; text-align: left; }
.net-card .net { width: 34px; height: 34px; border-radius: 10px; }
.net-card .net img { width: 20px; height: 20px; }
.net-card small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- чат ---------- */
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 0 18px; align-items: start; }
.chat-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: var(--radius-s); }
.chat-item a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); font-size: 13.5px; }
.chat-item.on { background: var(--blue-soft); }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 160px; max-height: 60vh; overflow-y: auto; }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.msg.user { align-self: flex-end; background: var(--blue-soft); border-color: var(--blue-line); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .form-actions { margin-top: 8px; }
.chat-main textarea { max-width: none; }
@media (max-width: 900px) { .chat { grid-template-columns: minmax(0, 1fr); } .chat-list { max-height: 150px; margin-bottom: 12px; } }
@media (max-width: 719px) { #toasts { bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); } .bars-col:nth-child(odd) span { visibility: hidden; } }
