:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #63708a;
  --border: #dce3ef;
  --brand: #2f6ff7;
  --sidebar: #10192b;
  --sidebar-text: #dce7ff;
  --sidebar-muted: #8ea1cc;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); padding: 20px 16px; }
.brand { font-weight: 700; margin-bottom: 18px; }
.nav { display: grid; gap: 6px; }
.nav a { color: var(--sidebar-muted); text-decoration: none; border: 1px solid transparent; border-radius: 8px; padding: 10px; }
.nav a.active { color: #fff; background: rgba(47,111,247,.22); border-color: rgba(120,160,255,.35); }
.readonly-note { margin-top: 14px; font-size: 12px; color: var(--sidebar-muted); }
.main { padding: 18px 22px; }
.topbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.topbar h1 { margin: 0; font-size: 22px; }
.subtitle { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-right { display:flex; gap:8px; }
.pill { border:1px solid var(--border); background:var(--panel); border-radius:999px; padding:6px 10px; font-size:12px; }
.pill.muted { color: var(--muted); }
.card { background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:14px; }
.grid { display:grid; gap:12px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.muted { color: var(--muted); }
.notice { border-left: 4px solid var(--brand); background:#edf3ff; padding:10px 12px; border-radius:8px; margin-bottom:12px; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { text-align:left; padding:8px; border-bottom:1px solid var(--border); }
.clickable:hover { background:#f2f5fb; cursor:pointer; }
.row-between { display:flex; align-items:center; justify-content:space-between; gap:8px; }
button, select, input { font: inherit; padding: 8px 10px; border:1px solid var(--border); border-radius:8px; background:#fff; }
button.secondary { background:#f6f8fe; }
button:disabled { opacity:.5; cursor:not-allowed; }
.filter-grid { display:grid; gap:10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom:10px; }
.filter-grid label { display:grid; gap:5px; font-size:13px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.chip { text-transform:capitalize; }
.chip.active { border-color: var(--brand); background: #edf3ff; color: #1f54c4; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.spiderweb-canvas { position: relative; height: 460px; border:1px dashed var(--border); border-radius:12px; background: linear-gradient(180deg, #fbfcff, #f4f7fb); overflow:hidden; }
.spiderweb-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.node { position:absolute; transform:translate(-50%, -50%); border:1px solid var(--border); border-radius:999px; padding:8px 10px; background:#fff; text-align:center; min-width:120px; }
.node strong { display:block; font-size:12px; }
.node span { font-size:11px; color:var(--muted); }
.node-partner { min-width:170px; border-color:#9db7ff; background:#edf3ff; z-index:3; }
.node-customer { min-width:140px; z-index:2; }
.node-instance { min-width:auto; padding:6px 8px; border-radius:8px; font-size:11px; z-index:1; }
.tabs { display:flex; gap:8px; margin:8px 0 12px; flex-wrap:wrap; }
.tab { text-decoration:none; color:#274a9c; border:1px solid var(--border); border-radius:8px; padding:6px 10px; }
.tab.active { background:#edf3ff; border-color:#9db7ff; }
.modal { position:fixed; inset:0; background:rgba(10,16,34,.38); display:flex; align-items:center; justify-content:center; }
.modal.hidden { display:none; }
.modal-card { width:min(520px, 95vw); background:#fff; border-radius:12px; border:1px solid var(--border); padding:14px; display:grid; gap:10px; }
.modal-card label { display:grid; gap:4px; font-size:13px; }
pre { margin: 0; background:#f7f9ff; padding:8px; border-radius:8px; overflow:auto; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .filter-grid, .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
