:root {
  font-size: 16px;
  --font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;

  --color-bg: #050816;
  --color-bg-elevated: #0b1024;
  --color-surface: rgba(5, 8, 22, 0.96);
  --color-surface-soft: rgba(8, 12, 30, 0.96);
  --color-border: #303656;

  --color-text: #f5f7ff;
  --color-text-muted: #d1d6f5;
  --color-text-soft: #a8b0dd;

  --color-accent: #4a90e2;
  --color-accent-soft: #283a6b;

  --color-status-ok: #15b67a;
  --color-status-warn: #f1c40f;
  --color-status-bad: #e74c3c;

  --color-risk-low: #15b67a;
  --color-risk-med: #f1c40f;
  --color-risk-high: #e74c3c;
  --color-risk-unknown: #7f8c8d;

  --color-panel-header-bg: rgba(0, 0, 0, 0.55);
  --color-panel-footer-bg: rgba(0, 0, 0, 0.85);

  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.35);

  --input-bg: #070b1b;
  --input-border: #434b72;
  --input-border-focus: #6b8cff;
  --input-text: #f5f7ff;

  --btn-bg: #1a213b;
  --btn-bg-hover: #242d50;
  --btn-border: #3b456e;
  --btn-text: #f5f7ff;

  --badge-bg: #141a33;
  --badge-border: #3b456e;

  --chart-bg: #050915;

  --alarm-bg: #8b0000;
  --alarm-border: #ff5555;
  --alarm-text: #ffffff;
}

body.theme-light,
body[data-theme="light"] {
  --color-bg: #f5f7ff;
  --color-bg-elevated: #e0e5ff;
  --color-surface: #ffffff;
  --color-surface-soft: #ffffff;
  --color-border: #c0c4dd;

  --color-text: #111322;
  --color-text-muted: #33374a;
  --color-text-soft: #3a3a3a;

  --color-accent: #234f9b;
  --color-accent-soft: #dce3ff;

  --color-panel-header-bg: #ffffff;
  --color-panel-footer-bg: #ffffff;

  --input-bg: #ffffff;
  --input-border: #a4aad0;
  --input-border-focus: #234f9b;
  --input-text: #111322;

  --btn-bg: #edf1ff;
  --btn-bg-hover: #dce3ff;
  --btn-border: #a4aad0;
  --btn-text: #111322;

  --badge-bg: #e4e8ff;
  --badge-border: #a4aad0;

  --chart-bg: #eef1ff;

  --alarm-bg: #b30000;
  --alarm-border: #ff5555;
  --alarm-text: #ffffff;
}

body.theme-dark,
body[data-theme="dark"] {
  --color-bg: #050816;
  --color-bg-elevated: #0b1024;
  --color-surface: rgba(5, 8, 22, 0.96);
  --color-surface-soft: rgba(8, 12, 30, 0.96);
  --color-border: #303656;

  --color-text: #f5f7ff;
  --color-text-muted: #d1d6f5;
  --color-text-soft: #a8b0dd;

  --color-accent: #4a90e2;
  --color-accent-soft: #283a6b;

  --color-panel-header-bg: rgba(0, 0, 0, 0.7);
  --color-panel-footer-bg: rgba(0, 0, 0, 0.85);

  --input-bg: #070b1b;
  --input-border: #434b72;
  --input-border-focus: #6b8cff;
  --input-text: #f5f7ff;

  --btn-bg: #1a213b;
  --btn-bg-hover: #242d50;
  --btn-border: #3b456e;
  --btn-text: #f5f7ff;

  --badge-bg: #141a33;
  --badge-border: #3b456e;

  --chart-bg: #050915;

  --alarm-bg: #8b0000;
  --alarm-border: #ff5555;
  --alarm-text: #ffffff;
}

body {
  margin: 20px;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

@media (max-width: 600px) {
  body {
    margin: 10px;
  }
}

.bg-layer {
  position: fixed;
  inset: 0;
  background: url("/images/background.jpg") no-repeat center center fixed;
  background-size: cover;
  opacity: 0.35;
  z-index: -1;
}

body.theme-light .bg-layer,
body[data-theme="light"] .bg-layer {
  opacity: 0.15;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  background: var(--color-panel-header-bg);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.brand-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-soft);
}

.brand-images {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-images img {
  display: block;
}

.brand-logo {
  width: 50px;
  height: auto;
}

.brand-scarlet {
  width: 80px;
  height: auto;
}

.header-right {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-end;
}

@media (max-width: 720px) {
  .header-right {
    align-items: flex-start;
    width: 100%;
  }
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-base);
}

.lang-switch button {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  font-size: var(--font-size-base);
}

