/* ClipSoft — тёмная тема. Без внешних шрифтов и CDN: работает офлайн. */
:root {
  --bg: #0e1117;
  --side: #12161e;
  --card: #171c26;
  --card-2: #1d2330;
  --line: #262d3b;
  --line-2: #323b4d;
  --text: #e7ebf3;
  --muted: #8b95a7;
  --dim: #5f6a7d;
  --accent: #7c5cff;
  --accent-2: #6748f0;
  --green: #22c55e;
  --yellow: #f5b82e;
  --red: #ef4444;
  --grey: #6b7280;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: #a996ff; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }

/* ---------- каркас ---------- */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: 0 0 232px; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #c04cff); display: grid; place-items: center; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; margin-bottom: 4px; border-radius: 10px;
  color: var(--muted); font-weight: 600; text-decoration: none;
}
.nav a:hover { background: var(--card); color: var(--text); }
.nav a.on { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { width: 20px; height: 20px; flex: 0 0 20px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.side-foot .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--muted); }
.side-foot a { color: var(--dim); }

.main { flex: 1; min-width: 0; padding: 26px 34px 60px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; font-weight: 700; }
.page-head .sub { color: var(--muted); }
.page-head .grow { flex: 1; }

/* ---------- плашки ---------- */
.strip {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; margin-bottom: 18px;
  font-size: 14px; font-weight: 600;
}
.strip.dry { background: rgba(34, 197, 94, .08); color: #6ee79a; border: 1px solid rgba(34, 197, 94, .25); }
.strip.live { background: rgba(239, 68, 68, .1); color: #ff8b8b; border: 1px solid rgba(239, 68, 68, .35); }
.strip.down { background: rgba(239, 68, 68, .1); color: #ff9c9c; border: 1px solid rgba(239, 68, 68, .35); }
.toast-wrap { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.toast { background: var(--card-2); border: 1px solid var(--line-2); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: 420px; }
.toast.error { border-color: rgba(239, 68, 68, .5); }
.toast.success { border-color: rgba(34, 197, 94, .45); }

/* ---------- карточки аккаунтов ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 14px; transition: border-color .2s;
}
.card:hover { border-color: var(--line-2); }
.card-top { display: flex; align-items: center; gap: 12px; }
.pf { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: 0 0 40px; color: #fff; }
.pf.xfree { background: linear-gradient(135deg, #7c5cff, #b14cff); }
.pf.fikfap { background: linear-gradient(135deg, #ff4f8b, #ff8a3d); }
.pf.redgifs { background: linear-gradient(135deg, #e5484d, #ff6b3d); }
.card-name { flex: 1; min-width: 0; }
.card-name button {
  background: none; border: 0; padding: 0; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--text);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-align: left;
}
.card-name button:hover { color: #c7b9ff; }
.card-name .pl { color: var(--muted); font-size: 13px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; background: var(--grey); }
.dot.green { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .15); }
.dot.yellow { background: var(--yellow); box-shadow: 0 0 0 4px rgba(245, 184, 46, .15); animation: pulse 1.4s infinite; }
.dot.red { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }
@keyframes pulse { 50% { opacity: .45; } }
.state-word { font-size: 13px; color: var(--muted); }

.metrics { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; }
.metric { display: flex; flex-direction: column; justify-content: space-between; }
.metric { background: var(--card-2); border-radius: 10px; padding: 10px 12px; }
.metric { min-width: 0; }
.metric .k { font-size: 12px; color: var(--muted); line-height: 1.25; }
.metric .v { font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.metric .v small { font-size: 13px; color: var(--muted); font-weight: 600; }
.v.ok { color: #6ee79a; } .v.bad { color: #ff8b8b; } .v.muted { color: var(--muted); font-size: 15px; }
.metric [data-auth] { white-space: normal; line-height: 1.25; }

.problem { background: rgba(239, 68, 68, .09); border: 1px solid rgba(239, 68, 68, .28); color: #ffb4b4; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }

.card-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--card-2); padding: 9px 16px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: #47526a; text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn.big { flex: 1; padding: 12px 18px; font-size: 16px; }
.btn.start { background: var(--green); border-color: var(--green); color: #052e14; }
.btn.start:hover { background: #2fd56b; }
.btn.stop { background: transparent; border-color: rgba(239, 68, 68, .6); color: #ff9c9c; }
.btn.stop:hover { background: rgba(239, 68, 68, .1); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--muted);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 44px;
}
.icon-btn:hover { color: var(--text); border-color: #47526a; }
.icon-btn.del:hover { color: #ff8b8b; border-color: rgba(239, 68, 68, .6); }
.icon-btn svg { width: 20px; height: 20px; }

.add-big {
  margin-top: 22px; width: 100%; border: 2px dashed var(--line-2); background: transparent; color: var(--muted); border-radius: var(--radius);
  padding: 22px; font-size: 17px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.add-big:hover { border-color: var(--accent); color: var(--text); background: rgba(124, 92, 255, .06); }
.add-big svg { width: 22px; height: 22px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px 10px; font-size: 16px; }

/* ---------- окна ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 6, 10, .72); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 5vh 16px; }
.modal { background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 720px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; max-height: 90vh; }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal.narrow { max-width: 560px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal-head h2 { margin: 0; font-size: 19px; flex: 1; }
.modal-body { padding: 20px 22px; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex: 0 0 auto; }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 26px; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--text); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 10px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; color: var(--muted); padding: 18px 0; }

/* история */
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist li:last-child { border-bottom: 0; }
.hist .line { display: flex; gap: 14px; align-items: baseline; }
.hist .t { color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 92px; font-size: 14px; }
.hist .ok { color: #9be8b4; } .hist .bad { color: #ffaaaa; } .hist .warn { color: #ffd479; } .hist .muted { color: var(--muted); }
.hist .hint { margin: 4px 0 0 106px; font-size: 13px; color: var(--muted); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0 106px; }
.thumbs img { width: 120px; height: 75px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line-2); cursor: zoom-in; }
.thumbs a.zip { display: inline-flex; align-items: center; font-size: 13px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; height: 30px; align-self: center; }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ---------- формы ---------- */
.form-sec { margin-bottom: 22px; }
.form-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.field { margin-bottom: 16px; }
.field > label, .field .lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.field .help { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 13px; color: #ff8b8b; margin-top: 5px; }
.input, select.input, textarea.input {
  width: 100%; background: #0f131b; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
textarea.input { min-height: 110px; resize: vertical; }
.input.num { width: 120px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.with-btn { display: flex; gap: 8px; }
.with-btn .input { flex: 1; }
.radios { display: flex; gap: 8px; flex-wrap: wrap; }
.radios label { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 600; }
.radios input { accent-color: var(--accent); }
.radios label:has(input:checked) { border-color: var(--accent); background: rgba(124, 92, 255, .1); }
.radios.col { flex-direction: column; }
.radios.col label { font-weight: 500; }

.switch-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--card-2); border-radius: 10px; margin-bottom: 10px; }
.switch-row .txt { flex: 1; }
.switch-row .txt b { display: block; }
.switch-row .txt span { font-size: 13px; color: var(--muted); }
.sw { position: relative; width: 48px; height: 28px; flex: 0 0 48px; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw span { position: absolute; inset: 0; background: #394257; border-radius: 99px; transition: .2s; cursor: pointer; }
.sw span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .2s; }
.sw input:checked + span { background: var(--accent); }
.sw input:checked + span::after { transform: translateX(20px); }
.sw input:disabled + span { opacity: .45; cursor: not-allowed; }
.lock { font-size: 12px; font-weight: 700; color: var(--yellow); background: rgba(245, 184, 46, .1); border: 1px solid rgba(245, 184, 46, .3); border-radius: 99px; padding: 2px 9px; white-space: nowrap; }

.slider { display: flex; align-items: center; gap: 14px; }
.slider input[type=range] { flex: 1; accent-color: var(--accent); height: 28px; }
.slider .val { min-width: 76px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* панели настроек */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 22px; max-width: 980px; }
.panel h2 { margin: 0 0 4px; font-size: 19px; }
.panel .lead { color: var(--muted); margin: 0 0 20px; }
.panel-foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab { display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 700; color: var(--muted); }
.tab .pf { width: 30px; height: 30px; flex-basis: 30px; font-size: 14px; border-radius: 8px; }
.tab.on { color: var(--text); border-color: var(--accent); background: rgba(124, 92, 255, .1); }
.tab-pane[hidden] { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.disabled-zone { opacity: .55; pointer-events: none; user-select: none; }
.effects { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.stub { text-align: center; padding: 70px 20px; color: var(--muted); }
.stub .big { font-size: 22px; color: var(--text); font-weight: 700; margin-bottom: 8px; }
.stub svg { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--accent); }

/* выбор профилей / папок */
.pick-list { max-height: 50vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list label, .pick-list .dir { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-list label:last-child, .pick-list .dir:last-child { border-bottom: 0; }
.pick-list label:hover, .pick-list .dir:hover { background: var(--card-2); }
.pick-list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.pick-list .num { color: var(--muted); font-size: 13px; margin-left: auto; }
.crumb { font-family: Consolas, monospace; font-size: 13px; color: var(--muted); margin-bottom: 10px; word-break: break-all; }

/* вход */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.login .brand { padding: 0 0 22px; justify-content: center; }

@media (max-width: 1440px) {
  .main { padding: 22px 24px 50px; }
  .side { width: 210px; flex-basis: 210px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; }
  .brand { padding: 0 14px 0 0; }
  .nav { display: flex; }
  .nav a { margin: 0 4px 0 0; white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 18px 16px 50px; }
  .grid-2, .row2 { grid-template-columns: 1fr; }
}

/* маленькая таблица в карточке статистики */
table.mini { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.mini th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.mini td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
table.mini tr:last-child td { border-bottom: 0; }

/* ---------- статистика ---------- */
.panel.wide { max-width: none; }
a.tab { text-decoration: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kpis .v small { font-size: 12.5px; }
.up { color: #6ee79a; } .down { color: #ff8b8b; } .muted { color: var(--muted); }
.sparks { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.sparks .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
svg.spark { width: 260px; height: 48px; }
svg.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.filters { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.chip:hover { color: var(--text); text-decoration: none; }
.chip.on { background: rgba(124, 92, 255, .14); border-color: var(--accent); color: var(--text); }
.bd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.bd-grid .panel { margin-bottom: 22px; }
.cols24 { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 150px; align-items: end; margin: 6px 0 8px; }
.cols24 .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.cols24 .bar { background: linear-gradient(180deg, #9b82ff, var(--accent)); border-radius: 4px 4px 0 0; min-height: 2px; }
.cols24 .cl { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; font-variant-numeric: tabular-nums; }
.weak { opacity: .45; }
table.bars { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.bars td { padding: 6px 6px; border-bottom: 1px solid var(--line); }
table.bars tr:last-child td { border-bottom: 0; }
table.bars .lbl { white-space: nowrap; width: 1%; padding-right: 12px; }
table.bars .lbl.cap { white-space: normal; width: 42%; }
table.bars .barcell { width: 40%; }
.hbar { height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #b39cff); min-width: 2px; }
td.n, th.n { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table.posts { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.posts th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.posts th a { color: var(--muted); }
table.posts th a:hover { color: var(--text); text-decoration: none; }
table.posts td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.posts td.cap { max-width: 340px; }
table.posts tr:hover td { background: rgba(255, 255, 255, .02); }
@media (max-width: 1200px) { .bd-grid { grid-template-columns: 1fr; } }
.best { font-size: 14px; margin: 4px 0 6px; }
.best b { color: #c7b9ff; }
table.bars tr.hd td { color: var(--muted); font-size: 11.5px; padding-top: 0; border-bottom: 1px solid var(--line-2); }
table.bars.types td { background: rgba(124, 92, 255, .05); }
.note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--card-2); color: var(--muted); font-size: 13.5px; }
.file-scout { border: 1px solid rgba(245, 184, 46, .35); background: rgba(245, 184, 46, .06); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.fs-head { display: flex; gap: 10px; align-items: center; }

/* ---------- библиотека ---------- */
.lib-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }
.lib-top .panel { max-width: none; margin-bottom: 18px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 14px; padding: 26px; text-align: center; transition: .15s; }
.dropzone svg { width: 34px; height: 34px; margin: 0 auto 8px; color: var(--accent); }
.dropzone .big { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.dropzone.over { border-color: var(--accent); background: rgba(124, 92, 255, .08); }
.link { color: #a996ff; cursor: pointer; text-decoration: underline; }
.small { font-size: 12.5px; }
.upload-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.up-item { display: grid; grid-template-columns: 1fr 160px 90px; gap: 10px; align-items: center; font-size: 13.5px; }
.up-bar { height: 8px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.up-bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up-item .st { text-align: right; color: var(--muted); }
.up-item .st.ok { color: #6ee79a; } .up-item .st.bad { color: #ff8b8b; }
.folder-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.folder-row code { font-size: 13px; }
.plan-when { font-size: 26px; font-weight: 800; margin: 4px 0; }
.pill.ok { color: #6ee79a; background: rgba(34, 197, 94, .1); }
.pill.warn { color: #ffd479; background: rgba(245, 184, 46, .1); }
.pill.bad { color: #ff9c9c; background: rgba(239, 68, 68, .1); }
.pill.accent { color: #c7b9ff; background: rgba(124, 92, 255, .15); }
.pill.muted { color: var(--muted); }
table.lib { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lib th { text-align: left; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line-2); }
table.lib td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.thumbc { width: 96px; }
.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line-2); cursor: zoom-in; display: block; }
.thumb.small { width: 56px; height: 56px; margin-left: 28px; }
.thumb.ph { background: var(--card-2); cursor: default; }
.variant-row td { background: rgba(124, 92, 255, .04); }
.small-btn { padding: 5px 10px; font-size: 12.5px; }
/* ---------- уникализатор ---------- */
.ba { display: flex; flex-direction: column; gap: 14px; }
.ba { flex-direction: row; flex-wrap: wrap; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 440px; max-width: 100%; }
.ba-pair img { width: 100%; border-radius: 8px; border: 1px solid var(--line-2); cursor: zoom-in; }
pre.code { background: #0b0e14; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; overflow: auto; }
h3.sec { font-size: 15px; margin: 0 0 8px; }
@media (max-width: 1200px) { .lib-top { grid-template-columns: 1fr; } }

.next-post { font-size: 14px; background: var(--card-2); border-radius: 10px; padding: 9px 12px; }
.next-post .k { color: var(--muted); }

.win-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.win-row input[type=time] { width: 120px; }
.win-row .input.num { width: 70px; }

.ssim-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ssim-row span { min-width: 90px; font-weight: 600; }

.scout-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 14px; }

.dry-count { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.last-attempt { font-size: 14px; margin: 8px 0 12px; }
.last-attempt details { margin-top: 6px; }
.last-attempt pre.code { white-space: pre-wrap; word-break: break-word; }

/* этап 2в: настройки кнопки, сухой пост в истории, обложки */
.radios.checks label { padding: 6px 10px; font-weight: 500; font-size: 13.5px; }
.hist .payload { margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); display: grid; gap: 3px; }
.cover-cell { display: flex; align-items: center; gap: 8px; }
.cover-cell img { width: 44px; height: 60px; object-fit: cover; border-radius: 6px; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.cover-grid button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; text-align: left; color: inherit; }
.cover-grid button.on { border-color: var(--accent); }
.cover-grid button.rej { opacity: .45; }
.cover-grid img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; display: block; }
.cover-grid .cap { font-size: 12px; padding: 4px 4px 2px; line-height: 1.3; }
button.link { background: none; border: 0; padding: 0; font: inherit; }

/* страница аккаунта */
.back { display: inline-block; margin: 0 0 10px; color: var(--muted); text-decoration: none; }
.back:hover { color: inherit; }
.acc-head h1 { margin: 0; font-size: 22px; }
.acc-head .card-top { align-items: center; gap: 12px; }
.acc-head .next-post, .acc-head .problem { margin-top: 12px; }
.acc-tabs { margin: 14px 0 16px; }
.tab-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grow { flex: 1; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: var(--accent); }
.card-link { font-weight: 700; font-size: 16px; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.ov-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ov-kpis .kpi { background: var(--panel, rgba(255,255,255,.03)); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; }
.ov-kpis .k { color: var(--muted); font-size: 13px; }
.ov-kpis .v { font-size: 26px; font-weight: 800; margin-top: 4px; }
.warn-list ul { margin: 0; padding-left: 18px; } .warn-list li { margin: 4px 0; color: #ffd479; }
.acc-settings .form-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.danger-zone { border-color: rgba(239, 68, 68, .35); }
.row-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
ul.how { margin: 0; padding-left: 18px; } ul.how li { margin: 6px 0; line-height: 1.45; }
@media (max-width: 700px) { .acc-head .card-top { flex-wrap: wrap; } }
/* кнопки ручных задач — в одну строку */
.scout-row .btn { white-space: nowrap; flex-shrink: 0; }
/* очередь библиотеки */
table.lib tbody.qgroup.is-next > tr:first-child td { background: rgba(34, 197, 94, .06); }
table.lib.sortable tbody.qgroup { cursor: grab; }
table.lib tbody.qgroup.dragging { opacity: .45; }
.qpos { white-space: nowrap; } .qpos .handle { color: var(--muted); margin-right: 6px; cursor: grab; }
.qbtns { display: flex; gap: 8px; justify-content: center; margin-top: 4px; } .qbtns .link { font-size: 15px; text-decoration: none; }
/* карточка видео */
.modal.wide-modal { max-width: 1040px; width: 96vw; }
.vc { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
@media (max-width: 760px) { .vc { grid-template-columns: 1fr; } }
.phone { position: relative; width: 270px; aspect-ratio: 9/16; margin: 0 auto 8px; border-radius: 22px; overflow: hidden; background: #000; border: 6px solid #222; }
.phone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-over { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; font-size: 12.5px; }
.ph-user { font-weight: 700; margin-bottom: 4px; } .ph-cap { margin-bottom: 4px; white-space: pre-wrap; } .ph-tags { opacity: .85; margin-bottom: 8px; }
.ph-btn { text-align: center; padding: 8px; border-radius: 10px; font-weight: 700; }
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--line-2); border-radius: 10px; }
.chip-t { background: rgba(124,92,255,.15); border-radius: 8px; padding: 3px 4px 3px 8px; font-size: 13px; }
.chip-t button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 4px; }
.chip-in { flex: 1; min-width: 160px; background: none; border: 0; color: inherit; outline: none; }
.vc-actions { display: flex; gap: 10px; justify-content: flex-end; }
.vc-info { border-top: 1px solid var(--line-2); }
button.vname { color: inherit; text-decoration: none; text-align: left; } button.vname:hover b { text-decoration: underline; }
.vcap { margin-top: 2px; }

/* трекинг-ссылки OnlyMonster */
.tbl-scroll { overflow-x: auto; }
table.links-tbl .input { min-width: 0; padding: 5px 7px; font-size: 13px; }
table.links-tbl td:nth-child(2) .input { width: 170px; }
table.links-tbl td:nth-child(3) .input { width: 240px; }
table.links-tbl .input.num { width: 72px; }
table.funnel td.n, table.funnel th.n { text-align: right; }
.hint-list { margin: 8px 0 6px 18px; } .hint-list li { margin: 3px 0; }

/* ===== простой интерфейс: подсказка «?», «Дополнительно», меню «⋯», «подробнее» ===== */
.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 11px; font-weight: 700; cursor: help; margin-left: 4px; vertical-align: 1px; position: relative; }
.tip:hover { color: var(--text); border-color: var(--muted); }
.tip[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 50;
  width: max-content; max-width: 300px; white-space: normal; background: #0b0e14; border: 1px solid var(--line-2); color: var(--text);
  font-weight: 400; font-size: 12.5px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow); text-align: left; }
details.adv { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.adv > summary, details.more > summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; user-select: none; }
details.adv > summary::before, details.more > summary::before { content: "▸ "; }
details.adv[open] > summary::before, details.more[open] > summary::before { content: "▾ "; }
details.adv > summary:hover, details.more > summary:hover { color: var(--text); }
details.adv > summary { font-size: 15px; margin-bottom: 4px; }
details.more > summary { font-size: 12.5px; display: inline-block; }
details.more[open] { margin-top: 4px; }
details.more > .more-body { margin-top: 6px; padding: 8px 10px; background: var(--card-2); border-radius: 10px; font-size: 13px; }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker, details.adv > summary::-webkit-details-marker, details.more > summary::-webkit-details-marker { display: none; }
.menu-dots { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--muted); font-size: 18px; line-height: 1; }
.menu-dots:hover { color: var(--text); }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 220px; background: var(--card-2); border: 1px solid var(--line-2);
  border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.menu-list > button, .menu-list > a, .menu-list form > button { background: none; border: 0; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 7px;
  font: inherit; font-size: 14px; cursor: pointer; width: 100%; }
.menu-list > button:hover, .menu-list > a:hover, .menu-list form > button:hover { background: rgba(124,92,255,.14); text-decoration: none; }
.menu-list .menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.menu-list .menu-note { color: var(--muted); font-size: 12px; padding: 4px 10px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 14px; cursor: pointer; }
.seg button.on { background: rgba(124,92,255,.18); color: var(--text); }
.word { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.word.new { color: #c7d2fe; background: rgba(129,140,248,.14); }
.word.prep { color: #ffd479; background: rgba(245,184,46,.1); }
.word.ready { color: #6ee79a; background: rgba(34,197,94,.1); }
.word.done { color: #c7b9ff; background: rgba(124,92,255,.15); }
.word.err { color: #ff9c9c; background: rgba(239,68,68,.1); }
table.lib.simple td { padding: 6px 8px; }
table.lib.simple .cover-mini img { width: 34px; height: 60px; object-fit: cover; border-radius: 6px; display: block; }
table.lib.simple .vname { font-weight: 600; }
.lib-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.lib-bar .grow { flex: 1; }
.hist-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist-top .grow { flex: 1; }
.hist .line .det { margin-left: 8px; }
.concl { list-style: none; padding: 0; margin: 6px 0 0; }
.concl li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.concl li:last-child { border-bottom: 0; }
.top5 td { padding: 5px 6px; }
.next-box p { margin: 6px 0; }
.form-sec h3 .tip { font-weight: 400; }
.vc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .vc-info details.more { display: block; margin: 6px 0; }
.bd-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } @media (max-width: 1100px) { .bd-grid.three { grid-template-columns: 1fr; } }
table.lib.simple td.row-actions { display: table-cell; vertical-align: middle; text-align: right; width: 1%; }
.next-box { align-self: start; }
.om-connect { margin: 10px 0 6px; }
.om-total { margin: 12px 0 2px; }
#om .tab-head form { display: inline; margin-left: 8px; }
table.links-tbl td:nth-child(1) .input { width: 260px; }
#om h3.sec { margin-top: 16px; } #om .panel-foot { margin-top: 8px; }
.chip-t.unknown { background: rgba(139,149,167,.12); color: var(--muted); text-decoration: line-through; }
.gen-rec { padding: 6px 0; border-top: 1px solid var(--line); }
.gen-rec.last { border-top: 0; }
.tag-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chip-sugg { background: rgba(124,92,255,.10); border: 1px dashed var(--line-2); color: var(--text); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; cursor: pointer; }
.chip-sugg:hover { border-color: var(--accent); }
.toast.warn { border-color: rgba(245, 184, 46, .55); }

/* активные часы / сессии лайкинга: два поля в строку */
.row-inline { display: flex; gap: 8px; align-items: center; }
.row-inline .input { width: auto; }

/* плашка режима + «Стоп всё» */
.strip-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 18px; }
.strip-row .strip { flex: 1; margin-bottom: 0; }
.strip.big-live { background: #b91c1c; color: #fff; border-color: #ef4444; font-size: 16px; letter-spacing: .5px; }
.strip.big-live .sub { font-weight: 500; font-size: 13px; opacity: .9; letter-spacing: 0; }
.btn.stop-all { background: #dc2626; border-color: #ef4444; color: #fff; font-weight: 700; padding: 0 18px; }
.btn.stop-all:hover { background: #b91c1c; }
.btn.stop-all svg { width: 14px; height: 14px; }
.btn.live-btn { background: #dc2626; border-color: #ef4444; color: #fff; font-weight: 600; }
.btn.live-btn:hover { background: #b91c1c; }
.live-note { color: #ff8b8b; font-size: 13px; }
.vc-live { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.row-inline.wrap { flex-wrap: wrap; } .row-inline .input.num { width: 70px; }
.live-det { border-left: 3px solid #ef4444; padding-left: 10px; margin-bottom: 8px; }

/* ---------- телефон: кабинет модели ---------- */
.nav-logout { display: none; }
.nav-logout button { background: none; border: 0; color: var(--muted); font: inherit; padding: 8px 10px; cursor: pointer; }
@media (max-width: 900px) {
  .nav-logout { display: block; margin-left: auto; }
  .strip-row { flex-wrap: wrap; }
  .tabs, .acc-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tabs .tab { white-space: nowrap; }
  .table-wrap, .lib-table-wrap { overflow-x: auto; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .main { padding: 14px 12px 60px; }
  .cards { grid-template-columns: 1fr; }
  .kpis, .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { min-height: 40px; }
  .btn.big { width: 100%; justify-content: center; }
  .card-actions, .acc-head .card-top { flex-wrap: wrap; gap: 8px; }
  .acc-head h1 { font-size: 20px; }
  .modal { width: 100vw !important; max-width: 100vw !important; height: 100vh; max-height: 100vh; border-radius: 0; }
  .modal-body { max-height: calc(100vh - 120px); overflow-y: auto; }
  .dropzone { padding: 18px 12px; }
  .dropzone .big { font-size: 16px; }
  .hist .line { flex-wrap: wrap; }
  .strip { font-size: 13px; }
  input.input, select.input, textarea.input { font-size: 16px; }   /* iPhone не увеличивает страницу при вводе */
}

/* «Доступы» */
.access-row { border-top: 1px solid var(--line); padding: 14px 0; }
.access-row.revoked { opacity: .55; }
.access-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
