/* Trung tâm VPS — giao diện điều hành máy chủ */
:root {
  --accent: #6366f1;
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --text: #0f172a;
  --muted: #5b6b82;
  --line: #e1e7ef;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --bad: #c62828;
  --bad-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #dbeafe;
  --grey-bar: #d5dce6;
  --term-bg: #0b1220;
  --term-text: #cfe0f5;
  --term-dim: #6c7f99;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 20px rgba(15, 23, 42, .06);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Be Vietnam Pro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080c14; --panel: #0f1622; --panel-2: #0b111b; --text: #e3ebf6; --muted: #8597b0; --line: #1c2738;
    --ok: #4ade80; --ok-bg: #0f2a1b; --warn: #fbbf24; --warn-bg: #2d220a; --bad: #f87171; --bad-bg: #2f1214;
    --info: #60a5fa; --info-bg: #0f213d; --grey-bar: #243246; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080c14; --panel: #0f1622; --panel-2: #0b111b; --text: #e3ebf6; --muted: #8597b0; --line: #1c2738;
  --ok: #4ade80; --ok-bg: #0f2a1b; --warn: #fbbf24; --warn-bg: #2d220a; --bad: #f87171; --bad-bg: #2f1214;
  --info: #60a5fa; --info-bg: #0f213d; --grey-bar: #243246; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hide { display: none !important; }

/* ---------- Khung ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--panel); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; flex: none; }
.logo b { display: block; font-size: 15px; }
.logo span { font-size: 12px; color: var(--muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); }
.nav a.on svg { color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 17px; }
.top .grow { flex: 1; }
.host { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.view { padding: 22px 24px 60px; max-width: 1400px; width: 100%; }
.mobile-nav { display: none; }

/* ---------- Thành phần ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.card > h2, .card-h h2 { font-size: 15px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h .grow { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.tile .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile .v { font: 600 22px/1.2 var(--mono); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 99px; background: var(--grey-bar); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .5s; }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }
.spark { width: 100%; height: 30px; display: block; margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; }
.input { border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 7px 10px; min-width: 0; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
textarea.input { width: 100%; resize: vertical; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 11px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.pill.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.chip { display: inline-block; font: 12px var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); margin: 2px 4px 2px 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes rot { to { transform: rotate(360deg); } }
.note { padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Sơ đồ hạ tầng ---------- */
.topo-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; margin-bottom: 16px; }
.topo { width: 100%; height: auto; display: block; }
.topo .edge { fill: none; stroke: var(--line); stroke-width: 2; }
.topo .edge.on { stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.topo .edge.off { stroke-dasharray: 4 5; stroke: var(--bad); opacity: .5; }
.topo .node rect { fill: var(--panel-2); stroke: var(--line); stroke-width: 1.5; }
.topo .node.up rect { stroke: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.topo .node.down rect { stroke: var(--bad); fill: var(--bad-bg); }
.topo .node.self rect { stroke: var(--accent); stroke-width: 2.5; }
.topo .node.flash rect { animation: flash .6s; }
@keyframes flash { 0% { fill: color-mix(in srgb, var(--accent) 30%, var(--panel-2)); } 100% { fill: var(--panel-2); } }
.topo text { fill: var(--text); font-family: var(--sans); font-size: 14.5px; font-weight: 500; }
.topo .t2 { fill: var(--muted); font-size: 11.5px; font-family: var(--mono); font-weight: 400; }
.topo .col-t { fill: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.topo .sdot.up { fill: var(--ok); }
.topo .sdot.down { fill: var(--bad); }
.topo .sdot.idle { fill: var(--muted); }
.topo .pkt { filter: drop-shadow(0 0 4px currentColor); }
.topo .node { cursor: default; }
.feed { display: flex; flex-direction: column; min-height: 0; }
.feed-list { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 2px; font: 12px/1.4 var(--mono); max-height: 440px; }
.feed-row { display: grid; grid-template-columns: 56px 36px minmax(0, 1fr) 30px 44px; gap: 6px; padding: 4px 6px; border-radius: 6px; align-items: center; }
.feed-row.new { animation: slidein .35s ease-out; background: color-mix(in srgb, var(--accent) 10%, transparent); }
@keyframes slidein { from { transform: translateY(-8px); opacity: 0; } }
.feed-row .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row .m { font-weight: 700; color: var(--info); }
.s2 { color: var(--ok); } .s3 { color: var(--info); } .s4 { color: var(--warn); } .s5 { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Tiến trình ---------- */
.procs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proc { display: flex; flex-direction: column; gap: 10px; }
.proc.self { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.proc-h { display: flex; align-items: center; gap: 10px; }
.proc-h h3 { font: 600 16px var(--mono); }
.proc-h .grow { flex: 1; }
.proc-m { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.proc-m .k { font-size: 11.5px; color: var(--muted); }
.proc-m .v { font: 600 15px var(--mono); }
.proc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.proc.stopped { opacity: .85; }
.proc.stopped .proc-h h3 { color: var(--muted); }

/* ---------- Terminal / Log ---------- */
.term { background: var(--term-bg); color: var(--term-text); border-radius: 12px; font: 12.5px/1.55 var(--mono); padding: 14px 16px; overflow: auto; height: calc(100vh - 250px); min-height: 360px; white-space: pre-wrap; word-break: break-word; border: 1px solid #1b2a40; }
.term .ln { display: block; }
.term .out { white-space: pre; overflow-x: auto; }
.term .err { color: #ff8b8b; }
.term .warnl { color: #ffd479; }
.term .dim { color: var(--term-dim); }
.term .ts { color: #7aa2d6; }
.term .hl { background: #f5c54255; color: #fff; border-radius: 2px; }
.term .prompt { color: #7ee2a8; }
.term .cmd { color: #fff; }
.term .blocked { color: #ff8b8b; }
.term-input { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.term-input input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font: inherit; padding: 0; min-width: 0; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.term-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.cmd-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 250px); overflow: auto; }
.cmd-list button { text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.cmd-list button:hover { border-color: var(--accent); }
.cmd-list code { display: block; font-size: 12px; color: var(--text); }
.cmd-list span { font-size: 11.5px; color: var(--muted); }

/* ---------- Mạng ---------- */
.net-map { display: grid; grid-template-columns: 170px 90px minmax(0, 1fr); gap: 0; align-items: stretch; }
.zone { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; background: var(--panel-2); }
.zone h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 10px; }
.shield { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 11.5px; color: var(--muted); position: relative; }
.shield::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; transform: translateX(-50%); border-radius: 4px; background: repeating-linear-gradient(180deg, var(--accent) 0 10px, transparent 10px 16px); opacity: .55; }
.shield .ico { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 12px; background: var(--panel); border: 2px solid var(--accent); display: grid; place-items: center; color: var(--accent); }
.shield .lbl { position: relative; z-index: 1; background: var(--panel); padding: 2px 6px; border-radius: 6px; }
.ports { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.port { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 10px; position: relative; overflow: hidden; }
.port::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted); }
.port.allow::before, .port.limit::before { background: var(--ok); }
.port.deny::before { background: var(--bad); }
.port.open::before { background: var(--warn); }
.port.local::before { background: var(--info); }
.port b { font: 700 16px var(--mono); }
.port .svc { font-size: 12.5px; }
.port .fw { font-size: 11px; margin-top: 4px; }
.lat { display: grid; grid-template-columns: 130px minmax(0, 1fr) 60px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }

/* ---------- Website & SSL ---------- */
.sites { display: grid; gap: 16px; }
.site-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-h h3 { font: 600 17px var(--mono); }
.site-h .grow { flex: 1; }
.grade { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font: 800 22px var(--sans); color: #fff; background: var(--muted); flex: none; }
.grade.A { background: #16a34a; } .grade.B { background: #65a30d; } .grade.C { background: #ca8a04; } .grade.D { background: #ea580c; } .grade.F { background: #dc2626; }
.site-b { display: grid; grid-template-columns: 220px repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.site-b h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ring { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .c b { font: 700 30px/1 var(--mono); display: block; }
.ring .c span { font-size: 11.5px; color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; }
.checks .y { color: var(--ok); font-weight: 700; }
.checks .n { color: var(--bad); font-weight: 700; }
.checks .w { color: var(--warn); font-weight: 700; }
.chain { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.chain div { padding: 4px 8px; border-left: 3px solid var(--accent); background: var(--panel-2); border-radius: 4px; }

/* ---------- Trạng thái ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 12px; color: #fff; font-weight: 600; font-size: 17px; margin-bottom: 18px; box-shadow: var(--shadow); }
.banner.ok { background: linear-gradient(135deg, #15803d, #22a06b); }
.banner.degraded { background: linear-gradient(135deg, #b45309, #d9a400); }
.banner.partial { background: linear-gradient(135deg, #c2410c, #e8590c); }
.banner.major { background: linear-gradient(135deg, #b91c1c, #e03131); }
.banner.maintenance { background: linear-gradient(135deg, #1d4ed8, #1c7ed6); }
.banner .grow { flex: 1; }
.banner small { display: block; font-weight: 400; opacity: .9; font-size: 13px; }
.comp { padding: 14px 0; border-bottom: 1px solid var(--line); }
.comp:last-child { border-bottom: 0; }
.comp-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comp-h b { font-weight: 600; }
.comp-h .grow { flex: 1; }
.bars { display: flex; gap: 2px; height: 34px; align-items: stretch; overflow: hidden; }
.bars i { flex: 1 1 0; border-radius: 3px; background: var(--grey-bar); min-width: 0; cursor: pointer; transition: transform .15s; }
.bars i:hover { transform: scaleY(1.12); }
.bars i.u { background: #22a06b; }
.bars i.p { background: #d9a400; }
.bars i.d { background: #e03131; }
.bars-f { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 6px 9px; border-radius: 6px; max-width: 240px; box-shadow: var(--shadow); }
.inc { border-left: 3px solid var(--warn); padding: 4px 0 4px 14px; margin-bottom: 18px; }
.inc.major { border-color: var(--bad); }
.inc.maintenance { border-color: var(--info); }
.inc.done { border-color: var(--ok); }
.inc h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upd { margin-top: 8px; font-size: 13px; }
.upd b { font-weight: 600; }
.upd .t { color: var(--muted); font-size: 12px; }
.group-t { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 2px; font-weight: 600; }
.group-t:first-child { margin-top: 0; }

/* ---------- Hộp thoại & thông báo ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5, 10, 20, .55); display: grid; place-items: center; z-index: 40; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: min(480px, 100%); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 17px; margin-bottom: 8px; }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.modal label { display: block; font-size: 12.5px; color: var(--muted); margin: 10px 0 4px; }
.modal .input { width: 100%; }
.checkset { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; max-height: 180px; overflow: auto; }
.checkset label { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--text); }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 9px; font-size: 13px; box-shadow: var(--shadow); animation: fade .2s; max-width: 90vw; }
.toast.bad { background: var(--bad); color: #fff; }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.lock.open { border-color: var(--warn); color: var(--warn); }
.lock svg { width: 14px; height: 14px; }

/* ---------- Trang trạng thái công khai ---------- */
.status-page { max-width: 860px; margin: 0 auto; padding: 28px 16px 60px; }
.sp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.sp-head h1 { font-size: 20px; }
.sp-head .grow { flex: 1; }
.chart { width: 100%; height: 150px; display: block; }
.chart .area { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--mono); }

@media (max-width: 1200px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topo-wrap { grid-template-columns: minmax(0, 1fr); }
  .feed-list { max-height: 300px; }
  .site-b { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) { .bars { gap: 1px; height: 30px; } .bars i { border-radius: 1px; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 6; scrollbar-width: none; }
  .mobile-nav a { white-space: nowrap; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
  .mobile-nav a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
  .top { position: static; padding: 12px 16px; flex-wrap: wrap; }
  .view { padding: 16px 16px 50px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term-layout { grid-template-columns: minmax(0, 1fr); }
  .cmd-list { max-height: 220px; }
  .term { height: 60vh; }
  .net-map { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .shield { flex-direction: row; padding: 8px 0; }
  .shield::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 4px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 16px); }
  .site-b { grid-template-columns: minmax(0, 1fr); }
  .feed-row { grid-template-columns: 50px 40px minmax(0, 1fr) 30px 40px; }
  #topo { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .topo { min-width: 760px; }
  .host .hide-sm { display: none; }
}
.disk-row:hover { background: var(--panel-2) !important; }
.disk-row .pill { font-size: 11px; padding: 1px 7px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.adm-card { display: flex; flex-direction: column; }
.adm-card .adm-list { flex: 1; }
.adm-server { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.adm-head { display: flex; align-items: center; gap: 12px; }
.adm-head h2 { font-size: 16px; }
.adm-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.adm-server .adm-ico { background: var(--warn-bg); color: var(--warn); }
.adm-ico svg { width: 20px; height: 20px; }
.adm-card [data-add] { align-self: flex-start; }
