/* Water — админка @uteamVPN_bot.
   Один акцент (вода), одна семья серых с лёгким сине-зелёным оттенком. */

:root {
  --bg: #0d1113;
  --bg-2: #111618;
  --surface: #151b1e;
  --surface-2: #1b2327;
  --surface-3: #222c31;
  --line: #243034;
  --line-2: #2e3b40;
  --text: #e4eaec;
  --text-2: #b4c0c4;
  --muted: #7f8d93;
  --faint: #56646a;
  --accent: #4fb8a8;
  --accent-strong: #6dcdbd;
  --accent-ink: #062320;
  --accent-soft: rgba(79, 184, 168, .12);
  --accent-line: rgba(79, 184, 168, .35);
  --ok: #58c28a;
  --ok-soft: rgba(88, 194, 138, .12);
  --warn: #dba452;
  --warn-soft: rgba(219, 164, 82, .13);
  --danger: #e2675e;
  --danger-soft: rgba(226, 103, 94, .12);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -18px rgba(0, 10, 12, .8);
  --shadow-pop: 0 24px 64px -20px rgba(0, 8, 10, .85), 0 0 0 1px var(--line-2);
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --z-side: 10;
  --z-overlay: 50;
  --z-toast: 60;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f5; --bg-2: #eceff0; --surface: #ffffff; --surface-2: #f3f6f6; --surface-3: #e8edee;
    --line: #e0e6e7; --line-2: #cfd8da; --text: #142024; --text-2: #34454b; --muted: #5e6e74; --faint: #8a989d;
    --accent: #13877a; --accent-strong: #0f7064; --accent-ink: #ffffff; --accent-soft: rgba(19,135,122,.09); --accent-line: rgba(19,135,122,.35);
    --ok: #1f8f55; --ok-soft: rgba(31,143,85,.1); --warn: #a8690f; --warn-soft: rgba(168,105,15,.1); --danger: #c23f36; --danger-soft: rgba(194,63,54,.09);
    --shadow: 0 1px 2px rgba(20, 40, 45, .05), 0 8px 24px -16px rgba(20, 40, 45, .18);
    --shadow-pop: 0 24px 60px -24px rgba(20, 40, 45, .35), 0 0 0 1px var(--line-2);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f5f5; --bg-2: #eceff0; --surface: #ffffff; --surface-2: #f3f6f6; --surface-3: #e8edee;
  --line: #e0e6e7; --line-2: #cfd8da; --text: #142024; --text-2: #34454b; --muted: #5e6e74; --faint: #8a989d;
  --accent: #13877a; --accent-strong: #0f7064; --accent-ink: #ffffff; --accent-soft: rgba(19,135,122,.09); --accent-line: rgba(19,135,122,.35);
  --ok: #1f8f55; --ok-soft: rgba(31,143,85,.1); --warn: #a8690f; --warn-soft: rgba(168,105,15,.1); --danger: #c23f36; --danger-soft: rgba(194,63,54,.09);
  --shadow: 0 1px 2px rgba(20, 40, 45, .05), 0 8px 24px -16px rgba(20, 40, 45, .18);
  --shadow-pop: 0 24px 60px -24px rgba(20, 40, 45, .35), 0 0 0 1px var(--line-2);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--sans);
  font-feature-settings: "ss01", "cv11";
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
kbd { padding: 1px 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; font-size: 11px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--accent-soft); }

.skip { position: absolute; left: 12px; top: -40px; z-index: 100; padding: 8px 12px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.hint code { color: var(--text-2); }
.num, .kpi-value, .counter, .tabular { font-variant-numeric: tabular-nums; }

/* ── brand ── */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-2); color: var(--accent);
}
.brand-mark svg { width: 18px; height: 18px; fill: var(--accent); stroke: none; }
.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 12px; }
.brand-lg .brand-mark { width: 44px; height: 44px; border-radius: 13px; }
.brand-lg .brand-mark svg { width: 22px; height: 22px; }
.brand-lg .brand-name { font-size: 20px; }

/* ── login ── */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(60% 50% at 70% 10%, var(--accent-soft), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(79,184,168,.05), transparent 70%),
    var(--bg);
}
.login-card {
  width: min(380px, 100%); display: grid; gap: 16px; padding: 32px 28px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-pop);
}
.login-card .brand { margin-bottom: 8px; }

