/* ================================================================
   vSphere module — built on the panel's Sunny tokens (light + dark).
   Everything is scoped to .vs-* classes so it can't leak into the
   rest of the workspace.
   ================================================================ */

.navbtn[data-view="vsphere"] .ic { color: var(--grape-deep); }

/* module surfaces: the section plus what it attaches to <body> */
#view-vsphere, .vs-modal, .vs-menu, .vs-hovercard, .vs-drawer {
  --ip-f: color-mix(in srgb, var(--paper-2) 70%, var(--card));
  --ip-a: var(--grape);        --ip-a-ink: var(--grape-deep);
  --ip-r: var(--sun);          --ip-r-ink: var(--sun-deep);
  --ip-d: var(--sky);          --ip-d-ink: var(--sky-deep);
  --ip-c: var(--tomato);       --ip-c-ink: var(--tomato-deep);
  --ip-s: var(--coral);        --ip-s-ink: var(--coral-deep);
  --vs-radius: 14px;
}
.vs-root { display: flex; flex-direction: column; min-width: 0; }
.vs-root :is(input, select, textarea) { margin-bottom: 0; }
.vs-grow { flex: 1; }
.vs-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.vs-faint { color: var(--ink-soft); opacity: .8; }
.vs-text-err { color: var(--tomato-deep); }
.vs-hint { color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.vs-hint .ic { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.vs-hint.warn { color: var(--sun-deep); }
.vs-spin { animation: vs-spin .9s linear infinite; }
@keyframes vs-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- header */
.vs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.vs-title h2 { display: flex; align-items: center; gap: 12px; font-size: 29px; font-weight: 700; letter-spacing: -.045em; line-height: 1.2; }
.vs-title h2 .ic { width: 26px; height: 26px; color: var(--grape-deep); }
.vs-title p { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.vs-head-actions { display: flex; gap: 8px; align-items: center; }
.vs-head-actions .btn .ic, .vs-root .btn .ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- servers */
.vs-servers { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: thin; }
.vs-srv { --accent: var(--grape); --accent-ink: var(--grape-deep);
  position: relative; flex: 0 0 auto; min-width: 230px; max-width: 320px; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--vs-radius); background: var(--card);
  color: var(--ink); text-align: left; cursor: pointer; font: inherit;
  transition: transform .18s var(--ease-out, ease), box-shadow .18s, background .18s, border-color .18s; }
.vs-srv::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-ink); opacity: 0; transition: opacity .18s; }
.vs-srv:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.vs-srv.on { background: color-mix(in srgb, var(--accent) 38%, var(--card)); border-color: color-mix(in srgb, var(--accent-ink) 40%, var(--line)); box-shadow: var(--sh-2); }
.vs-srv.on::before { opacity: 1; }
.vs-srv:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vs-srv-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); }
.vs-srv-ico .ic { width: 19px; height: 19px; }
.vs-srv-main { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.vs-srv-name { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-srv-meta { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-srv-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font: 600 11px var(--mono); color: var(--accent-ink); }
.vs-srv-badge .ic { width: 12px; height: 12px; }
.vs-srv-add { min-width: 150px; justify-content: center; border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.vs-srv-add .ic { width: 16px; height: 16px; }
.vs-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--line-strong); }
.vs-dot.ok { background: var(--leaf-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--leaf-deep) 18%, transparent); }
.vs-dot.err { background: var(--tomato-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tomato-deep) 18%, transparent); }
.c-grape { --accent: var(--grape); --accent-ink: var(--grape-deep); }
.c-sky { --accent: var(--sky); --accent-ink: var(--sky-deep); }
.c-mint { --accent: var(--mint); --accent-ink: var(--mint-deep); }
.c-sun { --accent: var(--sun); --accent-ink: var(--sun-deep); }
.c-coral { --accent: var(--coral); --accent-ink: var(--coral-deep); }
.c-pink { --accent: var(--pink); --accent-ink: var(--pink-deep); }

.vs-serverbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 2px 14px; }
.vs-sb-id { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.vs-sb-host { font: 500 13px var(--mono); }
.vs-sb-product { font-size: 12px; color: var(--ink-soft); }
.vs-sb-state { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-kind { padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; background: var(--grape); color: var(--grape-deep); }
.vs-kind.k-esxi { background: var(--sky); color: var(--sky-deep); }
.vs-kind.k-simulator { background: var(--mint); color: var(--mint-deep); }
.vs-status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft); }
.vs-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.vs-status.ok { color: var(--leaf-deep); } .vs-status.ok i { background: var(--leaf-deep); }
.vs-status.err { color: var(--tomato-deep); } .vs-status.err i { background: var(--tomato-deep); }
.vs-tls { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: var(--paper-2); color: var(--ink-soft); }
.vs-tls .ic { width: 13px; height: 13px; }
.vs-tls.t-insecure { background: var(--danger-bg); color: var(--tomato-deep); }
.vs-serverbar .vs-callout { flex-basis: 100%; }

.vs-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.vs-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 11px; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; background: none; color: var(--ink-soft); font: 500 13px var(--font); cursor: pointer; white-space: nowrap; border-radius: 9px 9px 0 0; }
.vs-tab .ic { width: 16px; height: 16px; }
.vs-tab:hover { color: var(--ink); background: var(--hover); }
.vs-tab.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--grape-deep); }
.vs-tab.on .ic { color: var(--grape-deep); }
.vs-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.vs-count { display: inline-flex; align-items: center; gap: 3px; min-width: 20px; justify-content: center; padding: 1px 7px; border-radius: 99px; background: var(--paper-2); font: 600 10.5px var(--mono); color: var(--ink-soft); }
.vs-count.live { background: var(--sky); color: var(--sky-deep); }
.vs-count .ic { width: 11px; height: 11px; }
.vs-body { padding-top: 20px; min-width: 0; }

