:root {
  --bg: #0b1220;
  --card: #111827;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #14b8a6;
  --warn: #f59e0b;
  --crit: #ef4444;
  --ok: #10b981;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #0b1220, #111827);
  color: var(--text);
  min-height: 100vh;
}
.hidden { display: none !important; }
.card, .panel {
  background: rgba(17,24,39,.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}
#auth-screen {
  max-width: 420px;
  margin: 10vh auto;
  text-align: center;
}
.logo { display: block; margin: 0 auto 1rem; }
.logo-sm { border-radius: 10px; }
.header-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
header h1 { margin: 0; font-size: 1.25rem; }
header p { margin: 0; color: var(--muted); font-size: .85rem; }
.header-subtitle { max-width: 16rem; }
input, textarea, button {
  width: 100%;
  margin: .5rem 0;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
}
button {
  background: var(--accent);
  color: #042f2e;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  filter: brightness(1.06);
}
button.secondary {
  background: #1f2937;
  color: var(--text);
}
button.secondary:hover {
  filter: brightness(1.12);
}
header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}
.header-actions {
  --header-control-h: 2.875rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: flex-end;
  justify-content: flex-end;
}
.header-actions button { width: auto; margin: 0; }
.header-org-group {
  display: flex;
  align-items: flex-end;
  gap: .35rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  min-width: 2.25rem;
  border-radius: 8px;
}
.header-actions .header-org select,
.header-actions #tenant-select {
  height: var(--header-control-h);
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 0;
  line-height: calc(var(--header-control-h) - 2px);
}
.header-actions button.icon-btn {
  width: var(--header-control-h);
  height: var(--header-control-h);
  min-width: var(--header-control-h);
  border-radius: 10px;
}
.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}
.header-actions button.icon-btn svg {
  width: 1.35rem;
  height: 1.35rem;
}
.session-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
  margin-right: .25rem;
  line-height: 1.2;
}
.session-identity #session-email {
  font-size: .8rem;
  color: var(--text);
}
.session-identity .session-role {
  font-size: .72rem;
  color: var(--muted);
  text-transform: lowercase;
}
.invite-url {
  display: block;
  margin: .5rem 0;
  word-break: break-all;
  font-size: .75rem;
}
#admin-invite-banner,
#member-invite-banner {
  margin-bottom: .75rem;
}
.member-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .25rem;
}
.member-add-form input,
.member-add-form select {
  margin: 0;
}
.member-add-form input {
  flex: 1 1 240px;
}
.member-hint {
  margin: 0 0 .75rem;
  font-size: .78rem;
}
.notify-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.notify-targets-group {
  flex: 1 1 200px;
  min-width: 180px;
}
.notify-targets-title {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .35rem;
}
.notify-targets .check-row {
  margin: .35rem 0;
}
.alert-actions {
  margin-top: .35rem;
}
.alerts-status-filter {
  width: auto;
  margin: 0;
}
.alerts-ops-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  justify-content: flex-end;
}
.alerts-ops-filters select {
  width: auto;
  min-width: 7.5rem;
  margin: 0;
  padding: .4rem .55rem;
  font-size: .85rem;
}
.alert-item-selectable {
  cursor: pointer;
  border-radius: 10px;
  padding: .65rem .75rem;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease;
}
.alert-item-selectable:hover,
.alert-item-selectable.is-selected {
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.28);
}
.alert-origin {
  margin-top: .2rem;
  font-size: .88rem;
}
.alert-detail-section {
  margin: .85rem 0;
}
.alert-detail-section h3 {
  margin: 0 0 .35rem;
  font-size: .85rem;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
}
.alert-detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem .75rem;
  font-size: .92rem;
}
.alert-detail-grid dt {
  color: var(--muted);
  margin: 0;
}
.alert-detail-grid dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
}
.alert-detail-message {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.app-health-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.app-meta-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.app-meta-row button {
  width: auto;
  margin: 0;
  padding: .35rem .75rem;
  font-size: .8rem;
}
.app-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tag-chip {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, .12);
  color: var(--accent);
  font-size: .75rem;
}
.resource-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-bottom: .75rem;
}
.resource-filters input,
.resource-filters select {
  margin: 0;
}
.app-resource-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.app-resource-item:last-child { border-bottom: none; }
.app-resource-item .actions {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}
.app-resource-item .actions button {
  width: auto;
  margin: 0;
  padding: .35rem .65rem;
  font-size: .8rem;
}
.causes-title {
  font-weight: 600;
  margin-bottom: .5rem;
}
.cause-card {
  border: 1px solid var(--border, #334155);
  border-radius: 8px;
  padding: .6rem .75rem;
  margin-bottom: .5rem;
}
.cause-alert {
  margin-top: .35rem;
  font-size: .9rem;
}
.cause-resource {
  margin-top: .25rem;
  font-size: .85rem;
}
.metrics-controls {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.metrics-controls select {
  width: auto;
  margin: 0;
  min-width: 7rem;
  font-size: .85rem;
  padding: .35rem .55rem;
}
.timeline-item {
  border-left: 2px solid var(--border, #334155);
  padding: .55rem .75rem .75rem;
  margin-bottom: .35rem;
}
.timeline-item.type-alert,
.timeline-item.type-insight {
  border-left-color: var(--warn, #f59e0b);
}
.timeline-item.type-check {
  border-left-color: var(--accent, #38bdf8);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  align-items: center;
  margin-bottom: .2rem;
}
.timeline-type {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.timeline-title {
  font-weight: 600;
}
.timeline-msg,
.timeline-meta {
  font-size: .88rem;
  margin-top: .2rem;
}
.timeline-ts {
  font-size: .8rem;
  margin-left: auto;
}
#app-timeline-more {
  width: auto;
  margin-top: .75rem;
}
.sparklines {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.sparkline-card {
  min-width: 160px;
}
.sparkline-label {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .25rem;
}
.sparkline {
  color: var(--accent, #38bdf8);
  display: block;
}
.header-org {
  min-width: 200px;
  max-width: 280px;
}
.header-org select {
  width: 100%;
  margin: 0;
  min-width: 200px;
  border-color: var(--accent);
  background: #0f172a;
}
.org-hint {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px dashed var(--accent);
  background: rgba(20, 184, 166, 0.08);
  color: var(--muted);
  font-size: .9rem;
}
#dashboard { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
}
.stat span { font-size: 2rem; font-weight: 700; display: block; }
.stat.warn span { color: var(--warn); }
.grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .75rem;
}
.panel-header h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.panel-header button,
#add-host-btn {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: .4rem .9rem;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
.host-item, .alert-item, .event-item {
  border-top: 1px solid var(--border);
  padding: .75rem 0;
}
.host-item:first-child, .alert-item:first-child, .event-item:first-child { border-top: none; }
.host-item-highlight {
  border-radius: 10px;
  outline: 2px solid rgba(45, 212, 191, 0.65);
  background: rgba(15, 118, 110, 0.12);
  animation: host-highlight-pulse 1.2s ease-in-out 2;
}
@keyframes host-highlight-pulse {
  0%, 100% { background: rgba(15, 118, 110, 0.12); }
  50% { background: rgba(45, 212, 191, 0.18); }
}
.alert-origin { margin-top: .2rem; }
.alert-suggestion {
  margin-top: .35rem;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.4;
}
.alert-suggestion-label {
  font-weight: 600;
  color: #99f6e4;
  margin-right: .25rem;
}
.badge {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  text-transform: uppercase;
}
.badge.critical { background: rgba(239,68,68,.15); color: var(--crit); }

.health-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.health-badge.health-ok { background: rgba(16,185,129,.15); color: var(--ok); }
.health-badge.health-warning { background: rgba(245,158,11,.15); color: var(--warn); }
.health-badge.health-critical { background: rgba(239,68,68,.15); color: var(--crit); }
.health-badge.health-unknown { background: rgba(156,163,175,.15); color: var(--muted); }

.dep-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.impacted-by { margin-top: 0.35rem; font-size: 0.9rem; }
.impacted-item { margin-right: 0.5rem; }

.badge.online { background: rgba(16,185,129,.15); color: var(--ok); }
.badge.pending, .badge.provisioning { background: rgba(156,163,175,.15); color: var(--muted); }
.badge.warn { background: rgba(245,158,11,.15); color: var(--warn); }
.badge.pending, .badge.missing { background: rgba(156,163,175,.15); color: var(--muted); }
.badge.installed { background: rgba(16,185,129,.15); color: var(--ok); }
.badge.disabled { background: rgba(156,163,175,.15); color: var(--muted); }
.plugins-search-wrap { display: block; margin: .25rem 0 1rem; }
.plugins-search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: .55rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg, transparent);
  color: var(--text);
}
.plugins-section { margin-bottom: .75rem; }
.plugins-section-title {
  margin: .75rem 0 .4rem;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: .4rem;
}
.plugins-count { font-weight: 500; opacity: .8; text-transform: none; letter-spacing: 0; }
.plugins-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-height: min(36vh, 320px);
  overflow-y: auto;
}
.plugins-list:empty { display: none; }
.plugin-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  border-top: 1px solid var(--border);
  padding: .75rem .9rem;
  background: var(--card);
}
.plugin-row:first-child { border-top: none; }
.plugin-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.plugin-row-desc {
  margin: .3rem 0 .25rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.4;
  max-width: 36rem;
}
.plugin-row-meta { font-size: .82rem; }
.plugin-row .host-actions { margin-top: 0; flex-shrink: 0; }
.plugins-empty { padding: .85rem .9rem; margin: 0; }
#plugins-dialog { width: min(760px, 94vw); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.badge.critical { background: rgba(239,68,68,.15); color: var(--crit); }
.host-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.host-actions button { width: auto; padding: .4rem .8rem; font-size: .85rem; }
dialog {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(30, 41, 59, .55) 0%, transparent 42%),
    var(--card);
  color: var(--text);
  width: min(560px, 94vw);
  max-width: calc(100vw - 1.5rem);
  max-height: min(88vh, 920px);
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, .35),
    0 24px 64px rgba(0, 0, 0, .55),
    0 8px 24px rgba(0, 0, 0, .35);
}
dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-rise .18s ease-out;
}
@keyframes dialog-rise {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
dialog::backdrop {
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dialog-backdrop-in .18s ease-out;
}
@keyframes dialog-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dialog-body {
  padding: 1rem 1.25rem 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
}
.wizard-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem .75rem;
  align-items: start;
  padding: 1.1rem 1.15rem 1rem 1.25rem;
  margin: 0;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  background: rgba(15, 23, 42, .45);
  flex: 0 0 auto;
}
.wizard-header-text { min-width: 0; }
.wizard-header-text h3,
.wizard-header h3 {
  margin: 0 0 .25rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.wizard-header-text p,
.wizard-header p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--muted);
}
.dialog-close {
  width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.dialog-close:hover {
  background: rgba(148, 163, 184, .12);
  color: var(--text);
  border-color: rgba(148, 163, 184, .18);
  filter: none;
}
.dialog-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dialog-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: .15rem;
}
.dialog-actions button { width: auto; margin: 0; }
.wizard-step > button { margin-bottom: .5rem; }
.wizard-warning {
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 10px;
  padding: .75rem 1rem;
  margin-bottom: .75rem;
}
.wizard-warning p { margin: .35rem 0; }
.wizard-warning .muted { color: var(--muted); font-size: .88rem; }
.auth-type-fieldset {
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 8px;
  padding: .5rem .75rem .25rem;
  margin: .5rem 0 .75rem;
  text-align: left;
}
.auth-type-fieldset legend {
  padding: 0 .35rem;
  font-size: .85rem;
  color: var(--muted);
}
.form-error {
  color: #b91c1c;
  font-size: .88rem;
  text-align: left;
  margin: .5rem 0;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  text-align: left;
  margin: .75rem 0;
  font-size: .9rem;
  color: var(--muted);
}
.check-row input {
  width: auto;
  margin: .15rem 0 0;
}
.code-block, #provision-log, #wizard-provision-log, #wizard-script {
  background: #0f172a;
  border-radius: 8px;
  padding: 1rem;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: .8rem;
  text-align: left;
}
#provision-log {
  background: #0f172a;
  border-radius: 8px;
  padding: 1rem;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
}
.org-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.org-select-label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .85rem;
  color: var(--muted);
  flex: 1;
  min-width: 180px;
}
.org-bar select, .org-bar button {
  width: auto;
  margin: 0;
}
.org-bar select {
  min-width: 200px;
}
.org-targets {
  margin-bottom: 1rem;
}
.target-item {
  border-top: 1px solid var(--border);
  padding: .65rem 0;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}
