/* EiD mobile compact – scoped to customer and staff screens */
@media(max-width:750px){
#appScreen #customerDetailView,#appScreen #teamView,#appScreen #customersView{font-size:13px;line-height:1.45;min-width:0}
#appScreen #customerDetailView .cd-head{padding:10px;gap:8px}
#appScreen #customerDetailView .cd-head h2,#appScreen #teamView .staff-profile-header h2{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
#appScreen #customerDetailView .cd-content{padding:9px}
#appScreen #customerDetailView .cd-overview{gap:10px}
#appScreen #customerDetailView .cd-over-block{padding:9px;margin-bottom:8px;border-radius:10px}
#appScreen #customerDetailView .cd-over-block header{gap:5px;margin-bottom:4px}
#appScreen #customerDetailView .cd-over-block h3{font-size:13px}
#appScreen #customerDetailView .cd-overview .cd-kv,#appScreen #customerDetailView .cd-overview .cd-kv strong,#appScreen #customerDetailView .cd-over-note{font-size:12px;line-height:1.45;overflow-wrap:anywhere}
#appScreen #customerDetailView .cd-overview .cd-kv{padding:6px 0;gap:5px}
#appScreen #customerDetailView .cd-tabs button{min-height:36px;padding:4px;font-size:10px}
#appScreen #customerDetailView .cd-over-edit,#appScreen #customerDetailView .cd-head-actions .cd-btn,#appScreen #customerDetailView .cd-over-actions button,#appScreen #customerDetailView .cd-overview .cd-group-title button,#appScreen #teamView .staff-profile-header button,#appScreen #teamView .staff-screen button.btn{min-height:32px;min-width:32px;padding:4px 8px;font-size:11px;line-height:1.3;width:auto;max-width:100%}
#appScreen #customerDetailView .cd-over-actions button{flex:0 1 auto}
#appScreen #customerDetailView .cd-over-fields{gap:8px}
#appScreen #customerDetailView .cd-over-fields input,#appScreen #customerDetailView .cd-over-fields select,#appScreen #customerDetailView .cd-over-fields textarea,#appScreen #teamView .staff-field input:not([type=checkbox]):not([type=radio]),#appScreen #teamView .staff-field select,#appScreen #teamView .staff-field textarea{font-size:16px;min-height:36px;padding:6px 8px;max-width:100%}
#appScreen #teamView .staff-detail-panel{margin:8px 0;border-radius:10px}
#appScreen #teamView .staff-profile-header{padding:10px;gap:8px}
#appScreen #teamView .staff-profile-tabs{padding:0 6px;gap:3px;flex-wrap:wrap}
#appScreen #teamView .staff-profile-tabs button{padding:5px 7px;font-size:11px;min-height:32px;margin-top:3px;white-space:normal}
#appScreen #teamView .staff-screen{padding:8px;gap:9px}
#appScreen #teamView .staff-card-head,#appScreen #teamView .staff-card-content{padding:9px 10px}
#appScreen #teamView .staff-card-head h3,#appScreen #teamView .staff-overview-top h3{font-size:13px}
#appScreen #teamView .staff-double,#appScreen #teamView .staff-stack{gap:8px}
#appScreen #teamView .team-directory-controls{padding:9px 10px 0}
#appScreen #teamView .team-directory-head{gap:7px;padding-bottom:7px}
#appScreen #teamView .team-directory-head h2{font-size:16px}
#appScreen #teamView .team-directory-actions,#appScreen #teamView .team-directory-searchrow,#appScreen #teamView .team-filter-selects{gap:5px}
#appScreen #teamView .team-directory-actions .btn,#appScreen #teamView .team-filter-pill,#appScreen #teamView .team-cost-chips button,#appScreen #teamView .team-status-filters button{font-size:11px;min-height:30px;padding:4px 7px;width:auto}
#appScreen #teamView .team-filter-footer{padding:6px 0 8px;gap:6px}
#appScreen #customersView .eid-customer-filters{gap:7px}
#appScreen #customersView .view-header .btn,#appScreen #customersView .eid-customer-filters button{min-height:32px;font-size:11px;padding:5px 8px;width:auto}
#appScreen #customerDetailView button:focus-visible,#appScreen #teamView button:focus-visible,#appScreen #customersView button:focus-visible{outline:2px solid #78645a;outline-offset:2px}
}