/* ---------------------------------------------------------------- shared bits */
.vs-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--vs-radius); padding: 18px 20px; min-width: 0; }
.vs-card h3 { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.vs-card h3 .ic { width: 17px; height: 17px; color: var(--grape-deep); }
.vs-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.vs-card-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.vs-card-foot .vs-hint { margin-right: auto; }
.vs-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.vs-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.vs-icon-btn:hover { background: var(--hover); border-color: var(--line); color: var(--ink); }
.vs-icon-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.vs-icon-btn .ic { width: 17px; height: 17px; }
.vs-linkbtn { border: 0; background: none; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vs-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; background: var(--paper-2); color: var(--ink-soft); white-space: nowrap; }
.vs-tag .ic { width: 11px; height: 11px; }
.vs-tag.ok { background: var(--leaf); color: var(--leaf-deep); }
.vs-tag.warn { background: var(--sun); color: var(--sun-deep); }
.vs-tag.err { background: var(--danger-bg); color: var(--tomato-deep); }
.vs-tag.busy { background: var(--grape); color: var(--grape-deep); }
.vs-chipname { display: inline-block; padding: 2px 8px; margin: 2px 0; border-radius: 7px; background: var(--paper-2); font: 500 12px var(--mono); }
.vs-chipname.bad { background: var(--danger-bg); color: var(--tomato-deep); text-decoration: line-through; }
.vs-empty-line { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 26px 16px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.vs-empty-line .ic { width: 18px; height: 18px; }

.vs-bar { display: block; width: 100%; height: 6px; border-radius: 6px; overflow: hidden; background: color-mix(in srgb, var(--ink) 9%, transparent); }
.vs-bar i { display: block; height: 100%; border-radius: inherit; background: var(--leaf-deep); transition: width .5s var(--ease-out, ease); }
.vs-bar.warn i { background: var(--sun-deep); }
.vs-bar.danger i { background: var(--tomato-deep); }
.vs-progress { display: block; height: 5px; border-radius: 5px; overflow: hidden; background: color-mix(in srgb, var(--grape-deep) 14%, transparent); margin-top: 7px; }
.vs-progress.inline { display: inline-block; width: 140px; vertical-align: middle; margin: 0 8px 0 0; }
.vs-progress i { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease-out, ease);
  background: repeating-linear-gradient(-45deg, var(--grape-deep) 0 8px, color-mix(in srgb, var(--grape-deep) 72%, var(--card)) 8px 16px);
  background-size: 22px 22px; animation: vs-stripes 1s linear infinite; }
@keyframes vs-stripes { to { background-position: 22px 0; } }

.vs-callout { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; font-size: 13px; line-height: 1.55;
  border: 1px solid color-mix(in srgb, var(--sky-deep) 22%, transparent); background: color-mix(in srgb, var(--sky) 45%, var(--card)); }
.vs-callout > .ic { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; color: var(--sky-deep); }
.vs-callout > div { flex: 1; min-width: 0; }
.vs-callout.ok { border-color: color-mix(in srgb, var(--leaf-deep) 25%, transparent); background: color-mix(in srgb, var(--leaf) 45%, var(--card)); }
.vs-callout.ok > .ic { color: var(--leaf-deep); }
.vs-callout.warn { border-color: color-mix(in srgb, var(--sun-deep) 25%, transparent); background: color-mix(in srgb, var(--sun) 45%, var(--card)); }
.vs-callout.warn > .ic { color: var(--sun-deep); }
.vs-callout.err { border-color: color-mix(in srgb, var(--tomato-deep) 28%, transparent); background: var(--danger-bg); }
.vs-callout.err > .ic { color: var(--tomato-deep); }
.vs-callout-actions { flex: 0 0 auto !important; display: flex; gap: 8px; align-items: center; align-self: center; }
.vs-callout code { font-family: var(--mono); font-size: 12px; }

.vs-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--badge-closed-bg); color: var(--ink-soft); }
.vs-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vs-pill .ic { width: 12px; height: 12px; }
.vs-pill.on { background: var(--leaf); color: var(--leaf-deep); }
.vs-pill.susp { background: var(--sun); color: var(--sun-deep); }
.vs-pill.tpl { background: var(--grape); color: var(--grape-deep); }
.vs-pill.busy { background: var(--sky); color: var(--sky-deep); max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- toolbar */
.vs-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vs-toolbar.tight { margin-bottom: 10px; }
.vs-search { display: flex; align-items: center; gap: 6px; min-width: 200px; flex: 1 1 220px; max-width: 360px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); color: var(--ink-soft); }
.vs-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 13%, transparent); }
.vs-search .ic { width: 16px; height: 16px; flex: 0 0 16px; }
.vs-root .vs-search input, .vs-modal .vs-search input { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 9px 2px; transform: none !important; font-size: 13px; }
.vs-search kbd { font: 400 10px var(--mono); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; color: var(--ink-soft); }
.vs-find { flex-basis: 460px; max-width: 560px; }
.vs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.vs-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); font: 500 12.5px var(--font); cursor: pointer; }
.vs-chip b { font: 600 10.5px var(--mono); padding: 1px 6px; border-radius: 99px; background: var(--paper-2); color: var(--ink-soft); }
.vs-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.vs-chip.on { background: var(--grape); border-color: color-mix(in srgb, var(--grape-deep) 35%, transparent); color: var(--grape-deep); font-weight: 600; }
.vs-chip.on b { background: var(--card); color: var(--grape-deep); }
.vs-place { width: auto !important; min-width: 170px; font-size: 12.5px !important; padding: 8px 30px 8px 10px !important; }

/* ---------------------------------------------------------------- overview */
.vs-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.vs-kpi { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 16px 16px 15px; border-radius: var(--vs-radius); text-align: left; font: inherit; color: var(--ink);
  background: var(--accent, var(--paper-2)); border: 1px solid color-mix(in srgb, var(--accent-ink, var(--ink)) 14%, transparent); }
