/* Тема сайта = тема менеджера ботов 0.6.28 (manager/MlBot.Manager/Pages/Shared/_Layout.cshtml): переменные,
   акценты, боковое меню, карточки, кнопки. Сверх менеджера — блоки главной (hero, features, steps) и ссылки-кнопки. */
:root {
    --bg: #0b1120; --bg-2: #0f172a; --panel: #111a2e; --panel-2: #16213a; --panel-3: #1c2a47;
    --line: #1f2b45; --line-2: #2b3c60; --text: #e2e8f0; --muted: #8b9bb4; --muted-2: #a9bbd6;
    --accent: #22d3ee; --accent-2: #8b5cf6; --accent-soft: rgba(34, 211, 238, .14); --accent-glow: rgba(34, 211, 238, .35);
    --ok: #4ade80; --bad: #f87171; --warn: #fbbf24; --info: #7dd3fc;
}
html[data-accent="violet"] { --accent: #a78bfa; --accent-2: #22d3ee; --accent-soft: rgba(167, 139, 250, .16); --accent-glow: rgba(167, 139, 250, .38); }
html[data-accent="gold"] { --accent: #e0b84a; --accent-2: #f97316; --accent-soft: rgba(224, 184, 74, .16); --accent-glow: rgba(224, 184, 74, .35); }
html[data-accent="green"] { --accent: #34d399; --accent-2: #22d3ee; --accent-soft: rgba(52, 211, 153, .16); --accent-glow: rgba(52, 211, 153, .35); }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Segoe UI", Tahoma, sans-serif; display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
@media (min-width: 901px) {
    html.nav-collapsed body { grid-template-columns: 68px 1fr; }
    html.nav-collapsed aside.side { padding: 18px 10px 16px; }
    html.nav-collapsed .logo { justify-content: center; padding: 2px 0 14px; }
    html.nav-collapsed .logo > span:last-child { display: none; }
    html.nav-collapsed nav.menu a { justify-content: center; padding: 11px 0; }
    html.nav-collapsed nav.menu a span { display: none; }
    html.nav-collapsed .side-foot { display: none; }
}

/* ── Боковое меню ── */
aside.side { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; padding: 18px 14px 16px; background: linear-gradient(180deg, #0e1729, #0a1020); border-right: 1px solid var(--line); }
.logo { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--accent); padding: 2px 6px 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.logo .mark { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--accent); display: grid; place-items: center; background: rgba(34, 211, 238, .06); box-shadow: 0 0 16px var(--accent-glow), inset 0 0 12px var(--accent-soft); }
.logo .mark svg { width: 20px; height: 20px; }
.logo b { display: block; letter-spacing: .14em; font-size: 14px; font-weight: 700; white-space: nowrap; }
.logo small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
nav.menu a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 4px; border-radius: 10px; border: 1px solid transparent; color: var(--text); text-decoration: none; font-weight: 600; }
nav.menu a svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
nav.menu a:hover { background: rgba(255, 255, 255, .04); }
nav.menu a.active { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); color: #fff; }
nav.menu a.active svg { color: var(--accent); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.side-foot form { margin: 0; }
.side-foot .user { font-weight: 600; color: var(--muted-2); word-break: break-all; }
.side-foot .langs a { margin-right: 8px; color: var(--muted); text-decoration: none; font-size: 12px; }
.side-foot .langs a.active { color: var(--accent); }

/* ── Содержимое ── */
.content { min-width: 0; background: var(--bg); background-image: linear-gradient(rgba(148, 163, 184, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .055) 1px, transparent 1px); background-size: 32px 32px; }
main { padding: 24px 32px 96px; max-width: 1200px; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 18px; }
h1 .muted { font-weight: 600; font-size: 22px; color: var(--muted-2); }
h2 { font-size: 20px; font-weight: 700; margin: 26px 0 10px; color: var(--text); }
h2 .muted { font-weight: 500; font-size: 18px; color: var(--muted-2); }
h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(34, 211, 238, .05); }
td.wrap { white-space: normal; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line-2); white-space: nowrap; }
.pill.v-ok { color: var(--ok); border-color: var(--ok); }
.pill.v-update { color: var(--warn); border-color: var(--warn); }
.pill.v-critical { color: var(--bad); border-color: var(--bad); }
.pill.v-newer { color: var(--info); border-color: var(--info); }
.pill.v-unknown { color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #3b4a66; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
form.inline { display: inline; }
input, select, textarea, button { font: inherit; color: var(--text); background: #0d1526; border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 15px; height: 15px; }
button, a.btn { cursor: pointer; background: var(--panel-2); min-height: 36px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
button:hover, a.btn:hover { background: var(--panel-3); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.danger { color: var(--bad); border-color: rgba(248, 113, 113, .45); }
button.primary, a.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #06101c; border-color: transparent; box-shadow: 0 0 14px var(--accent-glow); }
button.primary:hover, a.btn.primary:hover { filter: brightness(1.08); }
button.small { padding: 3px 10px; min-height: 28px; font-size: 13px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row > input { min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.card.ok { border-left-color: var(--ok); } .card.bad { border-left-color: var(--bad); } .card.warn { border-left-color: var(--warn); } .card.muted { border-left-color: var(--muted); }
.card.narrow { max-width: 520px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid > .card { margin: 0; }
.field { margin-bottom: 12px; }
.field input, .field select, .field textarea { width: 100%; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
code, .mono { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; background: rgba(74, 222, 128, .10); border: 1px solid rgba(74, 222, 128, .45); border-left: 3px solid var(--ok); }
.flash.bad { background: rgba(248, 113, 113, .10); border-color: rgba(248, 113, 113, .45); border-left-color: var(--bad); color: #fecaca; }
.flash.warn { background: rgba(251, 191, 36, .10); border-color: rgba(251, 191, 36, .45); border-left-color: var(--warn); }
label { color: var(--text); font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
label .muted { font-weight: 400; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; }
label.check input { width: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; }
.kv b { color: var(--muted); font-weight: normal; }
.fabs { position: fixed; right: 18px; bottom: 18px; display: flex; gap: 8px; z-index: 20; }
.fabs button { background: rgba(17, 26, 46, .95); border-color: var(--line-2); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 25; }

/* ── Главная ── */
.hero { padding: 36px 0 20px; max-width: 760px; }
.hero h1 { font-size: 40px; line-height: 1.1; margin-bottom: 14px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 17px; color: var(--muted-2); margin-bottom: 20px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.banner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; margin: 10px 0 24px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); box-shadow: 0 0 18px var(--accent-glow); }
.banner b { font-size: 16px; }
.banner .muted { color: var(--muted-2); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 10px 0 26px; }
.features .card { margin: 0; }
.features .card .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.features .card .ico svg { width: 20px; height: 20px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps div { position: relative; padding: 14px 16px 14px 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.steps div::before { counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #06101c; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* ── Мелкие утилиты вместо style="…": CSP сайта запрещает inline-стили ── */
.mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; } .m-0 { margin: 0; }
.label-row { margin: 10px 0 4px; }
.ml-8 { margin-left: 8px; }
.w-70 { width: 70px; } .w-90 { width: 90px; } .w-150 { width: 150px; } .w-180 { width: 180px; } .w-260 { width: 260px; }
.maxw-820 { max-width: 820px; }
.flex-1 { flex: 1; }

/* ── Лицензия в кабинете ── */
.lic-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.lic-head .id { font-family: Consolas, monospace; color: var(--muted); font-size: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chips .pill { background: var(--panel-2); }

@media (max-width: 900px) {
    body { grid-template-columns: 1fr; }
    aside.side { position: fixed; left: 0; top: 0; bottom: 0; width: 262px; height: auto; transform: translateX(-100%); transition: transform .2s; z-index: 30; display: flex; }
    body.nav-open aside.side { transform: none; }
    body.nav-open .backdrop { display: block; }
    main { padding: 14px 12px 96px; }
    h1 { font-size: 24px; }
    .hero { padding-top: 10px; }
    .hero h1 { font-size: 28px; }
    th, td { padding: 6px 7px; }
}