/* Compact desktop records and correctly aligned substitution checkbox */
@media(min-width:751px){
#appScreen #customerDetailView .cd-head,#appScreen #teamView .staff-profile-header{padding:12px 15px;gap:10px}
#appScreen #customerDetailView .cd-over-block{padding:10px 12px;margin-bottom:8px}
#appScreen #customerDetailView .cd-overview{gap:12px}
#appScreen #customerDetailView .cd-overview .cd-kv{padding:6px 0;font-size:12px}
#appScreen #customerDetailView .cd-over-edit,#appScreen #customerDetailView .cd-head-actions .cd-btn,#appScreen #customerDetailView .cd-over-actions button,#appScreen #teamView .staff-profile-header button,#appScreen #teamView .staff-screen button.btn{min-height:30px;min-width:30px;padding:4px 9px;font-size:12px;line-height:1.4;width:auto}
#appScreen #teamView .staff-screen{padding:12px;gap:10px}
#appScreen #teamView .staff-card-head,#appScreen #teamView .staff-card-content{padding:10px 12px}
#appScreen #teamView .staff-stack,#appScreen #teamView .staff-double{gap:10px}
#appScreen #teamView .team-directory-actions .btn,#appScreen #customersView .view-header .btn,#appScreen #customersView .eid-customer-filters button{min-height:32px;padding:5px 9px;font-size:12px}
.pc-modal{width:min(740px,100%)}
.pc-modal-header{padding:11px 15px}.pc-modal-header h2{font-size:18px}
.pc-modal-form{padding:13px 15px}.pc-form-grid{gap:10px 12px}
.pc-form-grid input:not([type=checkbox]),.pc-form-grid select{min-height:32px;padding:5px 8px}
.pc-modal-actions{padding-top:12px}.pc-modal-actions .btn{min-height:32px;padding:6px 12px;font-size:12px}
}
.pc-form-grid label.pc-label-check{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:8px!important;min-height:32px;width:fit-content;max-width:100%;cursor:pointer}
.pc-form-grid label.pc-label-check #pcFormSubstitution{appearance:auto!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex:0 0 16px!important;padding:0!important;margin:0!important;accent-color:#ab8179;cursor:pointer}

