:root {
  --bg: #0b1220;
  --panel: #101a2e;
  --panel2: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: rgba(255,255,255,.08);
  --chip: rgba(255,255,255,.08);

  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --na: #64748b;

  --accent: #38bdf8;
  --accent-dim: rgba(56,189,248,.12);
  --accent-glow: rgba(56,189,248,.25);
  --accent2: #818cf8;
  --accent2-dim: rgba(129,140,248,.12);

  --sidebar-w: 264px;
  --sidebar-bg: #090e1a;
  --sidebar-border: rgba(255,255,255,.06);

  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  height: 100%;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

body {
  overflow: hidden;
}

body.mobile-sidebar-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.is-hidden {
  display: none !important;
}

/* Shell */
.shell {
  display: flex;
  height: 100dvh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 39;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent-glow) 40%, transparent);
  pointer-events: none;
}

.sidebar-logo {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
  flex-shrink: 0;
  box-shadow: 0 0 18px var(--accent-glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.logo-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
}

.logo-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--na);
  padding: 14px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
  border: 1px solid transparent;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-dim);
  border-color: rgba(56,189,248,.2);
  color: var(--accent);
}

.nav-item .nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--sidebar-border);
}

.env-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  font-size: 11px;
  color: var(--good);
}

.env-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 6px var(--good);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Main */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, #050816 100%);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,18,32,.8);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
}

.topbar-sub {
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-menu-btn {
  display: none;
}

.content {
  flex: 1;
  overflow: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

.content::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.content::-webkit-scrollbar-track {
  background: transparent;
}
.content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
  border-radius: 10px;
}

/* Shared */
.card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: .3px;
}

.card-title-icon {
  font-size: 14px;
}

.panel {
  background: rgba(0,0,0,.15);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  min-width: 0;
}

/* Grids */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.kpi-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .3px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  word-break: break-word;
}

.kpi-change {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.kpi-change.up { color: var(--good); }
.kpi-change.down { color: var(--bad); }

.badge,
.chip,
.info-pill {
  max-width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
}

.badge-good { background: rgba(34,197,94,.1); color: var(--good); border-color: rgba(34,197,94,.25); }
.badge-warn { background: rgba(245,158,11,.1); color: var(--warn); border-color: rgba(245,158,11,.25); }
.badge-bad  { background: rgba(239,68,68,.1); color: var(--bad); border-color: rgba(239,68,68,.25); }
.badge-na   { background: rgba(100,116,139,.1); color: #cbd5e1; }
.badge-accent { background: var(--accent-dim); color: var(--accent); border-color: rgba(56,189,248,.25); }
.badge-purple { background: var(--accent2-dim); color: var(--accent2); border-color: rgba(129,140,248,.25); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--chip);
  border: 1px solid var(--line);
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  transition: all .15s;
  white-space: nowrap;
}

.btn:hover {
  background: rgba(255,255,255,.09);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: transparent;
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary:hover {
  background: #7dd3fc;
  box-shadow: 0 0 26px var(--accent-glow);
}

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

.btn-ghost:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.input,
.select,
.textarea {
  width: 100%;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.2);
  color: var(--text);
  outline: none;
}

.input,
.select {
  padding: 9px 12px;
  font-size: 13px;
}

.input-mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(56,189,248,.4);
}

.input::placeholder {
  color: var(--na);
}

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.textarea {
  padding: 10px 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  resize: vertical;
  min-height: 110px;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.form-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table-wrapper {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255,255,255,.02);
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-good { color: var(--good); }
.text-warn { color: var(--warn); }
.text-bad { color: var(--bad); }

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

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 6px 12px;
  font-size: 12px;
}

.tech-grid .tg-k {
  color: var(--muted);
}

.tech-grid .tg-v {
  font-family: var(--font-mono);
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tech-grid .tg-sep {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.builder-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 16px;
  min-height: calc(100dvh - 120px);
}

.builder-panel {
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.builder-panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.15);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.builder-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}