button.vs-kpi { cursor: pointer; transition: transform .18s var(--ease-out, ease), box-shadow .18s; }
button.vs-kpi:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.vs-kpi-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-soft); }
.vs-kpi-label .ic { width: 14px; height: 14px; color: var(--accent-ink); }
.vs-kpi-value { font: 700 28px/1.1 var(--font); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.vs-kpi-value small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); }
.vs-kpi-sub { font-size: 11px; color: var(--ink-soft); line-height: 1.45; }
.vs-kpi .vs-bar { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); }
.vs-group-label { display: flex; align-items: center; gap: 7px; margin: 14px 0 8px; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.vs-group-label:first-of-type { margin-top: 0; }
.vs-group-label .ic { width: 13px; height: 13px; }
.vs-hosts { display: flex; flex-direction: column; }
.vs-host { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-faint); }
.vs-host:first-child { border-top: 0; }
.vs-host-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; font-size: 13px; }
.vs-host-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vs-host-name small { flex-basis: 100%; font-size: 11px; color: var(--ink-soft); }
.vs-host-meter { display: grid; grid-template-columns: 32px 1fr 36px; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-soft); }
.vs-host-meter em { font: normal 500 11px var(--mono); text-align: right; color: var(--ink); }
.vs-stores { display: flex; flex-direction: column; gap: 14px; }
.vs-store-top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 13px; }
.vs-store-top em { margin-left: auto; font: normal 600 12px var(--mono); }
.vs-store small { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-soft); }
.vs-store.off { opacity: .55; }
.vs-pool-mini { display: flex; flex-direction: column; gap: 4px; }
.vs-pool-mini-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 8px; margin: 0 -8px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.vs-pool-mini-row:hover { background: var(--hover); }
.vs-pmr-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.vs-pmr-name small { font-size: 11px; color: var(--ink-soft); }
.vs-pmr-free { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.vs-pmr-free b { color: var(--ink); font-family: var(--mono); }

/* ---------------------------------------------------------------- activity */
.vs-tasks { display: flex; flex-direction: column; }
.vs-task { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 11px 2px; border-top: 1px solid var(--line-faint); }
.vs-task:first-child, .vs-day + .vs-task { border-top: 0; }
.vs-task-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--paper-2); color: var(--ink-soft); }
.vs-task-ico .ic { width: 16px; height: 16px; }
.vs-task-ico.k-clone { background: var(--grape); color: var(--grape-deep); }
.vs-task-ico.k-power { background: var(--leaf); color: var(--leaf-deep); }
.vs-task-ico.k-reconfigure { background: var(--sun); color: var(--sun-deep); }
.vs-task-ico.k-snapshot { background: var(--pink); color: var(--pink-deep); }
.vs-task-ico.k-ipam { background: var(--sky); color: var(--sky-deep); }
.vs-task-ico.k-delete { background: var(--danger-bg); color: var(--tomato-deep); }
.vs-task-ico.k-server, .vs-task-ico.k-rename { background: var(--mint); color: var(--mint-deep); }
.vs-task.s-error .vs-task-ico { background: var(--danger-bg); color: var(--tomato-deep); }
.vs-task-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.vs-task-sub { margin-top: 3px; font-size: 11.5px; color: var(--ink-soft); }
.vs-task.s-error .vs-task-sub { color: var(--tomato-deep); }
.vs-task.s-warn .vs-task-ico { background: var(--sun); color: var(--sun-deep); }
.vs-task.s-warn .vs-task-sub { color: var(--sun-deep); }
.vs-task-err { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--danger-bg); color: var(--tomato-deep); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.vs-task-time { font: 400 10.5px var(--mono); color: var(--ink-soft); white-space: nowrap; padding-top: 2px; }
.vs-tasks.compact .vs-task { padding: 9px 0; }
.vs-day { margin: 18px 0 6px; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.vs-day:first-child { margin-top: 0; }
.vs-activity { padding-top: 14px; }

/* ---------------------------------------------------------------- VM table */
.vs-table-card { padding: 0; overflow: hidden; }
.vs-table-scroll { overflow-x: auto; }
.vs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.vs-table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.vs-table th[data-sort] { cursor: pointer; user-select: none; }
.vs-table th[data-sort]:hover { color: var(--ink); }
.vs-table th.sorted { color: var(--ink); }
.vs-table th.sorted::after { content: "↑"; margin-left: 4px; font-family: var(--mono); }
.vs-table th.sorted[data-dir="desc"]::after { content: "↓"; }
.vs-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-faint); vertical-align: middle; }
.vs-table tbody tr:last-child td { border-bottom: 0; }
.vs-table tbody tr[data-moref] { cursor: pointer; transition: background .12s; }
.vs-table tbody tr[data-moref]:hover { background: var(--hover); }
.vs-table tbody tr[data-moref]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.vs-table tbody tr.sel { background: color-mix(in srgb, var(--grape) 40%, var(--card)); }
.vs-table tbody tr.busy td { background: color-mix(in srgb, var(--sky) 22%, transparent); }
.vs-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-table input[type=checkbox] { margin: 0; }
.vs-col-check { width: 40px; }
.vs-col-act { width: 84px; text-align: right; white-space: nowrap; }
.vs-col-act .vs-icon-btn { width: 30px; height: 30px; }
.vs-vm-name { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.vs-vm-name > .ic { width: 30px; height: 30px; flex: 0 0 30px; padding: 6px; border-radius: 9px; background: var(--paper-2); }
.vs-vm-name > div { display: flex; flex-direction: column; min-width: 0; }
.vs-vm-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-vm-name small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.vs-os-win { color: var(--sky-deep); }
.vs-os-linux { color: var(--sun-deep); }
.vs-os-other { color: var(--ink-soft); }
.vs-snapflag { margin-left: auto; color: var(--pink-deep); }
.vs-snapflag .ic { width: 14px; height: 14px; }
.vs-ipcell { white-space: nowrap; }
.vs-pooltag { display: inline-block; margin-left: 7px; padding: 1px 6px; border-radius: 5px; background: var(--grape); color: var(--grape-deep); font-size: 10px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.vs-more { margin-left: 5px; font: 600 10.5px var(--mono); color: var(--ink-soft); }
.vs-ipwarn { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; padding: 1px 6px; border-radius: 5px; background: var(--danger-bg); color: var(--tomato-deep); font-size: 10px; font-weight: 700; vertical-align: middle; }
.vs-ipwarn .ic { width: 11px; height: 11px; }
.vs-modal .btn:disabled, .vs-root .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: saturate(.6); }
.vs-hostcell { display: block; white-space: nowrap; }
.vs-table td small.vs-faint { display: block; font-size: 10.5px; }
.vs-ghost td { background: color-mix(in srgb, var(--grape) 22%, transparent); }
.vs-ghost .vs-vm-name > .ic { color: var(--grape-deep); }
.vs-table-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-faint); font-size: 12px; color: var(--ink-soft); }
.vs-bulk { position: sticky; top: 84px; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; margin-bottom: 10px; border-radius: 12px;
  background: var(--grape); border: 1px solid color-mix(in srgb, var(--grape-deep) 30%, transparent); color: var(--grape-deep); box-shadow: var(--sh-2); }