/* Mobile V3: actual list rows as compact cards, no wide table. */
@media(max-width:750px){
#appScreen #teamView,#appScreen #customersView,#appScreen #customerDetailView{-webkit-text-size-adjust:100%;font-size:12px;line-height:1.4}
#appScreen #teamView .team-panel,#appScreen #customersView .eid-customer-list-panel{padding:0;min-width:0}
#appScreen #teamView .team-directory-controls,#appScreen #customersView .eid-customer-list-tools{padding:8px 10px!important}
#appScreen #teamView .team-directory-head{gap:5px!important;padding-bottom:5px!important}
#appScreen #teamView .team-directory-searchrow{padding:5px 0!important;gap:5px!important}
#appScreen #teamView .team-searchbox{min-height:30px!important;width:100%}
#appScreen #teamView .team-status-filters,#appScreen #teamView .team-cost-chips,#appScreen #teamView .team-filter-selects{gap:4px!important;flex-wrap:wrap}
#appScreen #teamView .team-filter-pill,#appScreen #teamView .team-cost-chips button,#appScreen #teamView .team-directory-actions .btn{padding:3px 7px!important;min-height:26px!important;font-size:11px!important;line-height:1.3!important;width:auto!important}
#appScreen #teamView .team-filter-footer{padding:5px 0!important;gap:5px!important}
#appScreen #customersView .eid-customer-filters{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
#appScreen #customersView .eid-customer-filters label:first-child{grid-column:1/-1}
#appScreen #customersView .statbar{display:flex!important;gap:5px!important;margin:6px 0!important}
#appScreen #customersView .statbar>div{flex:1;min-width:0;padding:6px!important}
#appScreen #customersView .statbar strong{font-size:16px!important}
#appScreen #customersView .statbar small{font-size:10px!important}
#appScreen #teamDirectoryResults .table-outer,#appScreen #customersView .eid-customer-list-panel .table-outer{overflow:visible!important;padding:0 8px!important}
#appScreen #teamDirectoryResults table,#appScreen #customersView table.eid-customer-list-table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important}
#appScreen #teamDirectoryResults thead,#appScreen #customersView .eid-customer-list-table thead{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)}
#appScreen #customersView .eid-customer-list-table colgroup{display:none!important}
#appScreen #teamRows,#appScreen #customerRows{display:grid!important;gap:7px!important;width:100%!important}
#appScreen #teamRows tr,#appScreen #customerRows tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px 8px!important;padding:9px!important;border:1px solid #e5ddd8!important;border-radius:10px!important;background:#fff!important;min-width:0!important;position:relative}
#appScreen #teamRows td,#appScreen #customerRows td{display:block!important;padding:2px 0!important;border:0!important;min-width:0!important;width:auto!important;white-space:normal!important;overflow-wrap:anywhere;font-size:11px!important;line-height:1.35!important}
#appScreen #teamRows td:first-child,#appScreen #customerRows td:first-child{grid-column:1/-1;padding-right:65px!important;border-bottom:1px solid #eee7e2!important;padding-bottom:5px!important}
#appScreen #teamRows td[colspan],#appScreen #customerRows td[colspan]{grid-column:1/-1;padding-right:0!important}
#appScreen #teamRows td:nth-child(5),#appScreen #customerRows td:nth-child(7){position:absolute;right:9px;top:9px}
#appScreen #teamRows td:nth-child(2)::before{content:'Funktion';}
#appScreen #teamRows td:nth-child(3)::before{content:'Kostenstelle';}
#appScreen #teamRows td:nth-child(4)::before{content:'Beschäftigung';}
#appScreen #customerRows td:nth-child(2)::before{content:'Ort';}
#appScreen #customerRows td:nth-child(3)::before{content:'Bezirk';}
#appScreen #customerRows td:nth-child(4)::before{content:'Leistung';}
#appScreen #customerRows td:nth-child(5)::before{content:'Finanzierung';}
#appScreen #customerRows td:nth-child(6)::before{content:'Privatversichert';}
#appScreen #teamRows td::before,#appScreen #customerRows td::before{display:block;color:#80736d;font-size:10px;font-weight:400}
#appScreen #teamRows .team-list-photo,#appScreen #teamRows .team-list-placeholder{width:36px!important;height:36px!important;flex:0 0 36px!important;font-size:15px!important}
#appScreen #teamRows .team-name-photo{gap:6px!important}
#appScreen #teamRows .customer-name-link,#appScreen #customerRows .customer-name-link{font-size:13px!important;padding:2px 0!important;min-height:24px!important;text-align:left;white-space:normal!important}
#appScreen #teamRows .pill,#appScreen #customerRows .pill{font-size:10px!important;padding:2px 5px!important;white-space:normal!important}
#appScreen #customerRows td:last-child{grid-column:2;text-align:right}
#appScreen #customerRows .eid-customer-edit,#appScreen #customerDetailView .cd-over-edit,#appScreen #customerDetailView .cd-btn,#appScreen #staffDetailPanel .btn,#appScreen #staffDetailPanel button:not(.staff-profile-tabs button){font-size:11px!important;min-height:30px!important;height:auto!important;padding:4px 7px!important;width:auto!important;line-height:1.3!important;max-width:100%!important}
#appScreen #customerDetailView .cd-head-actions{display:flex!important;flex-wrap:wrap!important;gap:4px!important}
#appScreen #customerDetailView .cd-col,#appScreen #customerDetailView .cd-over-block,#appScreen #staffDetailPanel .staff-card-content,#appScreen #staffDetailPanel .staff-card-head{padding:8px!important}
#appScreen #staffDetailPanel .staff-avatar{width:36px!important;height:36px!important;font-size:17px!important}
#appScreen #staffDetailPanel .staff-header-person{gap:7px!important}
#appScreen #staffDetailPanel .staff-header-person h2,#appScreen #customerDetailView .cd-head h2{font-size:15px!important}
#appScreen #staffDetailPanel .staff-pane{padding:8px!important}
#appScreen #staffDetailPanel .staff-profile-tabs{gap:2px!important;padding:2px 5px!important;flex-wrap:wrap!important}
#appScreen #staffDetailPanel .staff-profile-tabs button{font-size:10px!important;padding:5px!important;min-height:28px!important}
#appScreen #staffDetailPanel input:not([type=checkbox]):not([type=radio]),#appScreen #staffDetailPanel select,#appScreen #customerDetailView input:not([type=checkbox]):not([type=radio]),#appScreen #customerDetailView select,#appScreen #customersView input,#appScreen #customersView select,#appScreen #teamView .team-directory-controls input,#appScreen #teamView .team-directory-controls select{font-size:16px!important;min-height:32px!important;padding:4px 6px!important}
}



