/* ================= VIMS section — scoped styles ================= */
.vims-scope{display:block;}

.vims-scope{
  --brand:#2a5bd7; --brand-dark:#1e40af; --brand-soft:rgba(42,91,215,0.1);
  --page:#f4f6fb; --surface-1:#ffffff; --surface-2:#f8fafc; --sidebar:#0f1b34; --sidebar-2:#16264a;
  --sidebar-text:#c7d2e8; --sidebar-dim:#7f92b8; --sidebar-border:rgba(255,255,255,0.08);
  --text-1:#0f1b2d; --text-2:#5a6b85; --border:#e3e8f0; --grid:#eef1f6;
  --good:#0ca30c; --good-soft:rgba(12,163,12,0.1); --warn:#c77800; --warn-soft:rgba(199,120,0,0.12);
  --crit:#d03b3b; --crit-soft:rgba(208,59,59,0.1); --info:#2a78d6; --info-soft:rgba(42,120,214,0.1);
  --purple:#6a4bbf; --teal:#159b8a;
  --s1:#2a78d6; --s2:#1baf7a; --s3:#e0a52b; --s4:#d0603b; --s5:#6a4bbf; --s6:#159b8a; --s7:#c2477f; --s8:#4a7a2f;
  --ease:cubic-bezier(.4,0,.2,1);
  --shadow:0 1px 2px rgba(16,30,54,.06),0 2px 8px rgba(16,30,54,.05);
}
.vims-scope *{box-sizing:border-box;margin:0;padding:0;}
.vims-scope{font-family:'Segoe UI',system-ui,-apple-system,sans-serif;background:var(--page);color:var(--text-1);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;}
.vims-scope button{font-family:inherit;cursor:pointer;}
.vims-scope a{color:var(--brand);text-decoration:none;}
.vims-scope .mono{font-family:'SF Mono',ui-monospace,Menlo,Consolas,monospace;font-size:.92em;}
.vims-scope .small{font-size:12px;}
.vims-scope .muted{color:var(--text-2);}
.vims-scope .right{text-align:right;}
.vims-scope /* Layout */
#app{display:flex;min-height:100vh;}
.vims-scope #sidebar{width:256px;background:linear-gradient(180deg,var(--sidebar),var(--sidebar-2));color:var(--sidebar-text);display:flex;flex-direction:column;position:fixed;top:0;bottom:0;left:0;z-index:30;transition:width .2s var(--ease);}
.vims-scope #sidebar.collapsed{width:64px;}
.vims-scope .brand{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid var(--sidebar-border);}
.vims-scope .brand-logo{width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,#3b82f6,#8b5cf6);display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;flex-shrink:0;font-size:15px;}
.vims-scope .brand-txt{font-weight:800;font-size:15px;color:#fff;line-height:1.15;}
.vims-scope .brand-txt span{display:block;font-size:10px;font-weight:600;color:var(--sidebar-dim);letter-spacing:.03em;}
.vims-scope #sidebar.collapsed .brand-txt,
.vims-scope #sidebar.collapsed .nav-group-head .gtext,
.vims-scope #sidebar.collapsed .navlink .lbl,
.vims-scope #sidebar.collapsed .nbadge,
.vims-scope #sidebar.collapsed #sidebar-foot{display:none;}
.vims-scope #sidebar-nav{flex:1;overflow-y:auto;padding:8px 10px;}
.vims-scope #sidebar-nav::-webkit-scrollbar{width:6px;}
.vims-scope #sidebar-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:3px;}
.vims-scope .nav-group{margin-bottom:4px;}
.vims-scope .nav-group-head{display:flex;align-items:center;gap:7px;padding:8px 10px 4px;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--sidebar-dim);}
.vims-scope .navlink{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;color:var(--sidebar-text);font-size:13px;font-weight:500;cursor:pointer;transition:background .12s,color .12s;position:relative;}
.vims-scope .navlink:hover{background:rgba(255,255,255,.06);color:#fff;}
.vims-scope .navlink.active{background:var(--brand);color:#fff;font-weight:600;}
.vims-scope svg.ic{width:17px;height:17px;flex-shrink:0;vertical-align:-3px;}
.vims-scope .navlink .ic{width:17px;height:17px;flex-shrink:0;opacity:.9;}
.vims-scope .navlink .lbl{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.vims-scope .nbadge{background:rgba(255,255,255,.15);color:#fff;font-size:10.5px;font-weight:700;padding:1px 6px;border-radius:9px;min-width:18px;text-align:center;}
.vims-scope .nbadge.alert{background:var(--crit);}
.vims-scope #sidebar-foot{padding:10px 14px;border-top:1px solid var(--sidebar-border);font-size:11px;color:var(--sidebar-dim);}
.vims-scope #main{flex:1;margin-left:256px;transition:margin .2s var(--ease);min-width:0;}
.vims-scope #main.wide{margin-left:64px;}
.vims-scope #topbar{height:58px;background:var(--surface-1);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;padding:0 20px;position:sticky;top:0;z-index:20;}
.vims-scope .icon-btn{width:34px;height:34px;border-radius:8px;border:1px solid var(--border);background:var(--surface-1);display:flex;align-items:center;justify-content:center;color:var(--text-2);}
.vims-scope .icon-btn:hover{background:var(--surface-2);color:var(--text-1);}
.vims-scope .topsearch{flex:1;max-width:440px;position:relative;}
.vims-scope .topsearch input{width:100%;padding:8px 12px 8px 34px;border:1px solid var(--border);border-radius:9px;background:var(--surface-2);font-size:13px;}
.vims-scope .topsearch svg{position:absolute;left:10px;top:9px;width:16px;height:16px;color:var(--text-2);}
.vims-scope .env-chip{display:flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid var(--border);border-radius:20px;font-size:12px;font-weight:600;color:var(--text-2);}
.vims-scope .dot{width:8px;height:8px;border-radius:50%;background:var(--good);box-shadow:0 0 0 3px var(--good-soft);}
.vims-scope .role-select{padding:7px 10px;border:1px solid var(--border);border-radius:9px;background:var(--surface-1);font-size:12.5px;font-weight:600;color:var(--text-1);max-width:230px;}
.vims-scope .who{display:flex;align-items:center;gap:8px;}
.vims-scope .avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--purple));color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12px;}
.vims-scope #main-inner{padding:22px 24px 60px;max-width:1440px;}
.vims-scope .page-title{font-size:22px;font-weight:800;letter-spacing:-.01em;}
.vims-scope .page-sub{color:var(--text-2);font-size:13px;margin:3px 0 18px;max-width:900px;}
.vims-scope .section-title{font-size:13px;font-weight:700;margin:20px 0 12px;}
.vims-scope /* Cards */
.card{background:var(--surface-1);border:1px solid var(--border);border-radius:13px;padding:16px 18px;box-shadow:var(--shadow);}
.vims-scope .card.hoverable{transition:box-shadow .15s,transform .15s;}
.vims-scope .card.hoverable:hover{box-shadow:0 4px 18px rgba(16,30,54,.09);}
.vims-scope .grid{display:grid;gap:14px;}
.vims-scope .grid-2{grid-template-columns:repeat(2,1fr);}
.vims-scope .grid-3{grid-template-columns:repeat(3,1fr);}
.vims-scope .grid-4{grid-template-columns:repeat(4,1fr);}
.vims-scope @media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,1fr);}.grid-3{grid-template-columns:repeat(2,1fr);}}
.vims-scope /* KPI */
.kpi{position:relative;overflow:hidden;}
.vims-scope .kpi::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--kpi,var(--brand));}
.vims-scope .kpi .klabel{font-size:11.5px;color:var(--text-2);font-weight:600;text-transform:uppercase;letter-spacing:.03em;}
.vims-scope .kpi .kval{font-size:24px;font-weight:800;margin-top:4px;font-variant-numeric:tabular-nums;}
.vims-scope .kpi .kdelta{font-size:11.5px;color:var(--text-2);margin-top:2px;}
.vims-scope .kpi .kchip{position:absolute;top:14px;right:14px;width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--kpi-soft,var(--brand-soft));color:var(--kpi,var(--brand));}
.vims-scope /* hero */
.hero{background:linear-gradient(120deg,#13275a,#2a5bd7 70%);border-radius:15px;padding:22px 24px;color:#fff;display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;}
.vims-scope .hero h1{font-size:19px;font-weight:800;}
.vims-scope .hero p{font-size:13px;opacity:.9;margin-top:4px;max-width:640px;}
.vims-scope .hero-actions{display:flex;gap:9px;margin-top:14px;flex-wrap:wrap;}
.vims-scope /* buttons */
.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border:1px solid var(--border);border-radius:9px;background:var(--surface-1);color:var(--text-1);font-size:13px;font-weight:600;transition:.12s;}
.vims-scope .btn:hover{background:var(--surface-2);}
.vims-scope .btn.primary{background:var(--brand);border-color:var(--brand);color:#fff;}
.vims-scope .btn.primary:hover{background:var(--brand-dark);}
.vims-scope .btn.solid{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.25);color:#fff;}
.vims-scope .btn.solid:hover{background:rgba(255,255,255,.24);}
.vims-scope .btn.good{background:var(--good);border-color:var(--good);color:#fff;}
.vims-scope .btn.crit{background:var(--crit);border-color:var(--crit);color:#fff;}
.vims-scope .btn.sm{padding:5px 10px;font-size:12px;border-radius:7px;}
.vims-scope .btn.lg{padding:11px 20px;font-size:14px;}
.vims-scope .btn:disabled{opacity:.5;cursor:not-allowed;}
.vims-scope .btn-row{display:flex;gap:9px;flex-wrap:wrap;align-items:center;}
.vims-scope /* badges */
.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:700;white-space:nowrap;}
.vims-scope .badge .bd{width:6px;height:6px;border-radius:50%;background:currentColor;}
.vims-scope .badge.good{background:var(--good-soft);color:#0a7a0a;}
.vims-scope .badge.warn{background:var(--warn-soft);color:#9a5b00;}
.vims-scope .badge.crit{background:var(--crit-soft);color:#b32020;}
.vims-scope .badge.info{background:var(--info-soft);color:#1e5fa8;}
.vims-scope .badge.neutral{background:#eef1f6;color:#5a6b85;}
.vims-scope .badge.purple{background:rgba(106,75,191,.12);color:#5a3ba8;}
.vims-scope /* tables */
table{width:100%;border-collapse:collapse;font-size:13px;}
.vims-scope thead th{text-align:left;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--text-2);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap;background:var(--surface-2);}
.vims-scope tbody td{padding:11px 12px;border-bottom:1px solid var(--grid);vertical-align:middle;}
.vims-scope tbody tr:last-child td{border-bottom:none;}
.vims-scope tr.rowlink{cursor:pointer;}
.vims-scope tr.rowlink:hover{background:var(--surface-2);}
.vims-scope td.empty{text-align:center;color:var(--text-2);padding:26px;}
.vims-scope .tbl-wrap{background:var(--surface-1);border:1px solid var(--border);border-radius:13px;overflow:hidden;box-shadow:var(--shadow);}
.vims-scope /* tabs */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:16px;overflow-x:auto;}
.vims-scope .tab{padding:9px 14px;font-size:13px;font-weight:600;color:var(--text-2);border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;}
.vims-scope .tab:hover{color:var(--text-1);}
.vims-scope .tab.active{color:var(--brand);border-bottom-color:var(--brand);}
.vims-scope /* forms */
.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;}
.vims-scope .field label{font-size:12px;font-weight:600;color:var(--text-2);}
.vims-scope .field input,
.vims-scope .field select,
.vims-scope .field textarea{padding:9px 11px;border:1px solid var(--border);border-radius:9px;background:var(--surface-1);font-size:13px;font-family:inherit;color:var(--text-1);}
.vims-scope .field input:focus,
.vims-scope .field select:focus,
.vims-scope .field textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft);}
.vims-scope .hint{font-size:11.5px;color:var(--text-2);}
.vims-scope /* filter bar */
.filter-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:12px 14px;margin-bottom:14px;}
.vims-scope .filter-fields{display:flex;flex-wrap:wrap;gap:10px;flex:1;}
.vims-scope .filter-field{display:flex;flex-direction:column;gap:4px;min-width:150px;}
.vims-scope .filter-field label{font-size:10.5px;font-weight:700;color:var(--text-2);text-transform:uppercase;letter-spacing:.03em;}
.vims-scope .filter-field select,
.vims-scope .filter-field input{padding:7px 9px;border:1px solid var(--border);border-radius:8px;background:var(--surface-1);font-size:13px;min-width:150px;}
.vims-scope .filter-actions{display:flex;gap:10px;align-items:center;}
.vims-scope /* toggle switch */
.switch{position:relative;display:inline-block;width:40px;height:22px;flex-shrink:0;}
.vims-scope .switch input{opacity:0;width:0;height:0;}
.vims-scope .slider{position:absolute;inset:0;background:#cbd3e0;border-radius:22px;transition:.2s;}
.vims-scope .slider:before{content:'';position:absolute;height:16px;width:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 2px rgba(0,0,0,.2);}
.vims-scope .switch input:checked+.slider{background:var(--good);}
.vims-scope .switch input:checked+.slider:before{transform:translateX(18px);}
.vims-scope .switch input:disabled+.slider{opacity:.5;}
.vims-scope /* timeline */
.timeline{position:relative;padding-left:4px;}
.vims-scope .tl-step{display:flex;gap:14px;padding-bottom:2px;}
.vims-scope .tl-rail{display:flex;flex-direction:column;align-items:center;}
.vims-scope .tl-node{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;color:#fff;flex-shrink:0;}
.vims-scope .tl-line{width:2px;flex:1;background:var(--border);min-height:18px;}
.vims-scope .tl-body{padding-bottom:18px;flex:1;}
.vims-scope .tl-body .t{font-weight:700;font-size:13.5px;}
.vims-scope .tl-body .s{font-size:12px;color:var(--text-2);}
.vims-scope /* modal */
#modal-bg{position:fixed;inset:0;background:rgba(15,27,45,.5);display:none;align-items:flex-start;justify-content:center;z-index:100;padding:40px 16px;overflow-y:auto;}
.vims-scope #modal-bg.open{display:flex;}
.vims-scope #modal-body{background:var(--surface-1);border-radius:15px;max-width:560px;width:100%;padding:22px 24px;box-shadow:0 20px 60px rgba(0,0,0,.3);}
.vims-scope #modal-body.wide{max-width:860px;}
.vims-scope #modal-body h3{font-size:17px;font-weight:800;margin-bottom:14px;}
.vims-scope /* toast */
#toast-wrap{position:fixed;top:16px;right:16px;z-index:200;display:flex;flex-direction:column;gap:8px;}
.vims-scope .toast{background:var(--surface-1);border:1px solid var(--border);border-left:4px solid var(--brand);border-radius:9px;padding:11px 15px;box-shadow:0 8px 26px rgba(0,0,0,.15);font-size:13px;font-weight:600;min-width:240px;animation:slideIn .2s;}
.vims-scope .toast.good{border-left-color:var(--good);}
.vims-scope .toast.crit{border-left-color:var(--crit);}
.vims-scope .toast.warn{border-left-color:var(--warn);}
.vims-scope @keyframes slideIn{from{transform:translateX(30px);opacity:0;}to{transform:none;opacity:1;}}
.vims-scope /* misc */
.info-row{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--grid);font-size:13px;}
.vims-scope .info-row:last-child{border-bottom:none;}
.vims-scope .info-row .k{color:var(--text-2);}
.vims-scope .info-row .v{font-weight:600;text-align:right;}
.vims-scope .bar-track{background:var(--grid);border-radius:4px;height:16px;overflow:hidden;flex:1;}
.vims-scope .bar-fill{height:100%;border-radius:4px;}
.vims-scope .pill{display:inline-block;padding:2px 8px;border-radius:6px;font-size:11px;font-weight:700;background:var(--surface-2);border:1px solid var(--border);}
.vims-scope .conf{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;padding:1px 7px;border-radius:6px;}
.vims-scope .conf.hi{background:var(--good-soft);color:#0a7a0a;}
.vims-scope .conf.md{background:var(--warn-soft);color:#9a5b00;}
.vims-scope .conf.lo{background:var(--crit-soft);color:#b32020;}
.vims-scope .notif-panel{position:absolute;top:52px;right:130px;width:340px;background:var(--surface-1);border:1px solid var(--border);border-radius:12px;box-shadow:0 16px 44px rgba(0,0,0,.18);z-index:40;overflow:hidden;}
.vims-scope .notif-item{padding:11px 14px;border-bottom:1px solid var(--grid);font-size:12.5px;}
.vims-scope .notif-item:hover{background:var(--surface-2);}
.vims-scope .stat-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px;}
.vims-scope .stat-strip .s{background:var(--surface-1);border:1px solid var(--border);border-radius:10px;padding:9px 14px;font-size:12px;}
.vims-scope .stat-strip .s b{display:block;font-size:18px;font-weight:800;}
.vims-scope .depwarn{background:var(--warn-soft);border:1px solid var(--warn);border-radius:10px;padding:12px 14px;font-size:12.5px;color:#8a5200;margin-bottom:12px;}
.vims-scope .emptybox{text-align:center;padding:40px;color:var(--text-2);}

.toast.crit{background:#b3261e;color:#fff;}
.toast.warn{background:#8a5a12;color:#fff;}
.toast.info{background:#334155;color:#fff;}

