/* ==========================================================================
   orchideo|cloud Design System — plain HTML, dark default + light via prefers-color-scheme (siehe Ende der Datei)
   Generated from: infrastucture/cluster/arc42/08_cross_cutting_concepts/design-system.mdx
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. DIN OT — self-hosted (TTF from the eXXcellent corporate design, public/assets/fonts/)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'DIN OT';
  font-weight: 300;
  font-style:  normal;
  font-display: swap;
  src: url('/assets/fonts/DINOT-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'DIN OT';
  font-weight: 400;
  font-style:  normal;
  font-display: swap;
  src: url('/assets/fonts/DINOT.ttf') format('truetype');
}
@font-face {
  font-family: 'DIN OT';
  font-weight: 500;
  font-style:  normal;
  font-display: swap;
  src: url('/assets/fonts/DINOT-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'DIN OT';
  font-weight: 700;
  font-style:  normal;
  font-display: swap;
  src: url('/assets/fonts/DINOT-Bold.ttf') format('truetype');
}

/* --------------------------------------------------------------------------
   1. CSS Custom Properties — Brand Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --clr-new-dark:   #07264C;   /* Deepest navy — header gradient anchor */
  --clr-dark-blue:  #0d456b;   /* Primary blue — buttons, sidebar, key UI */
  --clr-lavendel:   #9d599f;   /* Secondary accent — destructive, code accents */
  --clr-light-blue: #35abe2;   /* Highlight — links, borders, active states */
  --clr-dark-grey:  #54585b;   /* Body text (light mode reference) */

  /* Semantic colors (kept close to brand palette) */
  --clr-success:  #50c850;
  --clr-warning:  #c8a032;
  --clr-danger:   #c83232;
  --clr-info:     var(--clr-light-blue);
  --clr-mock:     var(--clr-lavendel);

  /* Backgrounds */
  --bg-base:       #1c2230;
  --bg-surface:    rgba(13, 69, 107, 0.25);
  --bg-raised:     rgba(7, 38, 76, 0.55);
  --bg-overlay:    rgba(0, 0, 0, 0.45);

  /* Radial atmospheric glows */
  --bg-image:
    radial-gradient(ellipse at 25% 0%, rgba(13, 69, 107, 0.40) 0%, transparent 60%),
    radial-gradient(ellipse at 75% 0%, rgba(157, 89, 159, 0.28) 0%, transparent 60%);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0d456b, #35abe2);
  --gradient-brand:   linear-gradient(135deg, #0d456b, #9d599f); /* 135° spec angle [fix H] */
  --gradient-header:  linear-gradient(135deg, #07264C, #0d456b);

  /* Typography */
  --font-family: 'DIN OT', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'Fira Code', 'Cascadia Code', 'JetBrains Mono', ui-monospace, monospace;

  /* Text colors */
  --text-primary:   #eaeaea;
  --text-secondary: rgba(234, 234, 234, 0.60);
  --text-muted:     rgba(234, 234, 234, 0.58); /* raised from 0.38 → ≥4.5:1 contrast [fix K] */

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-base: 250ms;

  /* Borders */
  --border-subtle:  rgba(53, 171, 226, 0.12);
  --border-default: rgba(53, 171, 226, 0.18);
  --border-strong:  rgba(53, 171, 226, 0.35);
  --divider:        rgba(255, 255, 255, 0.08);
  --page-pad: 1.25rem;
}

/* --------------------------------------------------------------------------
   2. Reset + Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  background-image: var(--bg-image);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   3. Scrollbar (webkit)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--ov-14);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-lavendel);
}

/* --------------------------------------------------------------------------
   4. Links
   -------------------------------------------------------------------------- */
a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color var(--duration-base) var(--ease);
}
a:hover {
  color: var(--clr-lavendel);
}

/* --------------------------------------------------------------------------
   5. Divider
   -------------------------------------------------------------------------- */
hr {
  border:none;
  border-top: none;
  margin: 1.5rem 0;
}

/* --------------------------------------------------------------------------
   6. .hub-header
   -------------------------------------------------------------------------- */
.hub-top {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Environment banner (design system): dev = #0a5586, staging = #f0ab00, prod = none */
.env-banner {
  padding: 0.25rem var(--page-pad);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}
.env-dev     { background: #0a5586; color: #ffffff; }
.env-staging { background: #f0ab00; color: #1c2230; }

.hub-header {
  background: var(--gradient-header);
  border-bottom: none;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hub-header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem var(--page-pad);
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap; /* [fix M] prevents overflow on narrow viewports */
}

/* eXXcellent logo — design system position 1 [fix D] */
.hub-exx-link {
  display: flex;
  align-items: center;
  opacity: 0.92;
  transition: opacity 0.2s;
  flex-shrink: 0;
  text-decoration: none;
}
.hub-exx-link:hover { opacity: 1; }
.hub-exx-logo {
  display: block;
  max-width: 90px;
  height: auto;
}

@media (max-width: 600px) {
  .hub-header-center { flex-basis: 100%; order: 3; }
  .hub-exx-logo      { max-width: 60px; }
  .hub-orchid        { max-width: 48px; height: auto; }
}

.hub-header-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-shrink: 0;
}

.hub-orchid-link {
  display: flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hub-orchid-link:hover { opacity: 1; }

.hub-orchid {
  display: block;
  /* subtle scale on hover via parent */
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hub-orchid-link:hover .hub-orchid {
  transform: scale(1.05);
}

.hub-header-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hub-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Legacy aliases (kept for any remaining references) */
.hub-header .header-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.hub-header .header-actions {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   7. .wordmark — orchideo|cloud
   -------------------------------------------------------------------------- */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-family);
  font-size: 1.25rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.wordmark:hover {
  color: #ffffff;
}

.brand-orchideo {
  position: relative;
  top: 0.25em;
  font-weight: 300;
}

.brand-pipe {
  font-weight: 300;
  color: var(--accent-text);
  opacity: 0.7;
  margin: 0 1px;
}

.brand-cloud {
  position: relative;
  top: -0.15em;
  font-weight: 700;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   8. .card — Glassmorphism
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(var(--bl-rgb), 0.35),
    rgba(var(--nv-rgb), 0.25)
  );
  border: none;
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 32px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease),
              box-shadow var(--duration-base) var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: 0;
  background: var(--gradient-brand);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card h2,
.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: none;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   9. .stat-card — Glassmorphism stats card
   -------------------------------------------------------------------------- */
.stat-card {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(var(--bl-rgb), 0.35),
    rgba(var(--nv-rgb), 0.25)
  );
  border: none;
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: transform var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  /* [fix L] color fallback for browsers that don't support background-clip: text */
  color: var(--accent-text);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-card .label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Stats grid layout helper */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   10. .panel — Main content panels (less transparent than .card)
   -------------------------------------------------------------------------- */
.panel {
  background: rgba(var(--nv-rgb), 0.55);
  border: none;
  border-radius: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.20);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.panel h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: none;
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   11. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  border:none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Primary */
.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(13, 69, 107, 0.40);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(53, 171, 226, 0.35);
  color: #ffffff;
}
.btn-primary:active {
  transform: translateY(0);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--clr-light-blue);
}
.btn-secondary:hover {
  background: rgba(53, 171, 226, 0.10);
  color: var(--accent-text);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0);
}

/* Destructive */
.btn-destructive {
  background: rgba(157, 89, 159, 0.85);
  color: #ffffff;
  border-radius: 0;
  box-shadow: 0 2px 10px rgba(157, 89, 159, 0.25);
}
.btn-destructive:hover {
  background: rgba(157, 89, 159, 1);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(157, 89, 159, 0.40);
}
.btn-destructive:active {
  transform: translateY(0);
}

/* Disabled — must come last to override everything */
.btn[disabled],
.btn:disabled {
  background: rgba(100, 100, 100, 0.40) !important;
  color: rgba(234, 234, 234, 0.35) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   12. Tables
   -------------------------------------------------------------------------- */
.table-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 680px;
  border-radius: 0;
}

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

thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

th,
td {
  padding: 0.6875rem 0.75rem;
  text-align: left;
  border-bottom: none;
}

th {
  background: rgba(var(--nv-rgb), 0.80);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
}

th:hover {
  background: rgba(53, 171, 226, 0.15);
  color: var(--accent-text);
}

th.sorted-asc::after  { content: ' ▲'; font-size: 0.7em; }
th.sorted-desc::after { content: ' ▼'; font-size: 0.7em; }

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

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

tbody tr.row-fade-in {
  opacity: 0;
  animation: rowFadeIn 0.22s ease forwards;
}

tbody tr:hover {
  background: var(--ov-04);
  cursor: pointer;
}

tbody tr.selected {
  background: rgba(53, 171, 226, 0.10);
}

/* --------------------------------------------------------------------------
   13. Badges
   -------------------------------------------------------------------------- */

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.1875rem 0.5625rem;
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.status-overprovisioned  { background: rgba(200, 160, 50, 0.18);  color: var(--clr-warning); }
.status-underprovisioned { background: rgba(200, 50, 50, 0.18);   color: var(--clr-danger); }
.status-optimal          { background: rgba(80, 200, 80, 0.18);   color: var(--clr-success); }
.status-nocurrent        { background: rgba(160, 160, 160, 0.15); color: var(--text-secondary); }

/* Cluster badge */
.cluster-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  /* [fix B] brand color — was #60a5fa / rgba(59,130,246,...) */
  background: rgba(53, 171, 226, 0.12);
  color: var(--accent-text);
}

/* Delta badge */
.delta-badge {
  display: inline-block;
  padding: 0.125rem 0.4375rem;
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.delta-up   { background: rgba(80, 200, 80, 0.18);  color: var(--clr-success); }
.delta-down { background: rgba(200, 50, 50, 0.18);  color: var(--clr-danger); }
.delta-new  { background: rgba(53, 171, 226, 0.18); color: var(--accent-text); }

/* OOM risk */
.oom-risk-high   { color: var(--clr-danger);  font-weight: 700; }
.oom-risk-medium { color: var(--clr-warning); font-weight: 700; }

/* --------------------------------------------------------------------------
   14. Filters / Selector groups
   -------------------------------------------------------------------------- */
.filters,
#api-selectors {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.sel-group,
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.sel-group label,
.filter-group label {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-secondary);
}

