/* Aufal MRTG — tampilan portal */
:root {
  --brand: #0b4ea2;
  --accent: #14b8a6;
  --sidebar: #0b1b33;
  --c-a: #22a447;
  --c-b: #1d4ed8;
  --bg: #f3f5f9;
  --card: #ffffff;
  --line: #e4e8ef;
  --line-soft: #eef1f5;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --ok: #15803d;
  --ok-bg: #e9f8ef;
  --err: #c62828;
  --err-bg: #fdecec;
  --warn: #b45309;
  --warn-bg: #fff6e5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
  --brand-soft: color-mix(in srgb, var(--brand) 9%, white);
  --brand-dark: color-mix(in srgb, var(--brand) 82%, black);
  --font: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: #f1f4f8; padding: 1px 5px; border-radius: 5px; color: var(--text-2); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-ok { color: var(--ok); } .text-err { color: var(--err); } .text-warn { color: var(--warn); }
.spacer { flex: 1; }
.pad { padding: 4px 2px 8px; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #c7d2e3; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30; }
.sb-brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-brand:hover { text-decoration: none; }
.sb-logo { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; flex: none; }
.sb-brand-text { display: flex; flex-direction: column; min-width: 0; }
.sb-brand-text strong { font-size: 15px; line-height: 1.2; }
.sb-brand-text small { font-size: 11.5px; color: #8fa1bb; line-height: 1.3; margin-top: 2px; }
.sb-nav { padding: 12px 10px; flex: 1; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #6d7f99; padding: 14px 10px 6px; font-weight: 600; }
.nav-link { display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 9px; color: #c7d2e3; font-weight: 500; margin: 1px 0; position: relative; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link.active { background: color-mix(in srgb, var(--brand) 55%, transparent); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sb-foot { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #8fa1bb; }
.sb-foot a { color: #b7c4d8; display: flex; gap: 6px; align-items: center; }
.sb-foot span { display: flex; gap: 6px; align-items: center; }
.sb-backdrop { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-height: 68px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-right form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 999px; color: var(--text); }
.user-chip:hover { background: var(--bg); text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: 13px; } .user-meta small { font-size: 11.5px; color: var(--muted); }
.icon-btn { border: 1px solid transparent; background: transparent; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: var(--bg); border-color: var(--line); }
.menu-btn { display: none; }
.content { padding: 24px 28px 32px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 28px 20px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head h2 .ic { color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-2-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row form { margin: 0; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; font-size: 13.5px; border: 1px solid transparent; cursor: pointer; line-height: 1.3; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--brand); background: var(--brand-soft); }
.btn-danger { background: var(--err); color: #fff; }
.btn-danger:hover { background: #a61f1f; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-bg); border-color: #f3c2c2; color: var(--err); }
.btn-sm { padding: 5px 9px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 11px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-pending { background: var(--warn-bg); color: var(--warn); }
.badge-muted { background: #f1f4f8; color: var(--muted); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #eef2f7; color: var(--text-2); font-size: 11.5px; font-weight: 600; margin: 1px 2px 1px 0; }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-link { background: var(--brand-soft); color: var(--brand); }
.role { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.role-admin { background: #fde8ef; color: #be185d; }
.role-operator { background: #ede9fe; color: #6d28d9; }
.role-customer { background: var(--brand-soft); color: var(--brand); }
.if-st { font-size: 12px; font-weight: 600; }
.if-up { color: var(--ok); } .if-down, .if-lowerDown { color: var(--err); } .if-notPresent, .if-unknown, .if-dormant, .if-testing { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: #f3f6fa; border: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover td { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.table .actions form { display: inline; margin: 0; }
.table-compact td { padding: 7px 10px; }
.table tr.total td { border-top: 1px solid var(--line); background: #fafbfd; }
.row-muted td { color: var(--muted); }
.row-muted td a { color: var(--muted); }
.dot-a, .dot-b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot-a { background: var(--c-a); } .dot-b { background: var(--c-b); height: 4px; vertical-align: 2px; }
.meter { display: inline-block; width: 60px; height: 6px; border-radius: 4px; background: #edf1f6; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.meter span.warm { background: #f59e0b; } .meter span.hot { background: var(--err); }

/* ---------------------------------------------------------------- forms */
.form-card { max-width: 980px; }
.form-section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); font-weight: 650; }
.form-section:first-of-type { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 4px; }
.form-grid + .form-grid { margin-top: 16px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-label em { color: var(--err); font-style: normal; }
.field-hint { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input[type=date], input:not([type]), select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: #fff; border: 1px solid #d5dbe5; border-radius: 9px; padding: 9px 11px; width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=file] { font: inherit; font-size: 13px; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; font-family: var(--mono); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.check span { display: flex; flex-direction: column; }
.check small { color: var(--muted); font-size: 12px; font-weight: 400; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid #d5dbe5; border-radius: 9px; overflow: hidden; }
.seg label { padding: 8px 14px; cursor: pointer; font-weight: 500; display: flex; gap: 7px; align-items: center; border-right: 1px solid #d5dbe5; }
.seg label:last-child { border-right: 0; }
.seg label:has(input:checked) { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.seg input { accent-color: var(--brand); }
.advanced { margin-top: 22px; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 14px; }
.advanced summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.advanced[open] summary { margin-bottom: 14px; }
.hint-box { background: #f6f8fb; border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.search-inline { display: flex; align-items: center; gap: 8px; border: 1px solid #d5dbe5; border-radius: 9px; padding: 0 10px; background: #fff; color: var(--muted); min-width: 240px; margin: 0; }
.search-inline input { border: 0; padding: 8px 0; box-shadow: none !important; background: transparent; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-bar select { width: auto; min-width: 160px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- flash */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash, .alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; border: 1px solid; font-size: 13.5px; }
.flash span, .alert > div { flex: 1; }
.flash-x { background: none; border: 0; font-size: 18px; line-height: 1; color: inherit; opacity: .55; cursor: pointer; padding: 0 2px; }
.flash-success { background: var(--ok-bg); border-color: #bfe6cc; color: #14532d; }
.flash-error, .alert-err { background: var(--err-bg); border-color: #f3c2c2; color: #7f1d1d; }
.flash-warning, .alert-warn { background: var(--warn-bg); border-color: #f6d9a8; color: #78350f; }
.flash-info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, white); color: var(--brand-dark); }

/* ---------------------------------------------------------------- KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi > div { display: flex; flex-direction: column; min-width: 0; }
.kpi small { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi strong { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.kpi-a .kpi-ic { background: color-mix(in srgb, var(--c-a) 13%, white); color: var(--c-a); }
.kpi-b .kpi-ic { background: color-mix(in srgb, var(--c-b) 12%, white); color: var(--c-b); }
.kpi-good .kpi-ic { background: var(--ok-bg); color: var(--ok); }
.kpi-bad .kpi-ic { background: var(--err-bg); color: var(--err); }
.kpi-bad strong { color: var(--err); }

.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl-tight { grid-template-columns: 1fr; gap: 2px; }
.dl-tight dd { margin-bottom: 8px; font-weight: 600; }
.runbar { display: flex; gap: 3px; margin-top: 16px; }
.runbar span { flex: 1; height: 22px; border-radius: 3px; background: var(--ok); opacity: .75; }
.runbar span.warn { background: #f59e0b; } .runbar span.bad { background: var(--err); }

/* ---------------------------------------------------------------- dashboard pelanggan */
.hero-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--radius); color: #fff;
  background: linear-gradient(120deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 60%, var(--accent)) 100%); box-shadow: var(--shadow); flex-wrap: wrap; }
.hero-strip p { margin: 2px 0 0; opacity: .92; }
.eyebrow { font-size: 18px; font-weight: 700; }
.hero-meta { display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.14); padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.svc-card { color: var(--text); display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.svc-card:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: 0 6px 20px rgba(15,23,42,.08); transform: translateY(-1px); }
.svc-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.svc-head h3 { font-size: 16px; }
.svc-now { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.now { display: flex; gap: 10px; align-items: center; background: #f7f9fc; border-radius: 10px; padding: 10px 12px; }
.now small { display: block; color: var(--muted); font-size: 12px; }
.now strong { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.now > div { min-width: 0; }
.now-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.now.a .now-ic { background: color-mix(in srgb, var(--c-a) 15%, white); color: var(--c-a); }
.now.b .now-ic { background: color-mix(in srgb, var(--c-b) 13%, white); color: var(--c-b); }
.spark-wrap { position: relative; height: 64px; border-radius: 8px; background: linear-gradient(#fbfcfe, #fff); border: 1px solid var(--line-soft); overflow: hidden; }
.spark { width: 100%; height: 100%; display: block; }
.spark-label { position: absolute; top: 5px; right: 8px; font-size: 10.5px; color: var(--muted); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 4px; }
.svc-foot { display: flex; gap: 18px; align-items: flex-end; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.svc-foot small { display: block; color: var(--muted); font-size: 12px; }
.svc-foot strong { font-variant-numeric: tabular-nums; }
.svc-go { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }

/* ---------------------------------------------------------------- halaman layanan */
.svc-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.svc-header-main { flex: 1; min-width: 280px; }
.svc-title-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.svc-title-row h2 { font-size: 21px; }
.svc-desc { margin: 10px 0 0; }
.svc-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.svc-header-actions form { margin: 0; }
.graph-stack { display: flex; flex-direction: column; gap: 20px; }
.graph-card { padding: 10px 12px 12px; }
.graph-wrap { position: relative; }
.graph-wrap svg.tgraph { width: 100%; height: auto; display: block; }
.graph-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 8px 0; border-top: 1px solid var(--line-soft); margin-top: 4px; flex-wrap: wrap; }
.graph-tip { position: absolute; pointer-events: none; background: rgba(15, 23, 42, .94); color: #fff; padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.55; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.18); z-index: 5; font-variant-numeric: tabular-nums; }
.graph-tip b { display: block; font-weight: 600; margin-bottom: 2px; color: #cbd5e1; }
.graph-tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }
.legend-note { margin: 0; }

/* laporan */
.report-form { display: flex; flex-direction: column; gap: 14px; }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 13px; border-radius: 999px; background: #f1f4f8; color: var(--text-2); font-weight: 600; font-size: 13px; border: 1px solid transparent; }
.pill:hover { text-decoration: none; border-color: var(--line); background: #fff; }
.pill.active { background: var(--brand); color: #fff; }
.range-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.field.compact { width: 180px; }
.report-id { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.report-id > div { display: flex; flex-direction: column; min-width: 0; }
.report-id small { color: var(--muted); font-size: 12px; }
.report-id strong { font-size: 15px; }
.stat-table td { font-size: 14px; }

/* pengaturan */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.settings-layout .form-card { max-width: none; }
.side-info h3 { font-size: 14px; display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.logo-row { display: flex; gap: 20px; align-items: flex-start; }
.logo-preview { width: 120px; height: 120px; border: 1px dashed var(--line); border-radius: 12px; display: grid; place-items: center; background: repeating-conic-gradient(#f3f5f8 0% 25%, #fff 0% 50%) 50% / 16px 16px; flex: none; }
.logo-preview img { max-width: 96px; max-height: 96px; }
.color-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.color-field { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.color-field input[type=color] { width: 40px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.color-field span { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12.5px; }
.color-field span input { padding: 4px 7px; font-family: var(--mono); font-size: 12.5px; }

/* misc */
.empty-state { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--text); }
.empty-state p { max-width: 520px; margin: 0; }
.empty-state.big { padding: 80px 20px; }
.empty-code { font-size: 64px; font-weight: 800; color: var(--brand); letter-spacing: -.03em; line-height: 1; }
.error-bare { min-height: 100vh; display: grid; place-items: center; }
.secret-box { display: flex; gap: 12px; align-items: center; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.secret-box code { font-size: 20px; letter-spacing: .06em; background: none; flex: 1; color: var(--text); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding-top: 14px; }
.dialog { border: 0; border-radius: 14px; padding: 22px 24px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(15,23,42,.3); }
.dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog h3 { margin-bottom: 8px; }
.dialog input { margin-top: 8px; }
.print-header { display: none; }

/* ---------------------------------------------------------------- login */
.page-login { background: #fff; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 45%),
  linear-gradient(150deg, var(--sidebar) 0%, color-mix(in srgb, var(--brand) 75%, var(--sidebar)) 100%); }
.login-net { position: absolute; right: -80px; bottom: -60px; width: 620px; height: 620px; color: color-mix(in srgb, var(--accent) 70%, white); opacity: .28; }
.login-hero-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; gap: 40px; }
.login-brand { display: flex; gap: 14px; align-items: center; }
.login-brand strong { display: block; font-size: 20px; }
.login-brand span { font-size: 13px; opacity: .8; }
.login-logo { width: 54px; height: 54px; border-radius: 14px; background: #fff; padding: 6px; object-fit: contain; }
.login-pitch h2 { font-size: 34px; line-height: 1.2; max-width: 520px; letter-spacing: -.02em; }
.login-pitch ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.login-pitch li { display: flex; gap: 12px; align-items: center; opacity: .95; }
.login-pitch li .ic { width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: rgba(255,255,255,.12); }
.login-contact { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; opacity: .85; }
.login-contact span { display: flex; gap: 7px; align-items: center; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { font-size: 26px; }
.login-card p { margin: -8px 0 4px; }
.login-logo-sm { display: none; width: 56px; height: 56px; object-fit: contain; }
.login-foot { text-align: center; margin-top: 10px !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-layout { grid-template-columns: 1fr; }
  .report-id { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }
  .menu-btn { display: grid; }
  .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-logo-sm { display: block; }
}
@media (max-width: 640px) {
  .content { padding: 16px; gap: 16px; }
  .topbar { padding: 10px 16px; }
  .user-meta { display: none; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-ic { display: none; }
  .kpi strong { font-size: 17px; }
  .form-grid, .color-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .search-inline { min-width: 0; width: 100%; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .app-footer { padding: 12px 16px; }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
}

/* ---------------------------------------------------------------- cetak */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .sidebar, .topbar, .app-footer, .no-print, .flashes, .graph-actions, .sb-backdrop, .menu-btn { display: none !important; }
  .app { display: block; }
  .content { padding: 0; gap: 10px; }
  .card, .kpi { box-shadow: none; border-color: #d7dde6; break-inside: avoid; }
  .graph-card { break-inside: avoid; }
  .print-header { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: 10px; margin-bottom: 6px; }
  .print-header img { width: 46px; height: 46px; object-fit: contain; }
  .print-header strong { display: block; font-size: 16px; color: var(--brand); }
  .print-header span { font-size: 11px; color: var(--muted); }
  .print-meta { margin-left: auto; text-align: right; font-size: 10.5px; color: var(--muted); }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .table-wrap { overflow: visible; }
  a { color: inherit; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ================================================================ v1.1 — penyempurnaan tampilan */
:root { --bg: #f4f6fa; --line: #e3e8ef; --line-soft: #edf1f6; --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .045); }
body { letter-spacing: -.003em; }
.sidebar { background: linear-gradient(180deg, color-mix(in srgb, var(--sidebar) 92%, white) 0%, var(--sidebar) 38%); }
.sb-logo { border-radius: 11px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.topbar { min-height: 64px; }
.topbar-title h1 { font-size: 18px; font-weight: 650; }
.card { transition: box-shadow .15s; }
.alert-info { background: color-mix(in srgb, var(--brand) 6%, white); border-color: color-mix(in srgb, var(--brand) 20%, white); color: var(--brand-dark); }
.alert-info .ic { color: var(--brand); }

/* header layanan */
.svc-hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; position: relative; overflow: hidden; }
.svc-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.svc-hero-main { flex: 1; min-width: 300px; }
.svc-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.svc-hero-actions form { margin: 0; }
.svc-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 14px 0 0; }
.svc-facts div { display: flex; flex-direction: column; min-width: 0; }
.svc-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.svc-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; color: var(--text); }
.svc-facts dd .muted { font-weight: 500; }
.kpi-na { font-size: 15px !important; font-weight: 600 !important; color: #94a3b8; }

/* kartu grafik */
.graph-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 680px), 1fr)); gap: 20px; }
.gcard { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.gcard-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 6px; }
.gcard-title h3 { font-size: 15px; font-weight: 650; }
.gcard-title span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.gcard-tools { display: flex; gap: 6px; align-items: center; }
.pchip { font-size: 12px; color: var(--text-2); background: #f3f6fa; border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pchip strong { font-variant-numeric: tabular-nums; }
.icon-btn-sm { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.icon-btn-sm:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); background: var(--brand-soft); }
.gcard .graph-wrap { padding: 2px 10px 0 4px; }
.gcard .graph-wrap svg.tgraph { width: 100%; height: auto; }
.gstats-wrap { overflow-x: auto; border-top: 1px solid var(--line-soft); margin-top: 6px; }
.gstats { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.gstats th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; text-align: right; padding: 10px 20px 4px 8px; white-space: nowrap; }
.gstats td { text-align: right; padding: 5px 20px 5px 8px; white-space: nowrap; color: var(--text-2); }
.gstats th:first-child, .gstats td:first-child { text-align: left; padding-left: 20px; font-weight: 600; color: var(--text); }
.gstats tbody tr:last-child td { padding-bottom: 14px; }
.gstats .na { color: #b6c0cd; }
.gnote { margin: -6px 20px 12px; font-size: 12px; color: var(--warn); }
.dot-cir { display: inline-block; width: 14px; height: 0; border-top: 2px dashed #dc2626; margin-right: 6px; vertical-align: 3px; }
.legend-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.graph-tip { border-radius: 10px; backdrop-filter: blur(4px); }

@media (max-width: 640px) {
  .gcard-head { padding: 14px 14px 4px; }
  .gstats th:first-child, .gstats td:first-child { padding-left: 14px; }
  .svc-facts { gap: 10px 20px; }
  .pchip { display: none; }
}
@media print {
  .graph-grid { grid-template-columns: 1fr; gap: 10px; }
  .gcard { break-inside: avoid; }
  .svc-hero::before { display: none; }
  .alert { display: none; }
}
svg.tg-mob { display: none !important; }
.gcard .graph-wrap svg.tg-desk { max-width: 1000px; margin: 0 auto; display: block; }
@media (max-width: 640px) {
  svg.tg-desk { display: none !important; }
  svg.tg-mob { display: block !important; width: 100%; height: auto; }
  .gcard .graph-wrap { padding: 2px 6px 0 2px; }
}
@media print { svg.tg-mob { display: none !important; } svg.tg-desk { display: block !important; } }

/* ================================================================ v1.2 — SLA */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar form { margin: 0; }
.toolbar select { width: auto; min-width: 200px; }
.month-select { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #d5dbe5; border-radius: 10px; padding: 0 4px 0 12px; color: var(--brand); }
.month-select select { border: 0; box-shadow: none !important; font-weight: 600; padding: 9px 8px; min-width: 170px; background: transparent; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.badge.big { font-size: 13px; padding: 5px 12px 5px 10px; }
.card-alert { border-color: #f3c2c2; box-shadow: 0 0 0 3px rgba(198, 40, 40, .06), var(--shadow); }
.card-alert .card-head h2 .ic { color: var(--err); }
.alert a { font-weight: 600; }
.notice { align-items: flex-start; }
.print-only { display: none; }

.sla-hero { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; position: relative; overflow: hidden; }
.sla-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.sla-score { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-right: 28px; border-right: 1px solid var(--line-soft); }
.sla-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.sla-big { font-size: 46px; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--text); }
.sla-big.ok { color: var(--ok); } .sla-big.bad { color: var(--err); }
.sla-bar { position: relative; width: 100%; height: 10px; border-radius: 6px; background: #edf1f6; margin-top: 18px; }
.sla-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--ok); }
.sla-bar .fill.bad { background: var(--err); }
.sla-bar .mark { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--text); border-radius: 1px; }
.sla-bar .mark em { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; color: var(--text-2); white-space: nowrap; margin-bottom: 2px; font-weight: 600; }
.sla-scale { display: flex; justify-content: space-between; width: 100%; font-size: 11px; color: var(--muted); }
.sla-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px 24px; margin: 0; align-content: start; }
.sla-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.sla-facts dd { margin: 3px 0 0; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.sla-facts dd small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }

.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; text-align: center; padding-bottom: 2px; }
.cal-d { border-radius: 9px; padding: 8px 10px; min-height: 58px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid transparent; }
.cal-d.blank { background: transparent; }
.cal-n { font-size: 12px; font-weight: 700; opacity: .75; }
.cal-v { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cal-d.ok, .cal-legend i.ok { background: #e7f6ec; color: #166534; }
.cal-d.warn, .cal-legend i.warn { background: #fff4dc; color: #92400e; }
.cal-d.bad, .cal-legend i.bad { background: #fde7e7; color: #991b1b; }
.cal-d.nodata, .cal-legend i.nodata { background: #f1f4f8; color: #94a3b8; }
.cal-d.none, .cal-d.future { background: #fafbfc; color: #c3cad5; border-color: var(--line-soft); }
.note-internal { margin-top: 4px; color: #6d28d9; display: flex; gap: 4px; align-items: center; }
.empty-state.slim { padding: 22px; }
.info-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.exclude-box { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; background: #fbfcfe; }
.sla-notes h3 { font-size: 14px; margin-bottom: 8px; }
.sla-notes ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.7; }

@media (max-width: 900px) {
  .sla-hero { grid-template-columns: 1fr; }
  .sla-score { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; }
}
@media (max-width: 640px) {
  .cal { gap: 3px; }
  .cal-d { padding: 5px 4px; min-height: 44px; border-radius: 6px; }
  .cal-v { font-size: 9.5px; text-align: center; }
  .sla-big { font-size: 38px; }
  .toolbar select, .month-select select { min-width: 0; }
}
@media print {
  .print-only { display: block; }
  .sla-hero { grid-template-columns: 260px 1fr; }
  .tabs { display: none; }
  .cal-d { min-height: 40px; padding: 4px 6px; }
}
@media (max-width: 640px) {
  .sla-facts { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .sla-facts dd { font-size: 14.5px; }
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0 !important; border: 0 !important; text-align: right; white-space: normal !important; }
  .table-stack td:first-child { text-align: left; }
  .table-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; flex: none; }
  .table-stack td[data-label="#"] { display: none; }
  .table-stack td.actions { justify-content: flex-end; }
  .table-stack td.actions:empty { display: none; }
}
.table-stack td > .cell { text-align: right; } @media (min-width: 641px) { .table-stack td > .cell { text-align: inherit; } }

/* ================================================================ v1.3 — dashboard kustom */
.nav-label-row { display: flex; align-items: center; justify-content: space-between; padding-right: 6px; }
.nav-label-row a { color: #8fa1bb; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.nav-label-row a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-sub { padding-top: 7px; padding-bottom: 7px; font-size: 13.5px; }
.nav-sub span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-dot { width: 18px; display: grid; place-items: center; flex: none; }
.nav-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #5b6f8c; }
.nav-sub.active .nav-dot::before { background: var(--accent); }
.hide-sm { }
.btn.active { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }

/* daftar dashboard & preset */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.dash-card { padding: 0; display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.dash-card:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: 0 6px 20px rgba(15,23,42,.07); }
.dash-card-main { display: flex; gap: 14px; padding: 18px 18px 14px; color: var(--text); flex: 1; }
.dash-card-main:hover { text-decoration: none; }
.dash-card-main h3 { font-size: 15.5px; margin-bottom: 2px; }
.dash-card-main p { margin: 0; }
.dash-card-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.dash-card footer { display: flex; align-items: center; gap: 6px; padding: 10px 14px 10px 18px; border-top: 1px solid var(--line-soft); background: #fbfcfe; flex-wrap: wrap; }
.dash-card footer form { margin: 0; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.preset { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); cursor: pointer; transition: border-color .12s, background .12s; }
.preset:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.preset strong { font-size: 14px; }
.preset span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.preset-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid !important; place-items: center; margin-bottom: 6px; }
.preset-radio .preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset-radio .preset:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.preset-radio .preset:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.preset-radio + .form-grid { margin-top: 16px; }

/* form widget */
.chip-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid #d5dbe5; background: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-check input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.check-list { margin-top: 10px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.check-row:last-child { border-bottom: 0; }
.check-row:hover { background: #fafcff; }
.check-row input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.check-row span { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.check-row small { color: var(--muted); font-size: 12px; }
.style-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.style-opt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; position: relative; }
.style-opt input { position: absolute; opacity: 0; pointer-events: none; }
.style-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.style-opt small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.style-art { height: 46px; border-radius: 7px; background: #f6f8fb; overflow: hidden; margin-bottom: 6px; display: block; border: 1px solid var(--line-soft); }
.style-art svg { width: 100%; height: 100%; display: block; }
.form-grid + .form-section, .info-row + .form-grid + .form-section { margin-top: 28px; }

/* grid dashboard */
.dash-toolbar .dash-desc { margin: 0; max-width: 520px; }
.edit-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 7%, white);
  border: 1px dashed color-mix(in srgb, var(--brand) 40%, white); color: var(--brand-dark); flex-wrap: wrap; font-size: 13.5px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; align-items: start; }
.widget { padding: 0; display: flex; flex-direction: column; min-width: 0; grid-column: span 6; }
.w-3 { grid-column: span 3; } .w-4 { grid-column: span 4; } .w-6 { grid-column: span 6; }
.w-8 { grid-column: span 8; } .w-9 { grid-column: span 9; } .w-12 { grid-column: span 12; }
.widget-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; min-height: 52px; }
.widget-title { flex: 1; min-width: 0; }
.widget-title h3 { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-title span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.widget-tools { display: flex; gap: 6px; align-items: center; }
.widget-tools form { margin: 0; }
.widget-tools select { width: auto; padding: 5px 8px; font-size: 12.5px; }
.widget-body { padding: 4px 16px 16px; min-height: 60px; position: relative; }
.widget-graph .widget-body, .widget-graph .graph-wrap { padding-left: 4px; padding-right: 4px; }
.widget-loading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px; color: var(--muted); font-size: 13px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.widget-empty { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.widget-empty.ok { color: var(--ok); font-weight: 600; }
.widget-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.widget-failed .widget-head h3::after { content: " •"; color: var(--err); }
.edit-only { display: none !important; }
.dash-grid.editing .edit-only { display: flex !important; }
.dash-grid.editing .widget { outline: 1px dashed color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 3px; }
.drag-handle { cursor: grab; color: var(--muted); width: 26px; height: 26px; border-radius: 7px; place-items: center; align-items: center; justify-content: center; flex: none; user-select: none; }
.drag-handle:hover { background: var(--brand-soft); color: var(--brand); }
.widget.dragging { opacity: .45; }
.widget.drop-before { box-shadow: -4px 0 0 0 var(--brand), var(--shadow); }
.widget.drop-after { box-shadow: 4px 0 0 0 var(--brand), var(--shadow); }

/* widget: grafik */
.widget .graph-wrap svg.tgraph { width: 100%; height: auto; display: block; }
.gsum { display: flex; gap: 6px 22px; flex-wrap: wrap; font-size: 13px; padding: 8px 8px 0; border-top: 1px solid var(--line-soft); margin-top: 6px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.gsum small { color: var(--muted); font-size: 12px; }
.gsum strong { color: var(--text); }
.legend-wrap { overflow-x: auto; border-top: 1px solid var(--line-soft); margin-top: 6px; max-height: 340px; overflow-y: auto; }
.legend-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.legend-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 7px 8px 3px; text-align: right; white-space: nowrap; position: sticky; top: 0; background: #fff; }
.w-3 .lg-avg, .w-4 .lg-avg, .w-6 .lg-avg { display: none; }
.legend-table td { padding: 4px 8px; text-align: right; white-space: nowrap; color: var(--text-2); border-top: 1px solid #f3f5f8; }
.legend-table td:first-child, .legend-table th:first-child { width: 18px; padding-right: 0; }
.legend-table .lg-name, .legend-table th:nth-child(2) { text-align: left; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.legend-table .lg-name small { color: var(--muted); }
.legend-table tr.total td { font-weight: 700; color: var(--text); border-top: 1px solid var(--line); }
.legend-table .na, .gsum .na { color: #b6c0cd; }
.sw { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; }
.graph-tip .tt-row { display: grid; grid-template-columns: 12px minmax(0, 190px) auto auto; gap: 8px; align-items: center; }
.graph-tip .tt-n { overflow: hidden; text-overflow: ellipsis; }
.graph-tip .tt-total { border-top: 1px solid rgba(255,255,255,.2); margin-top: 3px; padding-top: 3px; font-weight: 700; }
.graph-tip .tt-more { color: #94a3b8; font-size: 11px; }

/* widget: mini-grafik */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.w-3 .tiles, .w-4 .tiles { grid-template-columns: 1fr; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: #fff; min-width: 0; transition: border-color .12s, box-shadow .12s; position: relative; }
.tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: 0 4px 14px rgba(15,23,42,.07); }
.tile-head { display: flex; gap: 7px; align-items: center; min-width: 0; }
.tile-head strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.tile-spark { height: 54px; border-radius: 6px; background: #fbfcfe; overflow: hidden; }
.tile-spark svg { width: 100%; height: 100%; display: block; }
.tile-now { display: flex; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.tile-now .a { color: color-mix(in srgb, var(--c-a) 80%, black); font-weight: 600; }
.tile-now .b { color: var(--c-b); font-weight: 600; }
.tile-now .u { margin-left: auto; color: var(--muted); font-weight: 600; }
.tile-now .u.warm { color: var(--warn); } .tile-now .u.hot { color: var(--err); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: none; }
.st-ok .st-dot { background: var(--ok); }
.st-down .st-dot, .st-error .st-dot { background: var(--err); box-shadow: 0 0 0 3px rgba(198,40,40,.15); }
.tile.st-down, .tile.st-error { border-color: #f3c2c2; background: #fffafa; }

/* widget: top */
.top-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.top-table td { padding: 7px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.top-table tr:last-child td { border-bottom: 0; }
.top-table .rank { width: 26px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.top-name { max-width: 0; width: 38%; }
.top-name a { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-name small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bars { width: 46%; }
.bar { position: relative; height: 16px; border-radius: 4px; background: #f3f6fa; margin: 2px 0; overflow: hidden; }
.bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.bar .ba { background: color-mix(in srgb, var(--c-a) 45%, white); }
.bar .bb { background: color-mix(in srgb, var(--c-b) 30%, white); }
.bar em { position: relative; font-style: normal; font-size: 11px; font-weight: 600; padding-left: 6px; line-height: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.top-util { text-align: right; width: 50px; font-variant-numeric: tabular-nums; }

/* widget: status */
.status-sum { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ss { display: flex; align-items: center; gap: 6px; }
.ss i { width: 10px; height: 10px; border-radius: 3px; }
.ss.ok i { background: var(--ok); } .ss.down i { background: var(--err); } .ss.pending i { background: #cbd5e1; }
.status-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 5px; }
.sbox { font-size: 11.5px; font-weight: 600; padding: 6px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.sbox:hover { text-decoration: none; filter: brightness(1.08); }
.sbox.st-ok { background: #1f9d55; } .sbox.st-down, .sbox.st-error { background: #d93636; animation: pulse 2s ease-in-out infinite; }
.sbox.st-pending { background: #e2e8f0; color: #64748b; }
@keyframes pulse { 50% { filter: brightness(1.18); } }

/* widget: ringkasan angka */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kstat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 11px; background: #f7f9fc; border: 1px solid var(--line-soft); min-width: 0; }
.kstat small { color: var(--muted); font-size: 12px; font-weight: 500; }
.kstat strong { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kstat > span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kstat.ka { border-left: 3px solid var(--c-a); } .kstat.kb { border-left: 3px solid var(--c-b); }
.kstat.kbad strong { color: var(--err); } .kstat.kgood strong { color: var(--ok); }
.kunit { font-size: 13px; font-weight: 600; }

/* widget: gangguan & catatan */
.inc-list { list-style: none; margin: 0; padding: 0; }
.inc { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.inc:last-child { border-bottom: 0; }
.inc > div { flex: 1; min-width: 0; }
.inc small { color: var(--muted); }
.inc-meta { display: block; color: var(--muted); font-size: 12px; }
.inc-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; margin-top: 5px; flex: none; }
.inc.open .inc-dot { background: var(--err); box-shadow: 0 0 0 3px rgba(198,40,40,.15); }
.inc-dur { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inc.open .inc-dur { color: var(--err); }
.note-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--text-2); overflow-wrap: anywhere; }

/* mode TV NOC */
body.tv-mode .sidebar, body.tv-mode .topbar, body.tv-mode .app-footer, body.tv-mode .sb-backdrop { display: none !important; }
body.tv-mode .app { grid-template-columns: 1fr; }
body.tv-mode .content { padding: 14px 18px 18px; gap: 14px; }
body.tv-mode .dash-grid { gap: 14px; }
.tv-head { display: flex; align-items: center; gap: 14px; }
.tv-head img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 3px; }
.tv-head strong { display: block; font-size: 19px; }
.tv-head span { font-size: 12.5px; color: var(--muted); }
.tv-clock { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text) !important; }
.tv-updated { font-size: 12px; }
.tv-exit { opacity: .55; } .tv-exit:hover { opacity: 1; }

@media (max-width: 1280px) {
  .w-3 { grid-column: span 6; } .w-4 { grid-column: span 6; } .w-8, .w-9 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .widget, .w-3, .w-4, .w-6, .w-8, .w-9, .w-12 { grid-column: 1 / -1; }
  .style-pick { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .widget .graph-wrap svg.tg-desk { display: none !important; }
  .widget .graph-wrap svg.tg-mob { display: block !important; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile-now .u { margin-left: 0; }
  .widget-head { padding: 12px 12px 4px; }
  .widget-body { padding: 4px 12px 12px; }
  .top-bars { width: 40%; }
  .tv-head span:not(.tv-clock) { display: none; }
}
.table .chk { width: 32px; padding-right: 0; }
.table .chk input { width: 16px; height: 16px; accent-color: var(--brand); }
.bulk-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 12px;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: 0 10px 30px rgba(15,23,42,.14); }
.bulk-bar > strong { align-self: center; }
.bulk-field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.bulk-field input, .bulk-field select { width: auto; min-width: 160px; padding: 7px 9px; font-size: 13px; }
@media (max-width: 640px) {
  .legend-table .lg-avg, .legend-table .lg-max { display: none; }
  .legend-table .lg-name { max-width: 150px; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kstat { padding: 10px 11px; }
  .kstat strong { font-size: 16.5px; }
  .kstat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .legend-table { font-size: 11.5px; }
  .legend-table th, .legend-table td { padding: 4px 5px; }
  .legend-table .lg-name { max-width: 118px; }
}
