* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --bg: #f9fafb;
  --panel: #ffffff;
  --surface: #f3f4f6;
  --surface-hover: #e5e7eb;
  --surface-muted: #f8fafc;
  --surface-strong: #ffffff;
  --chip-bg: #eef2ff;
  --chip-border: #c7d2fe;
  --chip-text: #1e3a8a;
  --chip-button-bg: #ffffff;
  --chip-button-border: #c7d2fe;
  --chip-button-text: #1e3a8a;
  --chip-button-hover: #e0e7ff;
  --card-bg: #ffffff;
  --table-header-bg: #f3f4f6;
  --table-hover-bg: rgba(37, 99, 235, 0.12);
  --resource-option-bg: #ffffff;
  --resource-option-hover: #eef2ff;
  --dropzone-bg: #f8fafc;
  --dropzone-border: #cbd5f5;
  --dropzone-hover-bg: #eef2ff;
  --dropzone-hover-border: #818cf8;
  --dropzone-file-bg: #ecfeff;
  --dropzone-file-border: #22d3ee;
  --dropzone-title: #0f172a;
  --dropzone-pill-bg: #e2e8f0;
  --dropzone-pill-text: #0f172a;
  --tooltip-bg: #ffffff;
  --tooltip-text: #0f172a;
  --spinner-track: rgba(15, 23, 42, 0.2);
  --shadow-sm: rgba(15, 23, 42, 0.04);
  --shadow-md: rgba(15, 23, 42, 0.12);
  --shadow-lg: rgba(15, 23, 42, 0.12);
  --shadow-tooltip: rgba(15, 23, 42, 0.12);
  --source-onboarding-bg: #dbeafe;
  --source-security-bg: #dcfce7;
  --source-operations-bg: #fef3c7;
  --source-asm-bg: #ede9fe;
  --source-battracker-bg: #e0f6ff;
  --source-onboarding-header-bg: #c7dfff;
  --source-security-header-bg: #c2f0d3;
  --source-operations-header-bg: #fde7a8;
  --source-asm-header-bg: #e0d7fe;
  --source-battracker-header-bg: #c8f0ff;
  --source-onboarding-border: #60a5fa;
  --source-security-border: #34d399;
  --source-operations-border: #f59e0b;
  --source-asm-border: #a78bfa;
  --source-battracker-border: #7dd3fc;
  --cps-bg: #fff7d6;
  --cps-header-bg: #ffe8a6;
  --cps-border: #f5b301;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #0ea5e9;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #60a5fa;
  --bg: #0b1220;
  --panel: #111827;
  --surface: #1f2937;
  --surface-hover: #334155;
  --surface-muted: #0f172a;
  --surface-strong: #111827;
  --chip-bg: #1e293b;
  --chip-border: #334155;
  --chip-text: #e2e8f0;
  --chip-button-bg: #0f172a;
  --chip-button-border: #334155;
  --chip-button-text: #e2e8f0;
  --chip-button-hover: #1f2937;
  --card-bg: #0f172a;
  --table-header-bg: #1f2937;
  --table-hover-bg: rgba(96, 165, 250, 0.2);
  --resource-option-bg: #111827;
  --resource-option-hover: #1f2937;
  --dropzone-bg: #0f172a;
  --dropzone-border: #334155;
  --dropzone-hover-bg: #1f2937;
  --dropzone-hover-border: #60a5fa;
  --dropzone-file-bg: #0b2f3a;
  --dropzone-file-border: #22d3ee;
  --dropzone-title: #e2e8f0;
  --dropzone-pill-bg: #1f2937;
  --dropzone-pill-text: #e2e8f0;
  --tooltip-bg: #0f172a;
  --tooltip-text: #f8fafc;
  --spinner-track: rgba(148, 163, 184, 0.3);
  --shadow-sm: rgba(0, 0, 0, 0.35);
  --shadow-md: rgba(0, 0, 0, 0.45);
  --shadow-lg: rgba(0, 0, 0, 0.45);
  --shadow-tooltip: rgba(0, 0, 0, 0.5);
  --source-onboarding-bg: #1e3a5f;
  --source-security-bg: #1f3b2d;
  --source-operations-bg: #3f2d12;
  --source-asm-bg: #2f245a;
  --source-battracker-bg: #143b4a;
  --source-onboarding-header-bg: #2a4572;
  --source-security-header-bg: #2b4a38;
  --source-operations-header-bg: #4a3718;
  --source-asm-header-bg: #3a2d6a;
  --source-battracker-header-bg: #1b4b5a;
  --source-onboarding-border: #60a5fa;
  --source-security-border: #34d399;
  --source-operations-border: #f59e0b;
  --source-asm-border: #a78bfa;
  --source-battracker-border: #22d3ee;
  --cps-bg: #3b2f1a;
  --cps-header-bg: #4a3a20;
  --cps-border: #f59e0b;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