/* ── form controls ── */
.field { display: grid; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.input {
  width: 100%; min-height: 38px; padding: 8px 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
.input:hover { border-color: var(--faint); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; line-height: 1.5; }
.input-sm { min-height: 32px; padding: 5px 10px; font-size: 13px; border-radius: 8px; }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8d93' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 16px; }
.form-error { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); padding: 9px 12px; border-radius: var(--r); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.row-gap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.note { color: var(--text-2); background: var(--surface-2); border-radius: var(--r); padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 16px; border-radius: var(--r); font-weight: 550; font-size: 13.5px;
  transition: background .15s, border-color .15s, color .15s, transform .1s, opacity .15s; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover:not(:disabled) { background: var(--accent-strong); }
.btn-quiet { background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); }
.btn-quiet:hover:not(:disabled) { border-color: var(--accent-line); color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 20%, transparent); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 500; font-size: 13px; padding: 2px 0; }
.link-btn svg { width: 15px; height: 15px; }
.link-btn:hover { color: var(--accent-strong); }
.link-btn.danger { color: var(--danger); }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn svg { width: 17px; height: 17px; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── shell ── */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 12px 14px; border-right: 1px solid var(--line); background: var(--bg-2); z-index: var(--z-side);
}
.sidebar > .brand { padding: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item.active svg { color: var(--accent); }
.nav-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.nav-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-foot .nav-item { font-size: 13px; }

.main { padding: 30px clamp(16px, 3vw, 40px) 64px; outline: none; max-width: 1400px; width: 100%; }
.page { display: none; }
.page.active { display: block; animation: page-in .28s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -.025em; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 68ch; text-wrap: pretty; }
.head-tools { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── panels ── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); min-height: 54px; }
.panel-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: center; gap: 10px; }
.panel-body { padding: 18px; }
.step { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }

/* ── KPIs ── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); }
.kpi { background: var(--surface); padding: 18px 20px 20px; display: grid; gap: 10px; }
.kpi-label { color: var(--muted); font-size: 13px; }
.kpi-value { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -.03em; }
.kpi:first-child .kpi-value { color: var(--accent); }

/* ── bars ── */
.bars { padding: 10px 18px 16px; display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: baseline; }
.bar-label { font-weight: 500; }
.bar-label small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.bar-value { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--accent); transform-origin: left; animation: grow .6s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }

/* ── feed ── */
.feed { list-style: none; }
.feed li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.feed-time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ava { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface-3); flex-shrink: 0; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text-2); font-weight: 550; margin-bottom: 4px; }

