/* ═══════════════════════════════════════════════════════════════
   lbrust console — dark futuristic theme
   Bootstrap di-override total; efek: glass, glow, animasi halus
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --panel: rgba(17, 25, 42, .72);
  --panel-solid: #111a2b;
  --line: rgba(148, 163, 184, .14);
  --line-strong: rgba(148, 163, 184, .28);
  --txt: #e6edf7;
  --mut: #8b9bb4;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --green: #34d399;
  --rose: #fb7185;
  --amber: #fbbf24;
  --grad: linear-gradient(135deg, #22d3ee, #a78bfa);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --radius: 16px;
}

* { scrollbar-width: thin; scrollbar-color: #26364f transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #26364f; border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: transparent; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(167, 139, 250, .13), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, .10), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px;
  min-height: 100vh;
}

/* garis grid halus di latar */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(148,163,184,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 85%);
}

.view { position: relative; z-index: 1; }

/* ── ikon ─────────────────────────────────────────────────────── */
.ico {
  width: 1em; height: 1em; flex: none;
  stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; fill: none;
  vertical-align: -.125em;
}
.ico .fill, symbol .fill { fill: currentColor; stroke: none; }

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  padding: .55rem 0;
  background: rgba(7, 11, 20, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.navbar .container-fluid { display: flex; align-items: center; gap: 1rem; width: 100%; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(34, 211, 238, .45), 0 0 34px rgba(167, 139, 250, .25);
  color: #04121c;
}
.brand-mark .ico { width: 20px; height: 20px; stroke-width: 1.8; }
.brand-mark .fill { fill: #04121c; }
.brand-mark.big { width: 52px; height: 52px; border-radius: 15px; }
.brand-mark.big .ico { width: 30px; height: 30px; }
.brand-name {
  font-weight: 800; font-size: 1.15rem; letter-spacing: .02em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-ver {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em;
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .3);
  padding: .1rem .4rem; border-radius: 999px;
}

.nav-pills { display: flex; gap: .35rem; margin-left: .8rem; }
.nav-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; border: 1px solid transparent;
  color: var(--mut); font-weight: 600; font-size: .86rem;
  padding: .45rem .9rem; border-radius: 999px; cursor: pointer;
  transition: all .18s ease;
}
.nav-pill .ico { width: 15px; height: 15px; }
.nav-pill:hover { color: var(--txt); background: rgba(148, 163, 184, .1); }
.nav-pill.active {
  color: #04121c; background: var(--grad);
  box-shadow: 0 4px 18px rgba(34, 211, 238, .35);
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: .7rem; }

.live-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  color: var(--green); background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .3);
  padding: .3rem .65rem; border-radius: 999px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.nav-clock { color: var(--mut); font-weight: 600; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; margin-left: .15rem; }

.nav-meta { color: var(--mut); font-size: .78rem; font-variant-numeric: tabular-nums; }

.btn-ghost {
  background: rgba(148, 163, 184, .08);
  border: 1px solid var(--line-strong);
  color: var(--txt); font-weight: 600; font-size: .82rem;
  padding: .42rem .95rem; border-radius: 10px; cursor: pointer;
  transition: all .18s ease;
}
.btn-ghost:hover { background: rgba(251, 113, 133, .14);
  border-color: rgba(251, 113, 133, .5); color: var(--rose); }
.btn-ghost.dark { background: transparent; }
.btn-outline {
  display: inline-flex; align-items: center; gap: .45rem;
  background: transparent; border: 1px solid rgba(34, 211, 238, .45);
  color: var(--cyan); font-weight: 700; font-size: .85rem;
  padding: .5rem 1.05rem; border-radius: 11px; cursor: pointer;
  transition: all .18s ease;
}
.btn-outline:hover { background: rgba(34, 211, 238, .12);
  box-shadow: 0 0 18px rgba(34, 211, 238, .25); }
.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--grad); border: 0;
  color: #04121c; font-weight: 800; font-size: .88rem;
  padding: .55rem 1.2rem; border-radius: 11px; cursor: pointer;
  box-shadow: 0 6px 22px rgba(34, 211, 238, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-accent:hover { transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(167, 139, 250, .4); }
.btn-accent:active { transform: translateY(0); }

.btn-restart {
  display: inline-flex; align-items: center; gap: .45rem;
  background: linear-gradient(135deg, rgba(251,113,133,.18), rgba(244,63,94,.28));
  border: 1px solid rgba(251, 113, 133, .5);
  color: #fda4af; font-weight: 700; font-size: .85rem;
  padding: .5rem 1.05rem; border-radius: 11px; cursor: pointer;
  transition: all .18s ease;
}
.btn-restart:hover {
  background: linear-gradient(135deg, rgba(251,113,133,.3), rgba(244,63,94,.42));
  color: #fff; box-shadow: 0 0 20px rgba(251, 113, 133, .35);
}
.btn-restart .ico { width: 15px; height: 15px; }

/* ═══════════════ LOGIN ═══════════════ */
#view-login {
  min-height: 100vh; display: grid; place-items: center;
  overflow: hidden; padding: 1.5rem;
}
.orbs { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.o1 { width: 420px; height: 420px; background: #164e63; top: -120px; left: -100px;
  animation: drift 16s ease-in-out infinite alternate; }
.o2 { width: 380px; height: 380px; background: #4c1d95; bottom: -110px; right: -90px;
  animation: drift 19s ease-in-out infinite alternate-reverse; }
.o3 { width: 260px; height: 260px; background: #0e7490; bottom: 30%; left: 55%;
  animation: drift 14s ease-in-out infinite alternate; opacity: .35; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.15); }
}

