/* Dolphin Manager — тёмная тема, компактно, без внешних шрифтов */

:root {
  --bg: #0d1117;
  --card: #161b22;
  --card2: #1c2129;
  --border: #30363d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #1f6feb;
  --accent-hover: #388bfd;
  --ok: #238636;
  --warn: #e3b341;
  --err: #b91c1c;
  --err-text: #f85149;
  --sel: rgba(31, 111, 235, 0.16);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.4 var(--sans);
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ok { color: #3fb950; }
.err { color: var(--err-text); }
.warn { color: var(--warn); }
.pre { white-space: pre-wrap; }

/* ---------- шапка ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: 600; font-size: 15px; white-space: nowrap; }
.indicators { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ind { white-space: nowrap; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); }
.ind b { font-weight: 700; }
.ind.ok b { color: #3fb950; }
.ind.bad b { color: var(--err-text); }
.ind.unknown b { color: var(--muted); }
.counters { margin-left: auto; color: var(--muted); white-space: nowrap; }

/* ---------- вкладки ---------- */
.tabs {
  display: flex; gap: 2px; padding: 0 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 45px; z-index: 19;
  overflow-x: auto;
}
.tab {
  background: none; border: none; color: var(--muted);
  padding: 8px 12px; cursor: pointer; font: inherit;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab .cnt { color: var(--accent-hover); font-size: 11px; }

main { padding: 10px 14px 60px; }
.panel { display: flex; flex-direction: column; gap: 10px; }

/* ---------- карточки, формы ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.card h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 + h3 { margin-top: 4px; }
.card .form-grid + h3 { margin-top: 12px; }

.toolbar, .row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.row { margin-top: 8px; }
.sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; }

.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px;
}
.form-grid label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; }
.form-grid label.chk { flex-direction: row; align-items: center; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid .checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.inline { display: flex; gap: 6px; align-items: center; }
label.chk { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; }
label.chk input[type="text"] { margin-left: 2px; }

input[type="text"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 7px;
  font: inherit;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.25); }
input::placeholder, textarea::placeholder { color: #6e7681; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; }
textarea { width: 100%; font-family: var(--mono); font-size: 12px; resize: vertical; margin-top: 6px; }
.w4 { width: 4.5em; }
.w8 { width: 8em; }
.w12 { width: 12em; }
.pw { display: flex; gap: 4px; align-items: center; }
.pw input { flex: 1 1 auto; }
input[type="checkbox"] { accent-color: var(--accent); margin: 0; }
details summary { cursor: pointer; color: var(--muted); padding: 4px 0; user-select: none; }
details summary:hover { color: var(--text); }

/* ---------- кнопки ---------- */
.btn {
  background: #21262d;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 12px;
  font: inherit;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:hover:not(:disabled) { background: #30363d; border-color: #8b949e; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #d12a2a; border-color: #d12a2a; }
.btn-sm { padding: 3px 8px; font-size: 12px; }
.btn-xs { padding: 1px 6px; font-size: 11px; }

.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px;
}
.btn:not(.btn-primary):not(.btn-danger) .spinner { border-color: rgba(201, 209, 217, 0.3); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- таблицы ---------- */
.table-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: 6px; background: var(--card); }
.card .table-wrap { max-height: 50vh; border-color: var(--border); }
table.grid { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.grid th, table.grid td { padding: 3px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--card2); color: var(--muted); font-weight: 600;
  white-space: nowrap; user-select: none;
}
table.grid th.sortable { cursor: pointer; }
table.grid th.sortable:hover { color: var(--text); }
table.grid th.sorted-asc::after { content: " ▲"; font-size: 9px; }
table.grid th.sorted-desc::after { content: " ▼"; font-size: 9px; }
table.grid tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
table.grid tbody tr:hover { background: rgba(255, 255, 255, 0.05); }
table.grid tbody tr.sel { background: var(--sel); }
table.grid tbody tr.sel:hover { background: rgba(31, 111, 235, 0.26); }
table.grid tbody tr.off td { opacity: 0.45; }
table.grid tbody tr.off td.c-chk { opacity: 1; }
#profilesTable tbody tr { cursor: pointer; }
.c-chk { width: 28px; text-align: center !important; }
.c-run { width: 28px; text-align: center !important; }
.c-name { white-space: nowrap; }
.c-notes { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.c-proxy { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.c-tags { max-width: 240px; }
.c-new input { width: 100%; min-width: 120px; }
table.grid td input[type="text"], table.grid td input[type="password"] { padding: 2px 6px; font-size: 12px; width: 100%; }
#flTable td:first-child { white-space: nowrap; }

.badge {
  display: inline-block; padding: 0 5px; border-radius: 8px; font-size: 10.5px; line-height: 15px;
  vertical-align: 1px; margin-left: 4px; font-weight: 600;
}
.badge.ok { background: rgba(35, 134, 54, 0.25); color: #3fb950; }
.badge.bad { background: rgba(185, 28, 28, 0.3); color: #ff7b72; }
.badge.warn { background: rgba(227, 179, 65, 0.2); color: var(--warn); }
.badge.muted { background: rgba(139, 148, 158, 0.2); color: var(--muted); }
.badge.nf { background: transparent; color: var(--muted); border: 1px dashed rgba(139, 148, 158, 0.45); font-weight: 400; }
.badge.mk-vylet { background: rgba(227, 179, 65, 0.22); color: var(--warn); }
.badge.mk-proxy { background: rgba(185, 28, 28, 0.28); color: #ff7b72; }
.chip {
  display: inline-block; padding: 0 6px; margin: 1px 2px 1px 0; border-radius: 9px;
  background: rgba(139, 148, 158, 0.18); color: var(--text); font-size: 11px; line-height: 16px;
}
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; background: var(--muted); }
.run-dot { color: #3fb950; font-size: 14px; }

.empty { padding: 24px; text-align: center; color: var(--muted); }
.list-box { max-height: 200px; overflow: auto; padding: 4px 0; }

/* ---------- предупреждения, результаты ---------- */
.warnings {
  border: 1px solid var(--err); background: rgba(185, 28, 28, 0.12);
  border-radius: 4px; padding: 6px 10px; margin-bottom: 8px; color: #ff7b72; font-size: 12px;
  max-height: 160px; overflow: auto;
}
.warnings div::before { content: "⚠ "; }
.result-box { margin-top: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
.check-result { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.cr-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); }
.cr-row .cr-ic { width: 14px; text-align: center; font-weight: 700; color: var(--muted); }
.cr-row.ok .cr-ic { color: #3fb950; }
.cr-row.bad .cr-ic { color: var(--err-text); }
.cr-row b { white-space: nowrap; }
.cr-row span:last-child { color: var(--muted); }

/* ---------- прогресс ---------- */
.progress { position: relative; height: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; min-width: 160px; }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.progress.done .bar { background: var(--ok); }
.progress.error .bar { background: var(--err); }
.progress.stopped .bar { background: var(--warn); }
.progress .ptext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text); }

/* ---------- лог ---------- */
.log {
  font-family: var(--mono); font-size: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 8px; margin-top: 8px;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}
.log:empty { display: none; }
.log.tall { max-height: calc(100vh - 260px); min-height: 200px; }
.log.tall:empty { display: block; }
.ll { line-height: 1.45; }
.ll .ts { color: #6e7681; margin-right: 8px; }
.ll-info { color: var(--text); }
.ll-ok { color: #3fb950; }
.ll-warn { color: var(--warn); }
.ll-error { color: #ff7b72; }
.ll-debug { color: #6e7681; }

/* ---------- задачи ---------- */
.jobs-layout { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 10px; }
@media (max-width: 900px) { .jobs-layout { grid-template-columns: 1fr; } }
.jobs-list { max-height: calc(100vh - 140px); overflow: auto; }
.job { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 6px; cursor: pointer; background: var(--bg); }
.job:hover { border-color: #8b949e; }
.job.active { border-color: var(--accent); background: var(--sel); }
.job-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.job .btn { margin-left: auto; }
.st-queued { background: rgba(139, 148, 158, 0.25); color: var(--muted); }
.st-running { background: rgba(31, 111, 235, 0.3); color: #79c0ff; }
.st-done { background: rgba(35, 134, 54, 0.25); color: #3fb950; }
.st-error { background: rgba(185, 28, 28, 0.3); color: #ff7b72; }
.st-stopped { background: rgba(227, 179, 65, 0.2); color: var(--warn); }
.jobs-detail .row { margin-top: 0; }
.jobs-detail .row h3 { margin: 0; }
.jobs-detail .progress { margin-top: 8px; }

/* ---------- тосты ---------- */
#toasts { position: fixed; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 100; max-width: 420px; }
.toast {
  padding: 8px 12px; border-radius: 6px; font-size: 12.5px;
  background: var(--card2); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); cursor: pointer;
  white-space: pre-wrap; word-break: break-word;
  animation: toast-in 0.2s ease-out;
}
.toast-ok { border-color: var(--ok); }
.toast-warn { border-color: var(--warn); }
.toast-error { border-color: var(--err); background: rgba(185, 28, 28, 0.25); }
.toast-info { border-color: var(--accent); }
.toast.fade { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- модальное окно ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 14px 16px; min-width: 320px; max-width: 640px; width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-box h3 { margin: 0 0 10px; font-size: 14px; }
#modalBody { overflow: auto; }
.modal-buttons { justify-content: flex-end; margin-top: 14px; }
.picker input { width: 100%; margin-bottom: 6px; }
.picker-list { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 4px; }
.picker-item { padding: 5px 8px; border-bottom: 1px solid var(--border); cursor: pointer; }
.picker-item:hover { background: var(--sel); }
.picker-item:last-child { border-bottom: none; }

/* ---------- лаунчер / чекер / прокси / отчёт ---------- */
.card p.muted { margin: 0 0 8px; }

/* чекер: три колонки результатов */
.check-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.check-list h4 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.check-list .list-box { border: 1px solid var(--border); border-radius: 4px; background: var(--bg); padding: 4px 7px; max-height: 320px; }
.check-list .list-box > div { padding: 1px 0; word-break: break-word; }

/* прокси: счётчик N / M */
#pxCounter { color: var(--muted); }
#pxCounter.bad { color: var(--err-text); font-weight: 600; }
#tab-proxy textarea { min-height: 120px; }

/* отчёт: таблица «не получали» — строки кликабельны */
#rpNotBody tr { cursor: pointer; }
#tab-report .table-wrap { max-height: 46vh; }


/* ======================= kabanwork: гейт входа ======================= */
#authGate.auth-wrap { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: var(--bg, #0d1117); padding: 24px 16px; overflow: auto; }
#authGate.auth-wrap.hidden { display: none !important; }
#authGate .auth-card { width: 100%; max-width: 360px; background: var(--panel, #161b22);
  border: 1px solid var(--border, #30363d); border-radius: 14px; padding: 26px 22px; }
#authGate .auth-brand { font-size: 26px; font-weight: 700; color: var(--accent, #58a6ff); text-align: center; }
#authGate .auth-sub { text-align: center; color: var(--muted, #8b949e); font-size: 13px; margin: 2px 0 18px; }
#authGate .auth-switch { display: flex; gap: 6px; margin-bottom: 14px; }
#authGate .auth-tab { flex: 1; background: var(--panel2, #1c2230); border: 1px solid var(--border, #30363d);
  color: var(--muted, #8b949e); border-radius: 8px; padding: 8px; cursor: pointer; font-size: 13px; }
#authGate .auth-tab.active { color: #fff; border-color: var(--accent, #1f6feb); background: var(--accent, #1f6feb); }
#authGate label { display: block; margin: 12px 0 5px; color: var(--muted, #8b949e); font-size: 12.5px; }
#authGate input { width: 100%; background: var(--bg, #0d1117); border: 1px solid var(--border, #30363d);
  color: var(--text, #c9d1d9); border-radius: 8px; padding: 10px 11px; font-size: 14px; outline: none; }
#authGate input:focus { border-color: var(--accent, #58a6ff); }
#authGate #authSubmit { width: 100%; margin-top: 16px; padding: 11px; font-weight: 600; }
#authGate .auth-msg { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: var(--muted, #8b949e); }
#authGate .auth-msg.err { color: var(--err, #ff7b72); }
#authGate .auth-msg.ok { color: var(--ok, #3fb950); }
#authGate .auth-hint { margin-top: 12px; font-size: 12px; color: var(--muted, #8b949e); line-height: 1.5; }
.topbar .who { color: var(--muted, #8b949e); font-size: 12px; white-space: nowrap; margin-left: 4px; }

/* kabanwork: вкладка Пользователи */
#tab-users tr.row-pending { background: rgba(227,179,65,0.10); }
#tab-users td input, #tab-users td select { padding: 3px 6px; font-size: 12.5px; }

/* kabanwork: «i»-подсказки */
.ihelp { display:inline-grid; place-items:center; width:16px; height:16px; border-radius:50%;
  background:var(--panel2,#1c2230); border:1px solid var(--border,#30363d); color:var(--accent,#58a6ff);
  font-size:11px; font-style:italic; font-weight:700; cursor:pointer; vertical-align:middle;
  margin-left:5px; line-height:1; padding:0; }
.ihelp:hover { border-color:var(--accent,#58a6ff); }
.help-box { background:var(--panel2,#1c2230); border:1px solid var(--accent,#1f6feb); border-radius:8px;
  padding:9px 11px; margin-top:6px; font-size:12px; line-height:1.55; color:var(--text,#c9d1d9);
  font-weight:400; max-width:560px; white-space:normal; }
.help-box a { color:var(--accent,#58a6ff); }
.help-box.hidden { display:none; }

/* kabanwork: баннер приветствия */
.welcome-banner { display:flex; gap:14px; align-items:flex-start; margin:14px 20px 0;
  background:var(--panel2,#1c2230); border:1px solid var(--accent,#1f6feb); border-radius:10px; padding:12px 16px; }
.welcome-banner.hidden { display:none; }
.welcome-banner .wb-body { flex:1; font-size:13px; line-height:1.5; }
.welcome-banner .wb-body > b { color:var(--text,#c9d1d9); font-size:14px; }
.welcome-banner ol { margin:6px 0 0; padding-left:20px; }
.welcome-banner li { margin:3px 0; color:var(--muted,#8b949e); }
.welcome-banner #wbHide { white-space:nowrap; align-self:center; }

/* kabanwork: Поддержка */
#tab-support .field { margin-bottom: 14px; }
#tab-support .field label { display:block; margin-bottom:5px; color:var(--muted,#8b949e); font-size:12.5px; }
#tab-support textarea { width:100%; }
.sup-item { border:1px solid var(--border,#30363d); border-radius:8px; padding:9px 11px; margin-bottom:8px; }
.sup-head { font-size:12.5px; margin-bottom:4px; }
.sup-note { font-size:12.5px; white-space:pre-wrap; color:var(--text,#c9d1d9); line-height:1.5; }
.sup-file { margin-top:6px; }

/* kabanwork: Мониторинг */
.mon-badge { display:inline-block; padding:1px 8px; border-radius:20px; font-size:11px; font-weight:600; }
.mon-ok { background:rgba(63,185,80,.18); color:var(--ok,#3fb950); }
.mon-pin { background:rgba(227,179,65,.18); color:var(--warn,#e3b341); }
.mon-vylet { background:rgba(255,123,114,.18); color:var(--err,#ff7b72); }
.mon-captcha { background:rgba(227,150,65,.2); color:#e39341; }
.mon-stale { background:rgba(139,148,158,.15); color:var(--muted,#8b949e); }
#tab-monitor .toolbar select { max-width:220px; }

/* kabanwork: маскировка без password (без Keychain) + «заполнено» */
@font-face{font-family:'disc-mask';src:url(data:font/woff2;base64,d09GMgABAAAAAAMQAAoAAAAACAAAAALIAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAggAKcHILBgABNgIkAwYEIAWJSAcvG0gHEZWcjBRfHNjNPraIGU7SkQoTFkXoFRjv8FUcbDmIj4fv117P3fcRQioFRseKQUaWwJVVVVWlqUSWQCqzAXDOVp+vqsnVapWIlhw7yBoEhhMnHFYCHMKOvkR03bf6e9V3k5C0pdB3/e9T0qkd4MMPltYAwwl4rBdKBw5Q6WQJiMe2JfXQzxqDHiJHyBCRoyWk9D0eokh2Ww9se/9MHLHYawD4n5f/Ls/b722ATVs377KRPE9jOdKY88cWRA5gIghJDQ1N8AfoA89ygvcYf4pg/Ec+TgiEgQwZEhIKKKCIIkoooYwyKqigiipqqKGOOhpooIkmWmihjTY66PxOyEABGSZiKqAAQnQ6B6/n1u98x4262u0Js8WuS9OPfJk+/cuR6bOAtTcIJOZcuOuj7bV/Kyl9h9f38fFYbrefcSYrI8lAQDMUDxExOyyGlfQ/vVsg0xGArgJ1t5MoVLEcA2Gq5ci0HECy2rnswoOiU55kl1xUjEQJdXtiFM3sEWm9lqWFmgZbjP05LRVBvbqdHux9wpyGnbGWEX6p5JEHp+lXirTnJ5QhZa5Rrsq9D67r+24QRrdzndcmBzUrQ9xXb6hp/3Kt1h1kLEFUI/CLVKdW/dqtdrVRNqpIyLr2KxU5WYVXmZuskh+VXqlluyjNMNPGBGcj6JOF0MC+M9Ucc48RhDxCB6QQzssN7C3m8bmbGCrG7VXU5FY+yGdUakVOvwKllMExtmsLwzMsVQFGpi5UbHxfXhb762Voh6fTcKeW03OxxicY73eTpa8bxhIzeWR+wnoJ6j/4kBejs2xf69j7pOSUzmzPCqNy4cojtlsLwpBhb++AtcBHQcpyGZgkYrGUBTwXn2/RF12BjlQTI1XSvANELqO18DPB+UIyNkJSZBsoX7wh7DlfsyVfTshpuSjLSv9H3fwD+a36nwAAkBFZ5aSOqp+7Bg==) format('woff2');font-weight:normal;font-style:normal;}
/* маскировка секретов БЕЗ type=password и БЕЗ -webkit-text-security (иначе WebKit считает поле паролем и лезет Keychain). Точки рисует шрифт disc-mask, глазик снимает класс .masked и показывает реальное значение. */
input.masked { font-family:'disc-mask', text-security-disc, monospace !important; letter-spacing:.08em; }
.filled-badge { color: var(--ok, #3fb950); font-weight: 600; font-size: 11px; }
input[readonly] { opacity: .9; cursor: default; }

/* kabanwork: «i» у поля — сразу после названия поля, в одну строку */
.lbl-head { display: inline-flex; align-items: center; gap: 4px; }
.lbl-head > .ihelp { position: static; margin: 0; vertical-align: middle; }
.form-grid label > .help-box { order: 99; }

/* kabanwork: «i» страницы — тонкая полоска в правом верхнем углу вкладки (без наезда на тулбар) */
.page-help-row { display: flex; justify-content: flex-end; position: relative; margin: 0; min-height: 20px; }
.page-help { position: static; z-index: 6;
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--panel2, #1c2230); border: 1px solid var(--accent, #58a6ff); color: var(--accent, #58a6ff);
  font-size: 12px; font-style: italic; font-weight: 700; cursor: pointer; line-height: 1; padding: 0; }
.page-help:hover { background: var(--accent, #1f6feb); color: #fff; }
.page-help-box { position: absolute; top: 26px; right: 0; z-index: 7; max-width: 440px;
  background: var(--panel2, #1c2230); border: 1px solid var(--accent, #1f6feb); border-radius: 8px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.55; color: var(--text, #c9d1d9);
  box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.page-help-box.hidden { display: none; }

/* kabanwork: статусы в Мониторинге */
.mon-death { background: rgba(255,123,114,.25); color: var(--err, #ff7b72); }
.mon-work { background: rgba(63,185,80,.18); color: var(--ok, #3fb950); }

/* kabanwork: локальные вкладки на сайте */
.local-notice { background: rgba(227,179,65,.10); border: 1px solid var(--warn, #e3b341); border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.5; color: var(--text, #c9d1d9); margin-bottom: 10px; }
.local-disabled { opacity: .5; cursor: not-allowed !important; }

/* kabanwork: статус агента на локальных вкладках */
.local-notice.agent-on { background: rgba(63,185,80,.10); border-color: var(--ok, #3fb950); }
.local-notice.agent-off { background: rgba(255,123,114,.10); border-color: var(--err, #ff7b72); }

/* kabanwork: онбординг-окно подключения (агент/автозапуск) */
.modal-overlay { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center;
  background:rgba(1,4,9,.66); padding:20px; }
.modal-overlay.hidden { display:none; }
.modal-card { background:var(--card); border:1px solid var(--accent); border-radius:12px; padding:20px 22px;
  max-width:560px; width:100%; box-shadow:0 12px 40px rgba(0,0,0,.5); }
.modal-card h3 { margin:0 0 10px; font-size:16px; font-weight:600; }
.modal-card p { margin:0 0 10px; font-size:13px; line-height:1.6; color:var(--text); }
.modal-card .mi-note { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px;
  color:var(--muted); font-size:12px; }
.modal-actions { display:flex; gap:10px; align-items:center; margin-top:16px; flex-wrap:wrap; }

/* kabanwork: блок автозапуска во вкладке «Расширение» */
#agentSetup .as-note { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px;
  color:var(--muted); font-size:12px; line-height:1.6; margin:0; }
#agentSetup h4 { font-size:13px; font-weight:600; color:var(--text); }
.os-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.os-block { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
.os-head { font-weight:600; font-size:13px; margin-bottom:6px; }
.os-block ol { margin:0; padding-left:18px; color:var(--muted); font-size:12px; line-height:1.75; }
.os-block li { margin:2px 0; }
@media (max-width:620px){ .os-grid { grid-template-columns:1fr; } }
