
.tgbr{--b:#000080;--y:#ffff00;--g:#c0c0c0;--l:#ececec;--line:#9a9a9a;font-family:Arial,Helvetica,sans-serif;max-width:1100px;margin:0 auto;border:2px solid var(--b);background:#fff;color:#111;box-sizing:border-box}
.tgbr *{box-sizing:border-box}
.tgbr-head{background:var(--b);color:#fff;padding:14px 16px;border-bottom:4px solid var(--g)}
.tgbr-head h2{margin:2px 0 5px;color:var(--y);font:700 27px/1.1 Georgia,"Times New Roman",serif}
.tgbr-head p{margin:0 0 7px;font-size:13px}
.tgbr-kicker,.tgbr-edition{font-size:11px;font-weight:700}
.tgbr-edition{display:inline-block;padding:4px 7px;border:1px solid #fff;background:rgba(255,255,255,.1)}
.tgbr-toolbar,.tgbr-options{padding:11px 12px;background:var(--g);border-bottom:1px solid #8d8d8d}
.tgbr-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center}
.tgbr-small{display:block;font-size:10px;color:#333;margin-top:2px}
.tgbr-toolbar-buttons{display:flex;gap:7px;flex-wrap:wrap}
body .tgbr .tgbr-btn{min-height:40px;padding:7px 10px;border:2px solid var(--b)!important;background:var(--b)!important;color:var(--y)!important;font-weight:700;box-shadow:none!important;border-radius:1px!important;cursor:pointer}
body .tgbr .tgbr-btn-lite{background:#fff!important;color:var(--b)!important}
body .tgbr button:disabled{opacity:.4;cursor:not-allowed}
.tgbr-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tgbr-options label{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px;background:#fff;border:1px solid #999;font-weight:700;font-size:12px}
.tgbr-inline-input{white-space:nowrap}
.tgbr-inline-input input{width:90px;padding:7px;border:1px solid #777;font-size:15px}
.tgbr-switchline{justify-content:flex-start!important}
.tgbr-switchline input{width:22px;height:22px;accent-color:var(--b)}
.tgbr-help{grid-column:1/-1;font-size:11px;line-height:1.45;padding:8px;background:#fffce1;border-left:4px solid var(--b)}
.tgbr-section-title{padding:8px 12px;background:var(--b);color:var(--y);font:700 18px/1.1 Georgia,"Times New Roman",serif}
.tgbr-train-empty{padding:20px;text-align:center;color:#666;background:#fff}
.tgbr-train{display:flex;gap:12px;padding:12px;overflow-x:auto;align-items:flex-start;background:#f7f7f7}
.tgbr-unit{min-width:440px;max-width:520px;border:2px solid var(--b);background:#fff}
.tgbr-unit-head{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:7px 8px;background:#e8e8e8;border-bottom:1px solid #aaa}
.tgbr-unit-head strong{color:var(--b);font-size:15px}
.tgbr-unit-actions{display:flex;gap:4px}
body .tgbr .tgbr-mini{width:32px;height:32px;padding:0;border:1px solid var(--b)!important;background:#fff!important;color:var(--b)!important;font-weight:700;box-shadow:none!important}
body .tgbr .tgbr-mini.tgbr-delete{color:#900!important;border-color:#900!important}
.tgbr-weight{display:flex;align-items:center;gap:6px;padding:7px 8px;font-size:11px;border-bottom:1px solid #ddd}
.tgbr-weight input{width:80px;padding:5px}
.tgbr-carbody{display:flex;align-items:stretch;gap:2px;padding:10px 8px 4px}
.tgbr-segment{min-height:52px;display:flex;align-items:center;justify-content:center;text-align:center;background:#dfe7ff;border:2px solid var(--b);font-size:11px;font-weight:700;flex:1}
.tgbr-segment.at{background:#fff5a8;flex:.72}
.tgbr-segment.zw{background:#e9e9e9}
.tgbr-groups{display:flex;gap:5px;padding:4px 8px 10px}
.tgbr-group{flex:1;min-width:76px;border:1px solid #aaa;background:#fff;padding:6px 5px;text-align:center}
.tgbr-group-name{font-size:11px;font-weight:700;color:var(--b);margin-bottom:4px}
.tgbr-wheels{display:flex;justify-content:center;gap:8px;margin:4px 0 7px}
.tgbr-wheel{width:17px;height:17px;border:3px solid #222;border-radius:50%;background:#ddd}
.tgbr-group.drive .tgbr-wheel{background:#fff5a8}
.tgbr-toggle{display:grid;gap:4px}
.tgbr-toggle button{width:100%;min-height:32px;border:1px solid var(--b)!important;background:#e7ffe7!important;color:#063!important;font-size:10px;font-weight:700;box-shadow:none!important;border-radius:1px!important}
.tgbr-toggle button.is-off{background:#ffe1e1!important;color:#900!important;border-color:#900!important}
.tgbr-toggle button.fs{background:#e8ecff!important;color:var(--b)!important}
.tgbr-toggle button.fs.is-off{background:#ffe1e1!important;color:#900!important}
.tgbr-toggle button.fs[disabled]{background:#ddd!important;color:#666!important;border-color:#999!important}
.tgbr-fsnone{font-size:9px;color:#777;line-height:1.15;padding-top:4px}
.tgbr-results{background:#fff}
.tgbr-result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;padding:11px;background:#efefef}
.tgbr-result{min-height:105px;padding:10px;background:#fff;border:1px solid #aaa;border-left:5px solid var(--b)}
.tgbr-result span{display:block;font-size:11px;font-weight:700;color:#444}
.tgbr-result strong{display:block;margin:6px 0;color:var(--b);font-size:25px}
.tgbr-result small{font-size:10px;color:#555;line-height:1.3}
.tgbr-result-wide{grid-column:1/-1}
.tgbr-result.ok{border-left-color:#087f23}
.tgbr-result.bad{border-left-color:#a00000}
.tgbr-alert{margin:0 11px 11px;padding:10px;border:2px solid #a00000;background:#ffeaea;color:#750000;font-weight:700;font-size:12px;line-height:1.4}
.tgbr-sources{margin:10px 12px;border:1px solid #888;background:#fff}
.tgbr-sources summary{cursor:pointer;padding:8px;background:#e8e8e8;color:var(--b);font-weight:700}
.tgbr-sources>div{padding:9px 11px;font-size:11px;line-height:1.45}
.tgbr-sources p{margin:5px 0 9px}
.tgbr-footer{padding:9px 12px;background:var(--b);color:#fff;font-size:10px}
@media(max-width:760px){
  .tgbr{border-left:0;border-right:0}
  .tgbr-toolbar{align-items:flex-start;flex-direction:column}
  .tgbr-toolbar-buttons{width:100%}
  .tgbr-toolbar-buttons .tgbr-btn{flex:1}
  .tgbr-options{grid-template-columns:1fr}
  .tgbr-help{grid-column:auto}
  .tgbr-train{display:grid;overflow:visible}
  .tgbr-unit{min-width:0;max-width:none;width:100%}
  .tgbr-carbody{overflow-x:auto}
  .tgbr-groups{overflow-x:auto}
  .tgbr-group{min-width:84px}
  .tgbr-result-grid{grid-template-columns:1fr 1fr}
  .tgbr-result-wide{grid-column:1/-1}
}
@media(max-width:430px){
  .tgbr-head h2{font-size:23px}
  .tgbr-result-grid{grid-template-columns:1fr}
  .tgbr-result-wide{grid-column:auto}
  .tgbr-options label{align-items:flex-start;flex-direction:column}
}

/* ===== Version 1.1: AJU, Leer/Beladen, neue Gewichts-/Bremsrechnung ===== */
.tgbr-unit-settings{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:7px 8px;border-bottom:1px solid #ddd;background:#fafafa}
.tgbr-unit-settings label{font-size:10px;font-weight:700;color:#333}
.tgbr-unit-settings select,.tgbr-unit-settings input{display:block;width:100%;margin-top:3px;padding:6px;border:1px solid #888;background:#fff}
.tgbr-unit-state{padding:6px 8px;border-bottom:1px solid #ddd;font-size:10px;line-height:1.35}
.tgbr-unit-state strong{color:var(--b)}
.tgbr-air{display:flex;align-items:center;gap:6px;margin-top:5px}
.tgbr-air input{width:18px;height:18px;accent-color:var(--b)}
.tgbr-alert .warn{margin:4px 0}
@media(max-width:430px){.tgbr-unit-settings{grid-template-columns:1fr}}


/* ===== Version 1.2: vmax, Schleppen, starke Gefälle, Stromabnehmer ===== */
.tgbr-options select{
  min-width:280px;
  padding:7px;
  border:1px solid #777;
  background:#fff;
  font-size:12px;
}
.tgbr-option-checks{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.tgbr-options .tgbr-check{
  justify-content:flex-start;
  background:#fff;
  border:1px solid #999;
  padding:8px;
  font-weight:700;
  font-size:11px;
}
.tgbr-check input{
  width:20px;
  height:20px;
  accent-color:var(--b);
  flex:0 0 auto;
}
.tgbr-vmax-box strong{
  font-size:31px;
}
.tgbr-vmax-box.is-limited{
  border-left-color:#a00000;
  background:#fff4f4;
}
.tgbr-vmax-box.is-normal{
  border-left-color:#087f23;
}
@media(max-width:760px){
  .tgbr-option-checks{grid-template-columns:1fr}
  .tgbr-options select{min-width:0;width:100%}
}


/* ===== Version 1.3: kombinierte Bremsrechnung ===== */
.tgbr-calc-note{
  margin:0 11px 10px;
  padding:9px 10px;
  border-left:5px solid #a06a00;
  background:#fff4cc;
  font-size:11px;
  line-height:1.45;
}
.tgbr-derived{
  color:#8a4b00 !important;
  font-weight:700;
}


/* ===== Version 1.6: Fahrzeugauswahl, Betriebsart je Fahrzeug, Neigung leer ===== */
.tgbr-add-select-label{
  display:flex;
  flex-direction:column;
  gap:3px;
  font-size:10px;
  font-weight:700;
  color:#222;
}
.tgbr-add-select-label select{
  min-width:260px;
  min-height:40px;
  padding:7px;
  border:2px solid var(--b);
  background:#fff;
  color:#111;
  font-size:12px;
}
.tgbr-gradient-help{
  padding:8px 10px;
  background:#fffce1;
  border-left:4px solid var(--b);
  font-size:10px;
  line-height:1.4;
}
.tgbr-operation-field{
  grid-column:1 / -1;
}
.tgbr-operation-field select{
  width:100%;
  padding:7px;
  border:1px solid #777;
  background:#fff;
}
.tgbr-unit-brakecalc{
  padding:7px 8px;
  background:#fafafa;
  border-bottom:1px solid #ddd;
}
.tgbr-unit-brake-summary{
  display:grid;
  grid-template-columns:auto repeat(3,auto);
  gap:6px 12px;
  align-items:center;
  padding:8px;
  background:#eef3ff;
  border-left:4px solid var(--b);
  font-size:10px;
}
.tgbr-unit-brake-summary>strong{
  color:var(--b);
  font-size:13px;
}
.tgbr-unit-brake-summary span b{
  color:var(--b);
}
.tgbr-unit-brake-summary small{
  grid-column:1 / -1;
  color:#555;
  line-height:1.35;
}
.tgbr-unit-brake-summary.is-derived{
  background:#fff4cc;
  border-left-color:#a06a00;
}
@media(max-width:600px){
  .tgbr-add-select-label,
  .tgbr-add-select-label select,
  [data-add-selected]{
    width:100%;
  }
  .tgbr-add-select-label select{min-width:0}
  .tgbr-unit-brake-summary{grid-template-columns:1fr 1fr}
}
@media(max-width:430px){
  .tgbr-unit-brake-summary{grid-template-columns:1fr}
  .tgbr-unit-brake-summary small{grid-column:auto}
}


/* ===== Version 1.7: elektrische Bremse je Fahrzeug ===== */
.tgbr-vehicle-switches{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:6px;
}
body .tgbr .tgbr-eb-toggle{
  min-height:34px;
  padding:6px 9px;
  border:1px solid #087f23 !important;
  background:#e7ffe7 !important;
  color:#063 !important;
  font-size:10px;
  font-weight:700;
  box-shadow:none !important;
  border-radius:1px !important;
}
body .tgbr .tgbr-eb-toggle.is-off{
  border-color:#a00000 !important;
  background:#ffe1e1 !important;
  color:#900 !important;
}


/* ===== Version 1.8: klare GTW-Regel bei starkem Gefälle ===== */
.tgbr-strong-gradient-note{
  padding:8px 10px;
  background:#fff4cc;
  border-left:4px solid #a00000;
  font-size:10px;
  line-height:1.4;
}