.target-item:first-child { border-top: none; }
.target-item .host-actions { margin-top: 0; }

.app-insights { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.insight-item {
  font-size: 0.9rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.insight-item.severity-critical {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.35);
}
.insight-cta { font-size: 0.8rem; padding: 0.2rem 0.5rem; }

/* App-first navigation */
.view-tabs {
  display: flex;
  gap: .35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .35rem;
}
.area-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.area-subtabs {
  margin-top: 0;
}
.view-tab {
  width: auto;
  margin: 0;
  padding: .5rem 1rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: .9rem;
}
.view-tab:hover { color: var(--text); background: rgba(31,41,55,.5); }
.view-tab.active {
  color: var(--accent);
  background: rgba(20, 184, 166, 0.1);
  border-color: var(--border);
  border-bottom-color: transparent;
}
.view-panel { margin-bottom: 1rem; }
.panel-block { margin-bottom: 1rem; }
.org-side-grid {
  grid-template-columns: 1fr 1fr;
}
.app-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.app-card {
  background: rgba(17,24,39,.9);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .15s, transform .15s;
}
.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.app-card h3 {
  margin: 0 0 .35rem;
  font-size: 1.1rem;
}
.app-card .muted { margin: 0; font-size: .88rem; }
.app-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .65rem;
  font-size: .85rem;
  color: var(--muted);
}
.app-card-actions {
  display: flex;
  gap: .5rem;
}
.app-card-actions button { width: auto; margin: 0; padding: .35rem .75rem; font-size: .85rem; }
.app-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.app-detail-header .secondary { width: auto; margin: 0; }
.breadcrumb {
  font-size: .95rem;
  color: var(--muted);
}
.breadcrumb strong { color: var(--text); }
.crumb-sep { margin: 0 .35rem; opacity: .6; }
.app-detail-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.app-detail-title-row h2 { margin: 0 0 .25rem; }
.app-detail-title-row .host-actions { margin: 0; }
.app-detail-title-row .host-actions button { margin: 0; }