.builder-panel-body::-webkit-scrollbar {
  width: 4px;
}
.builder-panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.builder-panel-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
  background: rgba(0,0,0,.1);
}

.module-card:hover {
  border-color: rgba(56,189,248,.25);
  background: var(--accent-dim);
}

.module-card.selected {
  border-color: rgba(56,189,248,.4);
  background: var(--accent-dim);
}

.module-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.module-info {
  flex: 1;
  min-width: 0;
}

.module-name {
  font-size: 12px;
  font-weight: 600;
}

.module-desc {
  font-size: 11px;
  color: var(--muted);
}

.code-block {
  background: #050d1a;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: #cbd5e1;
  overflow: auto;
  white-space: pre;
}

.code-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.code-tab {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all .15s;
}

.code-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(56,189,248,.25);
}

.code-tab:not(.active):hover {
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 32px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.service-card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .15s;
  min-width: 0;
}

.service-card:hover {
  border-color: rgba(255,255,255,.14);
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.service-info {
  flex: 1;
  min-width: 0;
}

.service-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}

.service-desc {
  font-size: 11px;
  color: var(--muted);
}

.service-meta {
  text-align: right;
  flex-shrink: 0;
}

.infra-node {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  position: relative;
}

.infra-node-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 10px;
  color: #cbd5e1;
}

.workload-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  font-size: 11px;
  margin: 2px;
  color: var(--muted);
}

.workload-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
}

.progress-bar {
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .4s ease;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  margin-bottom: 12px;
}

.alert-info { background: var(--accent-dim); border: 1px solid rgba(56,189,248,.2); color: #bae6fd; }
.alert-warn { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #fcd34d; }
.alert-bad  { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #fca5a5; }

.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.accent-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 20px 0;
  opacity: .4;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
  margin-bottom: 4px;
}

.section-header p {
  font-size: 13px;
  color: var(--muted);
}

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

.empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.empty-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.empty-desc {
  font-size: 12px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--na);
  box-shadow: 0 0 6px rgba(100,116,139,.35);
}

.dot.good { background: var(--good); box-shadow: 0 0 8px rgba(34,197,94,.45); }
.dot.bad  { background: var(--bad);  box-shadow: 0 0 8px rgba(239,68,68,.35); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(245,158,11,.35); }

.tenant-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  min-width: 0;
}

.tenant-switcher-label {
  font-size: 11px;
  color: var(--muted);
}

.tenant-switcher-select {
  width: 220px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--r-md);
}

.table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  vertical-align: middle;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255,255,255,.10);
  border: 1px solid var(--line);
  transition: .2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  top: 2px;
  background-color: rgba(255,255,255,.75);
  transition: .2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.25);
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
  background-color: #eafff0;
}

.switch input:disabled + .slider {
  opacity: .5;
  cursor: not-allowed;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 18px;
}

.modal {
  width: min(720px, 100%);
  max-height: min(90dvh, 900px);
  background: rgba(16,26,46,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  animation: fadeInUp .16s ease both;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
}

.modal-body {
  padding: 18px;
  overflow: auto;
}

.modal-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255,255,255,.02);
}

/* Toasts */
#toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: auto;
  background: rgba(16,26,46,.96);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  color: var(--text);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}

.toast.good { border-left-color: var(--good); }
.toast.warn { border-left-color: var(--warn); }
.toast.bad  { border-left-color: var(--bad); }

.toast-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 2px;
}

.toast-body {
  font-size: 12px;
  color: var(--muted);
}

/* Auth */
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(56,189,248,.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(129,140,248,.14), transparent 28%),
    linear-gradient(180deg, #07101d 0%, #0b1220 100%);
}

.auth-card {
  width: min(460px, 100%);
  background: rgba(16,26,46,.95);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.38);
}

.auth-card-wide {
  width: min(720px, 100%);
}

.auth-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.auth-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
}