@media (min-width: 751px){
#appScreen .content{max-width:none!important;width:100%;margin-inline:auto!important;padding:14px clamp(14px,2vw,26px) 24px!important}
#appScreen .view-header{gap:12px;margin-bottom:14px!important;align-items:center}
#appScreen .view-header h1{font-size:23px!important;line-height:1.25;letter-spacing:-.35px}
#appScreen .view-header p{font-size:12px;line-height:1.45;margin-top:4px}
#appScreen .view-header .eyebrow{font-size:9px;margin-bottom:3px}
#appScreen .statbar{gap:10px;margin-bottom:12px!important}
#appScreen .statbar>div{padding:10px 14px!important;border-radius:9px;box-shadow:none}
#appScreen .statbar strong{font-size:21px!important;line-height:1.3;margin-top:2px}
#appScreen .statbar small{font-size:11px}
#appScreen .panel{border-radius:10px;box-shadow:0 3px 12px #43332b06}
#appScreen .panel-header,#appScreen #customersView .eid-customer-list-panel .panel-header{padding:12px 15px!important;gap:10px}
#appScreen .panel-header h2,#appScreen #customersView .eid-customer-list-panel .panel-header h2{font-size:16px!important;line-height:1.3}
#appScreen .panel-header p{font-size:11px}
#appScreen .data-table th,#appScreen #customersView .eid-customer-list-table th{padding:8px 12px!important;line-height:1.35;letter-spacing:.55px}
#appScreen .data-table td,#appScreen #customersView .eid-customer-list-table td{padding:9px 12px!important;line-height:1.4;font-size:12px}
#appScreen .btn:not(.large){min-height:30px;padding:5px 10px;font-size:12px;line-height:1.4;border-radius:7px}
#appScreen #customersView .eid-customer-list-tools{padding:10px 15px 6px!important}
#appScreen #customersView .eid-customer-filters{max-width:880px;gap:9px}
#appScreen #customersView .eid-customer-filter input,#appScreen #customersView .eid-customer-filter select{min-height:32px!important;padding:5px 8px!important;font-size:12px}
#appScreen #customersView .eid-customer-funding-help{margin:8px 0 3px}
#appScreen .page-footnote{margin-top:10px}
#appScreen .fields{gap:10px 14px}
#appScreen .fields label{gap:4px}
#appScreen .fields input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),#appScreen .fields select{min-height:32px;padding:5px 9px;font-size:12px}
#appScreen .editor-heading{padding:12px 18px}
#appScreen .editor-section{margin:12px 18px;padding:12px 15px;border-radius:9px}
#appScreen .editor-footer{padding:10px 18px}
}