#plan-dialog {
  width: min(720px, 96vw);
  max-width: calc(100vw - 1.5rem);
  max-height: min(90vh, 920px);
  overflow-x: hidden;
}
#plan-dialog .dialog-body,
#plan-dialog #plan-main-body,
#plan-dialog .plan-section,
#plan-dialog .plan-alert-groups,
#plan-dialog .plan-alert-group {
  max-width: 100%;
  min-width: 0;
}
#plan-k8s-section textarea { min-height: 4rem; }
#plan-k8s-namespaces, #plan-k8s-deployments {
  max-height: 160px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .75rem;
  margin-bottom: .5rem;
}
.plan-k8s-error {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 10px;
  padding: .75rem 1rem;
  margin: .5rem 0 .75rem;
}
.plan-k8s-error h4 {
  margin: 0 0 .35rem;
  font-size: .95rem;
  color: var(--crit);
  font-weight: 600;
}
.plan-k8s-error p {
  margin: .35rem 0;
  font-size: .88rem;
}
.plan-k8s-error pre {
  margin: .5rem 0 0;
  padding: .65rem .75rem;
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .78rem;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, .65);
  color: var(--text);
}
.plan-k8s-error a {
  color: var(--accent);
}
.plan-k8s-error.success {
  background: rgba(34, 197, 94, .1);
  border-color: rgba(34, 197, 94, .4);
}
.plan-k8s-error.success h4 {
  color: var(--ok);
}