.lang-switch button.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--font-size-base);
  color: var(--color-text-soft);
}

.theme-toggle button {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  font-size: var(--font-size-base);
}

.theme-toggle button.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}

h2 {
  margin-top: 1.4rem;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-lg);
  font-weight: 600;
}

p {
  margin: 0.2rem 0;
  font-size: var(--font-size-base);
}

button {
  margin: 0.2rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: var(--font-size-base);
  line-height: 1.2;
}

button:hover {
  background: var(--btn-bg-hover);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: var(--font-size-base);
}

a:hover {
  text-decoration: underline;
}

.btn-explorer {
  margin-top: 0.5rem;
}

.section {
  margin-bottom: 1.5rem;
}

.panel {
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 0.9rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(4px);
}

.panel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.panel-col {
  flex: 1 1 240px;
  min-width: 240px;
}

.label {
  font-size: var(--font-size-base);
  color: var(--color-text-soft);
  margin-bottom: 0.1rem;
}

.value {
  font-size: var(--font-size-base);
  margin-bottom: 0.4rem;
  word-break: break-word;
}

.status-dot,
.risk-dot {
  display: inline-block;
  border-radius: 50%;
  margin-right: 0.35rem;
}

.status-dot {
  width: 0.8rem;
  height: 0.8rem;
}

.risk-dot {
  width: 0.85rem;
  height: 0.85rem;
}

.status-ok {
  background: var(--color-status-ok);
}

.status-warn {
  background: var(--color-status-warn);
}

.status-bad {
  background: var(--color-status-bad);
}

.risk-low {
  background: var(--color-risk-low);
}

.risk-med {
  background: var(--color-risk-med);
}

.risk-high {
  background: var(--color-risk-high);
}

.risk-unknown {
  background: var(--color-risk-unknown);
}

.uplink-health-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.uplink-health-lights {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.uplink-light {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--color-border);
  opacity: 0.4;
}

.uplink-light-ok {
  background: var(--color-status-ok);
  opacity: 1;
}

.uplink-light-warn {
  background: var(--color-status-warn);
  opacity: 1;
}

.uplink-light-bad {
  background: var(--color-status-bad);
  opacity: 1;
}

.uplink-health-text {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

.filling-bar-container {
  position: relative;
  width: 100%;
  height: 22px;
  background: var(--input-bg);
  border-radius: 6px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  margin-top: 0.25rem;
}

.filling-bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  transition: width 0.5s ease;
  background: linear-gradient(
    to right,
    var(--color-status-ok) 0%,
    var(--color-status-ok) 33%,
    var(--color-status-warn) 33%,
    var(--color-status-warn) 66%,
    var(--color-status-bad) 66%,
    var(--color-status-bad) 100%
  );
}

.filling-bar-label {
  margin-top: 0.25rem;
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

.alarm-banner {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: var(--font-size-lg);
  font-weight: 700;
  background: var(--alarm-bg);
  color: var(--alarm-text);
  text-align: center;
  border: 2px solid var(--alarm-border);
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.65);
}

.alarm-hidden {
  display: none;
}