/* EiD density 05: full-width workspace, explicit dashboard and form density. */
#appScreen .content{box-sizing:border-box;min-width:0}
#appScreen #overviewView .eid-overview-metrics{gap:10px;margin-bottom:12px}
#appScreen #overviewView .eid-overview-stat{padding:8px 12px;border-radius:8px;box-shadow:none;min-height:0}
#appScreen #overviewView .eid-overview-stat small{font-size:12px;line-height:1.35}
#appScreen #overviewView .eid-overview-stat strong{font-size:18px;line-height:1.25;margin-top:3px;font-weight:650;font-variant-numeric:tabular-nums}
#appScreen #overviewView .eid-overview-shortcuts{gap:8px;padding:10px 12px}
#appScreen #overviewView .eid-shortcut{min-height:0;padding:8px 10px;gap:2px 8px;grid-template-columns:20px minmax(0,1fr);border-radius:8px}
#appScreen #overviewView .eid-shortcut svg{width:18px;height:18px}
#appScreen #overviewView .eid-shortcut b{font-size:13px;line-height:1.35}
#appScreen #overviewView .eid-shortcut small{font-size:11px;line-height:1.35}
#appScreen #overviewView .eid-dashboard-week-grid{gap:10px;padding:10px 12px}
#appScreen #overviewView .eid-dashboard-week-grid h3{font-size:13px;margin:0 0 6px;line-height:1.35}
#appScreen #overviewView .eid-dashboard-week-grid>div{min-width:0;min-height:0;padding:0}
#appScreen #overviewView .panel+.panel{margin-top:10px}
@media(min-width:751px){
#appScreen .content{max-width:none!important;width:100%;margin:0!important;padding:16px 18px 24px!important}
#appScreen .view-header{margin-bottom:12px!important;gap:10px}
#appScreen .view-header h1{font-size:21px!important;line-height:1.3}
#appScreen .statbar>div{padding:7px 11px!important;min-height:0}
#appScreen .statbar strong{font-size:18px!important;line-height:1.25;margin-top:3px}
#appScreen .panel-header,#appScreen #customersView .eid-customer-list-panel .panel-header{padding:9px 12px!important}
#appScreen .panel-header h2{font-size:15px!important}
#appScreen .data-table td,#appScreen #customersView .eid-customer-list-table td{padding:6px 10px!important}
#appScreen .data-table th,#appScreen #customersView .eid-customer-list-table th{padding:6px 10px!important}
#appScreen .btn:not(.large){min-height:28px;padding:4px 9px;font-size:12px;line-height:1.4}
#appScreen #overviewView .eid-overview-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}
#appScreen .eid-settings-content{padding:12px}
#appScreen #eidSettingsBody label{gap:4px}
#appScreen #eidSettingsBody input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]):not([type=range]),#appScreen #eidSettingsBody select{min-height:30px;height:auto;padding:5px 8px;font-size:13px}
}
@media(max-width:750px){
#appScreen .content{max-width:none!important;width:100%;padding:10px 10px 18px!important;margin:0!important}
#appScreen .view-header{margin-bottom:10px!important;gap:8px;flex-wrap:wrap}
#appScreen .view-header h1{font-size:19px!important;line-height:1.3}
#appScreen .view-header p{font-size:12px;line-height:1.4}
#appScreen .panel-header{padding:9px 10px!important;gap:6px}
#appScreen .panel-header h2{font-size:15px!important}
#appScreen #overviewView .eid-overview-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#appScreen #overviewView .eid-overview-stat{padding:7px 6px}
#appScreen #overviewView .eid-overview-stat small{font-size:10px;overflow-wrap:anywhere}
#appScreen #overviewView .eid-overview-stat strong{font-size:17px}
#appScreen #overviewView .eid-overview-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:8px}
#appScreen #overviewView .eid-shortcut{padding:7px;grid-template-columns:16px minmax(0,1fr);min-height:44px}
#appScreen #overviewView .eid-shortcut b{font-size:12px;overflow-wrap:anywhere}
#appScreen #overviewView .eid-shortcut small{font-size:11px;overflow-wrap:anywhere}
#appScreen #overviewView .eid-dashboard-week-grid{grid-template-columns:1fr;gap:8px;padding:8px 10px}
#appScreen #customerDetailView .cd-over-edit,#appScreen #customerDetailView .cd-btn,#appScreen #staffDetailPanel .btn{min-height:32px!important;min-width:32px!important;padding:4px 7px!important}
#appScreen #customerDetailView textarea,#appScreen #staffDetailPanel textarea{font-size:16px!important}
}
@media(max-width:750px){#appScreen #overviewView .eid-dashboard-week-grid:has(#eidDashboardReminders){grid-template-columns:1fr}}
#appScreen #overviewView .eid-dashboard-week-item{padding:5px 0;gap:5px}