.plan-k8s-models {
  margin: .75rem 0;
}
.plan-k8s-preview {
  list-style: none;
  margin: .35rem 0 0;
  padding: 0;
}
.plan-k8s-preview li {
  padding: .35rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  color: var(--text);
}
.plan-k8s-preview li:last-child { border-bottom: none; }

.plan-section {
  margin: 1.1rem 0 1.25rem;
  padding-top: .25rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.plan-section:first-of-type { border-top: none; }
.plan-template-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
  gap: .75rem;
  align-items: center;
}
.plan-template-row p { margin: .2rem 0 0; }
.plan-template-row select,
.plan-template-row button { margin: 0; }
.plan-template-row button { width: auto; }
.plan-section-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 650;
}
.plan-section-hint {
  margin: 0 0 .75rem;
  font-size: .85rem;
}
.plan-dimensions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.plan-dim-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, .65);
  cursor: pointer;
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
  width: auto;
}
.plan-dim-chip:hover { border-color: var(--accent); color: var(--text); }
.plan-dim-chip:has(input:checked) {
  border-color: var(--accent);
  background: rgba(20, 184, 166, 0.12);
  color: var(--text);
}
.plan-dim-chip input {
  width: auto;
  margin: 0;
}

.plan-deps-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: .35rem;
  row-gap: .45rem;
  margin: 0;
  line-height: 1.5;
  font-size: .98rem;
  color: var(--text);
  max-width: 100%;
  min-width: 0;
}
.plan-deps-prefix {
  font-weight: 600;
  margin-right: 0;
  flex-shrink: 0;
}
.plan-deps-item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  max-width: 100%;
  min-width: 0;
  color: var(--muted);
}
.plan-deps-item-name {
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(16rem, 100%);
}
#plan-deps-items,
#plan-monitors-items,
.plan-alert-group-conditions,
.plan-alert-group-notify {
  display: contents;
}
.plan-deps-sep {
  color: var(--muted);
  flex-shrink: 0;
}
.dep-type-icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  border-radius: 3px;
}
svg.dep-type-icon {
  color: #94a3b8;
}
.plan-deps-tab .dep-type-icon {
  margin-right: .15rem;
}
.plan-deps-tab.active svg.dep-type-icon {
  color: #99f6e4;
}
.plan-deps-picker-item .dep-type-icon {
  align-self: flex-start;
  margin-top: .15rem;
}
.plan-deps-item + .plan-deps-sep { margin-left: 0; }
.plan-deps-remove {
  display: inline;
  width: auto;
  margin: 0 0 0 .15rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  vertical-align: baseline;
}
.plan-deps-remove:hover { color: var(--crit); background: transparent; }
.plan-deps-select-btn {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
  padding: .1rem .55rem;
  font-size: .85rem;
  vertical-align: baseline;
  flex-shrink: 0;
}

