/* ============================================================
   Proxmox Manager — console theme
   Display/UI: Plus Jakarta Sans · Data/mono: JetBrains Mono
   ============================================================ */
:root {
  --bg: #eef1f8;
  --bg-grad: radial-gradient(1100px 520px at 82% -8%, #e7ecff 0%, rgba(231,236,255,0) 60%),
             radial-gradient(900px 480px at 0% 0%, #eafff6 0%, rgba(234,255,246,0) 55%);
  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --surface-3: #eef2f9;
  --border: #e4e9f2;
  --border-2: #d7deeb;
  --text: #131a2b;
  --muted: #69748b;
  --nav-link: #6a7488;
  --faint: #93a0b8;
  --primary: #5566f6;
  --primary-2: #8b5cf6;
  --primary-soft: #eef0ff;
  --ok: #11b07a;
  --ok-soft: #e2f7ef;
  --warn: #e08a12;
  --warn-soft: #fdf1dd;
  --danger: #ef4d5b;
  --danger-soft: #fde8ea;
  --sidebar: #ffffff;
  --grad: linear-gradient(135deg, #5566f6 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(85,102,246,.12), rgba(139,92,246,.12));
  --shadow-sm: 0 1px 2px rgba(17,26,43,.05);
  --shadow: 0 1px 3px rgba(17,26,43,.05), 0 12px 28px -12px rgba(17,26,43,.14);
  --shadow-lg: 0 24px 60px -20px rgba(17,26,43,.28);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 264px;
}
[data-theme="dark"] {
  --bg: #080b14;
  --bg-grad: radial-gradient(1100px 520px at 82% -8%, rgba(85,102,246,.16) 0%, rgba(8,11,20,0) 58%),
             radial-gradient(900px 480px at 0% 0%, rgba(17,176,122,.10) 0%, rgba(8,11,20,0) 55%);
  --surface: #10151f;
  --surface-2: #151b27;
  --surface-3: #1a2231;
  --border: #222c3d;
  --border-2: #2b3850;
  --text: #e8edf7;
  --muted: #93a0b8;
  --nav-link: #97a1b8;
  --faint: #6b778e;
  --primary: #7d8bff;
  --primary-2: #a78bfa;
  --primary-soft: #1b2236;
  --ok: #2fc98e;
  --ok-soft: #11271f;
  --warn: #f0a83a;
  --warn-soft: #2a2113;
  --danger: #ff6470;
  --danger-soft: #2a1519;
  --sidebar: #0c111b;
  --grad: linear-gradient(135deg, #6675ff 0%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, rgba(125,139,255,.16), rgba(167,139,250,.16));
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 16px 40px -16px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 70px -24px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1,h2,h3,h4,h5,h6 { letter-spacing: -.01em; }
.text-muted-2 { color: var(--muted) !important; }
.mono, .num { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-feature-settings: "tnum" 1; }
.display { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar);
  border-right: 1px solid var(--border);
  position: fixed; inset: 0 auto 0 0; z-index: 1045;
  display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sidebar__brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1.15rem 1.25rem 1.1rem; font-weight: 700; font-size: 1.06rem;
  letter-spacing: -.02em; color: var(--text);
}
.sidebar__brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: .95rem;
  box-shadow: 0 6px 16px -4px rgba(85,102,246,.6);
}
.sidebar__brand .accent { color: var(--primary); }
.sidebar__nav { padding: .35rem .7rem 1rem; overflow-y: auto; flex: 1; }
.nav-section { font-weight: 600;
  color: var(--faint); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 1.15rem .85rem .45rem; font-weight: 700;
}
.nav-link-x {
  position: relative; display: flex; align-items: center; gap: .7rem;
  padding: .7rem .85rem; border-radius: var(--radius-sm); color: var(--nav-link);
  font-weight: 600; font-size: .9rem; cursor: pointer; margin-bottom: 4px;
  transition: background .16s, color .16s;
}
.nav-link-x > .bi:first-of-type, .nav-link-x .bi { font-size: 1.08rem; }
.nav-link-x .nav-ind {
  position: absolute; left: -.7rem; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--grad);
  transition: transform .18s;
}
.nav-link-x:hover { background: var(--surface-2); color: var(--text); }
.nav-link-x.active { background: var(--grad-soft); color: var(--text); }
.nav-link-x.active .bi { color: var(--primary); }
.nav-link-x.active .nav-ind { transform: translateY(-50%) scaleY(1); }
.nav-link-x .caret { margin-left: auto; transition: transform .2s; font-size: .72rem; opacity: .6; }
.nav-group.open > .nav-link-x .caret { transform: rotate(90deg); }
.nav-sub { overflow: hidden; max-height: 0; transition: max-height .26s ease; padding-left: 1.1rem; }
.nav-group.open .nav-sub { max-height: 280px; }
.nav-sub .nav-link-x { padding: .55rem .8rem; font-size: .85rem; }
.sidebar__foot { padding: .9rem 1.25rem; border-top: 1px solid var(--border); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px; background: var(--surface);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .85rem; padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 1030;
}
[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--surface) 88%, transparent); }
.topbar h1 { font-size: 1.12rem; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.content { padding: 1.75rem; flex: 1; max-width: 1400px; width: 100%; }

.icon-btn {
  width: 39px; height: 39px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.icon-btn:active { transform: scale(.95); }

/* ---------- Cards ---------- */
.card-x { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-x__body { padding: 1.2rem 1.35rem; }
.section-head { display: flex; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; gap: .65rem; }
.section-head h5 { margin: 0; font-weight: 650; }
.section-head .sub { color: var(--muted); font-size: .85rem; }

.stat { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.35rem; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: var(--grad-soft); opacity: .5; }
.stat__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; flex: none; position: relative; z-index: 1; }
.stat__icon.i-blue { background: var(--primary-soft); color: var(--primary); }
.stat__icon.i-amber { background: var(--warn-soft); color: var(--warn); }
.stat__icon.i-green { background: var(--ok-soft); color: var(--ok); }
.stat__icon.i-violet { background: var(--grad-soft); color: var(--primary-2); }
.stat__num { font-family: "Plus Jakarta Sans"; font-size: 1.25rem; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-feature-settings: "tnum" 1; position: relative; z-index: 1; }
.stat__label { color: var(--muted); font-size: .8rem; margin-top: .35rem; font-weight: 600; position: relative; z-index: 1; }

/* ---------- Table ---------- */
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-x th { text-align: left; font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); }
.table-x td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-x tr:last-child td { border-bottom: 0; }
.table-x tbody tr { transition: background .12s; }
.table-x tbody tr:hover { background: var(--surface-2); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .22rem .62rem; border-radius: 100px; font-size: .74rem; font-weight: 600; letter-spacing: .01em; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.pill.running, .pill.available, .pill.success, .pill.on, .pill.done { background: var(--ok-soft); color: var(--ok); }
.pill.stopped, .pill.off, .pill.missing { background: var(--surface-3); color: var(--faint); }
.pill.paused, .pill.suspended, .pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.deleted, .pill.deleted_manual, .pill.error, .pill.failed { background: var(--danger-soft); color: var(--danger); }
.pill.info, .pill.processing { background: var(--primary-soft); color: var(--primary); }

/* ---------- Buttons (Bootstrap overrides) ---------- */
.btn { font-weight: 550; border-radius: var(--radius-sm); }
.btn-primary { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; background: var(--primary); border: none; box-shadow: 0 4px 12px -5px rgba(85,102,246,.5); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary); filter: brightness(.95); }
.btn-outline-secondary { --bs-btn-color: var(--text); --bs-btn-border-color: var(--border-2); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-border-color: var(--border-2); --bs-btn-hover-color: var(--text); }
.btn-soft { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Forms ---------- */
.form-control, .form-select { background: var(--surface-2); border-color: var(--border); color: var(--text); border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus { background: var(--surface-2); color: var(--text); border-color: var(--primary); box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--primary) 22%, transparent); }
.form-control::placeholder { color: var(--faint); }
.form-label { font-weight: 600; margin-bottom: .35rem; font-size: .85rem; }
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-header, .modal-footer { border-color: var(--border); }
.dropdown-menu { background: var(--surface); border-color: var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.dropdown-item { color: var(--text); border-radius: 8px; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-divider { border-color: var(--border); }
.empty { text-align: center; color: var(--muted); padding: 2.75rem 1rem; }
.empty .bi { font-size: 1.8rem; opacity: .5; display: block; margin-bottom: .4rem; }
hr { border-color: var(--border); opacity: 1; }

/* user menu */
.user-chip { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .3rem .55rem; border-radius: var(--radius-sm); }
.user-chip:hover { background: var(--surface-2); }
.avatar { width: 35px; height: 35px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

.backdrop-x { display: none; position: fixed; inset: 0; background: rgba(6,9,16,.55); backdrop-filter: blur(2px); z-index: 1040; }

/* ---------- VM detail ---------- */
.vm-hero { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.vm-hero__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--grad-soft); color: var(--primary); display: grid; place-items: center; font-size: 1.6rem; }
.vm-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.vm-actions .btn { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: .8rem; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem 1rem; }
.metric .k { color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.metric .v { font-family: "JetBrains Mono"; font-size: .98rem; font-weight: 500; margin-top: .25rem; }
.bar { height: 7px; border-radius: 100px; background: var(--surface-3); overflow: hidden; margin-top: .55rem; }
.bar > span { display: block; height: 100%; background: var(--grad); border-radius: 100px; }
.rrd-chart { width: 100%; height: 120px; display: block; }
.kv td:first-child { color: var(--muted); width: 42%; }
.tabs-x { display: flex; gap: .35rem; border-bottom: 1px solid var(--border); margin-bottom: 1.1rem; }
.tabs-x button { background: none; border: none; padding: .6rem .9rem; color: var(--muted); font-weight: 650; font-size: .9rem; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs-x button.active { color: var(--text); border-bottom-color: var(--primary); }

/* ---------- Mobile ---------- */
.hamburger { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open .backdrop-x { display: block; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .content { padding: 1.1rem; }
  .stat__num { font-size: 1.2rem; }
}

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 410px; }

/* ---------- VM detail extras ---------- */
.min-w-0 { min-width: 0; }
.vm-hero { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vm-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.vm-actions .btn { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .45rem .8rem; }
.g-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-bottom: .35rem; }
.net-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.net-row:last-child { border-bottom: 0; padding-bottom: 0; }
.net-row:first-child { padding-top: 0; }
.bk-item { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.bk-item:last-child { border-bottom: 0; }
.os-line { display: flex; align-items: center; gap: .7rem; }
.os-line > .bi { font-size: 1.7rem; color: var(--primary); }
.d-grid .btn.text-start { text-align: left; }

/* ---------- chart box (resource graphs) ---------- */
.chart-box { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: .6rem .65rem .4rem; }
.chart-box .g-title { margin-bottom: .4rem; display: flex; align-items: baseline; gap: .4rem; }
.chart-box .g-cur { margin-left: auto; font-family: "JetBrains Mono"; font-size: .8rem; font-weight: 500; color: var(--text); }
.rrd-chart { width: 100%; height: 104px; display: block; }
.rrd-grid line { stroke: var(--border-2); stroke-width: 1; stroke-dasharray: 3 4; opacity: .55; vector-effect: non-scaling-stroke; }
.rrd-axis { fill: var(--faint); font-size: 9px; font-family: "JetBrains Mono"; }

/* config sub-headers + tidy kv */
.table-x.cfg td { padding: .55rem 1.1rem; }
.cfg-sub { color: var(--primary); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; padding-top: 1rem !important; padding-bottom: .35rem !important; border-bottom: 0 !important; }
.table-x.kv td:first-child { color: var(--muted); width: 42%; font-weight: 500; }
.table-x.kv td:last-child { font-weight: 500; }
.metric .v { font-weight: 500 !important; }

/* chart hover crosshair + tooltip */
.chart-area { position: relative; cursor: crosshair; }
.chart-area .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border-2); pointer-events: none; display: none; }
.chart-area .cdot { position: absolute; width: 9px; height: 9px; border-radius: 50%; margin: -4.5px 0 0 -4.5px; box-shadow: 0 0 0 3px var(--surface-2); pointer-events: none; display: none; }
.chart-area .ctip { position: absolute; pointer-events: none; display: none; background: var(--text); color: var(--surface); font-size: .72rem; padding: .22rem .5rem; border-radius: 7px; white-space: nowrap; font-family: "JetBrains Mono"; z-index: 5; box-shadow: var(--shadow); }
.chart-area .ctip b { color: var(--surface); }

/* tooltip card (date+time / value) */
.chart-area .ctip { line-height: 1.35; padding: .35rem .55rem; font-family: "Plus Jakarta Sans"; }
.chart-area .ctip .ctip-when { font-size: .68rem; opacity: .85; font-family: "JetBrains Mono"; }
.chart-area .ctip .ctip-val { font-size: .76rem; display: flex; align-items: center; }
.chart-area .ctip .ctip-val b { color: var(--surface); font-weight: 700; }
.chart-area .ctip .sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: .35rem; }

/* ---------- VM detail: rapikan ukuran teks ---------- */
#vmHead .vm-hero h4 { font-size: 1.2rem; }
#vmHead .vm-actions .btn { font-size: .8rem; padding: .42rem .7rem; }
#vmHead .icon-btn { width: 36px; height: 36px; }
#vmBody .section-head h5 { font-size: .95rem; }
#vmBody .metric { padding: .8rem .9rem; }
#vmBody .metric .k { font-size: .66rem; }
#vmBody .metric .v { font-size: .9rem; }
#vmBody .d-grid .btn { font-size: .82rem; padding: .55rem .8rem; font-weight: 500; }
#vmBody .table-x.kv td { padding: .5rem 1rem; font-size: .85rem; }
#vmBody .table-x.cfg td { padding: .42rem 1rem; }
#vmBody .net-row { padding: .55rem 0; }
#vmBody .bk-item { font-size: .85rem; }
#vmBody .os-line > .bi { font-size: 1.45rem; }
#vmBody .chart-box .g-title { font-size: .7rem; }
.dropdown-menu .dropdown-item { font-size: .85rem; padding: .45rem .85rem; }
.pill { font-size: .72rem; }

/* os cell in VM list */
.os-cell { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.os-cell > .bi { color: var(--primary); font-size: 1rem; }

/* OS icon cell + lighter detail button + hero badge */
.os-cell { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; }
.os-ico { border-radius: 6px; }
.btn-detail { font-weight: 500 !important; font-size: .8rem; }
.table-x .btn-sm { font-weight: 500; font-size: .8rem; }
.vm-hero__icon { background: transparent !important; padding: 0; }
.pill .os-ico { border-radius: 5px; }

/* OS logo images */
.os-ico-img { object-fit: contain; vertical-align: -.18em; flex: none; }
.os-cell .os-ico-img { border-radius: 4px; }

/* IP pool: range/manual toggle + manual rows */
.btn-group .btn-soft.active { background: var(--grad-soft); color: var(--primary); border-color: var(--primary); }
.ip-row .btn-soft { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }

/* Create VM: IP picker */
.ip-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem; background: var(--bg-soft); }
.ip-opt { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: var(--radius-sm); cursor: pointer; }
.ip-opt:hover { background: var(--bg-hover); }
.ip-opt input { flex: 0 0 auto; }
.ip-opt.is-used { opacity: .55; cursor: not-allowed; }

/* Sidebar: sembunyikan scrollbar (tetap bisa scroll) + spacer pengganti label section */
.sidebar__nav { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar__nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nav-gap { height: .55rem; }

/* Dashboard node resource bars */
.res-row { margin-bottom: .7rem; }
.res-bar { height: 7px; border-radius: 5px; background: var(--bg-soft); overflow: hidden; margin-top: .3rem; border: 1px solid var(--border); }
.res-bar > span { display: block; height: 100%; background: var(--grad); border-radius: 5px; }
.res-bar > span.warn { background: linear-gradient(135deg, #f0a020, #f5c451); }
.res-bar > span.danger { background: linear-gradient(135deg, var(--danger), #ff8a93); }

/* Dashboard: small inline bars + login log */
.res-bar--sm { height: 5px; margin-top: .25rem; max-width: 160px; }
.login-log { display: flex; flex-direction: column; gap: .15rem; max-height: 360px; overflow-y: auto; }
.login-log::-webkit-scrollbar { width: 0; }
.ll-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .35rem; border-bottom: 1px solid var(--border); }
.ll-item:last-child { border-bottom: 0; }
.ll-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .8rem; flex: 0 0 auto; }
.ll-meta { min-width: 0; }
.ll-name { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ll-time { margin-left: auto; white-space: nowrap; flex: 0 0 auto; }

/* Graph tabs + Bandwidth Report */
.g-tabs { display: flex; gap: 4px; }
.g-tab { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: .82rem; padding: 4px 11px; border-radius: var(--radius-sm); cursor: pointer; line-height: 1.3; }
.g-tab:hover { background: var(--surface-2); color: var(--text); }
.g-tab.active { background: var(--primary-soft); color: var(--primary); }
.bw-sum { font-size: .9rem; color: var(--muted); margin-bottom: .7rem; }
.bw-sum strong { color: var(--text); font-family: "JetBrains Mono"; }
.bw-chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; overflow-x: auto; padding-top: 6px; }
.bw-col { flex: 1 0 13px; min-width: 13px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.bw-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; min-height: 0; }
.bw-bar { width: 100%; background: var(--grad); border-radius: 4px 4px 0 0; }
.bw-bar.zero { background: var(--border); border-radius: 4px 4px 0 0; min-height: 2px; }
.bw-x { font-size: .58rem; color: var(--muted); margin-top: 5px; white-space: nowrap; }

/* create-vm section header */
.cv-sec{font-size:.7rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--faint);margin:0 0 .7rem;padding-bottom:.45rem;border-bottom:1px solid var(--border)}

/* ===== dashboard node cards + ring gauges ===== */
.node-card{display:flex;align-items:center;gap:1.25rem;flex-wrap:wrap}
.nc-meta{min-width:150px}
.nc-name{font-family:"Plus Jakarta Sans";font-weight:700;font-size:1.05rem;letter-spacing:-.01em}
.nc-sub{color:var(--muted);font-size:.8rem;margin-top:.3rem}
.nc-rings{display:flex;gap:1.5rem;margin-left:auto;flex-wrap:wrap}
.nc-ring{text-align:center;min-width:72px}
.nc-ring__label{font-size:.68rem;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.06em;margin-top:.3rem}
.nc-ring__sub{font-size:.7rem;color:var(--muted);margin-top:.1rem}
.ring-bg{fill:none;stroke:var(--surface-3);stroke-width:6}
.ring-fg{fill:none;stroke-width:6;stroke-linecap:round;transition:stroke-dashoffset .7s cubic-bezier(.4,0,.2,1)}
.ring-txt{font:700 14px "Plus Jakarta Sans";fill:var(--text)}

/* ===== vm status stacked bar ===== */
.vm-bar{display:flex;height:14px;border-radius:7px;overflow:hidden;background:var(--surface-3);margin-bottom:1.1rem}
.vm-bar>span{display:block;height:100%;transition:width .6s ease}
.vm-bar .seg-run{background:linear-gradient(135deg,var(--ok),#48d39e)}
.vm-bar .seg-susp{background:linear-gradient(135deg,var(--warn),#f5c451)}
.vm-bar .seg-stop{background:var(--border-2)}
.vm-leg{display:flex;flex-direction:column;gap:.65rem}
.vm-leg__row{display:flex;align-items:center;gap:.55rem;font-size:.9rem;color:var(--muted)}
.vm-leg__dot{width:10px;height:10px;border-radius:3px;flex:none}
.vm-leg__num{margin-left:auto;font-weight:700;font-family:"Plus Jakarta Sans";color:var(--text)}
a.sidebar__brand{text-decoration:none;color:inherit}
a.sidebar__brand:hover .logo{filter:brightness(1.08)}
.icon-btn.active{border-color:var(--primary);color:var(--primary);background:var(--primary-soft)}

/* node group chips (many-to-many) */
.grp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 5px 3px 10px; border: 1px solid var(--border-2); border-radius: 999px; background: var(--surface-2); font-size: .82rem; line-height: 1.4; }
.grp-chip i { opacity: .65; }
.grp-chip__x { border: 0; background: transparent; color: var(--muted); line-height: 1; font-size: 1.05rem; cursor: pointer; padding: 0 4px; border-radius: 50%; }
.grp-chip__x:hover { color: var(--danger); background: var(--danger-soft); }
.grp-add { max-width: 360px; }

/* node-detail meta strip */
.nd-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 12px; border-top: 1px solid var(--border); }
.nd-meta__item { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.nd-meta__item i { opacity: .7; }
.nd-meta__item strong { color: var(--text); font-weight: 600; }

/* node-detail card heads */
.nd-cardhead { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.nd-cardhead i { color: var(--primary); font-size: 1.05rem; }
.table-x--tight td { padding: .55rem .8rem; }

/* storage bars (node-detail + dashboard) */
.stor-item { margin-bottom: 12px; }
.stor-item:last-child { margin-bottom: 0; }
.stor-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stor-bar__fill { height: 100%; border-radius: 999px; transition: width .6s ease; }

/* dashboard mini storage */
.nc-storage { margin-top: 14px; flex-basis: 100%; width: 100%; }
.nc-storage:empty { margin-top: 0; }
.nc-storage__head { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.nc-stor { margin-bottom: 9px; }
.nc-stor:last-child { margin-bottom: 0; }
.nc-stor__top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; margin-bottom: 3px; }

/* API key — scope checklist + endpoint reference */
.scope-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; }
.scope-item:hover { border-color: var(--border-2); background: var(--surface-2); }
.scope-item .mono { font-weight: 600; }
.ep-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.ep-group.ep-off { opacity: .5; }
.ep-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.ep-row { padding: 6px 0; border-top: 1px dashed var(--border); }
.ep-row:first-of-type { border-top: 0; }
.ep-m { display: inline-block; font-size: .66rem; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-right: 6px; letter-spacing: .03em; }
.ep-m--get { background: var(--ok-soft); color: var(--ok); }
.ep-m--post { background: var(--primary-soft); color: var(--primary); }
.ep-path { font-size: .78rem; word-break: break-all; }

/* API key — grouped permission checklist (Virtualizor-style) */
.scope-group { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.scope-group__head { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); padding: 8px 12px; font-weight: 600; font-size: .9rem; border-bottom: 1px solid var(--border); }
.scope-all { font-weight: 500; font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.scope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 14px; padding: 10px 12px; }
.scope-cell { display: flex; align-items: flex-start; gap: 8px; padding: 5px 4px; cursor: pointer; border-radius: 6px; }
.scope-cell:hover { background: var(--surface-2); }
.scope-cell__t { font-size: .85rem; line-height: 1.3; }
.scope-cell__id { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .7rem; color: var(--muted); }
@media (max-width: 680px) { .scope-grid { grid-template-columns: 1fr; } }

/* ===== node-detail: hero + layout polish ===== */
.nd-back { display:inline-flex; align-items:center; gap:.45rem; color:var(--muted); font-size:.85rem; font-weight:600; text-decoration:none; }
.nd-back:hover { color:var(--primary); }
.nd-hero { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:1.15rem 1.35rem; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border); position:relative; overflow:hidden; box-shadow:var(--shadow); }
.nd-hero::before { content:""; position:absolute; inset:0; background:var(--grad-soft); opacity:.5; pointer-events:none; }
.nd-hero::after { content:""; position:absolute; right:-50px; top:-60px; width:190px; height:190px; border-radius:50%; background:var(--grad-soft); opacity:.6; pointer-events:none; }
.nd-hero > * { position:relative; z-index:1; }
.nd-hero__icon { width:54px; height:54px; border-radius:15px; background:var(--grad); color:#fff; display:grid; place-items:center; font-size:1.5rem; flex:none; box-shadow:0 8px 18px -7px rgba(85,102,246,.6); }
.nd-hero__title { min-width:0; }
.nd-hero__name { font-family:"Plus Jakarta Sans"; font-weight:700; font-size:1.18rem; letter-spacing:-.01em; line-height:1.15; }
.nd-hero__sub { color:var(--muted); }
.nd-hero__actions { display:flex; align-items:center; gap:.5rem; margin-left:auto; flex-wrap:wrap; }
.nc-rings.nc-rings--center { margin-left:0; justify-content:center; gap:2.6rem; padding:.4rem 0 .2rem; }
@media (max-width:575.98px){ .nd-hero__actions { margin-left:0; width:100%; } .nc-rings.nc-rings--center { gap:1.6rem; } }

/* dashboard node card — allocated section */
.nc-alloc { margin-top: 14px; flex-basis: 100%; width: 100%; }

/* ===== node-card collapsible (Storage & Allocated) ===== */
.nc-toggle { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; flex-basis: 100%; margin-top: 14px; padding: .5rem .75rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s; }
.nc-toggle:hover { background: var(--surface-3); border-color: var(--primary); color: var(--text); }
.nc-toggle__chev { transition: transform .2s; font-size: .8rem; }
.nc-toggle.open .nc-toggle__chev { transform: rotate(180deg); }
.nc-details { flex-basis: 100%; width: 100%; animation: nc-fade .2s ease; }
.nc-details .nc-storage:first-child, .nc-details > .nc-storage { margin-top: 12px; }
@keyframes nc-fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ===== app footer (background seperti header) ===== */
.app-footer { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; padding:.85rem 1.75rem; background:var(--surface); border-top:1px solid var(--border); color:var(--muted); font-size:.82rem; }
.app-footer__left strong { color:var(--text); font-weight:700; }
.app-footer__sep { opacity:.5; margin:0 .15rem; }
.app-footer__right { margin-left:auto; display:flex; gap:1.2rem; }
.app-footer__right a { color:var(--muted); text-decoration:none; font-weight:600; display:inline-flex; align-items:center; }
.app-footer__right a:hover { color:var(--primary); }
[data-theme="dark"] .app-footer { background:color-mix(in srgb, var(--surface) 88%, transparent); }
@media (max-width:575.98px){ .app-footer { padding:.85rem 1.1rem; } .app-footer__right { margin-left:0; width:100%; } }

/* ===== readme / version pages ===== */
.doc-section { margin-bottom:1.5rem; }
.doc-section:last-child { margin-bottom:0; }
.doc-h { display:flex; align-items:center; gap:.55rem; font-weight:700; font-size:1rem; margin-bottom:.5rem; }
.doc-h i { color:var(--primary); }
.doc-card { border:1px solid var(--border); border-radius:var(--radius-sm); padding:1rem 1.15rem; background:var(--surface-2); }
.doc-card pre { background:var(--surface-3); border:1px solid var(--border); border-radius:var(--radius-sm); padding:.75rem .9rem; margin:.5rem 0 0; font-size:.82rem; overflow:auto; color:var(--text); }
.doc-card code.inline { background:var(--surface-3); padding:.1rem .4rem; border-radius:6px; font-size:.85em; }
.feat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:.5rem .9rem; }
.feat-item { display:flex; align-items:flex-start; gap:.5rem; font-size:.88rem; color:var(--text); }
.feat-item i { color:var(--ok); margin-top:.15rem; flex:none; }
.feat-mod { border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; margin-bottom:1rem; }
.feat-mod__head { display:flex; align-items:center; gap:.55rem; padding:.7rem 1rem; background:var(--surface-2); font-weight:700; }
.feat-mod__head .badge-n { margin-left:auto; font-size:.72rem; font-weight:600; color:var(--muted); background:var(--surface-3); padding:.1rem .55rem; border-radius:100px; }
.feat-mod__body { padding:1rem; }