.vs-bulk b { margin-right: 6px; font-size: 13px; }
.vs-bulk .vs-icon-btn { margin-left: auto; color: var(--grape-deep); }

/* ---------------------------------------------------------------- drawer */
.vs-drawer-shade { position: fixed; inset: 0; z-index: 9; background: var(--overlay); opacity: 0; transition: opacity .22s; }
.vs-drawer-shade.in { opacity: .55; }
.vs-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9; width: min(580px, 100vw); display: flex; flex-direction: column;
  background: var(--paper); border-left: 1px solid var(--line); box-shadow: -18px 0 50px color-mix(in srgb, var(--ink) 14%, transparent);
  transform: translateX(104%); transition: transform .24s var(--ease-out, ease); outline: none; }
.vs-drawer.in { transform: none; }
.vs-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.vs-dw-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 60%; color: var(--ink-soft); padding: 24px; }
.vs-dw-head { position: sticky; top: 0; z-index: 2; padding: 20px 22px 14px; background: var(--paper); border-bottom: 1px solid var(--line-faint); }
.vs-dw-title { display: flex; align-items: flex-start; gap: 12px; }
.vs-dw-title > div { flex: 1; min-width: 0; }
.vs-dw-title h3 { font-size: 20px; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.vs-dw-title p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
.vs-dw-os { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.vs-dw-os .ic { width: 22px; height: 22px; }
.vs-dw-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.vs-dw-task { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 12px; border-radius: 10px; background: var(--sky); color: var(--sky-deep); font-size: 12px; }
.vs-dw-task .ic { width: 14px; height: 14px; }
.vs-dw-task .vs-progress { flex-basis: 100%; margin-top: 2px; }
.vs-dw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 22px 4px; }
.vs-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; background: var(--accent); min-width: 0; }
.vs-tile .ic { width: 16px; height: 16px; color: var(--accent-ink); margin-bottom: 3px; }
.vs-tile b { font-size: 14px; white-space: nowrap; }
.vs-tile small { font-size: 10.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-dw-usage { padding: 12px 22px 0; display: grid; gap: 8px; }
.vs-dw-usage > div { display: grid; grid-template-columns: 56px 1fr 110px; gap: 10px; align-items: center; font-size: 11.5px; color: var(--ink-soft); }
.vs-dw-usage em { font: normal 500 11px var(--mono); color: var(--ink); text-align: right; }
.vs-dw-sec { padding: 16px 22px; border-bottom: 1px solid var(--line-faint); }
.vs-dw-sec:last-child { border-bottom: 0; padding-bottom: 28px; }
.vs-dw-sec > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.vs-dw-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.vs-dw-sec h4 .ic { width: 15px; height: 15px; color: var(--grape-deep); }
.vs-ip-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 7px 0; font-size: 13px; }
.vs-ip-row .vs-icon-btn { margin-left: auto; width: 28px; height: 28px; }
.vs-dev-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line-faint); font-size: 13px; }
.vs-dev-row:first-of-type { border-top: 0; }
.vs-dev-row small { grid-column: 2; font-size: 11px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-snaps { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.vs-snap { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-left: calc(var(--depth) * 18px); border-radius: 10px; border: 1px solid var(--line-faint); background: var(--card); font-size: 13px; }
.vs-snap.current { border-color: color-mix(in srgb, var(--leaf-deep) 40%, transparent); }
.vs-snap b { margin-right: 6px; }
.vs-snap small { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-soft); }
.vs-snap p { margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.vs-snap-acts { display: flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.vs-notes { white-space: pre-wrap; font-size: 13px; line-height: 1.6; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-faint); }
.vs-dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 7px 14px; font-size: 12.5px; margin-bottom: 12px; }
.vs-dl dt { color: var(--ink-soft); }
.vs-dl dd { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- dialogs */
.vs-modal .vs-modal-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; width: 500px; max-height: min(88vh, 900px); }
.vs-modal .vs-modal-card.wide { width: 760px; }
.vs-modal .vs-modal-card.xl { width: 1040px; }
.vs-modal .vs-modal-card.narrow { width: 440px; }
.vs-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.vs-modal-head h3 { margin: 0 !important; font-size: 18px !important; }
.vs-modal-head h3 .ic { width: 20px; height: 20px; color: var(--grape-deep); }
.vs-modal-body { flex: 1; overflow-y: auto; padding: 6px 24px 14px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.vs-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px 20px; border-top: 1px solid var(--line-faint); }
.vs-foot-note { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; color: var(--ink-soft); }
.vs-foot-actions { display: flex; gap: 8px; margin-left: auto; }
.vs-form-error { margin: 0 24px 4px; padding: 10px 12px; border-radius: 10px; background: var(--danger-bg); color: var(--tomato-deep); font-size: 13px; font-weight: 600; }
.vs-confirm { font-size: 13.5px; line-height: 1.6; }
.vs-confirm p + p { margin-top: 8px; }
.vs-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vs-field > span:first-child { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.vs-field > span:first-child .ic { width: 14px; height: 14px; }
.vs-field em, .vs-check em { font-style: normal; font-weight: 400; opacity: .8; }
.vs-field input, .vs-field select, .vs-field textarea { font-size: 13.5px; padding: 9px 12px; }
.vs-field textarea { resize: vertical; min-height: 64px; }
.vs-field .vs-lock { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--sun-deep); }
.vs-field .vs-lock .ic { width: 12px; height: 12px; }
.vs-check { display: flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; }
.vs-check input { margin: 0; flex: 0 0 auto; }
.vs-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.vs-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.vs-grid-host { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px 16px; }
/* address / protocol / port: one row when the form is wide enough (dialog), address on its own row when not (settings card, phones) */
.vs-conn { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; }
.vs-grid-conn { display: grid; grid-template-columns: minmax(0, 1fr) 180px 100px; gap: 12px 16px; }
@container (max-width: 520px) {
  .vs-grid-conn { grid-template-columns: minmax(0, 1fr) 110px; }
  .vs-grid-conn > :first-child { grid-column: 1 / -1; }
}
.vs-http-note { display: flex; align-items: flex-start; gap: 6px; }
.vs-http-note .ic { margin-top: 2px; flex: 0 0 13px; }
.vs-grid-name { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 16px; align-items: end; }
.vs-form-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.vs-form-sec + .vs-form-sec { border-top: 1px solid var(--line-faint); padding-top: 14px; }
.vs-form-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.vs-form-sec h4 .ic { width: 15px; height: 15px; color: var(--grape-deep); }
.vs-is-sim .vs-only-real, .vs-modal:not(.vs-is-sim) .vs-only-sim { display: none !important; }

.vs-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-2); align-self: flex-start; }
.vs-seg-opt { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); font: 600 12.5px var(--font); cursor: pointer; }
.vs-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.vs-seg-opt .ic { width: 15px; height: 15px; }
.vs-seg-opt:hover { color: var(--ink); }
.vs-seg-opt.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 14%, transparent); }
.vs-seg-opt.on .ic { color: var(--grape-deep); }
.vs-seg-opt:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.vs-seg.small .vs-seg-opt { padding: 6px 11px; font-size: 12px; }

