.customer-master-editor{
  grid-column:1/-1;
  border:1px solid #b9d7f7;
  border-radius:18px;
  padding:16px;
  background:linear-gradient(135deg,#f5faff 0%,#eef8ff 54%,#f2fffb 100%);
  display:grid;
  gap:14px;
}
.customer-master-head,.customer-master-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.customer-master-head h3{margin:2px 0 0;color:#0d315f;font-size:1.08rem}
.customer-master-head small{color:#58718d}
.customer-mode-switch{display:flex;gap:8px;flex-wrap:wrap}
.customer-mode-switch label{margin:0}
.customer-mode-switch input{position:absolute;opacity:0;pointer-events:none}
.customer-mode-switch span{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding:8px 14px;
  border:1px solid #b6cce4;
  border-radius:999px;
  background:#fff;
  color:#385573;
  font-weight:800;
  cursor:pointer;
}
.customer-mode-switch input:checked+span{
  background:#0f6fbd;
  border-color:#0f6fbd;
  color:#fff;
  box-shadow:0 6px 16px rgba(15,111,189,.18);
}
.customer-master-panel{display:grid;gap:12px}
.customer-master-panel[hidden]{display:none}
.customer-new-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:10px;
}
.customer-master-editor label{font-weight:750;color:#153858}
.customer-master-editor input,.customer-master-editor textarea{
  width:100%;
  margin-top:6px;
}
.customer-search-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}
.customer-search-row button{align-self:end;min-height:44px}
.customer-search-results{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:8px;
  max-height:250px;
  overflow:auto;
}
.customer-result{
  border:1px solid #bfd2e6;
  border-radius:14px;
  padding:11px 12px;
  text-align:left;
  background:#fff;
  color:#173a5c;
  display:grid;
  gap:3px;
}
.customer-result:hover,.customer-result.is-selected{
  border-color:#1675c5;
  background:#eaf5ff;
  box-shadow:0 5px 14px rgba(22,117,197,.12);
}
.customer-result b{font-size:.98rem}
.customer-result strong{color:#0865ae;font-size:.82rem}
.customer-result small{color:#60778d}
.customer-master-summary{
  padding:10px 12px;
  border-radius:14px;
  background:#dff7ed;
  border:1px solid #90dcc2;
}
.customer-master-summary[hidden]{display:none}
.customer-master-summary div{display:grid;gap:2px}
.customer-master-summary b{color:#075f4d}
.customer-master-summary small{color:#427468}
.customer-master-summary button{
  border:1px solid #70bda8;
  background:#fff;
  color:#075f4d;
  border-radius:10px;
  padding:8px 11px;
  font-weight:800;
}
.customer-master-help{
  margin:0;
  color:#5a7086;
  font-size:.82rem;
}
.customer-job-name-note{
  display:block;
  color:#5f748a;
  font-weight:500;
  margin-top:4px;
}
.customer-code-chip{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin:3px 5px 0 0;
  padding:3px 7px;
  border:1px solid #a9c9ea;
  border-radius:999px;
  background:#eaf5ff;
  color:#075f9f;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer;
}
.customer-history-modal{width:min(860px,94vw)}
.customer-history-profile{
  border:1px solid #bad7ee;
  border-radius:16px;
  padding:13px 15px;
  background:#f0f8ff;
  display:grid;
  gap:4px;
}
.customer-history-profile b{font-size:1.05rem;color:#103c68}
.customer-history-profile small{color:#59738c}
.customer-history-list{display:grid;gap:8px;max-height:52vh;overflow:auto;margin-top:12px}
.customer-history-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  border:1px solid #d1deeb;
  border-radius:13px;
  background:#fff;
}
.customer-history-item div{display:grid;gap:2px}
.customer-history-item small{color:#63788c}
.customer-history-item button{white-space:nowrap}
.customer-history-empty{
  padding:24px;
  text-align:center;
  color:#64788c;
  background:#f6f9fc;
  border-radius:14px;
}
@media(max-width:760px){
  .customer-master-editor{padding:13px}
  .customer-new-grid{grid-template-columns:1fr}
  .customer-search-row{grid-template-columns:1fr}
  .customer-search-results{grid-template-columns:1fr}
  .customer-history-item{grid-template-columns:1fr}
}