.plan-monitor-link {
  display: inline-block;
  width: auto;
  max-width: min(22rem, 100%);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  vertical-align: baseline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-monitor-link:hover { color: var(--text); background: transparent; }

.plan-monitor-catalog-item {
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 0;
  background: transparent;
}
.plan-monitors-config label { display: block; margin-bottom: .65rem; }

.plan-monitor-catalog-item.active {
  background: rgba(13, 79, 79, 0.35);
  border-left: 2px solid var(--accent);
}

.severity-icon {
  display: inline-block;
  width: .78em;
  height: .78em;
  border-radius: 50%;
  vertical-align: -0.05em;
  margin: 0 .1rem;
}
.severity-icon.severity-critical { background: var(--crit); box-shadow: 0 0 0 1px rgba(239,68,68,.35); }
.severity-icon.severity-warning {
  background: var(--warn);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(245,158,11,.35);
}
.severity-icon.severity-info { background: #38bdf8; box-shadow: 0 0 0 1px rgba(56,189,248,.35); }

.crit-icon {
  display: inline-block;
  width: .78em;
  height: .78em;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}
.crit-icon.crit-critico { background: var(--crit); box-shadow: 0 0 0 1px rgba(239,68,68,.35); }
.crit-icon.crit-atencao {
  background: var(--warn);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(245,158,11,.35);
}
.crit-icon.crit-informacao { background: #38bdf8; box-shadow: 0 0 0 1px rgba(56,189,248,.35); }

.plan-alert-metric-list {
  max-height: 160px;
  margin-bottom: .35rem;
}
.plan-alert-metric-desc {
  margin: 0 0 .75rem;
  font-size: .88rem;
  line-height: 1.4;
}
.plan-alert-value-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: -.25rem 0 .75rem;
}
.plan-alert-suggest {
  width: auto;
  margin: 0;
  padding: .25rem .55rem;
  font-size: .8rem;
}
.plan-alert-groups {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: .65rem;
}
.plan-alert-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.plan-alert-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  min-width: 0;
  max-width: 100%;
}
.plan-alert-group-header .plan-deps-summary {
  flex: 1 1 auto;
  min-width: 0;
}
.plan-alert-group-remove {
  width: auto;
  margin: 0;
  padding: .2rem .55rem;
  flex-shrink: 0;
}
.plan-alert-group .plan-deps-summary {
  margin: 0;
}
#plan-alert-group-add-btn {
  width: auto;
  margin: 0;
}
.plan-notify-fieldset {
  margin-top: .25rem;
}
.plan-alert-severity-fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .85rem .85rem;
  margin: 0 0 .5rem;
}
.plan-alert-severity-fieldset legend {
  padding: 0 .35rem;
  color: var(--muted);
  font-size: .85rem;
}
.plan-alert-severity-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.plan-alert-severity-option {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.plan-alert-severity-option input { width: auto; margin: 0; }
.plan-alert-severity-option.active {
  border-color: var(--accent);
  background: rgba(13, 79, 79, 0.25);
}

.plan-deps-picker-panel {
  margin-top: .25rem;
}
.plan-deps-picker-panel .plan-deps-picker {
  min-height: 220px;
  max-height: 48vh;
}

.plan-deps-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .55rem;
}
.plan-deps-toolbar input[type="search"] {
  flex: 1;
  min-width: 160px;
  margin: 0;
}
.plan-deps-toolbar button { width: auto; margin: 0; }