.vs-stepper { display: inline-flex; align-items: center; align-self: flex-start; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--field); overflow: hidden; }
.vs-stepper button { display: grid; place-items: center; width: 34px; height: 38px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.vs-stepper button:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.vs-stepper button .ic { width: 15px; height: 15px; }
.vs-root .vs-stepper input, .vs-modal .vs-stepper input { width: 74px; border: 0 !important; box-shadow: none !important; transform: none !important; background: transparent !important; text-align: center; font: 600 14px var(--mono); padding: 8px 2px; -moz-appearance: textfield; appearance: textfield; }
.vs-stepper input::-webkit-inner-spin-button, .vs-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.vs-unit { padding-right: 4px; font-size: 12px; color: var(--ink-soft); }
.vs-stepper.disabled { opacity: .55; background: var(--paper-2); }

.vs-swatches { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
.vs-swatch { position: relative; cursor: pointer; }
.vs-swatch input { position: absolute; opacity: 0; }
.vs-swatch i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 2px solid color-mix(in srgb, var(--accent-ink) 30%, transparent); transition: transform .15s; }
.vs-swatch input:checked + i { border-color: var(--ink); transform: scale(1.12); box-shadow: 0 0 0 3px var(--card) inset; }
.vs-swatch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }

.vs-cert { padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--sun-deep) 30%, transparent); background: color-mix(in srgb, var(--sun) 40%, var(--card)); font-size: 12.5px; line-height: 1.55; }
.vs-cert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.vs-cert-head .ic { width: 17px; height: 17px; color: var(--sun-deep); }
.vs-cert dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 12px; margin: 10px 0 12px; }
.vs-cert dt { color: var(--ink-soft); }
.vs-cert dd { overflow-wrap: anywhere; }
.vs-cert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.vs-cert > p { margin: 0 0 10px; }
.vs-cert.info { border-color: color-mix(in srgb, var(--sky-deep) 25%, transparent); background: color-mix(in srgb, var(--sky) 40%, var(--card)); }
.vs-cert.info .vs-cert-head .ic { color: var(--sky-deep); }
.vs-cert.ok, .vs-cert.warn { display: flex; gap: 10px; align-items: flex-start; }
.vs-cert.ok { border-color: color-mix(in srgb, var(--leaf-deep) 30%, transparent); background: color-mix(in srgb, var(--leaf) 40%, var(--card)); }
.vs-cert.ok > .ic { color: var(--leaf-deep); width: 17px; height: 17px; flex: 0 0 17px; }
.vs-cert.warn > .ic { color: var(--sun-deep); width: 17px; height: 17px; flex: 0 0 17px; }
.vs-fp { display: block; font-size: 11px; word-break: break-all; }

.vs-guide .vs-modal-body section { padding-bottom: 4px; }
.vs-guide h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.vs-guide h4 .ic { width: 16px; height: 16px; color: var(--grape-deep); }
.vs-guide p { font-size: 13px; line-height: 1.65; color: var(--ink); }
.vs-legend-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 12.5px; }
.vs-legend-list li { display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- menus & hover */
.vs-menu { position: fixed; z-index: 70; min-width: 230px; max-width: 320px; padding: 6px; border-radius: 13px; border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--sh-3), 0 16px 44px color-mix(in srgb, var(--ink) 14%, transparent); animation: vs-pop .14s var(--ease-out, ease); }
@keyframes vs-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.vs-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 13px var(--font); text-align: left; cursor: pointer; }
.vs-menu button .ic { width: 15px; height: 15px; flex: 0 0 15px; color: var(--ink-soft); }
.vs-menu button small { margin-left: auto; font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.vs-menu button:hover:not(:disabled), .vs-menu button:focus-visible { background: var(--hover); outline: none; }
.vs-menu button.danger, .vs-menu button.danger .ic { color: var(--tomato-deep); }
.vs-menu button:disabled { opacity: .5; cursor: default; }
.vs-menu button:first-child:disabled { opacity: 1; font-weight: 700; font-family: var(--mono); font-size: 12px; }
.vs-menu hr { border: 0; border-top: 1px solid var(--line-faint); margin: 5px 4px; }
.vs-cell-info { padding: 0 10px 6px 35px; font-size: 12px; line-height: 1.5; color: var(--ink); }
.vs-cell-info p + p { margin-top: 3px; }
.vs-cell-info span { color: var(--ink-soft); }
.vs-hovercard { position: fixed; z-index: 70; max-width: 280px; padding: 9px 11px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-2), 0 10px 30px color-mix(in srgb, var(--ink) 12%, transparent); font-size: 12px; pointer-events: none; }
.vs-hovercard b { display: block; margin-bottom: 4px; }
.vs-hovercard p { margin-top: 5px; line-height: 1.45; }