.auth-sub {
  font-size: 13px;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Utility */
.section-view {
  animation: fadeInUp .2s ease both;
  min-width: 0;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1200px) {
  .builder-shell {
    grid-template-columns: 240px minmax(0, 1fr) 280px;
  }

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

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

@media (max-width: 900px) {
  body.mobile-sidebar-open .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .shell {
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 320px);
    min-width: min(82vw, 320px);
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 40;
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .topbar {
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-left,
  .topbar-actions {
    width: 100%;
  }

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

  .tenant-switcher {
    width: 100%;
  }

  .tenant-switcher-select {
    width: 100%;
  }

  .content {
    padding: 16px;
  }

  .grid-2,
  .grid-3,
  .grid-12,
  .grid-21,
  .builder-shell {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .service-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-meta {
    text-align: left;
  }

  .tech-grid {
    grid-template-columns: 1fr;
  }

  .tech-grid .tg-k {
    font-weight: 700;
    color: #cbd5e1;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar > * {
    width: 100%;
  }

  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }

  .modal {
    width: 100%;
    max-height: 92dvh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  #toast-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
  }

  .auth-screen {
    padding: 16px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 20px;
  }
}

@media (max-width: 560px) {
  html, body {
    font-size: 13px;
  }

  .topbar-title {
    font-size: 15px;
  }

  .topbar-sub {
    font-size: 11px;
  }

  .btn,
  .input,
  .select,
  .textarea {
    font-size: 16px;
  }

  .btn-sm {
    font-size: 12px;
  }

  .card,
  .panel {
    padding: 14px;
  }

  .auth-title {
    font-size: 18px;
  }

  .logo-name {
    font-size: 12px;
  }

  table {
    min-width: 640px;
  }
}
.section-mini-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Runtime Config admin view */
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h1 {
  margin: 0 0 6px 0;
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

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

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pre-block {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  padding: 12px;
  color: var(--text);
  font-size: 12px;
}

@media (max-width: 900px) {
  .section-head {
    flex-direction: column;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   DKY FRONTEND STYLE MANIFEST v1 OVERRIDES
   Applied to Platform Admin shell without changing view logic.
   ========================= */

:root {
  --bg: #f3f6fb;
  --bg-soft: #e8eef7;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --panel2: #eef2f7;
  --panel-2: #eef2f7;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --muted: #64748b;
  --chip: rgba(15, 23, 42, 0.055);
  --accent: #64748b;
  --accent-dim: rgba(100, 116, 139, 0.12);
  --accent-soft: rgba(100, 116, 139, 0.12);
  --accent-glow: rgba(100, 116, 139, 0.18);
  --accent2: #475569;
  --accent2-dim: rgba(71, 85, 105, 0.12);
  --good: #16a34a;
  --success: #16a34a;
  --warn: #d97706;
  --warning: #d97706;
  --bad: #dc2626;
  --danger: #dc2626;
  --na: #94a3b8;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --body-bg: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  --sidebar-bg: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  --topbar-bg: rgba(255, 255, 255, 0.86);
  --card-bg: #ffffff;
  --card-soft-bg: #f8fafc;
  --hover-bg: rgba(15, 23, 42, 0.045);
  --nav-active-text: #334155;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --r-xl: var(--radius-xl);
  --r-lg: var(--radius-lg);
  --r-md: var(--radius-md);
  --r-sm: var(--radius-sm);
  --r-pill: 999px;
  --sidebar-width: 260px;
  --sidebar-w: var(--sidebar-width);
  --topbar-height: 78px;
  --content-max: 1600px;
  --transition: 180ms ease;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"],
body[data-theme="dark"] {
  --bg: #08111f;
  --bg-soft: #0d1728;
  --panel: #0f1b2d;
  --panel-soft: #122238;
  --panel2: #16263d;
  --panel-2: #16263d;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eef8;
  --muted: #8ea2bf;
  --chip: rgba(255, 255, 255, 0.08);
  --accent: #94a3b8;
  --accent-dim: rgba(148, 163, 184, 0.16);
  --accent-soft: rgba(148, 163, 184, 0.16);
  --accent-glow: rgba(148, 163, 184, 0.24);
  --accent2: #cbd5e1;
  --accent2-dim: rgba(203, 213, 225, 0.14);
  --good: #4ade80;
  --success: #4ade80;
  --warn: #facc15;
  --warning: #facc15;
  --bad: #f87171;
  --danger: #f87171;
  --na: #64748b;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  --body-bg: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 24%), linear-gradient(180deg, #07101d 0%, #0a1423 100%);
  --sidebar-bg: linear-gradient(180deg, rgba(8, 17, 31, 0.98), rgba(11, 22, 40, 0.98));
  --topbar-bg: rgba(8, 17, 31, 0.86);
  --card-bg: linear-gradient(180deg, rgba(15, 27, 45, 0.96), rgba(11, 21, 36, 0.98));
  --card-soft-bg: rgba(255, 255, 255, 0.03);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --nav-active-text: #e2e8f0;
}

html,
body {
  background: var(--body-bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

.shell.app-shell {
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--body-bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
  box-shadow: none;
  transition: transform var(--transition), width var(--transition), min-width var(--transition), padding var(--transition), border-color var(--transition);
}

.sidebar::after {
  display: none;
}

.main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--body-bg);
  transition: margin-left var(--transition), width var(--transition);
}

.shell.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
  border-right-color: transparent;
  transform: translateX(calc(-1 * var(--sidebar-width)));
  pointer-events: none;
}

.shell.sidebar-collapsed .main {
  margin-left: 0;
  width: 100%;
}

.sidebar-logo,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.logo-mark,
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
  box-shadow: none;
}

.logo-text,
.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.logo-name,
.brand-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo-sub,
.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-nav,
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin-top: 12px;
}

.nav-section-label,
.sidebar-section-title {
  padding: 8px 8px 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  border-color: rgba(100, 116, 139, 0.22);
  color: var(--nav-active-text);
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0;
}

.nav-item.active .nav-icon {
  color: var(--nav-active-text);
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.sidebar-footer {
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}

.env-badge,
.info-pill,
.tenant-switcher,
.user-menu-button {
  border: 1px solid var(--line);
  background: var(--card-soft-bg);
  color: var(--muted);
  box-shadow: none;
}

.env-badge {
  border-radius: var(--radius-md);
}

.topbar {
  position: relative;
  z-index: 20;
  min-height: var(--topbar-height);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  flex-shrink: 0;
}

.topbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topbar-sub,
.topbar-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.topbar-actions,
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.content,
.main-content {
  flex: 1;
  width: 100%;
  padding: 24px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.section-view,
.page-section {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-width: 0;
}

.icon-button,
.theme-toggle,
.notification-button,
.sidebar-toggle-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  padding: 0;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.icon-button:hover,
.theme-toggle:hover,
.notification-button:hover,
.sidebar-toggle-button:hover {
  color: var(--text);
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.icon-button:focus-visible,
.theme-toggle:focus-visible,
.notification-button:focus-visible,
.sidebar-toggle-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ui-icon {
  display: block;
  flex: 0 0 auto;
}

.mobile-menu-btn {
  display: inline-grid;
  flex: 0 0 auto;
}

.sidebar-close-mobile {
  display: none;
  margin-left: auto;
}

.notification-button {
  position: relative;
}

.notification-button::after {
  display: none;
}

.notification-button.has-unread::after {
  content: "";
  display: block;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--danger);
  border: 2px solid var(--topbar-bg);
}

.user-menu-button {
  min-height: 38px;
  max-width: 260px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card,
.kpi-card,
.panel,
.builder-panel,
.infra-node,
.service-card,
.auth-card,
.modal {
  background: var(--card-bg);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.card,
.kpi-card,
.panel {
  border-radius: var(--radius-xl);
}

.card-title,
.infra-node-title,
.builder-panel-header,
.form-label,
.tech-grid .tg-k {
  color: var(--text);
}

.card-header,
.builder-panel-header,
.modal-header,
.modal-footer {
  border-color: var(--line);
  background: transparent;
}

.kpi-card::before {
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.input,
.select,
.textarea {
  background: var(--card-soft-bg);
  color: var(--text);
  border-color: var(--line);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(100, 116, 139, 0.42);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.08);
}

.btn {
  border-radius: 12px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  background: var(--hover-bg);
  transform: translateY(-1px);
}

.btn-primary {
  background: #475569;
  color: #ffffff;
  border-color: #475569;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(71, 85, 105, 0.14);
}

.btn-primary:hover {
  background: #334155;
  border-color: #334155;
  color: #ffffff;
}

html[data-theme="dark"] .btn-primary,
body[data-theme="dark"] .btn-primary {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-ghost,
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: var(--hover-bg);
}

.badge-na {
  background: var(--card-soft-bg);
  color: var(--muted);
}

.badge-accent,
.nav-badge {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--line);
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card-bg);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  background: var(--card-soft-bg);
}

td {
  color: var(--text);
}

tr:hover td {
  background: var(--hover-bg);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.empty-title {
  color: var(--text);
}

.alert-info {
  background: var(--accent-soft);
  border-color: var(--line);
  color: var(--text);
}

.alert-warn {
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.26);
  color: var(--text);
}

.alert-bad {
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.24);
  color: var(--text);
}

.code-block {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.auth-screen {
  background: var(--body-bg);
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.toast {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .sidebar,
  .shell.sidebar-collapsed .sidebar {
    width: min(86vw, var(--sidebar-width));
    min-width: min(86vw, var(--sidebar-width));
    padding: 18px 14px;
    transform: translateX(-100%);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow);
    pointer-events: auto;
    z-index: 40;
  }

  body.mobile-sidebar-open .sidebar,
  .shell.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .main,
  .shell.sidebar-open .main,
  .shell.sidebar-collapsed .main {
    margin-left: 0;
    width: 100%;
  }

  .mobile-overlay,
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    pointer-events: none;
    z-index: 35;
    transition: opacity var(--transition);
  }

  body.mobile-sidebar-open .mobile-overlay,
  .shell.mobile-sidebar-open .mobile-overlay,
  body.mobile-sidebar-open .sidebar-backdrop,
  .shell.mobile-sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close-mobile {
    display: inline-grid;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .topbar-left,
  .topbar-actions {
    width: 100%;
  }

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

  .topbar-sub,
  .topbar-subtitle {
    display: none;
  }

  .content,
  .main-content {
    padding: 16px;
  }

  .tenant-switcher,
  .tenant-switcher-select {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .info-pill#platform-version,
  .info-pill#conn-pill {
    display: none;
  }

  .user-menu-button {
    max-width: 100%;
    width: 100%;
    justify-content: center;
  }

  .topbar-actions .icon-button,
  .topbar-actions .theme-toggle,
  .topbar-actions .notification-button {
    flex: 0 0 auto;
  }
}

/* Infrastructure · Auth Plans & Entitlements */
.entitlement-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.entitlement-card {
  min-width: 0;
  background: var(--card-soft-bg, rgba(255,255,255,.025));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, var(--r-lg));
  padding: 14px;
}

.entitlement-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.entitlement-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: -4px;
}

.metric-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--chip);
  color: var(--text);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.entitlement-rows {
  display: grid;
  gap: 8px;
}

.entitlement-row {
  display: grid;
  grid-template-columns: minmax(118px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.entitlement-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.entitlement-value {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
  word-break: break-word;
}


@media (max-width: 560px) {
  .entitlement-card-head,
  .entitlement-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .metric-pill {
    align-self: flex-start;
  }
}