.plan-deps-tabs {
  display: flex;
  gap: .35rem;
  margin-bottom: .55rem;
  flex-wrap: wrap;
}
.plan-deps-tab {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: auto;
  margin: 0;
  padding: .4rem .7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .85rem;
}
.plan-deps-tab:hover { color: var(--text); background: rgba(31,41,55,.5); }
.plan-deps-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(13, 79, 79, 0.25);
}

.plan-deps-picker {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .25rem 0;
  margin-bottom: .35rem;
}
.plan-deps-picker-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .85rem;
  cursor: default;
  margin: 0;
  color: var(--text);
}
.plan-deps-picker-item:hover { background: rgba(31,41,55,.35); }
.plan-deps-picker-main {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
}
.plan-deps-picker-main input { width: auto; margin: .15rem 0 0; }
.plan-deps-picker-main > span { flex: 1; min-width: 0; }
.plan-deps-picker-item strong { display: block; }
.plan-deps-picker-item .muted { display: block; font-size: .8rem; margin-top: .1rem; }
.plan-deps-picker-item .icon-pick {
  margin-left: auto;
  flex-shrink: 0;
}

.vendor-item .badge { margin-top: .35rem; }

#vendor-dialog {
  width: min(560px, 94vw);
}
.vendor-pick-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 11.5rem);
  gap: .55rem .65rem;
  align-items: end;
  margin: .35rem 0 .65rem;
}
.vendor-search-label,
.vendor-category-label {
  display: block;
  margin: 0;
  font-size: .85rem;
}
.vendor-search-label input,
.vendor-category-label select {
  width: 100%;
  margin: .3rem 0 0;
}
@media (max-width: 420px) {
  .vendor-pick-filters {
    grid-template-columns: 1fr;
  }
}
.provider-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin: .5rem 0 1rem;
  max-height: min(50vh, 420px);
  overflow: auto;
}
.provider-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  margin: 0;
  padding: .85rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, .65);
  color: var(--text);
  cursor: pointer;
}
.provider-row:hover {
  border-color: var(--accent);
  background: rgba(13, 79, 79, 0.28);
}
.provider-row-text {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
  min-width: 0;
}
.provider-row-text strong { font-size: 1rem; }
.provider-row-text .muted { font-size: .8rem; }
.provider-row-chevron {
  color: var(--muted);
  font-size: 1.1rem;
}
.provider-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
  background: #0f172a;
}
.vendor-config-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .65rem;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, .45);
}
.vendor-provider-note {
  font-size: .85rem;
  margin: 0 0 .75rem;
  line-height: 1.4;
}
#vendor-form label { display: block; margin-bottom: .65rem; font-size: .9rem; }
.vendor-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.vendor-item-main {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  min-width: 0;
}
.vendor-item .badge { margin-top: .35rem; }

select {
  width: 100%;
  margin: .5rem 0;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
}