/* ---------------------------------------------------------------- IPAM */
.vs-ipam { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.vs-pool-list { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 2px; }
.vs-pool-card { display: flex; flex-direction: column; gap: 5px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--vs-radius); background: var(--card); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.vs-pool-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.vs-pool-card.on { border-color: color-mix(in srgb, var(--grape-deep) 45%, transparent); background: color-mix(in srgb, var(--grape) 30%, var(--card)); }
.vs-pool-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vs-pc-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.vs-pc-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-pool-card small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-soft); }
.vs-pool-card small .ic { width: 12px; height: 12px; }
.vs-pool-card .vs-poolbar { margin-top: 4px; }
.vs-pc-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); }
.vs-pc-foot b { color: var(--ink); font-family: var(--mono); }
.vs-badge-err { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 99px; background: var(--danger-bg); color: var(--tomato-deep); font: 600 10.5px var(--mono); }
.vs-badge-err .ic { width: 11px; height: 11px; }
.vs-poolbar { display: flex; width: 100%; height: 8px; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.vs-poolbar i { display: block; height: 100%; }
.vs-poolbar .a { background: var(--grape-deep); }
.vs-poolbar .p { background: color-mix(in srgb, var(--grape-deep) 55%, var(--card)); }
.vs-poolbar .r { background: var(--sun-deep); }
.vs-poolbar .d { background: var(--sky-deep); }
.vs-poolbar .c { background: var(--tomato-deep); }
.vs-poolbar .s { background: var(--coral-deep); }

.vs-pool-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--vs-radius); padding: 18px 20px 20px; min-width: 0; }
.vs-pool-detail > .vs-empty { border: 0; background: none; }
.vs-pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.vs-pd-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.vs-pd-head p { margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.vs-pd-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.vs-pd-sub .ic { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.vs-pd-actions { display: flex; gap: 6px; align-items: center; }
.vs-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.vs-stat { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.vs-stat b { font: 700 16px var(--mono); letter-spacing: -.03em; }
.vs-stat span { font-size: 11.5px; color: var(--ink-soft); }
.vs-stat:hover { border-color: var(--line-strong); }
.vs-stat.on { border-color: var(--ink); background: var(--hover); }
.vs-stat.total { cursor: default; margin-left: auto; border-style: dashed; }
.vs-pd-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }
.vs-pd-bar .vs-hint { display: inline-flex; align-items: center; }
.vs-nextfree { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); }
.vs-ipchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--leaf-deep) 35%, transparent); border-radius: 8px; background: var(--leaf); color: var(--leaf-deep); font: 600 13px var(--mono); cursor: pointer; }
.vs-ipchip .ic { width: 13px; height: 13px; }

.vs-map { display: flex; flex-direction: column; gap: 18px; }
.vs-block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.vs-grid { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 3px; }
.vs-cell { display: grid; place-items: center; aspect-ratio: 1.45; min-width: 0; padding: 0; border: 1px solid transparent; border-radius: 6px;
  background: var(--ip-f); color: var(--ink-soft); font: 500 10px var(--mono); cursor: pointer; transition: transform .1s, box-shadow .1s, opacity .2s; }
.vs-cell.f { border-color: var(--line-faint); }
.vs-cell:hover { transform: scale(1.14); box-shadow: var(--sh-2); z-index: 1; position: relative; }
.vs-cell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; z-index: 2; position: relative; }
.vs-cell.a { background: var(--ip-a); color: var(--ip-a-ink); font-weight: 700; }
.vs-cell.p { background: var(--ip-a); color: var(--ip-a-ink); border: 1px dashed var(--ip-a-ink); animation: vs-pulse 1.4s ease-in-out infinite; }
.vs-cell.r { background: var(--ip-r); color: var(--ip-r-ink); font-weight: 700; }
.vs-cell.d { background: var(--ip-d); color: var(--ip-d-ink); font-weight: 700; }
.vs-cell.c { color: var(--ip-c-ink); font-weight: 700; border-color: color-mix(in srgb, var(--ip-c-ink) 50%, transparent);
  background: repeating-linear-gradient(-45deg, var(--ip-c) 0 4px, color-mix(in srgb, var(--ip-c) 55%, var(--card)) 4px 8px); }
