/* Server panel — dark by default; light via the theme toggle. Colors are role tokens. */
:root {
  color-scheme: dark;
  --bg: #0f1012;
  --side: #141518;
  --surface: #1a1b1e;
  --surface-2: #222327;
  --surface-3: #2a2b30;
  --border: #2c2d32;
  --text: #f4f4f2;
  --text-2: #c3c2b7;
  --text-3: #8d8c86;
  --accent: #3987e5;
  --accent-soft: rgba(57, 135, 229, .14);
  --grid: #26272b;
  --good: #0ca30c;
  --good-text: #3fcf3f;
  --warning: #fab219;
  --warning-text: #fab219;
  --critical: #d03b3b;
  --critical-text: #f07272;
  --good-bg: rgba(12, 163, 12, .14);
  --warning-bg: rgba(250, 178, 25, .14);
  --critical-bg: rgba(208, 59, 59, .16);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .25);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f1;
  --side: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --surface-3: #ebebe8;
  --border: #e4e3de;
  --text: #0b0b0b;
  --text-2: #52514e;
  --text-3: #7a7974;
  --accent: #2a78d6;
  --accent-soft: rgba(42, 120, 214, .10);
  --grid: #ecebe7;
  --good-text: #0a7f0a;
  --warning-text: #946200;
  --critical-text: #b42f2f;
  --good-bg: #e7f5e7;
  --warning-bg: #fdf3dc;
  --critical-bg: #fbe7e7;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }
.err { color: var(--critical-text); font-size: 12px; }
.hidden { display: none !important; }