/* Dashboard + dependency graph */
.dashboard-app-header {
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.dashboard-app-select-row {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
}
.dashboard-app-label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
  min-width: 180px;
  font-size: .85rem;
  color: var(--muted);
}
.dashboard-app-label select {
  margin: 0;
}
.dashboard-empty {
  padding: 1.5rem 0 .5rem;
  font-size: .95rem;
}
.resource-subtabs {
  margin-top: 0;
}
.resource-panel { margin-bottom: 1rem; }

.dep-graph {
  padding: .5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.dep-graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.dep-graph-hint { font-size: .8rem; }
.dep-graph-zoom-btns {
  display: flex;
  align-items: center;
  gap: .35rem;
}
.dep-graph-zoom-btns button {
  width: auto;
  min-width: 2rem;
  margin: 0;
  padding: .35rem .65rem;
  font-size: .85rem;
}
#dep-graph-zoom-label {
  min-width: 3.2rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
.dep-graph-canvas {
  position: relative;
  height: min(52vh, 420px);
  min-height: 280px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.07), transparent 45%),
    linear-gradient(180deg, rgba(15, 23, 42, .65), rgba(15, 23, 42, .35));
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.dep-graph-canvas.is-panning { cursor: grabbing; }
.dep-graph-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.dep-edge {
  fill: none;
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 2;
}
.dep-edge.is-impacted {
  stroke-width: 4;
  filter: drop-shadow(0 0 4px currentColor);
}
.dep-edge-label rect {
  fill: rgba(15, 23, 42, 0.92);
  stroke: var(--border);
  stroke-width: 1;
}
.dep-edge-label text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 600;
}
.dep-edge-label.crit-critico text { fill: var(--crit); }
.dep-edge-label.crit-critico rect { stroke: rgba(239, 68, 68, .4); }
.dep-edge-label.crit-atencao text { fill: var(--warn); }
.dep-edge-label.crit-atencao rect { stroke: rgba(245, 158, 11, .4); }
.dep-edge-label.crit-informacao text { fill: var(--muted); }