.vs-cell.s { background: var(--ip-s); color: var(--ip-s-ink); font-weight: 700; text-decoration: line-through; }
.vs-cell.g { background: var(--ink); color: var(--paper); font-weight: 700; }
.vs-cell.x { background: repeating-linear-gradient(45deg, transparent 0 3px, color-mix(in srgb, var(--ink) 10%, transparent) 3px 4px); color: var(--ink-soft); opacity: .7; }
.vs-cell.out { cursor: default; background: transparent; border: 1px dashed color-mix(in srgb, var(--ink) 7%, transparent); }
.vs-cell.out:hover { transform: none; box-shadow: none; }
.vs-cell.dim { opacity: .18; }
.vs-cell.hl { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); z-index: 2; position: relative; animation: vs-hl 1.2s ease-out 2; }
@keyframes vs-pulse { 50% { opacity: .55; } }
@keyframes vs-hl { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }
.vs-cell-key { display: inline-block; width: 11px; height: 11px; flex: 0 0 11px; border-radius: 3px; background: var(--ip-f); border: 1px solid var(--line); vertical-align: -1px; }
.vs-cell-key.a { background: var(--ip-a-ink); border-color: transparent; }
.vs-cell-key.p { background: var(--ip-a); border: 1px dashed var(--ip-a-ink); }
.vs-cell-key.r { background: var(--ip-r-ink); border-color: transparent; }
.vs-cell-key.d { background: var(--ip-d-ink); border-color: transparent; }
.vs-cell-key.c { background: var(--ip-c-ink); border-color: transparent; }
.vs-cell-key.s { background: var(--ip-s-ink); border-color: transparent; }
.vs-cell-key.g { background: var(--ink); border-color: transparent; }
.vs-cell-key.x { background: repeating-linear-gradient(45deg, transparent 0 2px, var(--line-strong) 2px 3px); }
.vs-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-faint); font-size: 11.5px; color: var(--ink-soft); }
.vs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vs-usage .ic { width: 13px; height: 13px; color: var(--leaf-deep); }
.vs-usage.warn, .vs-usage.warn .ic { color: var(--sun-deep); }
.vs-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; }
.vs-state.c { color: var(--tomato-deep); font-weight: 600; }
.vs-alloc-table td small { display: block; font-size: 11px; }
.vs-find-results { margin: -4px 0 14px; padding: 6px; max-height: 340px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-2); }
.vs-find-row { display: grid; grid-template-columns: 14px 120px 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 13px var(--font); text-align: left; cursor: pointer; }
.vs-find-row:hover { background: var(--hover); }
.vs-find-row span, .vs-find-row small { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-find-row em { font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--paper-2); color: var(--ink-soft); white-space: nowrap; }
.vs-pool-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 18px; }
.vs-vm-pick { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2); }
.vs-vm-opt { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.vs-vm-opt:hover { background: var(--card); }
.vs-vm-opt input { margin: 0; align-self: center; }
.vs-vm-opt small { margin-left: auto; font-size: 11px; color: var(--ink-soft); text-align: right; }
.vs-vm-opt:has(input:checked) { background: var(--card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--grape-deep) 45%, transparent); }