.trend-chart {
  width: 100%;
  height: 140px;
  background: var(--chart-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.trend-caption {
  font-size: var(--font-size-base);
  color: var(--color-text-soft);
  margin-bottom: 0.3rem;
}

.footer {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding: 0.8rem 1rem 1rem;
  background: var(--color-panel-footer-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.footer p,
.footer-partners {
  font-size: 0.9rem;
  margin: 0;
}

.footer-partners {
  margin-bottom: 0.6rem;
}

.footer-logos {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: center;
  align-items: center;
}

/* Basis-Styles für Logos */
.footer-logos img {
  max-height: 32px;
  height: auto;
  width: auto;
}

/* Dark/Light-Switch für Logo-Varianten */
.footer-logo-dark,
.footer-logo-light {
  max-height: 32px;
  height: auto;
  width: auto;
}

/* Default: Dark-Theme → dunkle Logos sichtbar */
.footer-logo-dark {
  display: inline-block;
}
.footer-logo-light {
  display: none;
}

/* Light-Theme → helle Logo-Variante */
body.theme-light .footer-logo-dark,
body[data-theme="light"] .footer-logo-dark {
  display: none;
}

body.theme-light .footer-logo-light,
body[data-theme="light"] .footer-logo-light {
  display: inline-block;
}

.footer-tagline {
  margin-top: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.footer-tagline span {
  display: block;
}

.footer-meta-row-center {
  display: flex;
  justify-content: center;
  margin-top: 0.3rem;
}

.footer-meta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
}

.footer-bottom-row-center {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  justify-content: center;
  align-items: center;
}

.version-button {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: var(--font-size-base);
  cursor: pointer;
}

.version-button:hover {
  background: var(--btn-bg-hover);
}

@media (max-width: 720px) {
  .footer-logos img {
    max-height: 28px;
  }
}

.version-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.version-modal[hidden] {
  display: none;
}

.version-modal-content {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  background: var(--color-surface);
  border-radius: 10px;
  border: 1px solid var(--color-border);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  font-size: var(--font-size-base);
}

.version-modal-content h3 {
  font-size: var(--font-size-lg);
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.version-modal-content p,
.version-modal-content li {
  font-size: var(--font-size-base);
}

.version-modal-close {
  margin-top: 0.6rem;
  display: inline-flex;
  justify-content: center;
}

.version-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

/* ===== Header: Dashboard Logo left (only when enabled via class) ===== */
.brand.brand-with-logo {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.brand.brand-with-logo .dashboard-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
}

.brand.brand-with-logo .brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem; /* passt zu deinem bestehenden spacing */
}

@media (max-width: 720px) {
  .brand-with-logo {
    align-items: flex-start;
  }
}

/* System Info Bar - Korrigiert auf deine CSS-Variablen */
.system-info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px;
    margin-top: 25px;
    margin-bottom: 10px;

    /* Korrektur: Nutzt jetzt deine Variablen aus der admin.css */
    background: var(--color-surface); 
    border: 1px solid var(--color-border);
    border-radius: 10px; /* Exakt wie deine .panel Klasse */
    color: var(--color-text);
    
    font-family: var(--font-family-base);
    font-size: 0.9rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(4px);
}

.system-info-bar strong {
    /* Nutzt dein Blau für die Werte */
    color: var(--color-accent); 
}

/* NIS-2 & KRITIS Badge - High Contrast Version */
.nis2-badge {
  display: inline-block;
  background-color: #008744; /* Sattes, dunkles Sicherheits-Grün */
  color: #ffffff !important;   /* Reinweiß für maximale Lesbarkeit */
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #005f30;   /* Dunklerer Rand für Tiefe */
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.nis2-badge:hover {
  background-color: #00a854; /* Etwas helleres Grün beim Drüberfahren */
  color: #ffffff !important;
}

/* =========================================================
   ✅ Sensors overview — RAM-style bars (quiet, technical)
   Targets: #sensor-bars-list (index.html)
   ========================================================= */

#sensor-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* A single sensor row: ID | bar | value */
.sensor-row {
  display: grid;
  grid-template-columns: minmax(90px, 160px) 1fr minmax(64px, 90px);
  gap: 10px;
  align-items: center;

  /* RAM-style "technical" typography */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  line-height: 1.2;
}

.sensor-row .sensor-id {
  opacity: 0.9;
  font-size: 0.95em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sensor-row .sensor-val {
  text-align: right;
  opacity: 0.85;
  font-size: 0.95em;
  white-space: nowrap;
}

/* Bar shell (same vibe as your UI: border + soft background) */
.jb-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

/* Light theme: adapt bar to dark-on-light look */
body.theme-light .jb-bar,
body[data-theme="light"] .jb-bar {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.10);
}

/* Stepped ticks overlay (quiet "leitwarten" look) */
.jb-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 10px,
      rgba(255, 255, 255, 0.12) 10px,
      rgba(255, 255, 255, 0.12) 11px
    );
  opacity: 0.7;
}

body.theme-light .jb-bar::after,
body[data-theme="light"] .jb-bar::after {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 10px,
      rgba(0, 0, 0, 0.12) 10px,
      rgba(0, 0, 0, 0.12) 11px
    );
}

/* =========================================================
   ✅ JUMBO BLOCK® SENSOR OVERVIEW
   ========================================================= */

/* 1. Die Liste als Container */
#sensor-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

/* 2. Die Zeile (Desktop-Standard) */
.sensor-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr minmax(60px, 80px);
  gap: 15px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
}

.sensor-row:first-child {
  border-top: none;
}

/* 3. Bezeichnung & Status-Punkt */
.sensor-id {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.sensor-row .status-dot {
  background-color: var(--sensor-bar-color) !important;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--sensor-bar-color);
}

/* 4. Die Balken-Hülle */
.jb-bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

body.theme-light .jb-bar,
body[data-theme="light"] .jb-bar {
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* 5. Die farbige Füllung (Marketing-Glow) */
.jb-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--sensor-bar-color, #4a90e2) !important;
  background: linear-gradient(
    90deg, 
    var(--sensor-bar-color) 0%, 
    color-mix(in srgb, var(--sensor-bar-color), white 20%) 100%
  ) !important;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px color-mix(in srgb, var(--sensor-bar-color), transparent 50%);
}

