#customer-history-dialog{color:var(--ink);width:min(1080px,calc(100vw - 24px));max-height:94vh;border-radius:20px;background:var(--panel);box-shadow:0 32px 110px #0006}
.ch-shell{display:flex;flex-direction:column;max-height:94vh;min-height:min(650px,90vh)}
.ch-header{padding:24px 28px 18px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line);gap:20px}
.ch-header .eyebrow{margin:0 0 8px}.ch-header h2{font-size:26px;margin:0}.ch-header p:last-child{margin:7px 0 0;color:var(--muted);font-size:13px}.ch-close{font-size:24px;line-height:1}
.ch-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;padding:18px 28px;background:var(--paper);border-bottom:1px solid var(--line)}
.ch-summary small,.ch-summary strong{display:block}.ch-summary small{color:var(--muted);font-size:12px}.ch-summary strong{font-size:23px;margin-top:4px;font-variant-numeric:tabular-nums}
.ch-toolbar{display:flex;justify-content:space-between;align-items:center;padding:16px 28px;gap:10px}.ch-toolbar>small{color:var(--muted)}.ch-tabs{display:flex;gap:8px}.ch-tabs .active{background:var(--teal-dark);color:#fff}
.ch-body{padding:0 28px 20px;overflow:auto;flex:1;min-height:160px}.ch-empty{padding:55px 16px;text-align:center;color:var(--muted)}
.ch-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:18px;padding:15px 0;border-bottom:1px solid var(--line)}
.ch-row-main{min-width:0}.ch-row-main strong{display:block;margin:5px 0;font-size:15px;overflow-wrap:anywhere}.ch-row small{color:var(--muted);font-size:12px}.ch-channel{border:1px solid var(--line);border-radius:5px;padding:2px 6px;margin-right:5px;color:var(--teal-dark);font-weight:700;background:var(--paper)}
.ch-money{font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}.ch-footer{border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:15px 28px;gap:10px}.ch-footer>span{font-size:13px;color:var(--muted)}.ch-footer>div{display:flex;gap:8px}.ch-footer button:disabled{opacity:.4;cursor:default}
.ch-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:10px 0}.ch-detail-heading h3{margin:8px 0;font-size:23px}.ch-detail-heading p{color:var(--muted);font-size:13px}.ch-detail-heading>strong{font-size:26px}.ch-totals{max-width:330px;margin:18px 0 18px auto}.ch-totals p{display:flex;justify-content:space-between;margin:9px 0}.ch-totals p:last-child{border-top:1px solid var(--line);padding-top:12px;font-size:19px}
.ch-product{display:grid;grid-template-columns:220px minmax(0,1fr);gap:30px;padding:20px 0}.ch-product>img,.ch-product-placeholder{width:220px;height:220px;object-fit:contain;border-radius:16px;background:#fff;border:1px solid var(--line)}.ch-product-placeholder{display:grid;place-items:center;background:var(--paper);font-size:60px;color:var(--muted)}.ch-product h3{font-size:25px;line-height:1.2;margin:7px 0}.ch-description{white-space:pre-line;font-size:14px;line-height:1.5;max-height:130px;overflow:auto}.ch-product dl{margin:20px 0}.ch-product dl>div{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding:10px 0}.ch-product dt{color:var(--muted);font-size:13px}.ch-product dd{margin:0;font-weight:700}.ch-add-note{display:block;color:var(--muted);margin-top:12px}#ch-selected{grid-column:1/-1;width:100%;font-size:12px;padding:9px}.ch-member-button{white-space:nowrap}.ch-footer[hidden],.ch-toolbar[hidden]{display:none}
@media(max-width:650px){.ch-header,.ch-summary,.ch-toolbar,.ch-footer{padding:15px}.ch-body{padding:0 15px 15px}.ch-header h2{font-size:21px}.ch-summary{grid-template-columns:repeat(2,1fr);gap:14px}.ch-summary strong{font-size:21px}.ch-row{gap:10px;grid-template-columns:minmax(0,1fr) auto}.ch-row>button{grid-column:1/-1;padding:9px}.ch-toolbar{align-items:flex-start;flex-direction:column}.ch-product{grid-template-columns:1fr;gap:15px}.ch-product>img,.ch-product-placeholder{width:140px;height:140px}.ch-product h3{font-size:21px}.ch-product dl>div{flex-wrap:wrap}.ch-member-button{white-space:normal}}