/* ---------------------------------------------------------------- clone wizard */
.vs-wizard .vs-modal-body { gap: 16px; }
.vs-steps { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line-faint); }
.vs-steps:empty { display: none; }
.vs-step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid transparent; border-radius: 99px; background: none; color: var(--ink-soft); font: 600 12.5px var(--font); cursor: pointer; }
.vs-step i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-2); font: 700 11px var(--mono); font-style: normal; }
.vs-step i .ic { width: 13px; height: 13px; }
.vs-step.on { color: var(--ink); background: var(--grape); border-color: color-mix(in srgb, var(--grape-deep) 25%, transparent); }
.vs-step.on i { background: var(--grape-deep); color: var(--card); }
.vs-step.done i { background: var(--leaf); color: var(--leaf-deep); }
.vs-step:disabled { cursor: default; opacity: .55; }
.vs-wiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; align-items: start; }
.vs-wiz-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vs-wiz-head h4 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.vs-wiz-head h4 .ic { width: 18px; height: 18px; color: var(--grape-deep); }
.vs-wiz-head p { margin-top: 4px; }
.vs-wiz-summary { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: var(--paper-2); font-size: 12.5px; }
.vs-wiz-summary:empty { display: none; }
.vs-sum-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0; color: var(--ink-soft); text-align: center; }
.vs-sum-empty .ic { width: 26px; height: 26px; }
.vs-sum-src { display: flex; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line-faint); }
.vs-sum-src > .ic { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--card); flex: 0 0 28px; }
.vs-sum-src div { display: flex; flex-direction: column; min-width: 0; }
.vs-sum-src b { overflow-wrap: anywhere; }
.vs-sum-src small { font-size: 11px; color: var(--ink-soft); }
.vs-sum-row { display: flex; justify-content: space-between; gap: 8px; }
.vs-sum-row span { color: var(--ink-soft); }
.vs-sum-row b { text-align: right; overflow-wrap: anywhere; }
.vs-sum-steps { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); display: grid; gap: 3px; font-size: 12px; }
.vs-sum-steps li.done { color: var(--leaf-deep); }
.vs-sum-steps li.on { color: var(--ink); font-weight: 700; }
.vs-src-list { display: flex; flex-direction: column; gap: 6px; max-height: min(48vh, 440px); overflow-y: auto; padding: 2px; }
.vs-src { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: pointer; }
.vs-src:hover { border-color: var(--line-strong); }
.vs-src.on { border-color: color-mix(in srgb, var(--grape-deep) 55%, transparent); background: color-mix(in srgb, var(--grape) 28%, var(--card)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--grape-deep) 30%, transparent); }
.vs-src input { position: absolute; opacity: 0; pointer-events: none; }
.vs-src:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.vs-src > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--paper-2); }
.vs-src-main { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.vs-src-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-src-main small { font-size: 11px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-src-spec { font: 500 11.5px var(--mono); color: var(--ink-soft); white-space: nowrap; }
.vs-names { line-height: 1.9; }
.vs-nic-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.vs-nic-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.vs-nic-top b { display: inline-flex; align-items: center; gap: 7px; }
.vs-nic-top b .ic { width: 15px; height: 15px; color: var(--grape-deep); }
.vs-nic-top select { width: auto; min-width: 200px; font-size: 13px; padding: 7px 30px 7px 10px; }
.vs-disk-row, .vs-nic-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; font-size: 13px; }
.vs-disk-row > b, .vs-nic-row > b { min-width: 110px; }
.vs-disk-row .vs-stepper { margin-left: auto; }
.vs-nic-row select { flex: 1; min-width: 180px; width: auto; font-size: 13px; padding: 8px 30px 8px 10px; }
.vs-disk-row.new { padding: 8px 10px; border-radius: 10px; background: var(--paper-2); }
.vs-review { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px 16px; padding: 14px 16px; border-radius: 13px; background: var(--paper-2); font-size: 13px; }
.vs-review dt { color: var(--ink-soft); }
.vs-review dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.vs-review dd > div { flex-basis: 100%; }
.vs-review dd .ic { width: 16px; height: 16px; }
.vs-clone-results { display: flex; flex-direction: column; gap: 8px; }
.vs-clone-res { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.vs-clone-res > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vs-clone-res small { font-size: 11.5px; color: var(--ink-soft); }
.vs-cr-ico { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--grape); color: var(--grape-deep); }
.vs-cr-ico .ic { width: 16px; height: 16px; }
.vs-clone-res.ok .vs-cr-ico { background: var(--leaf); color: var(--leaf-deep); }
.vs-clone-res.err .vs-cr-ico { background: var(--danger-bg); color: var(--tomato-deep); }
.vs-wiz-after { display: flex; gap: 8px; flex-wrap: wrap; }
.vs-edit .vs-callout { margin: 0; }
.vs-diff { font-size: 12px; color: var(--ink-soft); }
.vs-diff b { color: var(--ink); }

/* ---------------------------------------------------------------- settings */
.vs-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.vs-settings .vs-card { display: flex; flex-direction: column; gap: 14px; }
.vs-settings .vs-danger { border-color: color-mix(in srgb, var(--tomato-deep) 35%, var(--line)); }
.vs-settings .vs-danger h3 .ic { color: var(--tomato-deep); }
.vs-settings .vs-form-error { margin: 0; }

/* ---------------------------------------------------------------- empty */
.vs-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 24px 40px; text-align: center; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.vs-empty.small { padding: 36px 24px; }
.vs-empty > .ic { width: 34px; height: 34px; color: var(--grape-deep); }
.vs-empty h3 { font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.vs-empty p { max-width: 560px; font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.vs-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.vs-empty-art { position: relative; width: 150px; height: 84px; margin-bottom: 4px; }
.vs-empty-art span { position: absolute; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.vs-empty-art .ic { width: 26px; height: 26px; }
.vs-empty-art .a1 { left: 0; top: 18px; background: var(--grape); color: var(--grape-deep); transform: rotate(-8deg); }
.vs-empty-art .a2 { left: 46px; top: 0; z-index: 1; background: var(--sky); color: var(--sky-deep); }
.vs-empty-art .a3 { right: 0; top: 20px; background: var(--leaf); color: var(--leaf-deep); transform: rotate(8deg); }
.vs-empty.small .vs-empty-art { width: 58px; height: 60px; }
.vs-empty.small .vs-empty-art .a2 { left: 0; }
.vs-empty-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 900px; text-align: left; }
.vs-empty-points li { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px; background: var(--paper-2); }
.vs-empty-points .ic { width: 20px; height: 20px; color: var(--grape-deep); }
.vs-empty-points b { font-size: 13.5px; }
.vs-empty-points span { font-size: 12px; line-height: 1.6; color: var(--ink-soft); }

/* ---------------------------------------------------------------- loading */
.skeleton { position: relative; overflow: hidden; background: var(--paper-2); border-radius: 12px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 70%, transparent), transparent); animation: vs-shimmer 1.3s infinite; }
@keyframes vs-shimmer { to { transform: translateX(100%); } }
.vs-kpi.skeleton { height: 112px; border: 0; }
.vs-card.skeleton.tall { height: 280px; border: 0; }
.skeleton.line { height: 14px; margin: 12px 0; border-radius: 6px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1279px) {
  .vs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vs-ipam { grid-template-columns: 230px minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .vs-cols, .vs-settings { grid-template-columns: minmax(0, 1fr); }
  .vs-wiz-grid { grid-template-columns: minmax(0, 1fr); }
  .vs-wiz-summary { display: none; }
  .vs-ipam { grid-template-columns: minmax(0, 1fr); }
  .vs-pool-list { position: static; flex-direction: row; max-height: none; overflow-x: auto; padding-bottom: 6px; }
  .vs-pool-card { flex: 0 0 230px; }
  .vs-empty-points { grid-template-columns: minmax(0, 1fr); }
  .vs-host { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vs-host-name { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .vs-grid2, .vs-grid3, .vs-grid-host { grid-template-columns: minmax(0, 1fr); }
  .vs-head-actions .btn.ghost span { display: none; }
  .vs-grid-name { grid-template-columns: minmax(0, 1fr) auto; }
  .vs-search { min-width: 0; flex: 1 1 100%; }
  .vs-dw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-dev-row, .vs-dl { grid-template-columns: minmax(0, 1fr); }
  .vs-dev-row small { grid-column: 1; }
  .vs-cell { font-size: 8.5px; border-radius: 4px; }
  .vs-grid { gap: 2px; }
  .vs-stat.total { margin-left: 0; }
  .vs-find-row { grid-template-columns: 14px minmax(0, 1fr) auto; }
  .vs-find-row span, .vs-find-row small { display: none; }
  .vs-pool-mini-row { grid-template-columns: minmax(0, 1fr) auto; }
  .vs-pool-mini-row .vs-poolbar { grid-column: 1 / -1; grid-row: 2; }
  .vs-modal .vs-modal-card, .vs-modal .vs-modal-card.wide, .vs-modal .vs-modal-card.xl { width: 100%; }
  .vs-modal-head, .vs-modal-foot { padding-left: 18px; padding-right: 18px; }
  .vs-modal-body { padding-left: 18px; padding-right: 18px; }
  .vs-src { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .vs-src-spec { display: none; }
  .vs-review { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .vs-review dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .vs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-srv { min-width: 190px; }
  .vs-head-actions .btn.ghost span { display: none; }
  .vs-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
  .vs-cell { font-size: 9.5px; aspect-ratio: 1.7; }
  .vs-pool-detail, .vs-card { padding: 14px; }
  .vs-pd-bar { padding: 8px; }
  .vs-dw-head, .vs-dw-sec { padding-left: 16px; padding-right: 16px; }
  .vs-dw-tiles, .vs-dw-usage { padding-left: 16px; padding-right: 16px; }
  .vs-dw-usage > div { grid-template-columns: 56px 1fr; }
  .vs-dw-usage em { grid-column: 2; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .vs-spin, .vs-progress i, .vs-cell.p, .vs-cell.hl, .skeleton::after { animation: none; }
  .vs-drawer, .vs-drawer-shade, .vs-srv, .vs-kpi, .vs-cell { transition: none; }
}
