/* vmon — HostData.id design system (docs/superpowers/specs/2026-10-16-redesign-hostdata-design.md)
   Navy brand rail (always dark so the white logo reads), cool-grey work area, numbers in Plex Mono.
   --brand / --accent are overridden per installation from Pengaturan -> Tampilan. Status colours are fixed. */
@font-face { font-family: "Manrope"; src: url("fonts/Manrope-400-800.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --brand: #122d3e; --accent: #2f6fdb;
  --btn: var(--brand);
  --link: var(--accent);   /* text/focus use of the accent; lightened in dark mode */
  --bg: #f2f4f7; --surface: #ffffff; --sunken: #e9edf2; --line: #dde3ea; --ink: #142330; --muted: #5c6b79;
  --ok: #1d8754; --warn: #a8690b; --crit: #c8283f; --info: #2f6fdb;
  --ok-bg: #e3f4ea; --warn-bg: #fdf1d8; --crit-bg: #fbe5e8; --info-bg: #e6eefc;
  --zone-warn: #fdf3dc; --zone-crit: #fbe7ea;
  --shadow: 0 1px 2px rgba(18,45,62,.06), 0 1px 1px rgba(18,45,62,.04);
  --radius: 10px; --radius-sm: 8px;
  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-num: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* aliases used by older markup and JS-built HTML */
  --text: var(--ink); --elev: var(--sunken);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --btn: var(--accent);
  --link: color-mix(in srgb, var(--accent) 50%, #ffffff);
  --bg: #0c161e; --surface: #132029; --sunken: #0f1b23; --line: #22333f; --ink: #e6edf3; --muted: #93a3b1;
  --ok: #3cc17f; --warn: #e3a83a; --crit: #f0566b; --info: #6f9cf0;
  --ok-bg: rgba(60,193,127,.14); --warn-bg: rgba(227,168,58,.15); --crit-bg: rgba(240,86,107,.15); --info-bg: rgba(111,156,240,.15);
  --zone-warn: rgba(227,168,58,.10); --zone-crit: rgba(240,86,107,.10);
  --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --btn: var(--accent);
  --link: color-mix(in srgb, var(--accent) 50%, #ffffff);
  --bg: #0c161e; --surface: #132029; --sunken: #0f1b23; --line: #22333f; --ink: #e6edf3; --muted: #93a3b1;
  --ok: #3cc17f; --warn: #e3a83a; --crit: #f0566b; --info: #6f9cf0;
  --ok-bg: rgba(60,193,127,.14); --warn-bg: rgba(227,168,58,.15); --crit-bg: rgba(240,86,107,.15); --info-bg: rgba(111,156,240,.15);
  --zone-warn: rgba(227,168,58,.10); --zone-crit: rgba(240,86,107,.10);
  --shadow: none; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
code, pre, .mono, .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
code, pre, .mono { font-size: 12.5px; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--sunken); padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); max-height: 420px; overflow: auto; }
h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; min-width: 0; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 11px; margin: 0 0 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* shell: brand rail */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: 0 0 240px; background: var(--brand); color: #fff; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 18px; text-decoration: none; color: #fff; }
.brand img { width: 150px; max-width: 100%; height: auto; display: block; }
.brand .brand-name { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .72; font-weight: 600; overflow-wrap: anywhere; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: #fff; opacity: .78; text-decoration: none; font-weight: 600; }
.nav a:hover { opacity: 1; background: rgba(255,255,255,.07); }
.nav a.active { opacity: 1; background: rgba(255,255,255,.13); }
.nav .count { margin-left: auto; font-family: var(--font-num); font-size: 11px; background: #c8283f; color: #fff; border-radius: 999px; padding: 0 7px; }
.nav .sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 4px; }
.nav svg { width: 17px; height: 17px; flex: none; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; font-size: 12px; color: #fff; }
.sidebar-foot .muted { color: rgba(255,255,255,.7); overflow-wrap: anywhere; }
.sidebar .btn, .sidebar .theme-toggle { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.sidebar .btn:hover { background: rgba(255,255,255,.16); }
.main { flex: 1; min-width: 0; padding: 24px clamp(16px, 3vw, 32px) 48px; }
.topbar > div { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .sidebar { position: fixed; z-index: 30; left: -260px; transition: left .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .sidebar.open { left: 0; }
  .menu-btn { display: inline-flex; }
}

/* cards & grid */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
@media (max-width: 480px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.stack > * + * { margin-top: 16px; }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat .v { font-family: var(--font-num); font-size: 26px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .s { color: var(--muted); font-size: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.card-title { font-weight: 800; font-size: 15px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 600; font-size: 12px; }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* server card status stripe (worst state of the server) */
.srv { position: relative; overflow: hidden; }
.srv::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--state, var(--ok)); }
.srv.warn { --state: var(--warn); } .srv.crit { --state: var(--crit); } .srv.unknown { --state: var(--line); }

/* meters */
.meter { margin: 8px 0; }
.meter .row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.meter .row b { color: var(--ink); font-weight: 500; font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
.bar { height: 5px; background: var(--sunken); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--ink); opacity: .78; border-radius: 99px; width: 0; transition: width .4s; }
.bar.warn > i { background: var(--warn); opacity: 1; }
.bar.crit > i { background: var(--crit); opacity: 1; }

/* badges & pills (status = colour + shape + label) */
.badge, .pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 8px; font-size: 11px; font-weight: 800; color: var(--muted); background: var(--sunken); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; border: 0; text-decoration: none; }
.badge::before, .pill::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.badge.ok, .badge.online, .badge.running, .badge.sent, .pill.ok { color: var(--ok); background: var(--ok-bg); }
.badge.warning, .pill.warn { color: var(--warn); background: var(--warn-bg); }
.badge.warning::before, .pill.warn::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.badge.critical, .badge.offline, .badge.stopped, .badge.failed, .badge.active, .pill.crit { color: var(--crit); background: var(--crit-bg); }
.badge.critical::before, .pill.crit::before { border-radius: 1px; }
.pill.unknown::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.badge.resolved, .badge.info { color: var(--info); background: var(--info-bg); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: var(--sunken); position: sticky; top: 0; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--sunken) 55%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--font-num); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: var(--radius-sm); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--btn); color: #fff; border-color: var(--btn); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: wait; }
label { display: block; font-size: 12px; color: var(--ink); font-weight: 700; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; margin: 0; font-weight: 500; }
.field { margin-bottom: 14px; }
.field .err { color: var(--crit); font-size: 12px; margin-top: 4px; font-weight: 600; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }
.inline-form { display: inline; }

/* flash */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; overflow-wrap: anywhere; font-weight: 600; }
.flash.success { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--crit-bg); color: var(--crit); }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 13px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 700; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* pagination */
.pager { display: flex; gap: 4px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.pager .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span.cur { padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); font-family: var(--font-num); }
.pager span.cur { background: var(--btn); color: #fff; border-color: var(--btn); }

/* auth (login, invite): brand panel + form */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.auth-brand { background: var(--brand); color: #fff; padding: 22px 28px; }
.auth-brand img { width: 160px; max-width: 100%; display: block; }
.auth-brand .brand-name { overflow-wrap: anywhere; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .72; margin-top: 6px; font-weight: 600; }
.auth-form { padding: 26px 28px 28px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }

/* misc */
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.crit { background: var(--crit); } .dot.warn { background: var(--warn); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 99px; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.chart-box { position: relative; height: 220px; }
details > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 0; width: min(780px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(8,20,28,.55); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
dialog .dlg-body { padding: 16px; max-height: 75vh; overflow: auto; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=search] { max-width: 280px; }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .bar > i, .sidebar { transition: none; } .spinner { animation-duration: 2s; } }

/* alert detail trend chart (analytics.js trendChart) */
.tchart { margin-top: 6px; }
.tc-wrap { position: relative; overflow: hidden; }
.tc-wrap svg { display: block; max-width: 100%; height: auto; }
.tc-grid { stroke: var(--line); stroke-width: 1; }
.tc-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.tc-zone-warn { fill: var(--zone-warn); }
.tc-zone-crit { fill: var(--zone-crit); }
.tc-limit { stroke-width: 1.5; fill: none; }
.tc-limit-warn { stroke: var(--warn); stroke-dasharray: 2 3; }
.tc-limit-crit { stroke: var(--crit); stroke-dasharray: 7 4; }
.tc-limit-label { fill: var(--text); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.tc-line { stroke: var(--text); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.tc-pt { stroke: var(--surface); stroke-width: 2; }
.tc-ok { fill: var(--text); }
.tc-warn { fill: var(--warn); }
.tc-crit { fill: var(--crit); }
.tc-value { fill: var(--text); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.tc-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tc-hit { fill: transparent; cursor: crosshair; }
.tc-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.12); white-space: nowrap; z-index: 2; }
.tc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 2px; align-items: center; }
.tc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tc-state { font-weight: 600; }
.tc-state::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--text); vertical-align: 0; }
.tc-state-warn::before { background: var(--warn); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tc-state-crit::before { background: var(--crit); border-radius: 1px; }
@media (prefers-reduced-motion: reduce) { .tc-tip { transition: none; } }
.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.lu-next { font-variant-numeric: tabular-nums; margin-top: 2px; }
.lu-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.lu-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }
@media (prefers-reduced-motion: reduce) { .lu-bar i { transition: none; } }
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--muted); }

/* Pengaturan -> Tampilan */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 16px; align-items: start; }
@media (max-width: 960px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
fieldset.img-field { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; display: grid; gap: 8px; }
fieldset.img-field legend { padding: 0; margin-bottom: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg label { display: inline-flex; align-items: center; gap: 6px; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted); }
.seg label:has(input:checked) { color: var(--ink); border-color: var(--ink); }
.seg input { accent-color: var(--accent); margin: 0; }
.color-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px; background: var(--surface); cursor: pointer; }
.contrast { font-size: 12px; font-weight: 700; white-space: nowrap; font-family: var(--font-num); }
.contrast.good { color: var(--ok); } .contrast.bad { color: var(--crit); }
.pv-rail { background: var(--brand); color: #fff; padding: 18px; }
.pv-rail img { width: 150px; max-width: 100%; display: block; }
.pv-rail .brand-name { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .72; margin-top: 6px; font-weight: 600; overflow-wrap: anywhere; }

/* dashboard */
.summary-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.summary-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-stats a.stat { color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
.summary-stats a.stat:hover .v { color: var(--link); }
.summary-stats .pill { margin-top: 4px; }
@media (max-width: 1100px) { .summary-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .summary-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.attention { padding: 0; margin-bottom: 20px; overflow: hidden; }
.attention header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; }
.attention header h2 { margin: 0; }
.issue { display: grid; grid-template-columns: 96px minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.issue:hover { background: var(--sunken); }
.issue .what { min-width: 0; }
.issue .what b { display: block; font-weight: 700; }
.issue .what span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.issue .when { color: var(--muted); font-size: 12px; }
.issue .val { text-align: right; font-weight: 600; }
@media (max-width: 640px) { .issue { grid-template-columns: minmax(0, 1fr) auto; } .issue .when { display: none; } .issue .pill { grid-column: 1 / -1; justify-self: start; } }
.section-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.section-head h2 { margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.facts b { color: var(--ink); font-weight: 600; }
.facts-uptime { margin-left: auto; }
.meter .row b.note { font-family: var(--font-ui); font-weight: 600; color: var(--muted); font-size: 11px; }

/* polish from the visual sweep */
.grid > *, .summary-row > *, .settings-grid > * { min-width: 0; }
td.num, th.num { white-space: nowrap; }
td a:not(.btn), .card-title { color: var(--ink); font-weight: 700; text-decoration: none; }
td a:not(.btn):hover, .card-title:hover { color: var(--link); text-decoration: underline; }
.stat [data-lu-ago] { font-family: var(--font-ui); font-weight: 700; font-size: 20px; }
td.mono, td .mono { font-size: 12px; overflow-wrap: anywhere; }
.error-page { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 0 4px; }
.error-page .code { font-size: 44px; font-weight: 600; line-height: 1; color: var(--muted); }
.auth-form h2 { margin-bottom: 14px; }
td.ip-cell { white-space: nowrap; overflow-wrap: normal; }
.check + .btn, .check + button { margin-left: 10px; }
.seg-links { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.seg-links a { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; }
.seg-links a:hover { color: var(--ink); }
.seg-links a[aria-current="true"] { background: var(--btn); color: #fff; }

/* dashboard server cards: up to 5 columns; compact meters (percent + free, used/total in the tooltip) */
.server-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px)  { .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px)  { .server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .server-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .server-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.server-grid .srv { padding: 13px 13px 11px 15px; display: flex; flex-direction: column; }
.srv.off { --state: var(--muted); }
.srv.off .bar > i { opacity: .45; }
.srv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.srv-head .card-title { font-size: 15px; line-height: 1.25; }
.srv-head .pill { flex: none; }
.srv-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 4px; font-size: 12px; color: var(--muted); min-width: 0; }
.srv-meta > span:last-child { overflow-wrap: anywhere; }
.srv-meta .badge { font-size: 10px; padding: 1px 7px; }
.server-grid .meter { margin: 6px 0; }
.server-grid .meter .row b { font-weight: 600; }
.usage { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; white-space: nowrap; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--muted); }
.usage b { color: var(--ink); font-weight: 600; }
.server-grid .usage { justify-content: flex-end; cursor: help; }
.server-grid .usage > span:first-child { display: none; }
.srv-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); font-weight: 600; }
.srv-foot b { color: var(--ink); }
.server-grid [data-disks] { margin-bottom: 8px; }
.account-link { display: inline-block; margin-top: 6px; color: rgba(255,255,255,.85); font-weight: 600; text-decoration: none; }
.account-link:hover { color: #fff; text-decoration: underline; }

/* Analytics overview: long "Critical sekarang" table next to the short per-server risk list */
.split-75 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .split-75 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
.split-75 > * { min-width: 0; }

/* notification bell + panel + toasts */
.notif { position: relative; }
.bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.bell svg { width: 18px; height: 18px; }
.bell:hover { border-color: var(--muted); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--warn); color: #fff; font: 700 11px/19px var(--font-num); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bell-count.crit { background: #c8283f; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(8,20,28,.18); }
.notif-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.notif-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif-item:hover { background: var(--sunken); }
.ni-text b { display: block; font-size: 13px; }
.ni-text span { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ni-val { text-align: right; font-weight: 600; font-size: 13px; white-space: nowrap; }
.ni-val small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; font-family: var(--font-ui); }
.notif-empty { padding: 18px 14px; margin: 0; }
.notif-all { display: block; padding: 11px 14px; text-align: center; font-weight: 700; text-decoration: none; }
.toasts { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { position: relative; display: grid; gap: 4px; padding: 12px 38px 12px 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(8,20,28,.22); font-size: 13px; animation: toast-in .25s ease-out; }
.toast.crit { border-left-color: var(--crit); }
.toast .pill { justify-self: start; }
.toast > span:first-child { overflow-wrap: anywhere; }
.toast-sub { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.toast a { font-weight: 700; justify-self: start; }
.toast-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 6px; }
.toast-x:hover { background: var(--sunken); color: var(--ink); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* dashboard grid / list switch */
.seg-links button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg-links button:hover { color: var(--ink); }
.seg-links button[aria-pressed="true"] { background: var(--btn); color: #fff; }
.view-switch { margin-left: auto; }
@media (min-width: 900px) {
  .server-grid.as-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .server-grid.as-list .srv { display: grid; grid-template-columns: minmax(170px, 1.3fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 2fr) minmax(150px, 1fr); grid-template-rows: auto auto; column-gap: 18px; align-items: center; padding: 10px 14px 10px 18px; }
  .as-list .srv-head { grid-column: 1; grid-row: 1; }
  .as-list .srv-meta { grid-column: 1; grid-row: 2; margin: 2px 0 0; }
  .as-list .m-cpu { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .as-list .m-ram { grid-column: 3; grid-row: 1 / 3; margin: 0; }
  .as-list [data-disks] { grid-column: 4; grid-row: 1 / 3; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; margin: 0; }
  .as-list [data-disks] .meter { margin: 0; }
  .as-list .srv-foot { grid-column: 5; grid-row: 1 / 3; margin: 0; padding: 0; border: 0; flex-direction: column; align-items: flex-end; gap: 2px; }
}

/* SSL checker overview */
.ssl-overview { margin-bottom: 16px; }
.ssl-overview .card-head p { margin: 4px 0 0; }
.ssl-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ssl-overview .table-wrap { box-shadow: none; }
.ssl-overview tr.sel td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ssl-overview tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.ssl-overview td { white-space: nowrap; }
.ssl-overview td[colspan] { white-space: normal; min-width: 260px; }
.ssl-actions { text-align: right; }
.ssl-actions form { display: inline; margin-left: 4px; }

/* load figures coloured by the load rules; shape repeats the status (triangle = warning, square = critical) */
.ld { font-weight: 700; }
.ld.ok { color: var(--ok); }
.ld.warn { color: var(--warn); }
.ld.crit { color: var(--crit); }
.ld.warn::before, .ld.crit::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 3px; vertical-align: 1px; background: currentColor; }
.ld.warn::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.ld.crit::before { border-radius: 1px; }

/* Limit resource */
.limits-head { justify-content: space-between; align-items: center; }
.limits-head p { margin: 0; max-width: 70ch; }
.limits-search { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.limits-search .field { margin: 0; }
.limits-search .q { font-size: 15px; }
.limit-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.limits-table td { vertical-align: top; }
.limit-row { cursor: pointer; }
.limit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.limit-row[aria-expanded="true"] td { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.limit-detail td { background: var(--sunken); }
.limit-detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.limit-actions { display: grid; gap: 10px; align-content: start; }
.release-form { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.release-form label { font-weight: 700; font-size: 12px; }
.row-btns { display: flex; gap: 8px; }
.row-btns form { display: inline; }
.chg { white-space: nowrap; font-family: var(--font-num); }
.chg s { color: var(--muted); }
.chg b { color: var(--warn); }
.why { max-width: 280px; overflow-wrap: anywhere; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.type-chip { font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.limit-form { max-width: 820px; display: grid; gap: 4px; }
.form-grid.three { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
.req { color: var(--crit); }
@media (max-width: 900px) {
  .limits-search, .limit-detail-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); }
}
.limit-badge { margin-left: 6px; vertical-align: 1px; }
.limit-banner { display: grid; gap: 8px; border: 1px solid var(--warn); border-left: 4px solid var(--warn); background: var(--warn-bg); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.limit-banner h3 { margin: 0; font-size: 14px; color: var(--warn); }
.limit-banner .kv { margin: 0; }
.limit-detail .kv, .limit-banner .kv { grid-template-columns: 130px minmax(0, 1fr); }
.limit-detail .kv dd, .limit-banner .kv dd { text-align: left; }
.limit-banner > .btn { justify-self: start; }
.limits-table td { white-space: nowrap; }
.limits-table td.why, .limits-table .limit-detail td { white-space: normal; }
.release-form .btn { justify-self: start; }
.limit-types { border: 0; padding: 0; margin: 0 0 8px; }
.limit-types legend { font-weight: 700; font-size: 12px; margin-bottom: 6px; padding: 0; }
.limit-type-grid { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.limit-type-grid .check { padding-top: 8px; }
.limit-type-grid input[type=text]:placeholder-shown:not(:focus) { background: var(--sunken); }
@media (max-width: 520px) { .limit-type-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .limit-type-grid > span:first-child { display: none; } .limit-type-grid .check { grid-column: 1 / -1; padding-top: 4px; } }

/* Storage VPS */
.storage-head p { margin: 0; max-width: 80ch; }
.storage-card { margin-bottom: 16px; }
.storage-card .table-wrap { box-shadow: none; }
.storage-table td { white-space: nowrap; }
.pctcell { display: grid; grid-template-columns: 52px minmax(90px, 1fr); gap: 8px; align-items: center; }
.kvm-storage { font-size: 12px; font-weight: 700; }
.kvm-storage.warn { color: var(--warn); }
.storage-table td:last-child { min-width: 170px; }
.storage-table td:nth-child(2) { white-space: normal; min-width: 180px; }
.alloc { font-size: 11.5px; color: var(--muted); margin-top: 2px; text-align: right; font-family: var(--font-num); }
.alloc.over, b.over { color: var(--warn); }
.alloc-note { margin: 8px 0 0; }

/* IP cell: copy button and "+N" popover */
.ip-copy, .ip-more { font: inherit; font-size: 11px; line-height: 1; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 6px; padding: 2px 5px; margin-left: 4px; cursor: pointer; vertical-align: 1px; }
.ip-copy:hover, .ip-more:hover, .ip-more[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.ip-copy.done { color: var(--ok); border-color: var(--ok); }
.ip-copy:focus-visible, .ip-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ip-pop { position: absolute; z-index: 60; min-width: 220px; max-width: min(420px, calc(100vw - 16px)); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(10, 25, 35, .18); padding: 8px; display: grid; gap: 8px; }
.ip-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ip-pop li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; overflow-wrap: anywhere; }
.ip-pop .btn { justify-self: start; }
