:root {
  --paper: #050914;
  --paper-2: #09111d;
  --paper-3: #0d1725;
  --ink: #edf4ff;
  --ink-strong: #ffffff;
  --muted: rgba(196, 217, 244, 0.76);
  --muted-2: rgba(196, 217, 244, 0.56);
  --line: rgba(88, 178, 255, 0.18);
  --line-strong: rgba(88, 178, 255, 0.34);
  --panel: rgba(10, 19, 33, 0.88);
  --panel-2: rgba(7, 16, 28, 0.96);
  --panel-3: rgba(15, 27, 44, 0.88);
  --nav-bg: #040912;
  --nav-bg-2: #060e18;
  --blue: #58b2ff;
  --blue-2: #2f91e8;
  --cyan: #7ce6c4;
  --gold: #ffc83d;
  --green: #36d28c;
  --red: #ff6a81;
  --orange: #ffcf65;
  --violet: #aa9cff;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  --shadow-small: 0 10px 24px rgba(0, 0, 0, 0.22);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-width: 304px;
  --topbar-height: 112px;
  --transition: 140ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(88, 178, 255, 0.14), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(124, 230, 196, 0.08), transparent 24%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

body {
  min-height: 100vh;
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

.customer-access-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px;
  overflow: auto;
  background:
    linear-gradient(rgba(3, 8, 16, 0.76), rgba(3, 8, 16, 0.92)),
    radial-gradient(circle at 20% 10%, rgba(88, 178, 255, 0.2), transparent 34%),
    radial-gradient(circle at 80% 90%, rgba(124, 230, 196, 0.1), transparent 30%),
    #050914;
}

.customer-access-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(88, 178, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 178, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
}

.customer-access-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  width: min(920px, 100%);
  overflow: hidden;
  border: 1px solid rgba(88, 178, 255, 0.28);
  border-radius: 28px;
  background: rgba(7, 16, 28, 0.94);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.52), 0 0 60px rgba(47, 145, 232, 0.09);
}

.customer-access-brand {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 48px;
  background:
    radial-gradient(circle at 50% 38%, rgba(88, 178, 255, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(8, 25, 43, 0.98), rgba(3, 10, 19, 0.98));
  border-right: 1px solid rgba(88, 178, 255, 0.16);
}

.customer-access-brand img {
  width: min(100%, 340px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  filter: drop-shadow(0 18px 38px rgba(0, 0, 0, 0.42));
}

.customer-access-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 58px;
}

.customer-access-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.customer-access-content h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.customer-access-copy {
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.customer-access-form {
  display: grid;
  gap: 17px;
}

.customer-access-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.customer-access-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(88, 178, 255, 0.22);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(3, 10, 19, 0.72);
}

.customer-access-button {
  min-height: 50px;
  margin-top: 5px;
  border: 1px solid rgba(88, 178, 255, 0.38);
  border-radius: 10px;
  color: #03111f;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 850;
}

.customer-access-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 700;
}

.customer-access-help {
  margin: 14px 0 0;
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.55;
}

.customer-access-footer {
  position: fixed;
  bottom: 18px;
  color: var(--muted-2);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .customer-access-screen { padding: 18px; }
  .customer-access-card { grid-template-columns: 1fr; }
  .customer-access-brand { min-height: 190px; padding: 24px; border-right: 0; border-bottom: 1px solid rgba(88, 178, 255, 0.16); }
  .customer-access-brand img { width: 150px; border-radius: 18px; }
  .customer-access-content { padding: 38px 28px 44px; }
  .customer-access-footer { display: none; }
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: var(--blue);
}

code,
.mono {
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 20px 16px 16px;
  background:
    radial-gradient(circle at top right, rgba(88, 178, 255, 0.16), transparent 32%),
    linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 18px 0 36px rgba(0, 0, 0, 0.16);
  z-index: 20;
}

