.customer-relation { display:grid; gap:1rem; max-width:73rem; min-width:0; }
.customer-relation-overview { display:grid; gap:.55rem; padding:1rem; }
.customer-relation-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,11rem),1fr)); gap:.8rem 1rem; }
.customer-relation-summary>div { min-width:0; border-left:2px solid #dce4db; padding:.04rem .65rem; }
.customer-relation-summary span,.customer-relation-summary time { display:block; color:var(--muted); font-size:.78rem; }
.customer-relation-summary strong { display:block; margin:.18rem 0; color:var(--ink); font-size:.92rem; overflow-wrap:anywhere; }
.customer-relation-summary time { margin:.17rem 0 0; }
.customer-relation-overview .text-link { min-height:44px; justify-self:start; text-align:left; }
.customer-relation-layout { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,.8fr); align-items:start; gap:1rem; }
.customer-relation-editor,.customer-relation-history { min-width:0; padding:1.1rem; }
.customer-relation-editor fieldset { border:0; padding:0; margin:0; min-width:0; }
.customer-relation-editor legend,.customer-relation-history h2 { margin:0 0 .85rem; padding:0; color:var(--ink); font-size:1.22rem; font-weight:700; letter-spacing:-.018em; }
.customer-relation-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem .76rem; }
.customer-relation-editor .field { min-width:0; margin:0 0 .65rem; }
.customer-relation-editor .field span { overflow-wrap:anywhere; }
.customer-relation-editor .field :is(input,select,textarea) { width:100%; min-width:0; min-height:44px; }
.customer-relation-editor :is(input[type="date"],input[type="datetime-local"])::-webkit-date-and-time-value { text-align:left; }
.customer-relation-editor .field:has(textarea) textarea { min-height:4.8rem; resize:vertical; }
.customer-relation-detail { margin:.8rem 0 0; padding:.72rem 0 0; border-top:1px solid var(--line); }
.customer-relation-detail h3 { margin:0 0 .53rem; font-size:.94rem; }
.customer-relation-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.48rem .65rem; margin:.75rem 0 0; }
.customer-relation-actions .btn { min-height:44px; }
.customer-relation-actions [hidden],.customer-relation-actions p:empty { display:none; }
.customer-relation-actions p { margin:0; color:var(--brand); font-size:.83rem; overflow-wrap:anywhere; }
.customer-relation-actions p[role="alert"] { color:#873929; }
.customer-relation-timeline { margin:0; padding:0; list-style:none; }
.customer-relation-timeline li { min-width:0; padding:.75rem 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.customer-relation-timeline header { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:.22rem .5rem; }
.customer-relation-timeline header small,.customer-relation-muted { color:var(--muted); margin:0; font-size:.8rem; }
.customer-relation-timeline li>p { white-space:pre-wrap; font-size:.89rem; margin:.4rem 0 0; }
.customer-relation-timeline .customer-relation-history-fact { color:var(--muted); font-size:.81rem; }
.customer-relation-timeline .customer-relation-history-fact b { color:var(--brand); }
@media(max-width:770px) {
  .customer-relation-layout { grid-template-columns:minmax(0,1fr); }
  .customer-relation-editor,.customer-relation-history { padding:.85rem; }
  .customer-relation-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:420px) {
  .customer-relation-form-grid { grid-template-columns:minmax(0,1fr); gap:.16rem; }
  .customer-relation-basics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.4rem .6rem; }
  .customer-relation-basics .field select { font-size:.82rem; }
}