/* ── tags ── */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── tables ── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions-col { width: 1%; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-cell .u-name { font-weight: 500; }
.user-cell .u-sub { color: var(--muted); font-size: 12.5px; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.key-cell { display: flex; align-items: center; gap: 6px; max-width: 320px; }
.key-cell code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.cell-muted { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── search ── */
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { width: 280px; min-height: 36px; padding: 6px 12px 6px 34px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ── skeleton ── */
.skeleton-lines, .skeleton-row td { position: relative; min-height: 120px; list-style: none; }
.skeleton-lines { display: block; margin: 16px 18px; height: 88px; border-radius: 8px;
  background: repeating-linear-gradient(to bottom, var(--surface-2) 0 14px, transparent 14px 26px); mask: linear-gradient(90deg, #000 60%, transparent); animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-row td { height: 120px; background: repeating-linear-gradient(to bottom, transparent 0 14px, var(--surface-2) 14px 26px, transparent 26px 40px); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .45; } }

/* ── health ── */
.health-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.health { list-style: none; }
.health li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.health li:last-child { border-bottom: 0; }
.h-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.h-dot.up { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.h-dot.down { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { box-shadow: 0 0 0 7px transparent; } }
.h-name { font-weight: 500; }
.h-detail { color: var(--muted); font-size: 12.5px; font-family: var(--mono); }

/* ── locs ── */
.locs { list-style: none; }
.locs li { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.locs li:last-child { border-bottom: 0; }
.loc-label { font-weight: 500; }
.loc-key { color: var(--muted); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-actions { display: flex; gap: 2px; }

/* ── disclosure ── */
.disclosure summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; font-weight: 550; color: var(--text-2); }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary svg { transition: transform .2s var(--ease); color: var(--muted); }
.disclosure[open] summary { border-bottom: 1px solid var(--line); }
.disclosure[open] summary svg { transform: rotate(180deg); }

/* ════════ BROADCAST ════════ */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.composer-side { position: relative; height: 100%; }
.preview-sticky { position: sticky; top: 20px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.segments { display: grid; gap: 14px; }
.seg-group-title { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.seg-options { display: flex; flex-wrap: wrap; gap: 8px; }
.seg {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 8px 7px 12px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--bg-2); font-weight: 500; font-size: 13.5px;
  transition: border-color .15s, background .15s, color .15s;
}
.seg:hover { border-color: var(--faint); }
.seg.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.seg .seg-count { min-width: 26px; padding: 1px 7px; border-radius: 6px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; background: var(--surface-3); color: var(--muted); }
.seg.active .seg-count { background: var(--accent); color: var(--accent-ink); }
.seg.zero { color: var(--faint); }
.custom-ids { margin-top: 14px; }
.counter { color: var(--muted); font-size: 12.5px; }
.counter.over { color: var(--danger); font-weight: 600; }

.editor-wrap { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); transition: border-color .15s, box-shadow .15s; }
.editor-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar { display: flex; align-items: center; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tb { height: 30px; min-width: 30px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 7px; color: var(--text-2); transition: background .12s, color .12s; }
.tb svg { width: 17px; height: 17px; }
.tb:hover { background: var(--surface-3); color: var(--text); }
.tb.on { background: var(--accent-soft); color: var(--accent); }
.tb-text span { font-size: 12px; font-weight: 600; }
.tb-sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.tb-grow { flex: 1; }
.tb-menu { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 240px; padding: 5px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-pop); display: grid; }
.menu button { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 7px; text-align: left; font-size: 13px; }
.menu button:hover { background: var(--surface-2); }
.menu code { color: var(--muted); font-size: 12px; }
.linkbar { display: flex; gap: 6px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.linkbar .input { flex: 1; }

.editor, .editor-source {
  display: block; width: 100%; min-height: 190px; max-height: 520px; overflow-y: auto; padding: 14px 16px;
  white-space: pre-wrap; word-wrap: break-word; outline: none; font-size: 14.5px; line-height: 1.55; background: transparent; border: 0; resize: vertical;
}
.editor-source { font-size: 13px; color: var(--text-2); }
.editor:empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; }
.editor b, .editor strong { font-weight: 650; }
.editor a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.editor code { background: var(--surface-3); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.editor pre { background: var(--surface-3); padding: 10px 12px; border-radius: 8px; font-family: var(--mono); font-size: 13px; margin: 4px 0; white-space: pre-wrap; }
.editor blockquote { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 0 8px 8px 0; margin: 4px 0; }
.editor blockquote[data-expandable]::after { content: "сворачиваемая"; display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.editor .tg-spoiler { background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 7px); border-radius: 4px; padding: 0 2px; }
.editor .ph { color: var(--accent); }

.attach { margin-top: 14px; }
.dropzone { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); color: var(--text-2); }
.dropzone svg { width: 22px; height: 22px; color: var(--accent); }
.dropzone b { color: var(--text); font-weight: 550; }
.media-thumb { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--r); }
.media-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.media-meta { display: grid; gap: 2px; font-size: 13px; min-width: 0; }
.media-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.media-meta .link-btn { justify-self: start; }

.btn-builder { margin-top: 18px; }
.btn-builder-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btn-row { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: var(--r); background: var(--surface-2); margin-bottom: 8px; }
.btn-row-items { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.btn-item { display: grid; grid-template-columns: 2fr 3fr auto; gap: 4px; align-items: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; }
.btn-item input { min-width: 0; border: 0; background: transparent; padding: 5px 8px; outline: none; font-size: 13px; border-radius: 6px; }
.btn-item input:focus { background: var(--bg-2); }
.btn-item input.bad { color: var(--danger); }
.btn-item input + input { border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.btn-row-tools { display: flex; flex-direction: column; gap: 2px; }

.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle b { display: block; font-weight: 550; font-size: 13.5px; }
.toggle small { color: var(--muted); font-size: 12.5px; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); flex-shrink: 0; margin-top: 1px; transition: background .18s, border-color .18s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .18s; }
.toggle input:checked + .switch { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(14px); background: var(--accent-ink); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

.when { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.when-at { width: 240px; }
.seg-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); }
.seg-switch label { cursor: pointer; }
.seg-switch input { position: absolute; opacity: 0; pointer-events: none; }
.seg-switch span { display: block; padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background .15s, color .15s; }
.seg-switch input:checked + span { background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); }
.seg-switch input:focus-visible + span { outline: 2px solid var(--accent); }
.seg-switch-sm span { padding: 3px 10px; font-size: 12px; }

.send-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.test-box { display: flex; gap: 6px; }
.test-box .input { width: 200px; }
#bc-send-btn { min-width: 220px; min-height: 42px; }
.result { margin-top: 12px; font-size: 13px; }
.result:empty { display: none; }
.result .line { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); margin-top: 6px; }
.result .line.ok { color: var(--ok); }
.result .line.err { color: var(--danger); background: var(--danger-soft); }
.result .line span { color: var(--text-2); }

/* ── Telegram preview ── */
.tg {
  --tg-bg: #0f1a22; --tg-pattern: rgba(255,255,255,.035); --tg-bubble: #182533; --tg-text: #f2f5f7; --tg-link: #6ab3f3;
  --tg-meta: rgba(255,255,255,.45); --tg-top: #17212b; --tg-quote: #6ab3f3; --tg-quote-bg: rgba(106,179,243,.12);
  --tg-code: #7fc1ff; --tg-pre: rgba(0,0,0,.25); --tg-btn: rgba(24, 37, 51, .82);
  border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow-pop);
  font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}
.tg[data-tg="light"] {
  --tg-bg: #d6e2c8; --tg-pattern: rgba(60, 90, 40, .07); --tg-bubble: #ffffff; --tg-text: #111; --tg-link: #168acd;
  --tg-meta: rgba(0,0,0,.4); --tg-top: #ffffff; --tg-quote: #168acd; --tg-quote-bg: rgba(22,138,205,.08);
  --tg-code: #c2315c; --tg-pre: rgba(0,0,0,.05); --tg-btn: rgba(80, 110, 60, .45);
}
.tg-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--tg-top); color: var(--tg-text); }
.tg-ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(160deg, #5fc8b9, #2c8c80); color: #fff; font-weight: 600; font-size: 15px; }
.tg-name { font-weight: 600; font-size: 14.5px; }
.tg-status { font-size: 12.5px; color: var(--tg-meta); }
.tg-chat {
  min-height: 420px; max-height: calc(100dvh - 200px); overflow-y: auto; padding: 18px 12px 16px; display: flex; flex-direction: column; justify-content: flex-end;
  background-color: var(--tg-bg);
  background-image: radial-gradient(var(--tg-pattern) 1.2px, transparent 1.3px), radial-gradient(var(--tg-pattern) 1.2px, transparent 1.3px);
  background-size: 22px 22px; background-position: 0 0, 11px 11px;
}
.tg-msg { max-width: 90%; align-self: flex-start; display: grid; gap: 4px; }
.tg-bubble { position: relative; background: var(--tg-bubble); color: var(--tg-text); border-radius: 16px 16px 16px 5px; overflow: hidden; font-size: 14.5px; line-height: 1.42; box-shadow: 0 1px 1px rgba(0,0,0,.18); }
.tg-photo { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.tg-text { padding: 7px 11px 8px; white-space: pre-wrap; word-wrap: break-word; }
.tg-text:empty { display: none; }
.tg-text a { color: var(--tg-link); text-decoration: none; }
.tg-text b { font-weight: 600; }
.tg-text code { font-family: var(--mono); font-size: 13px; color: var(--tg-code); }
.tg-text pre { font-family: var(--mono); font-size: 12.5px; background: var(--tg-pre); border-left: 3px solid var(--tg-quote); border-radius: 6px; padding: 7px 9px; margin: 3px 0; white-space: pre-wrap; color: var(--tg-code); }
.tg-text blockquote { background: var(--tg-quote-bg); border-left: 3px solid var(--tg-quote); border-radius: 5px; padding: 3px 26px 3px 9px; margin: 3px 0; position: relative; }
.tg-text blockquote[data-expandable] { max-height: 4.4em; overflow: hidden; cursor: pointer; }
.tg-text blockquote[data-expandable]::after { content: ""; position: absolute; right: 7px; bottom: 6px; width: 7px; height: 7px; border-right: 1.6px solid var(--tg-quote); border-bottom: 1.6px solid var(--tg-quote); transform: rotate(45deg); }
.tg-text blockquote[data-expandable].open { max-height: none; }
.tg-text blockquote[data-expandable].open::after { transform: rotate(225deg); bottom: 3px; }
.tg-text .tg-spoiler { background: var(--tg-meta); color: transparent; border-radius: 4px; cursor: pointer; transition: background .3s, color .3s;
  background-image: radial-gradient(rgba(255,255,255,.6) .6px, transparent .8px); background-size: 4px 4px; }
.tg-text .tg-spoiler.shown { background: none; color: inherit; }
.tg-text .ph { background: var(--tg-quote-bg); border-radius: 4px; padding: 0 2px; }
.tg-time { position: absolute; right: 9px; bottom: 5px; font-size: 11px; color: var(--tg-meta); }
.tg-text::after { content: ""; display: inline-block; width: 40px; }
.tg-bubble.photo-only .tg-time { color: #fff; background: rgba(0,0,0,.35); padding: 0 6px; border-radius: 8px; }
.tg-kb { display: grid; gap: 4px; }
.tg-kb-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.tg-kb-btn { background: var(--tg-btn); color: #fff; border-radius: 9px; padding: 8px 10px; text-align: center; font-size: 13.5px; font-weight: 500; position: relative; backdrop-filter: blur(6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-kb-btn::after { content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-top: 1.4px solid rgba(255,255,255,.8); border-right: 1.4px solid rgba(255,255,255,.8); }
.tg-empty { color: var(--tg-meta); font-style: italic; }

/* ── history ── */
.history { margin-top: 8px; }
.jobs { list-style: none; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) 220px 136px; gap: 18px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.job-when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.job-text { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.job-progress { display: grid; gap: 6px; }
.job-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.job-bar i { display: block; height: 100%; transition: width .4s var(--ease); }
.job-bar .b-sent { background: var(--ok); }
.job-bar .b-blocked { background: var(--warn); }
.job-bar .b-failed { background: var(--danger); }
.job-nums { display: flex; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.job-nums b { color: var(--text-2); font-weight: 550; }
.job-actions { display: flex; gap: 2px; justify-content: flex-end; }

/* ── overlays ── */
.overlay { position: fixed; inset: 0; z-index: var(--z-overlay); background: rgba(4, 10, 12, .55); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; animation: fade .2s ease; }
.overlay-center { justify-content: center; align-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(560px, 100%); height: 100%; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; animation: slide .28s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
.drawer-foot:empty { display: none; }
.key-item { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; }
.key-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.key-item-head .grow { flex: 1; }
.key-data { font-family: var(--mono); font-size: 11.5px; color: var(--muted); word-break: break-all; line-height: 1.55; }
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin-bottom: 18px; font-size: 13.5px; }
.dl dt { color: var(--muted); }
.dl dd { font-variant-numeric: tabular-nums; }
.section-title { font-size: 13px; font-weight: 600; margin: 18px 0 8px; color: var(--text-2); }
.err-list { list-style: none; font-size: 12.5px; }
.err-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.err-list code { color: var(--text-2); }
.err-list span { color: var(--muted); }

.dialog { width: min(460px, 100%); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 22px; animation: pop .22s var(--ease); display: grid; gap: 14px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.dialog h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.dialog-body { color: var(--text-2); display: grid; gap: 12px; }
.dialog-body .dl { margin: 0; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast); display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-pop); font-weight: 500; font-size: 13.5px; transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .2s; max-width: calc(100vw - 32px); }
.toast.show { transform: none; opacity: 1; }
.toast svg { width: 17px; height: 17px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }

/* ── роли ── */
body[data-role="viewer"] .need-admin, body:not([data-role="owner"]) .need-owner { display: none !important; }
.viewer-note { display: none; }
body[data-role="viewer"] .viewer-note { display: block; }

/* ── login steps ── */
.login-step { display: grid; gap: 14px; }
.code-input { font-size: 22px; letter-spacing: .4em; text-align: center; padding: 10px 12px; }
.login-switch { display: flex; justify-content: center; }
#code-back { justify-self: center; }

/* ── me chip ── */
.me-chip { display: flex; gap: 10px; align-items: center; padding: 6px 10px 10px; }
.me-name { font-weight: 550; font-size: 13px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.me-role { color: var(--muted); font-size: 12px; }

/* ── filter chips ── */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.chip { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, background .15s, color .15s; }
.chip:hover { border-color: var(--faint); }
.chip.active { background: var(--surface-3); color: var(--text); border-color: var(--surface-3); }
.chip em { font-style: normal; font-size: 11.5px; padding: 0 6px; border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-variant-numeric: tabular-nums; }
.table tbody tr.clickable { cursor: pointer; }

/* ── health groups ── */
.health-group { margin-bottom: 16px; }
.health-group-title { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 2px 8px; }
.health-group-title span { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.h-dot.disabled { background: var(--faint); opacity: .5; }

/* ── reminder ── */
.reminder .panel-head h2 svg { color: var(--accent); }
.reminder-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; }
.reminder-info p { color: var(--text-2); max-width: 62ch; margin-bottom: 14px; }
.dl-compact { grid-template-columns: 170px minmax(0, 1fr); margin-bottom: 14px; }
.reminder-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.reminder-controls .field { width: 180px; }
.toggle-inline { padding: 0; align-items: center; font-size: 13px; font-weight: 500; }
.tg-chat-mini { min-height: 0; max-height: 320px; padding: 12px 10px; }

/* ── user card ── */
.card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.card-top .ava { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mini-list { list-style: none; font-size: 13px; }
.mini-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list .sub { color: var(--muted); font-size: 12px; }
.mini-list .when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan { list-style: none; display: grid; gap: 6px; margin: 4px 0; }
.plan li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.plan li svg { width: 16px; height: 16px; margin-top: 2px; }
.plan li.ok svg { color: var(--ok); }
.plan li.err { background: var(--danger-soft); }
.plan li.err svg { color: var(--danger); }
.plan li.manual svg { color: var(--warn); }
.plan small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }

/* ── audit ── */
.audit { list-style: none; }
.audit li { display: grid; grid-template-columns: 120px 180px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.audit li:last-child { border-bottom: 0; }
.audit .a-when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.audit .a-who { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit .a-who small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; font-family: var(--mono); }
.audit .a-what { min-width: 0; }
.audit .a-what .tag { margin-right: 8px; }
.audit .a-link { color: var(--accent); cursor: pointer; }

/* ── admins ── */
.add-admin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 12px; align-items: end; }
.admins { list-style: none; }
.admins li { display: grid; grid-template-columns: 32px minmax(0, 1fr) 170px auto auto; gap: 14px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.admins li:last-child { border-bottom: 0; }
.admins .ad-name { font-weight: 500; }
.admins .ad-sub { color: var(--muted); font-size: 12px; }
.admins .toggle { padding: 0; font-size: 12.5px; align-items: center; }

@media (max-width: 1180px) { .reminder-body { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .audit li { grid-template-columns: 1fr; gap: 2px; }
  .add-admin { grid-template-columns: 1fr; }
  .admins li { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .admins li .toggle, .admins li select { grid-column: 2 / -1; }
  .me-chip { display: none; }
}

/* ── доступ по ID ── */
.access-add { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.access-scope { display: grid; gap: 10px; }
.scope-presets { justify-self: start; flex-wrap: wrap; }
.scope-opts { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: var(--r); background: var(--surface-2); }
.scope-opt { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; cursor: pointer; transition: border-color .15s, background .15s; }
.scope-opt input { accent-color: var(--accent); }
.scope-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.access-list { list-style: none; }
.access-list li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.access-list li:last-child { border-bottom: 0; }
.access-list .ac-name { font-weight: 500; }
.access-list .ac-sub { color: var(--muted); font-size: 12.5px; }
.access-list .ac-scope { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
@media (max-width: 760px) { .access-add { grid-template-columns: 1fr; } .access-list li { grid-template-columns: 32px minmax(0, 1fr); } .access-list li > .row-actions { grid-column: 2; justify-content: flex-start; } }

/* ── responsive ── */
@media (max-width: 1180px) {
  .composer { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .tg-chat { min-height: 260px; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .job { grid-template-columns: 1fr; gap: 10px; }
  .toggles { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar > .brand .brand-sub, .sidebar > .brand .brand-name { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav-item { width: auto; white-space: nowrap; padding: 7px 10px; }
  .nav-item.active::before { display: none; }
  .nav-item span { font-size: 13px; }
  .sidebar-foot { margin: 0 0 0 auto; display: flex; border: 0; padding: 0; }
  .sidebar-foot .nav-item span { display: none; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 22px; }
  .search input, .test-box .input { width: 100%; }
  .search, .head-tools, .test-box { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .locs li { grid-template-columns: 1fr auto; }
  .locs .loc-key { grid-column: 1 / -1; grid-row: 2; }
  #bc-send-btn { width: 100%; }
  .dl { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
