.office-dialog{width:min(1100px,96vw)!important;max-width:1100px!important}.office-form .modal-body{padding-bottom:24px}.office-actions{display:flex;gap:12px;flex-wrap:wrap}.office-principal{margin:16px 0;border:1px solid #c6d6df;border-radius:12px;padding:12px 16px;min-width:0}.office-principal legend{padding:0 8px;font-weight:700}.office-check{display:flex!important;align-items:flex-start;gap:12px;min-height:48px;padding:10px 0;cursor:pointer}.office-check input[type=checkbox]{width:20px!important;height:20px!important;flex:0 0 20px;margin:3px 0}.office-check small{display:block;font-weight:400;color:#536776}.office-check b{overflow-wrap:anywhere}.office-unavailable{color:#6d7479}.office-preview-brand{border:1px solid #c6d6df;border-radius:12px;overflow:hidden;margin:16px 0;background:#fff;padding:16px}.office-preview-brand img{display:block;width:100%;height:auto;max-height:2.5cm;object-fit:contain;background:#fff}.office-preview-brand h4{margin:16px 0}.office-preview-download{background:#edf4f7;border-radius:8px;padding:10px;margin-top:8px;overflow-wrap:anywhere}.office-catalog-image{display:block;max-width:100%;width:260px;height:auto;max-height:2.5cm;object-fit:contain;background:#fff}.material-mail{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;background:#f4f7f9;padding:16px;border-radius:8px}.material-item{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #dce4e9;padding:12px 0}.material-item p{margin:4px 0;color:#536776}#materials-error,#material-approve-error,#material-upload-error,#material-image-error{color:#944a14}#material-selection-status{overflow-wrap:anywhere}#material-upload,#material-image-form{width:100%}#materials-form label,#material-upload label,#material-image-form label{margin-bottom:12px}#materials-form input:not([type=checkbox]),#materials-form textarea,#materials-form select,#material-upload input:not([type=checkbox]),#material-upload select,#material-image-form input{width:100%;min-width:0;font:inherit}#material-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#material-choice-list .office-principal{margin:0}@media(max-width:700px){#material-choice-list{grid-template-columns:1fr}.material-item{align-items:flex-start;flex-direction:column}.office-dialog .modal-foot{flex-wrap:wrap}.office-preview-brand img{max-height:2.5cm}}
.office-preview-brand img.office-brand-logo{width:220px;height:90px;padding:8px;margin-top:16px}.office-preview-brand img.office-logo-dark{background:#202529}

#material-templates{width:100%}#material-templates label{display:block;margin:16px 0}#material-templates textarea{width:100%;font:inherit}#material-template-error{color:#944a14}

.office-email-preview{display:block;width:100%;height:680px;border:1px solid #d1e1e3;border-radius:10px;margin:14px 0;background:#102e38}#material-upload textarea{width:100%;font:inherit}

.report-principal-request,.report-material-choices details,.report-office-options{margin:16px 0;padding:14px;border:1px solid #cbdde0;border-radius:10px;background:#f8fbfb}.report-principal-request label,.report-office-options label{display:block;margin:10px 0}.report-principal-request summary,.report-material-choices summary,.report-office-options summary{font-weight:700;cursor:pointer}.report-principal-request input,.report-principal-request select,.report-principal-request textarea,.report-office-options input,.report-office-options select{width:100%;min-width:0;font:inherit}

/* Kompakte Originalordner statt fünf bildschirmhoher Schwerpunktfelder. */
#materials-form .office-focus-options{border:1px solid #c6d6df;border-radius:10px;padding:12px;min-width:0}
.office-focus-options summary,.office-principal>summary,.office-folder>summary{cursor:pointer;padding:10px 0;overflow-wrap:anywhere}
.office-focus-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 20px}
#materials-form .office-check,#material-folder-review-form .office-check{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;min-height:0;padding:7px 0;margin:0 0 6px}
.office-folder{border-left:2px solid #d4e6e6;padding-left:12px;margin:4px 0;min-width:0}
.office-folder-content{padding-left:8px;min-width:0}.office-folder-file{display:flex;align-items:center;gap:12px;justify-content:space-between;border-bottom:1px solid #e5eeee}.office-folder-file .office-check{flex:1;min-width:0}.office-folder-file small{overflow-wrap:anywhere}
#material-folder-results,#material-folder-review-form{width:100%;min-width:0}#material-folder-review-form label{display:block;margin:8px 0}#material-folder-review-form input:not([type=checkbox]),#material-folder-review-form select{width:100%;min-width:0;font:inherit}#material-folder-review-error{color:#944a14}
#material-choice-list{display:block}#material-choice-list>.office-principal{margin:10px 0}#material-choice-list .office-principal>summary small{font-weight:400;color:#536776}#material-draft-folders{margin-bottom:12px}
@media(max-width:700px){.office-focus-grid{grid-template-columns:1fr}.office-folder{padding-left:7px}.office-folder-content{padding-left:2px}.office-folder-file{flex-wrap:wrap}.office-folder-file button{margin-bottom:8px}}

#materials-form .modal-body{display:block}#materials-form .form-grid{gap:12px}#materials-form label{display:block;margin:6px 0 12px}#materials-form .form-grid label{margin:0}#materials-form h3{margin:22px 0 10px}#materials-form p{margin:8px 0 14px}#materials-form input:not([type=checkbox]),#materials-form select,#materials-form textarea{padding:10px 11px;border:1px solid #c6d3dc;border-radius:10px;background:#fff}#material-draft-folders{margin:0;width:100%}

/* V005: feste Feldhöhen, Hilfstexte unter dem Eingabefeld, gleicher Rhythmus. */
#customer-master-form .field,#customer-planning-form .field,.report-follow-up .field{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px}
#customer-master-form .field>label,#customer-planning-form .field>label{margin:0;min-height:18px}
#customer-master-form .field>input,#customer-master-form .field>select,#customer-planning-form .field>input,#customer-planning-form .field>select{height:44px;min-height:44px;flex:none;width:100%}
#customer-master-form .field>small{font-size:12px;line-height:1.4}#customer-master-form .material-item small{display:block}
#report-form .report-follow-up{margin-top:16px}#report-form .report-follow-up input[type=checkbox]{width:20px;height:20px;flex:none}
.report-mail-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.material-source-note{padding:12px;background:#eef7f7;border:1px solid #c6dddd;border-radius:10px}.office-folder-file .secondary{white-space:nowrap}

.material-folder-body>p{margin:0 0 12px}.material-folder-body>.field{display:flex;flex-direction:column;gap:6px}.material-folder-body input{width:100%;min-width:0;font:inherit;padding:10px;border:1px solid #c6d3dc;border-radius:10px}.material-folder-source{border-top:1px solid #d4e6e6;margin-top:18px;padding-top:10px}.material-folder-source>summary{cursor:pointer;padding:8px 0}.material-folder-source .field{display:block;margin:12px 0}.material-folder-body #material-folder-status{font-size:14px;color:#536776;margin:12px 0}

/* V007: Empfängerwahl und nachvollziehbare Originalauswahl. */
.office-recipients{display:grid;gap:12px;border:1px solid #d2dfe3;border-radius:12px;padding:16px;margin:12px 0}
.office-address-option{display:flex;gap:10px;align-items:center;padding:10px 0;border-top:1px solid #e1eaed;flex-wrap:wrap}.office-address-option>span{flex:1;min-width:150px;overflow-wrap:anywhere}.office-address-option small{display:block;color:#647984}.office-address-option label{display:flex;gap:6px;align-items:center}.office-address-option input[type=checkbox]{width:auto}.office-address-option button:disabled{opacity:.65}
.material-source-paths{font-size:12px;color:#647984;margin:8px 0}.material-local-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.material-local-toolbar input{flex:1;min-width:160px}.material-source-note p{margin:6px 0}.material-pending-status{font-weight:600;color:#075f82}
.customer-visit-overview h3{display:flex;justify-content:space-between;align-items:center;gap:8px}.customer-history summary{cursor:pointer;font-weight:700}.customer-next-actions.u35-actions{margin-top:0}

.customer-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.customer-overview-grid .detail-box{margin:0;padding:14px}.customer-card-head{display:flex;gap:10px;justify-content:space-between;align-items:center}.customer-card-head h3{margin:0;font-size:16px}.customer-contact-lines{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px 8px;margin:16px 0}.customer-contact-lines dt{color:#647984;font-size:13px}.customer-contact-lines dd{margin:0;font-size:14px;overflow-wrap:anywhere}.customer-contact-source{font-size:12px;color:#647984;margin-top:14px}.customer-contact-source summary{cursor:pointer}.customer-overview-grid .customer-visit-overview h3{margin:0 0 12px;font-size:16px}.customer-overview-grid .customer-visit-overview p{font-size:14px;line-height:1.5;margin:12px 0}.customer-overview-grid .customer-visit-overview b{display:inline}.customer-overview-grid button.compact{font-size:12px;padding:8px 10px;min-height:36px}
@media(max-width:700px){.customer-overview-grid{grid-template-columns:1fr}.customer-overview-grid button.compact{min-height:44px}.customer-contact-lines{grid-template-columns:98px minmax(0,1fr)}}

/* V007: lange Kundennamen und Bedienung auf dem Handy. */
@media(max-width:700px){
 .plan-item{grid-template-columns:28px minmax(0,1fr) 44px;grid-template-areas:"icon time menu" "description description description";align-items:center;gap:5px 8px;padding:10px 12px}
 .plan-item .plan-icon{grid-area:icon;font-size:21px}
 .plan-item .time{grid-area:time;font-size:14px;white-space:normal}
 .plan-item .desc{grid-area:description;min-width:0;overflow-wrap:anywhere}
 .plan-item .desc strong{font-size:16px;line-height:1.4}
 .plan-item .item-menu{grid-area:menu;min-width:44px;min-height:44px;margin:0;justify-self:end}
 .plan-item .item-warning{margin-top:8px;line-height:1.45}
 .topbar .top-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;width:100%}
 .topbar .top-actions #client-filter{grid-column:1 / -1;width:100%;min-width:0;max-width:none}
 .topbar .top-actions button{min-height:44px}
 #appointment-form .modal-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 #appointment-form .modal-foot .primary{grid-column:1 / -1;min-height:48px}
 #appointment-form .modal-foot button{white-space:normal;min-height:44px}
}
#appointment-status{overflow-wrap:anywhere}
#appointment-form .modal-foot [hidden]{display:none}

/* Terminstatus darf nicht unter den feststehenden Aktionen verschwinden. */
.modal.appointment-dialog{overflow:hidden;display:flex;flex-direction:column}
#appointment-form{display:flex;flex-direction:column;max-height:92vh;min-height:0;width:100%}
#appointment-form .modal-head,#appointment-form .modal-foot{position:static;flex:0 0 auto}
#appointment-form .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.appointment-saved-summary h3{margin:0 0 8px}.appointment-saved-summary p{margin:0}
@media(max-width:700px){#appointment-form{max-height:94vh}}

#master-review-form details{margin:15px 0}#master-review-form summary{font-weight:700;cursor:pointer}#master-search{width:100%;min-height:44px;margin:6px 0 12px}.master-table td{vertical-align:top;overflow-wrap:anywhere;max-width:360px}.master-table tr[hidden]{display:none}

#road-check-form{display:flex;flex-direction:column;max-height:92vh;min-height:0;width:100%}#road-check-form .modal-head,#road-check-form .modal-foot{position:static;flex:0 0 auto}#road-check-form .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto}#road-check-result{overflow-wrap:anywhere}@media(max-width:700px){#road-check-form{max-height:94vh}}

.data-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.data-card,.data-card .card-head>div,.data-card .field{min-width:0}.data-card .card-head{flex-wrap:wrap}.data-card input[type=file]{min-width:0;max-width:100%}.data-card h2{overflow-wrap:anywhere}#master-search{border:1px solid #c6d3dc;border-radius:10px;padding:10px 12px;font:inherit}@media(max-width:900px){.data-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){.data-card .export-controls,.data-card .file-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.data-card .export-controls>*,.data-card .file-actions>*{min-width:0;max-width:100%}.data-card .export-controls button,.data-card .file-actions button{white-space:normal;overflow-wrap:anywhere;min-height:44px}.data-card .export-controls select{width:100%;min-width:0}}
