/* MATERIALLISTE_V1 */
.ml-panel{background:#fff;border:1px solid #d6e2eb;border-radius:8px;padding:18px 20px;margin:0 0 22px;color:#20384e}
.ml-head{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;align-items:flex-start}
.ml-head h2{margin:0 0 4px;font-size:22px}.ml-head p{margin:0;color:#647f92;max-width:640px}
.ml-tools{display:flex;gap:8px;flex-wrap:wrap}
.ml-panel button{font:inherit;font-size:14px;padding:8px 11px;border:1px solid #c4d4e0;border-radius:5px;background:#fff;color:#20384e;cursor:pointer;white-space:nowrap}
.ml-panel button:hover{background:#e9f0f5}.ml-panel button:disabled{opacity:.5}
.ml-panel .ml-primary{background:#20384e;color:#fff;border-color:#20384e}.ml-panel .ml-primary:hover{background:#375d79}
.ml-summary{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0 4px}.ml-summary span{background:#eef3f7;border-radius:12px;padding:3px 10px;font-size:13px}
.ml-summary .ml-late{background:#fbeceb;color:#b3261e;font-weight:bold}.ml-summary .ml-urgent{background:#fff4df;color:#9a5b00;font-weight:bold}.ml-summary .ml-todo{background:#fff4df;color:#9a5b00}
.ml-status{min-height:1.2em;margin:4px 0;font-size:13px;color:#647f92}.ml-status.ok{color:#2f7a5b}.ml-status.error{color:#b3261e;font-weight:bold}
.ml-add{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 12px}.ml-add button{font-size:13px;padding:6px 9px;border-style:dashed}
.ml-filters{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin-bottom:8px}.ml-filters label{display:flex;flex-direction:column;font-size:12px;font-weight:bold;gap:4px}.ml-filters .ml-search{flex:1;min-width:200px}
.ml-panel input,.ml-panel select{font:inherit;font-size:14px;padding:6px 7px;border:1px solid #c4d4e0;border-radius:4px;background:#fff;color:#20384e;min-width:0;width:100%;box-sizing:border-box}
.ml-wrap{overflow:auto;border:1px solid #d6e2eb;border-radius:6px}
.ml-table{width:100%;min-width:1370px;border-collapse:collapse;table-layout:fixed}
.ml-table>thead th{background:#20384e;color:#fff;text-align:left;font-size:12px;padding:7px 6px;white-space:nowrap;position:sticky;top:0;z-index:1}
.ml-table td{padding:4px;border-bottom:1px solid #e3eaf0;vertical-align:top}
.ml-qty>input{width:62%!important;display:inline-block}.ml-qty>select{width:36%!important;display:inline-block;margin-left:2%}
.ml-sub{margin-top:3px;font-size:12px!important;color:#647f92!important}
.ml-src{display:inline-block;margin-top:3px;font-size:11px;color:#2f7a5b;background:#e8f4ee;border-radius:8px;padding:1px 7px}
.ml-cat th{background:#eef3f7;color:#20384e;text-align:left;padding:8px 6px;font-size:14px}.ml-cat small{color:#647f92;font-weight:normal;margin-right:8px}.ml-cat button{font-size:12px!important;padding:3px 8px!important;font-weight:normal}
.ml-row-late td:first-child{box-shadow:inset 4px 0 #b3261e}.ml-row-urgent td:first-child{box-shadow:inset 4px 0 #e0a030}.ml-row-ok{background:#f5fbf8}.ml-row-storniert{opacity:.5}
.ml-chip{display:inline-block;margin-top:4px;font-size:11px;font-weight:bold;border-radius:8px;padding:1px 7px}.ml-chip.ml-late{background:#fbeceb;color:#b3261e}.ml-chip.ml-urgent,.ml-chip.ml-todo{background:#fff4df;color:#9a5b00}
.ml-bar{position:relative;height:8px;background:#e7eef4;border-radius:4px;overflow:hidden;margin-top:6px}.ml-bar i{position:absolute;left:0;top:0;bottom:0;background:#2f7a5b}.ml-bar i.plan{background:#a9cbe0}
.ml-progress small{display:block;font-size:11px;color:#647f92;margin-top:3px}
.ml-actions{white-space:nowrap;text-align:right}.ml-actions button{font-size:12px!important;padding:5px 8px!important;margin-left:3px}
.ml-deliveries>td{background:#f7fafc;padding:8px 10px 12px 26px}
.ml-deliveries table{border-collapse:collapse;width:100%;margin-bottom:6px}.ml-deliveries th{font-size:11px;text-align:left;color:#647f92;background:none;padding:3px 4px}.ml-deliveries table{table-layout:auto}
.ml-deliveries td{border-bottom:1px solid #e3eaf0}.ml-deliveries tr.done td{background:#eef8f2}.ml-deliveries input[type=number]{width:90px}
.ml-done{display:flex;align-items:center;gap:5px;font-size:13px;white-space:nowrap;margin-top:6px}.ml-done input{width:auto}
.ml-empty{padding:18px!important;color:#647f92;font-style:italic}
.ml-calc-hint{color:#647f92;font-size:13px;margin:10px 0 0}
.ml-dialog{border:0;border-radius:8px;padding:20px 24px;max-width:min(860px,95vw);width:100%;box-shadow:0 10px 40px #0004;color:#20384e}.ml-dialog::backdrop{background:#20384e88}
.ml-dialog h2{margin:0 0 6px}.ml-sec{border:1px solid #d6e2eb;border-radius:6px;padding:10px 12px;margin:10px 0}.ml-sec label{display:flex;flex-direction:column;font-weight:bold;font-size:12px;gap:4px}.ml-sec p{margin:6px 0;color:#647f92;font-size:13px}
.ml-check{flex-direction:row!important;align-items:center;font-weight:normal!important;font-size:14px!important}.ml-check input{width:auto}
.ml-preview{max-height:300px;overflow:auto;margin:10px 0}.ml-preview table{width:100%;border-collapse:collapse;font-size:13px}.ml-preview th,.ml-preview td{text-align:left;padding:4px 6px;border-bottom:1px solid #e3eaf0}
.ml-cat-results{max-height:380px;overflow:auto;margin:10px 0}.ml-art{display:block;width:100%;text-align:left;white-space:normal!important;margin-bottom:4px}.ml-art small{color:#647f92}
.ml-error{color:#b3261e}.muted{color:#647f92}
/* Im Reiter «Ankünfte» nur Ankünfte zeigen */
.simple-arrivals-only #material-list-panel{display:none!important}
/* Rechner: selten gebrauchte Felder ausblenden (Werte bleiben auf Standard) */
#aushubBerechnungSections label:has([data-aushub-field="transitionLayer"]),
#aushubBerechnungSections label:has([data-aushub-field="effectiveLift"]),
#aushubBerechnungSections label:has([data-aushub-field="specialE4"]){display:none!important}
@media (max-width:700px){.ml-panel{padding:14px}.ml-head h2{font-size:19px}.ml-tools button{flex:1 1 45%}}
@media print{.ml-panel{display:none}}
.ml-table td input:not([type=checkbox]),.ml-table td select{width:100%!important;max-width:none!important}
.ml-table td.ml-qty{white-space:nowrap}.ml-table td.ml-qty>input{width:56%!important;display:inline-block}.ml-table td.ml-qty>select{width:41%!important;display:inline-block;margin-left:3%}
.ml-table td:first-child{display:grid;grid-template-columns:1fr auto;gap:3px 6px;align-items:center}.ml-table td:first-child>input:first-child{grid-column:1/-1}
.ml-table .ml-src{margin:0}
.ml-deliveries>td{display:table-cell!important}.ml-deliveries td input[type=number]{width:90px!important}.ml-deliveries td{white-space:nowrap}

/* ML_GLEIS_V1 */
.ml-gleis{width:min(920px,96vw)}
.ml-g-grid{display:flex;flex-wrap:wrap;gap:8px 12px;margin:6px 0}
.ml-g-grid label,.ml-g-wide{display:flex;flex-direction:column;font-size:12px;gap:2px}
.ml-g-grid input{width:110px}
.ml-g-wide{flex:1 1 100%}.ml-g-wide select,.ml-g-wide input{width:100%!important;max-width:100%}
.ml-g-table{width:100%;border-collapse:collapse;margin:8px 0}
.ml-g-table td,.ml-g-table th{padding:4px;border-bottom:1px solid #dde3ea;text-align:left;font-size:12px}
.ml-g-table td:first-child select{width:100%;max-width:560px}
.ml-g-table [data-addsearch]{width:100%}
.ml-g-add{max-height:180px;overflow:auto}
/* ML_BELAG_V2: Belag-Dialog passt ohne Querscrollen */
#ml-belag-dialog{overflow-x:hidden}
#ml-belag-dialog .ml-g-table td:first-child,#ml-belag-dialog .ml-g-table th:first-child{width:28px}
#ml-belag-dialog .ml-g-table td:nth-child(2) input{width:100%;box-sizing:border-box}
#ml-belag-dialog .ml-g-table td:nth-child(3){width:90px}
#ml-belag-dialog .ml-preview table{width:100%;table-layout:fixed}
#ml-belag-dialog .ml-preview td{word-wrap:break-word}
#ml-belag-dialog .ml-order{background:#e9f6ee;border:2px solid #2e7d4f;border-radius:8px;padding:10px 14px;margin:10px 0;font-size:15px}
#ml-belag-dialog .ml-order.out{background:#fdf0e6;border-color:#c56a1b}
#ml-ents-dialog{overflow-x:hidden}
#ml-ents-dialog .ml-ents-f input{width:60px}
#ml-ents-dialog .ml-ents td select{max-width:190px}
#ml-ents-dialog .ml-order.out{background:#fdf0e6;border:2px solid #c56a1b;border-radius:8px;padding:10px 14px;margin:10px 0;font-size:15px}
#ml-belag-dialog label.ml-chk{display:flex!important;flex-direction:row!important;grid-template-columns:none!important;justify-content:flex-start!important;align-items:center;gap:8px;margin:6px 0;font-weight:600;width:auto}
#ml-belag-dialog label.ml-chk input{width:auto;margin:0}
#ml-belag-dialog .ml-belag-old{background:#f3f6f9;border:1px solid #d5dde5;border-radius:6px;padding:8px 10px;margin:8px 0}
#ml-belag-dialog .ml-bo{display:inline-flex;align-items:center;gap:4px;background:#fff;border:1px solid #d5dde5;border-radius:14px;padding:2px 4px 2px 10px;margin:2px}
#ml-belag-dialog .ml-bo button{border:0;background:none;cursor:pointer;padding:0 4px}
/* GAS_V1 */
.ml-gas{float:left;height:42px;width:auto;margin:2px 8px 0 0}
.ml-gas-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin:6px 0 14px}
.ml-gas-card{display:grid!important;grid-template-columns:52px 1fr 70px;grid-template-rows:auto auto;align-items:center;gap:2px 10px;border:1px solid #dce3e8;border-radius:10px;padding:8px 10px;background:#fff}
.ml-gas-card img{grid-row:1/3;height:64px;width:52px;object-fit:contain}
.ml-gas-card span{display:flex;flex-direction:column}.ml-gas-card span small{color:#6e7e89}
.ml-gas-card input{grid-column:3;grid-row:1;width:100%!important;margin:0!important;padding:6px 8px!important;text-align:center}
.ml-gas-card>small{grid-column:3;grid-row:2;text-align:center;color:#6e7e89;font-size:11px}