button, .btn {
  font: inherit; font-size: 13px; cursor: pointer; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, border-color .12s; white-space: nowrap;
}
button:hover { background: var(--surface-3); }
button:disabled { opacity: .45; cursor: default; }
button.sm { padding: 3px 9px; font-size: 12px; border-radius: 7px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--critical-text); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--surface-2); }
button svg.icon { width: 15px; height: 15px; }
select, input[type="search"], input[type="text"], input[type="password"] {
  font: inherit; font-size: 13px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 9px;
}

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; background: var(--side); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 6px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, var(--s1), var(--s7)); color: #fff; letter-spacing: .5px; }
.brand b { display: block; font-size: 14px; }
.brand span { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active svg { color: var(--accent); }
.nav .badge { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; }
.badge.critical { background: var(--critical-bg); color: var(--critical-text); }
.badge.warning { background: var(--warning-bg); color: var(--warning-text); }
.side .foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.side .foot .who { flex: 1; min-width: 0; font-size: 13px; }
.side .foot .who small { display: block; color: var(--text-3); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; align-items: center; gap: 12px; }
.top h1 { font-size: 18px; margin: 0; font-weight: 650; }
.crumbs { font-size: 13px; color: var(--text-3); }
.crumbs a { color: var(--text-3); }
.top .spacer { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(12,163,12,.6); animation: pulse 2.4s infinite; }
.live.stale i { background: var(--warning); animation: none; }
.live.paused i { background: var(--text-3); animation: none; }
#every button { min-width: 38px; justify-content: center; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.5); } 70% { box-shadow: 0 0 0 7px rgba(12,163,12,0); } 100% { box-shadow: 0 0 0 0 rgba(12,163,12,0); } }
#menuBtn { display: none; }
.view { padding: 22px 24px 48px; max-width: 1440px; width: 100%; }

/* ---------- blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > h2, .section-title { font-size: 14px; font-weight: 650; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card > h2 .right, .section-title .right { margin-left: auto; display: flex; gap: 6px; align-items: center; font-weight: 400; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 14px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--good-bg); color: var(--good-text); }
.pill.warning { background: var(--warning-bg); color: var(--warning-text); }
.pill.critical { background: var(--critical-bg); color: var(--critical-text); }
.pill.idle { background: var(--surface-3); color: var(--text-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--good); } .dot.warning { background: var(--warning); } .dot.critical { background: var(--critical); } .dot.idle { background: var(--text-3); }

/* hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.ring { width: 112px; height: 112px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--surface-3); }
.ring .val { stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .center b { font-size: 26px; display: block; line-height: 1; }
.ring .center small { font-size: 12px; color: var(--text-3); }
.ring-stat { display: grid; justify-items: center; gap: 6px; }
.ring-caption { color: var(--text-3); font-size: 12px; line-height: 16px; }
.hero > div:last-child > .muted { min-height: 52px; }
.hero .chips { margin-top: 28px; }
.hero h2 { font-size: 20px; margin: 0 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; font-size: 12px; color: var(--text-2); display: flex; gap: 8px; align-items: center; }
.chip b { color: var(--text); font-size: 14px; }
.problems { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.problems li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.problems li.critical { background: var(--critical-bg); }
.problems li.warning { background: var(--warning-bg); }
.problems .area { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; min-width: 92px; }
.problems a { margin-left: auto; font-size: 12px; }

/* KPI tiles with sparkline */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.kpi .value.sm { font-size: 20px; line-height: 39px; }
.kpi .sub { font-size: 12px; color: var(--text-2); min-height: 18px; overflow-wrap: anywhere; }
.kpi .meter { height: 4px; background: var(--surface-3); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; border-radius: 2px; background: var(--accent); width: 0; transition: width .5s; }
.kpi .meter.warning i { background: var(--warning); } .kpi .meter.critical i { background: var(--critical); }
.kpi svg.spark { display: block; width: calc(100% + 28px); margin: 8px -14px 0; height: 44px; }
.spark .line { fill: none; stroke-width: 1.6; }
.spark .area { opacity: .16; }

/* project rows */
.prow { display: grid; grid-template-columns: 4px minmax(0, 1.6fr) 92px 70px 80px minmax(0, 1fr) 18px; gap: 12px; align-items: center;
  padding: 10px 12px 10px 0; border-radius: 10px; color: var(--text); }
.prow:hover { background: var(--surface-2); text-decoration: none; }
.prow .bar { width: 4px; height: 34px; border-radius: 2px; background: var(--good); }
.prow .bar.warning { background: var(--warning); } .prow .bar.critical { background: var(--critical); }
.prow .t { min-width: 0; overflow-wrap: anywhere; }
.prow .t b { display: block; font-weight: 600; }
.prow .t small { color: var(--text-3); font-size: 12px; }
.prow .c { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.prow .c b { display: block; color: var(--text); font-size: 13px; }
.phead { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.prow.phead { padding-top: 0; padding-bottom: 4px; }
.prow.phead:hover { background: transparent; }
.spacer { flex: 1; }

/* project cards */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { position: relative; overflow: hidden; color: var(--text); display: block; }
.pcard:hover { text-decoration: none; border-color: var(--surface-3); transform: translateY(-1px); }
.pcard { transition: transform .12s, border-color .12s; }
.pcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--good); }
.pcard.warning::before { background: var(--warning); } .pcard.critical::before { background: var(--critical); }
.pcard.idle::before { background: var(--text-3); }
.pcard h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pcard .dir { font-size: 12px; color: var(--text-3); margin: 3px 0 12px; overflow-wrap: anywhere; }
.pcard .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pcard .nums div { font-size: 12px; color: var(--text-3); }
.pcard .nums b { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.pcard .cdots { display: flex; gap: 5px; margin-top: 12px; flex-wrap: wrap; }
.pcard .foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; gap: 8px; }

/* tables */
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data td.actions button + button { margin-left: 4px; }
.cell-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* charts */
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.chart h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.chart h3 .now { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.chart svg.plot { display: block; width: 100%; height: 170px; overflow: visible; }
.axis { fill: var(--text-3); font-size: 12px; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.plot .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.plot .area { opacity: .13; }
.plot .cross { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; }
.plot .marker { stroke: var(--surface); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 3px 10px; border-radius: 7px; font-size: 12px; }
.seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.seg button.on:hover { background: var(--accent); }
.tip { position: fixed; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: nowrap; z-index: 60; display: none; }
.tip .row { display: flex; align-items: center; gap: 6px; }
.tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; align-items: start; }
.timeline li:last-child { border-bottom: 0; }
.timeline li > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.timeline .dot { margin-top: 6px; }
.timeline time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.empty { color: var(--text-3); font-size: 13px; padding: 10px 0; }

/* bars */
.stackbar { height: 14px; border-radius: 7px; background: var(--surface-3); overflow: hidden; display: flex; margin: 6px 0 10px; }
.stackbar i { display: block; height: 100%; width: 0; }
.stackbar i + i { box-shadow: inset 2px 0 0 var(--surface); }
.hbar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; min-width: 80px; }
.hbar i { display: block; height: 100%; border-radius: 3px; width: 0; background: var(--accent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }

/* logs drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; display: none; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(1100px, 92vw); background: var(--surface); border-left: 1px solid var(--border);
  z-index: 50; display: none; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.35); }
.drawer.open, .drawer-bg.open { display: flex; }
.drawer-bg.open { display: block; }
.drawer header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drawer header h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.drawer .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.drawer .tools input[type="search"] { flex: 1; min-width: 160px; }
.drawer .tools label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.logbody { flex: 1; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.55; padding: 10px 0; background: var(--bg); }
.logbody .l { padding: 0 16px; white-space: pre; }
.logbody.wrap .l { white-space: pre-wrap; word-break: break-word; }
.logbody .l:hover { background: var(--surface-2); }
.logbody .ts { color: var(--text-3); margin-right: 10px; }
.logbody .l.e { background: var(--critical-bg); }
.logbody .l.w { background: var(--warning-bg); }
.logbody mark { background: rgba(250, 178, 25, .45); color: inherit; border-radius: 2px; }
.drawer footer { padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; }

/* confirm modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 70; display: none; place-items: center; padding: 16px; }
.modal-bg.open { display: grid; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.modal h3 { margin: 0 0 8px; font-size: 16px; overflow-wrap: anywhere; }
.modal p { margin: 0 0 16px; color: var(--text-2); font-size: 13px; white-space: pre-line; }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; }
.modal input { width: 100%; margin-bottom: 14px; }

.toast { position: fixed; bottom: 18px; right: 18px; background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 10px; font-size: 13px; display: none; z-index: 80; max-width: calc(100% - 36px); box-shadow: var(--shadow); }
.banner { background: var(--warning-bg); color: var(--warning-text); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; display: none; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--s1) 18%, transparent), transparent),
              radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--s7) 16%, transparent), transparent), var(--bg); }
.login form { width: 100%; max-width: 360px; display: grid; gap: 14px; padding: 26px; }
.login h1 { font-size: 20px; margin: 0; }
.login input { width: 100%; padding: 10px 12px; }
.login label { display: grid; gap: 5px; font-size: 12px; color: var(--text-2); }
.login button { justify-content: center; padding: 10px; }

/* availability: uptime strips (one cell per time bucket) and rows */
.ustrip { display: flex; gap: 2px; height: 24px; min-width: 0; }
.ustrip i { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: var(--surface-3); }
.ustrip i.u-ok { background: var(--good); }
.ustrip i.u-warn { background: var(--warning); }
.ustrip i.u-bad { background: var(--critical); }
.ustrip i:hover { filter: brightness(1.25); }
.ustrip.sm { height: 12px; gap: 1px; }
.ustrip.sm i { border-radius: 1px; }
.ustrip-axis { display: flex; justify-content: flex-end; gap: 12px; font-size: 12px; color: var(--text-3); margin-top: 6px; padding-left: calc(31.25% + 85px); }
.ustrip-axis span:first-child { margin-right: auto; }
.urow { display: grid; grid-template-columns: minmax(0, 1fr) 92px minmax(0, 2.2fr); gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.urow:last-of-type { border-bottom: 0; }
.urow .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .t small { color: var(--text-3); font-size: 12px; }
.urow .pctv { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }
.up-ok { color: var(--good-text); }
.up-warning { color: var(--warning-text); }
.up-critical { color: var(--critical-text); }
.charts.one { grid-template-columns: minmax(0, 1fr); }
.pcard .uline { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.pcard .uline b { font-variant-numeric: tabular-nums; }
.pcard .uline .ustrip { flex: 1; }
.card .sub-h { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 6px; }
.problems.flush { margin: 0; }
.risk { background: var(--warning-bg); color: var(--text); border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px; }
.risk b { color: var(--warning-text); }
table.data td.nowrap { white-space: nowrap; }
table.data tr.bad td { background: var(--critical-bg); }
table.data tr.bad:hover td { background: var(--critical-bg); }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--accent); font-size: 13px; padding: 4px 0; }
details.more[open] summary { margin-bottom: 6px; }
.overview-detail > .sub { line-height: 1.5; overflow-wrap: anywhere; }
.hero .overview-detail, .overview-note { margin-top: 10px; }
.overview-note { line-height: 1.5; }
@media (max-width: 640px) { .overview-detail > summary { min-height: 44px; align-content: center; } }

/* bottom tab bar (phones and the Telegram Mini App) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    background: color-mix(in srgb, var(--side) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--text-3);
    background: none; border: 0; padding: 4px 0; border-radius: 10px; position: relative; }
  .tabbar a.active, .tabbar button.active { color: var(--accent); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg.icon { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 0; left: 55%; font-size: 12px; padding: 0 5px; border-radius: 999px; }
  .view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  #menuBtn { display: none !important; }
  .top #every { display: none; }
}
body.tg #theme, body.tg #logout { display: none; }
body.tg .top { padding-top: 8px; }

@media (max-width: 1100px) {
  .g-main, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .prow { grid-template-columns: 4px minmax(0, 1fr) 60px 70px 18px; }
  .prow .hide-md { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .side.open { transform: none; }
  #menuBtn { display: inline-flex; }
  .live span { display: none; }
  .top { padding: 10px 16px; }
  .view { padding: 16px 16px 40px; }
  .hero { grid-template-columns: 76px 1fr; gap: 14px; align-items: start; }
  .ring { width: 76px; height: 76px; }
  .ring .center b { font-size: 17px; }
  .ring .center small { display: none; }
  .hero h2 { font-size: 17px; }
  .chips { margin-left: -90px; }
  .card > h2 .right, .section-title .right { margin-left: 0; width: 100%; }
  .section-title .right button { flex: 1; justify-content: center; }
  /* container table becomes cards */
  table.data.cards thead { display: none; }
  table.data.cards, table.data.cards tbody, table.data.cards tr, table.data.cards td { display: block; width: 100%; }
  table.data.cards tr { border-bottom: 1px solid var(--border); padding: 10px 0; }
  table.data.cards tr:last-child { border-bottom: 0; }
  table.data.cards td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 10px; }
  table.data.cards td[data-label]::before { content: attr(data-label); color: var(--text-3); font-size: 12px; }
  table.data.cards td:first-child { display: block; }
  table.data.cards td.actions { justify-content: flex-start; padding-top: 8px; }
  table.data.cards tr:hover td { background: transparent; }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phead { display: none; }
  .drawer { width: 100vw; }
  .problems li { flex-wrap: wrap; gap: 6px 10px; }
  .problems .area { min-width: 0; }
  .problems li > span:nth-child(3) { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
  .urow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .urow .s { grid-column: 1 / -1; }
  .ustrip { height: 20px; gap: 1px; }
  .ustrip-axis { padding-left: 0; }
  .card > h2 .right.muted { width: auto; margin-left: 0; }
}

/* Style 1 — approved Assistant / Welcome tokens; native structure and handlers retained. */
:root {
  --bg: #11181f; --side: #141e28; --surface: #1a232d; --surface-2: #202c37; --surface-3: #293744;
  --border: #2d3a47; --text: #eaf1f6; --text-2: #b6c2cd; --text-3: #9cabb9;
  --accent: #57cbbb; --accent-soft: #213d3d; --grid: #2d3a47;
  --s1: #57cbbb; --s3: #57b89e; --s7: #a798ed;
  --good: #42b59c; --good-text: #71d8c7; --good-bg: #213d3d;
  --shadow: 0 1px 2px #0004, 0 8px 24px #0003; --radius: 16px;
  --control-text: #11181f; --inset: 32px;
}
:root[data-theme="light"] {
  --bg: #f3f5f7; --side: #141e28; --surface: #fff; --surface-2: #f7f9fa; --surface-3: #edf1f4;
  --border: #e5eaf0; --text: #1c2a35; --text-2: #465765; --text-3: #5d6b77;
  --accent: #087e78; --accent-soft: #e9f6f3; --grid: #e5eaf0;
  --s1: #087e78; --s3: #269c83; --s7: #8270cc;
  --good: #168c77; --good-text: #087e78; --good-bg: #e9f6f3;
  --shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent), 0 6px 20px color-mix(in srgb, var(--text) 6%, transparent);
  --control-text: #fff;
}
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, .btn { font-size: 12px; border-radius: 7px; padding: 8px 12px; font-weight: 550; }
button.primary, .seg button.on { color: var(--control-text); }
input, select { max-width: 100%; min-width: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.app { grid-template-columns: 218px minmax(0, 1fr); }
.side { padding: 22px 12px 16px; border-color: #2d3a47; color: #eaf1f6; gap: 12px; }
.side .brand { padding-bottom: 18px; }
.logo { background: #243c43; color: #71d8c7; border-radius: 8px; }
.side .brand span, .side .who small { color: #9cabb9; }
.side .nav { gap: 4px; overflow-y: auto; min-height: 0; }
.side .nav a { padding: 10px 12px; border-radius: 8px; color: #aebdca; font-size: 13px; }
.side .nav a:hover, .side button.ghost:hover { background: #25333f; color: #eaf1f6; }
.side .nav a.active { background: #243c43; color: #71d8c7; }
.side .nav a.active svg { color: inherit; }
.side .foot { border-color: #2d3a47; flex-wrap: wrap; }
.side .avatar { background: #243c43; color: #71d8c7; }
.side .foot .who { flex-basis: 64px; }
.side button { color: #aebdca; }
.top { position: relative; padding: 0 var(--inset) 24px; gap: 10px; flex-wrap: wrap; background: var(--bg); backdrop-filter: none; border-bottom: 0; }
.top > div { display: contents; }
.top .crumbs { flex: 1 0 calc(100% + 2 * var(--inset)); min-height: 54px; display: flex; align-items: center; gap: 6px; margin: 0 calc(-1 * var(--inset)) 16px; padding: 0 var(--inset); background: var(--surface); border-bottom: 1px solid var(--border); font-size: 12px; }
.top .crumbs:empty::before { content: "Панель сервера"; }
.top h1 { font-size: 27px; line-height: 1.25; font-weight: 650; letter-spacing: -.55px; margin-top: 3px; }
.view { padding: 0 var(--inset) 48px; max-width: none; }
.card { padding: 18px; }
.card > h2, .section-title { font-size: 14px; font-weight: 700; }
.hero h2 { font-size: 20px; }
.kpi .value { font-size: 30px; letter-spacing: -.7px; }
.kpi .value.sm { font-size: 22px; }
.seg { border-radius: 9px; }
.seg button.on { background: var(--accent); }
.login { background: var(--bg); }
.login form { max-width: 400px; padding: 30px; gap: 18px; }
.login .brand { padding: 0 0 10px; align-items: flex-start; }
.login .brand > div:last-child { min-width: 0; }
.login .brand span { display: block; }
.login h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.5px; }
.login input { border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; }
@media (min-width: 1700px) { :root { --inset: 44px; } }
@media (max-width: 1100px) { .top { position: static; } }
@media (max-width: 900px) {
  :root { --inset: 14px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { width: 218px; box-shadow: none; }
  .side.open { box-shadow: 0 0 40px #0006; }
  .hero .problems { margin-left: -90px; }
  .seg { flex-wrap: wrap; max-width: 100%; }
  .card > table.data th { white-space: normal; }
  .top { padding-bottom: 14px; }
  .top h1 { font-size: 25px; flex: 1; }
  .top .spacer { display: none; }
  .top .crumbs { min-height: 54px; }
  .view { padding: 0 14px calc(100px + env(safe-area-inset-bottom)); }
  .card { padding: 16px; }
  button, button.sm, select, input:not([type="checkbox"]), .tabbar a, .tabbar button, .nav a { min-height: 44px; }
  .seg button { padding: 7px 10px; }
  .tabbar { background: var(--surface); }
  .tabbar a, .tabbar button { color: var(--text-3); }
  .tabbar a.active, .tabbar button.active { color: var(--accent); background: var(--accent-soft); }
  .pcards, .charts { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 12px; }
  .kv dd, .cell-title, .modal p { overflow-wrap: anywhere; }
  .drawer .tools { gap: 10px; }
  .drawer footer { flex-wrap: wrap; gap: 4px; }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .login form { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Working hierarchy: status and resources, then projects and recent activity. */
.view > *, .grid > *, .hero > *, .pcard h3 > span { min-width: 0; }
.card, .kpi { box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent); }
.card > h2, .section-title { font-size: 15px; line-height: 1.4; }
.kpi { min-height: 148px; }
.kpi .label { line-height: 1.5; }
.kpi .sub { margin-top: 2px; }
.kpi svg.spark { margin-top: auto; padding-top: 8px; height: 50px; }
.pcard h3 { align-items: flex-start; gap: 12px; }
.pcard h3 > span:first-child { overflow-wrap: anywhere; }
.pcard .dir { overflow-wrap: anywhere; }
.tablewrap { border-radius: 10px; }
table.data th { background: var(--surface-2); font-size: 12px; font-weight: 600; }
table.data td { vertical-align: middle; }
.section-title .right { flex-wrap: wrap; }
.card > h2 .right { flex-wrap: wrap; }
.hero .problems li > span:nth-child(3) { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 901px) {
  .card { padding: 24px; }
  .grid, .pcards, .charts { gap: 20px; align-items: start; }
  .stack > * + * { margin-top: 20px; }
  .kpis { gap: 16px; }
  .card > h2, .section-title { margin-bottom: 18px; }
  table.data td { padding-top: 12px; padding-bottom: 12px; }
  .prow { padding-top: 13px; padding-bottom: 13px; }
  .prow.phead { padding-top: 0; padding-bottom: 6px; }
  button, button.sm { min-height: 36px; }
  .top { padding-bottom: 24px; }
  .view > [data-gap] { margin-top: 20px !important; }
  .view:has(> .hero) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px; align-items: start; }
  .view:has(> .hero) > [data-gap] { margin-top: 0 !important; }
  .view > .hero { grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; height: 100%; }
  .view > .hero .ring { width: 76px; height: 76px; }
  .view > .hero .ring .center b { font-size: 20px; }
  .view > .hero .ring .center small { font-size: 12px; }
  .view > .hero h2 { font-size: 21px; letter-spacing: -.3px; }
  .view > .hero .chips { margin: 28px 0 0 -94px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view > .hero .chip { flex-wrap: wrap; gap: 5px; padding: 9px 10px; }
  .view > .hero .chip b { margin-left: auto; }
  .view > .hero .problems { margin-left: -94px; }
  .view > .hero .problems li { flex-wrap: wrap; }
  .view > .hero .problems li > span:nth-child(3) { flex-basis: 100%; }
  .view > .hero + div .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view > .g-main { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}
@media (min-width: 901px) and (max-width: 1350px) {
  .view:has(> .hero) { grid-template-columns: minmax(0, 1fr); }
  .view > .hero + div .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view > .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .top .crumbs { margin-bottom: 10px; }
  .kpi { min-height: 148px; }
  .hero .problems li > span:nth-child(3) { flex-basis: 100%; }
}

@media (max-width: 600px) {
  a.prow { grid-template-columns: 4px repeat(2, minmax(0, 1fr)) 18px; }
  a.prow .bar { grid-column: 1; grid-row: 1 / 4; height: 100%; }
  a.prow .t { grid-column: 2 / 4; }
  a.prow .c { overflow-wrap: anywhere; }
  a.prow .c:nth-child(3), a.prow .c:nth-child(5) { grid-column: 2; }
  a.prow .c:nth-child(4), a.prow .c:nth-child(6) { grid-column: 3; }
  a.prow .hide-md { display: block; }
  a.prow > svg { grid-column: 4; grid-row: 1 / 4; }
  .timeline li { grid-template-columns: 14px minmax(0, 1fr); gap: 4px 10px; }
  .timeline time { grid-column: 2; }
}

/* Sites: keep response time and its unit together before the certificate-status cell. */
#view table.data td.num:nth-child(3):has(+ td > .dot) { white-space: nowrap; }

/* Server only: native card actions and unscaled HTML chart axes. */
.server-current-note { margin: 0 0 12px; color: var(--text-2); font-size: 12px; }
.server-kpi { align-items: stretch; gap: 0; text-align: left; white-space: normal; font: inherit; cursor: pointer; color: var(--text); }
.server-kpi:hover { background: var(--surface-2); border-color: var(--accent); }
.server-kpi:focus-visible, .server-chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.server-kpi .server-spark-label { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.server-kpi svg.spark { margin-top: 0; }
.server-chart { min-width: 0; scroll-margin-top: 20px; }
.server-last, .server-chart-range { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.server-last { min-height: 36px; margin-bottom: 8px; }
.server-plot { position: relative; padding-left: 68px; }
.server-y-axis { position: absolute; inset: 10px auto 10px 0; width: 60px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; color: var(--text-2); font-size: 12px; line-height: 1; }
.server-y-axis span:first-child { transform: translateY(-50%); }
.server-y-axis span:last-child { transform: translateY(50%); }
.server-x-axis { margin: 8px 0 0 68px; display: flex; justify-content: space-between; gap: 5px; color: var(--text-2); font-size: 12px; }
.server-chart-range { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.server-legend { gap: 8px 16px; }
.server-legend > span { min-width: 0; }
.server-legend small { display: block; font-size: 12px; }
.server-system-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.server-system .kv { margin: 0; }
.server-system .kv dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .server-system-groups { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Projects-only controls and readable technical data. */
.projects-page .project-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.projects-page .project-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.projects-page .project-tools label:first-child { flex: 1 1 280px; }
.projects-page .project-tools input, .projects-page .project-tools select { width: 100%; }
.projects-page .project-tools [role="status"] { align-self: center; font-size: 12px; }
.projects-page .project-legend { margin: 0 0 16px; line-height: 1.7; }
.projects-page .cdots { align-items: center; font-size: 12px; color: var(--text-3); }
.projects-page .project-id, .projects-page .project-other-row { overflow-wrap: anywhere; }
.projects-page .project-other .dir { white-space: normal; overflow: visible; text-overflow: clip; }
.projects-page .project-other-row + .project-other-row { margin-top: 12px; }
.projects-page a.pcard h3 { flex-direction: column; align-items: flex-start; }
.projects-page a.pcard h3 > span { max-width: 100%; overflow-wrap: anywhere; }
.projects-page a.pcard h3 .pill { white-space: normal; line-height: 1.4; }
.projects-page .pcard .uline { flex-wrap: wrap; }
.projects-page .pcard .uline .ustrip { flex-basis: 100%; }
.projects-page .pcard .foot { flex-wrap: wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .projects-page .project-tools label { flex: 1 1 100%; } }

/* Backups-only controls and retention rows. */
.backups-page .backup-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.backups-page .backup-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.backups-page .backup-tools label:first-child { flex: 1 1 260px; }
.backups-page .backup-tools input, .backups-page .backup-tools select { width: 100%; }
.backups-page .backup-tools [role="status"] { align-self: center; font-size: 12px; }
.backups-page .backup-targets h2 { flex-wrap: wrap; gap: 10px; }
.backups-page .backup-targets .mono { overflow-wrap: anywhere; }
.backups-page .backup-targets th { white-space: normal; }
.backups-page .backup-targets td:first-child { min-width: 145px; max-width: 230px; }
.backups-page .backup-targets td.actions button { white-space: normal; min-width: 105px; }
.backups-page .backup-limits h3 { margin: 18px 0 8px; font-size: 13px; }
.backups-page .backup-rule { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.backups-page .backup-rule span { color: var(--text-2); }
.backups-page .backup-rule b { flex-shrink: 0; text-align: right; font-weight: 500; }
@media (max-width: 600px) { .backups-page .backup-tools label { flex: 1 1 100%; } }

/* Sites-only controls and certificate scale. */
.sites-page .site-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.sites-page .site-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.sites-page .site-tools label:first-child { flex: 1 1 260px; }
.sites-page .site-tools input, .sites-page .site-tools select { width: 100%; }
.sites-page .site-tools [role="status"] { align-self: center; font-size: 12px; }
.sites-page table.data th { white-space: normal; }
.sites-page table.data td:first-child { min-width: 180px; max-width: 320px; overflow-wrap: anywhere; }
.sites-page table.data td:nth-child(2), .sites-page table.data td:nth-child(4) { min-width: 150px; }
.sites-page table.data td:nth-child(3) { white-space: nowrap; }
.sites-page .hbar { margin-top: 7px; }
.sites-page details { margin-top: 8px; }
.sites-page summary { cursor: pointer; color: var(--text-2); font-size: 12px; }
.sites-page details .mono { margin-top: 6px; overflow-wrap: anywhere; }
.sites-page .pill { white-space: normal; }
@media (max-width: 600px) { .sites-page .site-tools label { flex: 1 1 100%; } }

/* Availability only: controls, keyboard-accessible interval details and native chart axes. */
.uptime-page .uptime-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.uptime-page .uptime-tools label { display: grid; gap: 6px; color: var(--text-2); font-size: 12px; }
.uptime-page .uptime-tools label:first-child { flex: 1 1 240px; }
.uptime-page .uptime-tools input, .uptime-page .uptime-tools select { width: 100%; }
.uptime-page .uptime-tools [role="status"], .uptime-page .uptime-note { color: var(--text-2); font-size: 12px; line-height: 1.7; }
.uptime-page .uptime-tools [role="status"] { align-self: center; }
.uptime-page .uptime-note { margin: 14px 0; }
.uptime-page .section-title { flex-wrap: wrap; gap: 10px; }
.uptime-page .urow .t b { white-space: normal; overflow-wrap: anywhere; }
.uptime-page details { margin-top: 7px; }
.uptime-page summary { cursor: pointer; color: var(--text-2); font-size: 12px; min-height: 44px; padding: 12px 0; }
.uptime-page .uptime-intervals { max-height: 240px; overflow-y: auto; padding-left: 20px; color: var(--text-2); font-size: 12px; }
.uptime-page .uptime-intervals li { margin: 6px 0; }
.uptime-page .server-x-axis, .uptime-page .server-y-axis, .uptime-page .server-chart-range { font-size: 12px; }
.uptime-page .server-legend small { font-size: 12px; }
.uptime-page td.small { overflow-wrap: anywhere; }
@media (max-width: 600px) { .uptime-page .uptime-tools label { flex: 1 1 100%; } .uptime-page .server-x-axis { flex-wrap: wrap; } }

/* Security only: seven unchanged metrics, local table controls and source freshness. */
.security-page > .kpis { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.security-page > .kpis > .kpi { grid-column: span 3; }
.security-page > .kpis > .kpi:nth-child(n+5) { grid-column: span 4; }
.security-page .security-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0; }
.security-page .security-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.security-page .security-tools label:first-child { flex: 1 1 180px; }
.security-page .security-tools input, .security-page .security-tools select { width: 100%; }
.security-page .security-tools [role="status"] { font-size: 12px; align-self: center; }
.security-page .security-note { color: var(--text-2); font-size: 12px; line-height: 1.7; margin: 12px 0; }
.security-page h2 { flex-wrap: wrap; gap: 8px; }
.security-page h2 > .right { font-weight: 400; min-width: 0; max-width: 100%; }
.security-page button[data-revoke] { max-width: 100%; white-space: normal; }
.security-page .kv dd { min-width: 0; overflow-wrap: anywhere; }
.security-page .kv dd > .right { display: block; float: none; }
.security-page table.data th { white-space: normal; }
.security-page table.data .mono { overflow-wrap: anywhere; }
.security-page summary { min-height: 44px; padding: 12px 0; }
@media (max-width: 1100px) { .security-page > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .security-page > .kpis > .kpi, .security-page > .kpis > .kpi:nth-child(n+5) { grid-column: auto; } }
@media (max-width: 600px) { .security-page > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .security-page .security-tools label { flex: 1 1 100%; } }

.security-page .security-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; }
@media (max-width: 340px) { .security-page > .kpis { grid-template-columns: minmax(0, 1fr); } }

/* Disk only: local controls, long references and original action buttons. */
.disk-page > .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.disk-page .disk-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0; }
.disk-page .disk-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.disk-page .disk-tools label:first-child { flex: 1 1 220px; }
.disk-page .disk-tools input, .disk-page .disk-tools select { width: 100%; }
.disk-page .disk-tools [role="status"] { font-size: 12px; align-self: center; }
.disk-page .disk-note { color: var(--text-2); font-size: 12px; line-height: 1.7; margin: 12px 0; }
.disk-page h2 { flex-wrap: wrap; gap: 8px; }
.disk-page h2 > .right { min-width: 0; max-width: 100%; }
.disk-page button { max-width: 100%; white-space: normal; }
.disk-page table.data th { white-space: normal; }
.disk-page table.data td:first-child { min-width: 160px; max-width: 380px; }
.disk-page table.data .mono, .disk-page table.data td { overflow-wrap: anywhere; }
.disk-page .hbar { min-width: 90px; }
@media (max-width: 600px) { .disk-page .disk-tools label { flex: 1 1 100%; } .disk-page > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.disk-page summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.disk-page details .sub { overflow-wrap: anywhere; }

/* Services only: full-width read-only tables and diagnostic details. */
.services-page > .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.services-page .service-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0; }
.services-page .service-tools label { display: grid; gap: 6px; font-size: 12px; color: var(--text-2); }
.services-page .service-tools label:first-child { flex: 1 1 240px; }
.services-page .service-tools input, .services-page .service-tools select { width: 100%; }
.services-page .service-tools [role="status"], .services-page .service-note { color: var(--text-2); font-size: 12px; line-height: 1.7; }
.services-page .service-tools [role="status"] { align-self: center; }
.services-page .service-note { margin: 12px 0; }
.services-page table.data th { white-space: normal; }
.services-page table.data td { overflow-wrap: anywhere; }
.services-page table.data td:first-child { min-width: 180px; max-width: 360px; }
.services-page .pill { white-space: normal; }
.services-page summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.services-page details { min-width: 160px; }
.services-page details .kv { display: block; margin: 0; font-size: 12px; }
.services-page details .kv dd { margin: 0 0 8px; overflow-wrap: anywhere; }
.services-page .service-failure { overflow-wrap: anywhere; padding: 6px 0; }
@media (max-width: 600px) { .services-page .service-tools label { flex: 1 1 100%; } .services-page > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Journal only: full messages and touch-accessible raw records. */
.journal-page .journal-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 14px 0; }
.journal-page .journal-tools label { display: grid; gap: 6px; color: var(--text-2); font-size: 12px; }
.journal-page .journal-tools label:first-child { flex: 1 1 240px; }
.journal-page .journal-tools input, .journal-page .journal-tools select { width: 100%; min-height: 44px; }
.journal-page button, .journal-page summary { min-height: 44px; }
.journal-page button { max-width: 100%; white-space: normal; }
.journal-page .journal-note, .journal-page [role="status"] { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.journal-page .journal-note { margin: 12px 0; }
.journal-page .journal-tools [role="status"] { align-self: center; }
.journal-page table.data th { white-space: normal; }
.journal-page table.data td, .journal-page .journal-message { overflow-wrap: anywhere; }
.journal-page .journal-message { white-space: pre-wrap; margin-top: 6px; }
.journal-page .pill { white-space: normal; }
.journal-page summary { cursor: pointer; padding: 12px 0; }
.journal-page details { min-width: 130px; max-width: 400px; }
.journal-page details .kv { display: block; margin: 0; font-size: 12px; }
.journal-page details .kv dd { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
@media (max-width: 600px) { .journal-page .journal-tools label { flex: 1 1 100%; } .journal-page h2 .seg { flex-wrap: wrap; } .journal-page table.data.cards td { min-width: 0; } }
@media (max-width: 600px) { .journal-page table.data.cards td { display: block; } .journal-page table.data.cards td[data-label]::before { display: block; margin-bottom: 4px; } }

/* Project detail only: native chart labels and complete Drive list. */
.project-page .project-note { color: var(--text-2); font-size: 12px; line-height: 1.7; margin: 12px 0; }
.project-page .section-title, .project-page h2 { flex-wrap: wrap; gap: 10px; }
.project-page .section-title > .right, .project-page h2 > .right { min-width: 0; max-width: 100%; }
.project-page .section-title button { max-width: 100%; white-space: normal; }
.project-page .mono, .project-page .kv dd { overflow-wrap: anywhere; }
.project-page .kv dd { min-width: 0; }
.project-page summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.project-page .server-x-axis, .project-page .server-y-axis, .project-page .server-chart-range, .project-page .server-legend small { font-size: 12px; }
.project-page .uptime-intervals { max-height: 240px; overflow-y: auto; padding-left: 20px; font-size: 12px; color: var(--text-2); }
.project-page .uptime-intervals li { margin: 6px 0; }
#drawer .tools label:has(#logAuto) { white-space: normal; }
@media (max-width: 600px) { .project-page .server-x-axis { flex-wrap: wrap; } }


/* Telegram bots: concise overview, visible reception facts, expandable diagnostics. */
.bots-page { --bot-gap: 16px; }
.bots-page > .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bots-page .bot-kpi { padding: 18px 20px; box-shadow: none; }
.bot-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bots-page .bot-kpi .label { color: var(--text-2); font-size: 12px; }
.bot-kpi-top > .icon { width: 17px; height: 17px; color: var(--text-3); }
.bots-page .bot-kpi .value { font-size: 32px; line-height: 1.2; font-weight: 650; letter-spacing: -.8px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.bots-page .bot-kpi .value small { margin-left: 4px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.bot-kpi-note { color: var(--text-3); font-size: 12px; margin-top: 5px; }
.bots-page .bot-kpi-receiving.is-healthy { border-color: color-mix(in srgb, var(--good-text) 30%, var(--border)); }
.bot-kpi-receiving.is-healthy .value, .bot-kpi-receiving.is-healthy .bot-kpi-top > .icon { color: var(--good-text); }
.bot-kpi-alert .value, .bot-kpi-alert .bot-kpi-top > .icon { color: var(--warning-text); }
.bots-page .bots-toolbar { padding: 20px; box-shadow: none; }
.bots-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bots-section-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.bots-section-head p { margin: 4px 0 0; color: var(--text-3); font-size: 12px; }
.bots-cadence { display: inline-flex; gap: 7px; align-items: center; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.bots-cadence .icon { width: 14px; height: 14px; }
.bots-page .bot-tools { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(140px, 1fr) minmax(145px, 1fr); gap: 12px; align-items: end; margin-top: 20px; }
.bots-page .bot-tools label { display: grid; gap: 7px; font-size: 12px; color: var(--text-2); min-width: 0; }
.bots-page .bot-tools input, .bots-page .bot-tools select { width: 100%; min-height: 42px; }
.bots-page #botReset { color: var(--text-3); min-height: 36px; padding: 4px 8px; }
.bots-toolbar-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.bots-toolbar-foot > [role="status"] { white-space: nowrap; margin-right: auto; }
.bots-guide { max-width: 640px; text-align: right; }
.bots-guide summary { cursor: pointer; display: inline list-item; list-style-position: inside; color: var(--text-2); padding: 5px 0; }
.bots-guide p { text-align: left; font-size: 12px; line-height: 1.7; margin: 10px 0 0; color: var(--text-2); }
.bots-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--bot-gap); align-items: start; }
.bots-page .bot-card { display: flex; flex-direction: column; padding: 20px 20px 0; box-shadow: none; overflow: hidden; }
.bots-page .bot-card[data-level="warning"] { border-color: color-mix(in srgb, var(--warning) 45%, var(--border)); }
.bots-page .bot-card[data-level="critical"] { border-color: color-mix(in srgb, var(--critical) 65%, var(--border)); }
.bot-card-head { display: flex; align-items: flex-start; gap: 11px; }
.bot-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.bot-avatar > .icon { width: 20px; height: 20px; }
.bot-identity { flex: 1; min-width: 0; }
.bots-page .bot-card h2 { font-size: 15px; font-weight: 650; margin: 0 0 3px; line-height: 1.4; }
.bot-card h2 a { color: var(--text); }
.bot-card h2 .icon { width: 12px; height: 12px; color: var(--text-3); vertical-align: -1px; }
.bot-username { font-size: 12px; overflow-wrap: anywhere; color: var(--text-3); }
.bot-username:hover { color: var(--accent); }
.bots-page .bot-card .pill { font-size: 12px; font-weight: 500; padding: 4px 8px; line-height: 1.5; white-space: normal; max-width: 48%; }
.bot-purpose { color: var(--text-2); font-size: 13px; line-height: 1.6; margin: 14px 0 8px; min-height: 42px; }
.bot-project { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; font-size: 12px; margin-bottom: 15px; overflow-wrap: anywhere; }
.bot-project .icon { width: 13px; height: 13px; }
.bot-project .icon:last-child { width: 11px; }
.bot-signals { display: flex; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid var(--border); padding-top: 13px; margin-bottom: 15px; }
.bot-signal { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.bot-signal .dot { width: 6px; height: 6px; }
.bot-signal.warning { color: var(--warning-text); }
.bot-signal.critical { color: var(--critical-text); }
.bot-message { margin: 0 0 16px; font-size: 12px; }
.bot-message > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bot-message dt { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); }
.bot-message dt .icon { width: 13px; height: 13px; position: relative; top: 2px; }
.bot-message dd { text-align: right; margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bot-message time { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.bot-counts-label { color: var(--text-3); font-size: 12px; margin-bottom: 8px; }
.bot-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 16px; padding: 12px 0; background: var(--surface-2); border-radius: 10px; }
.bot-counts > div { display: flex; flex-direction: column-reverse; padding: 0 14px; min-width: 0; }
.bot-counts > div + div { border-left: 1px solid var(--border); }
.bot-counts dt { color: var(--text-3); font-size: 12px; margin-top: 3px; }
.bot-counts dd { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bot-diagnostics { border-top: 1px solid var(--border); }
.bot-diagnostics summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 46px; padding: 10px 0; cursor: pointer; list-style: none; font-size: 12px; color: var(--text-2); }
.bot-diagnostics summary::-webkit-details-marker { display: none; }
.bot-diagnostics summary > span:first-child { display: inline-flex; align-items: center; gap: 5px; }
.bot-diagnostics summary .icon { width: 12px; height: 12px; transition: transform .15s; }
.bot-diagnostics[open] summary .icon { transform: rotate(90deg); }
.bot-diagnostics summary .bot-read-age { color: var(--text-3); font-size: 12px; text-align: right; }
.bot-facts { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(0, 1.3fr); gap: 10px 14px; font-size: 12px; line-height: 1.6; margin: 4px 0 20px; }
.bot-facts dt { color: var(--text-3); }
.bot-facts dd { margin: 0; overflow-wrap: anywhere; }
.bots-page .bot-empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--text-3); }
.bot-empty > .icon { width: 30px; height: 30px; }
.bot-empty h2 { display: block; margin: 12px 0 4px; color: var(--text-2); font-size: 16px; }
.bot-empty p { font-size: 13px; margin: 0; }
@media (max-width: 1100px) {
  .bots-page .bot-tools { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); }
  .bot-card-head { flex-wrap: wrap; }
  .bots-page .bot-card .pill { max-width: 100%; }
}
@media (max-width: 900px) {
  .bots-grid { grid-template-columns: minmax(0, 1fr); }
  .tabbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .bots-page { --bot-gap: 12px; }
  .bots-page > .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bots-page .bot-kpi { padding: 12px 14px; }
  .bots-page .bot-kpi .label { font-size: 12px; }
  .bots-page .bot-kpi .value { font-size: 26px; margin-top: 5px; }
  .bots-page .bot-kpi .value small { font-size: 12px; }
  .bot-kpi-note { font-size: 12px; }
  .bot-kpi-top > .icon { width: 15px; height: 15px; }
  .bots-page .bots-toolbar { padding: 16px; }
  .bots-section-head h2 { font-size: 15px; }
  .bots-section-head p { display: none; }
  .bots-cadence { display: none; }
  .bots-page .bot-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
  .bots-page .bot-tools label:first-child { grid-column: 1 / -1; }
  .bots-toolbar-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; }
  .bots-page #botReset { min-height: 44px; }
  .bots-guide { max-width: 100%; grid-column: 1 / -1; text-align: left; }
  .bots-guide summary { min-height: 32px; padding: 8px 0; }
  .bots-page .bot-card { padding: 16px 16px 0; }
  .bot-avatar { width: 32px; height: 32px; border-radius: 9px; }
  .bot-card-head { gap: 10px; }
  .bots-page .bot-card h2 { font-size: 14px; }
  .bot-identity { flex-basis: calc(100% - 44px); }
  .bots-page .bot-card .pill { margin-left: 42px; margin-top: -3px; }
  .bot-purpose { min-height: 0; margin-top: 12px; }
  .bot-signals { gap: 7px 12px; }
  .bot-signal { font-size: 12px; }
  .bot-message > div { gap: 8px; }
  .bot-message dt { font-size: 12px; }
  .bot-message dd { font-size: 12px; }
  .bot-counts > div { padding: 0 11px; }
  .bot-counts dd { font-size: 21px; }
  .bot-facts { grid-template-columns: minmax(100px, .9fr) minmax(0, 1.3fr); gap: 9px; }
}
@media (prefers-reduced-motion: reduce) { .bot-diagnostics summary .icon { transition: none; } }
/* Compact bot table: twelve receivers fit together on a laptop display. */
.bot-view-switch { flex: none; }
.bots-section-head { flex-wrap: wrap; }
.bots-section-head > div:first-child { margin-right: auto; }
.bots-page.bots-table-view > * + * { margin-top: 10px; }
.bots-table-view .kpis { gap: 8px; }
.bots-table-view .bot-kpi { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; }
.bots-table-view .bot-kpi .value { font-size: 22px; line-height: 1.2; margin: 0; white-space: nowrap; }
.bots-table-view .bot-kpi .value small { font-size: 12px; }
.bots-table-view .bot-kpi-top > .icon, .bots-table-view .bot-kpi-note { display: none; }
.bots-table-view .bots-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding: 9px 12px; }
.bots-table-view .bots-section-head { grid-column: 2; grid-row: 1; align-self: end; }
.bots-table-view .bots-section-head > div:first-child, .bots-table-view .bots-cadence { display: none; }
.bots-table-view .bot-tools { grid-column: 1; grid-row: 1; margin-top: 0; gap: 8px; grid-template-columns: minmax(170px, 1.5fr) minmax(140px, 1fr) minmax(140px, 1fr); }
.bots-table-view .bot-tools label { font-size: 0; gap: 0; }
.bots-table-view .bot-tools input, .bots-table-view .bot-tools select { height: 32px; min-height: 32px; font-size: 12px; }
.bots-table-view .bot-view-switch button { min-height: 28px; font-size: 12px; padding: 4px 10px; }
.bots-table-view .bots-toolbar-foot { grid-column: 1 / -1; margin-top: 4px; font-size: 12px; gap: 12px; }
.bots-table-view #botReset { min-height: 24px; font-size: 12px; padding: 2px 6px; }
.bots-table-view .bots-guide summary { padding: 2px 0; }
.bot-table-scroll { position: relative; width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.bot-table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bot-table { width: 100%; min-width: 930px; border-collapse: collapse; table-layout: fixed; color: var(--text-2); font-size: 12px; }
.bot-table caption, .bot-table-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bot-col-identity { width: 22%; } .bot-col-project { width: 18%; } .bot-col-api { width: 9%; } .bot-col-process { width: 10%; } .bot-col-receive { width: 15%; } .bot-col-message { width: 14%; } .bot-col-count { width: 8%; } .bot-col-action { width: 4%; }
.bot-table thead th { height: 30px; padding: 6px 8px; background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
.bot-table-row > td, .bot-table-row > th { padding: 2px 8px; border-bottom: 1px solid var(--border); height: 31px; line-height: 14px; vertical-align: middle; }
.bot-table tbody > .bot-table-row:last-of-type > * { border-bottom: 0; }
.bot-table-row:hover { background: var(--surface-2); }
.bot-table-row[data-level="warning"] { background: color-mix(in srgb, var(--warning-bg) 40%, transparent); }
.bot-table-row[data-level="critical"] { background: var(--critical-bg); }
.bot-table-identity { text-align: left; font-weight: 550; }
.bot-table-identity a { display: block; color: var(--text); font-size: 12px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-table-identity small { display: block; color: var(--text-3); font-family: var(--mono); font-size: 12px; line-height: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.bot-table-project a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-size: 12px; }
.bot-table-project a:hover { color: var(--accent); }
.bot-table-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; line-height: 14px; white-space: nowrap; }
.bot-table-state .dot { width: 6px; height: 6px; }
.bot-table-state.ok { color: var(--good-text); }
.bot-table-state.warning { color: var(--warning-text); }
.bot-table-state.critical { color: var(--critical-text); }
.bot-table-state.idle { color: var(--text-3); }
.bot-table-receive > .bot-table-state { display: flex; }
.bot-table-receive > small { display: block; color: var(--text-3); font-size: 12px; line-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-table-message { font-size: 12px; white-space: nowrap; }
.bot-table .bot-table-count { text-align: right; font-variant-numeric: tabular-nums; }
.bot-table-count { color: var(--text); }
.bot-table-action { text-align: right; }
.bot-table-action button { display: flex; margin-left: auto; width: 26px; height: 26px; min-height: 26px; justify-content: center; padding: 0; border-radius: 6px; }
.bot-table-action .icon { width: 13px; height: 13px; }
.bot-table-action button[aria-expanded="true"] .icon { transform: rotate(90deg); }
.bot-table-detail[hidden] { display: none; }
.bot-table-detail > td { padding: 0; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.bot-table-expanded { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 30px; padding: 18px 20px; }
.bot-table-expanded h3 { margin: 0 0 8px; color: var(--text); font-size: 14px; }
.bot-table-expanded p { margin: 0 0 10px; font-size: 12px; line-height: 1.7; }
.bot-table-expanded .bot-facts { margin: 0; }
@media (max-width: 1100px) and (min-width: 901px) {
  .bots-table-view .bot-kpi { gap: 6px; padding: 8px 10px; }
  .bots-table-view .bot-kpi .label { font-size: 12px; }
}
@media (max-width: 900px) {
  .bots-table-view .bots-toolbar { display: block; padding: 12px; }
  .bots-table-view .bots-section-head { justify-content: flex-end; }
  .bots-table-view .bot-tools { margin-top: 10px; grid-template-columns: minmax(140px, 1.4fr) repeat(2, minmax(0, 1fr)); }
  .bots-table-view .bot-tools input, .bots-table-view .bot-tools select, .bots-table-view .bot-view-switch button { min-height: 44px; height: auto; }
  .bot-table-action button { min-height: 44px; width: 32px; }
}
@media (max-width: 600px) {
  .bots-table-view .bot-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bots-table-view .bots-guide summary { min-height: 32px; padding: 8px 0; }
  .bots-table-view #botReset { min-height: 36px; }
}

.bot-table-hint { display: none; }
@media (max-width: 1100px) { .bots-page .bot-table-hint { display: block; color: var(--text-3); font-size: 12px; margin-top: 6px; } }

/* Style 1 layout adaptations for the server panel. */
.panel-style1 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.panel-style1 .app { grid-template-columns: 218px minmax(0, 1fr); }
.panel-style1 .side { padding: 22px 12px 14px; background: var(--side); border-color: var(--border); color: var(--text); gap: 6px; }
.panel-style1 .brand { padding: 0 8px 20px; gap: 10px; }
.panel-style1 .logo { width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border)); border-radius: 9px; font-weight: 700; }
.panel-style1 .brand b { font-size: 14px; letter-spacing: -.2px; }
.panel-style1 .brand span, .panel-style1 .side .who small { color: var(--text-3); font-size: 12px; }
.panel-style1 .nav-caption { color: var(--text-3); padding: 4px 10px 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.panel-style1 .side .nav { gap: 3px; }
.panel-style1 .side .nav a { padding: 9px 10px; min-height: 38px; border-radius: 7px; color: var(--text-2); font-size: 12px; font-weight: 500; gap: 10px; }
.panel-style1 .side .nav a > .icon { width: 17px; height: 17px; }
.panel-style1 .side .nav a:hover, .panel-style1 .side button.ghost:hover { background: var(--surface-3); color: var(--text); }
.panel-style1 .side .nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.panel-style1 .side .foot { border-color: var(--border); padding-top: 14px; gap: 6px; }
.panel-style1 .side .avatar { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.panel-style1 .side button { color: var(--text-3); }
.panel-style1 .side .who { font-size: 12px; }
.panel-style1 .side .foot button { padding: 4px; }
.panel-style1 .top { display: flex; flex-wrap: nowrap; align-items: center; padding: 14px 28px; min-height: 76px; gap: 12px; background: transparent; }
.panel-style1 .top > div { display: block; flex: 1; min-width: 0; }
.panel-style1 .top .spacer { display: none; }
.panel-style1 .top .crumbs { display: flex; flex: none; min-height: 0; padding: 0; margin: 0 0 4px; background: transparent; border: 0; color: var(--text-3); font-size: 12px; line-height: 14px; }
.panel-style1 .top h1 { margin: 0; font-size: 24px; line-height: 29px; letter-spacing: -.65px; font-weight: 650; }
.panel-style1 .view { padding: 0 28px 32px; }
.panel-style1 .live { color: var(--text-3); font-size: 12px; gap: 6px; }
.panel-style1 .live i { width: 6px; height: 6px; animation: none; }
.panel-style1 #refresh { width: 34px; height: 34px; min-height: 34px; padding: 0; justify-content: center; background: var(--surface); border-color: var(--border); border-radius: 8px; }
.refresh-settings { position: relative; flex: none; }
.refresh-settings summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-height: 34px; list-style: none; font-size: 12px; line-height: 18px; color: var(--text-2); cursor: pointer; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; }
.refresh-settings summary::-webkit-details-marker { display: none; }
.refresh-settings summary .icon { width: 12px; height: 12px; }
.panel-style1 .top .refresh-settings[open] #every { position: absolute; display: flex; right: 0; top: calc(100% + 8px); z-index: 50; padding: 5px; background: var(--surface); box-shadow: 0 6px 24px #0002; flex-wrap: nowrap; max-width: none; }
.panel-style1 .seg { border-color: var(--border); background: var(--surface-2); border-radius: 7px; padding: 3px; }
.panel-style1 .seg button { color: var(--text-3); border-radius: 5px; font-weight: 500; }
.panel-style1 .seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px #0002; }
.panel-style1 .card { box-shadow: var(--shadow); }
.panel-style1 .bots-page { --bot-gap: 16px; }
.panel-style1 .bots-page.bots-table-view > * + * { margin-top: 12px; }
.panel-style1 .bots-table-view > .kpis { display: flex; justify-content: flex-start; gap: 0; padding: 3px 0; }
.panel-style1 .bots-table-view .bot-kpi { flex: 1; justify-content: flex-start; padding: 5px 16px; gap: 10px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.panel-style1 .bots-table-view .bot-kpi + .bot-kpi { border-left: 1px solid var(--border); }
.panel-style1 .bots-table-view .bot-kpi:first-child { padding-left: 0; }
.panel-style1 .bots-table-view .bot-kpi .value { font-size: 18px; line-height: 22px; letter-spacing: -.35px; font-weight: 650; }
.panel-style1 .bots-table-view .bot-kpi .value small { font-size: 12px; }
.panel-style1 .bots-table-view .bot-kpi .label { font-size: 12px; color: var(--text-3); }
.panel-style1 .bot-workspace { min-width: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-style1 .bots-table-view .bots-toolbar { padding: 10px 14px 7px; border: 0; border-radius: 0; box-shadow: none; gap: 0 14px; }
.panel-style1 .bots-table-view .bot-tools { gap: 10px; }
.panel-style1 .bots-table-view .bot-tools input, .panel-style1 .bots-table-view .bot-tools select { min-height: 36px; height: 36px; font-size: 12px; border-color: var(--border); border-radius: 7px; background: var(--surface); }
.panel-style1 .bots-table-view .bot-tools input::placeholder { color: var(--text-3); }
.panel-style1 .bots-table-view .bot-view-switch button { min-height: 28px; padding: 4px 10px; font-size: 12px; }
.panel-style1 .bots-table-view .bots-toolbar-foot { margin-top: 5px; }
.panel-style1 .bots-toolbar-foot > [role="status"] { color: var(--text-3); }
.panel-style1 .bots-guide summary { color: var(--text-3); }
.panel-style1 .bots-table-view #botReset { color: var(--text-3); font-weight: 400; }
.panel-style1 .bot-table-scroll { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.panel-style1 .bot-table { min-width: 960px; font-size: 13px; }
.panel-style1 .bot-table thead th { height: 34px; padding: 7px 10px; font-size: 12px; color: var(--text-3); background: var(--surface-2); font-weight: 500; }
.panel-style1 .bot-col-identity { width: 26%; } .panel-style1 .bot-col-project { width: 15%; } .panel-style1 .bot-col-api { width: 9%; } .panel-style1 .bot-col-process { width: 9%; } .panel-style1 .bot-col-receive { width: 18%; } .panel-style1 .bot-col-message { width: 13%; } .panel-style1 .bot-col-count { width: 6%; } .panel-style1 .bot-col-action { width: 4%; }
.panel-style1 .bot-table-row > th, .panel-style1 .bot-table-row > td { padding: 3px 10px; height: 38px; line-height: 16px; border-bottom-color: var(--border); }
.panel-style1 .bot-table-row:hover { background: var(--surface-2); }
.panel-style1 .bot-table-identity a { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 16px; font-weight: 550; }
.bot-row-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex: none; }
.bot-row-avatar > .icon { width: 16px; height: 16px; }
.bot-row-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.panel-style1 .bot-table-identity small { font-family: inherit; font-size: 12px; line-height: 14px; margin-top: 0; color: var(--text-3); }
.panel-style1 .bot-table-project a { font-size: 12px; }
.panel-style1 .bot-table-state { font-size: 12px; line-height: 16px; }
.panel-style1 .bot-table-state.ok { color: var(--text-2); }
.panel-style1 .bot-table-state .dot { width: 5px; height: 5px; }
.panel-style1 .bot-table-receive { white-space: nowrap; }
.panel-style1 .bot-table-receive > .bot-table-state { display: inline-flex; padding: 3px 7px; border-radius: 6px; vertical-align: middle; font-size: 12px; font-weight: 500; }
.panel-style1 .bot-table-receive > .bot-table-state.ok { background: var(--good-bg); color: var(--good-text); }
.panel-style1 .bot-table-receive > .bot-table-state.warning { background: var(--warning-bg); color: var(--warning-text); }
.panel-style1 .bot-table-receive > .bot-table-state.critical { background: var(--critical-bg); color: var(--critical-text); }
.panel-style1 .bot-table-receive > .bot-table-state.idle { background: var(--surface-3); }
.panel-style1 .bot-table-receive > small { display: inline-block; max-width: calc(100% - 98px); margin-left: 6px; vertical-align: middle; font-size: 12px; line-height: 14px; }
.panel-style1 .bot-table-message { font-size: 12px; color: var(--text-3); }
.panel-style1 .bot-table-count { font-size: 13px; font-weight: 500; }
.panel-style1 .bot-table-action button { width: 26px; height: 26px; min-height: 26px; border-radius: 6px; }
.panel-style1 .bot-table-action button:hover { background: var(--surface-3); }
.panel-style1 .bot-table-expanded { background: var(--surface-2); }
.panel-style1 .bot-table-expanded .bot-facts { font-size: 12px; }
.panel-style1 .bot-table-hint { padding: 6px 12px; margin: 0; }
.panel-style1 .bots-page:not(.bots-table-view) .bot-workspace { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.panel-style1 .bots-page:not(.bots-table-view) .bots-grid { margin-top: 16px; }
.panel-style1 .bots-page .bot-empty { border: 0; border-radius: 0; box-shadow: none; }
@media (min-width: 901px) and (max-width: 1300px) {
  .panel-style1 .bots-table-view .bot-kpi { gap: 8px; padding-right: 10px; padding-left: 10px; }
  .panel-style1 .bots-table-view .bot-kpi .label { font-size: 12px; }
}
@media (max-width: 900px) {
  .panel-style1 .app { grid-template-columns: minmax(0, 1fr); }
  .panel-style1 .side { width: 210px; }
  .panel-style1 .side .nav a { min-height: 40px; }
  .panel-style1 .top { padding: 14px; min-height: 72px; gap: 8px; }
  .panel-style1 .top h1 { font-size: 22px; line-height: 27px; }
  .panel-style1 .top .crumbs { font-size: 12px; }
  .panel-style1 .view { padding: 0 14px 90px; }
  .panel-style1 .refresh-settings summary, .panel-style1 #refresh { min-height: 40px; }
  .panel-style1 .top .refresh-settings[open] #every { max-width: calc(100vw - 28px); flex-wrap: wrap; width: max-content; }
  .panel-style1 .bots-table-view .bot-kpi { padding: 5px 10px; }
  .panel-style1 .bots-table-view .bot-tools input, .panel-style1 .bots-table-view .bot-tools select, .panel-style1 .bots-table-view .bot-view-switch button { min-height: 44px; height: auto; }
  .panel-style1 .bot-table-action button { min-height: 38px; }
  .panel-style1 .tabbar { background: var(--surface); border-color: var(--border); }
  .panel-style1 .tabbar a.active, .panel-style1 .tabbar button.active { color: var(--accent); background: var(--accent-soft); }
}
@media (max-width: 600px) {
  .panel-style1 .top .live { display: none; }
  .panel-style1 .bots-table-view > .kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 0; }
  .panel-style1 .bots-table-view .bot-kpi { padding: 5px 12px; }
  .panel-style1 .bots-table-view .bot-kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .panel-style1 .bots-table-view .bots-toolbar { padding: 12px; }
  .panel-style1 .bots-table-view .bot-tools { margin-top: 10px; }
}

/* Style 1 across the panel: typography and colors match the Welcome/Assistant admin skin. */
:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #11181f; --side: #141e28; --surface: #1a232d; --surface-2: #202c37; --surface-3: #293744;
  --border: #2d3a47; --text: #eaf1f6; --text-2: #b6c2cd; --text-3: #9cabb9;
  --accent: #57cbbb; --accent-soft: #213d3d; --grid: #2d3a47;
  --good: #42b59c; --good-text: #71d8c7; --good-bg: #213d3d;
  --warning: #e4b86d; --warning-text: #e4b86d; --warning-bg: #3c3224;
  --critical: #f0958c; --critical-text: #f0958c; --critical-bg: #422e30;
  --s1: #57cbbb; --s3: #57b89e; --s7: #b39bf4;
  --shadow: 0 3px 18px rgba(0,0,0,.12); --radius: 12px; --control-text: #11181f;
}
:root[data-theme="light"] {
  --bg: #f3f5f7; --side: #141e28; --surface: #fff; --surface-2: #f7f9fa; --surface-3: #edf1f4;
  --border: #e5eaf0; --text: #1c2a35; --text-2: #465765; --text-3: #5f6d79;
  --accent: #087e78; --accent-soft: #e9f6f3; --grid: #e5eaf0;
  --good: #168c77; --good-text: #087e78; --good-bg: #e9f6f3;
  --warning: #a67019; --warning-text: #946200; --warning-bg: #fbf4e8;
  --critical: #bd554c; --critical-text: #a43f37; --critical-bg: #fcf0ee;
  --s1: #087e78; --s3: #269c83; --s7: #8771d4; --control-text: #fff;
  --shadow: 0 3px 18px rgba(27,43,64,.065);
}
.panel-style1 { font: 400 14px/1.5 var(--font-ui); letter-spacing: normal; text-rendering: optimizeLegibility; -webkit-font-smoothing: auto; }
.panel-style1 :is(button, input, select, textarea, .btn) { font-family: var(--font-ui); font-size: 14px; line-height: 1.5; letter-spacing: normal; }
.panel-style1 :is(button, .btn) { font-weight: 550; }
.panel-style1 :is(h1,h2,h3,h4) { font-family: var(--font-ui); letter-spacing: -.015em; }
.panel-style1 .top h1 { font-size: 26px; line-height: 30px; font-weight: 650; }
.panel-style1 :is(.card > h2, .section-title) { font-size: 16px; line-height: 1.4; font-weight: 600; }
.panel-style1 :is(.small, .sub, small, .badge, .pill) { font-size: 12px; line-height: 1.5; }
.panel-style1 :is(.mono, code, pre) { font-family: var(--mono); font-size: 12px; line-height: 1.6; }
.panel-style1 .side { background: #141e28; border-color: #2d3a47; color: #e7edf3; }
.panel-style1 .side .brand b { font-size: 16px; font-weight: 650; color: #e7edf3; }
.panel-style1 .side .brand span, .panel-style1 .side .who small { color: #9cabb9; font-size: 12px; }
.panel-style1 .side .logo, .panel-style1 .side .avatar { background: #243c43; color: #71d8c7; border-color: #385258; }
.panel-style1 .side .nav a { color: #aebdca; font-size: 14px; line-height: 20px; font-weight: 500; }
.panel-style1 .side .nav a:hover, .panel-style1 .side button.ghost:hover { background: #25333f; color: #eaf1f6; }
.panel-style1 .side .nav a.active { background: #243c43; color: #71d8c7; font-weight: 600; }
.panel-style1 .side .foot { border-color: #2d3a47; }
.panel-style1 .side .who { color: #e7edf3; font-size: 14px; }
.panel-style1 .side button { color: #aebdca; }
.panel-style1 .top { min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.panel-style1 .top .crumbs { font-size: 12px; line-height: 14px; }
.panel-style1 .view { color: var(--text); }
.panel-style1 .seg button { font-size: 13px; font-weight: 550; }
.panel-style1 .seg button.on { background: var(--accent); color: var(--control-text); box-shadow: none; }
.panel-style1 :is(input,select,textarea) { color: var(--text); }
.panel-style1 :is(input,textarea)::placeholder { color: var(--text-3); opacity: 1; }
.panel-style1 table.data { font-family: var(--font-ui); font-size: 14px; }
.panel-style1 table.data th { font-size: 12px; line-height: 18px; font-weight: 550; letter-spacing: .025em; }
.panel-style1 table.data td { font-size: 14px; line-height: 21px; }
.panel-style1 :is(.cell-title,.pcard h3,.prow .name) { font-size: 14px; line-height: 1.5; }
.panel-style1 :is(.pcard .sub,.cell-sub,.kv,.kv dt,.kv dd) { font-size: 13px; line-height: 1.5; }
.panel-style1 :is(.server-x-axis,.server-y-axis,.server-chart-range,.server-legend small,.chart text,svg text) { font-family: var(--font-ui); font-size: 12px; }
.panel-style1 :is(.journal-page,.services-page,.sites-page,.disk-page,.backups-page,.uptime-page,.security-page,.project-page) :is(.small,.sub,summary) { font-size: 12px; }
.panel-style1 .drawer { font-family: var(--font-ui); font-size: 14px; }
.panel-style1 :is(.log-body,.log-output,.logBody,#logBody) { font: 12px/1.65 var(--mono); }
.panel-style1 .modal h2 { font-size: 20px; font-weight: 600; }
.panel-style1 .modal :is(p,label,input) { font-size: 14px; line-height: 1.55; }
.panel-style1 .login { font-family: var(--font-ui); }
.panel-style1 .login form { max-width: 420px; }
.panel-style1 .login h1 { font-size: 26px; line-height: 1.25; font-weight: 650; }
.panel-style1 .login :is(label,input,button) { font-size: 14px; line-height: 1.5; }
.panel-style1 .login input { min-height: 44px; }
/* Bot typography uses the same scale; compact mode changes spacing, never the font family. */
.panel-style1 .bots-table-view > .kpis { padding: 0; }
.panel-style1 .bots-table-view .bot-kpi { padding-top: 4px; padding-bottom: 4px; }
.panel-style1 .bots-table-view .bot-kpi .label { font-size: 13px; line-height: 20px; }
.panel-style1 .bots-table-view .bot-kpi .value { font-size: 20px; line-height: 24px; font-weight: 600; }
.panel-style1 .bots-table-view .bot-kpi .value small { font-size: 12px; }
.panel-style1 .bots-table-view .bots-toolbar { padding-top: 8px; padding-bottom: 5px; }
.panel-style1 .bots-table-view .bot-tools :is(input,select) { font-size: 13px; height: 34px; min-height: 34px; }
.panel-style1 .bots-table-view .bot-view-switch button { font-size: 13px; }
.panel-style1 .bots-table-view .bots-toolbar-foot { margin-top: 4px; font-size: 12px; }
.panel-style1 .bots-table-view #botReset, .panel-style1 .bots-guide summary { font-size: 12px; }
.panel-style1 .bot-table { font-family: var(--font-ui); font-size: 14px; }
.panel-style1 .bot-table thead th { font-size: 12px; line-height: 18px; font-weight: 550; }
.panel-style1 .bot-table-row > td, .panel-style1 .bot-table-row > th { height: 40px; padding-top: 2px; padding-bottom: 2px; font-size: 13px; line-height: 18px; }
.panel-style1 .bot-table-identity a { font-size: 14px; line-height: 18px; font-weight: 600; }
.panel-style1 .bot-table-identity small { font-family: var(--font-ui); font-size: 12px; line-height: 15px; font-weight: 400; }
.panel-style1 .bot-table-project a { font-size: 13px; line-height: 18px; }
.panel-style1 .bot-table-state { font-size: 13px; line-height: 18px; }
.panel-style1 .bot-table-receive > .bot-table-state { font-size: 12px; }
.panel-style1 .bot-table-receive > small { font-size: 12px; line-height: 16px; }
.panel-style1 .bot-table-message { font-size: 13px; }
.panel-style1 .bot-table-count { font-size: 14px; }
.panel-style1 .bot-table-expanded :is(p,.bot-facts) { font-size: 13px; line-height: 1.6; }
.panel-style1 .bot-table-expanded h3 { font-size: 16px; font-weight: 600; }
.panel-style1 .bot-table-expanded .bot-facts dt { color: var(--text-3); }
.panel-style1 .bot-username { font-family: var(--font-ui); font-size: 13px; }
.panel-style1 :is(.bot-purpose,.bot-project,.bot-message,.bot-facts) { font-size: 13px; line-height: 1.6; }
.panel-style1 :is(.bot-signal,.bot-counts-label,.bot-counts dt,.bot-diagnostics summary) { font-size: 12px; line-height: 1.5; }
@media (max-width: 900px) {
  .panel-style1 .side { width: 218px; }
  .panel-style1 .top { min-height: 68px; }
  .panel-style1 .top h1 { font-size: 24px; }
  .panel-style1 .refresh-settings summary { min-height: 40px; font-size: 13px; }
  .panel-style1 .bots-table-view .bot-tools :is(input,select), .panel-style1 .bots-table-view .bot-view-switch button { height: auto; min-height: 44px; }
  .panel-style1 .tabbar :is(a,button) { font-size: 12px; }
}

/* Keep RAM values and port mappings legible in the project container table. */
@media (min-width: 601px) {
 .panel-style1 .project-containers-table { min-width: 1120px; table-layout: fixed; }
 .project-containers-table col:nth-child(1) { width: 23%; }
 .project-containers-table col:nth-child(2) { width: 17%; }
 .project-containers-table col:nth-child(3) { width: 8%; }
 .project-containers-table col:nth-child(4) { width: 8%; }
 .project-containers-table col:nth-child(5) { width: 6%; }
 .project-containers-table col:nth-child(6) { width: 8%; }
 .project-containers-table col:nth-child(7) { width: 19%; }
 .project-containers-table col:nth-child(8) { width: 11%; }
 .panel-style1 .project-containers-table .cell-title { overflow-wrap: anywhere; }
 .panel-style1 .project-containers-table td[data-label="RAM"], .panel-style1 .project-containers-table td[data-label="Работает"], .panel-style1 .project-containers-table td[data-label="CPU"] { white-space: nowrap; }
 .panel-style1 .project-containers-table td[data-label="RAM"] .sub { display: block; font-size: 12px; white-space: nowrap; }
 .panel-style1 .project-containers-table td[data-label="Порты"] { font-size: 12px; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
 .panel-style1 .project-containers-table td.actions { white-space: normal; }
 .panel-style1 .project-containers-table td.actions button:first-child { display: flex; width: 100%; justify-content: center; margin: 0 0 4px; }
 .panel-style1 .project-containers-table td.actions button + button { margin: 0 2px 0 0; }
}

/* Color system: section identity, resource identity, then semantic state. */
:root {
  --blue: #7eb2ff; --violet: #b5a0ff; --teal: #62d9bc; --cyan: #67d5eb;
  --amber: #f1bd6b; --pink: #ef9fc5; --slate: #aabbd2;
}
:root[data-theme="light"] {
  --blue: #2864c5; --violet: #7750c5; --teal: #087e6e; --cyan: #08758e;
  --amber: #9c620b; --pink: #ad407c; --slate: #516985;
}
.panel-style1 { --section: var(--teal); --accent: var(--section); --accent-soft: color-mix(in srgb, var(--section) 11%, var(--surface)); }
.panel-style1 [data-section="overview"], .panel-style1[data-section="overview"] { --section: var(--teal); }
.panel-style1 [data-section="server"], .panel-style1[data-section="server"] { --section: var(--blue); }
.panel-style1 [data-section="projects"], .panel-style1[data-section="projects"] { --section: var(--violet); }
.panel-style1 [data-section="bots"], .panel-style1[data-section="bots"] { --section: var(--cyan); }
.panel-style1 [data-section="backups"], .panel-style1[data-section="backups"] { --section: var(--blue); }
.panel-style1 [data-section="sites"], .panel-style1[data-section="sites"] { --section: var(--teal); }
.panel-style1 [data-section="uptime"], .panel-style1[data-section="uptime"] { --section: var(--teal); }
.panel-style1 [data-section="security"], .panel-style1[data-section="security"] { --section: var(--pink); }
.panel-style1 [data-section="disk"], .panel-style1[data-section="disk"] { --section: var(--amber); }
.panel-style1 [data-section="services"], .panel-style1[data-section="services"] { --section: var(--violet); }
.panel-style1 [data-section="journal"], .panel-style1[data-section="journal"] { --section: var(--slate); }
.panel-style1 .main { background: radial-gradient(ellipse 90% 330px at 15% 0, color-mix(in srgb, var(--section) 6%, transparent), transparent); }
.panel-style1 .top { border-bottom-color: color-mix(in srgb, var(--section) 18%, var(--border)); }
.panel-style1 .top h1 { font-size: 28px; line-height: 34px; letter-spacing: -.035em; }
.panel-style1 .top > div:has(> h1) { padding-left: 13px; border-left: 4px solid var(--section); }
.panel-style1 .top .crumbs { margin-bottom: 3px; }
.panel-style1 .side .nav a > .icon { color: color-mix(in srgb, var(--section) 65%, #c2d1e1); }
.panel-style1 .side .nav a.active { background: color-mix(in srgb, var(--section) 19%, #141e28); color: #f0f6fb; box-shadow: inset 3px 0 var(--section); }
.panel-style1 .side .nav a.active > .icon { color: color-mix(in srgb, var(--section) 55%, white); }
.panel-style1 .side .logo { background: linear-gradient(135deg,#197f89,#5368b5); color: white; border: 0; }
.panel-style1 .card > h2 > .icon { color: var(--section); background: color-mix(in srgb, var(--section) 10%, var(--surface)); border-radius: 8px; padding: 6px; width: 30px; height: 30px; }

/* The overview is a status board, with larger totals and six distinct resources. */
.panel-style1 .view:has(> .hero) { display: block; }
.panel-style1 .view > .hero { display: grid; grid-template-columns: 104px minmax(0,1fr); align-items: center; gap: 24px; height: auto; padding: 24px; border-color: color-mix(in srgb,var(--teal) 26%,var(--border)); background: linear-gradient(115deg,color-mix(in srgb,var(--teal) 8%,var(--surface)),var(--surface) 65%); box-shadow: inset 4px 0 var(--teal), var(--shadow); }
.panel-style1 .view > .hero[data-level="warning"] { border-color: var(--warning); box-shadow: inset 4px 0 var(--warning), var(--shadow); }
.panel-style1 .view > .hero[data-level="critical"] { border-color: var(--critical); box-shadow: inset 4px 0 var(--critical), var(--shadow); }
.panel-style1 .view > .hero .ring { width: 104px; height: 104px; }
.panel-style1 .view > .hero .ring .center b { font-size: 27px; letter-spacing: -1px; }
.panel-style1 .view > .hero h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.03em; margin-bottom: 7px; }
.panel-style1 .hero > div:last-child > .muted { min-height: 0; font-size: 13px; }
.panel-style1 .view > .hero .chips { margin: 18px 0 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.panel-style1 .view > .hero .chip { --tile: var(--blue); display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 5px; padding: 10px 12px; border: 1px solid color-mix(in srgb,var(--tile) 17%,var(--border)); background: color-mix(in srgb,var(--tile) 6%,var(--surface)); border-radius: 10px; }
.panel-style1 .view > .hero .chip:nth-child(2) { --tile: var(--violet); }
.panel-style1 .view > .hero .chip:nth-child(3) { --tile: var(--cyan); }
.panel-style1 .view > .hero .chip:nth-child(4) { --tile: var(--blue); }
.panel-style1 .view > .hero .chip:nth-child(5) { --tile: var(--teal); }
.panel-style1 .chip-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.panel-style1 .view > .hero .chip b { font-size: 25px; line-height: 1.25; font-weight: 700; color: var(--tile); margin: 0; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.panel-style1 .view > .hero .chip[data-level="critical"] { --tile: var(--critical-text); background: var(--critical-bg); }
.panel-style1 .view > .hero .chip[data-level="warning"] { --tile: var(--warning-text); background: var(--warning-bg); }
.panel-style1 .view > .hero .problems { margin-left: 0; }
.panel-style1 .view > .hero + div { margin-top: 18px !important; }
.panel-style1 .view > .hero + div .kpis { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.panel-style1 .overview-note { max-width: 1050px; line-height: 1.6; }

/* Numbers have visual weight. Labels and explanations keep the Style 1 typeface. */
.panel-style1 .kpi { --tile: var(--section); border-top: 3px solid var(--tile); padding: 13px 15px 0; background: linear-gradient(150deg,color-mix(in srgb,var(--tile) 7%,var(--surface)),var(--surface) 80%); }
.panel-style1 .kpi:nth-child(2) { --tile: var(--violet); }
.panel-style1 .kpi:nth-child(3) { --tile: var(--cyan); }
.panel-style1 .kpi:nth-child(4) { --tile: var(--amber); }
.panel-style1 .kpi:nth-child(5) { --tile: var(--teal); }
.panel-style1 .kpi:nth-child(6) { --tile: var(--blue); }
.panel-style1 .kpi[data-metric="cpu"] { --tile: var(--blue); }
.panel-style1 .kpi[data-metric="mem"] { --tile: var(--violet); }
.panel-style1 .kpi[data-metric="disk"] { --tile: var(--amber); }
.panel-style1 .kpi[data-metric="swap"] { --tile: var(--pink); }
.panel-style1 .kpi[data-metric="load"] { --tile: var(--teal); }
.panel-style1 .kpi[data-metric="net"] { --tile: var(--cyan); }
.panel-style1 .kpi .label { color: var(--text-2); font-size: 12px; font-weight: 550; }
.panel-style1 .kpi .label > .icon { color: var(--tile); }
.panel-style1 .kpi .value { color: var(--tile); font-size: 34px; line-height: 1.25; letter-spacing: -.045em; font-weight: 700; margin-top: 8px; }
.panel-style1 .kpi .value.sm { font-size: 21px; line-height: 1.5; letter-spacing: -.025em; }
.panel-style1 .kpi:not(:has(.spark)) { padding-bottom: 16px; }
.panel-style1 .kpi .sub { color: var(--text-2); margin-top: 4px; }
.panel-style1 .kpi .meter i { background: var(--tile); }
.panel-style1 .kpi[data-level="warning"], .panel-style1 .kpi:has(.up-warning) { --tile: var(--warning-text); background: linear-gradient(140deg,var(--warning-bg),var(--surface)); }
.panel-style1 .kpi[data-level="critical"], .panel-style1 .kpi:has(.up-critical) { --tile: var(--critical-text); background: linear-gradient(140deg,var(--critical-bg),var(--surface)); }
.panel-style1 .kpi:has(.up-ok) { --tile: var(--good-text); }
.panel-style1 .server-chart { border-top: 3px solid var(--blue); }
.panel-style1 #server-chart-mem { border-top-color: var(--violet); }
.panel-style1 #server-chart-net { border-top-color: var(--cyan); }
.panel-style1 #server-chart-disk { border-top-color: var(--amber); }
.panel-style1 #server-chart-swap { border-top-color: var(--pink); }
.panel-style1 #server-chart-load { border-top-color: var(--teal); }

/* Project identity repeats between its overview row, card, and Telegram bot. */
.panel-style1 [data-project] { --project: var(--blue); }
.panel-style1 [data-project*="assistant"] { --project: var(--violet); }
.panel-style1 [data-project*="teamlead"] { --project: var(--blue); }
.panel-style1 [data-project*="knowledge"] { --project: var(--cyan); }
.panel-style1 [data-project*="support"], .panel-style1 [data-project*="welcome"] { --project: var(--pink); }
.panel-style1 [data-project*="export"], .panel-style1 [data-project*="postman"] { --project: var(--amber); }
.panel-style1 [data-project*="auth"], .panel-style1 [data-project*="neuro"] { --project: var(--teal); }
.panel-style1 .pcard { background: linear-gradient(130deg,color-mix(in srgb,var(--project) 7%,var(--surface)),var(--surface) 65%); border-top: 3px solid var(--project); }
.panel-style1 .pcard h3 > span:first-child { color: var(--project); }
.panel-style1 .pcard .nums b { font-size: 20px; line-height: 1.4; }
.panel-style1 .pcard .foot { background: color-mix(in srgb,var(--project) 5%,var(--surface)); margin: 16px -24px -24px; padding: 12px 24px; }
.panel-style1 .prow:not(.phead):nth-child(2n) { background: color-mix(in srgb,var(--project) 3%,var(--surface)); }
.panel-style1 .prow .t b { color: var(--project); }
.panel-style1 .prow .c b { font-size: 15px; }

/* Bot table stays compact: colored totals, project glyphs, and receiver column. */
.panel-style1 .bots-table-view > .kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; padding: 0; }
.panel-style1 .bots-table-view .bot-kpi { --tile: var(--blue); padding: 9px 12px; border: 1px solid color-mix(in srgb,var(--tile) 20%,var(--border)); border-top: 3px solid var(--tile); border-radius: 10px; background: color-mix(in srgb,var(--tile) 7%,var(--surface)); gap: 8px; min-width: 0; }
.panel-style1 .bots-table-view .bot-kpi:nth-child(2) { --tile: var(--cyan); }
.panel-style1 .bots-table-view .bot-kpi:nth-child(3) { --tile: var(--teal); }
.panel-style1 .bots-table-view .bot-kpi:nth-child(4) { --tile: var(--good-text); }
.panel-style1 .bots-table-view .bot-kpi.bot-kpi-alert { --tile: var(--warning-text); background: var(--warning-bg); }
.panel-style1 .bots-table-view .bot-kpi .label { font-size: 12px; line-height: 17px; color: var(--text-2); }
.panel-style1 .bots-table-view .bot-kpi .value { font-size: 28px; line-height: 32px; color: var(--tile); font-weight: 700; white-space: nowrap; }
.panel-style1 .bot-row-avatar { background: color-mix(in srgb,var(--project) 12%,var(--surface)); color: var(--project); }
.panel-style1 .bot-table thead th { background: color-mix(in srgb,var(--cyan) 7%,var(--surface)); color: var(--text-2); }
.panel-style1 .bot-table-row:nth-child(4n+1) { background: color-mix(in srgb,var(--cyan) 2.5%,var(--surface)); }
.panel-style1 .bot-table-row > .bot-table-receive { background: color-mix(in srgb,var(--teal) 4%,var(--surface)); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.panel-style1 .bot-table-count { color: var(--cyan); font-weight: 650; }
.panel-style1 .bot-table-row[data-level="warning"] > * { background: var(--warning-bg); }
.panel-style1 .bot-table-row[data-level="critical"] > * { background: var(--critical-bg); }
.panel-style1 .bot-table-row[data-level="warning"] > th { box-shadow: inset 3px 0 var(--warning); }
.panel-style1 .bot-table-row[data-level="critical"] > th { box-shadow: inset 3px 0 var(--critical); }
.panel-style1 .bot-table-row:hover > * { background: color-mix(in srgb,var(--cyan) 7%,var(--surface)); }
.panel-style1 .bot-table-row[data-level="warning"]:hover > * { background: var(--warning-bg); }
.panel-style1 .bot-table-row[data-level="critical"]:hover > * { background: var(--critical-bg); }

/* Tables differ by the task: archival ledger, endpoint checks, capacity, operations. */
.panel-style1 table.data thead th { background: color-mix(in srgb,var(--section) 8%,var(--surface)); color: var(--text-2); padding-top: 10px; padding-bottom: 10px; }
.panel-style1 table.data tbody tr:nth-child(even) > td { background: color-mix(in srgb,var(--section) 2.5%,var(--surface)); }
.panel-style1 table.data tbody tr:hover > td { background: color-mix(in srgb,var(--section) 7%,var(--surface)); }
.panel-style1 :is(.backups-page,.services-page) table.data tr[data-level="critical"] > td { background: var(--critical-bg); }
.panel-style1 :is(.backups-page,.services-page) table.data tr[data-level="warning"] > td { background: var(--warning-bg); }
.panel-style1 table.data tr[data-level="critical"] > td:first-child { box-shadow: inset 3px 0 var(--critical); }
.panel-style1 table.data tr[data-level="warning"] > td:first-child { box-shadow: inset 3px 0 var(--warning); }
.panel-style1 .backup-targets { border-top: 3px solid var(--blue); }
.panel-style1 .backup-targets table.data td:nth-child(6) { background: color-mix(in srgb,var(--teal) 6%,var(--surface)); }
.panel-style1 .backup-targets table.data td:nth-child(4) { font-size: 16px; font-weight: 600; }
.panel-style1 .backup-targets tr[data-target="server"] > td { border-top: 2px solid color-mix(in srgb,var(--blue) 30%,var(--border)); background: color-mix(in srgb,var(--blue) 7%,var(--surface)); }
.panel-style1 .sites-page table.data { border-collapse: separate; border-spacing: 0 7px; }
.panel-style1 .sites-page table.data td { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.panel-style1 .sites-page table.data td:first-child { border-left: 1px solid var(--border); border-radius: 10px 0 0 10px; }
.panel-style1 .sites-page table.data td:last-child { border-right: 1px solid var(--border); border-radius: 0 10px 10px 0; }
.panel-style1 .sites-page .certificate-cell b { font-size: 20px; color: var(--good-text); }
.panel-style1 .sites-page .certificate-cell[data-level="warning"] b { color: var(--warning-text); }
.panel-style1 .sites-page .certificate-cell[data-level="critical"] b { color: var(--critical-text); }
.certificate-cell .hbar { width: 90px; height: 4px; border-radius: 3px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.certificate-cell .hbar i { display: block; height: 100%; background: var(--good); border-radius: inherit; }
.certificate-cell[data-level="warning"] .hbar i { background: var(--warning); }
.certificate-cell[data-level="critical"] .hbar i { background: var(--critical); }
.panel-style1 .disk-page .stackbar { height: 28px; border-radius: 8px; }
.panel-style1 .disk-page .hbar { height: 9px; border-radius: 5px; }
.panel-style1 .disk-page table.data td.num { font-size: 16px; font-weight: 600; }
.panel-style1 .services-page table.data { font-size: 13px; }
.panel-style1 .services-page table.data td { padding-top: 9px; padding-bottom: 9px; }
.panel-style1 .services-page table.data tr[data-level="ok"] > td:first-child { box-shadow: inset 3px 0 var(--good); }
.panel-style1 .services-page table.data tr[data-level="idle"] > td:first-child { box-shadow: inset 3px 0 var(--border); }
.panel-style1 .journal-page table.data td:first-child { border-left: 3px solid var(--border); background: var(--surface-2); font-size: 12px; }
.panel-style1 .journal-page table.data tr[data-level="ok"] > td:first-child { border-left-color: var(--good); }
.panel-style1 .journal-page table.data tr[data-level="warning"] > td:first-child { border-left-color: var(--warning); box-shadow: none; }
.panel-style1 .journal-page table.data tr[data-level="critical"] > td:first-child { border-left-color: var(--critical); box-shadow: none; }
.panel-style1 .uptime-page .urow { padding: 13px 10px; border-radius: 8px; }
.panel-style1 .uptime-page .urow:nth-child(even) { background: color-mix(in srgb,var(--teal) 4%,var(--surface)); }
.panel-style1 .uptime-page .pctv { font-size: 22px; letter-spacing: -.035em; }
.panel-style1 .security-page > .grid > .card { border-top: 3px solid color-mix(in srgb,var(--pink) 50%,var(--border)); }
.panel-style1 :is(.problems li.critical,.problems li.warning) { border-left: 3px solid; }
.panel-style1 .problems li.critical { border-left-color: var(--critical); }
.panel-style1 .problems li.warning { border-left-color: var(--warning); }
.panel-style1 :is(a,button,input,select,summary):focus-visible { outline: 2px solid var(--section); outline-offset: 3px; }

@media (min-width: 1351px) {
  .panel-style1 .view > .g-main { margin-top: 22px !important; }
}
@media (max-width: 1200px) {
  .panel-style1 .view > .hero { grid-template-columns: 90px minmax(0,1fr); gap: 18px; }
  .panel-style1 .view > .hero .ring { width: 90px; height: 90px; }
  .panel-style1 .view > .hero .chip { padding: 9px; }
  .panel-style1 .view > .hero .chip b { font-size: 22px; }
  .panel-style1 .view > .hero + div .kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .panel-style1 .top h1 { font-size: 24px; line-height: 30px; }
  .panel-style1 .top .crumbs { margin-bottom: 3px; }
  .panel-style1 .kpi .value { font-size: 30px; }
  .panel-style1 .view > .hero { padding: 18px; }
  .panel-style1 .view > .hero .chip { min-height: 70px; }
  .panel-style1 .pcard .foot { margin: 14px -16px -16px; padding: 10px 16px; }
}
@media (max-width: 600px) {
  .panel-style1 .view > .hero { grid-template-columns: 72px minmax(0,1fr); gap: 14px; }
  .panel-style1 .view > .hero .ring { width: 72px; height: 72px; }
  .panel-style1 .view > .hero .ring .center b { font-size: 20px; }
  .panel-style1 .view > .hero h2 { font-size: 21px; }
  .panel-style1 .view > .hero .chips { margin: 20px 0 0 -86px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel-style1 .view > .hero .chip:last-child { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; min-height: 52px; }
  .panel-style1 .view > .hero .problems { margin-left: -86px; }
  .panel-style1 .view > .hero + div .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .panel-style1 .bots-table-view > .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .panel-style1 .bots-table-view .bot-kpi { border-left: 1px solid var(--border); padding: 9px 10px; }
  .panel-style1 .bots-table-view .bot-kpi:nth-child(odd) { border-left: 1px solid var(--border); padding-left: 10px; }
  .panel-style1 .bots-table-view .bot-kpi .value { font-size: 26px; }
  .panel-style1 .bots-table-view .bot-kpi .label { font-size: 12px; }
  .panel-style1 .kpi .value.sm { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel-style1 *, .panel-style1 *::before, .panel-style1 *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Keep twelve rows on a 1280 × 720 display after enlarging the totals. */
.panel-style1 .bots-table-view .bot-kpi:first-child { padding-left: 12px; }
.panel-style1 .bot-table-row > td, .panel-style1 .bot-table-row > th { height: 38px; }
.panel-style1 .bots-table-view .bot-kpi[data-level="warning"] { --tile: var(--warning-text); background: var(--warning-bg); }
.panel-style1 .bots-table-view .bot-kpi[data-level="critical"] { --tile: var(--critical-text); background: var(--critical-bg); }

/* Give project totals room for a value and its unit without splitting them. */
.panel-style1 .pcard .nums { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 20px; }
.panel-style1 .pcard .nums b { font-size: 21px; white-space: nowrap; }
.panel-style1 .bot-card .bot-avatar { color: var(--project); background: color-mix(in srgb,var(--project) 12%,var(--surface)); }

/* Keep the mobile status ring above the full-width summary tiles. */
@media (max-width: 600px) {
 .panel-style1 .view > .hero { align-items: start; }
 .panel-style1 .view > .hero .ring-stat { align-self: start; }
}

/* Mobile hero uses actual grid rows, so the ring and its caption reserve space. */
@media (max-width: 600px) {
 .panel-style1 .view > .hero > div:last-child { display: contents; }
 .panel-style1 .view > .hero .ring-stat { grid-column: 1; grid-row: 1 / span 2; }
 .panel-style1 .view > .hero > div:last-child > h2 { grid-column: 2; grid-row: 1; margin: 0; }
 .panel-style1 .view > .hero > div:last-child > .muted { grid-column: 2; grid-row: 2; min-height: 0; }
 .panel-style1 .view > .hero .chips { grid-column: 1 / -1; grid-row: 3; margin: 0; }
 .panel-style1 .view > .hero > div:last-child > .overview-detail { grid-column: 1 / -1; grid-row: 4; margin: 0; }
 .panel-style1 .view > .hero .problems { grid-column: 1 / -1; grid-row: 5; margin: 0; }
}