.login-wrap { position: relative; z-index: 2; width: 100%; max-width: 400px; }
.login-card {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 2.2rem 2rem 1.6rem;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: rise .5s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.login-head { text-align: center; margin-bottom: 1.6rem; }
.login-head .brand-mark { margin: 0 auto .9rem;
  animation: glow 3.5s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 18px rgba(34,211,238,.45), 0 0 34px rgba(167,139,250,.25); }
  50%      { box-shadow: 0 0 30px rgba(34,211,238,.75), 0 0 55px rgba(167,139,250,.5); }
}
.login-head h1 {
  font-size: 1.7rem; font-weight: 800; margin: 0;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-head p { color: var(--mut); font-size: .84rem; margin: .3rem 0 0;
  letter-spacing: .06em; text-transform: uppercase; }

.lbl { display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mut);
  margin-bottom: .45rem; }
.input-icon { position: relative; margin-bottom: 1.1rem; }
.input-icon .ico {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  color: var(--mut); width: 17px; height: 17px;
}
.input-icon .form-control { padding-left: 2.6rem; }

.form-control {
  background: rgba(7, 11, 20, .8);
  border: 1px solid var(--line-strong);
  border-radius: 11px; color: var(--txt);
  padding: .68rem .95rem; font-size: .95rem;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus {
  background: rgba(7, 11, 20, .95);
  color: var(--txt);
  border-color: rgba(34, 211, 238, .6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .15);
}
.form-control::placeholder { color: #55637b; }

#form-login .btn-accent { padding: .72rem; font-size: .95rem; }
.login-foot {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  margin-top: 1.3rem; color: #5f6f8a; font-size: .72rem;
}
#login-error { font-size: .85rem; border-radius: 10px; }

/* ═══════════════ HERO / HEADER VIEW ═══════════════ */
.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 1rem;
  margin: 1.4rem 0 1.2rem;
}
.hero-title {
  font-size: 1.55rem; font-weight: 800; margin: 0; letter-spacing: -.02em;
  background: linear-gradient(90deg, #e6edf7, #93c5fd 60%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--mut); font-size: .84rem; margin: .3rem 0 0; }
.hero-badges, .hero-actions { display: flex; gap: .55rem; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .76rem; font-weight: 700;
  background: rgba(34, 211, 238, .09);
  border: 1px solid rgba(34, 211, 238, .3);
  color: var(--cyan); padding: .38rem .75rem; border-radius: 999px;
}
.chip .ico { width: 13px; height: 13px; }
.chip.ghost { background: rgba(148, 163, 184, .07);
  border-color: var(--line-strong); color: var(--mut); }
.chip.c-warn { background: rgba(251, 191, 36, .1);
  border-color: rgba(251, 191, 36, .4); color: var(--amber); }
.chip.c-crit { background: rgba(251, 113, 133, .11);
  border-color: rgba(251, 113, 133, .45); color: var(--rose);
  animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, .35); }
  50% { box-shadow: 0 0 0 6px rgba(251, 113, 133, 0); }
}

/* ═══════════════ STAT CARDS ═══════════════ */
.stats-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  margin-bottom: 1.1rem;
}
.stat {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex; gap: .9rem; align-items: flex-start;
  backdrop-filter: blur(10px);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stat:hover { transform: translateY(-3px); border-color: var(--line-strong);
  box-shadow: var(--shadow); }
.stat::after { /* kilau diagonal */
  content: ""; position: absolute; top: 0; right: 0;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--tint, rgba(34,211,238,.16)), transparent 65%);
  transform: translate(35%, -45%); pointer-events: none;
}
.stat-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 19px;
  background: var(--tint, rgba(34, 211, 238, .14));
  color: var(--acc, var(--cyan));
  border: 1px solid var(--accb, rgba(34, 211, 238, .3));
}
.stat-body { min-width: 0; }
.stat-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mut); margin-bottom: .3rem;
}
.stat-value {
  font-size: 1.65rem; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: var(--acc, var(--txt));
  text-shadow: 0 0 24px var(--glow, transparent);
}
.stat-value.small { font-size: 1.02rem; font-weight: 700; color: var(--txt); }
.stat-sub { font-size: .7rem; color: #5f6f8a; margin-top: .3rem; }
.stat-spark {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--acc, var(--cyan)), transparent);
  opacity: .55;
}