select,
input[type="text"],
input[type="search"] {
  font-family: var(--font-family);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(var(--nv-rgb), 0.70);
  border: none;
  border-radius: 0;
  padding: 0.5625rem 0.875rem;
  min-width: 170px;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2335abe2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

select:focus,
input[type="text"]:focus,
input[type="search"]:focus {
  border-color: var(--clr-light-blue);
  box-shadow: 0 0 0 2px rgba(53, 171, 226, 0.18);
}

/* [fix F] keyboard focus rings — WCAG AA 2.4.7 */
.btn:focus-visible,
.tab:focus-visible,
th[tabindex]:focus-visible,
.mode-toggle button:focus-visible {
  outline: 2px solid var(--clr-light-blue);
  outline-offset: 2px;
}

select option {
  background: #1c2a40;
  color: var(--text-primary);
}

.filter-checks {
  display: flex;
  gap: 0.875rem;
  align-items: center;
}

.filter-checks label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.filter-checks input[type="checkbox"] {
  accent-color: var(--clr-light-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   15. .toolbar (merged mode toggle + api selectors)
   -------------------------------------------------------------------------- */
.toolbar {
  background: rgba(var(--nv-rgb), 0.55);
  border: none;
  border-radius: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.625rem 1.25rem;
  margin: 0 var(--page-pad) 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar-left  { flex-shrink: 0; }
.toolbar-right { margin-left: auto; flex-shrink: 0; }

.toolbar-selectors {
  display: flex;
  align-items: flex-start; /* the month hint must not push the other controls down */
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

/* hint sits below the month select without taking part in the row height */
.toolbar-selectors .sel-group { position: relative; }
.toolbar-selectors .month-hint { position: absolute; top: 100%; left: 0; margin-top: 2px; width: max-content; }

/* Compact selector labels inside toolbar */
.toolbar-selectors .sel-group label {
  font-size: 0.68rem;
}
.toolbar-selectors select,
.toolbar-selectors input[type="text"] {
  min-width: 130px;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

.mode-status-chip {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.3s;
}
.mode-status-chip.loaded {
  color: var(--accent-text);
}

.mode-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.30);
  border-radius: 0;
  padding: 3px;
  gap: 2px;
}

.mode-toggle button {
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 1.125rem;
  border:none;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
}

.mode-toggle button.active {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 1px 8px rgba(13, 69, 107, 0.40);
}

.mode-toggle button:not(.active):hover {
  background: var(--ov-06);
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   16. Alerts
   -------------------------------------------------------------------------- */
.alert-info,
.alert-success,
.alert-warning,
.alert-error {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0;
  border-left: none;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-info {
  background: rgba(53, 171, 226, 0.08);
  border-color: rgba(53, 171, 226, 0.30);
  color: var(--accent-text);
}

.alert-success {
  background: rgba(80, 200, 80, 0.10);
  border-color: rgba(80, 200, 80, 0.40);
  color: var(--clr-success);
}

.alert-warning {
  background: rgba(200, 160, 50, 0.10);
  border-color: rgba(200, 160, 50, 0.40);
  color: var(--clr-warning);
}

.alert-error {
  background: rgba(200, 50, 50, 0.10);
  border-color: rgba(200, 50, 50, 0.40);
  color: var(--clr-danger);
}

/* --------------------------------------------------------------------------
   17. Detail panel items + comparison bars
   -------------------------------------------------------------------------- */
.detail-item {
  background: rgba(var(--nv-rgb), 0.65);
  border: none;
  border-radius: 0;
  padding: 0.6875rem 0.75rem;
}

.detail-item .label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.1875rem;
}

.detail-item .value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5625rem;
}

.detail-section {
  margin-bottom: 1.125rem;
}

.detail-section h4 {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5625rem;
}

/* Comparison bars */
.comparison-bar {
  margin-bottom: 0.8125rem;
}

.comparison-bar .bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.bar-container {
  height: 18px;
  background: rgba(0, 0, 0, 0.30);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 3px;
}

.bar-fill {
  height: 100%;
  border-radius: 0;
  transition: width var(--duration-base) var(--ease);
}

.bar-recommended {
  background: linear-gradient(90deg, var(--clr-success), #86efac);
}

.bar-actual {
  background: linear-gradient(90deg, var(--clr-warning), #fcd34d);
}

/* --------------------------------------------------------------------------
   18. Tabs
   -------------------------------------------------------------------------- */
/* Side navigation (design system sidebar, navy variant): background + colour change on the active
   link, no indicator bar. Below 900px it folds into a horizontally scrollable row. */
.tabs {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem 0.5rem;
  align-self: start;
  position: sticky;
  top: 5rem;
  background: linear-gradient(180deg, rgba(var(--nv-rgb), 0.60) 0%, rgba(var(--bl-rgb), 0.40) 100%);
  border: none;
  border-radius: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  font-family: var(--font-family);
  font-size: 0.9375rem;
  font-weight: 400;
  text-align: left;
  padding: 0.625rem 0.875rem;
  border:none;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.80);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
}
.tab .icon { flex-shrink: 0; }

.tab:hover:not(.active) {
  background: rgba(53, 171, 226, 0.10);
  color: var(--text-strong);
}

.tab.active {
  background: rgba(53, 171, 226, 0.12);
  color: var(--accent-text);
  font-weight: 500;
}

.tab:focus-visible {
  outline: 2px solid var(--clr-light-blue);
  outline-offset: -2px;
}

@media (max-width: 900px) {
  .tabs {
    flex-direction: row;
    position: static;
    overflow-x: auto;
    padding: 0.375rem;
  }
  .tab { width: auto; white-space: nowrap; }
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --------------------------------------------------------------------------
   19. .no-selection / .empty-state
   -------------------------------------------------------------------------- */
.no-selection,
.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text-muted);
}

.no-selection svg,
.empty-state svg {
  display: block;
  margin: 0 auto 0.75rem;
  opacity: 0.35;
}

.no-selection svg  { width: 48px; height: 48px; }
.empty-state svg   { width: 60px; height: 60px; }

.no-selection p,
.empty-state p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   20. .manifest-path (monospace code block)
   -------------------------------------------------------------------------- */
.manifest-path {
  font-family: var(--font-mono);
  font-size: 0.775rem;
  line-height: 1.65;
  background: rgba(0, 0, 0, 0.30);
  border: none;
  border-radius: 0;
  padding: 0.625rem 0.875rem;
  color: var(--text-secondary);
  word-break: break-all;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   21. .mock-auth-banner — purple, bottom fixed
   -------------------------------------------------------------------------- */
.mock-auth-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(157, 89, 159, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 -2px 16px rgba(157, 89, 159, 0.30);
}

.mock-auth-banner::before {
  content: '⚠';
  font-size: 1em;
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   22. .hub-error-banner — red, top fixed (below sticky header)
   -------------------------------------------------------------------------- */
.hub-error-banner {
  /* In document flow — no layout shift, no overlap with header */
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: rgba(180, 40, 40, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(200, 50, 50, 0.25);
  animation: slideDown var(--duration-base) var(--ease) both;
}

.hub-error-dismiss {
  background: none;
  border:none;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  padding: 0 0.25rem;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.hub-error-dismiss:hover { opacity: 1; }


@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* --------------------------------------------------------------------------
   23. Loading spinner
   -------------------------------------------------------------------------- */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: none;
  border-top-color: var(--clr-light-blue);
  border-radius: 0;
  animation: spin 0.7s linear infinite;
}

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

/* --------------------------------------------------------------------------
   24. Upload area
   -------------------------------------------------------------------------- */
#upload-area {
  background: rgba(var(--nv-rgb), 0.40);
  border: none;
  border-radius: 0;
  padding: 3.125rem 2.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  transition: border-color var(--duration-base) var(--ease),
              background var(--duration-base) var(--ease);
  cursor: pointer;
}

#upload-area:hover,
#upload-area.dragover {
  border-color: var(--clr-light-blue);
  background: rgba(53, 171, 226, 0.06);
}

#upload-area svg {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  color: var(--text-muted);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#upload-area h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#upload-area p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.file-info {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(var(--bl-rgb), 0.50);
  border: none;
  padding: 0.375rem 0.875rem;
  border-radius: 0;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.file-info .clear-btn {
  background: none;
  border:none;
  color: var(--clr-danger);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.8;
  transition: opacity var(--duration-fast) var(--ease);
}

.file-info .clear-btn:hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   25. Namespace tree (API mode)
   -------------------------------------------------------------------------- */
.ns-tree {
  font-size: 0.875rem;
}

.ns-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease);
}

.ns-item:hover {
  background: var(--ov-05);
}

.ns-item.active {
  background: rgba(53, 171, 226, 0.12);
  color: var(--accent-text);
}

.ns-item .ns-name {
  font-weight: 500;
}

.ns-item .ns-count {
  font-size: 0.73rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   26. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

#main-content {
  padding: var(--page-pad);
  box-sizing: border-box;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#main-content.visible {
  opacity: 1;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  transition: grid-template-columns 0.25s ease;
}

.main-grid:has(.right-column.hidden) {
  grid-template-columns: 1fr 0px;
  gap: 0;
}

/* [fix I] named column references used in index.html */
.left-column {
  /* first grid child — side navigation + panel */
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
}
@media (max-width: 900px) {
  .left-column { grid-template-columns: minmax(0, 1fr); }
}
.right-column { /* second grid child — detail panel */ }

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

.app-detail {
  position: sticky;
  top: 80px; /* below sticky header */
}

/* Detail panel helpers */
.detail-badges         { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid-single    { grid-template-columns: 1fr !important; }
.detail-value-sm       { font-size: 0.85rem; }
.detail-edit-cmd       { margin-top: 8px; font-size: 0.78rem; color: var(--text-secondary); }

/* Chart containers */
.chart-container {
  position: relative;
  height: 520px;
  margin-bottom: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.chart-container.chart-ready {
  opacity: 1;
}

/* Header metadata chips */
.metadata {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.metadata span {
  background: rgba(var(--bl-rgb), 0.50);
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.header-actions {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Onboarding card
   -------------------------------------------------------------------------- */
.onboarding-card {
  background: rgba(var(--nv-rgb), 0.45);
  border: none;
  border-radius: 0;
  backdrop-filter: blur(12px);
  padding: 1.5rem 2rem;
  margin: 0 var(--page-pad) 1.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.onboarding-card.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
.onboarding-steps {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0;
  border: none;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.onboarding-step.active {
  border-color: var(--clr-light-blue);
  background: rgba(53, 171, 226, 0.08);
}
.ob-num {
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: rgba(53, 171, 226, 0.15);
  border: none;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.onboarding-step.active .ob-num {
  background: var(--clr-light-blue);
  color: #07264c;
}
.ob-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ob-text strong { font-size: 0.875rem; color: var(--text-primary); }
.ob-text span   { font-size: 0.75rem;  color: var(--text-secondary); }
.ob-arrow {
  font-size: 1.25rem;
  color: var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Stat cards — clickable, active state
   -------------------------------------------------------------------------- */
.stat-card {
  cursor: pointer;
  user-select: none;
}
.stat-card:hover {
  border-color: rgba(53, 171, 226, 0.30);
}
.stat-card.stat-active {
  border-color: var(--clr-light-blue) !important;
  box-shadow: 0 0 0 1px var(--clr-light-blue), 0 4px 16px rgba(53, 171, 226, 0.20);
}
.stat-card.stat-over  .value { color: var(--clr-warning,  #f59e0b); }
.stat-card.stat-under .value { color: var(--clr-error,    #ef4444); }
.stat-card.stat-oom   .value { color: var(--clr-lavendel, #9d599f); }

/* --------------------------------------------------------------------------
   Table toolbar + pagination
   -------------------------------------------------------------------------- */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.table-count {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pg-btn {
  font-family: var(--font-family);
  font-size: 0.8rem;
  padding: 0.25rem 0.625rem;
  border: none;
  border-radius: 0;
  background: rgba(var(--nv-rgb), 0.50);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.pg-btn:hover:not(:disabled) {
  background: rgba(53, 171, 226, 0.12);
  color: var(--accent-text);
  border-color: rgba(53, 171, 226, 0.35);
}
.pg-btn.active {
  background: var(--clr-light-blue);
  color: #fff;
  border-color: var(--clr-light-blue);
}
.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pg-ellipsis { font-size: 0.8rem; color: var(--text-muted); padding: 0 2px; }

/* --------------------------------------------------------------------------
   Detail panel header + close button
   -------------------------------------------------------------------------- */
.detail-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.detail-panel-header h2 { margin-bottom: 0; }

.detail-close-btn {
  background: none;
  border:none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
}
.detail-close-btn:hover {
  color: var(--text-primary);
  background: var(--ov-06);
}

/* Slide-in effect when panel gets content */
.app-detail {
  transition: box-shadow 0.3s var(--ease);
}
.app-detail.has-content {
  box-shadow:
    0 0 0 1px rgba(53, 171, 226, 0.20),
    0 8px 32px rgba(0,0,0,0.25);
}

/* Mobile: detail panel as full-width block below table */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr !important;
  }
  .app-detail {
    position: static;
  }
  .app-detail.has-content {
    margin-top: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Run Status Bar
   -------------------------------------------------------------------------- */
.run-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem var(--page-pad);
  margin: 0 0 0.75rem;
  background: rgba(var(--nv-rgb), 0.40);
  border: none;
  border-radius: 0;
  font-size: 0.82rem;
}

.run-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.run-status-meta {
  display: flex;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.run-status-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.run-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  flex-shrink: 0;
  background: var(--text-muted);
}
.run-dot-ok      { background: #4ade80; }
.run-dot-error   { background: #ef4444; }
.run-dot-running {
  background: var(--clr-light-blue);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

/* Small button variant */
.btn-sm {
  font-size: 0.78rem;
  padding: 0.25rem 0.625rem;
}
.btn-sm svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Modal (Run History)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-panel {
  background: #1a2540;
  border: none;
  border-radius: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.50);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.2s var(--ease) both;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: none;
  flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 1rem; }

.modal-body {
  overflow-y: auto;
  padding: 1rem 1.25rem;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Run History entries
   -------------------------------------------------------------------------- */
.run-history-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 1rem 0;
}

.run-history-entry {
  padding: 0.875rem;
  border-radius: 0;
  border: none;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s;
}
.run-entry-completed { border-left: none; }
.run-entry-failed    { border-left: none; }
.run-entry-partial   { border-left: none; }

.run-entry-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.run-entry-id  { flex: 1; font-size: 0.82rem; font-family: monospace; color: var(--text-primary); }
.run-entry-dur { font-size: 0.78rem; color: var(--text-secondary); }

.run-entry-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.run-entry-errcnt {
  color: var(--c-red);
  font-weight: 600;
}

.run-global-error {
  overflow-wrap: anywhere;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--c-red);
  background: rgba(239, 68, 68, 0.08);
  border-radius: 0;
  padding: 0.375rem 0.5rem;
}

.run-errors { margin-top: 0.5rem; }
.run-error-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  padding: 0.2rem 0;
  border-top: none;
}
.run-error-location { color: var(--accent-text); flex-shrink: 0; }
.run-error-msg      { color: #fca5a5; overflow-wrap: anywhere; min-width: 0; }

.hub-error-inline {
  color: var(--c-red);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

/* Delta highlight in detail panel */
.delta-highlight {
  color: var(--accent-text);
  font-weight: 600;
}

/* Run History tab */
.run-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.run-tab-header h2 { margin: 0; }

/* Error badge on tab button */
.tab-has-error {
  position: relative;
}
.tab-has-error::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: #ef4444;
}

/* Run progress bar (shown during active runs) */
.run-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.run-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--ov-10);
  border-radius: 0;
  overflow: hidden;
  min-width: 80px;
  max-width: 220px;
}

.run-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-dark-blue), var(--clr-light-blue));
  border-radius: 0;
  transition: width 0.5s ease;
}

.run-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
  min-width: 2.5rem;
}

.run-progress-ns {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Partial status dot (yellow) */
.run-dot-warning { background: #f59e0b; }

/* Partial run history entry */
.run-entry-partial { border-left: none; }

/* Stat chips in table toolbar */
.stat-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 0;
  border: none;
  background: var(--ov-05);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.stat-chip span {
  font-weight: 700;
  color: inherit;
}

.stat-chip:hover {
  background: var(--ov-10);
  color: var(--text-primary);
}

.stat-chip.stat-active,
.stat-chip:focus-visible {
  background: rgba(53,171,226,0.15);
  border-color: var(--accent-text);
  color: var(--accent-text);
  outline: none;
}

.stat-chip-over.stat-active  { background: rgba(245,158,11,0.15); border-color: currentColor; color: var(--c-amber); }
.stat-chip-under.stat-active { background: rgba(239,68,68,0.15);  border-color: currentColor; color: var(--c-red); }
.stat-chip-oom.stat-active   { background: rgba(157,89,159,0.15); border-color: currentColor; color: var(--clr-lavendel); }
.stat-chip-over span  { color: var(--c-amber); }
.stat-chip-under span { color: var(--c-red); }
.stat-chip-oom span   { color: var(--clr-lavendel); }
.stat-chip-optimal.stat-active { background: rgba(34,197,94,0.15); border-color: currentColor; color: var(--c-green); }
.stat-chip-optimal span { color: var(--c-green); }

/* "Änderungen" toggle in the Ressourcen table toolbar */
.table-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.table-check input[type="checkbox"] {
  accent-color: var(--clr-light-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* table-toolbar needs flex-wrap for the chips row */
.table-toolbar {
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* Runs panel — always visible, below status bar */
.runs-panel {
  margin: 0 var(--page-pad) 0.75rem;
  background: var(--surface);
  border: none;
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.2s;
}

.runs-panel-has-error {
  border-color: rgba(239,68,68,0.5);
}

.runs-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--ov-03);
  border-bottom: none;
}

.runs-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
}

.runs-panel-toggle {
  background: none;
  border:none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
}

.runs-panel-toggle:hover { background: var(--ov-08); color: var(--text-primary); }

#runs-panel-chevron { transition: transform 0.2s; }

.runs-panel-body {
  padding: 0.5rem 0.75rem;
  max-height: 280px;
  overflow-y: auto;
}

.runs-panel-last-run {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}

.export-btns {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

/* Cost summary bar */
.cost-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(var(--nv-rgb), 0.45);
  border: none;
  border-radius: 0;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
}

.cost-card {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.3rem 0.75rem;
  border-right: none;
}

.cost-card:last-of-type { border-right:none; }

.cost-card-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cost-card-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.cost-card-discounted .cost-card-value {
  color: var(--c-mint);
}

.cost-card-count .cost-card-value {
  color: var(--text-primary);
  font-size: 1rem;
}

.cost-card-savings .cost-card-value {
  font-size: 1rem;
}

.cost-card-note {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-left: auto;
  font-style: italic;
}

.cost-table-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
}

#cost-table th { cursor: pointer; user-select: none; }
#cost-table th:hover { color: var(--accent-text); }
#cost-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-discounted-cell { color: var(--c-mint); }

/* Info tooltip */
.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 0;
  border: none;
  font-size: 0.6rem;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  color: var(--text-secondary);
  cursor: help;
  flex-shrink: 0;
}

.info-tooltip:hover {
  color: var(--accent-text);
  border-color: var(--clr-light-blue);
}

.info-tooltip svg { display: block; }

.info-tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 20, 50, 0.97);
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 0.45rem 0.65rem;
  width: 220px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100;
}

.info-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: none;
  border-top-color: var(--border);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 101;
}

.info-tooltip:hover::after,
.info-tooltip:hover::before { opacity: 1; }

.cluster-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}


/* Detail panel slide-in animation */
.right-column {
  overflow: hidden;
  width: 400px;
  opacity: 1;
  transition: width 0.25s ease, opacity 0.2s ease;
}

.right-column.hidden {
  width: 0;
  opacity: 0;
  pointer-events: none;
}


.empty-state {
  text-align: center;
  padding: 3rem 1rem !important;
  color: var(--text-secondary);
}

.empty-state svg {
  display: block;
  margin: 0 auto 0.75rem;
  opacity: 0.4;
}

.empty-state span {
  font-size: 0.9rem;
}

/* Table column widths */
col.col-name    { min-width: 160px; }
col.col-cluster { width: 110px; }
col.col-ns      { width: 130px; }
col.col-num     { width: 90px; }
col.col-oom     { width: 70px; }
col.col-status  { width: 110px; }
col.col-cost    { width: 110px; }
#components-table td.cell-cost { text-align: right; font-variant-numeric: tabular-nums; }

/* Icon alignment helpers */
.icon-inline { vertical-align: -2px; }
.runs-empty  { color: var(--text-secondary); }
.chevron-collapsed { transform: rotate(-90deg); }

.cost-saving   { color: var(--c-mint); }
.cost-increase { color: var(--clr-danger); }

/* ── Overview KPI cards ───────────────────────────────────── */
.overview-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: rgba(var(--nv-rgb), 0.45);
  border: none;
  border-radius: 0;
  padding: 0.75rem 1.25rem;
  min-width: 110px;
  text-align: center;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

.kpi-cost  .kpi-value { color: var(--accent-text); }
.kpi-savings .kpi-value { color: var(--c-mint); }

.chart-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.chart-container-sm {
  height: 260px !important;
}

/* ── Cluster summary table ────────────────────────────────── */
.cluster-summary-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.cluster-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cluster-summary-table th,
.cluster-summary-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: none;
}

.cluster-summary-table th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.cluster-summary-table tr:hover td {
  background: var(--ov-03);
}

.cluster-summary-table .status-overprovisioned { color: var(--clr-warning); font-weight: 600; }
.cluster-summary-table .status-underprovisioned { color: var(--clr-danger); font-weight: 600; }
.cluster-summary-table .status-oom { color: var(--clr-danger); font-weight: 600; }

/* ── Cost bar sections ──────────────────────────────────────── */
.cost-bar {
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
}

.cost-bar-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
}

.cost-bar-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cost-bar-cards {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.cost-bar-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-subtle);
  margin: 0.4rem 0;
}

.cost-basis-badge {
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(53,171,226,0.2);
  color: var(--accent-text);
  border-radius: 0;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   Observability / Metrics Feature
   ============================================================ */

/* --- Compatibility Score Badge --- */
.compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 0;
  padding: 2px 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compat-badge-full    { background: rgba(34,197,94,0.15);  color: var(--c-green); border: none; }
.compat-badge-partial { background: rgba(245,158,11,0.15); color: var(--c-amber); border: none; }
.compat-badge-none    { background: rgba(100,116,139,0.15);color: var(--c-slate); border: none; }

/* --- Observability inline check rows --- */
.obs-checks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 6px 0 4px;
}
.obs-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.obs-check-icon { font-size: 0.95rem; flex-shrink: 0; }
.obs-check-label { flex: 1; }
.obs-check-value { color: var(--text-primary); font-weight: 500; }

/* --- Resource attributes mini-list --- */
.obs-attrs {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.obs-attr {
  display: flex;
  gap: 6px;
  font-size: 0.75rem;
}
.obs-attr-key   { color: var(--text-muted); flex-shrink: 0; }
.obs-attr-val   { color: var(--text-primary); word-break: break-all; }

/* --- Loading spinner (reusable) --- */
.obs-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 6px 0;
}
.obs-spinner {
  width: 14px; height: 14px;
  border: none;
  border-top-color: var(--clr-light-blue);
  border-radius: 0;
  animation: obs-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes obs-spin { to { transform: rotate(360deg); } }

/* --- "→ Metrics-Tab" link in detail panel --- */
.obs-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--accent-text);
  background: none;
  border:none;
  cursor: pointer;
  padding: 0;
  margin-top: 6px;
  text-decoration: none;
}
.obs-tab-link:hover { text-decoration: underline; }

/* ============================================================
   Metrics Tab
   ============================================================ */
#tab-metrics .table-toolbar { margin-bottom: 10px; }

.metrics-compat-filters {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics-compat-filters label,
.metrics-compat-filters .metrics-compat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-right: 2px;
}

/* Score chips in metrics tab (reuse stat-chip, add score colors) */
.stat-chip-full.stat-active     { background: rgba(34,197,94,0.15);  border-color: var(--c-green); color: var(--c-green); }
.stat-chip-partial.stat-active  { background: rgba(245,158,11,0.15); border-color: var(--c-amber); color: var(--c-amber); }
.stat-chip-none.stat-active     { background: rgba(100,116,139,0.15);border-color: var(--c-slate); color: var(--c-slate); }
.stat-chip-full span    { color: var(--c-green); }
.stat-chip-partial span { color: var(--c-amber); }
.stat-chip-none span    { color: var(--c-slate); }

/* Metrics table icon columns */
#metrics-table th, #metrics-table td { vertical-align: middle; }
#metrics-table td.metrics-td-icon { text-align: center; font-size: 1rem; }
#metrics-table td.metrics-td-count { text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   Metriken-Modal
   ============================================================ */

.metrics-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(2px);
  animation: modal-fade-in 0.15s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.metrics-modal-drawer {
  background: var(--bg-card);
  border-top: none;
  border-radius: 0;
  width: 100%;
  max-width: 860px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: drawer-slide-up 0.2s ease;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}

@keyframes drawer-slide-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.metrics-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: none;
  flex-shrink: 0;
}

.metrics-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.metrics-modal-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: monospace;
}

.metrics-modal-close {
  background: none;
  border:none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
}
.metrics-modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }

.metrics-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: none;
  flex-shrink: 0;
}

.metrics-modal-search {
  flex: 1;
  background: var(--bg-input, var(--bg-secondary));
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.metrics-modal-search:focus { border-color: var(--accent); }

.metrics-modal-otel-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.metrics-modal-otel-toggle input { accent-color: #818cf8; cursor: pointer; }

.metrics-modal-stats {
  padding: 6px 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: none;
  flex-shrink: 0;
}

.metrics-modal-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
  align-content: start;
}

.metrics-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 0;
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-secondary);
  transition: background 0.1s;
  gap: 8px;
}
.metrics-modal-item:hover { background: var(--bg-hover); color: var(--text-primary); }

.metrics-modal-item.is-otel {
  color: var(--c-indigo);
}
.metrics-modal-item.is-otel:hover { color: #c7d2fe; }

.metrics-otel-badge {
  font-size: 0.6rem;
  font-family: sans-serif;
  font-weight: 600;
  background: #312e81;
  color: var(--c-indigo);
  border: none;
  border-radius: 0;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.metrics-modal-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-size: 0.875rem;
  font-family: sans-serif;
}

.obs-metrics-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.obs-metrics-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-primary);
}
.obs-metrics-btn-count {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
}
.obs-metrics-otel-hint {
  font-size: 0.7rem;
  background: #312e81;
  color: var(--c-indigo);
  border-radius: 0;
  padding: 1px 6px;
}