.brand-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(88, 178, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow-small);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(124, 230, 196, 0.42);
  border-radius: 15px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(145deg, rgba(88, 178, 255, 0.3), rgba(124, 230, 196, 0.14));
  color: var(--ink-strong);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-panel h1 {
  margin: 0;
  font-size: 1.33rem;
  line-height: 1.05;
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.controller-status {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
}

.controller-status-grid {
  display: grid;
  gap: 9px;
}

.controller-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.controller-status-row strong {
  color: var(--ink);
  font-weight: 700;
}

.skeleton-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(88, 178, 255, 0.16), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.35s linear infinite;
}

.skeleton-line + .skeleton-line {
  margin-top: 10px;
}

.skeleton-line-short {
  width: 66%;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.nav-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 10px;
  border: 1px solid rgba(88, 178, 255, 0.14);
  border-radius: var(--radius-md);
  background: rgba(2, 7, 14, 0.66);
  transition: border-color var(--transition), background var(--transition);
}

.nav-search:focus-within {
  border-color: rgba(124, 230, 196, 0.54);
  background: rgba(8, 18, 30, 0.94);
}

.nav-search-icon {
  color: var(--muted);
  font-size: 1.05rem;
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
  font-size: 0.86rem;
}

.nav-search input::placeholder {
  color: var(--muted-2);
}

.nav-search kbd {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
}

.sidebar-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  margin: 12px -4px 0;
  padding: 0 4px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 178, 255, 0.32) transparent;
}

.sidebar-scroll::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar,
.builder-canvas-viewport::-webkit-scrollbar,
.inspector-scroll::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.sidebar-scroll::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb,
.builder-canvas-viewport::-webkit-scrollbar-thumb,
.inspector-scroll::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(88, 178, 255, 0.3);
  background-clip: padding-box;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 9px 8px;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-count,
.button-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(88, 178, 255, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(88, 178, 255, 0.1);
  font-size: 0.7rem;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.nav-item:hover {
  transform: translateX(2px);
  border-color: rgba(88, 178, 255, 0.15);
  background: rgba(88, 178, 255, 0.07);
}

.nav-item.is-active {
  border-color: rgba(88, 178, 255, 0.28);
  background: linear-gradient(135deg, rgba(88, 178, 255, 0.18), rgba(124, 230, 196, 0.07));
  box-shadow: inset 3px 0 0 var(--blue);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 800;
}

.nav-item.is-product .nav-icon {
  color: var(--cyan);
}

.nav-copy {
  min-width: 0;
}

.nav-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subtitle {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.nav-empty {
  padding: 12px 10px;
  color: var(--muted-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.sidebar-footer {
  padding: 12px 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.sidebar-footer-meta {
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-2);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.main-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100vh;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--topbar-height);
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(88, 178, 255, 0.12);
  background: rgba(5, 9, 20, 0.76);
  backdrop-filter: blur(16px);
  z-index: 10;
}

.topbar-title {
  min-width: 0;
}

.breadcrumb {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.topbar h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  line-height: 1.08;
}

.page-description {
  max-width: 880px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}

.authority-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(88, 178, 255, 0.16);
  border-radius: 999px;
  background: rgba(11, 24, 39, 0.86);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.page-host {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 22px 28px 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(88, 178, 255, 0.28) transparent;
}

.page-host.page-host-fixed {
  overflow: hidden;
  padding: 18px;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.page-grid {
  display: grid;
  gap: 18px;
}

.page-grid.two-column {
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.page-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.stat-card,
.table-card,
.toolbar,
.detail-panel,
.empty-state,
.callout,
.hero-card,
.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow-small);
}

.card,
.table-card,
.detail-panel,
.empty-state,
.callout,
.hero-card {
  padding: 20px;
}

.card.card-tight,
.table-card.card-tight {
  padding: 14px;
}

.card-header,
.table-card-header,
.detail-header,
.section-heading,
.hero-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-header + *,
.table-card-header + *,
.detail-header + * {
  margin-top: 16px;
}

.card-title,
.section-title,
.card-header h3,
.table-card-header h3,
.detail-header h3,
.hero-card h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1rem;
}

.card-subtitle,
.section-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 0%, rgba(124, 230, 196, 0.14), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(88, 178, 255, 0.14), transparent 34%),
    var(--panel-2);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(88, 178, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(88, 178, 255, 0.045) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(to right, rgba(0,0,0,0.7), transparent 70%);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.5fr);
  gap: 24px;
  align-items: center;
}