/* 6. Der Prozentwert */
.sensor-val {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}

/* 7. Deine 12 Farben */
#sensor-bars-list > *:nth-child(12n+1)  { --sensor-bar-color: #4a90e2; }
#sensor-bars-list > *:nth-child(12n+2)  { --sensor-bar-color: #00bcd4; }
#sensor-bars-list > *:nth-child(12n+3)  { --sensor-bar-color: #15b67a; }
#sensor-bars-list > *:nth-child(12n+4)  { --sensor-bar-color: #7bdc3a; }
#sensor-bars-list > *:nth-child(12n+5)  { --sensor-bar-color: #f1c40f; }
#sensor-bars-list > *:nth-child(12n+6)  { --sensor-bar-color: #ff9800; }
#sensor-bars-list > *:nth-child(12n+7)  { --sensor-bar-color: #e74c3c; }
#sensor-bars-list > *:nth-child(12n+8)  { --sensor-bar-color: #ff4fa3; }
#sensor-bars-list > *:nth-child(12n+9)  { --sensor-bar-color: #9b59b6; }
#sensor-bars-list > *:nth-child(12n+10) { --sensor-bar-color: #5b6cff; }
#sensor-bars-list > *:nth-child(12n+11) { --sensor-bar-color: #00c18c; }
#sensor-bars-list > *:nth-child(12n+12) { --sensor-bar-color: #b0bec5; }

/* =========================================================
   ✅ 8. MOBILE OPTIMIERUNG (Synchronisiert mit Admin-UI)
   ========================================================= */
@media (max-width: 600px) {
  /* Sensor-Reihen als vertikaler Stapel */
  .sensor-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 15px 5px;
    border-bottom: 1px solid var(--color-border);
  }

  /* Bezeichnung größer und deutlicher */
  .sensor-id {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0;
  }

  /* Balken massiver für 16m³ Visualisierung */
  .jb-bar {
    width: 100% !important;
    height: 24px; /* Deutlich dicker für bessere Lesbarkeit */
    border-radius: 6px;
  }

  /* Wertanzeige unter oder über dem Balken optimieren */
  .sensor-val {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 2px;
  }

  /* Buttons im Dashboard an Admin-Größe anpassen */
  .btn, button {
    width: 100% !important;
    height: 44px !important;
    font-size: 1.1rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- Redundanz-Visualisierung --- */
.estimated-fill {
  background: repeating-linear-gradient(
    45deg,
    var(--color-accent),
    var(--color-accent) 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  ) !important;
}

.is-estimated .sensor-id span {
  font-style: italic;
  color: var(--color-status-warn);
}

/* =========================================================
   Footer Center Overrides (scoped, bulletproof)
   ========================================================= */

#footer-slot .footer-panel-center {
  text-align: center !important;
}

/* Partner */
#footer-slot .footer-partners {
  text-align: center !important;
}

#footer-slot .footer-logos {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 18px !important;
}

/* Version/Release line */
#footer-slot .footer-meta-left {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  text-align: center !important;
}

#footer-slot .footer-meta-spacer {
  display: inline-block !important;
  width: 12px !important;
}

/* Badge */
#footer-slot .footer-info-bar {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

/* Action buttons */
#footer-slot .footer-meta-row,
#footer-slot .footer-meta-row-center {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  text-align: center !important;
}

/* Tagline + copyright */
#footer-slot .footer-tagline,
#footer-slot .footer-bottom-row,
#footer-slot .footer-bottom-row-center {
  text-align: center !important;
}

/* =========================================================
   Footer KRITIS / NIS-2 Badge – multi-line safe button
   Fixes overflow on small screens
   ========================================================= */

#footer-slot .nis2-badge {
  display: inline-block;
  max-width: 100%;
  white-space: normal;          /* allow line breaks */
  word-break: break-word;       /* break long words if needed */
  overflow-wrap: anywhere;      /* last-resort safety */
  text-align: center;

  padding: 8px 14px;
  line-height: 1.35;

  box-sizing: border-box;
}

/* Ensure parent does not force single-line layout */
#footer-slot .footer-info-bar,
#footer-slot .footer-info-bar a {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;              /* IMPORTANT */
  max-width: 100%;
}

/* On very small screens: slightly tighter padding */
@media (max-width: 480px) {
  #footer-slot .nis2-badge {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
}

/* =========================================================
   Compact spacing override (wins against later rules)
   ========================================================= */

/* tighten vertical gaps between all major blocks */
.section{
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

/* compact variant even tighter */
.section.compact{
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* reduce header-to-content gap */
.header-bar{
  margin-bottom: 12px !important;
}

/* if any panels add extra outer spacing, keep it tight */
.panel{
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
