:root{--ink:#173947;--muted:#6a7c83;--teal:#087e80;--border:#dce6e8;--bg:#f4f7f8}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button,a.button{cursor:pointer;border:0;background:var(--teal);color:white;padding:10px 17px;border-radius:9px;text-decoration:none;display:inline-block}button.secondary,a.secondary{background:#e9f1f2;color:var(--ink)}button.danger{background:#faeaea;color:#a83b3b}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{width:100%;padding:10px 12px;border:1px solid #cbdadd;border-radius:8px;background:white;color:var(--ink)}textarea{min-height:90px}label{display:block;color:#536c76;font-size:13px;margin-bottom:5px}h1{font-size:29px;margin:0 0 5px;letter-spacing:-.7px}h2{font-size:19px;margin:0 0 18px}p{margin:8px 0}.muted{color:var(--muted)}.small{font-size:12px}.shell{display:grid;grid-template-columns:235px 1fr;min-height:100vh}.sidebar{background:#163945;color:white;padding:29px 20px;display:flex;flex-direction:column;gap:25px}.brand{font-size:25px;font-weight:750;letter-spacing:2px}.brand small{display:block;font-weight:400;letter-spacing:0;font-size:12px;color:#adc7cf}.nav{display:flex;flex-direction:column;gap:7px}.nav button{text-align:left;background:transparent;color:#cadce1}.nav button.active{background:#2b515d;color:white}.identity{margin-top:auto;font-size:13px;color:#d1e0e4}.main{padding:32px 40px;max-width:1500px;width:100%;margin:auto}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px;gap:20px}.demo{display:inline-block;background:#fff1ce;color:#826422;padding:5px 10px;border-radius:20px;font-size:12px}.notice{padding:14px 18px;background:#fff7e6;border:1px solid #f0dfb7;border-radius:10px;color:#806232;margin-bottom:23px}.card{padding:23px;background:white;border:1px solid var(--border);border-radius:13px;margin-bottom:18px;box-shadow:0 3px 8px #16394503}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.span{grid-column:1/-1}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:18px}.metric strong{display:block;font-size:29px;letter-spacing:-.5px}.metric span{font-size:13px;color:var(--muted)}.filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin-bottom:18px}.filters>div{flex:1;min-width:135px}.scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}td,th{text-align:left;padding:13px 12px;border-bottom:1px solid #e6edef}th{font-size:11px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);background:#f7f9fa}.badge{padding:4px 9px;border-radius:15px;font-size:11px;background:#e8eff1;display:inline-block}.badge.active{background:#dff3eb;color:#238459}.badge.deactivated,.badge.cancelled{background:#f9e8e8;color:#a55757}.empty{text-align:center;padding:50px 20px;color:var(--muted)}.login{max-width:440px;margin:10vh auto}.login .brand{color:var(--ink);margin-bottom:25px}.login .brand small{color:var(--muted)}.login form>div{margin-bottom:17px}#toast{position:fixed;bottom:25px;right:25px;background:#183b46;color:white;padding:12px 20px;border-radius:10px;max-width:450px;display:none;z-index:10}#toast.error{background:#a94747}details{margin-top:18px}summary{cursor:pointer}.file{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}.status-flow{display:flex;gap:15px;color:var(--muted);font-size:13px;margin:12px 0 25px}.status-flow b{color:var(--teal)}pre{white-space:pre-wrap;word-break:break-word;background:#f3f7f8;padding:15px}.credentials{font-family:monospace}@media(max-width:1000px){.main{padding:25px}.grid.four{grid-template-columns:1fr 1fr}.grid.three{grid-template-columns:1fr 1fr}}@media(max-width:720px){.shell{display:block}.sidebar{padding:18px}.nav{flex-direction:row;flex-wrap:wrap;gap:4px}.identity{display:none}.main{padding:20px 14px}.grid,.grid.three{grid-template-columns:1fr}.top{align-items:start}.login{margin:5vh 14px}.brand{font-size:22px}}
/* Selection controls stay beside their label instead of stretching like text fields. */
input[type="checkbox"],input[type="radio"]{width:auto;padding:0;margin:0 8px 0 0;vertical-align:middle;accent-color:var(--teal)}


.account-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.top{flex-wrap:wrap}

.sale-form{max-width:1000px}.client-grid{display:grid;grid-template-columns:2fr 1fr;gap:20px}.field-hint{font-size:12px;color:var(--muted);margin:7px 0 0}.field-label{display:flex;justify-content:space-between;gap:10px}.sale-summary{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sale-summary h2{margin-bottom:14px}.sale-summary select{max-width:240px}.sale-total{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.sale-total strong{font-size:30px;line-height:1.3}.form-error{color:#a83b3b;background:#fff1f1;border-radius:8px;padding:12px;margin:0}input:focus,select:focus{outline:2px solid var(--teal);outline-offset:2px}.sale-form button:disabled{cursor:wait}@media(max-width:720px){.client-grid,.sale-summary{grid-template-columns:1fr}.sale-total{align-items:stretch}.sale-summary select{max-width:none}.sale-form .status-flow{flex-wrap:wrap}}

.account-actions{display:grid;grid-template-columns:auto auto;justify-items:end;align-items:center}.account-identity{grid-column:2;text-align:right;font-size:13px;color:var(--muted);max-width:330px}.account-identity b{color:var(--ink)}@media(max-width:720px){.account-actions{grid-template-columns:1fr}.account-identity{grid-column:1}}

.rat-form-preview{width:100%;height:76vh;border:1px solid #d9e3e8;border-radius:8px}
/* Support panel is independent of the tour. */
.help-panel{position:fixed;z-index:1100;right:16px;bottom:16px;width:min(460px,calc(100vw - 32px));max-height:90vh;overflow:auto;background:white;border:1px solid #ccdce2;box-shadow:0 8px 40px #0003;border-radius:16px;padding:20px}.help-panel h2{font-size:20px}.help-panel textarea{min-height:80px;max-height:150px;width:100%}.help-panel details{margin-top:14px}.help-panel summary{cursor:pointer;font-weight:600}.help-panel p{line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}#help-messages{max-height:32vh;overflow:auto}.help-panel .top{gap:8px}@media(max-width:600px){.help-panel{right:8px;bottom:8px;width:calc(100vw - 16px);padding:16px}.account-actions #help-tour,.account-actions #help-chat{grid-column:1}}
/* Anchored tour: clear spotlight and a nearby popover instead of a bottom sheet. */
.guide-active .main{padding-bottom:75vh}
.guide-dialog{position:fixed;inset:0;z-index:1200;display:block;padding:0;pointer-events:none}
.guide-blocker{position:absolute;inset:0;z-index:1;pointer-events:auto;background:transparent}
.guide-shade{position:fixed;z-index:0;background:rgba(9,33,44,.57);pointer-events:none}
.guide-dialog .guide-box{position:fixed;z-index:3;background:white;color:var(--ink);border-radius:14px;box-shadow:0 8px 40px #0005;width:360px;max-width:calc(100vw - 24px);max-height:min(360px,calc(100vh - 24px));overflow:visible;margin:0;padding:18px;border:1px solid #dbe6e9;pointer-events:auto}
.guide-box h2{font-size:18px;margin:6px 0 10px}
.guide-box p{font-size:14px;line-height:1.5;margin:0 0 12px}
.guide-box .actions{margin-top:12px;gap:7px}
.guide-box .actions button{min-height:44px;font-size:13px;padding:9px 12px;flex:none}
.guide-box #guide-later{width:100%;padding:7px;background:transparent;text-align:left;font-size:12px;color:var(--muted);min-height:32px}
.guide-box::before{content:"";position:absolute;width:13px;height:13px;background:white;border:1px solid #dbe6e9;transform:rotate(45deg);pointer-events:none}
.guide-box[data-side="right"]::before{left:-7px;top:calc(var(--guide-arrow-y) - 7px);border-right:0;border-top:0}
.guide-box[data-side="left"]::before{right:-7px;top:calc(var(--guide-arrow-y) - 7px);border-left:0;border-bottom:0}
.guide-box[data-side="bottom"]::before{top:-7px;left:calc(var(--guide-arrow-x) - 7px);border-right:0;border-bottom:0}
.guide-box[data-side="top"]::before{bottom:-7px;left:calc(var(--guide-arrow-x) - 7px);border-left:0;border-top:0}
.guide-box.guide-no-arrow::before{display:none}
.guide-dialog #guide-highlight{position:fixed;pointer-events:none;z-index:2;border:3px solid #ffc75b;border-radius:9px;box-shadow:0 0 0 2px #fff9;background:transparent}
.guide-demo-label{font-size:12px;padding:10px 14px}
@media(max-width:600px){.guide-dialog .guide-box{padding:15px;width:340px}.guide-box h2{font-size:17px}.guide-box p{font-size:13px}.guide-box .actions button{min-height:40px}.guide-active .main{padding-bottom:85vh}}

.guide-box #guide-text{max-height:max(40px,min(170px,calc(100vh - 230px)));overflow-y:auto;overscroll-behavior:contain}
@media(max-height:300px){.guide-dialog .guide-box{overflow:auto}.guide-box::before{display:none}}

.guide-dialog .guide-box{display:flex;flex-direction:column}
.guide-box #guide-count,.guide-box h2,.guide-box .actions{flex-shrink:0}
.guide-box #guide-text{flex-shrink:1;min-height:0}

/* Selectable product cards keep labels and selection visible on mobile. */
.product-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0}.product-choice{position:relative;display:block;padding:14px;border:2px solid var(--border);border-radius:16px;background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s}.product-choice.selected{border-color:var(--teal);box-shadow:0 0 0 3px #087e8015}.product-choice img{width:100%;height:145px;object-fit:contain;display:block;border-radius:12px;margin-bottom:12px}.product-choice>span:not(.product-check){display:block;padding-right:32px}.product-choice b{font-size:20px}.product-choice small{display:block;color:var(--muted);margin-top:3px}.product-choice input{position:absolute;top:22px;right:22px;width:22px;height:22px;accent-color:var(--teal)}.product-check{position:absolute;bottom:20px;right:20px;color:var(--teal);font-size:24px;visibility:hidden}.product-choice.selected .product-check{visibility:visible}.product-choice:focus-within{outline:3px solid #ffc75b;outline-offset:3px}#product-sale [hidden]{display:none!important}#product-sale .card label{margin-top:8px}#partner-editor details{margin:16px 0;max-height:360px;overflow:auto}#partner-editor details label{display:block}#partner-editor input[type=checkbox],#product-tariff-form input[type=checkbox]{width:auto;margin-right:8px}#product-sale input[type=checkbox]{width:22px}#product-options .grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:680px){.product-choices{gap:10px}.product-choice{padding:10px}.product-choice img{height:100px}.product-choice b{font-size:17px}.product-choice small{font-size:11px}.product-choice input{top:14px;right:14px}.product-check{right:10px;bottom:14px}#product-options .grid.three{grid-template-columns:1fr}}

.act-check{display:flex;align-items:center;gap:10px;margin:16px 0}.act-check input[type=checkbox],.act-selection input[type=checkbox]{width:auto;min-width:18px;min-height:18px;margin:0}.act-selection th:first-child,.act-selection td:first-child{width:44px}

/* Compact product banners reused from LK Agent emails; never stretch a lone card. */
.product-choices{grid-template-columns:repeat(auto-fill,minmax(180px,220px));gap:12px;margin:14px 0}
.product-choice{padding:6px;border-radius:12px;max-width:220px;margin:0}
.product-choice img{width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;border-radius:8px;margin:0}
.product-choice>span.product-caption{display:flex;align-items:center;gap:8px;padding:9px 4px 4px;min-height:36px}
.product-choice b{font-size:14px;line-height:1.3}
#product-sale .product-choice input{position:static;flex:0 0 18px;width:18px;height:18px;margin:0;padding:0}
@media(max-width:520px){.product-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-choice{max-width:220px;padding:4px}.product-choice b{font-size:13px}.product-choice>span.product-caption{padding:7px 2px 3px}}

/* Payment choices: only schemes present in the partner product's enabled tariffs. */
.sale-schemes{border:0;padding:0;margin:16px 0 22px;min-width:0}
.sale-schemes legend{font-weight:700;margin-bottom:10px}
.scheme-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,240px));gap:12px}
.scheme-choice{display:flex;flex-direction:column;border:2px solid #d9e5e8;border-radius:12px;padding:6px;margin:0;cursor:pointer;color:var(--ink,#183b48)}
.scheme-choice.selected{border-color:#087f83;box-shadow:0 0 0 2px #e4f3f2}
.scheme-choice:focus-within{outline:3px solid #f4cf80;outline-offset:2px}
.scheme-picture{position:relative;display:block}
.scheme-picture>img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:8px}
.scheme-picture>img.scheme-rat-logo{position:absolute;right:8px;bottom:8px;width:68px;height:auto;aspect-ratio:auto;object-fit:contain;padding:5px;border-radius:6px;background:white}
.scheme-caption{display:flex;align-items:flex-start;gap:7px;padding:10px 3px 5px;line-height:1.35}
#product-sale .scheme-caption input{position:static;width:18px;height:18px;flex:0 0 18px;padding:0;margin:1px 0 0}
.scheme-note{font-size:12px;line-height:1.4;color:#54707b}
.scheme-choice small{display:block;padding:0 3px 6px;font-size:12px;line-height:1.4;color:#54707b}
@media(max-width:520px){.scheme-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.scheme-caption b{font-size:13px}}

/* Short payment illustrations and compact customer fields. */
.scheme-picture{height:76px;background:#eef5f6;border-radius:8px;display:flex;align-items:center;justify-content:center}
.scheme-picture>img{height:76px;aspect-ratio:3/1;object-fit:contain}
.scheme-picture>img.scheme-rat-main{width:120px;height:auto;max-height:62px;aspect-ratio:auto;border-radius:0}
.scheme-choice.unavailable{opacity:.55;cursor:default}
.partner-payment-options{border:1px solid var(--border);border-radius:9px;padding:12px;margin:16px 0}
.partner-payment-options legend{font-weight:700;padding:0 5px}
.sale-client-grid{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:start;max-width:900px}
.sale-client-grid>div{flex:0 1 auto;max-width:100%}
.sale-client-grid>div:first-child{width:500px}
.sale-client-grid>div:nth-child(2){width:205px}
.sale-client-grid>div:nth-child(3){width:280px}
.sale-client-grid>div:nth-child(4){width:205px}
.sale-client-grid>div:nth-child(5){width:260px}
#product-sale #identifier{font-family:ui-monospace,monospace;letter-spacing:.35px}
@media(max-width:600px){.sale-client-grid{gap:12px}.scheme-picture,.scheme-picture>img{height:64px}}

.warranty-data-grid{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:start;max-width:1120px}
.warranty-data-grid>div{flex:0 1 auto;max-width:100%;width:155px}
.warranty-data-grid>.warranty-price{width:230px}
.warranty-data-grid>.warranty-type{width:230px}
.warranty-data-grid>.warranty-mileage{width:150px}
.warranty-data-grid>.warranty-year{width:115px}
.warranty-data-grid>.warranty-manufacturer-row{width:100%;flex-basis:100%;display:flex;flex-wrap:wrap;gap:14px 18px;align-items:flex-end}
.warranty-manufacturer-row>.manufacturer-question{width:240px;max-width:100%}
.warranty-manufacturer-row>#manufacturer-end{width:210px;max-width:100%}
.warranty-data-grid label{min-height:36px;display:flex;align-items:end}
@media(max-width:600px){.warranty-data-grid,.warranty-manufacturer-row{gap:12px}.warranty-data-grid label{min-height:0}}


/* Support review uses the same form vocabulary as the partner settings. */
.help-feedback{font-size:12px;padding:6px 10px;min-height:32px;margin:0 0 12px}
.knowledge-review{max-width:900px}.knowledge-review h3{font-size:15px;margin:16px 0 6px}.knowledge-copy{white-space:pre-wrap;overflow-wrap:anywhere;max-width:75ch}
.knowledge-review>label{margin-top:16px}.knowledge-review textarea{min-height:130px}.knowledge-roles{display:flex;gap:10px 20px;flex-wrap:wrap;border:1px solid var(--border);border-radius:8px;padding:12px;margin-top:16px}.knowledge-roles label,.knowledge-confirm{display:flex;align-items:center;gap:5px}.knowledge-roles legend{font-size:13px;color:var(--muted)}

.setting-check{display:flex;align-items:flex-start;gap:10px;max-width:65ch;margin:16px 0}.setting-check input[type=checkbox]{flex:none;min-width:18px;min-height:18px;margin:2px 0 0}
/* Owner partner workspace: compact, scoped tables and explicit review. */
.partner-workspace .pw-header,.partner-workspace .pw-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.partner-workspace .pw-header h2{margin:6px 0}.partner-workspace .pw-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.partner-workspace .pw-tabs [aria-current=page]{background:var(--teal);color:white}.partner-workspace .pw-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.partner-workspace dt{color:var(--muted);font-size:13px}.partner-workspace dd{margin:6px 0;font-weight:600}.partner-workspace .pw-table{overflow:auto;max-height:580px;border:1px solid var(--border);border-radius:12px}.partner-workspace .pw-table table{margin:0;min-width:900px}.partner-workspace th{position:sticky;top:0;z-index:1;background:#f3f7f8}.partner-workspace td{font-variant-numeric:tabular-nums;vertical-align:top}.partner-workspace td .field-hint{display:block;max-width:220px}.partner-workspace td button{font-size:12px;padding:9px 12px;margin-top:5px;white-space:nowrap}.partner-workspace .pw-document{display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--border);padding:18px 0;overflow-wrap:anywhere}.partner-workspace .pw-document code{font-size:12px;overflow-wrap:anywhere}.partner-workspace .pw-review{border:2px solid var(--teal)}.partner-workspace fieldset{border:1px solid var(--border);border-radius:12px;margin:18px 0;padding:16px}.partner-workspace fieldset label{display:inline-block;margin:8px 20px 8px 0}.partner-workspace .card:empty{display:none}.partner-workspace select,.partner-workspace input{max-width:100%}@media(max-width:760px){.partner-workspace .pw-summary{grid-template-columns:1fr}.partner-workspace .pw-document{display:block}.partner-workspace .pw-tabs button{flex:1 1 42%}.partner-workspace .pw-table{max-height:65vh}}
.shell:has(.partner-workspace){grid-template-columns:235px minmax(0,1fr)}.main:has(.partner-workspace){min-width:0}.partner-workspace{min-width:0;max-width:100%}.partner-workspace .pw-table{width:100%;max-width:100%}.partner-workspace .pw-table table{table-layout:fixed;min-width:1080px}.partner-workspace td,.partner-workspace th{overflow-wrap:anywhere}.partner-workspace .pw-document>div{min-width:0}
.partner-workspace table{white-space:normal}.partner-workspace .pw-table table{table-layout:auto;min-width:760px}.partner-workspace .pw-table table:has(#pw-rows){table-layout:fixed;min-width:1120px}.partner-workspace table:has(#pw-rows) th:first-child{width:18%}.partner-workspace table:has(#pw-rows) th:nth-child(2){width:14%}.partner-workspace table:has(#pw-rows) th:nth-child(8){width:15%}.partner-workspace table:has(#pw-rows) th:nth-child(9){width:10%}.partner-workspace td button{display:block;max-width:100%}

/* Keep training and assistant as one adjacent action group on all screen sizes. */
.help-actions{grid-column:1 / -1;display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.help-actions button{white-space:nowrap}
@media(max-width:600px){.help-actions button{font-size:14px;padding:10px 12px}}

.sidebar-brand{letter-spacing:normal;line-height:1}.sidebar-brand img{display:block;width:100%;max-width:195px;height:auto;object-fit:contain}

.attachment-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.attachment-tabs [aria-selected="true"]{background:var(--teal);color:white}.attachment-tabs button:focus-visible{outline:2px solid var(--teal);outline-offset:3px}.diagnostic-prompt{max-width:620px;width:calc(100% - 32px);border:1px solid var(--border);border-radius:13px;padding:24px;color:var(--ink)}.diagnostic-prompt::backdrop{background:#17394788}.diagnostic-prompt h2{margin-bottom:12px}

#attachment-upload[hidden]{display:none}

/* The entire sales row opens its card, including keyboard navigation. */
.sale-row{cursor:pointer}
.sale-row:hover,.sale-row:focus-visible{background:#e8f3f4}
.sale-row:focus-visible{outline:2px solid #087d82;outline-offset:-2px}
.activation-date{white-space:nowrap;font-variant-numeric:tabular-nums}

.diagnostic-prompt #diagnostic-prompt-self{width:100%;text-align:left;margin-block:8px 18px;background:#168a45;color:#fff;border-color:#168a45}
.diagnostic-prompt #diagnostic-prompt-self:hover{background:#107038}
.diagnostic-drop{padding:20px;border:2px dashed #75a685;border-radius:12px;background:#e5f4e8;color:#173c27;display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-block-end:16px}
.diagnostic-drop h3{flex-basis:100%;margin:0 0 4px}
.diagnostic-drop.drag-over,.diagnostic-drop:focus-visible{outline:2px solid #2d7545;outline-offset:2px;background:#d8eddc}
.diagnostic-drop[aria-disabled=true]{opacity:.7}

.warranty-age-allowed{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;margin-top:14px;background:#e6f4e9;color:#21603b;border-radius:8px;line-height:1.45}
#warranty-age-icon{flex:0 0 24px;line-height:0}
.warranty-age-blocked{margin-top:14px}

.pw-common-options{display:flex;flex-wrap:wrap;gap:16px}.partner-workspace fieldset{border:1px solid var(--border);border-radius:8px;padding:14px;margin:0 0 16px;min-width:0}.partner-workspace legend{font-weight:700;padding:0 6px}.partner-workspace fieldset label{display:block;margin:8px 0}.partner-workspace input[type=checkbox]{width:auto;margin-right:8px}.pw-related{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.pw-related>.card{margin:0}.pw-common-options label{white-space:nowrap}@media(max-width:700px){.pw-related{grid-template-columns:1fr}}

.support-floating{position:fixed;right:24px;bottom:24px;z-index:60;box-shadow:0 4px 16px #173b4740}.support-panel{position:fixed;right:24px;bottom:96px;width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 128px);overflow:auto;z-index:61;background:#fff;color:#173b47;border:1px solid #c8d9df;border-radius:16px;padding:20px;box-shadow:0 8px 28px #173b4730}.support-panel[hidden]{display:none}.support-panel textarea{width:100%;box-sizing:border-box;resize:vertical}.support-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.support-floating:focus-visible,.support-panel :focus-visible{outline:3px solid #00858a;outline-offset:3px}.main{padding-bottom:110px}@media(max-width:600px){.support-floating{right:16px;bottom:max(16px,env(safe-area-inset-bottom));font-size:14px;padding:12px 16px}.support-panel{right:16px;bottom:80px;padding:16px}}

/* Product configuration: compact selection, independent columns, price first. */
#product-selector{padding:20px}#product-selector h2{margin:0 0 8px}#product-selector>p{margin:8px 0;color:var(--muted)}
#product-selector .product-choices{grid-template-columns:repeat(auto-fit,minmax(260px,360px));gap:12px;margin:12px 0}
#product-selector .product-choice{display:flex;align-items:center;gap:12px;max-width:none;padding:8px;border-radius:12px}
#product-selector .product-choice img{width:144px;height:96px;flex:0 0 144px;object-fit:contain;margin:0}
#product-selector .product-choice>span.product-caption{padding:0;min-height:44px;gap:8px}
#product-selector .product-choice b{font-size:16px}
#product-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}

#product-options>.product-configuration{min-width:0;margin:0;padding:20px;container-type:inline-size}
#product-options .product-configuration>h2{font-size:22px;margin:0 0 16px}
#product-options .product-price-fields{gap:12px;grid-template-columns:150px 130px}
#product-options .product-price-fields label{font-size:14px;line-height:1.4;margin:0 0 6px;min-height:40px;display:flex;align-items:flex-end}
#product-options .product-price-fields input,#product-options .product-price-fields select{height:46px;min-width:0;padding:10px 12px;font-size:16px}
#product-options .sale-schemes{margin:18px 0 0;padding:0;border:0;min-width:0}
#product-options .sale-schemes legend{font-size:15px;font-weight:600;margin-bottom:10px}
#product-options .scheme-choices{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:10px}
#product-options .scheme-choice{padding:5px;min-width:0}
#product-options .scheme-picture,#product-options .scheme-picture>img{height:auto;min-height:0;aspect-ratio:3/1}
#product-options .scheme-caption{padding:8px 3px 4px}
#product-options .cash-entity{margin-top:14px}
#product-options .cash-entity label{font-size:14px}
#product-options .cash-entity select{font-size:15px;min-width:0}
#product-options .field-hint{margin:8px 0;font-size:13px}
#product-options .product-price-fields>div:last-child{grid-column:1/-1}
#product-options .tariff-full-name{display:block;overflow-wrap:anywhere;font-size:14px;line-height:1.4;margin-top:6px;color:var(--muted)}
@media(max-width:1000px){#product-options{grid-template-columns:1fr}}
@media(max-width:600px){#product-selector .product-choices{grid-template-columns:1fr 1fr;gap:8px}#product-selector .product-choice{display:block;padding:6px}#product-selector .product-choice img{width:100%;height:auto;aspect-ratio:3/2}#product-selector .product-choice>span.product-caption{padding-top:8px}#product-selector .product-choice b{font-size:14px}#product-options{gap:14px;grid-template-columns:1fr}#product-options>.product-configuration{padding:16px}}

/* Private support conversation. */
.support-panel{width:min(440px,calc(100vw - 32px));padding:0;overflow:hidden;max-height:none}.support-chat{display:flex;flex-direction:column;height:min(650px,calc(100dvh - 128px))}.support-chat .support-heading{padding:16px;margin:0;border-bottom:1px solid var(--border);flex-shrink:0}.support-chat .support-heading .field-hint{font-size:12px;line-height:1.4;margin:4px 0 0}.support-history{flex:1;min-height:100px;overflow-y:auto;padding:14px;overscroll-behavior:contain;background:#f5f8f9}.support-message{max-width:90%;padding:10px 12px;margin:0 0 12px;border-radius:12px;background:#fff;border:1px solid #d9e5e8;overflow-wrap:anywhere}.support-message.own{margin-left:auto;background:#e7f4f2;border-color:#b9dcd5}.support-message.system{max-width:100%;text-align:center;background:transparent;border:0;font-size:13px}.support-author{font-size:12px;font-weight:700}.support-message p{white-space:pre-wrap;margin:5px 0;font-size:14px;line-height:1.5}.support-message small{display:block;font-size:11px;color:#4e6872;margin-top:8px}.support-message a{display:block;color:#086e73;font-size:12px;margin-top:8px}.support-message img{display:block;max-width:100%;max-height:230px;height:auto;border-radius:6px;object-fit:contain}.support-thread-divider{text-align:center;font-size:12px;color:#526d77;margin:4px 0 12px}.support-empty{font-size:14px;line-height:1.6;color:#526d77;padding:16px}.support-chat form{padding:12px 14px;border-top:1px solid var(--border);background:#fff;flex-shrink:0}.support-chat textarea{font-size:14px;line-height:1.5;min-height:60px;max-height:140px;padding:10px;resize:vertical}.support-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}.support-composer-actions button,.support-attach{font-size:13px;padding:10px 12px;min-height:40px}.support-attach{cursor:pointer;border-radius:10px;margin:0}.support-drop-hint{font-size:11px!important;margin:8px 0 0!important}.support-chat #support-result{font-size:13px;margin:6px 0 0}.support-file-preview{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;overflow-wrap:anywhere}.support-file-preview img{width:46px;height:36px;object-fit:contain;border-radius:4px}.support-file-preview span{flex:1;min-width:0}.support-file-preview button{font-size:12px;padding:6px 8px;min-height:32px}.support-panel.dragging{outline:3px solid #087e80;outline-offset:3px}.support-chat #support-earlier{font-size:12px;border-radius:0;padding:8px}.support-chat #support-earlier[hidden]{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:600px){.support-panel{bottom:76px}.support-chat{height:min(620px,calc(100dvh - 110px))}}

/* Customer details and optional passport: separate compact cards in one row. */
.customer-passport-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:20px;align-items:start}
.customer-passport-row>.card{padding:20px;margin:0;min-width:0}
.customer-passport-row h2{margin:0 0 14px}
#product-passport-fields{background:#e5f5f3;border-color:#a9d5d0}
.passport-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.passport-heading h2{margin:0}
.passport-optional{font-size:12px;color:#286662}
#product-customer-fields .sale-client-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:none}
#product-customer-fields .sale-client-grid>div{width:auto;min-width:0;max-width:none}
#product-customer-fields .sale-client-grid>div:first-child{grid-column:1/-1}
#product-passport-fields .grid.two{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
#product-passport-fields .grid.two>div:nth-child(n+3){grid-column:1/-1}
.customer-passport-row input,.customer-passport-row select{min-height:44px;height:44px;min-width:0}
#warranty-fields{padding:20px}#warranty-fields>h2{margin-bottom:14px}
#warranty-fields .warranty-data-grid{gap:12px 16px}
#warranty-fields .warranty-data-grid label{min-height:0}
@media(max-width:1100px){.customer-passport-row{grid-template-columns:1fr}}
@media(max-width:600px){.customer-passport-row{gap:14px;margin-bottom:14px}.customer-passport-row>.card,#warranty-fields{padding:16px}#product-customer-fields .sale-client-grid,#product-passport-fields .grid.two{grid-template-columns:1fr}}

/* Account controls live with navigation; page headings stay compact. */
.shell>.main{margin:0 auto;align-self:start}
.main>.top{margin-bottom:18px;min-height:0}
.sidebar .account-actions{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0}
.sidebar .account-identity{display:block;text-align:left;color:#cadce1;font-size:13px;max-width:none;overflow-wrap:anywhere}
.sidebar .account-identity b{color:#fff;display:inline-block;margin-bottom:4px}
.sidebar #logout{font-size:12px;padding:9px 10px;min-height:40px;text-align:left;background:#2b515d;color:#fff}
.sidebar .account-login{margin-top:6px;font-size:12px}
.sidebar .help-actions{display:flex;flex-direction:column;gap:7px;margin-top:14px;padding-top:14px;border-top:1px solid #44616c}
.sidebar .help-actions button{text-align:left;background:transparent;color:#cadce1}
@media(max-width:720px){.sidebar .account-actions{gap:8px}.sidebar .account-identity{display:block}.sidebar .help-actions{margin:0;padding:0;border:0}.sidebar #logout{width:auto;align-self:start}.main>.top{margin-bottom:14px}}

/* Ratmir identity and truthful conversation status. */
.support-floating{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:16px;max-width:calc(100vw - 32px);text-align:left}
.ratmir-avatar{width:40px;height:40px;flex:0 0 40px;border-radius:50%;object-fit:cover;background:#e5f5f3}
.support-launcher-copy{display:flex;flex-direction:column;gap:2px}.support-launcher-copy b{font-size:13px;font-weight:600}.support-launcher-copy>span{font-size:11px;color:#e1f3f2;line-height:1.4}
.support-unread{display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:12px;background:#b42318;color:#fff;font-size:12px;font-weight:700}.support-unread[hidden]{display:none}
.support-agent{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:10px;align-items:center;min-width:0;flex:1}.support-agent>.ratmir-avatar{grid-row:1/3}.support-agent>b{font-size:14px}.support-agent>#support-chat-state{grid-column:2;line-height:1.4;color:#48676f}
.support-heading #support-close{padding:8px;font-size:12px}.support-message.reply .support-author{color:#086367}
@media(max-width:600px){.support-floating{padding:8px 12px}.support-launcher-copy b{font-size:12px}.support-launcher-copy>span{font-size:10px}.ratmir-avatar{width:36px;height:36px;flex-basis:36px}}

.support-floating.has-unread{outline:2px solid #b42318;outline-offset:3px}
.support-reply-notice{position:fixed;right:24px;bottom:104px;z-index:1002;display:flex;align-items:flex-start;gap:12px;width:min(360px,calc(100vw - 32px));padding:16px;border-radius:14px;background:#fff;color:#183c47;box-shadow:0 8px 28px #183c4729}
.support-reply-notice[hidden]{display:none}.support-reply-notice p{margin:4px 0 12px;font-size:13px;line-height:1.5}.support-reply-notice b{font-size:16px}.support-reply-notice button{font-size:13px;padding:8px 12px}.support-reply-notice .support-notice-close{margin-left:auto;padding:2px 8px;background:transparent;color:#183c47;font-size:22px}.support-reply-notice button:focus-visible{outline:2px solid #087f83;outline-offset:3px}
@media(max-width:600px){.support-reply-notice{right:16px;bottom:96px}}

/* Compact product setup: payment first, then price, term and partner earnings. */
#product-options .grid.product-price-fields{grid-template-columns:minmax(105px,1fr) minmax(95px,.8fr) minmax(120px,1.2fr);gap:10px;margin-top:14px}
#product-sale #product-options .product-price-fields label{min-height:0;margin:0 0 5px;font-size:13px}
#product-options .product-configuration>h2{margin-bottom:12px}
#product-options .sale-schemes{margin:0;padding:0}
#product-options .product-price-fields>div:last-child{grid-column:1/-1}
.product-earnings{align-self:start;min-width:0;background:transparent;color:var(--ink)}
.product-earnings[hidden]{display:none}.earnings-label{display:block;font-size:13px;line-height:1.5;color:#536c76;margin:0 0 5px}.product-earnings output{display:flex;align-items:center;height:46px;padding:10px 12px;border:1px solid var(--ink);border-radius:8px;background:transparent;font-weight:700;font-size:16px;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap}
@container(max-width:410px){#product-options .grid.product-price-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}#product-options .product-earnings{grid-column:1/-1}}


.warranty-date-entry{position:relative;min-width:0}.warranty-date-entry>input[type=text]{padding-right:46px}.warranty-calendar-button{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:38px;height:38px;padding:8px;background:transparent;color:var(--ink)}.warranty-calendar-button:focus-visible{outline:2px solid var(--teal);outline-offset:1px}.warranty-date-entry>.warranty-date-picker{position:absolute;right:4px;bottom:0;width:1px;height:1px;padding:0;opacity:0;pointer-events:none}

/* Read-only tariff directory; compact rows keep partner prices comparable. */
.tariff-directory{max-width:1500px}.tariff-intro{margin:0 0 18px;max-width:78ch;color:#4c6772}.tariff-filters{display:flex;align-items:end;flex-wrap:wrap;gap:14px;margin-bottom:24px}.tariff-filters>div{flex:1 1 220px;max-width:440px}.tariff-filters select{width:100%}.tariff-partner{margin:0 12px 12px 0}.tariff-group{margin-bottom:28px}.tariff-group h2{margin:0 0 12px}.tariff-group .scroll{background:#fff;border:1px solid #d7e4e7;border-radius:12px}.tariff-table{width:100%;border-collapse:collapse}.tariff-table thead th{background:#e4f3f1;color:#214f50}.tariff-table th,.tariff-table td{padding:15px 18px;vertical-align:top}.tariff-table th:first-child{width:60%;min-width:270px;text-align:left}.tariff-table thead th:not(:first-child){min-width:130px;text-align:right;white-space:nowrap}.tariff-table tbody th{font-weight:400}.tariff-net{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:#126963}.tariff-name{display:block;font-weight:700;overflow-wrap:anywhere}.tariff-summary{margin:6px 0;color:#4c6772;font-size:.9rem;line-height:1.5}.tariff-table details{margin-top:8px;max-width:74ch}.tariff-table summary{color:#0b7374;cursor:pointer;font-weight:600;list-style-position:inside}.tariff-table summary:focus-visible{outline:2px solid #087f82;outline-offset:4px}.tariff-table details ul{padding-left:20px;margin:12px 0;line-height:1.65}.tariff-condition{margin:8px 0;font-size:.9rem;line-height:1.5}.tariff-table tbody tr:last-child>*{border-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}@media(max-width:700px){.tariff-filters{gap:10px}.tariff-filters>div{max-width:none;flex-basis:100%}.tariff-table th,.tariff-table td{padding:12px}.tariff-table th:first-child{min-width:235px}.tariff-table thead th:not(:first-child){min-width:115px}}

.attachment-row{display:grid;grid-template-columns:minmax(170px,220px) minmax(0,1fr) auto;gap:20px;padding:24px 0;border-top:1px solid var(--border,#d6e3e7);align-items:start}
.attachment-row:first-child{border-top:0;padding-top:8px}.attachment-row-title h3{font-size:1rem;line-height:1.4;margin:4px 0 6px}.attachment-row-body{min-width:0}
.attachment-drop{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;min-height:76px;padding:16px;border:1px dashed #9ab7bf;border-radius:12px;background:#f7fafb;color:#365c68}
.attachment-drop.drag-over{border-color:#087f83;background:#e7f6f5}.attachment-drop[aria-disabled=true]{opacity:.65}.attachment-drop:focus-visible{outline:2px solid #087f83;outline-offset:3px}.attachment-drop button{flex-shrink:0}
.attachment-row-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end;padding-top:10px;max-width:190px}.attachment-row-actions [role=status]{text-align:right}
.attachment-pending-file{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0}.attachment-pending-file span,.attachment-row .file a{overflow-wrap:anywhere;min-width:0}.attachment-pending-file button{padding:6px 10px;flex-shrink:0}
.attachment-row .file{flex-wrap:wrap;margin-top:10px}.attachment-batch{margin-top:12px}.attachment-row [data-row-error]{margin-bottom:0}
@media(max-width:1050px){.attachment-row{grid-template-columns:minmax(150px,190px) minmax(0,1fr)}.attachment-row-actions{grid-column:2;max-width:none;padding-top:0;align-items:flex-start}.attachment-row-actions [role=status]{text-align:left}}
@media(max-width:650px){.attachment-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:20px 0}.attachment-row-actions{grid-column:1}.attachment-drop{align-items:flex-start;flex-direction:column}.attachment-drop button{width:100%}.attachment-row-actions button{width:100%}.attachment-row-actions{align-items:stretch}.attachment-batch{align-items:stretch}.attachment-batch button{width:100%}}

/* Invalid sale fields keep their red outline; age errors also explain the restriction. */
#product-sale input[aria-invalid="true"],#product-sale select[aria-invalid="true"],#product-sale textarea[aria-invalid="true"],#product-sale input:invalid:not(:placeholder-shown):focus{border-color:#bd272d;color:#bd272d;outline-color:#bd272d;box-shadow:0 0 0 1px #bd272d}
#product-sale [id^="price-error-"],#product-sale #warranty-power-warning,#product-sale #warranty-age-warning{display:none!important}

#product-sale .warranty-age-blocked:not([hidden]){display:block}

/* Tariff descriptions must wrap independently of global table headers. */
.shell>.main,.tariff-directory,.tariff-group{min-width:0}
.tariff-directory{width:100%;max-width:100%}
.tariff-table{table-layout:fixed;white-space:normal}
.tariff-table th,.tariff-table td{white-space:normal;overflow-wrap:anywhere}
.tariff-table th:first-child{width:58%;min-width:0}
.tariff-table thead th:not(:first-child){min-width:0;width:14%;white-space:normal}
.tariff-table tbody th{font-size:14px;text-transform:none;letter-spacing:normal;color:var(--ink);background:#fff}
.tariff-name{font-size:15px;line-height:1.45}
.tariff-table details{max-width:100%}
.tariff-table .tariff-net{white-space:normal;overflow-wrap:normal}
@media(max-width:700px){.tariff-table th,.tariff-table td{padding:10px 7px}.tariff-table th:first-child{width:49%;min-width:0}.tariff-table thead th:not(:first-child){width:17%;min-width:0}.tariff-table .tariff-net{font-size:12px}.tariff-name{font-size:14px}}

/* Compact document upload rows: give the title space before the drop area. */
.attachment-row{grid-template-columns:minmax(285px,max-content) minmax(230px,1fr) auto;gap:16px;padding:16px 0;align-items:center}
.attachment-row-title h3{margin:0 0 4px;white-space:nowrap}
.attachment-drop{min-height:52px;padding:10px 12px;border-radius:10px;gap:12px}
.attachment-row-actions{padding-top:0}
@media(max-width:1100px){.attachment-row{grid-template-columns:minmax(245px,max-content) minmax(0,1fr)}.attachment-row-title h3{white-space:normal}.attachment-row-actions{grid-column:2}}
@media(max-width:650px){.attachment-row{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}.attachment-row-actions{grid-column:1}.attachment-drop{min-height:0}}

/* Dense document rows retain readable labels and usable upload controls. */
#attachment-section>h2{margin-bottom:10px}
.attachment-row{padding:9px 0;gap:12px}
.attachment-row:first-child{padding-top:0}
.attachment-row-title h3{font-size:14px;line-height:1.35;margin:0 0 2px}
.attachment-row-title .small{font-size:11px}
.attachment-drop{min-height:40px;padding:5px 8px;gap:8px;border-radius:8px;font-size:13px}
.attachment-row button{padding:7px 11px;font-size:13px;line-height:1.4;min-height:34px}
.attachment-row-actions{gap:4px}
.attachment-row [data-row-status]:empty,.attachment-row .attachment-pending:empty,.attachment-row [data-document-list]:empty{display:none}
@media(max-width:650px){.attachment-row{gap:8px;padding:10px 0}.attachment-drop{flex-direction:row;align-items:center;flex-wrap:wrap}.attachment-drop button{width:auto}}

/* Keep the sale overview and empty document rows within a typical desktop viewport. */
#detail-body>.card{padding:14px 18px;margin-bottom:10px}
#detail-body>.card:first-of-type{margin-top:8px!important}
#detail-body>.card>.top{margin-bottom:10px;gap:10px}
#detail-body>.card>.top h2{font-size:18px;margin-bottom:5px}
#detail-body>.card>.grid{gap:8px 18px}
#detail-body>.card>.grid p{margin:0;font-size:13px;line-height:1.4}
#detail-body>.card>.actions{margin-top:12px}
#detail-body>.card>.actions button,#detail-body>#back{padding:7px 12px;font-size:13px}
#detail-body>.card>.small{margin:7px 0 0;font-size:11px}
#detail-body #attachment-section .attachment-row{padding:6px 0}
#detail-body #attachment-section .attachment-row:first-child{padding-top:0}
@media(min-width:1100px){#detail-body>.card>.grid.three{grid-template-columns:repeat(4,minmax(0,1fr))}}
.registration-vehicle-types{border:1px solid var(--border);border-radius:8px;margin:0 0 17px;padding:10px 12px}.registration-vehicle-types legend{font-weight:600;padding:0 4px}.registration-vehicle-types .field-hint{margin:0 0 10px}.registration-vehicle-types label{margin:8px 0}

/* Payment cards keep their compact size even when only one option is available. */
#product-options .scheme-choices{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));max-width:calc(var(--scheme-count,3)*240px + (var(--scheme-count,3) - 1)*10px);justify-content:start;gap:10px}
#product-options .sale-schemes{min-width:0}
#product-options .scheme-caption{min-width:0;overflow-wrap:anywhere}
#product-options .scheme-caption input{flex-shrink:0}

/* Diagnostic choice follows the shared LK dialog controls. */
.diagnostic-prompt{font:inherit;max-width:680px}.diagnostic-prompt .diagnostic-drop{background:var(--bg);color:var(--ink);border:1px dashed #a7bfc6;padding:16px}.diagnostic-prompt .actions{display:flex;flex-wrap:nowrap;gap:10px}.diagnostic-prompt .actions>*{flex:1;min-width:0;text-align:center;white-space:nowrap;padding:10px 12px}.diagnostic-prompt #diagnostic-prompt-self{font-weight:600;line-height:1.45}@media(max-width:520px){.diagnostic-prompt{padding:16px}.diagnostic-prompt .actions>*{font-size:12px;padding:10px 5px}}

/* Sale details: vehicle and contract economics stay in separate columns. */
.sale-detail-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:14px}.sale-summary-block{min-width:0;padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:var(--bg)}.sale-summary-block h3{font-size:14px;margin:0 0 10px;color:var(--ink)}.sale-summary-block dl{margin:0}.sale-summary-row{display:grid;grid-template-columns:minmax(110px,40%) minmax(0,1fr);gap:10px;padding:4px 0;font-size:13px;line-height:1.4}.sale-summary-row dt{color:var(--muted)}.sale-summary-row dd{margin:0;overflow-wrap:anywhere;font-weight:500;font-variant-numeric:tabular-nums}@media(max-width:720px){.sale-detail-summary{grid-template-columns:1fr;gap:10px}.sale-summary-block{padding:12px}.sale-summary-row{grid-template-columns:minmax(105px,40%) minmax(0,1fr)}}

.sale-summary-products{display:grid;gap:12px;align-content:start;min-width:0}

.activation-review{max-width:1100px;width:calc(100% - 40px);max-height:90vh;overflow:auto}.activation-review .sale-detail-summary{margin-bottom:14px}

#product-options .scheme-choices[data-count="1"]{--scheme-count:1}
#product-options .scheme-choices[data-count="2"]{--scheme-count:2}
#product-options .scheme-choices[data-count="3"]{--scheme-count:3}

.session-resume{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line,#d8e3e7);border-radius:16px;padding:24px;background:#fff;color:#173b47;box-shadow:0 16px 60px #0004;z-index:10000}.session-resume::backdrop{background:#102d38a6}.session-resume form{display:grid;gap:16px}.session-resume h2,.session-resume p{margin:0}.session-resume label{display:grid;gap:6px}.session-resume input{width:100%;box-sizing:border-box}.session-resume button{width:100%;min-height:44px}

/* One consistent colour per deal family, independent of partner or product. */
:root{--deal-agency-bg:#e0eaf6;--deal-agency-ink:#254b73;--deal-co-bg:#eee5f4;--deal-co-ink:#604274;--sale-price-bg:#e4ecef}
.deal-form-badge{display:inline-block;max-width:100%;padding:3px 10px;border-radius:999px;line-height:1.4;font-size:inherit;font-weight:600;vertical-align:middle;white-space:normal}
.deal-form-agency{background:var(--deal-agency-bg);color:var(--deal-agency-ink)}
.deal-form-co{background:var(--deal-co-bg);color:var(--deal-co-ink)}
.sale-detail-summary{gap:12px;align-items:stretch;grid-template-columns:repeat(2,minmax(0,1fr))}
.sale-summary-block{padding:14px 12px}
.sale-summary-row{grid-template-columns:minmax(0,36%) minmax(0,1fr);gap:8px}
.sale-summary-price{background:var(--sale-price-bg);border-radius:6px;padding:7px 8px;margin:3px -8px}
.sale-summary-price dt,.sale-summary-price dd{color:var(--ink);font-weight:600}
.sale-detail-summary-multiple{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
@media(max-width:720px){.sale-detail-summary{grid-template-columns:minmax(0,1fr);gap:10px}.sale-summary-row{grid-template-columns:minmax(0,38%) minmax(0,1fr)}}

/* Unavailable actions remain visibly distinct from usable primary actions. */
button:disabled:not(.danger){background:#e0eeeb;color:#53756c;opacity:1;cursor:not-allowed}
.attachment-tabs button.is-readonly[aria-selected="true"]{background:#e0eeeb;color:#53756c}

.order-document-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-bottom:24px}
.order-document-columns>section{min-width:0}
.order-document-columns .attachment-row{display:flex;flex-direction:column;align-items:stretch;gap:12px}
.order-document-columns .attachment-row-actions{align-self:flex-start}
.order-document-columns .attachment-drop{flex-wrap:wrap;gap:12px}
[data-order-shared]{margin-top:12px;display:flex;flex-direction:column;align-items:stretch;gap:6px}
[data-order-shared] label{display:flex;flex-direction:column;gap:8px}
@media(max-width:900px){.order-document-columns{grid-template-columns:1fr}}
.order-document-columns .attachment-row-title h3{white-space:normal;overflow-wrap:anywhere}
.order-document-columns .attachment-row-body{width:100%}

.sale-product-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}.sale-product-heading h3{margin:0}.sale-product-heading .badge{flex-shrink:0}[data-common-document-slot] [data-common-documents]{margin-top:24px;padding:14px 0 0;border:0;border-top:1px solid var(--border);background:transparent;box-shadow:none}[data-common-documents] h2{font-size:16px}[data-common-documents] input[type=file]{max-width:100%;box-sizing:border-box}[data-common-documents] .shared-document-label{display:block;margin:0;font-size:13px}
[data-common-documents] .shared-document-controls{width:100%;box-sizing:border-box;min-width:0}
[data-common-documents] .shared-document-actions{display:flex;gap:8px}
[data-common-documents] [data-shared-upload]{background:var(--teal);color:white}
[data-common-documents] [data-shared-upload]:disabled{background:var(--teal);color:white;opacity:1}

[data-product-lifecycle]{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
[data-product-lifecycle] [data-pending-count]{order:1;flex-basis:100%}
[data-common-documents] .shared-document-controls button,[data-common-documents] [data-shared-upload]{margin:0;padding:7px 11px;font-size:13px;line-height:1.4;min-height:34px}
[data-common-documents] [role=status]{font-size:12px;margin:0;overflow-wrap:anywhere}
[data-common-documents] [role=status]:empty{display:none}
[data-common-documents] a{overflow-wrap:anywhere}
[data-common-documents] [data-order-shared]>div:first-child:empty{display:none}

/* Payment captions have deliberate lines; complete phrases stay together. */
#product-options .scheme-choice{width:100%;max-width:240px;box-sizing:border-box}
#product-options .scheme-note .deal-form-badge{white-space:pre;overflow-wrap:normal}

/* Sales dashboard: one summary, aligned status buckets and clear company scope. */
.dashboard-summary,.dashboard-results,.dashboard-accounts{background:#fff;border:1px solid var(--border);border-radius:13px;margin-bottom:24px;padding:24px}
.dashboard-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) minmax(190px,1.5fr);gap:24px;margin:0}
.dashboard-totals>div{min-width:0}.dashboard-totals dt{font-size:14px;color:#536c76;margin-bottom:8px}.dashboard-totals dd{font-size:30px;font-weight:700;line-height:1.25;margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dashboard-note{font-size:13px;color:#536c76;border-top:1px solid var(--border);padding-top:16px;margin:20px 0 0;max-width:90ch}
.dashboard-results h2,.dashboard-accounts h2{margin-bottom:16px}.dashboard-table{width:100%}.dashboard-table th:nth-child(n+3),.dashboard-table td:nth-child(n+3){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.dashboard-table th:first-child,.dashboard-table td:first-child{min-width:160px}.dashboard-table th:nth-child(2),.dashboard-table td:nth-child(2){min-width:200px}.dashboard-accounts p{margin:8px 0}.dashboard-accounts a{color:#087577;text-underline-offset:3px}
@media(max-width:1000px){.dashboard-totals{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.dashboard-summary,.dashboard-results,.dashboard-accounts{padding:16px}.dashboard-totals{gap:20px 12px}.dashboard-totals dd{font-size:25px}.dashboard-totals dt{font-size:13px}.dashboard-table th,.dashboard-table td{padding:12px}}

.dashboard-totals-owner{grid-template-columns:repeat(3,minmax(0,1fr)) repeat(2,minmax(160px,1.35fr))}
@media(max-width:1200px){.dashboard-totals-owner{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.dashboard-totals-owner{grid-template-columns:repeat(2,minmax(0,1fr))}}

.dashboard-table-owner th:nth-child(2),.dashboard-table-owner td:nth-child(2){min-width:0;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}

/* Image-only product choices. Native inputs keep keyboard and screen-reader support. */
#product-selector{container-type:inline-size}
#product-sale #product-selector label.product-choice{margin:0}
#product-selector .product-choices{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:24px;margin:20px 8px 12px 0}
#product-selector .product-choice{position:relative;display:block;max-width:none;padding:0;margin:0;border:2px solid var(--border);border-radius:14px;background:#fff;overflow:visible;box-shadow:none;transition:border-color .15s ease-out}
#product-selector .product-choice.selected{border-color:#16a34a;box-shadow:none}
#product-selector .product-choice:hover{border-color:#16a34a}
#product-selector .product-choice .product-artwork{display:grid;grid-template-columns:minmax(0,1fr);padding:0;overflow:hidden;border-radius:12px}
#product-selector .product-choice img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;margin:0;border-radius:0}
#product-selector .product-choice-pair{grid-column:span 2}
#product-selector .product-choice-pair .product-artwork{grid-template-columns:repeat(2,minmax(0,1fr))}
#product-sale #product-selector .product-choice input{appearance:none;-webkit-appearance:none;position:absolute;z-index:1;top:-9px;right:-9px;display:block;flex:none;width:42px;height:42px;min-height:0;margin:0;padding:0;border:2px solid #16a34a;border-radius:11px;background-color:#fff;background-position:center;background-size:30px 30px;background-repeat:no-repeat;cursor:pointer;box-shadow:0 3px 8px #123b201f}
#product-sale #product-selector .product-choice input:checked{background-color:#16a34a;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 16.5 13 23 27 8' fill='none' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
#product-selector .product-choice:focus-within{outline:3px solid var(--teal);outline-offset:5px}
#product-sale #product-selector .product-choice input:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
#product-selector .product-choice:has(input:disabled){cursor:default}
#product-sale #product-selector .product-choice input:disabled{cursor:default}
@media(max-width:600px){#product-selector .product-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 16px}#product-sale #product-selector .product-choice input{width:36px;height:36px;background-size:26px 26px;top:-7px;right:-7px}}
@media(max-width:380px){#product-selector .product-choices{grid-template-columns:minmax(0,1fr)}#product-selector .product-choice-pair{grid-column:auto}#product-selector .product-choice-pair .product-artwork{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){#product-selector .product-choice{transition:none}}

@container (max-width:520px){#product-selector .product-choices{grid-template-columns:minmax(0,1fr)}#product-selector .product-choice-pair{grid-column:auto}#product-selector .product-choice-pair .product-artwork{grid-template-columns:minmax(0,1fr)}}

/* Keep product artwork compact even when only one or two products are available. */
#product-selector .product-choices{grid-template-columns:repeat(auto-fill,minmax(0,280px));justify-content:start;align-items:start}
#product-selector .product-choice{width:100%;max-width:280px;justify-self:start;box-sizing:border-box}
#product-selector .product-choice-pair{max-width:584px}
@container (max-width:600px){#product-selector .product-choices{grid-template-columns:minmax(0,280px)}#product-selector .product-choice-pair{grid-column:auto;max-width:280px}#product-selector .product-choice-pair .product-artwork{grid-template-columns:minmax(0,1fr)}}

.customer-type-switch{display:flex;gap:4px;width:max-content;max-width:100%;padding:3px;margin:0 0 14px;border:1px solid var(--border);border-radius:9px;background:#f3f7f8}
#product-sale .card .customer-type-switch label{display:flex;gap:7px;align-items:center;margin:0;padding:6px 11px;border-radius:6px;font-size:14px;cursor:pointer}
.customer-type-switch label:has(input:checked){background:#fff;color:var(--teal)}
#product-sale .customer-type-switch input{position:static;width:16px;height:16px;min-height:0;margin:0;padding:0;accent-color:var(--teal)}
#product-customer-fields .client-name-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
#product-customer-fields .company-name-row{grid-template-columns:minmax(0,2fr) minmax(130px,1fr)}
#company-fields{background:#e5f5f3;border-color:#a9d5d0}
#company-fields .grid.two{gap:12px}
#company-fields .grid.two>div:nth-child(n+3){grid-column:1/-1}
@media(max-width:600px){#product-customer-fields .company-name-row{grid-template-columns:minmax(0,1fr)}#company-fields .grid.two{grid-template-columns:minmax(0,1fr)}}

.dashboard-table-team th:nth-child(2),.dashboard-table-team td:nth-child(2){min-width:120px}
.dashboard-table-team th:nth-child(3),.dashboard-table-team td:nth-child(3){min-width:200px;text-align:left;white-space:normal;font-variant-numeric:normal}

/* Readable, always-open sales hierarchy. Class-based indents respect CSP. */
.dashboard-dates{display:flex;gap:16px;flex-wrap:wrap}.dashboard-dates[hidden]{display:none}.dashboard-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.dashboard-controls .filters{align-items:end}
.dashboard-pivot{min-width:780px;width:100%;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}.dashboard-pivot thead th{position:sticky;top:0;z-index:1;font-size:11px;background:#f4f8f9;color:#536c76}.dashboard-pivot th:first-child{width:48%;text-align:left}.dashboard-pivot td,.dashboard-pivot thead th:not(:first-child){text-align:right}.dashboard-pivot td,.dashboard-pivot tbody th{padding:15px 16px;vertical-align:middle}.dashboard-pivot tbody th{font:inherit;color:inherit;background:transparent;text-transform:none;letter-spacing:normal;white-space:normal}.dashboard-pivot tbody td{font:inherit;white-space:nowrap}.dashboard-pivot tbody tr{color:var(--ink);font-weight:400;background:#fff}.dashboard-pivot tbody .pivot-partner,.dashboard-pivot tbody .pivot-city{background:#eaf4f4;font-weight:600}.dashboard-pivot tbody .pivot-division{font-weight:600;background:#f7fafb}.dashboard-pivot .pivot-label{display:block;line-height:1.5}.dashboard-pivot .pivot-level-0{padding-left:0}.dashboard-pivot .pivot-level-1{padding-left:32px}.dashboard-pivot .pivot-level-2{padding-left:64px}.dashboard-pivot .pivot-level-3{padding-left:96px}.dashboard-pivot .pivot-level-4{padding-left:128px}.dashboard-pivot tbody tr:hover{background:#edf6f5}
button.warning{background:#ffe39a;color:#563d00;border:1px solid #e5bd50;font-weight:600}button.warning:hover{background:#ffd66b}button.warning:focus-visible{outline:2px solid #7b5800;outline-offset:3px}.draft-delete-footer{margin-top:10px;padding-top:0}.sale-summary-block .draft-delete-footer{margin-top:10px;padding-top:0;border:0}.draft-edit-delete{display:flex;gap:20px;flex-wrap:wrap;padding:16px 0}.draft-edit-delete>div{flex:1;min-width:200px}
.dashboard-pivot.has-partner-column{min-width:960px}
.dashboard-pivot.has-partner-column th:first-child{width:22%}
.dashboard-pivot.has-partner-column th:nth-child(2){width:26%;text-align:left;white-space:normal}
.dashboard-pivot .pivot-partner{text-align:left;white-space:normal;overflow-wrap:anywhere}
@media(max-width:640px){.dashboard-dates{width:100%;gap:10px}.dashboard-dates>div{flex:1;min-width:130px}.dashboard-controls .filters>div{min-width:0}.dashboard-pivot td,.dashboard-pivot tbody th{padding:12px}.dashboard-pivot .pivot-level-1{padding-left:24px}.dashboard-pivot .pivot-level-2{padding-left:48px}.dashboard-pivot .pivot-level-3{padding-left:72px}.dashboard-pivot .pivot-level-4{padding-left:96px}}