.hero-title {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.45rem, 2.4vw, 2.4rem);
  line-height: 1.08;
}

.hero-copy {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.hero-artwork {
  display: grid;
  place-items: center;
  min-height: 150px;
}

.hero-artwork img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.34));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-grid.stats-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-card {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(88, 178, 255, 0.055), transparent 58%),
    var(--panel);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.stat-value {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: var(--ink-strong);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 0.74rem;
  line-height: 1.35;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.02);
}

.status-green { background: var(--green); }
.status-red { background: var(--red); }
.status-orange { background: var(--orange); }
.status-blue { background: var(--blue); }
.status-cyan { background: var(--cyan); }
.status-muted { background: rgba(196, 217, 244, 0.36); }

.badge,
.chip,
.table-status,
.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge,
.health-pill {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(88, 178, 255, 0.16);
  background: rgba(88, 178, 255, 0.08);
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 750;
}

.badge.success,
.health-pill.success {
  border-color: rgba(54, 210, 140, 0.25);
  background: rgba(54, 210, 140, 0.1);
}

.badge.warning,
.health-pill.warning {
  border-color: rgba(255, 207, 101, 0.26);
  background: rgba(255, 207, 101, 0.1);
}

.badge.danger,
.health-pill.danger {
  border-color: rgba(255, 106, 129, 0.28);
  background: rgba(255, 106, 129, 0.1);
}

.badge.info,
.health-pill.info {
  border-color: rgba(88, 178, 255, 0.26);
  background: rgba(88, 178, 255, 0.11);
}

.chip {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.72rem;
}

