.work-order-history-dialog{box-sizing:border-box;width:min(1140px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;overflow:auto;color:var(--text,#e4eaf0);background:var(--surface,#131d24);border:1px solid var(--line,#3d4b56);border-radius:16px;box-shadow:0 24px 90px #0008}
.work-order-history-dialog::backdrop{background:#0009}
.work-order-history-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 26px;border-bottom:1px solid var(--line,#3d4b56)}
.work-order-history-heading h2{font-size:26px;margin:4px 0}
.work-order-history-heading p{margin:4px 0;color:var(--muted,#a2afb8)}
.work-order-history-dialog button,.work-order-history-dialog input{font:inherit}
.work-order-history-heading>button{width:42px;height:42px;border:1px solid var(--line,#3d4b56);border-radius:10px;background:transparent;color:inherit;font-size:25px;flex-shrink:0;cursor:pointer}
.work-order-history-customer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 26px;padding:14px 16px;background:var(--surface-strong,#1c2932);border:1px solid var(--line,#3d4b56);border-radius:10px;overflow-wrap:anywhere}
.work-order-history-customer small,.work-order-history-customer span{color:var(--muted,#a2afb8)}
.work-order-history-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:22px;margin:20px 26px}
.work-order-history-versions label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}
.work-order-history-versions input{box-sizing:border-box;width:100%;min-height:42px;padding:8px 11px;border-radius:8px;border:1px solid var(--line,#3d4b56);background:var(--surface-strong,#1c2932);color:inherit}
.work-order-history-version-list{display:grid;align-content:start;gap:8px;max-height:380px;overflow:auto;margin-top:12px}
.work-order-history-version-list button{display:grid;gap:6px;width:100%;padding:12px;text-align:left;border:1px solid var(--line,#3d4b56);border-radius:9px;background:transparent;color:inherit;cursor:pointer}
.sales-editor .work-order-history-dialog .work-order-history-version-list button{display:grid;grid-auto-rows:auto;align-content:start;height:auto;min-height:112px;max-height:none;overflow:visible;white-space:normal;line-height:1.45;padding:12px;font-size:14px;text-align:left}
.work-order-history-version-list button[aria-pressed=true]{border-color:var(--accent,#c8ff3d);background:var(--surface-strong,#1c2932)}
.work-order-history-version-list button>span{display:flex;justify-content:space-between;gap:10px}
.work-order-history-version-list small{color:var(--muted,#a2afb8);line-height:1.4}
.work-order-history-detail{min-width:0}.work-order-history-version-heading h3{margin:0 0 5px;font-size:20px}.work-order-history-version-heading>span{color:var(--muted,#a2afb8);font-size:13px}
.work-order-history-table-wrap{overflow:auto;margin-top:14px;border:1px solid var(--line,#3d4b56);border-radius:9px}
.work-order-history-dialog table{width:100%;border-collapse:collapse;font-size:14px;table-layout:auto}
.work-order-history-dialog th,.work-order-history-dialog td{padding:11px 12px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line,#3d4b56)}
.work-order-history-dialog th{font-size:12px;background:var(--surface-strong,#1c2932);white-space:nowrap}.work-order-history-dialog td:not(:first-child){white-space:nowrap}.work-order-history-dialog td:first-child{overflow-wrap:anywhere}
.work-order-history-dialog td p{margin:5px 0;white-space:pre-wrap;color:var(--muted,#a2afb8);font-size:13px}.work-order-history-dialog td small{color:var(--muted,#a2afb8)}
.work-order-history-dialog td small,.sales-editor .work-order-history-dialog td small{display:block;margin-top:6px;white-space:normal;line-height:1.45}
.work-order-history-totals{margin:14px 0 0 auto;max-width:280px}.work-order-history-totals>div{display:flex;justify-content:space-between;padding:7px 0}.work-order-history-totals dd{margin:0;font-variant-numeric:tabular-nums}.work-order-history-totals>div:last-child{font-weight:800;border-top:1px solid var(--line,#3d4b56);font-size:18px}
.work-order-history-meta{font-size:14px;line-height:1.5}.work-order-history-notes{white-space:pre-wrap;overflow-wrap:anywhere}
.work-order-history-empty{padding:28px 12px;color:var(--muted,#a2afb8);text-align:center}.work-order-history-price-changes{margin:22px 26px}.work-order-history-price-changes h3{font-size:18px}.work-order-history-notice{margin:18px 26px;padding:12px;border-left:3px solid var(--accent,#c8ff3d);font-size:14px;line-height:1.5}
.work-order-history-dialog footer{display:flex;justify-content:flex-end;padding:16px 26px;border-top:1px solid var(--line,#3d4b56)}.work-order-history-dialog footer button,.work-order-history-error button{padding:10px 18px;border-radius:8px;border:1px solid var(--line,#3d4b56);background:var(--surface-strong,#1c2932);color:inherit;cursor:pointer}
.work-order-history-error{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 26px;padding:14px;background:#742b2b;color:#fff;border-radius:9px}
@media(max-width:800px){.work-order-history-layout{grid-template-columns:1fr;margin:16px;gap:18px}.work-order-history-version-list{max-height:190px}.work-order-history-heading{padding:16px}.work-order-history-customer,.work-order-history-notice,.work-order-history-price-changes{margin:16px}.work-order-history-dialog td,.work-order-history-dialog th{padding:9px 8px}.work-order-history-dialog footer{padding:14px 16px}}
@media(max-width:580px){
 .work-order-history-detail table,.work-order-history-detail tbody{display:block}
 .work-order-history-detail thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .work-order-history-detail tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line,#3d4b56)}
 .work-order-history-detail td{display:block;border:0;padding:10px;white-space:normal!important;overflow-wrap:anywhere}
 .work-order-history-detail td:first-child{grid-column:1/-1;padding-bottom:3px}
 .work-order-history-detail td[data-label]::before{content:attr(data-label);display:block;font-size:11px;color:var(--muted,#a2afb8);margin-bottom:4px}
 .work-order-history-price-changes table{min-width:520px}
}
