/* Dewiar Server Panel — светлая неоморфная тема */
:root {
  --bg: #e9edf2;
  --hi: #ffffff;
  --lo: #c5ccd8;
  --text: #1f2a3a;
  --muted: #566274;
  --accent: #0c7c72;
  --accent-dark: #095f58;
  --ok-bg: #d5ece2; --ok: #14573d;
  --warn-bg: #f8e6c2; --warn: #734a00;
  --bad-bg: #f8d6d2; --bad: #8f2218;
  --none-bg: #dde2e9; --none: #485364;
  --radius: 20px;
  --up: 7px 7px 16px var(--lo), -7px -7px 16px var(--hi);
  --up-sm: 4px 4px 9px var(--lo), -4px -4px 9px var(--hi);
  --down: inset 3px 3px 7px var(--lo), inset -3px -3px 7px var(--hi);
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.45; display: grid; grid-template-columns: 250px 1fr; min-height: 100vh;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 22px; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 14px; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 0; overflow-wrap: anywhere; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: .9rem; }
.right { text-align: right; }
.grow { flex: 1; margin: 0; }
.intro { color: var(--muted); margin: -12px 0 22px; max-width: 780px; }

/* Боковое меню */
.side { padding: 20px 18px 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 12px; letter-spacing: -0.01em; font-size: 1.05rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; box-shadow: var(--up-sm); flex: none; display: block; }
.side nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; margin: 0 -8px; padding: 4px 8px; }
.nav-group { font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 9px 14px 2px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-radius: 12px; color: var(--text); font-weight: 500; font-size: .93rem; }
.side nav a:hover { box-shadow: var(--up-sm); text-decoration: none; }
.side nav a.on { box-shadow: var(--down); color: var(--accent-dark); font-weight: 650; }
.user { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 16px; box-shadow: var(--up-sm); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--accent-dark); box-shadow: var(--down); flex: none; }
.user-name { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name small { display: block; font-weight: 400; font-size: .7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.icon-btn { padding: 8px; border-radius: 11px; display: grid; place-items: center; }

main { padding: 32px 36px 70px 18px; max-width: 1320px; width: 100%; }

/* Кнопки */
.btn { font: inherit; font-weight: 550; border-radius: 12px; padding: 9px 16px; border: 0; cursor: pointer; display: inline-block; background: var(--bg); color: var(--text); box-shadow: var(--up-sm); transition: box-shadow .12s; }
.btn:hover { text-decoration: none; color: var(--accent-dark); }
.btn:active { box-shadow: var(--down); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 4px 4px 10px #b4c3c6, -4px -4px 10px var(--hi); }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .6; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Метки состояния */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.badge.ok, .sw.ok, .dist .ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn, .sw.warn, .dist .warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad, .sw.bad, .dist .bad { background: var(--bad-bg); color: var(--bad); }
.badge.none, .sw.none, .dist .none { background: var(--none-bg); color: var(--none); }
.alert, .ok-msg { padding: 11px 15px; border-radius: 14px; margin: 0 0 14px; font-weight: 550; }
.alert { background: var(--bad-bg); color: var(--bad); }
.ok-msg { background: var(--ok-bg); color: var(--ok); }

/* Поверхности */
.stat, .panel, .card, .login { background: var(--bg); border-radius: var(--radius); box-shadow: var(--up); }
.panel { padding: 22px 24px; margin-bottom: 24px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.two .panel { margin-bottom: 0; }

/* Главная: поиск */
.home-search { font: inherit; display: flex; align-items: center; gap: 14px; width: min(720px, 100%); padding: 15px 20px; margin: 0 0 14px; border: 0; border-radius: 18px; background: var(--bg); box-shadow: var(--down); color: var(--muted); cursor: text; text-align: left; font-size: 1.02rem; }
.home-search span { flex: 1; }
.home-search:hover { color: var(--text); }
.home-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Главная: плитки разделов */
.banner { background: var(--warn-bg); color: var(--warn); padding: 11px 16px; border-radius: 14px; margin: -8px 0 22px; }
.banner a { color: inherit; text-decoration: underline; font-weight: 600; }
.today { color: var(--muted); margin: 0 0 26px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 26px 8px; margin-bottom: 36px; }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; color: var(--text); }
.tile:hover { text-decoration: none; }
.tile-ico { position: relative; width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; margin-bottom: 8px;
  background: linear-gradient(145deg, #f3f6fa, #dfe4eb); box-shadow: var(--up); transition: box-shadow .15s, transform .15s; }
.tile:hover .tile-ico { transform: translateY(-2px); box-shadow: 10px 10px 22px var(--lo), -10px -10px 22px var(--hi); }
.tile:active .tile-ico { transform: none; box-shadow: var(--down); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-ico { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile-badge { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: #d92c62; color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 3px 8px rgba(217, 44, 98, .4); }
.tile-name { font-weight: 650; font-size: .95rem; }
.tile-sub { color: var(--muted); font-size: .8rem; }
.ico { flex: none; display: block; }

/* Обзор: кольца */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 30px; }
.stat { padding: 18px 20px; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font-size: 1rem; font-weight: 650; margin: 3px 0 8px; }
.gauge { display: flex; align-items: center; gap: 16px; }
.gauge svg { width: 96px; height: 96px; flex: none; border-radius: 50%; box-shadow: var(--down); }
.gauge circle { fill: none; stroke-width: 9; }
.gauge .track { stroke: transparent; }
.gauge .arc { stroke-linecap: round; }
.gauge .arc.ok { stroke: var(--accent); }
.gauge .arc.warn { stroke: #c98a12; }
.gauge .arc.bad { stroke: #c9382c; }
.gauge text { font-size: 20px; font-weight: 700; fill: var(--text); }

.stats.gauges { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }

/* Графики */
.toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.seg { display: flex; border-radius: 12px; box-shadow: var(--down); padding: 4px; gap: 4px; }
.seg a { padding: 6px 14px; border-radius: 9px; color: var(--muted); font-size: .9rem; font-weight: 550; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--bg); box-shadow: var(--up-sm); color: var(--accent-dark); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px; margin-bottom: 24px; }
.charts .panel { margin: 0; padding: 18px 20px 12px; }
.chart header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart h2 { margin-bottom: 6px; }
.chart-now { color: var(--muted); font-size: .85rem; }
.chart-wrap { position: relative; }
.chart-empty { padding: 36px 0; text-align: center; }
svg.plot { width: 100%; height: auto; display: block; }
svg.plot .grid { stroke: #cfd6e0; stroke-width: 1; }
svg.plot .tick { font-size: 12.5px; fill: var(--muted); }
svg.plot .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tip { position: absolute; top: 6px; background: var(--text); color: #fff; padding: 6px 10px; border-radius: 9px; font-size: .8rem; white-space: pre; pointer-events: none; z-index: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--text); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dist { display: flex; gap: 3px; height: 16px; border-radius: 99px; overflow: hidden; margin-bottom: 12px; box-shadow: var(--down); padding: 3px; }
.dist i { border-radius: 99px; min-width: 8px; }
.dist .ok { background: #2f9a72; } .dist .warn { background: #d49a1f; } .dist .bad { background: #cf4034; } .dist .none { background: #9aa5b5; }
.sw.ok { background: #2f9a72; } .sw.warn { background: #d49a1f; } .sw.bad { background: #cf4034; } .sw.none { background: #9aa5b5; }
.list { list-style: none; margin: 0 0 12px; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #d8dee7; }
.list li:last-child { border-bottom: 0; }

/* Поля ввода */
input, select, textarea { font: inherit; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: var(--down); }
.toolbar input { width: min(360px, 100%); }
.form { display: flex; flex-direction: column; gap: 16px; max-width: 620px; }
.form label, .login label { display: flex; flex-direction: column; gap: 7px; font-size: .9rem; font-weight: 550; }
.form label.check, fieldset label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 400; }
.check input { box-shadow: none; padding: 0; width: 17px; height: 17px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
legend { font-size: .9rem; font-weight: 550; padding: 0; margin-bottom: 9px; }
.inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.editor { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.5; resize: vertical; white-space: pre; overflow: auto; tab-size: 4; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }

/* Карточки сайтов */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 26px; }
.card { padding: 22px 24px; display: flex; flex-direction: column; gap: 13px; }
.card[hidden] { display: none; }
.card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips:empty { display: none; }
.chips span { box-shadow: var(--down); border-radius: 8px; padding: 2px 9px; font-size: .8rem; color: var(--muted); }
.chips .own { color: var(--accent-dark); font-weight: 600; }
.card dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; margin: 0; font-size: .9rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; min-width: 0; }
.card footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.dns { box-shadow: var(--down); border-radius: 14px; padding: 14px 16px; font-size: .9rem; }
.dns .rec { display: grid; grid-template-columns: 76px 1fr; gap: 4px 10px; margin: 10px 0; padding-top: 10px; border-top: 1px solid #d8dee7; }
.dns .rec span { color: var(--muted); }
.dns code { user-select: all; }
.dns p { margin: 8px 0 0; }

.plain { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.plain li { padding: 6px 0; border-top: 1px solid #d8dee7; }
.plain li:first-child { border-top: 0; }

.form.wide { max-width: 900px; }
.form .inline { margin: 0; align-items: flex-end; }
.form .inline label { flex: 1; min-width: 160px; }
details.panel summary { cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; list-style: none; }
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::before { content: "›"; font-size: 1.3rem; color: var(--muted); transition: transform .15s; }
details.panel[open] summary::before { transform: rotate(90deg); }
details.panel[open] summary { margin-bottom: 14px; }
.chips.big span { font-size: .88rem; padding: 5px 12px; color: var(--text); }

.stat-big { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; }
.charts.one { grid-template-columns: 1fr; }
table.bars td.num, table.bars th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.bars td.barcell { width: 32%; min-width: 120px; }
.sizebar.wide { width: 100%; margin: 0; display: block; }
table.bars td.mono { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd { display: block; max-width: 620px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.rules td { vertical-align: middle; }
table.rules small { display: block; font-size: .82rem; }
.user-name small a { color: inherit; }
.gauge .stat-label { overflow-wrap: anywhere; }

/* Таблицы */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85rem; padding: 6px 8px 10px; }
td { padding: 11px 8px; border-top: 1px solid #d8dee7; }
td .btn { margin-left: 6px; }
.sizebar { width: 120px; height: 8px; border-radius: 99px; box-shadow: var(--down); display: inline-block; vertical-align: middle; margin-right: 10px; overflow: hidden; }
.sizebar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

pre.code { box-shadow: var(--down); border-radius: 14px; padding: 14px; overflow: auto; font-size: .8rem; margin: 0; max-height: 70vh; white-space: pre-wrap; overflow-wrap: anywhere; }
.panel h2 .mono { font-weight: 400; margin-left: 8px; }

/* Справка */
.toc { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.toc a { box-shadow: var(--up-sm); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.help { max-width: 880px; scroll-margin-top: 16px; }
.help h3 { font-size: .95rem; margin: 16px 0 6px; }
.help ul, .help ol { margin: 0 0 8px; padding-left: 20px; }
.help li { margin-bottom: 6px; }

.search-open { font: inherit; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--bg); box-shadow: var(--down); color: var(--muted); cursor: pointer; text-align: left; }
.search-open span { flex: 1; }
.search-open:hover { color: var(--text); }
kbd { font: inherit; font-size: .72rem; padding: 2px 6px; border-radius: 6px; box-shadow: var(--up-sm); color: var(--muted); }
#search { padding: 18px; width: min(580px, 94vw); margin-top: 12vh; }
#search input { width: 100%; font-size: 1.05rem; }
#search-list { list-style: none; margin: 14px 0 0; padding: 0; max-height: 52vh; overflow: auto; }
#search-list a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); }
#search-list a span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
#search-list a.on, #search-list a:hover { box-shadow: var(--down); text-decoration: none; color: var(--accent-dark); }
#search-list li.none { padding: 12px; color: var(--muted); }
.search-hint { margin: 12px 4px 0; font-size: .8rem; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .06em; padding: 12px 16px; margin: 8px 0; border-radius: 12px; box-shadow: var(--down); user-select: all; display: inline-block; }
.steps { padding-left: 20px; margin: 0 0 14px; }
.steps li { margin-bottom: 8px; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; box-shadow: var(--down); margin-bottom: 24px; }
.tabs a { padding: 8px 16px; border-radius: 10px; color: var(--muted); font-weight: 550; font-size: .93rem; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { background: var(--bg); box-shadow: var(--up-sm); color: var(--accent-dark); }
.score { display: flex; align-items: center; gap: 26px; }
.score svg { width: 130px; height: 130px; flex: none; border-radius: 50%; box-shadow: var(--down); }
.score circle { fill: none; stroke-width: 11; }
.score .track { stroke: transparent; }
.score .arc { stroke-linecap: round; }
.score .arc.ok { stroke: var(--accent); } .score .arc.warn { stroke: #c98a12; } .score .arc.bad { stroke: #c9382c; }
.score text { font-size: 34px; font-weight: 700; fill: var(--text); }
.score h2 { font-size: 1.3rem; margin-bottom: 8px; }
.score p { margin: 0 0 6px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: start; padding: 14px 0; border-top: 1px solid #d8dee7; }
.checks li:first-child { border-top: 0; padding-top: 2px; }
.checks p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.checks .badge { justify-self: start; margin-top: 2px; }
.check-act { white-space: nowrap; }
.advice { box-shadow: var(--down); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; }
.advice p { margin: 0 0 8px; } .advice ol { margin: 0; padding-left: 20px; } .advice li { margin-bottom: 4px; }
.advice.bad { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.advice.warn { background: var(--warn-bg); box-shadow: none; }
.plan { display: grid; grid-template-columns: 210px 1fr; gap: 8px 14px; margin: 0 0 16px; }
.plan dt { color: var(--muted); } .plan dd { margin: 0; }
@media (max-width: 860px) { .checks li { grid-template-columns: 1fr; gap: 6px; } .score { flex-direction: column; align-items: flex-start; } .plan { grid-template-columns: 1fr; } }

input.masked:not(:placeholder-shown) { -webkit-text-security: disc; font-family: ui-monospace, Menlo, Consolas, monospace; }

.app header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.app header h2 { margin: 0; }
.secret.small { font-size: .8rem; letter-spacing: 0; overflow-wrap: anywhere; display: block; }
.finding header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.finding p { margin: 4px 0; overflow-wrap: anywhere; }
.spark { display: block; }
details.panel > form, details.panel > p { margin-top: 6px; }
.side nav a { padding: 9px 14px; font-size: .96rem; }

.brand small { display: block; font-weight: 400; font-size: .74rem; }
.brand small a { color: var(--muted); }

/* Диалог */
dialog { border: 0; border-radius: var(--radius); padding: 26px 28px; width: min(660px, 92vw); color: var(--text); background: var(--bg); box-shadow: 0 24px 60px rgba(31, 42, 58, .35); }
dialog::backdrop { background: rgba(31, 42, 58, .4); }
dialog pre { box-shadow: var(--down); border-radius: 14px; padding: 12px; max-height: 340px; overflow: auto; font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 18px; }

/* Вход */
.login-body { display: grid; grid-template-columns: 1fr; place-items: center; }
.login { padding: 32px; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 860px) {
  body { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side nav { flex: none; }
  .nav-group { display: none; }
  .user { margin-left: auto; }
  main { padding: 16px 16px 40px; }
  .cards, .charts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .btn, .tile-ico { transition: none; } .tile:hover .tile-ico { transform: none; } }

/* Скрытое остаётся скрытым, даже если у элемента задан свой display */
[hidden] { display: none !important; }
/* Обратная связь */
.side-tools { display: flex; align-items: center; gap: 8px; }
.side-tools .icon-btn { padding: 7px; }
.fb-new { margin-left: auto; font-size: .78rem; font-weight: 650; padding: 5px 10px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.fb-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bubble { box-shadow: var(--down); border-radius: 16px; padding: 12px 16px; margin-top: 12px; max-width: 820px; overflow-wrap: anywhere; }
.bubble.dev { background: var(--ok-bg); box-shadow: none; margin-left: 28px; }
.bubble small { display: block; color: var(--muted); margin-bottom: 4px; }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-list a { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 11px 10px; border-radius: 12px; color: var(--text); }
.fb-list li + li a { border-top: 1px solid var(--line, #d8dee7); }
.fb-list a:hover { box-shadow: var(--down); text-decoration: none; }
.fb-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-list a.unread .t { font-weight: 700; }
.toolbar .btn svg, .fb-meta svg { vertical-align: -5px; }
/* Подключение Telegram */
.tg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tg .steps { margin: 0 0 16px; padding-left: 22px; display: grid; gap: 7px; }
.tg details { margin-top: 14px; }
.tg details summary { cursor: pointer; }
.tg-more { margin-top: 14px; display: grid; gap: 14px; }
@media (max-width: 700px) { .fb-list a { grid-template-columns: auto 1fr; } .bubble.dev { margin-left: 0; } }
.fb-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }

/* ИИ-помощник */
:root { --ai-a: #7c5cf0; --ai-b: #12b5a5; --term: #131827; --term-2: #1b2236; }
.ai-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ai-model { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.ai-model b { color: var(--text); }
.ai-history { position: relative; }
.ai-history summary { list-style: none; }
.ai-history summary::-webkit-details-marker { display: none; }
.ai-history ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; width: min(420px, 86vw); max-height: 380px; overflow: auto; margin: 0; padding: 8px; list-style: none; background: var(--bg); border-radius: 16px; box-shadow: var(--up); }
.ai-history li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.ai-history li a:hover { box-shadow: var(--down); text-decoration: none; }
.ai-history small { color: var(--muted); white-space: nowrap; }
.ai-chat { max-width: 940px; display: flex; flex-direction: column; min-height: calc(100vh - 250px); }
.ai-log { display: flex; flex-direction: column; gap: 14px; padding-bottom: 18px; }
.ai-msg { max-width: 100%; overflow-wrap: anywhere; animation: ai-in .25s ease-out; }
.ai-msg p { margin: 0 0 8px; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0 8px; padding-left: 22px; } .ai-msg h4 { margin: 10px 0 4px; font-size: 1rem; }
.ai-msg code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; padding: 1px 6px; border-radius: 6px; box-shadow: var(--down); }
.ai-msg.me { align-self: flex-end; max-width: 78%; padding: 11px 16px; border-radius: 18px 18px 4px 18px; color: #fff; background: linear-gradient(135deg, var(--ai-a), #5a43c9); box-shadow: 0 6px 16px rgba(108, 80, 230, .28); }
.ai-msg.bot { position: relative; padding: 14px 18px 14px 22px; border-radius: 18px; box-shadow: var(--up-sm); }
.ai-msg.bot::before { content: ''; position: absolute; left: 8px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: linear-gradient(var(--ai-a), var(--ai-b)); }
.ai-msg.bot.thinking { padding: 10px 16px; } .ai-msg.bot.thinking::before { display: none; }
.ai-msg.note { align-self: center; color: var(--muted); font-size: .9rem; padding: 8px 14px; border-radius: 12px; box-shadow: var(--down); }
.ai-msg.note.bad { color: var(--bad); background: var(--bad-bg); box-shadow: none; white-space: pre-wrap; }
.ai-code, .ai-cmd, .ai-out { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.ai-code { background: var(--term); color: #dfe6f5; padding: 12px 14px; border-radius: 12px; margin: 6px 0 10px; }
.ai-msg.term { background: var(--term); color: #c9d3ea; border-radius: 16px; padding: 0; overflow: hidden; box-shadow: 0 10px 26px rgba(19, 24, 39, .28), 0 0 0 1px rgba(124, 92, 240, .35); }
.ai-term-head { display: flex; align-items: center; gap: 9px; padding: 9px 14px; background: var(--term-2); font-size: .78rem; letter-spacing: .02em; color: #9aa7c4; }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--ai-a), var(--ai-b)); box-shadow: 0 0 8px var(--ai-b); }
.ai-tag { margin-left: auto; padding: 2px 9px; border-radius: 99px; font-weight: 650; }
.ai-tag.ok { background: rgba(18, 181, 165, .18); color: #5eead4; } .ai-tag.bad { background: rgba(240, 82, 110, .2); color: #ff9db0; }
.ai-cmd { padding: 12px 14px; color: #fff; }
.ai-cmd::before { content: '# '; color: var(--ai-b); }
.ai-out { padding: 0 14px 12px; color: #aab6d3; max-height: 420px; overflow: auto; }
.ai-msg.term details { padding: 0 14px 12px; } .ai-msg.term details .ai-out { padding: 10px 0 0; }
.ai-msg.term summary { cursor: pointer; color: #8fa0c4; font-size: .82rem; }
.ai-rc { padding: 0 14px 10px; font-size: .78rem; color: #ff9db0; }
.ai-why { padding: 0 14px 12px; font-size: .86rem; color: #c9d3ea; } .ai-why a { color: #5eead4; }
.ai-actions { display: flex; gap: 10px; padding: 0 14px 14px; }
.ai-actions .btn { box-shadow: none; } .ai-actions .btn:not(.primary):not(.danger) { background: var(--term-2); color: #dfe6f5; }
.ai-actions .btn.danger { background: #d92c62; color: #fff; }
.ai-msg.term.ask { box-shadow: 0 10px 26px rgba(19, 24, 39, .28), 0 0 0 2px var(--ai-b); }
.ai-msg.term.danger { box-shadow: 0 10px 26px rgba(19, 24, 39, .28), 0 0 0 2px #d92c62; }
.ai-msg.term.danger .ai-dot { background: #d92c62; box-shadow: 0 0 8px #d92c62; }
.ai-msg.term.off { opacity: .75; } .ai-msg.term.off .ai-cmd { text-decoration: line-through; color: #9aa7c4; }
.ai-msg.thinking { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; }
.ai-dots i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--ai-a); animation: ai-dot 1.2s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
.ai-orb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none; background: conic-gradient(from 0deg, var(--ai-a), var(--ai-b), #60a5fa, var(--ai-a)); animation: ai-spin 7s linear infinite; box-shadow: 0 10px 30px rgba(124, 92, 240, .35); }
.ai-orb span { width: 76%; height: 76%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--bg) 70%); box-shadow: inset 0 0 14px rgba(124, 92, 240, .35); }
.ai-orb.sm { width: 26px; height: 26px; box-shadow: none; animation-duration: 1.6s; }
.ai-empty { margin: auto; padding: 30px 0 34px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; max-width: 640px; }
.ai-empty h2 { margin: 12px 0 0; font-size: 1.45rem; letter-spacing: -.02em; }
.ai-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.ai-chip { font: inherit; font-size: .9rem; padding: 9px 15px; border: 0; border-radius: 99px; background: var(--bg); color: var(--text); box-shadow: var(--up-sm); cursor: pointer; }
.ai-chip:hover { color: var(--ai-a); } .ai-chip:active { box-shadow: var(--down); }
.ai-input { position: sticky; bottom: 18px; margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 22px; background: var(--bg); box-shadow: var(--up), 0 0 0 1px rgba(124, 92, 240, .18); }
.ai-input-row { display: flex; gap: 10px; align-items: flex-end; }
.ai-input.drop { box-shadow: var(--up), 0 0 0 2px var(--ai-b); }
.ai-attach { color: var(--muted); box-shadow: none; flex: none; } .ai-attach:hover { color: var(--ai-a); }
.ai-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 4px 0; }
.ai-pend { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 5px 6px 5px 10px; border-radius: 12px; box-shadow: var(--down); font-size: .84rem; }
.ai-pend.img { padding-left: 5px; } .ai-pend img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; }
.ai-pend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-pend button { border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); padding: 2px 6px; border-radius: 8px; } .ai-pend button:hover { color: var(--bad); }
.ai-pend.wait { color: var(--muted); padding: 9px 12px; }
.ai-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; justify-content: flex-end; align-items: flex-end; }
.ai-att.img img { display: block; max-width: 200px; max-height: 140px; border-radius: 12px; background: #fff; }
.ai-att.doc { display: inline-block; padding: 5px 11px; border-radius: 10px; background: rgba(255, 255, 255, .18); font-size: .84rem; }
.ai-input:focus-within { box-shadow: var(--up), 0 0 0 2px var(--ai-a); }
.ai-input textarea { flex: 1; resize: none; box-shadow: none; background: transparent; padding: 9px 10px; max-height: 180px; }
.ai-input textarea:focus-visible { outline: none; }
.ai-input .btn.primary { background: linear-gradient(135deg, var(--ai-a), var(--ai-b)); border-radius: 14px; }
.ai-input .btn:disabled { opacity: .55; cursor: default; }
.ai-hero { display: flex; gap: 26px; align-items: center; } .ai-hero h2 { margin-top: 0; }
.ai-rules { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 7px; }
.ai-exec-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
#ai-setup select { width: 100%; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@keyframes ai-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes ai-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ai-orb, .ai-dots i, .ai-msg { animation: none; } }
@media (max-width: 700px) { .ai-msg.me { max-width: 92%; } .ai-hero { flex-direction: column; text-align: center; } }
.ai-msg { scroll-margin-bottom: 120px; }
.ai-att.doc { order: 2; }
.inline-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
table.ref { width: 100%; border-collapse: collapse; }
table.ref th, table.ref td { text-align: left; vertical-align: top; padding: 9px 10px; border-top: 1px solid #d8dee7; }
table.ref thead th { border-top: 0; color: var(--muted); font-size: .84rem; font-weight: 600; }
table.ref td:first-child { white-space: nowrap; width: 190px; }
table.ref tr.ref-group th { padding-top: 20px; border-top: 0; color: var(--accent-dark); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 700px) { table.ref td:first-child { white-space: normal; width: auto; } }
.proxy-box { margin: 14px 0; padding: 14px 16px; border-radius: 16px; box-shadow: var(--down); }
.proxy-box p { margin: 0 0 6px; }
/* Кнопка справки у заголовка раздела */
.help-btn { font: inherit; font-size: .95rem; font-weight: 700; width: 30px; height: 30px; margin-left: 10px; vertical-align: 4px; border: 0; border-radius: 50%; background: var(--bg); color: var(--accent-dark); box-shadow: var(--up-sm); cursor: pointer; }
.help-btn:hover { color: var(--accent); } .help-btn:active { box-shadow: var(--down); }
#help-dlg { width: min(760px, 94vw); max-height: 86vh; border: 0; border-radius: 22px; padding: 26px 28px 20px; background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(20, 30, 50, .35); }
#help-dlg::backdrop { background: rgba(30, 40, 60, .35); }
#help-body { max-height: 64vh; overflow: auto; padding-right: 6px; } #help-body h2 { margin-top: 0; font-size: 1.25rem; } #help-body h3 { font-size: 1rem; margin: 16px 0 6px; }
#help-body ul, #help-body ol { padding-left: 22px; display: grid; gap: 6px; } #help-dlg .dlg-actions { margin-top: 16px; }
/* Общие сертификаты */
.shared-cert { padding: 14px 0 4px; border-top: 1px solid #d8dee7; } .shared-cert:first-of-type { border-top: 0; }
.shared-cert header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .shared-cert h3 { margin: 0; font-size: 1.05rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.shared-note { font-size: .88rem; color: var(--muted); margin: 10px 0 0; }
/* Превью сайтов и страница сайта */
.thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; box-shadow: var(--down); background: linear-gradient(135deg, #dfe6f0, #eef2f7); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumb b { font-size: 2.4rem; font-weight: 800; color: #b6c0cf; }
.card-thumb { display: block; margin-bottom: 14px; } .card-thumb:hover .thumb { box-shadow: var(--up-sm); }
.card h3 .ext { font-size: .85rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
.site-head { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 26px; align-items: start; }
.site-head .thumb b { font-size: 4rem; }
.site-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 1.15rem; font-weight: 650; margin-bottom: 12px; }
.site-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 12px 0 16px; } .site-facts dt { color: var(--muted); } .site-facts dd { margin: 0; overflow-wrap: anywhere; }
.site-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.site-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; margin-bottom: 16px; }
.site-nums div { display: flex; flex-direction: column; } .site-nums b { font-size: 1.5rem; letter-spacing: -.02em; } .site-nums span { color: var(--muted); font-size: .86rem; }
@media (max-width: 900px) { .site-head { grid-template-columns: 1fr; } }

/* Витрина сайтов */
.showcase { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.site-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 16px; border-radius: 22px; background: var(--bg); box-shadow: var(--up); color: var(--text); transition: transform .15s ease, box-shadow .15s ease; }
.site-tile:hover { text-decoration: none; transform: translateY(-3px); }
.site-tile:active { transform: none; box-shadow: var(--up-sm); }
.site-tile .thumb { border-radius: 14px; width: 100%; }
.st-name { display: flex; align-items: center; gap: 8px; padding: 2px 6px 0; min-width: 0; }
.st-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.site-tile:hover .st-name b { color: var(--accent-dark); }
.st-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px; color: var(--muted); font-size: .85rem; min-height: 24px; }
.st-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-meta .badge { font-size: .74rem; padding: 3px 9px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #b6c0cf; }
.dot.ok { background: #1f9d6b; box-shadow: 0 0 0 3px rgba(31, 157, 107, .16); } .dot.bad { background: #d04a3c; box-shadow: 0 0 0 3px rgba(208, 74, 60, .16); } .dot.warn { background: #d99a1c; }
.notice { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 13px 18px; border-radius: 16px; box-shadow: var(--down); margin-bottom: 22px; color: var(--text); }
.notice > span:first-of-type { flex: 1; min-width: 240px; }
a.notice:hover { text-decoration: none; } a.notice .go { font-weight: 650; color: var(--accent-dark); white-space: nowrap; }
.notice.warn { background: var(--warn-bg); box-shadow: none; } .notice.bad { background: var(--bad-bg); box-shadow: none; }
h2.sub { font-size: 1.05rem; margin: 30px 4px 16px; }
@media (max-width: 700px) { .showcase { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; } }

/* ИИ-виджет для сайтов */
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 9px 14px; margin: 14px 0 0; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; min-width: 0; }
.widget-how .steps li { margin-bottom: 10px; }
.widget-list a { grid-template-columns: auto 1fr auto auto; }
@media (max-width: 700px) { dl.kv { grid-template-columns: 1fr; gap: 2px 0; } dl.kv dd { margin-bottom: 8px; } }

/* Файловый менеджер */
.fm { padding: 18px 20px; } .fm.drop { box-shadow: var(--down); }
.fm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 650; min-width: 0; }
.fm-crumbs span { color: var(--muted); font-weight: 400; }
.fm-upload { cursor: pointer; }
.fm-table { width: 100%; border-collapse: collapse; }
.fm-table th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 6px 8px; }
.fm-table td { padding: 5px 8px; border-top: 1px solid var(--line, #d8dee7); vertical-align: middle; }
.fm-table td.c, .fm-table th.c { width: 30px; text-align: center; }
.fm-table input[type=checkbox] { width: 17px; height: 17px; box-shadow: none; accent-color: var(--accent); padding: 0; }
.fm-table tr:hover td { background: rgba(255, 255, 255, .45); }
.fm-name { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 550; min-width: 0; }
.fm-name span { overflow-wrap: anywhere; }
.fm-table .nw { white-space: nowrap; }
.fm-acts { text-align: right; white-space: nowrap; }
.fm-acts .btn { margin-left: 4px; opacity: .55; } .fm-table tr:hover .fm-acts .btn, .fm-acts .btn:focus-visible { opacity: 1; }
.btn.small { padding: 4px 10px; font-size: .82rem; border-radius: 9px; }
.fm-bulk { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; box-shadow: var(--down); position: sticky; bottom: 12px; background: var(--bg); }
.fm-bulk[hidden] { display: none; }
.fm-progress { margin: 0 0 12px; padding: 9px 14px; border-radius: 12px; box-shadow: var(--down); }
.fm-note { margin: 14px 0 0; } .fm-empty { padding: 26px 8px; text-align: center; }
.fm-dlg { border: 0; border-radius: 20px; padding: 24px; background: var(--bg); color: var(--text); box-shadow: 0 20px 60px rgba(20, 30, 50, .35); width: min(440px, calc(100vw - 32px)); }
.fm-dlg::backdrop { background: rgba(31, 42, 58, .35); }
.fm-dlg h2 { margin: 0 0 14px; font-size: 1.1rem; } .fm-dlg label { display: flex; flex-direction: column; gap: 7px; font-size: .9rem; }
.fm-dlg .row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.fm-edit { padding: 16px; } .fm-edit-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-edit-head b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fm-edit textarea { width: 100%; height: calc(100vh - 290px); min-height: 320px; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; tab-size: 4; white-space: pre; resize: vertical; }
@media (max-width: 800px) { .fm-table th:nth-child(4), .fm-table td:nth-child(4), .fm-table th:nth-child(5), .fm-table td:nth-child(5) { display: none; } .fm-acts .btn { opacity: 1; } }

/* Кнопка «Разобраться с ИИ» */
.btn.ai-ask { color: #5b34c9; }
.btn.ai-ask::before { content: '✦ '; }
.check-act { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

/* Компоненты сервера */
.comp-table td { vertical-align: middle; } .comp-table td:nth-child(2) { max-width: 520px; }