.dep-svg-card {
  fill: rgba(17, 24, 39, 0.95);
  stroke-width: 2;
}
.dep-svg-node { cursor: pointer; }
.dep-svg-node.is-impacted .dep-svg-card {
  stroke-width: 4;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, .65));
}
.cause-focus {
  outline: 2px solid var(--crit);
  outline-offset: 3px;
}
.app-observability-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.summary-list {
  display: grid;
  gap: .5rem;
}
.summary-card {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.dep-svg-node.is-root .dep-svg-card {
  fill: rgba(13, 79, 79, 0.45);
}
.dep-svg-type {
  fill: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dep-svg-name {
  fill: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.dep-svg-health {
  font-size: 11px;
  font-weight: 600;
}

.crit-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.crit-badge.crit-critico {
  color: var(--crit);
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .35);
}
.crit-badge.crit-atencao {
  color: var(--warn);
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .35);
}
.crit-badge.crit-informacao {
  color: var(--muted);
  background: rgba(156, 163, 175, .12);
}

.icon-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.icon-pick.is-disabled {
  opacity: .4;
  pointer-events: none;
}
.icon-pick-trigger {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: .25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  line-height: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-pick-trigger:hover:not(:disabled) {
  background: rgba(148, 163, 184, .12);
  border-color: rgba(148, 163, 184, .18);
  filter: none;
}
.icon-pick.is-open .icon-pick-trigger {
  background: rgba(148, 163, 184, .14);
  border-color: rgba(148, 163, 184, .22);
}
.icon-pick-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 9.5rem;
  padding: .3rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.icon-pick-option {
  width: 100%;
  margin: 0;
  padding: .4rem .55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: .82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .45rem;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
}
.icon-pick-option:hover {
  background: rgba(148, 163, 184, .12);
  filter: none;
}
.icon-pick-option.is-selected {
  background: rgba(20, 184, 166, .12);
  border-color: rgba(20, 184, 166, .28);
}
.plan-deps-item .icon-pick {
  display: inline-flex;
  vertical-align: middle;
}

.compose-cta-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}
.compose-cta-wrap--empty {
  align-items: center;
}
.compose-coachmark {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  width: min(280px, 72vw);
  pointer-events: auto;
  animation: compose-coach-in .45s ease-out;
}
.compose-coachmark--below {
  left: 50%;
  transform: translateX(-50%);
  animation-name: compose-coach-in-center;
}
.compose-coachmark-arrow {
  width: 0;
  height: 0;
  margin-left: 1.4rem;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid rgba(15, 118, 110, 0.95);
}
.compose-coachmark--below .compose-coachmark-arrow {
  margin-left: 0;
  margin-inline: auto;
}
.compose-coachmark-bubble {
  background: linear-gradient(160deg, rgba(15, 118, 110, 0.98), rgba(19, 78, 74, 0.98));
  border: 1px solid rgba(153, 246, 228, 0.35);
  border-radius: 12px;
  padding: .75rem .85rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  color: #ecfeff;
}
.compose-coachmark-bubble p {
  margin: 0 0 .65rem;
  font-size: .88rem;
  line-height: 1.4;
}
.compose-coachmark-bubble button {
  width: auto;
  font-size: .8rem;
  padding: .3rem .65rem;
}
@keyframes compose-coach-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes compose-coach-in-center {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.compose-app-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.compose-app-row label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 16rem;
  flex: 1;
}
.compose-selected-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}
.compose-selected-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .65rem;
}
.compose-node-type {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .1rem .45rem;
}
.compose-node-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.compose-node-actions button {
  margin: 0;
  padding: .3rem .55rem;
  font-size: .8rem;
  width: auto;
}
.compose-graph .dep-graph-canvas,
.compose-graph-canvas {
  height: min(62vh, 560px);
  min-height: 360px;
}
.compose-svg-node.is-selected .dep-svg-card {
  stroke-width: 3.5;
  filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.45));
}
.compose-svg-node.needs-config .dep-svg-card {
  stroke-dasharray: 5 3;
  fill: rgba(217, 119, 6, 0.08);
}
.compose-needs-config-text {
  font-weight: 600;
  font-size: 11px;
}
.compose-selected-bar.needs-config {
  border-color: rgba(217, 119, 6, 0.45);
  background: rgba(217, 119, 6, 0.08);
}
.compose-selected-status {
  display: inline-block;
  margin-left: .5rem;
  font-size: .85rem;
  color: #b45309;
  font-weight: 600;
}
.compose-add-circle {
  fill: rgba(15, 118, 110, 0.95);
  stroke: rgba(153, 246, 228, 0.7);
  stroke-width: 1.5;
  cursor: pointer;
}
.compose-add-plus {
  fill: #ecfeff;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.compose-add-hit { cursor: pointer; }
.compose-remove-circle {
  fill: rgba(185, 28, 28, 0.92);
  stroke: rgba(254, 202, 202, 0.75);
  stroke-width: 1.5;
  cursor: pointer;
}
.compose-remove-minus {
  fill: #fef2f2;
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
}
.compose-remove-hit { cursor: pointer; }
.compose-toggle-circle {
  fill: rgba(51, 65, 85, 0.95);
  stroke: rgba(148, 163, 184, 0.7);
  stroke-width: 1.2;
  cursor: pointer;
}
.compose-toggle-glyph {
  fill: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}
.compose-toggle-hit { cursor: pointer; }
.compose-summary-card {
  fill: rgba(51, 65, 85, 0.95);
  stroke: rgba(148, 163, 184, 0.65);
  stroke-width: 1.5;
}
.compose-summary-text {
  fill: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}
.compose-collapsed-edge rect {
  fill: rgba(51, 65, 85, 0.95);
  stroke: rgba(148, 163, 184, 0.55);
}
.compose-collapsed-edge text {
  fill: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
}
.compose-svg-node.is-collapsed .dep-svg-card {
  stroke-dasharray: 4 3;
}
.dashboard-empty-actions {
  margin-top: .75rem;
}
.dashboard-empty-actions button {
  width: auto;
}

@media (max-width: 800px) {
  .grid, .stats, .org-side-grid, .app-cards { grid-template-columns: 1fr; }
  .view-tabs { overflow-x: auto; }
  .dashboard-app-select-row { flex-direction: column; align-items: stretch; }
  .resource-filters { grid-template-columns: 1fr; }
  .plan-template-row { grid-template-columns: 1fr; }
  .plan-template-row button { width: 100%; }
}