.metrics-modal-cat-select {
  background: var(--bg-secondary);
  border: none;
  border-radius: 0;
  color: var(--text-secondary);
  padding: 7px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
}
.metrics-modal-cat-select:focus { border-color: var(--accent); }

.metrics-modal-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics-source-badge {
  font-size: 0.6rem;
  font-family: sans-serif;
  font-weight: 600;
  border-radius: 0;
  padding: 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.metrics-modal-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  border-radius: 0;
  padding: 2px 6px;
  margin-left: 6px;
}

.metrics-modal-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

/* Month hint + run summary */
.month-hint { display: block; max-width: 22rem; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.run-summary { margin: 8px 24px; padding: 10px 14px; border-radius: 0; border: none; border-left-width: 4px; font-size: 13px; background: var(--surface, #fff); }
.run-summary-completed { border-left-color: #22c55e; }
.run-summary-partial   { border-left-color: #f59e0b; }
.run-summary-failed    { border-left-color: #ef4444; }
.run-summary-head { display: flex; align-items: center; gap: 12px; }
.run-summary-dur { color: var(--text-muted); margin-left: auto; }
.run-summary-close { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.run-summary-errors { margin: 6px 0 0 18px; padding: 0; }

/* Run options (month picker + force) */
.run-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 6px 14px; font-size: 12px; border-top: none; }
.run-opt { display: inline-flex; align-items: center; gap: 6px; }
.run-opts-hint { color: var(--text-muted); flex: 1 1 24rem; }
.run-entry-month { font-weight: 600; margin-right: 8px; }

/* otel-conformance: score derivation, source, verdicts */
.obs-section { margin: 8px 0; }
.obs-section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.score-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; }
.score-check { display: flex; gap: 6px; align-items: baseline; }
.score-check-detail { color: var(--text-muted); font-size: 0.75rem; }
.score-summary { margin-top: 6px; font-size: 0.75rem; }
.score-bar { display: flex; height: 6px; border-radius: 0; overflow: hidden; margin-top: 4px; background: var(--bg-hover, #eee); }
.score-bar-seg { display: block; height: 100%; }
.verdict-badge { display: inline-block; padding: 0 6px; border-radius: 0; font-size: 0.7rem; line-height: 1.5; white-space: nowrap; }
.verdict-conform { background: #dcfce7; color: #166534; }
.verdict-partial { background: #fef3c7; color: #92400e; }
.verdict-non_conform { background: #fee2e2; color: #991b1b; }
.verdict-prometheus_native { background: #e0e7ff; color: #3730a3; }
.score-bar-seg.verdict-conform { background: #22c55e; } .score-bar-seg.verdict-partial { background: #f59e0b; }
.score-bar-seg.verdict-non_conform { background: #ef4444; } .score-bar-seg.verdict-prometheus_native { background: #6366f1; }
.obs-source-line { font-size: 0.8rem; } .obs-source-conf { color: var(--text-muted); font-size: 0.75rem; margin-left: 6px; }
.obs-evidence, .metrics-modal-reasons { font-size: 0.75rem; margin-top: 2px; } .obs-evidence ul, .metrics-modal-reasons ul { margin: 2px 0 2px 16px; padding: 0; }
.metrics-modal-item-v { flex-wrap: wrap; gap: 6px; } .metrics-modal-reasons { flex-basis: 100%; }

.verdict-custom { background: #f1f5f9; color: #475569; }
.score-bar-seg.verdict-custom { background: #94a3b8; }
.score-pct { font-size: 0.8rem; margin-bottom: 4px; } .score-pct-value { font-size: 1.3rem; font-weight: 700; }
.score-pct-bar { height: 6px; border-radius: 0; background: var(--bg-hover, #eee); overflow: hidden; margin-top: 2px; } .score-pct-bar span { display: block; height: 100%; background: #22c55e; }
.top-problems { font-size: 0.75rem; margin-top: 6px; width: 100%; } .top-problems ul { margin: 2px 0 2px 16px; padding: 0; }
/* Final OTel conformance v1 */
.verdict-violation { background: #fee2e2; color: #991b1b; }
.score-bar-seg.verdict-violation { background: #ef4444; }
.verdict-custom, .verdict-prometheus_native { background: #f1f5f9; color: #475569; }
.score-bar-seg.verdict-custom, .score-bar-seg.verdict-prometheus_native { background: #94a3b8; }
.compat-badge-no-telemetry { background: rgba(100,116,139,.10); color: var(--c-slate); border: none; }
.score-series, .semconv-version { color: var(--text-muted); font-size: .75rem; margin-top: 3px; }
.score-truncated { color: #92400e; background: #fef3c7; padding: 4px 7px; border-radius: 0; margin-top: 5px; }
.finding { border-left: none; padding: 4px 7px; margin: 4px 0; background: rgba(239,68,68,.06); border-radius: 0; font-size: .78rem; }
.finding-info { border-left-color: #64748b; color: var(--text-muted); background: rgba(100,116,139,.06); }
.finding summary { cursor: pointer; }
.finding-info .finding-severity { color: #64748b; }
.finding-detail { padding: 5px 4px 2px; line-height: 1.4; }
.finding-detail ul { margin: 2px 0 2px 18px; padding: 0; }
.finding-detail code { overflow-wrap: anywhere; }
.metrics-source-badge.platform { background: #334155 !important; color: #e2e8f0 !important; }
/* Discoverable OTel score explanation */
.score-help { position: relative; margin-left: 6px; font-size: .8rem; z-index: 20; }
.score-help > summary { cursor: pointer; color: var(--link, #2563eb); list-style: none; white-space: nowrap; }
.score-help > summary::-webkit-details-marker { display: none; }
.score-help-content { position: absolute; right: 0; top: calc(100% + 6px); width: min(680px, 82vw); max-height: 68vh; overflow: auto; padding: 14px 18px; border: none; border-radius: 0; background: var(--bg-panel, #fff); color: var(--text-primary, #1f2937); box-shadow: 0 8px 28px rgba(0,0,0,.2); font-size: .82rem; line-height: 1.45; }
.score-help-content h4 { margin: 10px 0 3px; font-size: .85rem; }
.score-help-content p { margin: 5px 0; }
.score-help-content ul { margin: 3px 0 8px 18px; padding: 0; }
.score-help-codes { margin-top: 7px; }
.score-help-codes > summary { cursor: pointer; font-weight: 600; }
.score-help-inline { display: block; border: none; background: none; color: var(--link, #2563eb); font-size: .75rem; cursor: pointer; padding: 0; margin: 0 0 5px; }

/* ── Admin page (/admin): the run history is the main content here, not a compact side panel ───────────────────── */
.admin-page .runs-panel { margin-top: 1.25rem; }
.admin-page .runs-panel-header { padding: 0.9rem 1.25rem; gap: 0.75rem; }
.admin-page .runs-panel-title { font-size: 1.1rem; }
.admin-page .runs-panel-last-run { font-size: 0.85rem; }
.admin-page .runs-panel-header .btn-sm { font-size: 0.85rem; padding: 0.45rem 0.9rem; }
.admin-page .run-opts { padding: 0.9rem 1.25rem; gap: 1.25rem; font-size: 0.9rem; }
.admin-page .run-opts select { font-size: 0.9rem; }
.admin-page .runs-panel-body { max-height: none; overflow: visible; padding: 1.25rem; }
.admin-page .run-history-entry { padding: 1.1rem 1.35rem; margin-bottom: 1rem; }
.admin-page .run-entry-header { gap: 0.75rem; margin-bottom: 0.6rem; font-size: 1.05rem; }
.admin-page .run-entry-month { font-size: 1.1rem; }
.admin-page .run-entry-id { font-size: 0.9rem; }
.admin-page .run-entry-dur { font-size: 0.9rem; }
.admin-page .run-entry-meta { font-size: 0.88rem; gap: 1.75rem; }
.admin-page .run-errors { margin-top: 0.85rem; }
.admin-page .run-error-item { font-size: 0.88rem; padding: 0.4rem 0; gap: 0.85rem; }
.admin-page .run-global-error { font-size: 0.9rem; padding: 0.5rem 0.75rem; }
.admin-page .runs-empty { font-size: 1rem; padding: 1.5rem 0; text-align: center; }

/* ---- former inline styles (metrics tab, observability panel, cost bar) ---- */
.metrics-msg { text-align: center; color: var(--text-muted); }
.metrics-msg-32 { padding: 32px; }
.metrics-msg-24 { padding: 24px; }
.metrics-msg-20 { padding: 20px; }
.metrics-msg-error { text-align: center; color: var(--c-red); padding: 20px; }
.obs-spinner-centered { margin: 0 auto 8px; }
.col-w56 { width: 56px; }
.col-w70 { width: 70px; }
.col-w90 { width: 90px; }
.filter-input-180 { width: 180px; }
.obs-ok { color: var(--c-green); }
.obs-off { color: var(--c-slate); }
.obs-badge-row { margin-bottom: 6px; }
.obs-issues-hint { margin-top: 6px; font-size: 0.75rem; color: var(--c-amber); }
.obs-push-right { margin-left: auto; }
.obs-muted { color: var(--text-muted); font-size: 0.8rem; }
.obs-error { color: var(--c-red); font-size: 0.8rem; }
.cost-card-warning { color: var(--clr-warning); }

/* --------------------------------------------------------------------------
   Flat surfaces: no rounded corners, no border lines. Structure comes from
   tonal steps in the background and from spacing (user requirement,
   overrides the glass-card/pill details of the design system).
   -------------------------------------------------------------------------- */
:root {
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-xl: 0;
  --surface-1: rgba(var(--bl-rgb), 0.22);
  --surface-2: rgba(var(--bl-rgb), 0.38);
  --surface-3: rgba(53, 171, 226, 0.14);
}

.loading-spinner,
.obs-spinner {
  background: linear-gradient(var(--clr-light-blue) 0 0) 0 0 / 50% 50% no-repeat, rgba(53, 171, 226, 0.18);
  animation: spin 0.8s steps(4) infinite;
}

.hub-header { box-shadow: none; }

select,
input[type="text"],
input[type="search"] {
  background-color: var(--surface-2);
}
select:hover,
input[type="text"]:hover,
input[type="search"]:hover { background-color: var(--surface-3); }
select:focus-visible,
input:focus-visible,
button:focus-visible,
a:focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 1px; }

/* Secondary buttons: filled instead of outlined */
.btn-secondary { background: var(--surface-3); box-shadow: none; }
.btn-secondary:hover { background: var(--surface-2); }

/* Tables: banded rows replace the row lines */
tbody tr:nth-child(even) { background: var(--ov-03); }
thead th { background: rgba(var(--nv-rgb), 0.85); }

.card, .stat-card, .panel, .toolbar, .tabs { box-shadow: none; }
.panel, .toolbar { background: var(--surface-1); }
.card::before { display: none; }
.btn-secondary,
.btn-secondary:hover { box-shadow: none; }

/* --------------------------------------------------------------------------
   Phase 2: context chips, summary sentence, management view
   -------------------------------------------------------------------------- */
.ctx-chip {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-strong);
  background: rgba(53, 171, 226, 0.16);
}

.summary-sentence {
  max-width: 44ch;
  margin: 0.5rem 0 1.75rem;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--text-primary);
  text-wrap: balance;
}

.mgmt-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.25rem;
  margin: 0 0 2rem;
}
.mgmt-figure {
  padding: 1rem 1.25rem;
  background: var(--surface-1);
}
.mgmt-figure-accent { background: var(--surface-3); }
.mgmt-figure dt {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.mgmt-figure dd {
  margin-top: 0.375rem;
  font-size: 1.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.mgmt-figure-accent dd { color: var(--accent-text); }

.mgmt-top h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
}
.mgmt-top-list {
  list-style: none;
  display: grid;
  gap: 0.25rem;
}
.mgmt-top-list li {
  display: grid;
  grid-template-columns: minmax(10rem, 18rem) 1fr 8rem;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1rem;
  background: var(--surface-1);
}
.mgmt-top-name { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.mgmt-top-name small { font-size: 0.8125rem; color: var(--text-secondary); }
.mgmt-top-bar { height: 0.5rem; background: var(--ov-06); }
.mgmt-top-bar i { display: block; height: 100%; background: var(--clr-light-blue); }
.mgmt-top-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

/* Platform section (management view): K8s version + image list from argocd-bff. Flat, no borders or radii. */
.pf-wrap { padding: 0 1.25rem 2rem; }
.pf { margin-top: 2.5rem; }
.pf h3 { margin-bottom: 0.75rem; font-size: 1.125rem; font-weight: 500; }
.pf-select { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.pf-version { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; padding: 1rem 1.25rem; margin-bottom: 1rem; background: var(--surface-3); }
.pf-version dt { font-size: 0.875rem; color: var(--text-secondary); }
.pf-version dd { font-size: 1.75rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.pf-version .pf-note { font-size: 0.875rem; font-weight: 400; color: var(--text-secondary); }
.pf-version .pf-ionos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; font-size: 0.875rem; font-weight: 400; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pf-ionos[data-level="info"] .pf-ionos-status { color: var(--accent-text); }
.pf-ionos[data-level="warn"] .pf-ionos-status { color: var(--clr-warning); font-weight: 600; }
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.pf-toolbar input { width: min(22rem, 100%); }
.pf-toolbar .table-count { flex: 1; }
.pf-error { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 0.875rem 1.25rem; background: var(--surface-1); color: var(--text-primary); }
.pf-table-wrap { max-height: 32rem; overflow: auto; }
.pf-repo, .pf-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8125rem; overflow-wrap: anywhere; }
.pf-apps { color: var(--text-secondary); overflow-wrap: anywhere; }
.pf-app-link { color: inherit; text-decoration: none; }
.pf-app-link:hover, .pf-app-link:focus-visible { color: var(--accent-text); text-decoration: underline; }
.pf-num { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .mgmt-top-list li { grid-template-columns: 1fr auto; }
  .mgmt-top-bar { display: none; }
}

/* --------------------------------------------------------------------------
   Phase 3: detail panel as drawer on the right edge
   -------------------------------------------------------------------------- */
.main-grid,
.main-grid:has(.right-column.hidden) {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  transition: padding-right 0.25s var(--ease);
}

.right-column,
.right-column.hidden {
  position: fixed;
  top: var(--hub-top-h, 4.5rem);
  right: 0;
  bottom: 0;
  z-index: 80;
  width: min(24rem, 100vw);
  overflow-y: auto;
  background: #16263d;
  opacity: 1;
  transition: transform 0.25s var(--ease), visibility 0s linear 0s;
}
.right-column.hidden {
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.right-column .app-detail,
.right-column .app-detail.has-content {
  position: static;
  min-height: 100%;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

@media (min-width: 1201px) {
  .main-grid:has(.right-column:not(.hidden)) { padding-right: 24.5rem; }
}

@media (max-width: 900px) {
  .right-column { width: 100vw; }
  .main-grid { padding-right: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .right-column, .right-column.hidden, .main-grid { transition: none; }
}
html, body { overflow-x: clip; }

/* --------------------------------------------------------------------------
   User menu (header, right). Flat: tonal surface, no border, no radius.
   -------------------------------------------------------------------------- */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  font: inherit;
  font-size: 0.9375rem;
  color: #ffffff;
  background: rgba(53, 171, 226, 0.12);
  cursor: pointer;
}
.user-menu-btn:hover,
.user-menu-btn[aria-expanded="true"] { background: rgba(53, 171, 226, 0.24); }
.user-avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #07264c;
  background: var(--clr-light-blue);
}
.user-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 120;
  display: flex;
  flex-direction: column;
  min-width: 15rem;
  padding: 0.375rem;
  background: #0d2a4a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.user-menu-who {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem 0.75rem;
}
.user-menu-who small { color: var(--text-secondary); font-size: 0.8125rem; overflow-wrap: anywhere; }
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.user-menu-item:hover { background: rgba(53, 171, 226, 0.12); color: var(--text-strong); }
.user-menu-sep { height: 0.5rem; }

@media (max-width: 600px) { .user-name { display: none; } }

/* --------------------------------------------------------------------------
   Phase 3/4: status icons, flat run panel, metrics tab
   -------------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.status-icon { display: inline-flex; vertical-align: middle; }
.status-icon-ok { color: var(--clr-success, #4ade80); }
.status-icon-fail { color: var(--clr-danger, #f87171); }
.status-icon-warn { color: var(--clr-warning, #f0ab00); }
.status-icon-info { color: var(--accent-text); }
.status-icon .icon { vertical-align: -0.2em; }
.metrics-td-icon { text-align: center; }

/* run panel: entries as tonal rows instead of a bare list */
.run-history-entry { padding: 0.875rem 1.25rem; margin-bottom: 0.25rem; background: var(--surface-1); }
.run-history-entry:nth-child(even) { background: var(--surface-2); }
.run-entry-header { display: flex; align-items: center; gap: 0.75rem; }
.run-opts { padding: 1rem 0.5rem; }
.runs-panel-header .btn-sm { background: var(--surface-3); color: #fff; }
.runs-panel-header .btn-sm.btn-primary { background: var(--clr-light-blue); color: #07264c; }

/* No ALL-CAPS labels: headers and captions use sentence case (status badges keep their short codes) */
th, .stat-card .label, .detail-item .label, .detail-section h4, .cost-card-label, .kpi-label,
.chart-section-title, .cluster-summary-table th, .cost-bar-section-label, .obs-section-title,
.sel-group label, .filter-group label {
  text-transform: none;
  letter-spacing: normal;
}
.score-help > summary { color: var(--accent-text); }
.score-help-content { background: #0d2a4a; color: var(--text-primary); }

/* Drawer: hidden = not rendered (a translated fixed box would widen full-page captures); slide-in via animation */
.right-column.hidden { display: none; }
.right-column:not(.hidden) { animation: drawer-in 0.25s var(--ease); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .right-column:not(.hidden) { animation: none; } }
.oom-dot { display: inline-block; width: 0.625rem; height: 0.625rem; vertical-align: baseline; }
.oom-dot-red { background: var(--clr-danger); }
.oom-dot-yellow { background: var(--clr-warning); }

/* Buttons: flat everywhere – no native frame, no glow, no lift; hover/active only change the tone */
button { border: 0; border-radius: 0; }
.btn, .btn-primary, .btn-secondary, .btn-destructive,
.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-destructive:hover { box-shadow: none; transform: none; }
.btn-primary { background: var(--clr-dark-blue); }
.btn-primary:hover { background: #135a8a; }
.btn-primary:active { background: #0a3a5c; }
.btn-secondary:active { background: var(--surface-1); }
.btn-destructive { background: #9d599f; }
.btn-destructive:hover { background: #b06bb2; }
.stat-card.stat-active { box-shadow: none; background: rgba(53, 171, 226, 0.22); }
:where(button, a, select, input):focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 0; }

/* ==========================================================================
   Phase 5: layout – fixed side navigation + quiet page bar (replaces the top header)
   ========================================================================== */
:root { --side-w: 15rem; }

.hub-top { position: sticky; top: 0; z-index: 110; }

.side-nav {
  position: fixed;
  top: var(--hub-top-h, 0px);
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  width: var(--side-w);
  padding: 1.5rem 0.75rem 1rem;
  box-sizing: border-box;
  background: var(--side-bg, rgba(7, 38, 76, 0.62));
  overflow-y: auto;
}
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0 0.5rem 1.5rem; }
.side-brand .wordmark { font-size: 1.375rem; }
.side-nav .tabs {
  position: static;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.side-nav .tab { padding: 0.75rem 1rem; font-size: 1rem; }
.side-nav .tab.active { background: var(--clr-light-blue); color: #07264c; font-weight: 500; }
.side-nav .tab:hover:not(.active) { background: rgba(53, 171, 226, 0.14); }
.side-link { text-decoration: none; }
.side-foot { display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; margin-top: auto; }
.side-foot .hub-exx-link { padding: 0 0.5rem; }
.side-foot .user-menu-btn { width: 100%; background: rgba(53, 171, 226, 0.12); }
.side-foot .user-name { flex: 1; text-align: left; max-width: none; }
.side-foot .user-menu-list { top: auto; bottom: calc(100% + 0.25rem); left: 0; right: 0; min-width: 0; }

/* content area: everything except the fixed chrome sits right of the navigation */
.container > :not(.hub-top):not(.side-nav) { margin-left: var(--side-w); }
.container #main-content { width: auto; margin-left: var(--side-w); }

.page-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  padding: 1.25rem var(--page-pad) 0.25rem;
  background: transparent;
}
.page-title { margin: 0; font-size: 1.75rem; font-weight: 300; color: var(--text-strong); }
.page-bar-right { display: flex; align-items: center; gap: 0.75rem; }

.side-link {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem;
  font-size: 1rem; color: rgba(255, 255, 255, 0.8); text-decoration: none;
}
.side-link:hover { background: rgba(53, 171, 226, 0.14); color: var(--text-strong); }
.tools-nav { display: flex; flex-direction: column; padding: 1rem 0 0; }
.tools-nav-title { padding: 0 1rem 0.375rem; font-size: 0.8125rem; color: var(--text-secondary); }
.tools-nav-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.375rem 1rem; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.75); text-decoration: none; }
.tools-nav-item:hover { background: rgba(53, 171, 226, 0.14); color: var(--text-strong); }
@media (max-width: 1100px) { .tools-nav { display: none; } }

/* selectors: a plain row under the title instead of a boxed bar */
.toolbar { background: transparent; padding: 0.75rem var(--page-pad) 1rem; margin-top: 0; margin-bottom: 0.5rem; }

.left-column { grid-template-columns: minmax(0, 1fr); }
.main-grid .left-column { grid-template-columns: minmax(0, 1fr); }
.app-detail { top: var(--hub-top-h, 0px); }

/* narrow: the navigation folds into an icon rail */
@media (max-width: 1100px) {
  :root { --side-w: 3.75rem; }
  .side-nav { padding: 1rem 0.25rem; align-items: center; }
  .side-brand { padding: 0 0 1rem; }
  .side-brand .wordmark, .side-foot .hub-exx-link, .side-foot .user-name { display: none; }
  .side-nav .tab { justify-content: center; padding: 0.75rem 0; }
  .tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .side-foot .user-menu-btn { padding: 0.25rem; }
  .side-foot .user-menu-list { left: 0; right: auto; min-width: 14rem; }
}

/* with the drawer open the page bar and selectors leave room for it as well */
@media (min-width: 1201px) {
  body:has(.right-column:not(.hidden)) .page-bar,
  body:has(.right-column:not(.hidden)) .toolbar,
  body:has(.right-column:not(.hidden)) .run-status-bar { margin-right: 24rem; }
}
@media (max-width: 900px) {
  .tabs { flex-direction: column; overflow-x: visible; padding: 0; }
  .tab { width: 100%; }
}

.toolbar-selectors select, .toolbar-selectors input[type="text"] { min-width: 120px; }

/* toolbar controls share one height so the row lines up (inputs otherwise render 2px taller than selects) */
.toolbar-selectors select,
.toolbar-selectors input[type="text"] { box-sizing: border-box; height: 28px; }

/* Container chips of a pod row (Metrics tab) */
.pod-chip { display: inline-block; margin-left: 8px; padding: 1px 6px; font-size: 11px; background: var(--ov-08); color: var(--text-muted, #9fb0c3); white-space: nowrap; }

/* ==========================================================================
   Bericht-Tab (src/features/report): A4-Vorschau und Druck. Papier ist hell, unabhängig vom dunklen Hub.
   ========================================================================== */
.report-wrap { padding: 0 var(--page-pad, 1.5rem) 2rem; }
.report-layout { display: flex; align-items: flex-start; gap: 1.25rem; }
.report-layout > .report-preview { flex: 1 1 auto; min-width: 0; }
/* Methodik-Seitenleiste „So wird gerechnet“: nur Bildschirm, nie im Druck/PDF */
@media print { .report-method, #btn-report-method { display: none !important; } .report-layout { display: block !important; } }
.report-preview { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; overflow-x: auto; padding-bottom: 1rem; }

.report-page {
  --rp-ink: #1b2a41; --rp-muted: #5b6778; --rp-line: #d5dbe5; --rp-blue: #2f6fb5;
  width: 210mm; height: 297mm; flex: none; position: relative; overflow: hidden; background: #fff; color: var(--rp-ink);
  font-family: 'DIN OT', 'Noto Sans', 'DejaVu Sans', sans-serif; /* DIN OT = lokale Systemschrift, Fallback siehe CLAUDE.md */ font-size: 9.6pt; line-height: 1.4; box-shadow: 0 2px 14px rgba(0,0,0,.45);
  -webkit-print-color-adjust: exact; print-color-adjust: exact; box-sizing: border-box;
}
.report-page *, .report-page *::before, .report-page *::after { box-sizing: border-box; }
.report-page .rp-hdr { position: absolute; top: 0; left: 0; right: 0; height: 15mm; padding: 0 14mm; display: flex; align-items: center; justify-content: space-between; border-bottom: .35mm solid var(--rp-line); font-size: 7.8pt; color: var(--rp-muted); }
.report-page .rp-brand { font-weight: 700; color: var(--rp-ink); font-size: 9.5pt; }
.report-page .rp-brand i { color: var(--rp-blue); font-style: normal; }
.report-page .rp-ftr { position: absolute; bottom: 0; left: 0; right: 0; height: 11mm; padding: 0 14mm; display: flex; align-items: center; justify-content: space-between; border-top: .35mm solid var(--rp-line); font-size: 7.5pt; color: var(--rp-muted); }
.report-page .rp-content { position: absolute; top: 19mm; bottom: 14mm; left: 14mm; right: 14mm; overflow: hidden; }
.report-page .rp-content.rp-content-cover { top: 0; left: 0; right: 0; padding: 0 14mm; }
.report-page h1 { font-size: 22pt; margin: 12mm 0 1mm; color: #fff; }
.report-page h2 { font-size: 13pt; margin: 0 0 2.5mm; display: flex; align-items: baseline; gap: 3mm; color: var(--rp-ink); }
.report-page h2 small { font-size: 8pt; font-weight: 400; color: var(--rp-muted); }
.report-page h3 { font-size: 10.5pt; margin: 6mm 0 2.4mm; color: var(--rp-ink); border-left: 1.2mm solid var(--rp-blue); padding-left: 2mm; }
.report-page p { margin: 0 0 2mm; }
.report-page .rp-muted { color: var(--rp-muted); }
.report-page .rp-small { font-size: 8pt; }
.report-page .rp-na { color: #8a94a3; font-style: italic; }
.report-page .rp-more { margin: 1mm 0 0; font-size: 7.5pt; }
.report-page.rp-overflow { outline: 2px solid #d33; }
.report-page .rp-banner { background: linear-gradient(120deg, #1b2a41, #2f6fb5); color: #fff; margin: 0 -14mm 6mm; padding: 14mm 14mm 9mm; }
.report-page .rp-banner .rp-brand { color: #fff; font-size: 11pt; letter-spacing: .3mm; }
.report-page .rp-banner .rp-brand i { color: #8fc1ff; }
.report-page .rp-sub { font-size: 10pt; opacity: .9; }
.report-page .rp-sub-s { font-size: 8.5pt; opacity: .8; margin-top: 2mm; }
.report-page .rp-grid { display: grid; gap: 4mm; margin-bottom: 3mm; }
.report-page .rp-g2 { grid-template-columns: 1fr 1fr; } .report-page .rp-g3 { grid-template-columns: 1fr 1fr 1fr; } .report-page .rp-g4 { grid-template-columns: repeat(4, 1fr); }
.report-page .rp-grid > div { min-width: 0; }
.report-page .rp-tile { border: .3mm solid var(--rp-line); border-radius: 2mm; padding: 2.6mm 3mm; background: #fafbfd; min-height: 27mm; }
.report-page .rp-tile.rp-hl { border-left: 1.6mm solid var(--c); }
.report-page .rp-l { font-size: 7.3pt; color: var(--rp-muted); text-transform: uppercase; letter-spacing: .2mm; }
.report-page .rp-v { font-size: 22pt; font-weight: 700; line-height: 1.15; margin-top: .5mm; }
.report-page .rp-v-sm { font-size: 15pt; margin: 0; }
.report-page .rp-s { font-size: 7.3pt; color: var(--rp-muted); margin-top: .5mm; }
.report-page .rp-tile { min-width: 0; }
/* Health-Ampel: Teilbereiche umbrechen zeilenweise (Flex-Wrap), nie breiter als die Kachel; lange Beschriftungen brechen selbst um. */
.report-page .rp-parts { display: flex; flex-wrap: wrap; gap: .4mm 3mm; font-size: 7.3pt; color: var(--rp-muted); margin-top: 1.2mm; line-height: 1.5; min-width: 0; }
.report-page .rp-parts > span { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.report-page .rp-parts > span > .rp-dot { margin-right: 1.2mm; }
.report-page .rp-tile .rp-row { flex-wrap: wrap; gap: 1.5mm 3mm; min-width: 0; }
.report-page .rp-tile .rp-v-sm { min-width: 0; overflow-wrap: anywhere; }
.report-page .rp-dot { display: inline-block; width: 2.6mm; height: 2.6mm; border-radius: 50%; margin-right: 1.2mm; vertical-align: middle; flex: none; }
.report-page .rp-dot.rp-big { width: 9mm; height: 9mm; margin: 0; }
.report-page .rp-row { display: flex; gap: 4mm; align-items: center; }
.report-page .rp-legend { display: flex; flex-direction: column; gap: 1mm; font-size: 8pt; }
.report-page .rp-callout { border-left: 1.4mm solid var(--c, var(--rp-blue)); background: #f3f6fb; padding: 3.4mm 4mm; border-radius: 1mm; margin: 2.5mm 0; }
.report-page table.rp-t { width: 100%; border-collapse: collapse; font-size: 8.6pt; margin-bottom: 1.5mm; }
.report-page .rp-t th { background: #eaeff6; text-align: left; padding: 1.5mm 1.8mm; font-weight: 700; color: #33415a; border-bottom: .3mm solid #c9d1dc; vertical-align: bottom; }
.report-page .rp-t td { padding: 1.4mm 1.8mm; border-bottom: .2mm solid #e3e8ef; vertical-align: middle; }
.report-page .rp-t.rp-dense td { padding: .7mm 1.4mm; font-size: 7.6pt; }
.report-page .rp-t.rp-dense th { font-size: 7.1pt; padding: .9mm 1.4mm; }
.report-page .rp-t td:first-child { overflow-wrap: anywhere; }
.report-page .rp-t .rp-num { text-align: right; font-variant-numeric: tabular-nums; }
.report-page .rp-t .rp-ctr { text-align: center; }
.report-page ul.rp-rec { margin: 0; padding: 0; list-style: none; }
.report-page ul.rp-rec li { display: flex; gap: 2.4mm; padding: 2.4mm 0; border-bottom: .2mm solid #e3e8ef; align-items: flex-start; }
.report-page ul.rp-rec .rp-dot { margin-top: 1.4mm; }
.report-page .rp-chart svg { display: block; }

/* Druck: nur die Berichtsseiten, A4 ohne Rand, jede Seite auf einem Blatt. Gilt für „Als PDF“ und die Print-Route (#report?…&print=1).
   Zwei @page-Regeln: die benannte (`page: report`) wird nicht von jedem Browser (Firefox/Safari je nach Version) ausgewertet, dann
   würden Standard-Ränder und Papierformat des Druckdialogs gelten und neben der A4-Seite bliebe weißer Rand. Die unbenannte gilt für alle
   Seiten des Dokuments; im Druck zeigt der Hub ausschließlich den Bericht, ihre Wirkung beschränkt sich daher auf diesen. */
@page { size: A4; margin: 0; }
@page report { size: A4; margin: 0; }
.report-page { page: report; }
/* Die unbenannte @page-Regel (Rand 0) gilt auch für das Drucken anderer Tabs: Ersatzrand am Body. */
@media print { body:not(.report-print-active) { padding: 10mm; } }
@media print {
  html:has(body.report-print-active), body.report-print-active { width: 210mm !important; min-width: 0 !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  body.report-print-active, body.report-print-active .container { background: #fff !important; }
  body.report-print-active .container { width: 210mm !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  body.report-print-active .container > :not(.report-wrap) { display: none !important; }
  body.report-print-active .container > .report-wrap { margin: 0 !important; }
  body.report-print-active .report-wrap { width: 210mm; max-width: none; margin: 0; padding: 0; }
  body.report-print-active #mock-auth-banner { display: none !important; }
  body.report-print-active #report-overflow,
  body.report-print-active .report-toolbar, body.report-print-active #report-hint, body.report-print-active #report-loading { display: none !important; }
  body.report-print-active .report-preview { display: block; overflow: visible; width: 210mm; max-width: none; margin: 0; padding: 0; }
  body.report-print-active .report-page { box-shadow: none; margin: 0; width: 210mm; height: 297mm; max-width: none; break-after: page; page-break-after: always; break-inside: avoid; }
  body.report-print-active .report-page:last-child { break-after: auto; page-break-after: auto; }
}

/* Print-Route (#report?…&print=1) am Bildschirm: nur die Seiten, ohne Hub-Chrome */
body.report-print-only .container > :not(.report-wrap) { display: none !important; }
body.report-print-only .container > .report-wrap { margin-left: 0 !important; }
body.report-print-only .report-toolbar, body.report-print-only .report-method { display: none !important; }

/* Components tab: orphaned Applications */
.orphans h3 { display: flex; align-items: baseline; gap: 0.75rem; }
.orphans .pf-note { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 0.75rem; }
.orphan-cmd { white-space: nowrap; }
.orphan-cmd code, .orphan-name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8125rem; }
.orphan-cmd code { margin-right: 0.5rem; user-select: all; }
.orphan-parent, .orphan-reason { color: var(--text-secondary); overflow-wrap: anywhere; }
.origin-summary { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.origin-card { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.625rem 0.875rem; min-width: 11rem; border: 1px solid var(--border-default); border-radius: 6px; }
.origin-card .origin-num { font-size: 1.5rem; font-weight: 600; }
.origin-card .origin-label { font-weight: 600; }
.origin-card .origin-hint { color: var(--text-secondary); font-size: 0.8125rem; }
.origin-card[data-alert="true"] { border-color: var(--c-red); background: var(--st-fail-bg); }
.origin-card[data-alert="true"] .origin-num { color: var(--c-red); }
.origin-card-quiet .origin-num { font-size: 1.125rem; font-weight: 500; color: var(--text-secondary); }
.origin-h { margin: 1rem 0 0.25rem; }
.origin-filter { display: flex; gap: 0.5rem; align-items: center; margin-top: 1rem; font-size: 0.875rem; }
.origin-by { color: var(--text-secondary); margin-left: 0.5rem; font-size: 0.8125rem; }
.origin-group h5 { margin: 0.75rem 0 0; }
.orphans-hints { margin-top: 1rem; color: var(--text-secondary); }
.orphans-hints summary { cursor: pointer; }
.orphans-hints ul { margin: 0.5rem 0 0 1.25rem; font-size: 0.875rem; }

/* next prod release badge (page bar, right) */
.next-release { display: inline-flex; align-items: center; gap: 0.5rem; max-width: 60%; padding: 0.25rem 0.75rem; font-size: 0.8125rem; color: var(--text-secondary); text-decoration: none; border: 1px solid var(--ov-14); border-left: 3px solid var(--nr-accent, var(--clr-info)); border-radius: 4px; white-space: nowrap; overflow: hidden; }
.next-release:hover { background: var(--st-info-bg); color: var(--text-strong); }
.next-release-icon { flex: none; color: var(--nr-accent, var(--clr-info)); }
.next-release-label { color: var(--text-secondary); }
.next-release-msg { overflow: hidden; text-overflow: ellipsis; }
@media print { .next-release { display: none; } }


/* Bericht: laufende Neuberechnung (Fortschrittsbalken) */
@media print { .report-progress, #report-failed-with-report, #report-recalc-running, #report-recalc-done, #report-recalc-error { display: none !important; } }


/* ==========================================================================
   Design-Politur (Berichte, Methodik, Hinweise). Richtung: „Messprotokoll“ — ruhige Marineflächen, genau ein leuchtender Akzent (Hellblau)
   für Zustand und Aktion, Status nur über eine gemeinsame Pille/Karte, Zahlen tabellarisch.
   Regeln: Abstände auf 4-px-Raster (--sp-*), Status-Text immer mit Icon, Kontrast >= AA auf --bg-base.
   ========================================================================== */
:root {
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem;
  /* Statusfarben als Text/Icon auf dunklem Grund (>= 4.5:1 auf --bg-base) und als Flächentönung */
  --st-ok: #6fdc8c;     --st-ok-bg: rgba(80, 200, 80, 0.14);
  --st-warn: #ecc45f;   --st-warn-bg: rgba(200, 160, 50, 0.16);
  --st-fail: #ff9a9a;   --st-fail-bg: rgba(200, 50, 50, 0.18);
  --st-info: #6cc6f0;   --st-info-bg: rgba(53, 171, 226, 0.14);
  --st-neutral: rgba(234, 234, 234, 0.78); --st-neutral-bg: rgba(255, 255, 255, 0.08);
  --surface-solid: #14233b;   /* deckende Fläche für Drawer/Overlays (nie halbtransparent über Inhalt) */
  --surface-card: rgba(20, 35, 59, 0.72);
}

/* Status-Pille (ui/StatusBadge.vue) */
.badge { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; line-height: 1.4; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--st-neutral); background: var(--st-neutral-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.badge .icon { flex: none; }
.badge-ok { color: var(--st-ok); background: var(--st-ok-bg); box-shadow: inset 0 0 0 1px rgba(111, 220, 140, 0.35); }
.badge-warn { color: var(--st-warn); background: var(--st-warn-bg); box-shadow: inset 0 0 0 1px rgba(236, 196, 95, 0.4); }
.badge-fail { color: var(--st-fail); background: var(--st-fail-bg); box-shadow: inset 0 0 0 1px rgba(255, 154, 154, 0.4); }
.badge-info { color: var(--st-info); background: var(--st-info-bg); box-shadow: inset 0 0 0 1px rgba(108, 198, 240, 0.4); }

/* Hinweiskarte (ui/NoticeCard.vue): Icon links, Titel + Erklärung + Aktion rechts daneben */
.notice { --nc: var(--st-info); display: flex; gap: var(--sp-4); align-items: flex-start; max-width: 42rem; margin: 0 0 var(--sp-4); padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-4); background: var(--surface-card); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-default), inset 3px 0 0 var(--nc); }
.notice-warn { --nc: var(--st-warn); }
.notice-fail { --nc: var(--st-fail); }
.notice-icon { flex: none; display: inline-flex; margin-top: 0.1rem; color: var(--nc); }
.notice-body { min-width: 0; flex: 1; }
.notice-body > * + * { margin-top: var(--sp-2); }
.notice-title { margin: 0; font-size: 1.0625rem; font-weight: 500; line-height: 1.35; color: var(--text-strong); }
.notice-body p { color: var(--text-primary); line-height: 1.4; }
.notice-body .report-hint, .notice-body .report-progress-text { color: var(--text-secondary); font-size: 0.875rem; }
.notice-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; padding-top: var(--sp-1); }
.notice .report-error { color: var(--st-fail); }
.notice-fail .notice-title, .notice-fail .report-progress-title { color: var(--st-fail); }
.report-progress-title { font-weight: 500; color: var(--text-strong); }

/* Berichts-Werkzeugleiste: Variante als Segment, Info als Pille, Aktionen rechts */
.report-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: center; margin: var(--sp-2) 0 var(--sp-4); }
.report-variants { display: inline-flex; box-shadow: inset 0 0 0 1px var(--clr-light-blue); }
.report-variants .btn { box-shadow: none; }
.report-variants .btn + .btn { box-shadow: inset 1px 0 0 var(--clr-light-blue); }
.report-variants .btn:hover { transform: none; }
.report-toolbar .btn.active { background: var(--clr-light-blue); color: #07264c; box-shadow: none; }
.report-variants .btn.active + .btn { box-shadow: none; }
.report-pages-info { color: var(--text-secondary); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.report-toolbar #btn-report-pdf { margin-left: auto; }
.report-error { color: var(--st-fail); }

/* Fortschritt: ruhig, Phase und Prozent gleichrangig lesbar */
.report-progress { max-width: 42rem; }
.report-progress-bar { height: 0.375rem; border-radius: 999px; background: var(--ov-14); overflow: hidden; position: relative; }
.report-progress-fill { height: 100%; border-radius: 999px; background: var(--clr-light-blue); transition: width 0.4s var(--ease); }
.report-progress-bar.indeterminate .report-progress-fill { position: absolute; width: 35%; animation: report-progress-slide 1.6s ease-in-out infinite; }
.report-progress-text { margin: var(--sp-2) 0 0; font-size: 0.875rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.report-progress-text #report-progress-phase { color: var(--text-primary); font-weight: 500; }
.report-progress-text #report-progress-percent { color: var(--st-info); font-weight: 500; }
@keyframes report-progress-slide { 0% { left: -35%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .report-progress-bar.indeterminate .report-progress-fill { animation: none; width: 100%; opacity: 0.5; }
  .report-progress-fill { transition: none; }
}

/* Methodik-Seitenleiste: deckend, Kopf + Inhaltsverzeichnis bleiben beim Lesen stehen */
.report-method { flex: 0 0 25rem; width: 25rem; position: sticky; top: var(--sp-2); max-height: calc(100vh - 1rem); overflow-y: auto; padding: 0 var(--sp-5) var(--sp-5); background: var(--surface-solid); color: var(--text-primary); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-strong); font-size: 0.9375rem; line-height: 1.6; scroll-padding-top: 8rem; }
.report-method:focus { outline: none; }
.report-method:focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 2px; }
.report-method-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4) 0 var(--sp-2); background: var(--surface-solid); }
.report-method-head h2 { margin: 0; font-size: 1.25rem; font-weight: 400; color: var(--text-strong); line-height: 1.3; }
.report-method-sub { margin: 0; color: var(--text-secondary); font-size: 0.875rem; }
.report-method-toc { position: sticky; top: 4.1rem; z-index: 2; margin: 0 calc(var(--sp-5) * -1); padding: 0 var(--sp-5) var(--sp-3); background: var(--surface-solid); box-shadow: 0 1px 0 var(--divider); }
.report-method-toc ul { list-style: none; margin: 0; padding: 0 0 var(--sp-1); display: flex; flex-wrap: nowrap; gap: var(--sp-2); overflow-x: auto; scrollbar-width: thin; }
.report-method-toc a { flex: none; white-space: nowrap; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; color: var(--st-info); text-decoration: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.report-method-toc a:hover { background: var(--st-info-bg); color: var(--text-strong); }
.report-method-sec { padding: var(--sp-5) 0 var(--sp-1); }
.report-method-sec + .report-method-sec { border-top: 1px solid var(--divider); margin-top: var(--sp-4); }
.report-method-sec h3 { margin: 0 0 var(--sp-2); font-size: 1.0625rem; font-weight: 500; color: var(--text-strong); line-height: 1.35; }
.report-method-sec p { margin: 0 0 var(--sp-2); max-width: 36em; }
.report-method-rules { margin: var(--sp-2) 0; padding-left: var(--sp-3); border-left: 2px solid var(--border-strong); }
.report-method-rules dt { font-weight: 500; color: var(--text-strong); margin-top: var(--sp-2); }
.report-method-rules dt:first-child { margin-top: 0; }
.report-method-rules dd { margin: 0; color: var(--text-secondary); }
.report-method-example { color: var(--text-secondary); font-style: italic; }
.report-method-jump { background: none; border: 0; padding: var(--sp-1) 0; margin-top: var(--sp-1); color: var(--st-info); cursor: pointer; font: inherit; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.2em; }
.report-method-jump:hover { color: var(--text-strong); }
.report-method-jump:focus-visible, .report-method-toc a:focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 2px; }
/* Schmal: Drawer unter der festen Kopfleiste (Umgebungsbanner/Next-Release bleiben sichtbar), deckender Grund */
@media (max-width: 1500px) {
  .report-method { position: fixed; top: var(--hub-top-h, 0px); right: 0; bottom: 0; max-height: none; width: min(26rem, 100vw); border-radius: 0; z-index: 60; box-shadow: inset 1px 0 0 var(--border-strong), -8px 0 24px rgba(0, 0, 0, 0.55); }
}
@media print { .report-wrap .notice { display: none !important; } }

/* Berichtsseiten (A4): nur Verfeinerung, keine Höhen-/Seitenwechseländerung. Tabellen mit Zebra, Zahlen tabellarisch, Kacheln ohne Leerraum */
.report-page .rp-tile { min-height: 23mm; }
.report-page .rp-t tbody tr:nth-child(even) td { background: #f7f9fc; }
.report-page .rp-t td, .report-page .rp-t th { font-variant-numeric: tabular-nums; }
.report-page .rp-t th { letter-spacing: 0.02em; }
.report-page .rp-l { letter-spacing: 0.25mm; }
.report-page .rp-callout { border-radius: 0 1.2mm 1.2mm 0; }

/* Stabilität: nichts springt beim Umschalten. Pille „nur intern“ und Seitenzahl wandern nicht mit, Vorschau bleibt links (wie Werkzeugleiste und Karten),
   Hinweise neben einem vorhandenen Bericht sind kompakte Zeilen statt hoher Karten. */
.report-toolbar .report-badge-intern { order: 8; margin-left: auto; }
.report-toolbar #btn-report-pdf { order: 9; margin-left: var(--sp-2); }
.report-toolbar .report-badge-intern:not(:first-child) ~ #btn-report-pdf { margin-left: var(--sp-2); }
.report-toolbar:not(:has(.report-badge-intern)) #btn-report-pdf { margin-left: auto; }
.report-pages-info { min-width: 4.5rem; }
.report-preview { align-items: flex-start; }
.report-progress, #report-failed-with-report, #report-recalc-error, #report-overflow { max-width: none; padding: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); align-items: center; }
.report-progress .notice-body, #report-failed-with-report .notice-body, #report-recalc-error .notice-body, #report-overflow .notice-body { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); }
.report-progress .notice-body > *, #report-failed-with-report .notice-body > *, #report-recalc-error .notice-body > *, #report-overflow .notice-body > * { margin-top: 0; }
.report-progress .report-progress-bar { flex: 1 1 14rem; min-width: 10rem; }
.report-progress > .notice-body > div { flex: 1 1 24rem; }
.notice-actions { padding-top: 0; }

/* --------------------------------------------------------------------------
   Flotte (features/platform/FleetView.vue): Ansichtswahl, Versionsleiter, Clustertabelle
   Die Leiter ist das eine Gestaltungselement: je Kubernetes-Minor im Einsatz eine Sprosse, Balken = Anzahl Cluster,
   Farbe + Text = Urteil gegen IONOS. Alles andere bleibt ruhig (Tabelle wie die Imageliste).
   -------------------------------------------------------------------------- */
.pf-view { display: inline-flex; height: 36px; box-sizing: border-box; margin-bottom: var(--sp-4); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--border-default); overflow: hidden; }
.pf-view-btn { padding: 0 var(--sp-4); background: transparent; color: var(--text-secondary); border: 0; font: inherit; font-size: 0.875rem; cursor: pointer; }
.pf-view-btn + .pf-view-btn { box-shadow: inset 1px 0 0 var(--border-default); }
.pf-view-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text-primary); font-weight: 600; }
.pf-view-btn:hover { color: var(--text-primary); }
.pf-view-btn:focus-visible, .fl-rung-btn:focus-visible, .fl th:focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 2px; }

.fl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-4); }
.fl-summary { font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; margin: 0; }
.fl-summary[data-outdated="0"] { color: var(--st-ok); }
.fl-hint { margin: 0; }

.fl-ladder { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: grid; gap: var(--sp-1); max-width: 46rem; }
.fl-rung-btn { display: grid; grid-template-columns: 4rem minmax(6rem, 1fr) 2.25rem minmax(7rem, 11rem); align-items: center; gap: var(--sp-3); width: 100%; padding: var(--sp-2) var(--sp-3); background: transparent; color: var(--text-primary); border: 0; border-radius: var(--radius-sm); font: inherit; text-align: left; cursor: pointer; }
.fl-rung-btn:hover:not(:disabled) { background: var(--surface-1); }
.fl-rung-btn[aria-pressed="true"] { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.fl-rung-btn:disabled { cursor: default; }
.fl-rung { --lv: var(--st-neutral); }
.fl-rung[data-level="ok"] { --lv: var(--st-ok); }
.fl-rung[data-level="info"] { --lv: var(--st-info); }
.fl-rung[data-level="warn"] { --lv: var(--st-warn); }
.fl-rung-ver { font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.fl-rung-track { height: 0.75rem; background: var(--surface-1); border-radius: 2px; overflow: hidden; }
.fl-rung-bar { display: block; height: 100%; min-width: 2px; background: var(--lv); }
.fl-rung[data-empty] .fl-rung-bar { background: transparent; box-shadow: inset 0 0 0 1px var(--lv); min-width: 100%; opacity: 0.55; }
.fl-rung-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fl-rung-note { font-size: 0.8125rem; color: var(--lv); }

.fl-toolbar select { max-width: 14rem; }
.fl-scroll { overflow-x: auto; }
.fl-cluster { font-weight: 600; text-align: left; white-space: nowrap; }
.fl-tenants { max-width: 22rem; }
.fl-tenant { display: inline-block; margin: 0 var(--sp-1) var(--sp-1) 0; padding: 0 var(--sp-2); font-size: 0.8125rem; border-radius: 3px; background: var(--surface-3); }
.fl-tenant-platform { background: transparent; box-shadow: inset 0 0 0 1px var(--border-default); color: var(--text-secondary); }
.fl-none { color: var(--text-muted); }
.fl-ver { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-minor { font-size: 1rem; font-weight: 600; }
.fl-patch { color: var(--text-muted); }
.fl-verdict { white-space: nowrap; }
.fl-verdict-text { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--text-secondary); white-space: normal; max-width: 18rem; }
.fl-col-act { text-align: right; white-space: nowrap; }
.fl-detail > td { padding: 0; background: var(--surface-1); }
.fl-detail-body { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.fl-detail-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.fl-detail-bar .pf-note { margin: 0; max-width: 46rem; }
.fl-fresh-sum { margin: 0 0 var(--sp-2); font-size: 0.875rem; color: var(--text-secondary); }
.fl-fresh-table td, .fl-fresh-table th { vertical-align: middle; }
.fl-fresh-all { margin-top: var(--sp-5); }
.fl-subhead { font-size: 1.125rem; font-weight: 500; margin: 0 0 var(--sp-3); }

@media (max-width: 900px) {
  .fl-rung-btn { grid-template-columns: 3.25rem minmax(4rem, 1fr) 2rem; }
  .fl-rung-note { grid-column: 1 / -1; padding-left: calc(3.25rem + var(--sp-3)); }
  .fl-summary { font-size: 1.25rem; }
}

/* ---- Admin: Berichte (alle Tenants) ---------------------------------------------------------------------------------------------- */
.ar { margin: var(--sp-5) var(--page-pad) var(--sp-6); }
/* Direkt unter .container überschreibt `.container > :not(…)` (Seitenleisten-Versatz) den Rand: Versatz + Seitenabstand ausdrücklich setzen */
.container > .ar.ar { margin-left: calc(var(--side-w) + var(--page-pad)); margin-right: var(--page-pad); }
.ar-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-3); }
.ar-title { margin: 0; font-size: 1.375rem; font-weight: 500; color: var(--text-strong); }
.ar-sentence { margin: 0; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.ar-strip { margin-bottom: var(--sp-4); }
.ar-strip-bar { display: flex; gap: 2px; height: 0.5rem; background: var(--surface-1); }
.ar-bar { flex-basis: 0; min-width: 6px; }
.ar-bar-ok { background: var(--st-ok); } .ar-bar-info { background: var(--st-info); } .ar-bar-warn { background: var(--st-warn); } .ar-bar-fail { background: var(--st-fail); }
.ar-strip-keys { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.ar-key { --kc: var(--st-neutral); display: inline-flex; align-items: baseline; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3); font: inherit; color: var(--text-primary); background: var(--surface-1); border: 0; border-left: 3px solid var(--kc); cursor: pointer; }
.ar-key:hover { background: var(--surface-2); }
.ar-key.active { background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--kc); }
.ar-key-ok { --kc: var(--st-ok); } .ar-key-info { --kc: var(--st-info); } .ar-key-warn { --kc: var(--st-warn); } .ar-key-fail { --kc: var(--st-fail); }
.ar-key-n { font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.ar-key-l { color: var(--text-secondary); font-size: 0.875rem; }
.ar-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.ar-field { display: flex; flex-direction: column; gap: var(--sp-1); }
.ar-field select, .ar-field .combo-btn { height: 2.5rem; box-sizing: border-box; line-height: 1.2; }
.ar-field-l { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.combo { position: relative; min-width: 14rem; }
.combo-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); width: 100%; box-sizing: border-box; font-family: var(--font-family); font-size: 0.9rem; color: var(--text-primary); background: var(--surface-2); border: none; border-radius: 0; padding: 0.5625rem 0.875rem; text-align: left; cursor: pointer; }
.combo-btn:hover { background: var(--surface-3); }
.combo-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-caret { color: var(--clr-light-blue); font-size: 0.8rem; }
.combo-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; max-width: 24rem; background: var(--surface-solid); border: 1px solid var(--surface-3); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); padding: var(--sp-2); }
.combo-filter { width: 100%; box-sizing: border-box; margin-bottom: var(--sp-2); }
.combo-list { list-style: none; margin: 0; padding: 0; max-height: 16rem; overflow-y: auto; }
.combo-opt { padding: var(--sp-1) var(--sp-2); border-radius: 4px; cursor: pointer; }
.combo-opt.active { background: var(--surface-2); }
.combo-opt.selected { font-weight: 600; }
.combo-none { padding: var(--sp-1) var(--sp-2); color: var(--text-secondary); }
.ar-spacer { flex: 1 1 0; }
.ar-batchline { margin: 0 0 var(--sp-3); color: var(--st-info); font-variant-numeric: tabular-nums; }
.ar-tablewrap { overflow-x: auto; }
.ar-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.ar-table th, .ar-table td { padding: var(--sp-2) var(--sp-2); text-align: left; vertical-align: middle; }
.ar-table td { border-top: 1px solid var(--divider); }
.ar-row { box-shadow: inset 3px 0 0 transparent; }
.ar-row-fail { box-shadow: inset 3px 0 0 var(--st-fail); }
.ar-row-warn { box-shadow: inset 3px 0 0 var(--st-warn); }
.ar-row-info { box-shadow: inset 3px 0 0 var(--st-info); }
.ar-sort { all: unset; cursor: pointer; display: inline-flex; gap: var(--sp-1); font-weight: 500; }
.ar-sort:focus-visible { outline: 2px solid var(--clr-light-blue); outline-offset: 2px; }
.ar-sort-i { font-size: 0.65rem; min-width: 0.75rem; }
.ar-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ar-tenant-n { font-weight: 500; color: var(--text-strong); }
.ar-tag { margin-left: var(--sp-2); padding: 0 var(--sp-2); font-size: 0.75rem; color: var(--text-secondary); background: var(--surface-1); white-space: nowrap; }
.ar-tag-own { color: var(--st-info); }
.ar-month, .ar-date, .ar-schema { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ar-status { min-width: 11rem; max-width: 15rem; }
.ar-tenant { min-width: 7rem; }
.ar-why { margin-left: var(--sp-2); color: var(--st-fail); font-size: 0.875rem; }
.ar-prog { display: block; margin-top: var(--sp-1); }
.ar-progbar { display: block; height: 4px; background: var(--surface-2); overflow: hidden; }
.ar-progbar > span { display: block; height: 100%; background: var(--st-info); transition: width 0.4s; }
.ar-progbar > span.indet { animation: ar-slide 1.4s linear infinite; }
.ar-progbar-wide { height: 6px; margin: var(--sp-3) 0; }
.ar-progtxt { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--text-secondary); }
.ar-actions { text-align: right; position: relative; min-width: 12rem; }
.ar-actions-in { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-1); }
.ar-actions-h { text-align: right !important; }
.ar-actions .btn-sm, .ar-menu > summary { padding: 0.3rem 0.7rem; font-size: 0.8125rem; }
.ar-menu { display: inline-block; position: relative; }
.ar-menu > summary { list-style: none; cursor: pointer; display: inline-flex; }
.ar-menu > summary::-webkit-details-marker { display: none; }
.ar-menu-list { position: absolute; right: 0; top: 100%; z-index: 20; display: flex; flex-direction: column; min-width: 13rem; padding: var(--sp-1); background: var(--surface-solid); box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px rgba(0, 0, 0, 0.5); text-align: left; }
.ar-menu-list a { padding: var(--sp-2) var(--sp-3); color: var(--text-primary); text-decoration: none; }
.ar-menu-list a:hover, .ar-menu-list a:focus-visible { background: var(--surface-3); }
.ar-detailrow td { background: var(--surface-solid); border-top: 0; }
.ar-detail { padding: var(--sp-2) var(--sp-3); box-shadow: inset 3px 0 0 var(--st-fail); }
.ar-detail p { margin: var(--sp-1) 0 0; color: var(--text-primary); }
.ar-detail-t { margin-right: var(--sp-2); color: var(--st-fail); }
.ar-detail-fail { color: var(--st-fail); }
.ar-code { font-family: var(--font-mono); font-size: 0.8125rem; padding: 0 var(--sp-2); background: var(--surface-1); }
.ar-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); color: var(--text-secondary); }
.ar-more-err { color: var(--st-fail); }
.dlg-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: var(--sp-4); background: rgba(3, 12, 26, 0.82); }
.dlg { width: min(32rem, 100%); max-height: 90vh; overflow-y: auto; padding: var(--sp-5); background: var(--surface-solid); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--border-strong), inset 0 3px 0 var(--clr-light-blue); }
.dlg-danger { box-shadow: inset 0 0 0 1px var(--border-strong), inset 0 3px 0 var(--st-fail); }
.dlg-title { margin: 0 0 var(--sp-3); font-size: 1.25rem; font-weight: 500; color: var(--text-strong); }
.dlg-body p { margin: 0 0 var(--sp-3); line-height: 1.4; }
.dlg .btn-primary { background: var(--clr-light-blue); color: #07264c; }
.dlg .btn-primary:disabled { background: var(--surface-2); color: var(--text-secondary); }
.dlg-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }
.ar-dlg-hint { color: var(--text-secondary); font-size: 0.875rem; }
.ar-dlg-err { color: var(--st-fail); }
@keyframes ar-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
@media (max-width: 1100px) { .ar-actions { min-width: 0; max-width: 12rem; } .ar-actions-in { flex-wrap: wrap; } .ar-schema, .ar-scope, .ar-table th:nth-child(5), .ar-table th:nth-child(6) { display: none; } .ar-table th:nth-child(7), .ar-table td.ar-num { display: none; } .container > .ar.ar { margin-left: calc(var(--side-w) + var(--sp-3)); margin-right: var(--sp-3); } }
@media (prefers-reduced-motion: reduce) { .ar-progbar > span, .ar-progbar > span.indet { animation: none; transition: none; } }
@media print { .ar, .dlg-backdrop { display: none !important; } }
.fl-fresh-progress { display: flex; align-items: center; gap: var(--sp-3); margin: 0 0 var(--sp-2); font-size: 0.875rem; color: var(--text-secondary); }
.fl-fresh-progress progress { width: 10rem; height: 0.5rem; accent-color: var(--st-info); }
.fl-fresh-limit { margin: 0 0 var(--sp-2); }
.fl-reason { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--text-secondary); }

/* ==========================================================================
   Hell/Dunkel: folgt der Systemeinstellung (prefers-color-scheme), kein Umschalter.
   Dunkel ist der Ausgangspunkt (:root oben); die Seitenleiste bleibt in beiden Modi marineblau (Marke) und trägt deshalb immer die dunklen Werte.
   Berichtsseiten (.report-page) sind Papier und immer hell, unabhängig vom Modus.
   ========================================================================== */
:root, .side-nav {
  --text-strong: #ffffff;     /* Überschriften/Hervorhebung */
  --accent-text: #35abe2;     /* Akzent als Text/Link (Hell: dunkler für 4,5:1) */
  --ov-03: rgba(255, 255, 255, 0.03); --ov-04: rgba(255, 255, 255, 0.04); --ov-05: rgba(255, 255, 255, 0.05);
  --ov-06: rgba(255, 255, 255, 0.06); --ov-08: rgba(255, 255, 255, 0.08); --ov-10: rgba(255, 255, 255, 0.10); --ov-14: rgba(255, 255, 255, 0.14);
  --c-red: #ef4444; --c-amber: #f59e0b; --c-green: #22c55e; --c-mint: #34d399; --c-slate: #94a3b8; --c-indigo: #a5b4fc;
  --nav-fg: rgba(255, 255, 255, 0.8);
  --nv-rgb: 7, 38, 76; --bl-rgb: 13, 69, 107;   /* Marine-/Blauflächen als Tönung; Hell: weiß bzw. helles Blau */
}
.side-nav {
  color-scheme: dark;
  color: var(--text-primary);
  --text-primary: #eaeaea; --text-secondary: rgba(234, 234, 234, 0.60); --text-muted: rgba(234, 234, 234, 0.58);
  --bg-surface: rgba(13, 69, 107, 0.25); --bg-raised: rgba(7, 38, 76, 0.55);
  --border-subtle: rgba(53, 171, 226, 0.12); --border-default: rgba(53, 171, 226, 0.18); --border-strong: rgba(53, 171, 226, 0.35);
  --divider: rgba(255, 255, 255, 0.08);
  --st-ok: #6fdc8c; --st-ok-bg: rgba(80, 200, 80, 0.14); --st-warn: #ecc45f; --st-warn-bg: rgba(200, 160, 50, 0.16);
  --st-fail: #ff9a9a; --st-fail-bg: rgba(200, 50, 50, 0.18); --st-info: #6cc6f0; --st-info-bg: rgba(53, 171, 226, 0.14);
  --st-neutral: rgba(234, 234, 234, 0.78); --st-neutral-bg: rgba(255, 255, 255, 0.08);
  --surface-solid: #14233b; --surface-card: rgba(20, 35, 59, 0.72);
}
:root { color-scheme: dark light; }

@media (prefers-color-scheme: light) {
  :root {
    --bg-base: #f2f5f9;
    --bg-surface: rgba(255, 255, 255, 0.72);
    --bg-raised: #ffffff;
    --bg-overlay: rgba(7, 38, 76, 0.35);
    --bg-image:
      radial-gradient(ellipse at 25% 0%, rgba(53, 171, 226, 0.14) 0%, transparent 60%),
      radial-gradient(ellipse at 75% 0%, rgba(157, 89, 159, 0.08) 0%, transparent 60%);
    --text-primary: #1b2a3b;
    --text-secondary: rgba(27, 42, 59, 0.74);
    --text-muted: rgba(27, 42, 59, 0.70);
    --border-subtle: rgba(13, 69, 107, 0.12);
    --border-default: rgba(13, 69, 107, 0.2);
    --border-strong: rgba(13, 69, 107, 0.42);
    --divider: rgba(7, 38, 76, 0.12);
    --text-strong: #07264c;
    --accent-text: #0a6396;
    --ov-03: rgba(7, 38, 76, 0.03); --ov-04: rgba(7, 38, 76, 0.04); --ov-05: rgba(7, 38, 76, 0.05);
    --ov-06: rgba(7, 38, 76, 0.06); --ov-08: rgba(7, 38, 76, 0.08); --ov-10: rgba(7, 38, 76, 0.10); --ov-14: rgba(7, 38, 76, 0.14);
    --c-red: #b42318; --c-amber: #8a5a00; --c-green: #1a6b34; --c-mint: #0c6b4c; --c-slate: #4b586a; --c-indigo: #4338ca;
    --side-bg: #0c2f55;
    --nv-rgb: 255, 255, 255; --bl-rgb: 226, 236, 246;
    --st-ok: #1a6b34;      --st-ok-bg: rgba(26, 107, 52, 0.12);
    --st-warn: #7a5200;    --st-warn-bg: rgba(200, 140, 0, 0.16);
    --st-fail: #a3201a;    --st-fail-bg: rgba(200, 50, 50, 0.12);
    --st-info: #0a6396;    --st-info-bg: rgba(53, 171, 226, 0.16);
    --st-neutral: #46536a; --st-neutral-bg: rgba(7, 38, 76, 0.08);
    --surface-solid: #ffffff;
    --surface-card: rgba(255, 255, 255, 0.92);
  }
  .badge-ok { box-shadow: inset 0 0 0 1px rgba(26, 107, 52, 0.35); }
  .badge-warn { box-shadow: inset 0 0 0 1px rgba(122, 82, 0, 0.35); }
  .badge-fail { box-shadow: inset 0 0 0 1px rgba(163, 32, 26, 0.35); }
  .badge-info { box-shadow: inset 0 0 0 1px rgba(10, 99, 150, 0.35); }
}

/* Scroll-Spy: aktueller Abschnitt im Inhaltsverzeichnis (nicht nur Farbe: gefüllt + Unterstreichung) */
.report-method-toc a[aria-current="location"] { background: var(--clr-light-blue); color: #07264c; font-weight: 500; }
@media (prefers-color-scheme: light) {
  .btn[disabled], .btn:disabled { background: rgba(7, 38, 76, 0.12) !important; color: rgba(27, 42, 59, 0.62) !important; }
}

/* IONOS-Urteil im Tab Komponenten nutzt die gemeinsame Status-Pille (ui/StatusBadge.vue); lange Texte dürfen umbrechen */
.pf-ionos-status.badge { white-space: normal; border-radius: var(--radius-md); }
.pf-ionos[data-level="info"] .pf-ionos-status, .pf-ionos[data-level="warn"] .pf-ionos-status { font-weight: 500; }

/* ── KPI-Info („i“ an Kennzahlen der Berichtsvorschau, Popover mit Berechnung) ───────────────────────────────────────────
   Nur Vorschau: Knopf und Popover entfallen im Druck/PDF. Trefferfläche 24×24 px, per negativem Rand ohne Einfluss auf die Zeilenhöhe. */
.kpi-i {
  position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 14px; height: 14px; margin: -4px 0 -4px 4px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-secondary); cursor: pointer; text-transform: none; letter-spacing: 0; line-height: 1;
}
/* Trefferfläche 24×24 px über ein Pseudo-Element: vergrößert den Knopf nicht, die Zeilenhöhe der Seite bleibt unverändert */
.kpi-i::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; }
.kpi-i:hover, .kpi-i.kpi-i-open { color: var(--rp-blue, #2f6fb5); background: rgba(47, 111, 181, 0.12); }
.kpi-i:focus-visible { outline: 2px solid var(--rp-blue, #2f6fb5); outline-offset: 0; }
.report-page .rp-tile { position: relative; }
.report-page .kpi-i-tile { position: absolute; top: 2.2mm; right: 2mm; margin: 0; } /* in der Ecke, getrennt vom Wert (der Wert reicht bis an den rechten Rand, z. B. „100,00 %“); die Beschriftung weicht per Innenabstand aus */
@media screen { .report-page .rp-tile:has(.kpi-i-tile) .rp-l { padding-right: 5mm; letter-spacing: .05mm; font-size: 6.9pt; } }
.report-page .kpi-i-donut { align-self: flex-start; margin-top: 0; }

.kpi-pop {
  position: fixed; z-index: 1000; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: var(--surface-solid); color: var(--text-primary); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-family: inherit; font-size: 0.8125rem; line-height: 1.45; text-align: left; text-transform: none; letter-spacing: 0;
}
.kpi-pop:focus { outline: none; }
.kpi-pop:focus-visible { outline: 2px solid var(--st-info); outline-offset: -2px; }
.kpi-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-1); }
.kpi-pop-head h4 { margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.kpi-pop-close { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.kpi-pop-close:hover { color: var(--text-primary); background: var(--st-neutral-bg); }
.kpi-what { margin: 0 0 var(--sp-2); }
.kpi-sec { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--border-default); }
.kpi-sec h5 { margin: 0 0 var(--sp-1); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--st-info); }
.kpi-sec ul { margin: 0; padding-left: 1.1rem; }
.kpi-sec li + li { margin-top: 0.25rem; }
.kpi-src { margin: 0 0 var(--sp-1); color: var(--text-secondary); }
.kpi-sec ul.kpi-metrics { list-style: none; padding: 0; display: grid; gap: 0.35rem; }
.kpi-metrics li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin: 0; }
.kpi-pop code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; overflow-wrap: anywhere; }
.kpi-metrics code { padding: 1px 6px; border-radius: var(--radius-sm); background: var(--st-neutral-bg); }
.kpi-labels { flex-basis: 100%; color: var(--text-secondary); font-size: 0.75rem; overflow-wrap: anywhere; }
.kpi-copy { min-height: 24px; padding: 0 var(--sp-2); border: 1px solid var(--border-default); border-radius: var(--radius-sm); background: transparent; color: var(--text-primary); font: inherit; font-size: 0.75rem; cursor: pointer; }
.kpi-copy:hover { background: var(--st-neutral-bg); }
.kpi-q-head { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); font-size: 0.75rem; color: var(--text-secondary); }
.kpi-query { margin: var(--sp-1) 0 0; padding: var(--sp-2); overflow-x: auto; border-radius: var(--radius-sm); background: var(--st-neutral-bg); white-space: pre; }
.kpi-legend { margin: var(--sp-1) 0 0; font-size: 0.72rem; color: var(--text-secondary); }
@media print { .kpi-i, .kpi-pop { display: none !important; } }

/* ---- Ausgeführte Abfragen (Popover, Methodik-Leiste, Kasten) ---------------------------------------------------------- */
.rq-item { min-width: 0; margin-top: var(--sp-2); }
.rq-item + .rq-item { margin-top: var(--sp-3); }
.rq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem var(--sp-2); }
.rq-key code { font-size: 0.78rem; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--st-neutral-bg); font-weight: 600; }
.rq-meta { flex: 1 1 10rem; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); font-size: 0.75rem; color: var(--text-secondary); }
.rq-kind { font-weight: 600; color: var(--text-primary); }
.rq-meta-part { padding-left: var(--sp-2); border-left: 1px solid var(--border-default); overflow-wrap: anywhere; }
.rq-copy { flex: none; margin-left: auto; }
.rq-code { margin: var(--sp-1) 0 0; padding: var(--sp-2) var(--sp-3); max-height: 14rem; overflow: auto; border-radius: var(--radius-sm); border-left: 3px solid var(--st-info); background: var(--st-neutral-bg); color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; line-height: 1.4; }
.rq-code:focus-visible { outline: 2px solid var(--st-info); outline-offset: 1px; }
.rq-code code { font: inherit; overflow-wrap: anywhere; }
.rq-count { display: inline-block; min-width: 1.4em; padding: 0 0.4em; border-radius: 999px; background: var(--st-neutral-bg); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; line-height: 1.5; text-align: center; vertical-align: 1px; }
.rq-used { margin: var(--sp-1) 0 0; font-size: 0.75rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.kpi-q-note { margin: 0; color: var(--text-secondary); }
.kpi-sec-queries { margin-top: var(--sp-2); }

.report-method-queries { margin-top: var(--sp-2); }
.report-method-queries summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--accent-text, var(--text-strong)); }
.report-method-queries summary:focus-visible { outline: 2px solid var(--st-info); outline-offset: 2px; border-radius: var(--radius-sm); }
.report-method-queries-missing { margin: var(--sp-2) 0 0; font-size: 0.8125rem; color: var(--text-secondary); }
.report-method .rq-item { font-size: 0.8125rem; }

.report-queries { margin: 0 0 var(--sp-3); border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-solid); color: var(--text-primary); max-width: 100%; box-sizing: border-box; }
.report-queries > summary { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); cursor: pointer; font-weight: 600; list-style-position: inside; }
.report-queries > summary:focus-visible { outline: 2px solid var(--st-info); outline-offset: -2px; border-radius: var(--radius-md); }
.report-queries-body { padding: 0 var(--sp-4) var(--sp-4); max-height: 70vh; overflow-y: auto; }
.report-queries-lead, .report-queries-sub { margin: 0 0 var(--sp-2); color: var(--text-secondary); font-size: 0.8125rem; }
.report-queries-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.report-queries-search { flex: 1 1 16rem; min-width: 0; }
.report-queries-search input { width: 100%; box-sizing: border-box; }
.report-queries-group h3 { margin: var(--sp-4) 0 0; padding-top: var(--sp-2); border-top: 1px solid var(--divider); font-size: 0.9375rem; font-weight: 600; color: var(--text-strong); }
.report-queries-entry { min-width: 0; }
.report-queries-empty { color: var(--text-secondary); }
.report-queries-missing p { margin: 0 0 var(--sp-2); }
@media print { .report-queries, .report-method-queries, .report-method-queries-missing { display: none !important; } }
body.report-print-only .report-queries { display: none !important; }


/* ==========================================================================
   Layout-Politur (alle Seiten): ein Seitenkopf-Muster (Titel links, Aktionen/Status rechts, bricht darunter um),
   gleiche Seitenabstände (--page-pad) und Zeilenabstände in Auswahlleisten, schmale Viewports (900/600 px).
   ========================================================================== */
.page-bar > * { min-width: 0; }
.page-bar-right { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.toolbar-selectors { row-gap: 0.75rem; }
.fl-toolbar, .pf-toolbar, .pf-select { row-gap: 0.5rem; }
/* Tabellen: nie breiter als der Inhalt, stattdessen horizontal scrollen (Fokus per Tastatur möglich) */
.table-container, .fl-scroll, .pf-table-wrap { max-width: 100%; overflow-x: auto; }
@media (max-width: 900px) {
  :root { --page-pad: 1rem; }
  .next-release { max-width: 100%; }
  .page-title { font-size: 1.5rem; }
  .fl-toolbar select { max-width: 100%; flex: 1 1 10rem; }
  .fl-toolbar input, .pf-toolbar input { flex: 1 1 12rem; }
}
@media (max-width: 700px) {
  /* Next-Release-Badge unter den Titel, volle Breite; A4-Vorschau verkleinert statt abgeschnitten (nur Bildschirm) */
  .page-bar-right { width: 100%; margin-left: 0; justify-content: flex-start; }
  .page-bar-right .next-release, .page-bar > .next-release { width: 100%; box-sizing: border-box; }
}
@media screen and (max-width: 700px) { .report-page { zoom: 0.62; } }
@media screen and (max-width: 520px) { .report-page { zoom: 0.5; } }

/* ── Tab „Verwaiste Komponenten“: Zähler am Tab, Hinweiszeile im Komponenten-Tab ───────────────────────────────────── */
.tab-count { margin-left: auto; min-width: 1.35rem; padding: 0 0.4rem; border-radius: 999px; background: var(--st-warn-bg); color: var(--st-warn); box-shadow: inset 0 0 0 1px currentColor; font-size: 0.75rem; font-weight: 700; line-height: 1.35rem; text-align: center; font-variant-numeric: tabular-nums; }
.orphans-hint-line { margin: 1rem 1.25rem 0; font-size: 0.875rem; color: var(--text-secondary); }
.orphans-hint-link { font-weight: 600; }

/* ── Listen bis zum unteren Fensterrand (v-fill-height setzt max-height je Container) ───────────────────────────────────
   Kein Vollbildmodus: die Seite scrollt normal, nur die Tabelle nimmt die verbleibende Höhe und scrollt intern mit festem Kopf.
   Kopfzeile deckend, damit Zeilen nicht durchscheinen. Kleiner Viewport: Mindesthöhe 14 rem, dann scrollt die Seite. */
.table-container, .ar-tablewrap { overflow: auto; }
.table-container thead th, .ar-tablewrap thead th { background: var(--surface-solid); position: sticky; top: 0; z-index: 2; }
.ar-tablewrap { max-height: 680px; }
.pf-table-wrap { max-height: 680px; }
.orphans .orphan-parent, .orphans .orphan-cluster, .orphans .orphan-project { white-space: nowrap; }
.orphans-hint-line { margin-bottom: 0.5rem; }
.orphans .orphan-reason { min-width: 14rem; }

/* ── Kosten-Design (Tab „Kosten“): Kennzahlen, Bilanzbalken, Verteilung, Tabelle ─────────────────────────────────────────
   Deckende Flächen, ein Akzent (Hellblau) für „genutzt“; „bezahlt, aber ungenutzt“ ist schraffiert (Zustand nie nur über Farbe). Nur Tokens. */
.cost-panel { display: flex; flex-direction: column; gap: var(--sp-2); }
.cost-head-wrap { display: block; background: none; padding: 0; margin: 0; }
.cost-head { display: flex; flex-direction: column; gap: var(--sp-1); }
.cost-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-1); }
.cost-tile { background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--border-default); padding: var(--sp-2) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.cost-tile-main { box-shadow: inset 0 0 0 1px var(--border-default), inset 3px 0 0 var(--accent-text); }
.cost-tile-potential { box-shadow: inset 0 0 0 1px var(--border-default), inset 3px 0 0 var(--st-warn); }
.cost-tile-label { display: flex; align-items: center; gap: var(--sp-1); font-size: 0.8125rem; font-weight: 500; color: var(--text-secondary); }
.cost-tile-label svg { flex: none; }
.cost-tile-value { font-size: 1.5rem; line-height: 1.15; font-weight: 500; color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cost-tile-sub { font-size: 0.8125rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.cost-disc { color: var(--text-primary); font-weight: 500; }
.cost-balance-bar { height: 10px; background: repeating-linear-gradient(135deg, var(--st-warn-bg) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px var(--st-warn); overflow: hidden; }
.cost-balance-used { display: block; height: 100%; background: var(--accent-text); }
.cost-balance-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-1); font-size: 0.8125rem; color: var(--text-secondary); }
.cost-balance-legend > span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.cost-balance-pct { margin-left: auto; color: var(--text-primary); }
.cb-dot { display: inline-block; width: 10px; height: 10px; }
.cb-dot-used { background: var(--accent-text); }
.cb-dot-free { background: repeating-linear-gradient(135deg, var(--st-warn-bg) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--st-warn); }
.cost-note { margin: 0; font-size: 0.8125rem; color: var(--text-secondary); }

.cost-shares { background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--border-default); padding: var(--sp-2) var(--sp-4); }
.cost-shares-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-1); }
.cost-shares-head h3 { margin: 0; font-size: 0.9375rem; font-weight: 500; color: var(--text-strong); }
.seg { display: inline-flex; box-shadow: inset 0 0 0 1px var(--border-strong); }
.seg-btn { background: transparent; color: var(--text-primary); border: 0; padding: var(--sp-1) var(--sp-3); font: inherit; font-size: 0.8125rem; cursor: pointer; min-height: 24px; }
.seg-btn.active { background: var(--accent-text); color: var(--surface-solid); font-weight: 600; }
.seg-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.cost-share-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 0 var(--sp-5); }
.cost-share-row { display: grid; grid-template-columns: minmax(4rem, 8rem) minmax(2.5rem, 1fr) 5.5rem 3.5rem; align-items: center; gap: var(--sp-3); width: 100%; min-height: 24px; padding: 0 var(--sp-2); background: transparent; border: 0; color: var(--text-primary); font: inherit; font-size: 0.8125rem; text-align: left; }
button.cost-share-row { cursor: pointer; }
button.cost-share-row:hover { background: var(--surface-3); }
button.cost-share-row:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }
.cost-share-row.is-active { background: var(--st-info-bg); box-shadow: inset 3px 0 0 var(--accent-text); font-weight: 600; }
.cost-share-row.is-dim { opacity: 0.62; }
.cost-share-row.is-rest .cs-name { color: var(--text-secondary); font-style: italic; }
.cs-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-bar { height: 6px; background: var(--st-neutral-bg); display: block; }
.cs-fill { display: block; height: 100%; background: var(--accent-text); }
.cs-eur, .cs-pct { text-align: right; font-variant-numeric: tabular-nums; }
.cs-pct { color: var(--text-secondary); }
.is-rest .cs-fill { background: var(--st-neutral); }

.cost-group-chip { display: inline-flex; align-items: center; gap: var(--sp-1); }
#cost-table .cost-cell { white-space: nowrap; }
.cost-cell-v { display: block; }
.cost-cell-bar { display: block; height: 3px; margin-top: 3px; margin-left: auto; width: 100%; max-width: 6rem; background: var(--st-neutral-bg); }
.cost-cell-bar > span { display: block; height: 100%; margin-left: auto; background: var(--accent-text); }
.cost-sav-save { color: var(--st-ok); font-weight: 500; }
.cost-sav-more { color: var(--st-warn); font-weight: 500; }
.cost-sav-none { color: var(--text-secondary); }
#cost-table .cost-discounted-cell { color: var(--text-primary); }
#cost-table td small { font-variant-numeric: tabular-nums; }
#cost-table th .kpi-i { color: var(--text-secondary); }
.cost-tile .kpi-i, .cost-shares .kpi-i, #cost-table .kpi-i { color: var(--text-secondary); }
.cost-tile .kpi-i:hover, .cost-tile .kpi-i.kpi-i-open, .cost-shares .kpi-i:hover, .cost-shares .kpi-i.kpi-i-open, #cost-table .kpi-i:hover, #cost-table .kpi-i.kpi-i-open { color: var(--accent-text); background: var(--st-info-bg); }
.cost-tile .kpi-i:focus-visible, .cost-shares .kpi-i:focus-visible, #cost-table .kpi-i:focus-visible { outline-color: var(--accent-text); }
@media (max-width: 700px) { .cost-share-row { grid-template-columns: minmax(5rem, 1fr) 6rem 3.5rem; } .cs-bar { display: none; } .cost-share-list { grid-template-columns: 1fr; } }
.cost-head-wrap > .cost-head { flex: 1; min-width: 0; }
#cost-table th { white-space: nowrap; vertical-align: middle; }
#cost-table th .sort-arrow { margin-left: 2px; }
#cost-table td { padding-top: var(--sp-2); padding-bottom: var(--sp-2); line-height: 1.3; }
#cost-table td small { display: block; line-height: 1.3; }
#cost-table col.cost-col { width: 8rem; }
#cost-table col.col-ns { width: 12rem; }
.cost-note { white-space: normal; }

/* Mehrfachauswahl (MultiSelect.vue): Trigger wie ein Select, Chips für die Auswahl, deckendes Popover */
.ms { position: relative; }
.toolbar-selectors .ms select.ms-native { position: absolute; width: 1px; height: 1px; min-width: 0; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.ms-btn { display: flex; align-items: center; gap: 0.3rem; min-width: 130px; max-width: 18rem; box-sizing: border-box; height: 28px; padding: 0 0.6rem 0 0.5rem; font: inherit; font-size: 0.85rem; color: var(--text-primary); background: var(--surface-2); border: none; border-radius: 0; cursor: pointer; text-align: left; }
.ms-btn:hover { background: var(--surface-3); }
.ms-btn > .icon { margin-left: auto; flex: none; color: var(--accent-text); }
.ms-open .ms-btn > .icon { transform: rotate(180deg); }
.ms-ph { color: var(--text-secondary); padding-left: 0.25rem; }
.ms-chip { display: inline-block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0.05rem 0.45rem; background: var(--st-info-bg); color: var(--accent-text); font-size: 0.78rem; line-height: 1.4; }
.ms-more { font-variant-numeric: tabular-nums; }
.ms-pop { position: absolute; z-index: 40; top: 100%; left: 0; margin-top: 2px; min-width: 100%; width: max-content; max-width: 22rem; max-height: 20rem; display: flex; flex-direction: column; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--border-strong), 0 8px 24px rgba(0, 0, 0, 0.35); }
.ms-search { margin: var(--sp-2); min-width: 0 !important; width: auto; }
.ms-actions { display: flex; gap: var(--sp-3); padding: var(--sp-1) var(--sp-3) var(--sp-2); box-shadow: 0 1px 0 var(--divider); }
.ms-act { background: none; border: none; padding: 0; font: inherit; font-size: 0.8rem; color: var(--accent-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ms-list { list-style: none; margin: 0; padding: var(--sp-1) 0; overflow-y: auto; }
.ms-opt { display: flex; align-items: center; gap: var(--sp-2); padding: 0.3rem var(--sp-3); font-size: 0.85rem; color: var(--text-primary); cursor: pointer; white-space: nowrap; }
.ms-opt:hover { background: var(--surface-3); }
.ms-opt input { accent-color: var(--accent-text); margin: 0; }
.ms-empty { padding: 0.4rem var(--sp-3); font-size: 0.82rem; color: var(--text-secondary); }
.selection-hint { margin: 0; flex-basis: 100%; font-size: 0.78rem; color: var(--st-warn); }
@media (prefers-reduced-motion: no-preference) { .ms-btn > .icon { transition: transform var(--duration-fast) var(--ease); } }
#toolbar { position: relative; z-index: 30; } /* popovers of the selectors stay above the onboarding card */
.ms-open { z-index: 60; } /* popover above the onboarding card and the tables */