.stat.c-cyan   { --acc: #22d3ee; --tint: rgba(34,211,238,.14);  --accb: rgba(34,211,238,.32);  --glow: rgba(34,211,238,.35); }
.stat.c-violet { --acc: #a78bfa; --tint: rgba(167,139,250,.14); --accb: rgba(167,139,250,.32); --glow: rgba(167,139,250,.4); }
.stat.c-green  { --acc: #34d399; --tint: rgba(52,211,153,.13);  --accb: rgba(52,211,153,.3);   --glow: rgba(52,211,153,.3); }
.stat.c-rose   { --acc: #fb7185; --tint: rgba(251,113,133,.13); --accb: rgba(251,113,133,.3);  --glow: rgba(251,113,133,.3); }
.stat.c-amber  { --acc: #fbbf24; --tint: rgba(251,191,36,.13);  --accb: rgba(251,191,36,.3);   --glow: rgba(251,191,36,.3); }
.stat.c-slate  { --acc: #94a3b8; --tint: rgba(148,163,184,.12); --accb: rgba(148,163,184,.3);  --glow: rgba(148,163,184,.25); }

.stat.glow { border-color: rgba(167, 139, 250, .35);
  box-shadow: 0 0 26px rgba(167, 139, 250, .14); }

/* ═══════════════ PANEL ═══════════════ */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
  overflow: hidden;
  animation: rise .45s cubic-bezier(.2, .8, .3, 1) both;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap;
  padding: .85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(148,163,184,.05), transparent);
}
.panel-head h2 {
  display: flex; align-items: center; gap: .5rem;
  font-size: .86rem; font-weight: 700; margin: 0; letter-spacing: .02em;
}
.panel-head h2 .ico { color: var(--cyan); width: 16px; height: 16px; }
.panel-body { padding: 1.1rem 1.15rem; }

.legend { font-size: .74rem; color: var(--mut); display: flex; align-items: center; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%;
  display: inline-block; margin-right: .35rem; }
.legend .dot.cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.legend .dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.legend .ml { margin-left: .9rem; }

.chart-box { position: relative; height: 260px; padding: .6rem .9rem .9rem; }
.hint { font-size: .76rem; color: var(--mut); line-height: 1.5; margin: 0 0 .9rem; }
.hint-inline { font-size: .72rem; color: #5f6f8a; }
.sub-head {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mut);
  margin: 1.2rem 0 .6rem; padding-top: .9rem; border-top: 1px dashed var(--line);
}

/* segmented control mode log */
.seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(7, 11, 20, .8); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 4px; isolation: isolate;
}
.seg-input { position: absolute; opacity: 0; pointer-events: none; }
.seg-btn {
  position: relative; z-index: 1; text-align: center;
  font-size: .82rem; font-weight: 700; color: var(--mut);
  padding: .5rem 0; border-radius: 9px; cursor: pointer;
  transition: color .2s ease;
}
.seg-thumb {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 9px;
  background: var(--grad);
  box-shadow: 0 4px 16px rgba(34, 211, 238, .35);
  transition: transform .25s cubic-bezier(.3, .9, .3, 1);
}
#mode-full:checked ~ .seg-thumb { transform: translateX(100%); }
#mode-compact:checked ~ .seg-btn[for="mode-compact"],
#mode-full:checked ~ .seg-btn[for="mode-full"] { color: #04121c; }

/* daftar frontend */
.fe-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.fe-list li {
  display: flex; align-items: center; gap: .55rem;
  background: rgba(7, 11, 20, .65);
  border: 1px solid var(--line); border-radius: 11px;
  padding: .55rem .75rem; font-size: .8rem;
  transition: border-color .18s;
}
.fe-list li:hover { border-color: rgba(34, 211, 238, .4); }
.fe-list code {
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  padding: .1rem .4rem; border-radius: 6px; font-size: .76rem; font-weight: 700;
}
.fe-list .arrow { color: #55637b; }
.fe-list .to { color: var(--txt); font-weight: 600; }
.fe-list .mode-tag {
  margin-left: auto; font-size: .64rem; font-weight: 800; letter-spacing: .08em;
  color: var(--violet); background: rgba(167, 139, 250, .12);
  border: 1px solid rgba(167, 139, 250, .3);
  padding: .12rem .45rem; border-radius: 999px; text-transform: uppercase;
}
.fe-list li.empty { color: #55637b; justify-content: center; border-style: dashed; }

/* ═══════════════ TABEL BACKEND ═══════════════ */
.table-wrap { overflow-x: auto; }
.fancy { --bs-table-bg: transparent; margin: 0; color: var(--txt); }
.fancy thead th {
  font-size: .66rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mut);
  background: rgba(7, 11, 20, .6);
  border-bottom: 1px solid var(--line-strong);
  padding: .7rem 1rem; white-space: nowrap;
}
.fancy tbody td {
  padding: .62rem 1rem; border-bottom: 1px solid var(--line);
  font-size: .85rem; vertical-align: middle; white-space: nowrap;
  /* timpa --bs-table-color Bootstrap (emphasis gelap) supaya angka terbaca */
  color: var(--txt);
}
.fancy tbody tr { transition: background .15s; }
.fancy tbody tr:hover { background: rgba(148, 163, 184, .05); }
.fancy .tr { text-align: right; }
.fancy .tc { text-align: center; }
.fancy code {
  color: #bfe3ff; background: rgba(56, 130, 246, .1);
  border: 1px solid rgba(56, 130, 246, .2);
  padding: .12rem .45rem; border-radius: 7px; font-size: .78rem;
}
.fancy tr.group td {
  background: linear-gradient(90deg, rgba(34, 211, 238, .1), rgba(167, 139, 250, .07));
  border-bottom: 1px solid rgba(34, 211, 238, .25);
  font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  padding-top: .75rem; padding-bottom: .75rem;
}
.fancy tr.group .gname { color: var(--cyan); }
.fancy tr.group .gmeta { color: var(--mut); font-weight: 600; font-size: .74rem; }
.fancy .muted { color: #55637b; }
.fancy .err-pos { color: var(--rose); font-weight: 700; }

/* angka kolom (Active/Total/Error/Bytes) — kontras tinggi, tabular */
.fancy td.num {
  color: #c4d2e8; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.fancy td.num.num-hot { color: var(--cyan); font-weight: 700; }
.fancy td.num.err-pos { color: var(--rose); font-weight: 700; }

/* byte in/out per server */
.fancy td.bytes { white-space: nowrap; }
.fancy td.bytes .bin { color: var(--green); font-weight: 600; }
.fancy td.bytes .bout { color: var(--violet); font-weight: 600; }
.fancy td.bytes .barrow { color: #4a5a75; margin: 0 .3rem; font-weight: 400; }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 800; letter-spacing: .07em;
  padding: .24rem .6rem; border-radius: 999px;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.pill.up { color: var(--green); background: rgba(52, 211, 153, .1);
  border: 1px solid rgba(52, 211, 153, .35); }
.pill.up::before { background: var(--green); animation: pulse 1.8s infinite; }
.pill.down { color: var(--rose); background: rgba(251, 113, 133, .1);
  border: 1px solid rgba(251, 113, 133, .35); }
.pill.down::before { background: var(--rose); animation: pulse 1.1s infinite; }

.wbadge {
  display: inline-block; min-width: 26px; text-align: center;
  font-size: .74rem; font-weight: 800; color: var(--amber);
  background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .3);
  padding: .12rem .45rem; border-radius: 7px;
}
.sticky-id { font-size: .74rem; color: var(--violet); font-weight: 600; }
.chk-yes { color: var(--green); font-weight: 800; }
.chk-no  { color: #475569; }

/* ═══════════════ SETTINGS / EDITOR ═══════════════ */
.settings-container { max-width: 1040px; }

.editor {
  border: 1px solid var(--line-strong);
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise .45s cubic-bezier(.2, .8, .3, 1) both;
}
.editor-bar {
  display: flex; align-items: center; gap: .5rem;
  background: #0d1524;
  border-bottom: 1px solid var(--line);
  padding: .6rem .95rem;
}
.wdot { width: 11px; height: 11px; border-radius: 50%; }
.wdot.r { background: #fb7185; } .wdot.y { background: #fbbf24; } .wdot.g { background: #34d399; }
.editor-name {
  margin-left: .55rem; font-size: .78rem; font-weight: 700;
  color: var(--mut); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.editor-tag {
  margin-left: auto; font-size: .62rem; font-weight: 800; letter-spacing: .1em;
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .3);
  padding: .12rem .5rem; border-radius: 6px;
}
#config-editor {
  display: block; width: 100%; border: 0; outline: none; resize: vertical;
  background: #0a111e; color: #d7e3f4;
  padding: 1.1rem 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.65;
  min-height: 480px;
  caret-color: var(--cyan);
  background-image: linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px);
  background-size: 2.5ch 100%;
}
#config-editor:focus { box-shadow: inset 0 0 0 2px rgba(34, 211, 238, .35); }
.hint-box { margin-top: .8rem; color: #5f6f8a; font-size: .78rem; }
.hint-box code { color: var(--cyan); background: rgba(34, 211, 238, .1);
  padding: .05rem .35rem; border-radius: 5px; }

/* ── log viewer ─────────────────────────────────────────────────── */
.log-head { flex-wrap: wrap; gap: .6rem; }
.log-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.log-seg { width: 190px; }
#lv-full:checked ~ .seg-thumb { transform: translateX(100%); }
#lv-compact:checked ~ .seg-btn[for="lv-compact"],
#lv-full:checked ~ .seg-btn[for="lv-full"] { color: #04121c; }

.log-follow {
  display: flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--mut);
  cursor: pointer; user-select: none;
}
.log-follow input { accent-color: var(--cyan); cursor: pointer; }

.log-filter-box { width: 230px; }
.log-filter-box .ico { color: var(--mut); }
.log-filter-box .form-control {
  background: rgba(7, 11, 20, .8); border-color: var(--line-strong);
  font-size: .82rem; color: var(--txt);
}
.log-filter-box .form-control:focus { border-color: rgba(34, 211, 238, .5); }

.log-view {
  height: min(62vh, 640px); overflow-y: auto;
  background: #05080f; border-top: 1px solid var(--line);
  padding: .5rem 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", monospace; font-size: 12px;
}
.log-empty { padding: 1.4rem 1rem; color: #5f6f8a; text-align: center; }

.log-row {
  display: flex; gap: .65rem; align-items: baseline;
  padding: .18rem .9rem; cursor: pointer; line-height: 1.5;
  border-left: 2px solid transparent; white-space: nowrap;
}
.log-row:hover { background: rgba(34, 211, 238, .06); border-left-color: var(--cyan); }
.log-row .lt { color: #5f6f8a; flex: none; }
.log-row .lfe, .log-row .lbe { color: var(--violet); flex: none; }
.log-row .larr { color: #3d4c66; flex: none; }
.log-row .lmeth { color: var(--cyan); flex: none; font-weight: 700; width: 44px; }
.log-row .lpath { color: var(--txt); overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.log-row .lhost { color: var(--mut); flex: none; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.log-row .lcode { flex: none; font-weight: 700; width: 34px; text-align: right; }
.log-row .lms { color: var(--mut); flex: none; width: 60px; text-align: right; }
.log-row .lsrv { color: #5f6f8a; flex: none; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }

.c2xx .lcode { color: var(--green); }
.c3xx .lcode { color: var(--cyan); }
.c4xx .lcode { color: var(--amber); }
.c5xx .lcode, .cerr .lcode { color: var(--rose); }
.cerr { background: rgba(251, 113, 133, .05); }
.cerr .lpath { color: var(--rose); }

.log-raw {
  display: none; margin: 0; padding: .5rem .9rem .7rem 2.4rem;
  background: rgba(17, 25, 42, .6); border-left: 2px solid var(--cyan);
  white-space: pre-wrap; word-break: break-all; color: #9fb2cf;
}
.log-row.open + .log-raw { display: block; }
.log-raw .k { color: var(--cyan); }
.log-raw .s { color: var(--green); }
.log-raw .n { color: var(--amber); }

.log-foot {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem .9rem; border-top: 1px solid var(--line);
  font-size: .74rem; color: #5f6f8a;
}
#log-status { color: var(--green); font-weight: 700; }
#log-status.paused { color: var(--amber); }

/* alert hasil validate/apply — versi fancy */
#cfg-result .alert {
  border-radius: 13px; border: 1px solid;
  backdrop-filter: blur(8px); font-size: .86rem;
  animation: rise .3s ease both;
}
#cfg-result .alert-success {
  color: #a7f3d0; background: rgba(52, 211, 153, .1);
  border-color: rgba(52, 211, 153, .4);
  box-shadow: 0 0 22px rgba(52, 211, 153, .12);
}
#cfg-result .alert-danger {
  color: #fecdd3; background: rgba(251, 113, 133, .1);
  border-color: rgba(251, 113, 133, .4);
  box-shadow: 0 0 22px rgba(251, 113, 133, .12);
}
#cfg-result .alert-warning {
  color: #fde68a; background: rgba(251, 191, 36, .08);
  border-color: rgba(251, 191, 36, .35);
}
#cfg-result ul { font-size: .83rem; }

/* ═══════════════ TOAST ═══════════════ */
.fancy-toast {
  background: #101a2c !important;
  border: 1px solid rgba(34, 211, 238, .35) !important;
  color: var(--txt);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5), 0 0 22px rgba(34, 211, 238, .15);
  border-radius: 13px;
  font-size: .86rem; font-weight: 600;
}

/* ═══════════════ MODAL RESTART ═══════════════ */
.fancy-modal {
  background: rgba(17, 25, 42, .95);
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: 18px;
  color: var(--txt);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), 0 0 40px rgba(251, 113, 133, .15);
  overflow: hidden;
}
.fancy-modal .modal-header {
  display: flex; align-items: center; gap: .75rem;
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.3rem;
}
.fancy-modal .modal-title {
  font-size: 1.02rem; font-weight: 800; margin: 0; flex: 1;
}
.fancy-modal .modal-body { padding: 1.2rem 1.3rem; font-size: .88rem; color: #c4d1e5; }
.fancy-modal .modal-footer {
  border-top: 1px solid var(--line);
  padding: .9rem 1.3rem; gap: .6rem;
}
.brand-mark.danger {
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 0 18px rgba(251, 113, 133, .5);
  color: #2b0410;
}
.brand-mark.danger .ico { width: 20px; height: 20px; stroke-width: 2.2; }
.restart-list { margin: .6rem 0 1rem; padding-left: 1.15rem; font-size: .85rem; }
.restart-list li { margin: .35rem 0; color: var(--mut); }
.restart-list li::marker { color: var(--rose); }
.restart-list code, #restart-warn code {
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  padding: .05rem .35rem; border-radius: 5px; font-size: .8rem;
}
#restart-warn { font-size: .8rem; }

/* overlay "restarting…" penuh layar */
#restart-overlay {
  position: fixed; inset: 0; z-index: 2080;
  display: grid; place-items: center;
  background: rgba(4, 7, 13, .88);
  backdrop-filter: blur(8px);
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.restart-box { text-align: center; }
.restart-ring {
  width: 66px; height: 66px; margin: 0 auto 1.3rem;
  border-radius: 50%;
  border: 4px solid rgba(34, 211, 238, .18);
  border-top-color: var(--cyan);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.restart-box h3 {
  font-size: 1.15rem; font-weight: 800; margin: 0 0 .4rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.restart-box p { color: var(--mut); font-size: .85rem; margin: 0; }
.restart-steps { margin-top: 1.1rem; display: grid; gap: .45rem; text-align: left; }
.restart-step {
  font-size: .8rem; color: #55637b;
  display: flex; align-items: center; gap: .55rem;
  transition: color .3s;
}
.restart-step::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: #334155; flex: none; transition: all .3s;
}
.restart-step.active { color: var(--cyan); }
.restart-step.active::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.restart-step.done { color: var(--green); }
.restart-step.done::before { background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ═══════════════ CODEMIRROR ═══════════════ */
.CodeMirror {
  height: 560px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.65;
  background: #0a111e;
  color: #d7e3f4;
  border: 0;
}
.CodeMirror-gutters {
  background: #0c1424;
  border-right: 1px solid rgba(148, 163, 184, .12);
}
.CodeMirror-linenumber { color: #44536d; }
.CodeMirror-cursor { border-left: 2px solid var(--cyan) !important; }
.CodeMirror-selected { background: rgba(34, 211, 238, .18) !important; }
.CodeMirror-focused .CodeMirror-selected { background: rgba(34, 211, 238, .22) !important; }
.CodeMirror-activeline-background { background: rgba(148, 163, 184, .07) !important; }
.CodeMirror-matchingbracket {
  color: #04121c !important; background: var(--cyan);
  font-weight: 700; outline: none;
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { background: #0a111e; }
/* hint bantuan keyboard di bawah editor */
.cm-foot {
  display: flex; gap: 1.1rem; flex-wrap: wrap;
  padding: .55rem 1.15rem;
  background: #0d1524; border-top: 1px solid var(--line);
  font-size: .7rem; color: #55637b;
}
.cm-foot b { color: var(--mut); font-weight: 700; }
.cm-foot kbd {
  font-family: inherit; font-size: .66rem; font-weight: 700;
  color: var(--cyan); background: rgba(34, 211, 238, .1);
  border: 1px solid rgba(34, 211, 238, .25);
  padding: .05rem .35rem; border-radius: 5px;
}

/* ═══════════════ DOCS ═══════════════ */
.docs-search {
  position: relative; width: min(320px, 100%);
}
.docs-search .ico {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--mut); width: 15px; height: 15px; pointer-events: none;
}
.docs-search input {
  width: 100%; padding: .6rem .95rem .6rem 2.4rem;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 11px; color: var(--txt); font-size: .88rem;
  transition: border-color .18s, box-shadow .18s;
}
.docs-search input:focus {
  outline: none; border-color: rgba(34, 211, 238, .6);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .15);
}
.docs-search input::placeholder { color: #55637b; }

.docs-layout {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  padding-bottom: 3rem;
}

/* sidebar */
.docs-nav {
  position: sticky; top: 76px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem .7rem;
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.docs-nav-title {
  font-size: .64rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #55637b;
  padding: .7rem .65rem .3rem;
}
.docs-nav-title:first-child { padding-top: .2rem; }
.docs-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .65rem; border-radius: 9px;
  color: var(--mut); text-decoration: none;
  font-size: .83rem; font-weight: 600;
  border-left: 2px solid transparent;
  transition: all .15s ease;
}
.docs-link::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: #334155; flex: none; transition: all .15s;
}
.docs-link:hover { color: var(--txt); background: rgba(148, 163, 184, .08); }
.docs-link.active {
  color: var(--cyan); background: rgba(34, 211, 238, .09);
  border-left-color: var(--cyan);
}
.docs-link.active::before { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* konten */
.docs-body { min-width: 0; display: grid; gap: 1.1rem; }

.doc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(10px);
  scroll-margin-top: 84px;
  animation: rise .4s cubic-bezier(.2, .8, .3, 1) both;
}
.doc.hidden-by-search { display: none; }
.doc h2 {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.12rem; font-weight: 800; margin: 0 0 .9rem;
  padding-bottom: .8rem; border-bottom: 1px solid var(--line);
  letter-spacing: -.01em;
}
.doc h2 .ico { color: var(--cyan); width: 19px; height: 19px; }
.doc h3 {
  font-size: .95rem; font-weight: 700; margin: 1.5rem 0 .6rem;
  color: #cfe0f5;
}
.doc h3::before {
  content: ""; display: inline-block; width: 4px; height: 14px;
  background: var(--grad); border-radius: 2px;
  margin-right: .55rem; vertical-align: -2px;
}
.doc p { color: var(--mut); line-height: 1.65; margin: .6rem 0; font-size: .9rem; }
.doc p b, .doc li b { color: var(--txt); }

.doc-list { margin: .5rem 0 .9rem; padding-left: 1.2rem; color: var(--mut); font-size: .89rem; line-height: 1.7; }
.doc-list li { margin: .25rem 0; }
.doc-list li::marker { color: var(--cyan); }
.doc-list.ok-list li::marker { color: var(--green); }
.doc-list.warn-list li::marker { color: var(--amber); }

.doc code {
  color: #bfe3ff; background: rgba(56, 130, 246, .12);
  border: 1px solid rgba(56, 130, 246, .2);
  padding: .08rem .4rem; border-radius: 6px;
  font-size: .82em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc a { color: var(--cyan); }

/* blok kode + tombol salin */
.code {
  position: relative; margin: .8rem 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px; overflow: hidden;
  background: #0a111e;
}
.code::before {
  content: attr(data-lang);
  display: block; padding: .4rem 1rem;
  font-size: .64rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cyan);
  background: #0d1524; border-bottom: 1px solid var(--line);
}
.code pre {
  margin: 0; padding: 1rem 1.15rem;
  overflow-x: auto; font-size: .8rem; line-height: 1.65;
  color: #d7e3f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code code {
  background: none !important; border: 0 !important;
  color: inherit !important; padding: 0 !important;
  font-size: inherit !important;
}
.code-copy {
  position: absolute; top: .42rem; right: .55rem;
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(34, 211, 238, .35);
  color: var(--cyan); font-size: .66rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 7px; cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
  z-index: 2;
}
.code:hover .code-copy { opacity: 1; }
.code-copy:hover { background: rgba(34, 211, 238, .25); }
.code-copy.copied { color: var(--green); border-color: rgba(52, 211, 153, .4);
  background: rgba(52, 211, 153, .12); }
.code-copy .ico { width: 11px; height: 11px; }

/* catatan */
.doc-note {
  display: flex; gap: .6rem; flex-wrap: wrap;
  background: rgba(34, 211, 238, .07);
  border: 1px solid rgba(34, 211, 238, .28);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: .8rem 1rem; margin: .9rem 0;
  font-size: .87rem; color: #a9c7e3; line-height: 1.6;
}
.doc-note b { color: var(--cyan); }
.doc-note code { font-size: .8em; }
.doc-note.ok {
  background: rgba(52, 211, 153, .07);
  border-color: rgba(52, 211, 153, .3);
  border-left-color: var(--green);
  color: #a7e8cd;
}
.doc-note.ok b { color: var(--green); }
.doc-note.warn {
  background: rgba(251, 191, 36, .07);
  border-color: rgba(251, 191, 36, .3);
  border-left-color: var(--amber);
  color: #ecd9a6;
}
.doc-note.warn b { color: var(--amber); }

/* tabel */
.doc-table {
  width: 100%; border-collapse: collapse;
  margin: .8rem 0 1rem; font-size: .86rem;
}
.doc-table th {
  text-align: left; padding: .6rem .85rem;
  font-size: .66rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mut);
  background: rgba(7, 11, 20, .6);
  border-bottom: 1px solid var(--line-strong);
}
.doc-table td {
  padding: .6rem .85rem; border-bottom: 1px solid var(--line);
  color: var(--mut); vertical-align: top; line-height: 1.55;
}
.doc-table tr:hover td { background: rgba(148, 163, 184, .04); }
.doc-table td:first-child { color: var(--txt); }

/* FAQ */
.faq {
  background: rgba(7, 11, 20, .55);
  border: 1px solid var(--line);
  border-radius: 11px; margin: .6rem 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: .8rem 1.05rem;
  font-size: .89rem; font-weight: 700; color: var(--txt);
  list-style: none; display: flex; align-items: center; gap: .6rem;
  transition: background .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; color: var(--cyan); font-weight: 800;
  width: 18px; height: 18px; flex: none;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, .12);
  border-radius: 6px; font-size: .9rem;
  transition: transform .2s;
}
.faq[open] summary::before { content: "−"; transform: rotate(180deg); }
.faq summary:hover { background: rgba(148, 163, 184, .05); }
.faq > p, .faq > .code {
  margin: 0 1.05rem 1rem; animation: rise .25s ease both;
}
.faq > p:first-of-type { margin-top: -.2rem; }

.doc-footer {
  text-align: center; color: #475569;
  font-size: .76rem; padding: .8rem 0 0;
}

@media (max-width: 991.98px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav {
    position: static; max-height: none;
    display: flex; flex-wrap: wrap; gap: .3rem;
    padding: .7rem;
  }
  .docs-nav-title { display: none; }
  .docs-link {
    border-left: 0; border: 1px solid var(--line);
    padding: .35rem .7rem; font-size: .78rem;
  }
  .docs-link::before { display: none; }
  .doc { padding: 1.1rem 1rem; }
  .code-copy { opacity: 1; }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 991.98px) {
  .nav-pills { order: 3; width: 100%; margin-left: 0; }
  .navbar .container-fluid { flex-wrap: wrap; }
  .chart-box { height: 220px; }
  .hero-title { font-size: 1.3rem; }
}
@media (max-width: 575.98px) {
  .nav-meta, .nav-clock { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 1.35rem; }
}

/* ═══════════════ RESOURCES & CAPACITY ═══════════════ */
.legend .dot.violet { background: var(--violet); box-shadow: 0 0 8px var(--violet); }
.legend .dot.rose { background: var(--rose); box-shadow: 0 0 8px var(--rose); }

/* banner alert di dashboard */
.alert-banner {
  border: 1px solid var(--line-strong); border-left-width: 3px;
  border-radius: 12px; padding: .6rem .9rem; margin-bottom: .9rem;
  font-size: .85rem; background: rgba(17, 25, 42, .7); color: var(--txt);
  animation: rise .3s ease both;
}
.alert-banner b { color: var(--amber); }
.alert-banner.ab-crit { border-left-color: var(--rose); background: rgba(251, 113, 133, .07); }
.alert-banner.ab-crit b { color: var(--rose); }
.alert-banner .ab-advice { color: var(--mut); display: block; margin-top: .15rem; }
.alert-banner a { color: var(--cyan); font-weight: 700; text-decoration: none; }

/* kartu alert */
.alert-cards { display: grid; gap: .6rem; }
.alert-card {
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: 12px; padding: .65rem .9rem;
  background: rgba(17, 25, 42, .6); animation: rise .3s ease both;
}
.alert-card.warn { border-left-color: var(--amber); }
.alert-card.crit { border-left-color: var(--rose); background: rgba(251, 113, 133, .06); }
.alert-card.ok { border-left-color: var(--green); }
.alert-card .a-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.alert-card .a-lvl {
  font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: .12rem .45rem; border-radius: 6px;
}
.alert-card.warn .a-lvl { background: rgba(251, 191, 36, .15); color: var(--amber); }
.alert-card.crit .a-lvl { background: rgba(251, 113, 133, .16); color: var(--rose); }
.alert-card .a-msg { font-weight: 700; font-size: .87rem; }
.alert-card .a-advice { color: var(--mut); font-size: .8rem; margin-top: .3rem; }
.alert-card .a-meta { font-size: .72rem; color: #5f6f8a; margin-top: .35rem; }
.alert-card.ok .a-lvl { background: rgba(52, 211, 153, .14); color: var(--green); }

/* saran kapasitas */
.advice-list { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .45rem; }
.advice-list li {
  display: flex; gap: .55rem; align-items: flex-start;
  font-size: .83rem; color: #c4d2e8; line-height: 1.5;
}
.advice-list li::before {
  content: "▸"; color: var(--cyan); font-weight: 800; flex: none;
}
.advice-list.ok li::before { content: "✓"; color: var(--green); }

/* riwayat event */
.event-list {
  list-style: none; margin: .4rem 0 0; padding: 0;
  display: grid; gap: .3rem; max-height: 170px; overflow-y: auto;
}
.event-list li {
  display: flex; gap: .6rem; align-items: baseline;
  font-size: .78rem; color: var(--mut); padding: .18rem .1rem;
  border-bottom: 1px dashed rgba(148, 163, 184, .09);
}
.event-list .ev-time { color: #5f6f8a; flex: none; font-variant-numeric: tabular-nums; }
.event-list .ev-tag {
  flex: none; font-size: .64rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; padding: .08rem .4rem; border-radius: 5px;
}
.event-list .ev-tag.fire { background: rgba(251, 113, 133, .14); color: var(--rose); }
.event-list .ev-tag.fire.warnlvl { background: rgba(251, 191, 36, .14); color: var(--amber); }
.event-list .ev-tag.resolve { background: rgba(52, 211, 153, .14); color: var(--green); }
.event-list .ev-msg { color: #c4d2e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* kartu metrik */
.res-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.res-card {
  background: rgba(7, 11, 20, .55); border: 1px solid var(--line);
  border-radius: 13px; padding: .75rem .85rem;
}
.res-label {
  font-size: .66rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mut);
}
.res-value {
  font-size: 1.6rem; font-weight: 800; color: var(--txt);
  font-variant-numeric: tabular-nums; margin-top: .3rem; line-height: 1.15;
}
.res-value.small { font-size: 1.05rem; }
.res-value small { font-size: .78rem; color: var(--mut); font-weight: 700; margin-left: .2rem; }
.res-value small + span, .res-value span + small { margin-left: .55rem; }
.res-sub { font-size: .73rem; color: #5f6f8a; margin-top: .4rem; }

/* meter bar */
.meter {
  height: 7px; border-radius: 5px; overflow: hidden;
  background: rgba(148, 163, 184, .13); margin-top: .55rem;
}
.meter > i {
  display: block; height: 100%; border-radius: 5px;
  background: var(--grad); transition: width .6s cubic-bezier(.3, .9, .3, 1);
}
.meter.big { height: 12px; border-radius: 7px; }
.meter.violet > i { background: var(--violet); }
.meter.indet > i { background: linear-gradient(90deg, rgba(34,211,238,.5), rgba(167,139,250,.5)); }
.meter.warn > i { background: var(--amber); }
.meter.crit > i { background: var(--rose); }
.meter.ok > i { background: var(--green); }

/* kapasitas koneksi */
.cap-big {
  font-size: 3rem; font-weight: 800; color: var(--cyan);
  font-variant-numeric: tabular-nums; line-height: 1; text-align: center;
  text-shadow: 0 0 26px rgba(34, 211, 238, .35);
}
.cap-big small { font-size: 1.1rem; color: var(--mut); margin-left: .15rem; }
.cap-big.warn { color: var(--amber); text-shadow: 0 0 26px rgba(251, 191, 36, .3); }
.cap-big.crit { color: var(--rose); text-shadow: 0 0 26px rgba(251, 113, 133, .35); }
.cap-rows { display: grid; gap: .35rem; margin-top: .9rem; }
.cap-row {
  display: flex; justify-content: space-between; font-size: .82rem;
  color: var(--mut); padding: .25rem .1rem;
  border-bottom: 1px dashed rgba(148, 163, 184, .1);
}
.cap-row b { color: var(--txt); font-variant-numeric: tabular-nums; }

/* chart analytics */
.res-chart-box { position: relative; height: 210px; }
.res-chart-box canvas { position: absolute; inset: 0; }
.res-chart-title {
  position: absolute; top: 0; left: 0; font-size: .7rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--mut);
  pointer-events: none;
}
.res-seg { width: 250px; grid-template-columns: 1fr 1fr 1fr; }
.res-thumb { width: calc((100% - 8px) / 3); }
#win-24h:checked ~ .res-thumb { transform: translateX(100%); }
#win-7d:checked ~ .res-thumb { transform: translateX(200%); }
#win-1h:checked ~ .seg-btn[for="win-1h"],
#win-24h:checked ~ .seg-btn[for="win-24h"],
#win-7d:checked ~ .seg-btn[for="win-7d"] { color: #04121c; }

@media (max-width: 991.98px) {
  .res-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  .res-grid { grid-template-columns: 1fr 1fr; }
  .res-value { font-size: 1.3rem; }
  .cap-big { font-size: 2.3rem; }
}
