/* ==========================================================================
   orchideo|cloud Design System — plain HTML, dark-mode only
   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: rgba(255, 255, 255, 0.15);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-lavendel);
}

/* --------------------------------------------------------------------------
   4. Links
   -------------------------------------------------------------------------- */
a {
  color: var(--clr-light-blue);
  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(--clr-light-blue);
  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(13, 69, 107, 0.35),
    rgba(7, 38, 76, 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(13, 69, 107, 0.35),
    rgba(7, 38, 76, 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(--clr-light-blue);
  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(7, 38, 76, 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(--clr-light-blue);
  box-shadow: inset 0 0 0 1px var(--clr-light-blue);
}
.btn-secondary:hover {
  background: rgba(53, 171, 226, 0.10);
  color: var(--clr-light-blue);
  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(7, 38, 76, 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(--clr-light-blue);
}

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: rgba(255, 255, 255, 0.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(--clr-light-blue);
}

/* 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(--clr-light-blue); }

/* 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(7, 38, 76, 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(7, 38, 76, 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(--clr-light-blue);
}

.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: rgba(255, 255, 255, 0.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(--clr-light-blue);
}

.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(7, 38, 76, 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(7, 38, 76, 0.60) 0%, rgba(13, 69, 107, 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: #ffffff;
}

.tab.active {
  background: rgba(53, 171, 226, 0.12);
  color: var(--clr-light-blue);
  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(7, 38, 76, 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(13, 69, 107, 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: rgba(255, 255, 255, 0.05);
}

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

.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(13, 69, 107, 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(7, 38, 76, 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(--clr-light-blue);
  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: #fff;
}
.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(7, 38, 76, 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(--clr-light-blue);
  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: rgba(255,255,255,0.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(7, 38, 76, 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: #ef4444;
  font-weight: 600;
}

.run-global-error {
  overflow-wrap: anywhere;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #ef4444;
  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(--clr-light-blue); flex-shrink: 0; }
.run-error-msg      { color: #fca5a5; overflow-wrap: anywhere; min-width: 0; }

.hub-error-inline {
  color: #ef4444;
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

/* Delta highlight in detail panel */
.delta-highlight {
  color: var(--clr-light-blue);
  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: rgba(255,255,255,0.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(--clr-light-blue);
  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: rgba(255,255,255,0.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: rgba(255,255,255,0.10);
  color: var(--text-primary);
}

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

.stat-chip-over.stat-active  { background: rgba(245,158,11,0.15); border-color: #f59e0b; color: #f59e0b; }
.stat-chip-under.stat-active { background: rgba(239,68,68,0.15);  border-color: #ef4444; color: #ef4444; }
.stat-chip-oom.stat-active   { background: rgba(157,89,159,0.15); border-color: var(--clr-lavendel); color: var(--clr-lavendel); }
.stat-chip-over span  { color: #f59e0b; }
.stat-chip-under span { color: #ef4444; }
.stat-chip-oom span   { color: var(--clr-lavendel); }
.stat-chip-optimal.stat-active { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #22c55e; }
.stat-chip-optimal span { color: #22c55e; }

/* "Ä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: rgba(255,255,255,0.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: rgba(255,255,255,0.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(7, 38, 76, 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(--clr-light-blue);
  font-variant-numeric: tabular-nums;
}

.cost-card-discounted .cost-card-value {
  color: #34d399;
}

.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(--clr-light-blue); }
#cost-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-discounted-cell { color: #34d399; }

/* 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(--clr-light-blue);
  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; }

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

.cost-saving   { color: #34d399; }
.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(7, 38, 76, 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(--clr-light-blue);
  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(--clr-light-blue); }
.kpi-savings .kpi-value { color: #34d399; }

.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: rgba(255,255,255,0.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(--clr-light-blue);
  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: #22c55e; border: none; }
.compat-badge-partial { background: rgba(245,158,11,0.15); color: #f59e0b; border: none; }
.compat-badge-none    { background: rgba(100,116,139,0.15);color: #94a3b8; 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(--clr-light-blue);
  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: #22c55e; color: #22c55e; }
.stat-chip-partial.stat-active  { background: rgba(245,158,11,0.15); border-color: #f59e0b; color: #f59e0b; }
.stat-chip-none.stat-active     { background: rgba(100,116,139,0.15);border-color: #94a3b8; color: #94a3b8; }
.stat-chip-full span    { color: #22c55e; }
.stat-chip-partial span { color: #f59e0b; }
.stat-chip-none span    { color: #94a3b8; }

/* 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: #a5b4fc;
}
.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: #a5b4fc;
  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: #a5b4fc;
  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: #94a3b8; 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.5; }
.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: #ef4444; 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: #22c55e; }
.obs-off { color: #94a3b8; }
.obs-badge-row { margin-bottom: 6px; }
.obs-issues-hint { margin-top: 6px; font-size: 0.75rem; color: #f59e0b; }
.obs-push-right { margin-left: auto; }
.obs-muted { color: var(--text-muted); font-size: 0.8rem; }
.obs-error { color: #ef4444; 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(13, 69, 107, 0.22);
  --surface-2: rgba(13, 69, 107, 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: rgba(255, 255, 255, 0.03); }
thead th { background: rgba(7, 38, 76, 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: #ffffff;
  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(--clr-light-blue); }

.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: rgba(255, 255, 255, 0.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(--clr-light-blue); }
.pf-version .pf-note { font-size: 0.875rem; font-weight: 400; color: var(--text-secondary); }
.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(--clr-light-blue); 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: #ffffff; }
.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(--clr-light-blue); }
.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(--clr-light-blue); }
.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: 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: 1rem;
  padding: 1.25rem var(--page-pad) 0.25rem;
  background: transparent;
}
.page-title { margin: 0; font-size: 1.75rem; font-weight: 300; color: #ffffff; }
.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: #ffffff; }
.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 { 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: #ffffff; }
@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: rgba(255, 255, 255, 0.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-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 0.5rem 0 1rem; }
.report-variants { display: inline-flex; gap: 0.25rem; }
.report-variants .btn.active { background: var(--clr-dark-blue); border-color: var(--clr-light-blue); color: #fff; }
.report-badge-intern { color: var(--clr-warning); font-size: 0.85rem; border: 1px solid var(--clr-warning); border-radius: 1rem; padding: 0.1rem 0.6rem; }
.report-pages-info { color: var(--text-muted, #9aa4b2); font-size: 0.85rem; }
.report-toolbar #btn-report-pdf { margin-left: auto; }
.report-error { color: var(--clr-danger); }
.report-unsupported { max-width: 40rem; border: 1px solid var(--clr-light-blue); border-radius: 0.5rem; padding: 1rem 1.25rem; background: var(--bg-surface); }
.report-unsupported h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.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-parts { font-size: 7.3pt; color: var(--rp-muted); margin-top: 1.2mm; line-height: 1.6; }
.report-page .rp-parts > span { white-space: nowrap; margin-right: 1.5mm; }
.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 .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). */
@page report { size: A4; margin: 0; }
.report-page { page: report; }
@media print {
  body.report-print-active, body.report-print-active .container { background: #fff !important; }
  body.report-print-active .container > :not(.report-wrap) { display: none !important; }
  body.report-print-active .container > .report-wrap { margin-left: 0 !important; }
  body.report-print-active .report-wrap { 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; padding: 0; }
  body.report-print-active .report-page { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  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 { display: none !important; }
