/* EiD Office 0.4.0.4 – customer workspace in the EiD brand palette. */
#customerDetailView{max-width:none;width:100%}
#customerDetailView button{cursor:pointer}
#customerDetailView .cd-shell{--cd-stroke:#e3dedb;--cd-muted:#7f7773;color:#383330;min-width:0}
#customerDetailView .cd-backline{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 12px;font-size:11px;color:#9c8b82}
#customerDetailView .cd-back{border:0;color:#8d635c;background:transparent;padding:4px 0;font-weight:700}
#customerDetailView .cd-tabs{display:flex;gap:3px;border-bottom:1px solid #ddd9d6;overflow:auto;scrollbar-width:thin;margin-bottom:0}
#customerDetailView .cd-tabs button{flex-shrink:0;white-space:nowrap;background:transparent;border:1px solid transparent;border-bottom:0;padding:13px 14px;font-size:12px;color:#786f6a;border-radius:9px 9px 0 0}
#customerDetailView .cd-tabs button.selected{background:#fff;color:#7a534c;font-weight:750;border-color:#e5dfda;box-shadow:0 1px #fff}
#customerDetailView .cd-tabs button:hover{color:#885f58;background:#fff9f7}
#customerDetailView .cd-tabs span:first-child{font-size:15px;margin-right:4px}
#customerDetailView .cd-down{margin-left:4px}
#customerDetailView .cd-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 23px 16px;background:#fff;border-radius:0 12px 0 0;border:1px solid #e8e1dd;border-bottom:0;flex-wrap:wrap}
#customerDetailView .cd-head h2{font-size:16px;margin:0 0 2px;color:#3f3936;font-weight:750}
#customerDetailView .cd-head small{font-size:10px;color:#9e8e86}
#customerDetailView .cd-customer-number{color:#a48e87;font-weight:500}
#customerDetailView .cd-head-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
#customerDetailView .cd-btn{background:white;border:1px solid #cbbab3;padding:7px 10px;border-radius:6px;color:#84645b;font-size:11px;font-weight:650;min-height:33px}
#customerDetailView .cd-btn:hover{background:#f8f3f1}
#customerDetailView .cd-btn.danger{color:#9b5855;border-color:#f0d8d5}
#customerDetailView .cd-status{border:1px solid #b9d8c2;color:#49715a;padding:7px 9px;border-radius:6px;font-size:11px}
#customerDetailView .cd-content{padding:22px;background:#fff;border:1px solid #e8e1dd;border-top:1px solid #eee8e4;border-radius:0 0 15px 15px;min-height:340px}
#customerDetailView .cd-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px}
#customerDetailView .cd-col{min-width:0}
#customerDetailView .cd-section-title{margin-bottom:12px}
#customerDetailView .cd-section-title h3{font-size:13px;color:#403935;margin:0 0 4px}
#customerDetailView .cd-section-title p{font-size:11px;color:#9c8b85}
#customerDetailView .cd-group-title{margin:22px 0 7px;font-weight:700;font-size:12px;display:flex;justify-content:space-between;gap:10px}
#customerDetailView .cd-group-title button{background:transparent;border:0;color:#70a68c;font-size:15px}
#customerDetailView .cd-kv{border-bottom:1px solid #e6e3e0;padding:10px 0;display:flex;justify-content:space-between;gap:14px;align-items:flex-start;font-size:11px}
#customerDetailView .cd-kv span:first-child{color:#92837c}
#customerDetailView .cd-kv strong{font-size:11px;font-weight:650;text-align:right;overflow-wrap:anywhere;min-width:0;max-width:65%}
#customerDetailView .cd-fine{font-size:10px;color:#aaa09a;line-height:1.55;margin-top:12px}
#customerDetailView .cd-pill{border-radius:6px;padding:3px 6px;background:#e8f5eb;color:#48855e;display:inline-block;font-size:10px;font-weight:700;margin:2px}
#customerDetailView .cd-pill.off{background:#f4f0ee;color:#84756d}
#customerDetailView .cd-muted{color:#a9a09b;font-weight:400}
#customerDetailView .cd-small{font-size:11px;color:#93837c;line-height:1.65;margin:10px 0}
#customerDetailView .cd-person{padding:7px;border-bottom:1px solid #eee9e5;font-size:11px}
#customerDetailView .cd-subtabs{display:flex;overflow-x:auto;gap:3px;margin-bottom:18px;padding-bottom:0;border-bottom:1px solid #e8e1de;scrollbar-width:thin}
#customerDetailView .cd-subtabs button{font-size:11px;color:#877a73;white-space:nowrap;background:transparent;border:1px solid transparent;border-bottom:0;border-radius:7px 7px 0 0;padding:11px 13px}
#customerDetailView .cd-subtabs button.active{background:#fff;color:#7c514a;font-weight:750;border-color:#ddd2ca}
#customerDetailView .cd-card{border:1px solid #e6e0da;background:#fff;border-radius:10px;padding:18px;margin-bottom:15px;min-width:0}
#customerDetailView .cd-form{min-width:0}
#customerDetailView .cd-form-grid{display:grid;gap:16px 18px;margin-bottom:16px}
#customerDetailView .cd-form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
#customerDetailView .cd-form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
#customerDetailView .cd-field{font-size:11px;font-weight:650;display:flex;flex-direction:column;gap:6px;color:#5b504b;min-width:0}
#customerDetailView .cd-field input,#customerDetailView .cd-field select,#customerDetailView .cd-field textarea,#customerDetailView .cd-table input,#customerDetailView .cd-inline-create select{padding:9px 10px;border:1px solid #ddd5d0;border-radius:6px;min-height:36px;font:inherit;font-size:12px;width:100%;background:#fff;color:#3b3531}
#customerDetailView .cd-field textarea{resize:vertical;min-height:70px}
#customerDetailView .cd-form-footer{margin-top:15px;display:flex;justify-content:flex-end}
#customerDetailView .cd-save{padding:10px 16px;background:#7b9f89;border:0;color:white;font-size:12px;font-weight:750;border-radius:6px;min-height:37px}
#customerDetailView .cd-save:hover{background:#628773}
#customerDetailView .cd-save:disabled{opacity:.55}
#customerDetailView .cd-checkfield{border:1px solid #e4dedb;border-radius:7px;padding:10px;font-size:11px}
#customerDetailView .cd-checkfield legend{font-weight:700}
#customerDetailView .cd-checkfield label{display:block;padding:4px 0}
#customerDetailView .cd-checkfield input{width:auto;min-height:auto;margin-right:6px}
#customerDetailView .cd-notice{margin-top:12px;background:#eff7f3;border:1px solid #d7e9df;color:#607e6c;padding:12px;border-radius:6px;font-size:11px;line-height:1.55}
#customerDetailView .cd-switch{display:flex;gap:10px;align-items:center;margin:12px 0;cursor:pointer;font-size:12px;font-weight:650}
#customerDetailView .cd-switch input{position:absolute;opacity:0;width:1px;height:1px}
#customerDetailView .cd-track{width:27px;height:16px;border-radius:99px;background:#cacac8;display:block;position:relative;flex:0 0 27px}
#customerDetailView .cd-track:after{content:'';position:absolute;left:3px;top:3px;width:10px;height:10px;border-radius:100%;background:white;transition:.1s}
#customerDetailView .cd-switch input:checked+.cd-track{background:#63a779}
#customerDetailView .cd-switch input:checked+.cd-track:after{left:14px}
#customerDetailView .cd-split{display:grid;grid-template-columns:1.2fr 1fr;gap:15px}
#customerDetailView .cd-stack{display:grid;gap:15px}
#customerDetailView .cd-document-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}
#customerDetailView .cd-drop{display:flex;align-items:center;justify-content:center;flex-direction:column;border:2px dashed #d9cfc9;background:#fbfaf8;border-radius:8px;min-height:155px;cursor:pointer;gap:8px;font-size:12px;color:#826c61;text-align:center}
#customerDetailView .cd-drop.dragging{border-color:#709883;background:#f2faf5}
#customerDetailView .cd-drop input{display:none}
#customerDetailView .cd-drop small{font-size:10px;color:#a4968e}
#customerDetailView .cd-file{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e8e0da;border-radius:7px;padding:12px;margin:8px 0}
#customerDetailView .cd-file b{font-size:12px}
#customerDetailView .cd-file small,#customerDetailView .cd-entry small{font-size:10px;color:#aaa09a;display:block;margin-top:4px}
#customerDetailView .cd-file>div:last-child{display:flex;gap:4px;flex-wrap:wrap}
#customerDetailView .cd-entry{display:flex;justify-content:space-between;gap:12px;align-items:start;border:1px solid #e6e1de;border-radius:8px;padding:12px;margin:12px 0}
#customerDetailView .cd-entry p{font-size:12px;white-space:pre-wrap;margin-top:8px}
#customerDetailView .cd-entries{margin-top:16px}
#customerDetailView .cd-site-line{display:flex;justify-content:space-between;gap:12px;align-items:center;padding-bottom:15px;border-bottom:1px solid #eee4df;margin-bottom:20px}
#customerDetailView .cd-site-line b{font-size:13px}
#customerDetailView .cd-special{background:#f7f5f3;padding:14px;margin-top:15px;border-radius:7px;font-size:11px;line-height:1.65}
#customerDetailView .cd-special small{display:block;color:#91857e}
#customerDetailView .cd-rate{border:1px solid #e7e0db;border-radius:9px;margin:10px 0;padding:14px}
#customerDetailView .cd-rate .cd-form-grid{margin:8px 0 0}
#customerDetailView .cd-table-wrap{overflow-x:auto;max-width:100%}
#customerDetailView .cd-table{border-collapse:collapse;width:100%;min-width:640px;font-size:11px;text-align:left}
#customerDetailView .cd-table th{border-bottom:1px solid #b8ada6;color:#85756e;padding:11px 8px;font-size:11px}
#customerDetailView .cd-table td{padding:10px 8px;border-bottom:1px solid #e9e2dd;vertical-align:top}
#customerDetailView .cd-table td input[type=time]{max-width:100px;display:inline-block}
#customerDetailView .cd-empty{padding:18px;text-align:center;color:#a69a93;font-size:12px}
#customerDetailView .cd-budget-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
#customerDetailView .cd-budget-metric{border:1px solid #e6ddd6;border-radius:8px;padding:15px;background:#fff;text-align:center;display:grid;gap:6px}
#customerDetailView .cd-budget-metric strong{color:#558a65;font-size:17px}
#customerDetailView .cd-budget-metric small{color:#94867e;font-size:10px}
#customerDetailView .cd-inline-create{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));align-items:end;gap:11px;margin:10px 0 18px}
#customerDetailView .cd-inline-create .cd-save{min-width:160px}
#customerDetailView .cd-inline-create .cd-field:has(textarea){grid-column:span 2}
#customerDetailView .cd-positive{color:#519668;font-weight:750}
#customerDetailView .cd-negative{color:#c16a66;font-weight:750}
#customerDetailView .cd-list-heading{display:flex;justify-content:space-between;border-bottom:1px solid #e6e1db;padding:15px 0 8px;font-weight:750;font-size:12px}
#customerDetailView .cd-list-heading small{color:#9b938f}
#customerDetailView .cd-loading{padding:40px;background:white;border-radius:10px}
@media(max-width:1400px){#customerDetailView .cd-tabs button{padding:11px 8px;font-size:11px}#customerDetailView .cd-three{gap:17px}}
@media(max-width:1100px){#customerDetailView .cd-three{grid-template-columns:1fr 1fr}#customerDetailView .cd-col:last-child{grid-column:1/-1}#customerDetailView .cd-form-grid.three{grid-template-columns:1fr 1fr}}
@media(max-width:730px){#customerDetailView .cd-content{padding:12px}#customerDetailView .cd-head{padding:14px}#customerDetailView .cd-three,#customerDetailView .cd-split,#customerDetailView .cd-document-grid,#customerDetailView .cd-form-grid.two,#customerDetailView .cd-form-grid.three,#customerDetailView .cd-budget-metrics,#customerDetailView .cd-inline-create{grid-template-columns:1fr}#customerDetailView .cd-col:last-child{grid-column:auto}#customerDetailView .cd-inline-create .cd-field:has(textarea){grid-column:auto}#customerDetailView .cd-subtabs{overflow-x:auto}}

/* Customer workspace uses the full application column width on large displays. */
@media(min-width:751px){
 .content:has(#customerDetailView:not(.hidden)){max-width:none;width:100%;margin:0;padding:12px clamp(10px,1.3vw,24px) 22px;}
}

/* v0.4.0.5: only existing employees can be assigned in customer record */
#customerDetailView #cdAddTeam{grid-template-columns:repeat(3,minmax(0,1fr));}
#customerDetailView #cdAddTeam .cd-save{grid-column:1/-1;justify-self:start;min-width:235px;}
#customerDetailView #cdAddTeam select{cursor:pointer;}
@media(max-width:730px){#customerDetailView #cdAddTeam{grid-template-columns:1fr;}#customerDetailView #cdAddTeam .cd-save{width:100%;}}

/* 0.4.0.8 – Auto-filled, non-editable text displays (no dropdown chevrons) */
#customerDetailView #cdAddTeam input[readonly]{
  background:#f5f2ef;
  border-color:#dfd5cf;
  color:#655a54;
  opacity:1;
  cursor:default;
}
#customerDetailView #cdAddTeam input[readonly]:focus{
  outline:none;
  box-shadow:none;
}
#customerDetailView #cdAddTeam select[name="personId"]{cursor:pointer;}

/* 0.4.1.4 – Back navigation from an assigned employee keeps its origin clear. */
#customerDetailView .cd-back-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
#customerDetailView .cd-back-secondary{font-weight:600;color:#856c64}

/* Kundenübersicht: direkte Bearbeitung, EiD CI */
#customerDetailView .cd-over-block{border:1px solid #e4dcd6;border-radius:12px;padding:14px;margin:0 0 12px;background:#fff;min-width:0}
#customerDetailView .cd-over-block header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;flex-wrap:wrap}
#customerDetailView .cd-over-block h3{font-size:14px;margin:0;color:#58483f;min-width:0;overflow-wrap:anywhere}
#customerDetailView .cd-over-edit{background:#F0ECE8;color:#58483f;border:1px solid #DBCFCF;border-radius:8px;padding:7px 10px;font-size:12px;min-height:44px;flex-shrink:0}
#customerDetailView .cd-over-note{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;color:#58483f}
#customerDetailView .cd-over-form[hidden]{display:none!important}
#customerDetailView .cd-over-form{margin-top:12px;padding-top:12px;border-top:1px solid #DBCFCF}
#customerDetailView .cd-over-fields{display:grid;gap:12px;min-width:0}
#customerDetailView .cd-over-fields input,#customerDetailView .cd-over-fields select,#customerDetailView .cd-over-fields textarea{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#customerDetailView .cd-over-actions,#customerDetailView .cd-over-quick{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#customerDetailView .cd-over-actions button{min-height:44px}
@media(max-width:730px){
#customerDetailView .cd-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:4px}
#customerDetailView .cd-tabs button{white-space:normal;overflow-wrap:anywhere;min-width:0;min-height:48px;padding:6px;font-size:11px}
#customerDetailView .cd-tabs button span{display:block;margin:0!important}
#customerDetailView .cd-overview{grid-template-columns:minmax(0,1fr);gap:18px}
#customerDetailView .cd-overview .cd-kv{font-size:14px;gap:8px;flex-wrap:wrap}
#customerDetailView .cd-overview .cd-kv strong{font-size:14px;text-align:left;max-width:100%}
#customerDetailView .cd-over-block h3{font-size:16px}
#customerDetailView .cd-over-edit{font-size:13px;min-width:44px}
#customerDetailView .cd-over-fields input,#customerDetailView .cd-over-fields select,#customerDetailView .cd-over-fields textarea{font-size:16px;min-height:44px}
#customerDetailView .cd-over-actions button{flex:1 1 110px;min-width:0}
#customerDetailView .cd-head h2{overflow-wrap:anywhere;font-size:18px}
#customerDetailView .cd-head-actions .cd-btn{min-height:44px}
#customerDetailView .cd-overview .cd-group-title button{min-width:44px;min-height:44px}
}