.chip-row,
.badge-row,
.action-row,
.filter-row,
.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.button,
.icon-button,
.segment-button,
.action-link,
.tool-button {
  border: 1px solid transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 750;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.tool-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button-primary {
  border-color: rgba(88, 178, 255, 0.42);
  background: linear-gradient(135deg, rgba(88, 178, 255, 0.32), rgba(47, 145, 232, 0.24));
}

.button-primary:hover:not(:disabled) {
  border-color: rgba(124, 230, 196, 0.48);
  background: linear-gradient(135deg, rgba(88, 178, 255, 0.42), rgba(124, 230, 196, 0.18));
}

.button-secondary {
  border-color: rgba(88, 178, 255, 0.18);
  background: rgba(88, 178, 255, 0.075);
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(124, 230, 196, 0.34);
  background: rgba(124, 230, 196, 0.09);
}

.button-danger {
  border-color: rgba(255, 106, 129, 0.3);
  background: rgba(255, 106, 129, 0.1);
}

.button-warning {
  border-color: rgba(255, 207, 101, 0.28);
  background: rgba(255, 207, 101, 0.1);
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.button-small {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.icon-button,
.tool-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-color: rgba(88, 178, 255, 0.16);
  border-radius: 10px;
  background: rgba(88, 178, 255, 0.06);
  font-size: 1rem;
}

.tool-button.is-active {
  border-color: rgba(124, 230, 196, 0.46);
  background: rgba(124, 230, 196, 0.13);
  color: var(--cyan);
}

.action-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
}

.action-link:hover {
  color: var(--cyan);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(7, 16, 28, 0.88);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar-divider {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.search-field,
.select-field,
.input-field,
.textarea-field {
  border: 1px solid rgba(88, 178, 255, 0.16);
  border-radius: 10px;
  background: rgba(4, 10, 18, 0.76);
  color: var(--ink);
}

.search-field,
.input-field,
.select-field {
  min-height: 38px;
  padding: 0 11px;
}

.search-field {
  width: min(280px, 100%);
}

.select-field {
  min-width: 145px;
}

.textarea-field {
  width: 100%;
  min-height: 92px;
  padding: 10px 11px;
  resize: vertical;
}

.search-field::placeholder,
.input-field::placeholder,
.textarea-field::placeholder {
  color: var(--muted-2);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(7, 19, 34, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.wizard-step > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.wizard-step.is-current {
  border-color: var(--cyan);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(78, 198, 255, 0.2);
}

.wizard-step.is-current > span,
.wizard-step.is-complete > span {
  border-color: var(--aqua);
  color: var(--aqua);
  background: rgba(55, 220, 185, 0.1);
}

.wizard-review {
  display: grid;
  gap: 14px;
}

@media (max-width: 760px) {
  .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.form-grid.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field.form-span-2 {
  grid-column: 1 / -1;
}

.form-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.form-help {
  color: var(--muted-2);
  font-size: 0.7rem;
  line-height: 1.4;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.checkbox-field input {
  accent-color: var(--blue);
}

.table-card {
  min-width: 0;
  overflow: hidden;
}

.table-card.no-padding {
  padding: 0;
}

.table-card.no-padding .table-card-header {
  padding: 18px 20px 14px;
}

.table-scroll {
  overflow: auto;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(88, 178, 255, 0.11);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0d1b2b;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(88, 178, 255, 0.045);
}

tbody tr.is-selected {
  background: rgba(88, 178, 255, 0.1);
  box-shadow: inset 3px 0 0 var(--blue);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.table-title {
  display: block;
  color: var(--ink);
  font-weight: 750;
}

.table-copy {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.35;
}

.table-path {
  display: block;
  max-width: 460px;
  overflow: hidden;
  color: var(--muted);
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-status {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.table-empty {
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.fact-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.fact-label {
  display: block;
  color: var(--muted-2);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.fact-value {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  word-break: break-word;
}

.fact-note {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 0.7rem;
  line-height: 1.4;
}

.progress-group {
  display: grid;
  gap: 11px;
}

.progress-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.progress-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.progress-bar.warning {
  background: linear-gradient(90deg, var(--gold), var(--orange));
}

.progress-bar.danger {
  background: linear-gradient(90deg, var(--red), var(--orange));
}

.progress-value {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 750;
}

.list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(88, 178, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.list-item-title {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
}

.list-item-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.4;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 38px 28px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border: 1px solid rgba(88, 178, 255, 0.2);
  border-radius: 17px;
  background: rgba(88, 178, 255, 0.08);
  color: var(--blue);
  font-size: 1.35rem;
}

.empty-state h3,
.empty-state h4 {
  margin: 0;
}

.empty-state p {
  max-width: 600px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.callout {
  border-color: rgba(88, 178, 255, 0.22);
  background: linear-gradient(135deg, rgba(88, 178, 255, 0.1), rgba(124, 230, 196, 0.045));
}

.callout.warning {
  border-color: rgba(255, 207, 101, 0.26);
  background: rgba(255, 207, 101, 0.075);
}

.callout.danger {
  border-color: rgba(255, 106, 129, 0.28);
  background: rgba(255, 106, 129, 0.075);
}

.callout-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
}

.callout-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: 12px;
  background: rgba(3, 9, 17, 0.55);
}

.tab-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 750;
}

.tab-button:hover {
  color: var(--ink);
  background: rgba(88, 178, 255, 0.06);
}

.tab-button.is-active {
  border-color: rgba(88, 178, 255, 0.24);
  background: rgba(88, 178, 255, 0.13);
  color: var(--ink-strong);
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(88, 178, 255, 0.13);
  border-radius: 10px;
  background: rgba(3, 9, 17, 0.58);
}

.segment-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.segment-button.is-active {
  border-color: rgba(124, 230, 196, 0.28);
  background: rgba(124, 230, 196, 0.1);
  color: var(--cyan);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(88, 178, 255, 0.055), transparent 56%), var(--panel);
  box-shadow: var(--shadow-small);
  transition: transform var(--transition), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 178, 255, 0.32);
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.product-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(124, 230, 196, 0.24);
  border-radius: 12px;
  background: rgba(124, 230, 196, 0.075);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 900;
}

.product-name {
  overflow: hidden;
  margin: 0;
  color: var(--ink-strong);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-version {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.product-card-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.48;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.product-detail-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-detail-title .product-icon {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.product-detail-title h3 {
  margin: 0;
  font-size: 1.5rem;
}

.product-detail-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.mini-card {
  min-width: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.mini-card-label {
  display: block;
  color: var(--muted-2);
  font-size: 0.68rem;
  font-weight: 700;
}

.mini-card-value {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* AO-DVM virtualization console */
.dvm-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.dvm-main {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.inventory-pane {
  min-width: 0;
  overflow: auto;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: rgba(4, 10, 18, 0.72);
}

.inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 10px;
}

.inventory-heading h3 {
  margin: 0;
  font-size: 0.84rem;
}

.inventory-tree,
.inventory-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.inventory-tree ul {
  margin-left: 16px;
  padding-left: 9px;
  border-left: 1px solid rgba(88, 178, 255, 0.12);
}

.inventory-node {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  margin: 2px 0;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.inventory-node:hover {
  background: rgba(88, 178, 255, 0.06);
  color: var(--ink);
}

.inventory-node.is-selected {
  border-color: rgba(88, 178, 255, 0.22);
  background: rgba(88, 178, 255, 0.12);
  color: var(--ink-strong);
}

.inventory-node-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.inventory-node-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inventory-node-label {
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-node-count {
  color: var(--muted-2);
  font-size: 0.65rem;
}

.inventory-node[data-type="datacenter"] .inventory-node-icon,
.inventory-node[data-type="cluster"] .inventory-node-icon {
  color: #71b8ff;
}

.inventory-node[data-type="host"] .inventory-node-icon {
  color: #7ce6c4;
}

.inventory-node[data-type="vm"] .inventory-node-icon {
  color: #58b2ff;
}

.inventory-node[data-type="datastore"] .inventory-node-icon {
  color: #ffcf65;
}

.inventory-node[data-type="network"] .inventory-node-icon {
  color: #8eb8ff;
}

.dvm-market-section {
  margin-top: 18px;
  padding: 14px 10px 10px;
  border-top: 1px solid rgba(88, 178, 255, 0.12);
}

.dvm-market-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dvm-market-heading h3,
.dvm-market-group-head h4,
.dvm-market-card h4 {
  margin: 0;
}

.dvm-market-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.dvm-market-group {
  margin-top: 14px;
}

.dvm-market-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink-strong);
  font-size: 0.74rem;
}

.dvm-market-group-head span {
  color: var(--muted-2);
  font-size: 0.68rem;
}

.dvm-market-list {
  display: grid;
  gap: 8px;
}

.dvm-market-card {
  padding: 10px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: 12px;
  background: rgba(8, 15, 26, 0.68);
}

.dvm-market-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dvm-market-card-kind {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dvm-market-card-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.dvm-market-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 0.66rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.dvm-content {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.dvm-object-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(88, 178, 255, 0.1);
}

.dvm-object-title {
  min-width: 0;
}

.dvm-object-title h3 {
  overflow: hidden;
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dvm-object-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.dvm-tabs-wrap {
  padding: 10px 18px;
  border-bottom: 1px solid rgba(88, 178, 255, 0.1);
}

.dvm-view {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 20px;
}

.dvm-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dvm-kpi {
  padding: 14px;
  border: 1px solid rgba(88, 178, 255, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.dvm-kpi-label {
  color: var(--muted);
  font-size: 0.72rem;
}

.dvm-kpi-value {
  display: block;
  margin-top: 7px;
  color: var(--ink-strong);
  font-size: 1.15rem;
  font-weight: 850;
}

.vm-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.vm-power-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(88, 178, 255, 0.15);
  border-radius: 9px;
  background: rgba(88, 178, 255, 0.07);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.vm-power-icon.running {
  border-color: rgba(54, 210, 140, 0.22);
  background: rgba(54, 210, 140, 0.08);
  color: var(--green);
}

.vm-power-icon.suspended,
.vm-power-icon.standby {
  border-color: rgba(255, 207, 101, 0.22);
  background: rgba(255, 207, 101, 0.08);
  color: var(--orange);
}

.placement-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.placement-policy {
  padding: 12px;
  border: 1px solid rgba(88, 178, 255, 0.13);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.placement-policy strong {
  display: block;
  color: var(--ink);
  font-size: 0.78rem;
}

.placement-policy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

/* Visio-like network builder */
.builder-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.builder-toolbar {
  border-radius: var(--radius-lg);
}

.builder-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(88, 178, 255, 0.13);
  border-radius: 10px;
  background: rgba(6, 14, 24, 0.88);
  color: var(--muted-2);
  font-size: 0.68rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 292px;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.builder-palette,
.builder-inspector {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: rgba(4, 10, 18, 0.74);
}

.builder-palette {
  padding: 12px;
  border-right: 1px solid var(--line);
}

.builder-inspector {
  border-left: 1px solid var(--line);
}

.builder-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 12px;
}

.builder-panel-heading h3 {
  margin: 0;
  font-size: 0.83rem;
}

.palette-search {
  width: 100%;
  margin-bottom: 10px;
}

.palette-group + .palette-group {
  margin-top: 12px;
}

.palette-group-title {
  margin: 0 0 7px;
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.palette-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.palette-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 9px 5px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: grab;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.palette-item:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 230, 196, 0.3);
  background: rgba(124, 230, 196, 0.07);
  color: var(--ink);
}

.palette-item:active {
  cursor: grabbing;
}

.palette-item-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(88, 178, 255, 0.18);
  border-radius: 10px;
  background: rgba(88, 178, 255, 0.07);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.palette-item-label {
  overflow: hidden;
  width: 100%;
  font-size: 0.66rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-canvas-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #07101b;
}

.builder-canvas-viewport {
  position: absolute;
  inset: 0;
  overflow: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 178, 255, 0.055), transparent 42%),
    #07101b;
}

.builder-canvas-stage {
  position: relative;
  width: 1800px;
  height: 1100px;
  transform-origin: 0 0;
  background-image:
    linear-gradient(rgba(88, 178, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 178, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(88, 178, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 178, 255, 0.025) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}

.builder-canvas-stage.grid-hidden {
  background-image: none;
}

.builder-drop-hint {
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(88, 178, 255, 0.22);
  border-radius: 18px;
  color: var(--muted-2);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.builder-canvas-shell.is-drag-over .builder-drop-hint {
  opacity: 1;
}

.connector-layer {
  position: absolute;
  inset: 0;
  width: 1800px;
  height: 1100px;
  overflow: visible;
  pointer-events: none;
}

.connector-line {
  fill: none;
  stroke: rgba(88, 178, 255, 0.72);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(88, 178, 255, 0.22));
}

.connector-line.encrypted {
  stroke: rgba(124, 230, 196, 0.86);
}

.connector-line.standby {
  stroke: rgba(255, 207, 101, 0.74);
  stroke-dasharray: 8 6;
}

.connector-line.is-selected {
  stroke: var(--gold);
  stroke-width: 4;
}

.connector-hitbox {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  pointer-events: stroke;
  cursor: pointer;
}

.network-node {
  position: absolute;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 170px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(88, 178, 255, 0.3);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(88, 178, 255, 0.12), rgba(7, 16, 28, 0.96) 62%),
    var(--panel-2);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.3);
  color: var(--ink);
  cursor: grab;
  user-select: none;
}

.network-node:hover {
  border-color: rgba(124, 230, 196, 0.48);
}

.network-node.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.16), 0 14px 28px rgba(0, 0, 0, 0.36);
}

.network-node.is-connect-source {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(124, 230, 196, 0.16);
}

.network-node:active {
  cursor: grabbing;
}

.network-node-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(88, 178, 255, 0.2);
  border-radius: 12px;
  background: rgba(88, 178, 255, 0.09);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.network-node[data-type="firewall"] .network-node-icon,
.network-node[data-type="vpn"] .network-node-icon {
  color: var(--orange);
  background: rgba(255, 207, 101, 0.08);
  border-color: rgba(255, 207, 101, 0.2);
}

.network-node[data-type="vm"] .network-node-icon,
.network-node[data-type="container"] .network-node-icon,
.network-node[data-type="host"] .network-node-icon {
  color: var(--cyan);
  background: rgba(124, 230, 196, 0.08);
  border-color: rgba(124, 230, 196, 0.2);
}

.network-node[data-type="store"] .network-node-icon,
.network-node[data-type="datastore"] .network-node-icon {
  color: var(--violet);
  background: rgba(170, 156, 255, 0.08);
  border-color: rgba(170, 156, 255, 0.2);
}

.network-node-copy {
  min-width: 0;
}

.network-node-title {
  display: block;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.75rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-node-meta {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-status-indicator {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.node-status-indicator.warning { background: var(--orange); }
.node-status-indicator.offline { background: var(--red); }
.node-status-indicator.design { background: var(--blue); }

.inspector-header {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.inspector-header h3 {
  margin: 0;
  font-size: 0.9rem;
}

.inspector-header p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 0.68rem;
}

.inspector-scroll {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.inspector-section + .inspector-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(88, 178, 255, 0.1);
}

.inspector-section-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspector-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px;
  color: var(--muted-2);
  text-align: center;
  line-height: 1.5;
}

/* Modal, drawer and toast */
.modal-layer,
.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal-layer[hidden],
.drawer-layer[hidden] {
  display: none;
}

.modal-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 11, 0.72);
  backdrop-filter: blur(7px);
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(720px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 36px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(88, 178, 255, 0.26);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #091421;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.56);
}

.modal.modal-wide {
  width: min(980px, calc(100vw - 36px));
}

.modal-header,
.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 28, 0.96);
}

.modal-header h3,
.drawer-header h3 {
  margin: 0;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 20px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 66px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: rgba(7, 16, 28, 0.96);
}

.activity-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(520px, 92vw);
  height: 100%;
  border-left: 1px solid rgba(88, 178, 255, 0.24);
  background: #091421;
  box-shadow: -26px 0 60px rgba(0, 0, 0, 0.42);
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(88, 178, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(88, 178, 255, 0.16);
  border-radius: 9px;
  background: rgba(88, 178, 255, 0.07);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
}

.activity-title {
  color: var(--ink);
  font-size: 0.77rem;
  font-weight: 750;
}

.activity-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.activity-time {
  color: var(--muted-2);
  font-size: 0.66rem;
  white-space: nowrap;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 9px;
  width: min(390px, calc(100vw - 36px));
  z-index: 200;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(88, 178, 255, 0.24);
  border-radius: var(--radius-md);
  background: rgba(9, 20, 33, 0.97);
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in 180ms ease-out;
}

.toast.success { border-color: rgba(54, 210, 140, 0.34); }
.toast.warning { border-color: rgba(255, 207, 101, 0.34); }
.toast.danger { border-color: rgba(255, 106, 129, 0.36); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-title {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.toast-copy {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.4;
}

.toast-close {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}

.loading-state,
.error-state {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 420px;
  padding: 32px;
  text-align: center;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 3px solid rgba(88, 178, 255, 0.14);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state h3,
.error-state h3 {
  margin: 0;
}

.loading-state p,
.error-state p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.text-muted { color: var(--muted); }
.text-dim { color: var(--muted-2); }
.text-success { color: var(--green); }
.text-warning { color: var(--orange); }
.text-danger { color: var(--red); }
.text-blue { color: var(--blue); }
.text-cyan { color: var(--cyan); }
.align-right { text-align: right; }
.no-margin { margin: 0; }
.nowrap { white-space: nowrap; }

@media (max-width: 1420px) {
  :root {
    --sidebar-width: 280px;
  }

  .stats-grid.stats-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .placement-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-layout {
    grid-template-columns: 200px minmax(0, 1fr) 260px;
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .main-shell {
    height: auto;
    min-height: 100vh;
  }

  .page-host {
    overflow: visible;
  }

  .page-grid.two-column,
  .page-grid.equal,
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .stats-grid.stats-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-workspace,
  .dvm-workspace {
    height: 850px;
  }

  .builder-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .builder-inspector {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    transform: translateX(100%);
    z-index: 5;
  }

  .builder-inspector.is-open {
    transform: translateX(0);
  }

  .dvm-main {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar-scroll {
    max-height: 440px;
  }

  .topbar {
    flex-direction: column;
    padding: 18px;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .page-host,
  .page-host.page-host-fixed {
    padding: 16px;
    overflow: visible;
  }

  .product-grid,
  .stats-grid,
  .stats-grid.stats-grid-5,
  .form-grid,
  .form-grid.form-grid-3,
  .fact-grid,
  .dvm-summary-grid,
  .placement-policy-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-hero {
    grid-template-columns: 1fr;
  }

  .builder-workspace,
  .dvm-workspace {
    height: auto;
    min-height: 840px;
  }

  .builder-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(560px, 1fr);
  }

  .builder-palette {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .palette-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dvm-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(600px, 1fr);
  }

  .inventory-pane {
    max-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 560px) {
  .topbar-actions,
  .hero-actions,
  .action-row,
  .toolbar,
  .toolbar-left,
  .toolbar-right {
    align-items: stretch;
  }

  .topbar-actions,
  .toolbar {
    flex-direction: column;
  }

  .button,
  .authority-pill,
  .search-field,
  .select-field {
    width: 100%;
  }

  .palette-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  th,
  td {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Builder runtime additions */
.builder-canvas-sizer {
  position: relative;
  width: 1800px;
  height: 1100px;
}

.connector-label {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #07101b;
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
}

.connector-label.is-selected {
  fill: var(--gold);
}

.builder-mode-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.builder-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.builder-property-list {
  display: grid;
  gap: 8px;
}

.builder-property-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.builder-validation-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.builder-validation-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(88, 178, 255, 0.11);
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.builder-canvas-stage.mode-connect .network-node {
  cursor: crosshair;
}

.builder-canvas-stage.mode-connect .network-node:hover {
  border-color: var(--cyan);
}

.network-node[data-type="dvm"] .network-node-icon,
.network-node[data-type="cluster"] .network-node-icon {
  color: var(--cyan);
  background: rgba(124, 230, 196, 0.08);
  border-color: rgba(124, 230, 196, 0.2);
}

.network-node[data-type="segment"] .network-node-icon,
.network-node[data-type="switch"] .network-node-icon,
.network-node[data-type="router"] .network-node-icon,
.network-node[data-type="gateway"] .network-node-icon,
.network-node[data-type="service-plane"] .network-node-icon {
  color: var(--blue);
}

.network-node[data-type="pmesh"] .network-node-icon,
.network-node[data-type="identity"] .network-node-icon,
.network-node[data-type="sssl"] .network-node-icon {
  color: var(--gold);
  background: rgba(255, 200, 61, 0.07);
  border-color: rgba(255, 200, 61, 0.2);
}

.network-node[data-type="site"] {
  width: 190px;
  border-style: dashed;
}

.builder-toolbar .tool-button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

/* Keep labeled builder tools readable; icon-only modal controls remain square. */
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  font-size: 0.72rem;
  white-space: nowrap;
}
