:root{
  --bg:#f4f5f7;
  --paper:#ffffff;
  --ink:#202226;
  --muted:#c9c9c9;
  --line:#dfe3e8;
  --gold:#ddb81b;
  --dark:#333333;
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  min-height:100%;
}

body{
  background:var(--bg);
  color:var(--ink);
  font-family:Arial,Helvetica,sans-serif;
}

/* =========================================================
   TOOLBOX MODULHEADER
   Bewusst über die volle Bildschirmbreite.
   ========================================================= */
.module-header{
  width:100%;
  background:var(--dark);
  border-top:5px solid var(--gold);
  color:#fff;
}

.module-header-inner{
  width:100%;
  min-height:92px;
  padding:18px 100px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:24px;
}

.module-navigation{
  width:100%;
  min-height:30px;
  padding:10px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:24px;
  border-top:1px solid rgba(255,255,255,.38);
}

.module-navigation-label{
  grid-column:2;
  justify-self:center;
  align-self:center;
  color:#fff;
  font:700 13px Arial,Helvetica,sans-serif;
  line-height:1;
}

.module-back{
  grid-column:1;
  justify-self:center;
  align-self:center;
  display:flex;
  align-items:center;
  justify-content:center;
}

.module-help{
  grid-column:3;
  justify-self:center;
  align-self:center;
  display:flex;
  align-items:center;
  justify-content:center;
}


.module-back,
.module-help{
  appearance:none;
  border:1px solid rgba(255,255,255,.38);
  background:#fff;
  color:#222;
  border-radius:9px;
  padding:10px 13px;
  font:700 13px Arial,Helvetica,sans-serif;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
  width: 150px;
}

.module-back:hover,
.module-help:hover{
  background:#f1f1f1;
}

.module-brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  min-width:0;
}

.module-logo{
  width:190px;
  max-width:25vw;
  height:auto;
  display:block;
}

.module-title{
  min-width:0;
}

.module-title h1{
  margin:0 0 4px;
  color:#fff;
  font-size:23px;
  line-height:1.15;
}

.module-title p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.4;
}

/* =========================================================
   MODULINHALT – absichtlich leer
   ========================================================= */
.module-content{
  width:min(1180px, calc(100% - 36px));
  margin:20px auto 40px;
}

/* =========================================================
   HILFE / QUELLEN
   ========================================================= */
.help-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  display:none;
  padding:30px;
  background:rgba(0,0,0,.50);
}

.help-overlay.open{
  display:block;
}

.help-dialog{
  width:min(850px,100%);
  max-height:90vh;
  margin:0 auto;
  overflow:auto;
  background:#fff;
  border-radius:16px;
  padding:24px;
  box-shadow:0 20px 60px rgba(0,0,0,.22);
}

.help-close{
  float:right;
  border:1px solid var(--line);
  background:#f3f4f5;
  border-radius:8px;
  padding:8px 11px;
  cursor:pointer;
}

.help-dialog h2{
  margin:0 0 18px;
}

.help-section{
  clear:both;
  padding:14px 0;
  border-top:1px solid var(--line);
}

.help-section:first-of-type{
  border-top:0;
}

.help-section p{
  margin:6px 0;
  line-height:1.5;
}

.help-section a{
  color:#245d91;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media(max-width:760px){
  .module-header-inner{
    grid-template-columns:auto auto;
    gap:12px;
    padding:14px 16px;
  }

  .module-brand{
    grid-column:1 / -1;
    grid-row:2;
    justify-content:flex-start;
  }

  .module-navigation{
    grid-template-columns:1fr auto 1fr;
    gap:8px;
  }

  .module-back,
  .module-help{
    width:min(150px,100%);
  }

  .module-logo{
    width:145px;
    max-width:38vw;
  }

  .module-title h1{
    font-size:20px;
  }

  .help-overlay{
    padding:15px;
  }
}

/* =========================================================
   TOOLBOX STANDARD-FOOTER / RUNTIME-DIAGNOSE
   Standard-Vendorbasis wie im HiVis-Modul:
   PDF.js + Worker, jsPDF, Promise.withResolvers-Fallback.
   ========================================================= */
.module-footer{
  width:100%;
  margin-top:40px;
  background:#fff;
  border-top:1px solid var(--line);
  color:#626873;
}
.module-footer-inner{
  width:min(1180px,calc(100% - 36px));
  margin:0 auto;
  padding:13px 0 16px;
  text-align:center;
  font-size:11px;
  line-height:1.55;
}
.runtime-status{
  font-weight:700;
  color:#454b53;
}
.runtime-dot{
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:6px;
  border-radius:50%;
  background:#999;
  vertical-align:1px;
}
.runtime-status.ok .runtime-dot{background:#238636}
.runtime-status.error .runtime-dot{background:#c62828}
.runtime-status.loading .runtime-dot{background:#d49b00}
.vendor-info{margin-top:2px;color:#7a8089}