[v-cloak] {
  display: none;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-shell-fill {
  min-height: calc(100vh - 48px);
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 0;
  padding: 0 12px 2px;
  color: var(--muted);
  opacity: 0.78;
  font-size: 0.78rem;
}

.app-shell:not(.app-shell-fill) .app-footer {
  margin-top: -22px;
}

.app-shell-fill .app-footer {
  margin-top: auto;
}

.app-shell > .auth-gate {
  padding: 16px;
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.app-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.app-nav-link:hover {
  background: var(--surface-hover);
}

.app-nav-link.active {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  color: var(--primary);
}

.asm-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.asm-overview-grid-scroll {
  overflow-x: auto;
}

.asm-overview-grid-scroll .asm-overview-grid {
  min-width: 0;
}

.asm-overview-card {
  background: color-mix(in srgb, var(--panel) 92%, var(--surface) 8%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 12px var(--shadow-sm);
}

.asm-overview-card-label {
  font-size: 0.84rem;
  color: var(--muted);
}

.asm-overview-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.asm-overview-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.asm-overview-card-critical {
  border-left: 4px solid #7c2d12;
}

.asm-overview-card-high {
  border-left: 4px solid #b91c1c;
}

.asm-overview-card-medium {
  border-left: 4px solid #f59e0b;
}

.asm-overview-card-low {
  border-left: 4px solid #eab308;
}

.asm-overview-card-info {
  border-left: 4px solid #0ea5e9;
}

.asm-overview-header-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.asm-overview-scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, #0ea5e9 28%);
  background: color-mix(in srgb, var(--surface) 86%, #0ea5e9 14%);
  color: color-mix(in srgb, var(--text) 72%, #0c4a6e 28%);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 color-mix(in srgb, #ffffff 25%, transparent 75%) inset;
}

.asm-overview-scope-value {
  color: color-mix(in srgb, var(--text) 60%, #0369a1 40%);
  font-weight: 800;
}

.asm-overview-scope-date {
  color: color-mix(in srgb, var(--text) 60%, #0369a1 40%);
  font-size: inherit;
  font-weight: 800;
}

.asm-overview-panel-header {
  margin-bottom: 14px;
}

.asm-overview-main-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

.asm-overview-section-title {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.25;
}

.panel-asm-overview.is-loading {
  position: relative;
  min-height: 240px;
}

.panel-asm-overview.is-loading .asm-overview-panel-header {
  position: relative;
  z-index: 1;
}

.panel-asm-overview .asm-overview-grid-scroll {
  margin-top: 8px;
}

.asm-overview-refresh-button {
  width: 30px;
  height: 30px;
}

.asm-overview-refresh-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}

.asm-overview-loading {
  min-height: 190px;
  display: grid;
  place-items: center;
}

.panel-asm-overview.is-loading .asm-overview-loading {
  position: absolute;
  inset: 0;
  min-height: 0;
}

.asm-overview-loading .spinner {
  width: 56px;
  height: 56px;
  border-width: 5px;
}

.dashboard-list-loading {
  min-height: 190px;
  padding: 0;
  display: grid;
  place-items: center;
}

.dashboard-list-loading .spinner {
  width: 56px;
  height: 56px;
  border-width: 5px;
}

.section-spinner-loading {
  min-height: 84px;
  padding: 8px 0;
  display: grid;
  place-items: center;
}

.section-spinner-loading .spinner {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

.section-spinner-loading-edge {
  margin: -16px -20px;
}

.section-spinner-loading-page {
  min-height: clamp(280px, 62vh, 640px);
  padding: 0;
}

.section-spinner-loading-page .spinner {
  width: 68px;
  height: 68px;
  border-width: 6px;
}

.asm-overview-card-total {
  border: 1px solid transparent;
  border-left-width: 4px;
  background:
    linear-gradient(
      color-mix(in srgb, var(--panel) 92%, var(--surface) 8%),
      color-mix(in srgb, var(--panel) 92%, var(--surface) 8%)
    ) padding-box,
    linear-gradient(
      180deg,
      #7c2d12 0%,
      #b91c1c 26%,
      #f59e0b 52%,
      #eab308 76%,
      #0ea5e9 100%
    ) left center / 4px 100% no-repeat border-box,
    linear-gradient(var(--border), var(--border)) border-box;
}

.asm-overview-card-total .asm-overview-card-label {
  color: var(--muted);
}

.asm-overview-card-total .asm-overview-card-meta {
  color: var(--muted);
}

.asm-overview-actions {
  margin-top: 10px;
}

.asm-overview-list-wrap {
  margin-top: 20px;
}

.asm-overview-trend-wrap {
  margin-top: 20px;
}

.asm-overview-trend-card {
  margin-bottom: 0;
  padding-bottom: 0;
}

.asm-overview-list-title {
  margin: 0 0 8px;
}

.asm-overview-empty-state {
  margin: 12px 0 2px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.asm-overview-table-wrap table th,
.asm-overview-table-wrap table td {
  vertical-align: middle;
}

.asm-overview-item-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.asm-overview-item-label.is-mast::before,
.asm-overview-item-label.is-collection::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.asm-overview-item-label.is-mast::before {
  background: #2563eb;
}

.asm-overview-item-label.is-collection::before {
  background: #64748b;
}

.asm-overview-no-mast {
  color: var(--muted);
  font-style: italic;
}

.asm-overview-table-wrap thead th.asm-col-critical {
  color: #7c2d12;
  font-weight: 700;
}

.asm-overview-table-wrap thead th.asm-col-high {
  color: #b91c1c;
  font-weight: 700;
}

.asm-overview-table-wrap td.asm-value-critical {
  color: #7c2d12;
  font-weight: 700;
}

.asm-overview-table-wrap td.asm-value-high {
  color: #b91c1c;
  font-weight: 700;
}

.asm-overview-table-wrap td.asm-value-zero {
  color: #16a34a;
  font-weight: 700;
}

.auth-gate {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
}

.auth-gate-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 10px 30px var(--shadow-md);
  max-width: 520px;
  width: 100%;
}

.auth-gate-card h1 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  color: var(--text);
}

.auth-gate-message {
  margin: 0 0 20px;
  color: var(--muted);
}

.auth-gate-actions {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.title-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.title-brand {
  display: inline-flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
}

.title-brand h1 {
  white-space: nowrap;
}

.header-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  align-self: center;
}

.header h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.05;
}

.title-subtitle {
  display: block;
  width: 100%;
  margin-top: 3px;
  font-size: 0.8em;
  line-height: 1.15;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.header-unauth {
  margin-bottom: 16px;
}

.version {
  font-size: 0.9rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.header p {
  margin: 0 0 16px;
  color: var(--muted);
}

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

.auth-user {
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-button {
  width: auto;
  padding: 6px 12px;
}

.theme-toggle {
  width: auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.theme-toggle:hover {
  background: var(--surface-hover);
}

.theme-bulb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 4px 6px;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.theme-bulb-icon {
  font-size: 1.6rem;
  line-height: 1;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.theme-bulb-icon.is-off {
  filter: grayscale(1) brightness(0.7);
  opacity: 0.7;
}

.theme-bulb-icon.is-on {
  filter: none;
  opacity: 1;
}

.auth-error {
  margin: 0;
  font-size: 0.85rem;
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  --toast-accent: var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: var(--panel);
  box-shadow: 0 12px 24px var(--shadow-md);
  width: 100%;
}

.toast-auto-dismiss {
  position: relative;
  overflow: hidden;
}

.toast-auto-dismiss::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: color-mix(in srgb, var(--toast-accent) 78%, transparent);
  transform-origin: left center;
  animation: toast-dismiss-progress var(--toast-dismiss-ms, 5000ms) linear forwards;
}

.toast-message {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--text);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.toast-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: var(--text);
}

.toast-error {
  --toast-accent: var(--danger);
  border-left: 4px solid var(--danger);
}

.toast-info {
  --toast-accent: var(--info);
  border-left: 4px solid var(--info);
  background: color-mix(in srgb, var(--info) 10%, var(--panel));
}

.toast-warning {
  --toast-accent: var(--warning);
  border-left: 4px solid var(--warning);
  background: color-mix(in srgb, var(--warning) 12%, var(--panel));
}

.toast-success {
  --toast-accent: var(--success);
  border-left: 4px solid var(--success);
  background: color-mix(in srgb, var(--success) 10%, var(--panel));
}

@keyframes toast-dismiss-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.auth-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.auth-secondary .auth-user {
  font-size: 0.8rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px var(--shadow-sm);
}

.panel-sources {
  margin-bottom: 6px;
}

.panel-dashboard {
  margin-top: 0;
}

.panel-dashboard .panel-header {
  flex-wrap: nowrap;
}

.panel-dashboard .panel-header h2 {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.dashboard-count {
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
  font-size: 0.95em;
}

.panel > h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: var(--surface-hover);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.export-button {
  flex: 0 0 auto;
}

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

.controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
}

input,
select,
textarea,
button {
  width: 100%;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
}

input,
select,
textarea {
  background: var(--surface-strong);
  color: var(--text);
}

button {
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
}

button.primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  font-weight: 600;
}

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

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.error {
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 600;
}

.report-error {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: pre-line;
  font-size: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.sources {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.sources .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.chip {
  width: auto;
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
}

.source-onboarding {
  background: var(--source-onboarding-bg);
}

.source-security {
  background: var(--source-security-bg);
}

.source-operations {
  background: var(--source-operations-bg);
}

.source-asm {
  background: var(--source-asm-bg);
}

.source-battracker {
  background: var(--source-battracker-bg);
}

.source-internal {
  background: var(--cps-bg);
}

.chip.source-onboarding {
  border-color: var(--source-onboarding-border);
}

.chip.source-security {
  border-color: var(--source-security-border);
}

.chip.source-operations {
  border-color: var(--source-operations-border);
}

.chip.source-asm {
  border-color: var(--source-asm-border);
}

.chip.source-battracker {
  border-color: var(--source-battracker-border);
}

.chip.source-internal {
  border-color: var(--cps-border);
}

.source-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
}

.source-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.source-status-label {
  font-weight: 600;
}

.source-status-meta {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.source-status-meta-error {
  color: var(--danger);
  font-weight: 600;
}

.source-status-loading {
  flex: 1 1 auto;
  width: 100%;
  justify-content: space-between;
  gap: 16px;
}

.chip-button {
  width: auto;
  padding: 3px 6px;
  font-size: 0.7rem;
  border: 1px solid var(--chip-button-border);
  border-radius: 999px;
  background: var(--chip-button-bg);
  color: var(--chip-button-text);
  cursor: pointer;
}

.chip-button-spacer {
  display: inline-block;
  height: 22px;
}

.chip-button:hover {
  background: var(--chip-button-hover);
}

.summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card-bg);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
}

.card span {
  font-size: 1.4rem;
  font-weight: 600;
}

.card.success {
  border-color: rgba(22, 163, 74, 0.4);
}

.card.info {
  border-color: rgba(14, 165, 233, 0.4);
}

.card.warning {
  border-color: rgba(245, 158, 11, 0.4);
}

.card.danger {
  border-color: rgba(220, 38, 38, 0.4);
}

.card.muted {
  border-color: rgba(107, 114, 128, 0.4);
}

.table-wrap {
  overflow: visible;
  margin-top: 16px;
}

.asm-entities-infinite-trigger {
  min-height: 32px;
  padding: 8px 0 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.asm-entities-sort-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.asm-entities-sort-button:hover {
  color: var(--text);
}

.asm-entities-sort-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

.asm-entities-sort-indicator {
  font-size: 1rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  line-height: 1;
  min-width: 12px;
  text-align: right;
}

.asm-entities-infinite-trigger .spinner {
  width: 22px;
  height: 22px;
  border-width: 3px;
}

.asm-entities-action-col {
  width: 52px;
}

.asm-entities-action-cell {
  text-align: center;
  background: var(--table-header-bg);
}

.asm-entities-copy-button {
  width: 34px;
  height: 34px;
  margin: 0 auto;
}

.table-scroll {
  overflow-x: hidden;
  overflow-y: visible;
}

.table-controls {
  margin: 12px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.table-controls input {
  max-width: 360px;
}

.resources-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-muted);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-weight: 600;
}

.mast-string-label {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.mast-string-value {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.resources-detail {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resource-combobox {
  position: relative;
}

.resource-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--resource-option-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 24px var(--shadow-lg);
  z-index: 5;
}

.resource-options.drop-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.resource-option {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.resource-option:hover,
.resource-option:focus {
  background: var(--resource-option-hover);
  outline: none;
}

.resources-detail label {
  font-weight: 600;
}

.file-dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px;
  border: 2px dashed var(--dropzone-border);
  border-radius: 12px;
  background: var(--dropzone-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-weight: 400;
}

.file-dropzone:hover {
  border-color: var(--dropzone-hover-border);
  background: var(--dropzone-hover-bg);
}

.file-dropzone.has-file {
  border-style: solid;
  background: var(--dropzone-file-bg);
  border-color: var(--dropzone-file-border);
}

.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-dropzone-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.file-dropzone-title {
  font-weight: 600;
  color: var(--dropzone-title);
}

.file-dropzone-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

.file-dropzone-filename {
  font-size: 0.85rem;
  color: var(--dropzone-pill-text);
  background: var(--dropzone-pill-bg);
  border-radius: 999px;
  padding: 4px 10px;
}

.resources-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.resources-actions .primary {
  width: 100%;
  min-width: 0;
}

.comment-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comment-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-text {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comment-edit textarea {
  width: 100%;
  min-height: 100px;
  font-size: 0.8rem;
  padding: 8px;
  border-radius: 10px;
  resize: vertical;
}

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

.comment-actions button {
  width: auto;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 999px;
  line-height: 1.1;
}

.comment-save {
  position: relative;
  min-height: 26px;
  min-width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-save.is-saving .comment-save-label {
  visibility: hidden;
}

.comment-actions .primary:hover,
.comment-actions .primary:focus-visible {
  filter: brightness(0.9);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
}

.comment-actions .ghost:hover,
.comment-actions .ghost:focus-visible {
  border-style: solid;
  color: var(--text);
  background: var(--surface-hover);
}

:root:not([data-theme="dark"]) .comment-actions .ghost {
  border-color: #cbd5f5;
  color: #334155;
  background: #f8fafc;
}

:root:not([data-theme="dark"]) .comment-actions .ghost:hover,
:root:not([data-theme="dark"]) .comment-actions .ghost:focus-visible {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.comment-edit-button {
  width: auto;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  border: 1px solid var(--border);
}

.comment-edit-button:hover {
  background: var(--surface-hover);
  color: var(--text);
}

:root:not([data-theme="dark"]) .comment-edit-button:hover,
:root:not([data-theme="dark"]) .comment-edit-button:focus-visible {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.comment-saving {
  font-size: 0.75rem;
  color: var(--muted);
}

.comment-saving-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
  pointer-events: none;
}

.contacts-confirmed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.contacts-confirmed input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.contacts-confirmed input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.contacts-confirmed-cell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 6px;
  min-height: 28px;
}

.contacts-confirmed-cell .contacts-confirmed {
  grid-column: 2;
  justify-self: center;
}

.contacts-confirmed-cell .asm-tooltip-trigger {
  grid-column: 3;
  justify-self: end;
}

.contacts-confirmed-readonly > span {
  white-space: nowrap;
}

.contacts-confirmed-readonly .asm-tooltip-trigger {
  margin-left: auto;
  justify-content: flex-end;
}

.contacts-tooltip-trigger {
  display: inline-grid;
  place-items: center;
  inline-size: 18px;
  block-size: 18px;
}

.contacts-confirmed-spinner {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

.comment-error {
  font-size: 0.75rem;
  color: var(--danger);
}

.contacts-missing-battracker {
  display: block;
  margin-top: 2px;
  font-size: inherit;
  font-weight: 600;
  color: var(--danger);
}

.asm-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
}

.asm-date {
  min-width: 0;
  overflow-wrap: anywhere;
}

.asm-date-stale {
  color: #dc2626;
  font-weight: 600;
}

.contacts-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6px;
  width: 100%;
}

.asm-icons {
  display: inline-flex;
  align-items: center;
}

.asm-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: help;
}

.asm-gti-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.asm-gti-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.asm-gti-icon {
  height: 16px;
  min-width: 24px;
  padding: 0 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a73e8;
  color: #ffffff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.asm-header {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 6px;
}

.asm-tooltip-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #475569;
  color: #ffffff;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.asm-tooltip-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.resource-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resources-data-column {
  width: 11%;
}

.comment-column {
  width: 13%;
}

.cps-product-column {
  width: 10%;
}

.contacts-confirmed-column {
  width: 12%;
  position: relative;
  text-align: left;
}

.resources-provided-column {
  width: 10%;
}

.source-column {
  width: 10%;
}

.asm-column {
  width: 10%;
}

.resource-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resource-data-provider {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.resource-data-label {
  font-weight: 600;
  color: var(--text);
  min-width: 64px;
}

.resource-data-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-source-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text);
}

.resource-no-data {
  color: #ef4444;
  font-weight: 600;
  font-size: 0.75rem;
}

.resource-report-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.asm-report-link {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.source-column .asm-report-link {
  margin-left: auto;
}

.asm-report-icon {
  font-size: 1rem;
  line-height: 1;
}

.asm-report-link:hover .asm-report-icon,
.asm-report-link:focus-visible .asm-report-icon {
  filter: brightness(0.85);
}

.resource-report-icon {
  font-size: 1rem;
  line-height: 1;
}

.resource-report-link:hover .resource-report-icon,
.resource-report-link:focus-visible .resource-report-icon {
  filter: brightness(0.85);
}

.asm-tooltip-icon-critical {
  background: #7c2d12;
}

.asm-tooltip-icon-high {
  background: #b91c1c;
}

.asm-tooltip-icon-medium {
  background: #f59e0b;
}

.asm-tooltip-icon-low {
  background: #fde68a;
  color: #1f2937;
}

.asm-tooltip-icon-info {
  background: #38bdf8;
}

.asm-tooltip-icon-green {
  background: #22c55e;
}

.asm-tooltip-fixed {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: auto;
}

.asm-tooltip-content {
  position: relative;
  left: 0;
  top: 0;
  transform: none;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 10px 20px var(--shadow-tooltip);
  user-select: text;
}

.header-error-tooltip-content {
  white-space: normal;
}

.header-error-tooltip-source {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.header-error-tooltip-detail {
  display: block;
}

.asm-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.contacts-tooltip {
  white-space: normal;
  max-width: 480px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 9px 10px;
  line-height: 1.2;
}

.contacts-tooltip .asm-tooltip-row {
  display: block;
}

.contacts-tooltip-label {
  font-weight: 700;
  display: block;
}

.contacts-tooltip-label::after {
  content: ":";
}

.contacts-tooltip-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.contacts-tooltip-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 0.7rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  word-break: break-word;
}

.contacts-tooltip-chip-link {
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contacts-tooltip-chip-link:hover,
.contacts-tooltip-chip-link:focus-visible {
  border-color: var(--chip-border-strong);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  outline: none;
}

.severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.severity-critical {
  background: #7c2d12;
}

.severity-high {
  background: #b91c1c;
}

.severity-medium {
  background: #f59e0b;
}

.severity-low {
  background: #fde68a;
}

.severity-info {
  background: #38bdf8;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  table-layout: fixed;
}

th,
td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
  word-break: break-word;
}

:root:not([data-theme="dark"]) th,
:root:not([data-theme="dark"]) td {
  border-color: #cbd5e1;
}

th {
  word-break: normal;
  overflow-wrap: normal;
  background: var(--table-header-bg);
}

.mast-column {
  width: 7.5%;
  white-space: normal;
}

.mast-string-column {
  width: 18%;
}

tbody tr:hover td {
  box-shadow: inset 0 0 0 9999px var(--table-hover-bg);
}

.dashboard-row-missing-battracker td {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface-strong));
}

.dashboard-row-missing-battracker:hover td {
  box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--danger) 18%, var(--surface-strong));
}

.header-with-spinner {
  position: relative;
  min-height: 26px;
  min-width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
}

.header-with-spinner > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.header-error {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: "Segoe UI", Arial, sans-serif;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: help;
}

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

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

th.source-onboarding {
  background: var(--source-onboarding-header-bg);
}

th.source-security {
  background: var(--source-security-header-bg);
}

th.source-operations {
  background: var(--source-operations-header-bg);
}

th.source-asm {
  background: var(--source-asm-header-bg);
}

th.source-battracker {
  background: var(--source-battracker-header-bg);
}

.cps-column {
  background: var(--cps-bg);
}

th.cps-column {
  background: var(--cps-header-bg);
}

.status {
  font-weight: 600;
}

.status-complete {
  color: var(--success);
}

.status-in-progress {
  color: var(--info);
}

.status-not-started {
  color: var(--warning);
}

.status-blocked {
  color: var(--danger);
}

.status-pending,
.status-unknown,
.status-not-needed,
.status-no-assets-exposed {
  color: var(--muted);
}

.resource-status-no-cloud {
  color: var(--muted);
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  width: min(520px, 100%);
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: 0 10px 25px var(--shadow-md);
}

.modal h2 {
  margin: 0 0 8px;
}

.modal-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.modal-row label {
  font-size: 0.85rem;
  color: var(--muted);
}

.export-modal {
  width: min(560px, 100%);
}

.export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.export-modal-header h2 {
  margin: 0;
}

.export-selected-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

:root:not([data-theme="dark"]) .export-selected-badge {
  border-color: #38bdf8;
  background: #e0f2fe;
}

.export-bulk-actions {
  margin-top: 10px;
  display: flex;
  width: 100%;
  gap: 8px;
}

.export-bulk-button {
  flex: 1 1 50%;
  justify-content: center;
}

.export-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 12px;
  margin-top: 12px;
}

.export-column-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.export-column-option:hover {
  background: rgba(148, 163, 184, 0.12);
}

.export-column-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #38bdf8;
}

.export-column-option-selected {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

:root:not([data-theme="dark"]) .export-column-option {
  background: #f8fafc;
}

:root:not([data-theme="dark"]) .export-column-option:hover {
  background: #e2e8f0;
}

:root:not([data-theme="dark"]) .export-column-option-selected {
  border-color: #38bdf8;
  background: #e0f2fe;
}

.export-modal-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toggle {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.toggle input {
  position: absolute;
  inset: 0;
  margin: auto;
  gap: 10px;
  margin-top: 16px;
}

/* Report view */
.report-shell {
  padding: 16px;
}

.report-container {
  max-width: 1600px;
  margin: 0 auto;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.report-container.asm-report-container {
  overflow: visible;
}

.tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tree-container .tree-header h2 {
  margin: 0;
}

.tree-container .tree-header {
  margin-bottom: 20px;
}

.table-filters {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.dashboard-controls {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.dashboard-header-switches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

.dashboard-controls-context {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-controls-context-list {
  padding: 8px;
  margin: 0;
  border-radius: 12px 12px 0 0;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--border);
  border-bottom: none;
  flex-wrap: wrap;
}

.dashboard-controls-context-list .tree-search {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
}

.dashboard-list-table-wrap {
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 0;
  overflow: visible;
}

.dashboard-list-table-wrap thead tr:first-child th {
  border-top: none;
}

.dashboard-list-table-wrap th:first-child,
.dashboard-list-table-wrap td:first-child {
  border-left: none;
}

.dashboard-list-table-wrap th:last-child,
.dashboard-list-table-wrap td:last-child {
  border-right: none;
}

.dashboard-list-table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.asm-entities-card .dashboard-list-table-wrap {
  border-bottom: none;
}

.asm-entities-card .dashboard-list-table-wrap tbody tr:last-child td {
  border-bottom: 1px solid var(--border);
}

:root:not([data-theme="dark"]) .asm-entities-card .dashboard-list-table-wrap tbody tr:last-child td {
  border-bottom-color: #cbd5e1;
}

.dashboard-list-table-wrap .table-scroll {
  overflow: visible;
  max-height: none;
}

.dashboard-list-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  border-bottom: none;
  box-shadow: none;
}

.dashboard-list-table-wrap thead th::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

:root:not([data-theme="dark"]) .dashboard-list-table-wrap thead th::after {
  background: #cbd5e1;
}

.dashboard-list-table-wrap tbody tr:first-child td {
  border-top: none;
}

.dashboard-list-feedback {
  margin-top: 0;
  padding: 18px 12px;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-top: none;
  border-radius: 0 0 12px 12px;
}

.dashboard-feedback {
  margin-top: 10px;
  padding: 12px 8px;
  text-align: center;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dashboard-stats-sections {
  display: grid;
  row-gap: 22px;
  column-gap: 16px;
  margin: 12px 0 18px;
}

.dashboard-stats-section + .dashboard-stats-section {
  margin-top: 2px;
}

.dashboard-stats-section {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border-radius: 12px;
  padding: 10px;
}

.dashboard-stats-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-stats-chart {
  margin: 8px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-stats-chart-track {
  display: flex;
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 88%, var(--surface));
  border: 1px solid var(--border);
}

.dashboard-stats-chart-segment {
  height: 100%;
  cursor: help;
  flex: 1 1 0;
  min-width: 0;
}

.dashboard-stats-chart-track > .dashboard-stats-chart-segment:first-of-type,
.dashboard-stats-chart-segment.is-first {
  border-radius: 999px 0 0 999px;
}

.dashboard-stats-chart-track > .dashboard-stats-chart-segment:last-of-type,
.dashboard-stats-chart-segment.is-last {
  border-radius: 0 999px 999px 0;
}

.dashboard-stats-chart-track > .dashboard-stats-chart-segment:only-of-type {
  border-radius: 999px;
}

.dashboard-stats-chart-segment.is-ready {
  background: #22c55e;
}

.dashboard-stats-chart-segment.is-pending {
  background: #f59e0b;
}

.dashboard-stats-chart-segment.is-excluded {
  background: #a855f7;
}

.dashboard-stats-chart-segment.is-neutral {
  background: #60a5fa;
}

.dashboard-stats-chart-segment.is-danger {
  background: #dc2626;
}

.dashboard-stats-card {
  --metric-card-accent: #60a5fa;
  border: 1px solid color-mix(in srgb, var(--metric-card-accent) 36%, var(--border));
  background: color-mix(in srgb, var(--surface-strong) 75%, var(--surface));
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-stats-label {
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dashboard-stats-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-stats-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--metric-card-accent);
}

.dashboard-stats-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-stats-weekly-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-stats-weekly-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  cursor: help;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
}

.dashboard-stats-weekly-badge.is-previous-week {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #5eead4;
}

:root[data-theme="dark"] .dashboard-stats-weekly-badge {
  color: #a7f3d0;
  background: color-mix(in srgb, #22c55e 26%, #0f172a);
  border-color: color-mix(in srgb, #22c55e 52%, var(--border));
}

:root[data-theme="dark"] .dashboard-stats-weekly-badge.is-previous-week {
  color: #99f6e4;
  background: color-mix(in srgb, #14b8a6 24%, #0f172a);
  border-color: color-mix(in srgb, #14b8a6 48%, var(--border));
}

.dashboard-stats-card-ml3-ready,
.dashboard-stats-card-contacts-confirmed,
.dashboard-stats-card-resources-gathered,
.dashboard-stats-card-asm-onboarded {
  --metric-card-accent: #22c55e;
}

.dashboard-stats-card-ml3-pending,
.dashboard-stats-card-contacts-pending,
.dashboard-stats-card-resources-pending,
.dashboard-stats-card-asm-pending {
  --metric-card-accent: #f59e0b;
}

.dashboard-stats-card-resources-excluded,
.dashboard-stats-card-asm-excluded {
  --metric-card-accent: #a855f7;
}

.dashboard-stats-card-contacts-missing-battracker {
  --metric-card-accent: #dc2626;
}

.dashboard-list-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.dashboard-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.dashboard-view-option {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 7px 12px;
  min-height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-view-option.selected {
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

:root:not([data-theme="dark"]) .dashboard-view-option.selected {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.dashboard-list-option {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 7px 12px;
  min-height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.dashboard-list-option.selected {
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

:root:not([data-theme="dark"]) .dashboard-list-option.selected {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.filter-menu {
  position: relative;
  display: inline-flex;
  flex: 0 1 auto;
  max-width: min(100%, 760px);
}

.table-filter-button {
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 32px 6px 12px;
  font-size: 0.85rem;
  appearance: none;
  cursor: pointer;
  width: max-content;
  min-width: clamp(240px, 26vw, 320px);
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  min-height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.table-filter-button-initial {
  width: clamp(240px, 26vw, 320px);
}

.filter-placeholder {
  color: var(--muted);
}

.filter-chip-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding-right: 4px;
  align-items: center;
  overflow: hidden;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  font-size: 0.75rem;
}

.filter-chip-muted {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--muted);
}

:root:not([data-theme="dark"]) .filter-chip-muted {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.filter-chip-remove {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
}

.filter-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 12px 24px var(--shadow);
  z-index: 20;
}

.filter-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.filter-logic-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.filter-mode-option {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-mode-option.selected {
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

:root:not([data-theme="dark"]) .filter-mode-option.selected {
  background: #e0f2fe;
  border-color: #38bdf8;
}

.filter-menu-title {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-clear {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  text-align: right;
}

.filter-option {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text);
  width: 100%;
  line-height: 1.3;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08);
  text-align: left;
}

:root:not([data-theme="dark"]) .filter-option {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.filter-option:hover {
  background: rgba(148, 163, 184, 0.14);
}

:root[data-theme="dark"] .filter-option:hover {
  background: rgba(148, 163, 184, 0.24);
  border-color: #475569;
}

:root:not([data-theme="dark"]) .filter-option:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.filter-option.selected {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

:root:not([data-theme="dark"]) .filter-option.selected {
  border-color: #38bdf8;
  background: #e0f2fe;
}

.filter-suboptions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid rgba(148, 163, 184, 0.35);
  margin-left: 6px;
}

.filter-option-sub {
  font-size: 0.8rem;
  padding: 6px 10px;
}


.tree-search {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  position: relative;
  width: auto;
  min-width: 180px;
  max-width: 280px;
  flex: 0 1 240px;
  min-height: 40px;
}

.tree-search-icon {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 12px;
}

.tree-search-icon svg {
  width: 16px;
  height: 16px;
}

.tree-search input {
  width: 100%;
  border: none;
  padding: 2px 28px 2px 26px;
  background: transparent;
  font-size: 0.85rem;
}


.tree-search input:focus {
  outline: none;
}

.tree-search-clear {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tree-search-clear:hover {
  color: var(--text);
}

@media (max-width: 1200px) {
  .dashboard-header-switches,
  .dashboard-controls-context {
    justify-content: flex-start;
  }

  .panel-dashboard .panel-header {
    flex-wrap: wrap;
  }

  .dashboard-controls-context-list {
    flex-wrap: wrap;
    padding: 8px;
    margin: 0;
  }

  .table-filters {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .dashboard-list-toggle {
    flex: 1 1 280px;
    max-width: 100%;
  }

  .dashboard-controls-context-list .tree-search {
    flex: 1 1 auto;
    min-width: 250px;
  }

  .dashboard-controls-context-list .filter-menu {
    flex: 0 1 auto;
    min-width: 240px;
    max-width: 100%;
  }

  .table-filter-button-initial {
    width: clamp(240px, 26vw, 320px);
  }
}

@media (max-width: 620px) {
  .dashboard-controls-context-list .tree-search,
  .filter-menu {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .export-columns {
    grid-template-columns: 1fr;
  }
}

.report-header {
  background: #0f3e68;
  color: #ffffff;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.report-container.asm-report-container .report-header {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.report-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.report-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.report-header h1 > span:last-child {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.report-header-warning-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dc2626' d='M12 2L1.8 20.5c-.4.8.2 1.5 1.1 1.5h18.2c.9 0 1.5-.7 1.1-1.5L12 2z'/%3E%3Crect x='11' y='8' width='2' height='7' fill='%23ffffff'/%3E%3Ccircle cx='12' cy='18' r='1.2' fill='%23ffffff'/%3E%3C/svg%3E");
}

.report-header h5 {
  margin: 0;
  font-weight: 600;
}

.report-header-meta {
  text-align: right;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-left: 0;
  justify-self: end;
  flex: 0 0 auto;
  white-space: nowrap;
}

.report-header-meta-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.report-help-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  margin-right: 14px;
  border: 1px solid rgba(186, 230, 253, 0.8);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.56), rgba(8, 47, 73, 0.7));
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(2, 6, 23, 0.25);
}

.report-help-button::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  width: 1px;
  height: 28px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.report-help-button:hover {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.68), rgba(12, 74, 110, 0.82));
  border-color: rgba(224, 242, 254, 0.92);
}

.report-help-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

.report-help-button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.report-help-button-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.request-help-modal {
  width: min(720px, 100%);
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 20px 42px color-mix(in srgb, #020617 38%, transparent);
}

.request-help-form-view,
.request-help-history-view {
  animation: requestHelpViewFadeIn 140ms ease-out;
}

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

.request-help-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px 30px;
  resize: vertical;
  min-height: 120px;
  font: inherit;
}

.request-help-input:focus,
.request-help-input:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

.request-help-message-wrap {
  position: relative;
}

.request-help-topic-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.request-help-topic-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.request-help-topic-fieldset legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.request-help-topic-chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--muted));
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.request-help-topic-chip-check {
  position: absolute;
  left: 10px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 120ms ease, transform 120ms ease;
}

.request-help-topic-chip-check.is-visible {
  opacity: 1;
  transform: scale(1);
}

.request-help-topic-chip-label {
  text-align: center;
}

.request-help-topic-chip:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.request-help-topic-chip.is-selected {
  border-color: color-mix(in srgb, var(--primary) 70%, var(--border));
  background: color-mix(in srgb, var(--primary) 18%, var(--panel));
}

.request-help-topic-chip:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.request-help-history {
  margin-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  padding-top: 14px;
}

.request-help-panel-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
  z-index: 10;
}

.request-help-side-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(410px, 100%);
  background: color-mix(in srgb, var(--panel) 97%, var(--surface));
  border-left: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  box-shadow: -14px 0 28px color-mix(in srgb, #020617 26%, transparent);
  transform: translateX(102%);
  transition: transform 190ms ease-out;
  z-index: 11;
}

.request-help-side-panel.is-open {
  transform: translateX(0);
}

.request-help-history h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.request-help-history-view {
  margin-top: 0;
  border-top: 0;
  padding: 16px 14px 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.request-help-history-loading {
  min-height: 44px;
  padding: 0;
  margin: 4px 0;
}

.request-help-history-loading .spinner {
  width: 22px;
  height: 22px;
  border-width: 3px;
}

.request-help-history-list {
  list-style: none;
  margin: 0;
  padding: 0 14px 0 0;
  display: grid;
  gap: 8px;
  max-height: none;
  flex: 1;
  margin-right: -14px;
  overflow: auto;
}

.request-help-history-item {
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  border-radius: 10px;
  padding: 10px;
  background: color-mix(in srgb, var(--primary) 5%, var(--panel));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.request-help-history-body {
  min-width: 0;
  order: 1;
}

.request-help-history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  order: 0;
}

.request-help-history-date-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.request-help-history-id {
  font-size: 0.78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow-wrap: anywhere;
}

.request-help-history-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.request-help-history-description,
.request-help-history-categories,
.request-help-history-state {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text);
}

.request-help-history-body > :first-child {
  margin-top: 0;
}

.request-help-history-copy-button {
  border: 1px solid color-mix(in srgb, var(--border) 88%, var(--muted));
  background: color-mix(in srgb, var(--surface) 92%, var(--panel));
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  border-radius: 999px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.request-help-history-copy-button svg {
  width: 13px;
  height: 13px;
}

.request-help-history-copy-button:hover:not(:disabled) {
  background: color-mix(in srgb, var(--surface) 84%, var(--panel));
  border-color: color-mix(in srgb, var(--border) 70%, var(--primary));
  color: color-mix(in srgb, var(--text) 85%, var(--primary));
  box-shadow: 0 1px 3px color-mix(in srgb, #020617 12%, transparent);
}

.request-help-history-copy-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}

.request-help-history-copy-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 680px) {
  .request-help-history-item {
    grid-template-columns: 1fr;
  }

  .request-help-history-meta {
    justify-content: flex-start;
  }

  .request-help-history-date-block {
    align-items: flex-start;
  }
}

.request-help-submit-spinner {
  width: 14px;
  height: 14px;
  border-color: color-mix(in srgb, #ffffff 40%, transparent);
  border-top-color: #ffffff;
}

.asm-report-header {
  background: #0f3e68;
}

.asm-chart-card {
  padding: 20px 32px 12px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.asm-report-container .asm-chart-card + .asm-chart-card {
  margin-top: 0;
}

.asm-trend-card {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.asm-trend-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 260px;
}

.asm-trend-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}

.asm-trend-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.asm-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--muted);
}


.asm-trend-chart canvas {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
}


.asm-trend-line-critical {
  stroke: #7c2d12;
}

.asm-trend-line-high {
  stroke: #b91c1c;
}

.asm-trend-line-medium {
  stroke: #f59e0b;
}

.asm-trend-line-low {
  stroke: #fde68a;
}

.asm-trend-line-info {
  stroke: #38bdf8;
}

.asm-trend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

.asm-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.asm-trend-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.asm-trend-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.asm-trend-filter input {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.asm-date-input {
  position: relative;
  display: inline-block;
  width: 125px;
}

.asm-date-input input[type="text"] {
  width: 100%;
  padding-right: 15px;
  box-sizing: border-box;
}

.asm-date-button {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  transform: none;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 0;
  width: 22px;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.asm-date-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.asm-date-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.asm-chart-header h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
}

.asm-chart-header .asm-entities-search {
  margin-left: auto;
  flex: 1 1 360px;
  width: auto;
  max-width: none;
}

.tree-header .asm-entities-search {
  margin-left: auto;
  flex: 1 1 360px;
  width: auto;
  max-width: none;
}

.tree-header .cloud-resources-search {
  margin-left: auto;
  flex: 1 1 360px;
  width: auto;
  max-width: none;
}

.tree-header .cloud-resources-search input {
  line-height: 1.3;
}

.asm-entities-header {
  justify-content: flex-start;
  gap: 32px;
  margin-bottom: 20px;
}

.asm-entities-header .asm-entities-search {
  margin-left: 0;
  flex: 1 1 360px;
  width: auto;
  max-width: none;
}

.asm-entities-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 360px;
}

.asm-entities-search-actions .asm-entities-search {
  flex: 1 1 auto;
}

.asm-entities-export-button {
  flex: 0 0 auto;
}

.asm-entities-export-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.asm-entities-card {
  padding-bottom: 20px;
}

.asm-entities-state-message {
  min-height: 84px;
  padding: 8px 0;
  display: grid;
  place-items: center;
  text-align: center;
  width: 100%;
  margin: 0;
}

.asm-entities-error-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  white-space: nowrap;
}

.asm-entities-error-icon {
  width: 26px;
  height: 26px;
}

.asm-entities-retry-button {
  margin-left: 2px;
  width: 26px;
  height: 26px;
}

.asm-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.asm-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asm-chart-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.asm-chart-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asm-collection-section {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  background: var(--surface);
}

.asm-collection-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  width: 100%;
  padding: 12px;
}

.asm-collection-count {
  margin-left: auto;
}

.asm-collection-tags {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asm-collection-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
}

.asm-collection-header::-webkit-details-marker {
  display: none;
}

.asm-collection-header::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  transition: transform 0.2s ease;
}

.asm-collection-section[open] > .asm-collection-header::before {
  transform: rotate(90deg);
}

.asm-collection-title {
  font-weight: 600;
  color: var(--text);
}

.asm-chart-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.asm-chart-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.asm-chart-group-date {
  font-weight: 600;
  color: var(--text);
}

.asm-chart-group-count {
  font-size: 0.75rem;
}

.asm-chart-row {
  display: block;
}

.asm-chart-row-main {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(220px, 1fr) 64px;
  gap: 12px;
  align-items: start;
}

.asm-chart-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asm-chart-delta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.asm-chart-delta-label {
  font-weight: 700;
  color: var(--text);
}

.asm-chart-delta-empty {
  color: var(--muted);
}

.asm-chart-delta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.asm-chart-delta-swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.asm-chart-delta-value {
  font-weight: 600;
}

.asm-chart-delta-value.is-positive,
.asm-chart-delta-total.is-positive {
  color: #dc2626;
}

.asm-chart-delta-value.is-negative,
.asm-chart-delta-total.is-negative {
  color: #16a34a;
}

.asm-chart-delta-total {
  font-weight: 600;
}

.asm-chart-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}

.asm-chart-day {
  font-weight: 600;
  color: var(--text);
}

.asm-chart-generated {
  font-size: 0.75rem;
  color: var(--muted);
}

.asm-chart-bar {
  display: flex;
  align-items: center;
  height: 28px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  gap: 0;
}

.asm-chart-segment {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f172a;
  min-width: 24px;
  box-sizing: border-box;
}

.asm-chart-total {
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.asm-severity-critical {
  background: #7c2d12;
  color: #ffffff;
}

.asm-severity-high {
  background: #b91c1c;
  color: #ffffff;
}

.asm-severity-medium {
  background: #f59e0b;
  color: #1f2937;
}

.asm-severity-low {
  background: #fde68a;
  color: #1f2937;
}

.asm-severity-info {
  background: #38bdf8;
  color: #0f172a;
}

.meta-badges {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-anchor {
  overflow: hidden;
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: #ffffff;
}

.badge-aegis {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffffff;
}

.badge-total {
  background: rgba(255, 255, 255, 0.92);
  color: #0f3e68;
  font-weight: 600;
  border: 1px solid #ffffff;
}

.mast-hierarchy-card {
  margin: 24px 32px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 2px var(--shadow-sm);
  overflow: hidden;
}

.mast-hierarchy-card.asm-embedded-section {
  overflow: visible;
}

.resources-card {
  margin-top: 8px;
  margin-bottom: 24px;
}

.resources-card-standalone {
  margin-top: 24px;
}

.asm-embedded-section {
  margin-top: -4px;
  margin-bottom: 24px;
}

.resources-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding: 16px 32px 0;
  background: var(--surface-muted);
  border: none;
  border-radius: 0;
  box-sizing: border-box;
}

#report-source-panel-finops .resources-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#report-source-panel-finops .resources-meta.resources-meta-dynamic {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 1440px) {
  #report-source-panel-finops .resources-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  #report-source-panel-finops .resources-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #report-source-panel-finops .resources-meta {
    grid-template-columns: 1fr;
  }
}

.resources-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.resources-meta-label {
  font-size: 0.8rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.01em;
}

.resources-meta-value {
  font-weight: 600;
  color: var(--text);
}

.resources-meta-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.resources-meta-list-item {
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.report-source-tabs {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 8px 0 8px;
  padding: 5px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
  align-self: flex-start;
  box-shadow: none;
}

.resources-summary-header {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.resources-summary-header-cloud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.resources-summary-header-cloud-warning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.resources-summary-actions {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 8px;
}

.resources-summary-header-cloud .resources-summary-actions {
  margin-left: 0;
  justify-self: end;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.resources-summary-header-cloud > .mast-hierarchy-title {
  display: block;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.resources-summary-header-cloud .resources-summary-actions .mast-hierarchy-refresh-button {
  margin-left: 0;
  flex: 0 0 auto;
}

.resources-summary-header-cloud .report-source-tabs + .mast-hierarchy-refresh-button {
  margin-left: 10px;
}

.resources-summary-header-cloud .report-source-tabs {
  margin: 0;
  flex-wrap: wrap;
  max-width: 100%;
  overflow: visible;
  box-shadow: none;
}

.resources-summary-header-asm {
  flex-wrap: nowrap;
}

.resources-summary-header-asm > .mast-hierarchy-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.resources-summary-header-asm .report-source-tabs {
  margin: 0;
  flex-wrap: wrap;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.resources-summary-actions-asm {
  white-space: normal;
}

.resources-summary-actions-asm .report-source-tabs {
  margin: 0;
  flex-wrap: wrap;
  box-shadow: none;
}

.report-source-tab.asm-metrics-tab {
  position: relative;
  flex-direction: row;
  gap: 8px;
}

.report-source-tab.asm-metrics-tab .report-source-tab-title {
  flex: 0 1 auto;
}

.report-source-tab-status-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dc2626' d='M12 2L1.8 20.5c-.4.8.2 1.5 1.1 1.5h18.2c.9 0 1.5-.7 1.1-1.5L12 2z'/%3E%3Crect x='11' y='8' width='2' height='7' fill='%23ffffff'/%3E%3Ccircle cx='12' cy='18' r='1.2' fill='%23ffffff'/%3E%3C/svg%3E");
}

.report-source-tab-status-icon-loading {
  background: none;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.asm-entities-state-message .report-source-tab-status-icon.asm-entities-error-icon {
  width: 26px;
  height: 26px;
}

.asm-metrics-refresh-button {
  margin-left: 0;
}

.asm-metrics-tab-refresh-icon {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}

.asm-metrics-tab-refresh-icon:hover,
.asm-metrics-tab-refresh-icon:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  outline: none;
}

.asm-embedded-section summary.asm-summary-disabled {
  cursor: not-allowed;
}

.asm-embedded-section summary.asm-summary-disabled .mast-hierarchy-title {
  cursor: not-allowed;
}

.asm-embedded-section summary.asm-summary-disabled .resources-summary-actions-asm,
.asm-embedded-section summary.asm-summary-disabled .resources-summary-actions-asm *,
.asm-embedded-section summary.asm-summary-disabled .report-source-tabs,
.asm-embedded-section summary.asm-summary-disabled .report-source-tabs * {
  cursor: pointer;
}

.asm-embedded-section summary.asm-summary-disabled::before {
  border-left-color: color-mix(in srgb, var(--muted) 72%, var(--border));
  opacity: 0.6;
}

.resources-summary-actions-asm .mast-hierarchy-refresh-button {
  flex: 0 0 auto;
  margin-left: 0;
}

.report-source-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  width: auto !important;
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.resources-summary-header-cloud .report-source-tab {
  padding: 8px 12px;
}

.resources-summary-header-asm .report-source-tab {
  min-width: 0;
  padding: 8px 12px;
}

.report-source-tab.active {
  color: color-mix(in srgb, var(--text) 68%, var(--primary));
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 16%, transparent);
}

.report-source-tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.report-source-tab-title {
  line-height: 1.15;
  text-align: center;
  width: 100%;
}

.report-source-tab:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.7);
  outline-offset: 2px;
}

.report-source-context {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.report-source-context strong {
  color: var(--text);
  font-weight: 600;
}

.report-source-context-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

@media (max-width: 420px) {
  .resources-summary-header-cloud .report-source-tabs {
    max-width: 100%;
  }
}

.resources-card summary .mast-hierarchy-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.resources-card summary .resources-summary-header-cloud > .mast-hierarchy-title {
  display: block;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.resources-card summary .mast-hierarchy-title.cloud-summary-title {
  display: inline;
  flex: 0 1 auto;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.resources-card summary .resources-summary-actions-cloud {
  white-space: normal;
}

.resources-card summary .resources-summary-actions-cloud .report-source-tabs {
  margin: 0;
  flex-wrap: wrap;
  box-shadow: none;
}

.resources-card summary .resources-summary-actions-cloud .mast-hierarchy-refresh-button {
  flex: 0 0 auto;
  margin-left: 0;
}

#report-source-panel-script .res-table td:nth-child(2) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  word-break: break-word;
}

.azure-resource-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  word-break: break-word;
  color: var(--muted);
}

.mast-hierarchy-card summary {
  padding: 12px 20px;
  background: var(--surface);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mast-hierarchy-link {
  margin-left: 0;
}

.mast-hierarchy-summary-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mast-hierarchy-summary-actions .mast-hierarchy-refresh-button {
  margin-left: 14px;
}

.mast-hierarchy-refresh-button {
  background: var(--surface-strong);
  border-color: var(--border);
  color: var(--muted);
}

.mast-hierarchy-refresh-button:hover {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--text);
}

.mast-hierarchy-refresh-button:focus-visible {
  background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  color: var(--text);
}

.mast-hierarchy-card summary::-webkit-details-marker {
  display: none;
}

.mast-hierarchy-card summary::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  top: 1px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid var(--muted);
  margin-right: 15px;
  transition: transform 0.2s ease;
}

.mast-hierarchy-card details[open] > summary::before {
  transform: rotate(90deg);
}

.mast-hierarchy-card summary.mast-warning-state::before {
  content: "";
  border: none;
  display: inline-block;
  flex: 0 0 auto;
  align-self: center;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dc2626' d='M12 2L1.8 20.5c-.4.8.2 1.5 1.1 1.5h18.2c.9 0 1.5-.7 1.1-1.5L12 2z'/%3E%3Crect x='11' y='8' width='2' height='7' fill='%23ffffff'/%3E%3Ccircle cx='12' cy='18' r='1.2' fill='%23ffffff'/%3E%3C/svg%3E");
  line-height: 1;
  transform: none;
}

.mast-hierarchy-card summary.mast-warning-loading::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  align-self: center;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  box-sizing: border-box;
  background: none;
  background-image: none;
  border: 2px solid var(--spinner-track);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.mast-hierarchy-card.mast-hierarchy-card-warning summary::before {
  visibility: visible;
}

.mast-hierarchy-card.mast-hierarchy-card-warning summary {
  cursor: default;
}

.mast-hierarchy-content {
  padding: 16px 20px;
}

.mast-hierarchy-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.mast-hierarchy-content li {
  margin-bottom: 10px;
  padding: 0;
}

.mast-hierarchy-content details {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.mast-hierarchy-content ul ul {
  padding-left: 24px;
  border-left: 1px solid var(--border);
  margin-left: 12px;
}

.mast-hierarchy-content details > summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  width: 100%;
}

.mast-hierarchy-content details > summary::-webkit-details-marker {
  display: none;
}

.mast-hierarchy-content details > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  margin-right: 4px;
  margin-top: 6px;
  transition: transform 0.2s ease;
}

.mast-hierarchy-content details[open] > summary::before {
  transform: rotate(90deg);
}

.mast-node-summary {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 4px;
  min-width: 0;
  position: relative;
  padding-right: 120px;
  width: 100%;
}

.mast-node-title {
  font-weight: 600;
  color: var(--text);
}

.mast-node-id {
  font-size: 0.85rem;
  color: var(--muted);
}

.lineage-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 4px;
}

.pill-container {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  position: absolute;
  top: 0;
  right: 0;
  margin-top: 0;
}

.status-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.pill-anchor {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--text);
}

.pill-prod-anchor {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--text);
}

.pill-aegis {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--text);
}

.mast-node-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.detail-key {
  font-weight: 600;
  color: var(--muted);
}

.detail-val {
  color: var(--text);
}

.detail-value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
}

.detail-chip-link {
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.detail-chip-link:hover,
.detail-chip-link:focus-visible {
  border-color: var(--chip-border-strong);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  outline: none;
}

.tag-kv {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.2;
}

.tag-key {
  font-weight: 400;
  color: var(--muted);
  font-size: inherit;
}

.tag-value {
  font-weight: 600;
  color: var(--text);
  font-size: inherit;
}


.dashboard-wrapper {
  padding: 24px 32px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.dashboard {
  display: flex;
  gap: 24px;
  align-items: stretch;
  flex-wrap: wrap;
}

.dashboard-card {
  flex: 1;
  min-width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 2px var(--shadow-sm);
  display: flex;
  flex-direction: column;
  max-height: 320px;
}

.dashboard-card.finops-thin-borders-card {
  border-width: 1px;
  border-color: var(--border);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.dashboard-card.finops-thin-borders-card .card-title {
  border-bottom: 1px solid var(--border);
}

.dashboard-card.finops-thin-borders-card .summary-table {
  border-collapse: separate;
  border-spacing: 0;
}

.scroll-area {
  overflow-y: auto;
  flex: 1;
}

.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.summary-table th {
  text-align: left;
  padding: 8px;
  background: var(--surface);
  background-clip: padding-box;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 1px 0 var(--border);
}
  max-width: 100%;
  overflow: hidden;

.dashboard-card.finops-thin-borders-card .summary-table th {
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: none;
  z-index: 3;
}

.dashboard-card.finops-thin-borders-card .summary-table th::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

.summary-table td {
  padding: 8px;
  border-bottom: 1px solid var(--surface);
}

.dashboard-card.finops-thin-borders-card .summary-table td {
  border: 1px solid var(--border);
}

.dashboard-card.finops-thin-borders-card .summary-table tbody tr:first-child td {
  border-top: none;
}

.num-col {
  text-align: right;
  color: var(--primary);
  font-weight: 600;
}

.text-dim {
  color: var(--muted);
  text-align: right;
}

.tree-container {
  padding: 24px 32px;
}

.tree-container h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.tree-container ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tree-container li {
  margin-bottom: 8px;
  position: relative;
}

.tree-level-project {
  padding-left: 0;
}

.tree-level-sub {
  padding-left: 24px;
  border-left: 2px solid var(--border);
  margin-left: 12px;
}

.tree-level-rg {
  padding-left: 24px;
  border-left: 2px dashed var(--border);
  margin-left: 12px;
}

.tree-level-svc {
  padding-left: 24px;
  border-left: 2px dotted var(--border);
  margin-left: 12px;
}

.tree-container details > summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  background-color: var(--panel);
  border: 1px solid transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all 0.2s;
}

.tree-container details > summary:hover {
  background-color: var(--surface);
  border-color: var(--border);
}

.tree-container details > summary::-webkit-details-marker {
  display: none;
}

.tree-container details > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--muted);
  margin-right: 12px;
  transition: transform 0.2s;
}

.tree-container details[open] > summary::before {
  transform: rotate(90deg);
}

.node-content {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.node-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.node-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.node-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  min-width: 85px;
}

.node-title {
  font-weight: 600;
  color: var(--text);
}

.count-pill {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.attr-container {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.attr-container .count-pill {
  margin-left: 0;
}

.attr-pill {
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.attr-key {
  color: var(--muted);
  margin-right: 3px;
}

.resource-wrapper {
  padding: 8px 0 16px 36px;
}

.service-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.res-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
}

.res-table th {
  background: var(--surface);
  text-align: left;
  padding: 12px 16px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.res-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.res-table tbody tr:last-child td {
  border-bottom: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text);
  line-height: 1.4;
}

.tag-toggle-row {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}

.tag-toggle-button {
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.tag-toggle-button:hover {
  color: var(--text);
  border-color: var(--text);
}

.tag-muted {
  color: var(--muted);
}

.tier-list {
  row-gap: 6px;
}

.tier-toggle {
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 1px dashed var(--border);
  font: inherit;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.tier-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}

.search-hit {
  background: rgba(250, 204, 21, 0.4);
  border-radius: 4px;
  padding: 0 2px;
}

.empty-val {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 1024px) {
  .report-header {
    text-align: left;
  }

  .report-header-meta {
    text-align: right;
  }
}

/* Support modal header nav-link override */
.request-help-header-link {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--muted));
  background: color-mix(in srgb, var(--surface) 92%, var(--panel));
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9px;
  padding: 6px 12px;
  line-height: 1.2;
  box-shadow: 0 1px 2px color-mix(in srgb, #020617 12%, transparent);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.request-help-header-link-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.request-help-header-link-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.request-help-header-link::after {
  content: "";
  font-size: 0;
  color: currentColor;
  line-height: 1;
  transform: none;
  transition: none;
}

.request-help-header-link:hover {
  background: color-mix(in srgb, var(--surface) 80%, var(--panel));
  border-color: color-mix(in srgb, var(--border) 70%, var(--primary));
  color: color-mix(in srgb, var(--text) 96%, var(--primary));
  box-shadow: 0 2px 5px color-mix(in srgb, #020617 14%, transparent);
}

.request-help-header-link:hover::after {
  transform: none;
}

.request-help-header-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  outline-offset: 2px;
}


/* Support drawer spacing: keep bottom gap inside the ticket list scroll area */
.request-help-history-view {
  padding-bottom: 0 !important;
}

.request-help-history-list {
  padding: 0 14px 14px 0 !important;
  margin-right: -14px !important;
}

.request-help-message-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  pointer-events: none;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  padding: 0 4px;
  border-radius: 6px;
}
