[hidden]{display:none!important}
#doc-progress{position:fixed;top:0;left:0;width:100%;height:3px;z-index:20000;pointer-events:none;opacity:0;background:#ff6c1820;transition:opacity .18s}#doc-progress.is-loading{opacity:1}#doc-progress:after{content:'';display:block;width:35%;height:100%;background:#f46b18;box-shadow:0 0 10px #ff7b45;animation:doc-progress 1.15s ease-in-out infinite}@keyframes doc-progress{from{transform:translateX(-110%)}to{transform:translateX(390%)}}.page-loading{min-height:220px;position:relative}.page-loading:after,.boot:after{content:'';display:block;width:30px;height:30px;border:3px solid #eee;border-top-color:#f46b18;border-radius:50%;animation:doc-spin .8s linear infinite;margin:28px auto}@keyframes doc-spin{to{transform:rotate(360deg)}}
.table-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 0;background:inherit}.table-tools input{max-width:240px;min-width:160px}.table-tools-count{font-size:12px;color:#6f7480;margin-right:auto}.table-tools button{font-size:12px;white-space:nowrap}.sortable-heading{cursor:pointer;user-select:none}.sortable-heading:hover{color:#d75a15;background:#fff4ec}.sortable-heading[aria-sort=ascending]:after{content:' ↑'}.sortable-heading[aria-sort=descending]:after{content:' ↓'}.full-export{font-size:12px}.sound-toggle{border:1px solid #e4e5e9;background:#fff;border-radius:9px;font-size:17px;cursor:pointer;width:36px;height:34px;margin-left:12px}.download-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}.download-grid button{padding:18px;text-align:left;border:1px solid #e5e6e9;border-radius:12px;background:#fff}.download-grid strong,.download-grid span{display:block}.download-grid span{font-size:13px;color:#747983;margin-top:6px}.backup-card{margin-top:24px;padding:22px;border:1px solid #ffd5bb;background:#fff8f3;border-radius:14px}
.crm-deal-card.needs-reply{background:linear-gradient(125deg,#fff0f0,#fff 80%);border-color:#edb5b5;box-shadow:inset 3px 0 #df4b55,0 2px 7px #af43430a}.reply-indicator{display:inline-flex;align-items:center;gap:6px;color:#b52d3c;background:#fce6e9;border-radius:7px;padding:4px 8px;font-size:11px;font-weight:650;line-height:1.35}.reply-indicator:before{content:'';width:6px;height:6px;border-radius:50%;background:#d74454}.deal-reply-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 17px;border:1px solid #f2cdd2;border-radius:12px;background:linear-gradient(110deg,#fff0f1,#fff8f8);color:#9b3440;margin-bottom:16px}.deal-reply-notice p{margin:0}.deal-reply-notice small{color:#a1666d}.deal-reply-notice button{white-space:nowrap}
dialog{max-height:calc(100dvh - 36px);overflow:auto}dialog::backdrop{background:#16213070;backdrop-filter:blur(2px)}dialog .primary:disabled{cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,th:focus-visible{outline:2px solid #f46b18;outline-offset:3px}.wa-grid>section{border-radius:15px}.wa-panel{box-shadow:0 2px 9px #18243804}.wa-inline{flex-wrap:wrap}.wa-data-note{padding:12px 16px;background:#fff8ef;border:1px solid #ffe4be;border-radius:10px;color:#866137;margin-bottom:16px}@media(max-width:700px){.table-tools input{max-width:100%;flex:1}.deal-reply-notice{align-items:flex-start;flex-direction:column}.full-export{margin-top:8px}dialog{max-width:calc(100vw - 20px);padding:18px}.download-grid{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){#doc-progress:after,.page-loading:after,.boot:after{animation:none}}

.sound-toggle{width:auto;padding:0 10px;font-size:12px;font-weight:650;color:#727984}.sound-toggle.is-on{color:#d65b12;background:#fff8f0}.guide-frame{width:100%;height:75vh;border:1px solid #e4e6ec;border-radius:14px;background:#fff}

.deal-stage-picker{max-width:760px;margin:0 0 20px;position:relative}.deal-stage-picker details{border:1px solid #dce3e8;border-radius:12px;background:white;overflow:hidden}.deal-stage-picker summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;cursor:pointer}.deal-stage-picker summary::-webkit-details-marker{display:none}.deal-stage-picker summary small{display:block;font-size:12px;color:#52606a;margin-bottom:5px}.deal-stage-picker summary strong{font-size:18px;color:#20343d}.deal-stage-options{max-height:390px;overflow:auto;padding:5px}.deal-stage-options button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0;border-radius:6px;margin:3px 0;padding:12px 14px;color:#263d46;font-size:14px}.deal-stage-options button small{margin-left:auto;font-size:11px}.deal-stage-options button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #508174;font-weight:700}.deal-stage-options button:disabled{opacity:.55;cursor:default}.deal-stage-options button:not(:disabled):hover{filter:brightness(.96)}.deal-stage-picker .tone-0{background:#deedff}.deal-stage-picker .tone-1{background:#fff4bf}.deal-stage-picker .tone-2{background:#d5f2e6}.deal-stage-picker .tone-3{background:#e7e1fa}.deal-stage-picker .tone-4{background:#ffe1d6}.deal-stage-picker .tone-5{background:#d8eff0}.deal-stage-picker .won{background:#d9efbe}.deal-stage-picker .lost{background:#e8e9ed}.deal-stage-picker>.field-help{font-size:12px;margin:7px 2px}.deal-stage-picker>.error:empty{display:none}

/* Dense desktop workspace: retain comfortable touch controls on phones. */
@media (min-width:701px){
 .orders-compact .report-table :is(th,td){font-size:12px;line-height:1.35;padding:5px 8px}
 .orders-compact :is(input:not([type=checkbox]):not([type=radio]),select){height:29px;font-size:12px;padding:4px 7px}
 .orders-compact :is(.primary,.secondary){min-height:29px;font-size:12px;padding:4px 9px}
 .orders-compact .history-panel{padding:12px}
 .orders-compact .table-tools{padding:6px 0;gap:7px}
 .orders-compact .order-line:is(.work-line,.part-line){padding:3px 6px;margin-bottom:2px;gap:7px}
 .orders-compact .order-line.work-line,.orders-compact .order-line-head.work-line{grid-template-columns:minmax(220px,1fr) minmax(135px,.6fr) 65px 85px 65px 90px 29px;min-width:780px}
 .orders-compact .order-line.part-line,.orders-compact .order-line-head.part-line{grid-template-columns:minmax(220px,1fr) 60px 65px 85px 65px 90px minmax(120px,.5fr) 29px;min-width:850px}
 .orders-compact .order-line-head{font-size:11px;padding:5px 6px;gap:7px}
 .orders-compact .order-line output{font-size:12px;padding-top:0}
 .orders-compact .order-tab-panel{padding:10px;min-height:240px}
 .orders-compact .receipt-meta{gap:8px;padding:10px 12px}
 .orders-compact .receipt-source{font-size:12px;padding:8px 12px}
 .orders-compact .receipt-source p{margin:5px 0;line-height:1.4}
 .orders-compact .receipt-table :is(th,td){padding:4px 6px}
 .orders-compact .order-toolbar{gap:8px;padding:8px 10px;flex-wrap:wrap}
 .orders-compact .order-toolbar h1{font-size:19px}
 dialog.cash-dialog.product-dialog{padding:12px 16px}
 .cash-dialog.product-dialog form :is(input,select){height:28px;font-size:12px;padding:3px 7px}
 .product-dialog .product-grid{gap:7px 18px}
 .product-dialog .product-identifiers{gap:6px 14px;margin-bottom:9px}
 .product-dialog .report-table :is(th,td){font-size:12px;padding:5px 7px}
 .work-choice{padding:7px 10px;gap:3px;font-size:12px}
 .inline-catalog-menu .inline-choice{padding:6px 8px;font-size:12px}
}
.related-options{max-height:300px;overflow:auto;border:1px solid #e5e7eb;border-radius:7px;padding:6px;margin:8px 0}.cash-dialog .related-options label{display:flex;align-items:center;gap:9px;padding:6px;margin:0;font-size:13px;font-weight:400}.cash-dialog .related-options label[hidden]{display:none}.cash-dialog .related-options input[type=checkbox]{width:17px;height:17px;min-width:17px;margin:0}.related-options small{color:#777}.related-settings{border:0;padding:0;margin:14px 0}.related-work-button{font-size:11px;color:#b45116;margin-top:3px}
/* Single-line desktop rows, like a conventional accounting grid. */
@media(min-width:701px){
 .orders-compact .order-line:is(.work-line,.part-line){padding:0;margin:0;border-radius:0;gap:0;border-bottom:0}
 .orders-compact .order-line:is(.work-line,.part-line):last-child{border-bottom:1px solid #e0e4e9}
 .orders-compact .order-line:is(.work-line,.part-line) :is(input,select,.inline-add),.orders-compact .order-line:is(.work-line,.part-line)>.secondary{height:27px;min-height:27px;font-size:12px;padding:2px 6px;margin:0;border-radius:0}
 .orders-compact .order-line:is(.work-line,.part-line) .inline-add{width:24px;font-size:16px;padding:0}
 .orders-compact .order-line:is(.work-line,.part-line)>.line-name{padding-left:24px}
 .orders-compact .order-line :is(.work-details,.part-details):not([open]){height:0;min-height:0}
 .orders-compact .order-line :is(.work-details,.part-details) summary{height:25px;width:22px;top:1px;left:1px}
 .orders-compact .order-line-head:is(.work-line,.part-line){gap:0;padding:5px 0;margin:0;border-radius:0}
 .orders-compact .order-line-head>span{padding:0 6px}
 .orders-compact .report-table :is(th,td){padding:3px 6px;line-height:1.25;font-size:12px}
 .orders-compact .report-table :is(input:not([type=checkbox]),select,.secondary){height:26px;min-height:26px;padding:2px 6px;font-size:12px}
}
@media(min-width:701px){.orders-compact .order-line:is(.work-line,.part-line)>button.secondary{height:27px!important;min-height:27px!important;padding:2px 6px!important;font-size:12px!important}}
.orders-compact .order-line.work-line,.orders-compact .order-line-head.work-line{grid-template-columns:minmax(220px,1fr) minmax(135px,.6fr) 65px 85px 65px 95px 90px 29px;min-width:875px}
.orders-compact .order-line.part-line,.orders-compact .order-line-head.part-line{grid-template-columns:150px minmax(220px,1fr) 60px 65px 85px 65px 95px 90px minmax(120px,.5fr) 29px;min-width:1095px}
.orders-compact .order-line.part-line>.part-sku{display:flex;align-items:center;min-width:0;padding:3px 8px 3px 30px;overflow-wrap:anywhere;font-size:12px;line-height:1.3;font-variant-numeric:tabular-nums;user-select:text;color:var(--fg,inherit)}
.orders-compact .order-line-head.part-line>.part-sku-heading{padding-left:30px}
.orders-compact .order-line.part-line>.line-name{padding-left:0}
.orders-compact .order-line [data-discount-price]{display:flex;align-items:center;justify-content:flex-end;padding:0 7px;border-left:1px solid #e7eaee;font-size:12px;font-weight:500;background:#f5faf6;min-width:0;font-variant-numeric:tabular-nums}
.trash-button{display:inline-flex!important;align-items:center;justify-content:center;color:#c93434!important;background:#fff5f5!important;border:1px solid #f1cccc!important;width:30px;min-width:30px;padding:4px!important;vertical-align:middle}.trash-button svg{width:17px;height:17px}.trash-button:hover{background:#ffe5e5!important}.cash-count-card{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 16px;margin:12px 0;background:#fff;border:1px solid #e5e7eb;border-radius:10px}.cash-count-card p{margin:4px 0}.cash-count-card small{color:#747983}
@media(min-width:701px){.cash-compact .payment-queue{padding:14px}.cash-compact .queue-table :is(th,td){font-size:12px;padding:4px 7px;line-height:1.25}.cash-compact .queue-table button{font-size:11px;min-height:27px;height:27px;padding:3px 7px;margin:0 3px}.cash-compact :is(.queue-toolbar,.table-tools) :is(input,select,button){font-size:12px;height:30px;min-height:30px;padding:4px 8px}.cash-compact .queue-toolbar{gap:8px;margin-bottom:8px}.cash-compact .table-tools{padding:5px 0}.cash-compact .queue-toolbar h2{font-size:18px}.cash-compact .queue-pagination{padding-top:8px}.cash-compact .history-row{padding:8px 12px;font-size:13px}}

.deal-full-composer{flex:none;min-width:0;background:white;border-top:1px solid #e1e6ec}.deal-full-composer #chat-compose.chat-composer{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px 16px;max-height:none}.deal-full-composer textarea{width:100%;height:76px;min-height:60px;font-size:14px;box-sizing:border-box}.deal-full-composer .compose-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.deal-full-composer .compose-tools button{min-height:32px;padding:6px 9px}.deal-full-composer .compose-tools [data-send]{margin-left:auto}.deal-full-composer .compose-routing{display:flex;gap:10px}.deal-full-composer .compose-routing select{min-width:0;flex:1;width:0}.deal-full-composer .compose-file img{max-height:130px;max-width:100%;object-fit:contain}.deal-full-composer .chat-dialog-actions{display:flex;gap:8px;align-items:center;padding:8px 16px}.deal-full-composer .chat-dialog-actions [data-inbox-state]{margin-right:auto}.deal-full-composer [hidden]{display:none!important}

/* Deal record: one full-height card on the left, conversation on the right. */
.workspace:has(.crm-deal-record){height:100dvh;min-height:0;display:flex;overflow:hidden}
.workspace:has(.crm-deal-record)>.workspace-main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.workspace-main:has(.crm-deal-record)>.topbar{flex:0 0 40px;height:40px;min-height:40px;padding:0 18px;font-size:12px}
.workspace-main>.content:has(.crm-deal-record){flex:1;min-height:0;width:100%;max-width:none;padding:0;margin:0;overflow:hidden}
.content .crm-deal-record{display:grid;grid-template-columns:clamp(290px,26vw,380px) minmax(0,1fr);gap:0;height:100%;min-height:0;margin:0;align-items:stretch}
.crm-deal-record>.crm-record-card{min-height:0;max-height:none;min-width:0;overflow:auto;overscroll-behavior:contain;border:0;border-right:1px solid #dce3e9;border-radius:0;padding:0;background:#fff;scrollbar-width:thin}
.content .crm-record-header.section-head{display:flex;flex-direction:column;align-items:stretch;justify-content:start;gap:12px;margin:0;padding:14px 16px 12px;background:#203f4c;color:#fff;border:0;border-radius:0}
.crm-record-header>div:first-child{position:relative;min-width:0;padding-right:26px}
.crm-record-header [data-back]{display:block;color:#b6cbd4;font-size:11px;padding:0;margin:0 0 6px!important}
.content .crm-record-header h1{display:inline;font-size:19px;line-height:1.4;margin:0;color:#fff;letter-spacing:-.3px}
.crm-record-header .crm-detail-title{font-size:12px;color:#bbced6;line-height:1.4;margin:4px 0 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.crm-record-header .deal-stage{display:none}
.deal-waiting-badge{display:inline-block;color:#ffd6da;background:#7c3545;border:1px solid #ac5865;border-radius:4px;padding:2px 5px;margin:4px 0 0 6px;font-size:10px;font-weight:600;vertical-align:middle}
.crm-record-header .deal-stage-picker{position:relative;margin:0;width:100%;max-width:none;z-index:5}
.crm-record-header .deal-stage-picker details{border:0;border-radius:0;background:transparent;overflow:visible}
.crm-record-header .deal-stage-picker summary{display:flex;justify-content:space-between;gap:8px;padding:0 0 6px;min-height:0;border:0;border-radius:0;color:#fff;background:transparent;list-style:none}
.crm-record-header .deal-stage-picker summary::-webkit-details-marker,.crm-record-menu summary::-webkit-details-marker{display:none}
.crm-record-header .deal-stage-picker summary small{display:block;color:#a9c0ca;font-size:10px;margin:0 0 2px}
.crm-record-header .deal-stage-picker summary strong{font-size:13px;line-height:19px;color:#fff}
.crm-record-header .deal-stage-picker>.field-help{display:none}
.crm-record-header .deal-stage-picker .error{color:#ffd2b9;font-size:11px;line-height:1.4;margin:6px 0 0}
.crm-record-header .deal-stage-picker .error:empty{display:none}
.crm-record-header .crm-stage-stripe{display:flex;gap:2px;width:100%;height:4px;margin:0;padding:0}
.crm-record-header .crm-stage-stripe span{flex:1;width:auto;height:4px;border-radius:2px;opacity:.45}
.crm-record-header .crm-stage-stripe span.current{opacity:1;outline:1px solid #fff;outline-offset:1px}
.crm-record-header .deal-stage-options{position:absolute;top:100%;left:0;width:100%;min-width:260px;max-width:calc(100vw - 90px);max-height:min(360px,55dvh);overflow:auto;margin-top:5px;padding:5px;background:#fff;border:1px solid #d3dfe5;border-radius:7px;box-shadow:0 8px 24px #102d3c38;z-index:12}
.crm-record-header .deal-stage-options button{font-size:12px;line-height:1.4;padding:8px;margin:1px 0;border-radius:4px;min-height:32px}
.crm-record-header .crm-detail-amount{text-align:left;margin:0;display:grid;gap:3px}
.crm-record-header .crm-detail-amount>small{display:none}
.crm-record-header .crm-detail-amount>strong{font-size:21px;line-height:26px;margin:0;color:#fff;font-variant-numeric:tabular-nums}
.crm-record-header .deal-header-owner{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;align-items:center;font-size:11px;color:#bed0d8;margin:0}
.crm-record-header .deal-header-owner select{width:100%;height:28px;min-height:28px;padding:3px 6px;margin:0;color:#fff;border:1px solid #ffffff30;border-radius:4px;background:#ffffff0c;font-size:12px;text-overflow:ellipsis}
.crm-record-header .deal-header-owner select:disabled{opacity:1;border-color:transparent;background:transparent;cursor:default}
.crm-record-header .deal-header-owner option{background:white;color:#253b48}
.crm-record-header .crm-deal-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0}
.crm-record-header .crm-deal-actions button{height:30px!important;min-height:30px!important;padding:5px 9px!important;border-radius:5px!important;font-size:11px!important;flex:1;white-space:nowrap}
.crm-record-menu{position:absolute;top:18px;right:-4px;z-index:20}
.crm-record-menu>summary{list-style:none;cursor:pointer;font-size:23px;line-height:24px;text-align:center;width:28px;height:28px;border-radius:4px;color:#d9e7ed}
.crm-record-menu>summary:hover{background:#ffffff18}
.crm-record-menu>div{position:absolute;right:0;top:32px;width:210px;display:flex;flex-wrap:wrap;gap:6px;padding:9px;background:#fff;border:1px solid #dce3e9;border-radius:7px;box-shadow:0 8px 24px #152f3d30}
.crm-record-menu:not([open])>div{display:none}
.crm-record-menu .crm-deal-permalink{display:block;flex-basis:100%;padding:5px;font-size:12px;color:#41687c;margin:0}
.crm-record-menu button{font-size:12px;padding:6px 8px;min-height:30px;border-radius:5px}
.crm-deal-record .crm-detail-tabs{position:sticky;top:0;padding:0 8px;background:#203f4c;border:0;z-index:3;gap:3px}
.crm-deal-record .crm-detail-tabs button{padding:9px 5px;font-size:11px;color:#b5ccd6;min-height:34px;border-bottom:3px solid transparent}
.crm-deal-record .crm-detail-tabs button[aria-selected=true]{color:white;background:#ffffff0b;border-bottom-color:#f6904d}
.crm-deal-record .crm-detail-main{padding:14px 16px}
.crm-deal-record .crm-detail-main h2{font-size:16px;line-height:1.4;margin:0 0 5px;overflow-wrap:anywhere}
.crm-deal-record .crm-detail-main>p{font-size:13px;margin:5px 0 12px;color:#617281}
.crm-deal-record .crm-detail-main .back-link{font-size:11px;min-height:22px;padding:2px 0;margin:0;text-align:left}
.crm-deal-record .deal-form{gap:7px;min-width:0}
.crm-deal-record .deal-form label{font-size:11px;line-height:1.4;gap:3px}
.crm-deal-record .deal-form :is(input,select){width:100%;height:30px;min-height:30px;padding:4px 7px;font-size:12px;border-radius:5px}
.crm-deal-record .deal-form textarea{padding:5px 7px;min-height:54px;height:64px;font-size:12px;border-radius:5px}
.crm-deal-record .deal-form>.primary{justify-self:start;padding:6px 12px;min-height:30px;border-radius:5px;font-size:12px}
.crm-deal-record .deal-form .error:empty{display:none}
.crm-deal-record .crm-deal-status{display:none}
.crm-deal-record .deal-form :is(small,.field-help){font-size:10px;line-height:1.4;margin:0;color:#8492a0}
.crm-deal-record .vin-vehicle-info{min-height:0;padding:0;margin:0}
.crm-deal-record>.crm-deal-conversation{height:100%;min-height:0;border:0;border-radius:0;overflow:hidden}
.crm-deal-record .crm-deal-conversation>:not(.crm-timeline){flex-shrink:0}
.crm-deal-record .crm-timeline-head{min-height:44px;padding:7px 14px;flex-wrap:nowrap;font-size:13px}
.crm-deal-record .crm-timeline-head small{font-size:10px;margin-top:1px}
.crm-deal-record .crm-timeline-head select{height:28px;min-width:0;max-width:190px;font-size:11px;padding:3px 7px;border-radius:5px}
.crm-deal-record [data-agent-toolbar]{padding:0}
.crm-deal-record [data-chat-agent]{padding:0 12px;max-height:20dvh;overflow:auto}
.crm-deal-record .chat-ai-draft{margin:0 0 4px;border-radius:5px}
.crm-deal-record .chat-ai-draft summary{padding:5px 9px}
.crm-deal-record .chat-agent-bar{padding:5px 8px;margin:5px 12px;min-height:34px;gap:8px;font-size:11px;border-radius:6px}
.crm-deal-record .chat-agent-bar button{height:27px!important;min-height:27px!important;padding:4px 7px!important;font-size:11px!important}
.crm-deal-record .crm-timeline{min-height:0;flex:1 1 0;padding:12px 14px;gap:8px;scrollbar-width:thin;overscroll-behavior:contain}
.crm-deal-record .crm-timeline>*{flex-shrink:0}
.crm-deal-record .crm-call-event{padding:7px 9px;margin:0;font-size:12px;border-radius:6px}
.crm-deal-record .crm-call-event button{padding:4px 8px;min-height:28px;font-size:11px}
.crm-deal-record .crm-system-event{padding:4px;font-size:10px}
.crm-deal-record .chat-bubble{padding:8px 11px;border-radius:8px}
.crm-deal-record [data-history-info]{margin:0;padding:4px 14px;font-size:9px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-deal-record .deal-full-composer #chat-compose.chat-composer{padding:7px 14px 9px;gap:5px;max-height:40dvh;overflow:auto}
.crm-deal-record .deal-full-composer #chat-compose textarea{height:60px;min-height:44px;max-height:160px;padding:7px 9px;border-radius:6px;font-size:13px}
.crm-deal-record .deal-full-composer .compose-routing{gap:8px}
.crm-deal-record .deal-full-composer .compose-routing select{height:27px;border:1px solid #dce3e9;border-radius:4px;background:white;padding:3px 6px;font-size:11px}
.crm-deal-record .deal-full-composer .compose-hint{margin:0;font-size:10px;line-height:1.3;color:#8191a2}
.crm-deal-record .deal-full-composer .compose-tools{gap:5px}
.crm-deal-record .deal-full-composer .compose-tools button{height:29px!important;min-height:29px!important;padding:4px 8px!important;border-radius:5px!important;font-size:11px!important}
.crm-deal-record .deal-full-composer .compose-shortcut{font-size:10px;color:#8b97a6}
.crm-deal-record .deal-full-composer .chat-dialog-actions{padding:4px 14px;min-height:31px;font-size:11px;gap:6px}
.crm-deal-record .deal-full-composer .chat-dialog-actions button{padding:3px 7px;min-height:23px;font-size:10px;border-radius:4px}
.crm-deal-record .deal-full-composer .error{margin:0;font-size:12px}
.crm-deal-record .deal-full-composer .error:empty,.crm-deal-record .deal-full-composer [data-compose-attachment]:empty{display:none}
.crm-record-mobile{display:none}
.workspace:has(.crm-deal-record)>.sidebar{height:100dvh;min-height:0;position:static;flex-shrink:0;overflow:hidden;padding:10px 8px}
.workspace:has(.crm-deal-record)>.sidebar nav{min-height:0;overflow:auto;scrollbar-width:thin;display:flex;flex-direction:column;gap:0}
.workspace:has(.crm-deal-record) .sidebar .nav{min-height:35px;height:35px;padding:7px 10px;margin-bottom:1px;flex-shrink:0}
.workspace:has(.crm-deal-record) .sidebar-toggle{flex-shrink:0;margin-bottom:7px}
.workspace:has(.crm-deal-record) .sidebar-bottom{padding-top:7px}
.workspace:has(.crm-deal-record) .sidebar .profile{padding-top:6px}
.workspace:has(.crm-deal-record).sidebar-collapsed>.sidebar{width:60px!important;min-width:60px!important;padding:8px 6px!important}
.workspace:has(.crm-deal-record).sidebar-collapsed .sidebar .nav{padding:7px!important}
.workspace:has(.crm-deal-record).sidebar-collapsed .sidebar .nav svg{width:19px;height:19px}
@media(max-height:700px){
 .crm-deal-record .crm-timeline-head small{display:none}
 .crm-deal-record .deal-full-composer #chat-compose textarea{height:44px;min-height:44px}
 .crm-deal-record .chat-agent-bar{margin-top:3px;margin-bottom:3px}
 .crm-deal-record .ai-toolbar-status{display:flex;align-items:center;gap:7px;min-width:0}
 .crm-deal-record .ai-toolbar-status small{margin:0;font-size:9px;max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .crm-deal-record .deal-full-composer #chat-compose.chat-composer{padding:5px 12px 6px;gap:3px}
 .crm-deal-record .deal-full-composer .chat-dialog-actions{padding:2px 12px;min-height:27px}
 .crm-deal-record .deal-full-composer .compose-routing select{height:24px}
 .crm-deal-record .deal-full-composer .compose-hint{font-size:9px}
}
@media(max-width:760px){
 .workspace-main:has(.crm-deal-record)>.topbar{padding:0 10px;font-size:11px;height:36px;min-height:36px;flex-basis:36px}
 .workspace-main:has(.crm-deal-record)>.topbar .date{display:none}
 .content .crm-deal-record{grid-template-columns:minmax(0,1fr);grid-template-rows:36px minmax(0,1fr)}
 .crm-record-mobile{display:flex;align-items:center;justify-content:space-between;padding:4px 9px;background:#203f4c;color:white;font-size:12px;gap:6px}
 .crm-record-mobile button{padding:3px 7px;min-height:26px;font-size:11px;border-radius:4px}
 .crm-deal-record>.crm-record-card{display:none;grid-row:2}
 .crm-deal-record.record-card-open>.crm-record-card{display:block}
 .crm-deal-record.record-card-open>.crm-deal-conversation{display:none}
 .crm-deal-record .crm-timeline-head{padding:6px 9px;gap:6px}
 .crm-deal-record .crm-timeline-head small{display:none}
 .crm-deal-record .crm-timeline-head strong{font-size:12px}
 .crm-deal-record .crm-timeline-head select{max-width:125px;font-size:10px}
 .crm-deal-record .chat-agent-bar{margin:3px 6px;gap:5px;flex-wrap:wrap}
 .crm-deal-record .crm-timeline{padding:9px}
 .crm-deal-record .deal-full-composer #chat-compose.chat-composer{padding:6px 8px;max-height:45dvh}
 .crm-deal-record .deal-full-composer .chat-dialog-actions{padding:4px 8px}
 .crm-deal-record .deal-full-composer .compose-shortcut{display:none}
 .workspace:has(.crm-deal-record):not(.sidebar-collapsed)>.sidebar{position:absolute;left:0;top:0;width:230px;z-index:80;box-shadow:4px 0 24px #172e3c40}
 .workspace:has(.crm-deal-record):not(.sidebar-collapsed)>.workspace-main{margin-left:60px}
 .workspace:has(.crm-deal-record):not(.sidebar-collapsed) .sidebar .nav{font-size:13px;justify-content:start}
 .workspace:has(.crm-deal-record):not(.sidebar-collapsed) .sidebar .nav svg{display:block}
}

/* Compact composer inside deals: routing, message, one tools row. */
.crm-deal-record .compact-compose{position:relative;border-top:1px solid #dce4ea;padding:0 12px;background:white}
.crm-deal-record .compact-compose #chat-compose.chat-composer{padding:6px 0 8px;gap:4px;border:0;max-height:none;overflow:visible}
.crm-deal-record .compact-compose .compose-routing{display:flex;align-items:center;gap:8px;min-height:27px;min-width:0}
.crm-deal-record .compact-compose .compose-routing select{flex:0 1 auto;width:auto;min-width:0;max-width:280px;height:27px;padding:3px 4px;border:0;border-radius:4px;background:transparent;color:#5d7183;font-size:12px;cursor:pointer}
.crm-deal-record .compact-compose .compose-routing select:hover{background:#f1f5f8}
.crm-deal-record .compact-compose .compose-routing [data-compose-mode]{max-width:160px}
.crm-deal-record .compact-compose .compose-routing [data-compose-source]{max-width:min(280px,35%)}
.crm-deal-record .compact-compose .compose-hint{display:none}
.crm-deal-record .compact-compose :is(.is-note,.compose-attention,.compose-readonly) .compose-hint{display:block;padding:3px 5px;font-size:11px;color:#946123;background:#fff6e7;border-radius:4px}
.crm-deal-record .compact-compose .compose-readonly .compose-hint{background:#f3f5f7;color:#6f7b88}
.crm-deal-record .compact-compose #chat-compose textarea{flex:none;width:100%;height:38px;min-height:38px;max-height:120px;padding:8px 4px;border:0;border-radius:4px;box-shadow:none;resize:none;font-size:13px;line-height:20px;background:transparent}
.crm-deal-record .compact-compose #chat-compose textarea:focus{outline:1px solid #c7d9e4;outline-offset:0;background:#fbfcfe}
.crm-deal-record .compact-compose .compose-tools{flex-wrap:nowrap;gap:3px;min-width:0}
.crm-deal-record .compact-compose .compose-tools button:not([data-send]){display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;height:28px!important;min-height:28px!important;padding:5px!important;border:0;background:transparent;color:#7a8c9c;border-radius:4px!important}
.crm-deal-record .compact-compose .compose-tools button:not([data-send]):hover{background:#eaf1f6;color:#36576d}
.crm-deal-record .compact-compose .compose-tools [data-send]{height:28px!important;min-height:28px!important;padding:4px 12px!important;margin-left:auto;font-size:12px!important}
.crm-deal-record .compact-compose .compose-tools [data-mic].is-recording{width:auto;max-width:calc(100% - 155px);font-size:11px;white-space:nowrap;overflow:hidden}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info){position:relative;flex:none;font-size:11px;line-height:18px}
.crm-deal-record .compact-compose .compose-status{margin-left:auto}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info)>summary{display:flex;align-items:center;gap:5px;list-style:none;cursor:pointer;color:#71818e;min-height:26px;padding:3px 4px;border-radius:4px;white-space:nowrap}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info)>summary::-webkit-details-marker{display:none}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info)>summary:hover{background:#f1f5f8}
.crm-deal-record .compact-compose .compose-info>summary{justify-content:center;width:24px;color:#91a0ad;font-weight:600}
.crm-deal-record .compact-compose .compose-state-dot{height:6px;width:6px;border-radius:50%;background:#8495a2;flex:none}
.crm-deal-record .compact-compose .compose-status[data-status=open] .compose-state-dot{background:#51a47f}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info)>div{position:absolute;bottom:calc(100% + 6px);right:0;width:210px;max-width:calc(100vw - 90px);padding:5px;background:white;border:1px solid #dce4eb;border-radius:7px;box-shadow:0 5px 22px #233b5224;z-index:30;max-height:45dvh;overflow:auto}
.crm-deal-record .compact-compose :is(.compose-status,.compose-info):not([open])>div{display:none}
.crm-deal-record .compact-compose .compose-status .chat-dialog-actions{display:flex;flex-direction:column;align-items:stretch;gap:1px;min-height:0}
.crm-deal-record .compact-compose .compose-status .chat-dialog-actions button{text-align:left;justify-content:flex-start;min-height:30px;padding:6px 8px;border:0;background:transparent;font-size:12px;color:#4e6070;white-space:nowrap}
.crm-deal-record .compact-compose .compose-status .chat-dialog-actions button:hover{background:#f0f5f8}
.crm-deal-record .compact-compose .compose-status [data-clear]{border-top:1px solid #e8edf1!important;border-radius:0;padding-top:8px}
.crm-deal-record .compact-compose .compose-info>div{width:270px;padding:10px 12px;line-height:1.6;color:#6d7c88}
.crm-deal-record .compact-compose [data-compose-popup]{position:absolute;bottom:calc(100% + 6px);left:12px;right:12px;z-index:25;max-height:min(300px,45dvh);overflow:auto;box-shadow:0 5px 22px #233b5224}
.crm-deal-record .compact-compose [data-compose-attachment]{max-height:140px;overflow:auto}
.crm-deal-record .compact-compose .compose-file{padding:5px 8px;border:1px solid #e1e8ee;border-radius:5px;font-size:11px}
.crm-deal-record .compact-compose .compose-file img{max-height:75px}
.crm-deal-record .compact-compose .compose-file small{font-size:10px}
.crm-deal-record [data-history-info]:not([hidden]){padding:5px 12px;white-space:normal;color:#a25929;background:#fff5e9;font-size:11px}
.crm-deal-record [data-history-info][hidden]{display:none}
@media(max-width:760px){
 .crm-deal-record .compact-compose{padding:0 8px}
 .crm-deal-record .compact-compose .compose-routing{gap:3px}
 .crm-deal-record .compact-compose .compose-routing [data-compose-mode]{flex:0 1 92px;width:92px;font-size:11px}
 .crm-deal-record .compact-compose .compose-routing [data-compose-source]{flex:1 1 100px;width:100px;max-width:none;font-size:11px}
 .crm-deal-record .compact-compose .compose-status [data-inbox-state]{display:none}
 .crm-deal-record .compact-compose .compose-tools [data-send]{padding:4px 8px!important;font-size:11px!important}
}

/* Dense pipeline cards: three readable rows, full details on hover or open. */
.crm-kanban .crm-deal-card{height:68px;min-height:68px;padding:7px 9px;margin:0 0 5px;border-radius:5px;box-shadow:none;display:flex;flex-direction:column;gap:2px;overflow:hidden;line-height:16px}
.crm-kanban .crm-deal-card:hover{border-color:#bdcbd7;background:#fafcfe;box-shadow:0 1px 4px #2136460d}
.crm-kanban .crm-deal-card:focus-visible{outline:2px solid #e68b51;outline-offset:-2px}
.crm-kanban .crm-deal-card.needs-reply{background:linear-gradient(110deg,#fff3f4,#fff 85%);border-color:#efb9bf;box-shadow:inset 2px 0 #df4b55}
.crm-kanban .crm-deal-card.needs-reply:hover{border-color:#df7f8a;background:#fff5f6}
.crm-kanban .crm-card-top{display:flex;align-items:center;gap:8px;margin:0;min-height:17px;flex:none}
.crm-kanban .crm-card-client{min-width:0;flex:1;font-size:12px;font-weight:600;line-height:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-kanban .crm-card-amount{flex:none;font-size:10px;font-weight:500;line-height:17px;color:#738090;max-width:48%;overflow:hidden;text-overflow:ellipsis}
.crm-kanban .crm-card-request{display:flex;align-items:center;gap:5px;min-width:0;min-height:16px;font-size:12px;line-height:16px;color:#356f9f;flex:none}
.crm-kanban .crm-card-number{flex:none;white-space:nowrap}
.crm-kanban .crm-card-request-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.crm-kanban .crm-deal-card footer{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:15px;line-height:15px;font-size:10px;border:0;padding:0;margin:0;min-width:0;flex:none}
.crm-kanban .crm-deal-card footer span{display:block;margin:0;min-width:0;font-size:10px;line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-kanban .crm-deal-card footer .crm-card-context{color:#7b8793;flex:1}
.crm-kanban .crm-deal-card footer .crm-card-next{flex:0 1 auto;max-width:48%;color:#a87734}
.crm-kanban .crm-deal-card footer .reply-indicator{display:inline-flex;align-items:center;flex:none;gap:4px;color:#b52d3c;background:none;border-radius:0;padding:0;font-weight:500}
.crm-kanban .reply-indicator:before{width:5px;height:5px;flex:none}
.crm-kanban .crm-lane{padding-left:5px;padding-right:5px;border-radius:5px 5px 0 0}
.crm-kanban .crm-lane>header{min-height:40px;margin:0 -5px 6px;padding:8px 9px;border-bottom-width:3px;font-size:11px;line-height:17px;box-shadow:none}
.crm-kanban .crm-lane>header strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-kanban .crm-lane>header span{font-size:10px;padding:0 5px;border-radius:4px;flex:none}
.crm-board-toolbar{gap:9px;margin:0 0 12px}
.crm-board-toolbar [data-pipeline]{font-size:20px;line-height:25px;padding:2px 0}
.crm-board-toolbar :is(button,input,select:not([data-pipeline])){min-height:32px;height:32px;font-size:12px}
.crm-board-toolbar button{padding:6px 10px;border-radius:5px}
.crm-board-toolbar .crm-eyebrow{font-size:9px;letter-spacing:1.1px}

.crm-kanban .crm-card-created{flex:none;margin-left:auto;white-space:nowrap;font-size:10px;line-height:16px;font-variant-numeric:tabular-nums;color:#87929e}

/* Internal change log: compact, separate from customer messages. */
.crm-deal-record .crm-system-event.deal-system-event{align-self:stretch;text-align:left;padding:5px 10px;color:#6f7782;font-size:11px;line-height:1.5;background:transparent;border:0}
.deal-system-event header{display:flex;align-items:center;flex-wrap:wrap;gap:5px;font-size:10px;color:#818995}
.deal-system-event header strong{font-weight:500;color:#626d7b}.deal-event-dot{width:5px;height:5px;border-radius:50%;background:#88a68e;display:inline-block}
.deal-event-change{overflow-wrap:anywhere}.deal-event-field{color:#687382;margin-right:4px}.deal-event-before{color:#9298a1}.deal-event-after{color:#465564}.deal-event-after.deal-event-stage{display:inline-block;background:#d9eee4;color:#2f6553;border-radius:3px;padding:0 5px}.deal-event-arrow{color:#9aa5b1}
.deal-event-long{margin:2px 0}.deal-event-long summary{cursor:pointer;color:#748394}.deal-event-long>div{white-space:pre-wrap;overflow-wrap:anywhere;padding:3px 0}.deal-event-action{white-space:pre-wrap;overflow-wrap:anywhere}

.crm-deal-record .crm-timeline .crm-system-event.deal-system-event.deal-ai-comment{background:#e8edf3;border:1px solid #bdc8d5;border-left:4px solid #748aa3;border-radius:8px;padding:12px 14px;margin:5px 0;color:#34465a;font-size:12px;box-shadow:0 1px 3px #23364a10}
.crm-deal-record .deal-ai-comment header strong{font-weight:700;color:#34465a}

/* Compact pipeline search and functional filter panel. */
.crm-board-toolbar.deal-search-toolbar{gap:10px;margin:0 0 12px;padding:8px 10px;background:white;border:1px solid #e1e5eb;border-radius:7px;flex-wrap:wrap}
.deal-search-toolbar [data-pipeline]{font-size:15px!important;max-width:180px;padding:7px!important}
.deal-search-toolbar .deal-filters{display:flex;gap:6px;align-items:center;flex:1;min-width:300px;margin:0}
.deal-search-toolbar .deal-filters input[name=q]{flex:1;min-width:120px;padding:7px 9px;height:34px;font-size:13px}
.deal-search-toolbar .deal-search-chip{background:#e5f0ce;border:1px solid #b5cb83;color:#52642c;padding:7px 9px;white-space:nowrap;font-size:12px;min-height:32px}
.deal-search-toolbar button{font-size:12px;min-height:32px;padding:7px 10px}.deal-search-total{font-size:11px;color:#7b8491;white-space:nowrap}
.deal-search-panel:not([hidden]){display:grid;grid-template-columns:230px minmax(280px,1fr);max-width:850px;max-height:72vh;overflow:auto;background:white;border:1px solid #dbe1e9;border-radius:8px;box-shadow:0 12px 32px #23364a26;margin:0 0 12px}
.deal-search-panel nav{border-right:1px solid #e5e9ef;padding:12px}.deal-search-panel nav button{display:block;width:100%;text-align:left;background:white;border:0;border-bottom:1px solid #edf0f4;padding:14px 8px;color:#46505e;font-size:13px}.deal-search-panel nav button:hover{background:#edf4fa;color:#2871a4}
.deal-search-panel form{padding:18px;margin:0}.deal-search-panel h3{font-size:12px;text-transform:uppercase;color:#7b8491;margin:0 0 12px}.deal-search-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.deal-search-fields label{font-size:11px;color:#77818d;display:flex;flex-direction:column;gap:4px}.deal-search-fields input,.deal-search-fields select{min-width:0;width:100%;height:34px;padding:6px 9px;font-size:13px;border:1px solid #d8dfe7;border-radius:5px;box-sizing:border-box}.deal-search-panel footer{display:flex;gap:8px;margin-top:16px}
@media(max-width:700px){.deal-search-panel:not([hidden]){grid-template-columns:1fr}.deal-search-panel nav{border-right:0;display:flex;flex-wrap:wrap}.deal-search-panel nav button{width:auto;padding:8px}.deal-search-fields{grid-template-columns:1fr}.deal-search-total{display:none}}

.deal-search-shell{position:relative;z-index:15}.deal-search-panel:not([hidden]){position:absolute;top:100%;left:0;width:min(850px,100%);z-index:30;box-sizing:border-box}.deal-search-panel footer button{min-height:32px;padding:7px 12px;font-size:12px}

.deal-active-filters{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 8px}.deal-active-filters button{padding:4px 8px;min-height:26px;font-size:11px;background:#edf3fa;color:#42617e}

.deal-view-switch{display:flex;gap:2px}.deal-view-switch button{background:transparent;border:0;color:#8995a4;font-size:18px}.deal-view-switch button[aria-pressed=true]{color:#f46b18;background:#fff0e5}.crm-kanban[hidden],.crm-board-nav[hidden]{display:none!important}.deal-list-view{background:white;border-radius:6px}.deal-list-view td,.deal-list-view th{padding:6px 9px;font-size:12px}.deal-list-view td button{padding:3px 5px;max-width:300px;text-align:left;font-size:12px}.deal-loss-cell{min-width:240px;max-width:450px;white-space:pre-wrap}.page-loading:after,.boot:after{width:44px;height:44px;border:0;border-radius:0;background:url('/favicon.svg') center/contain no-repeat;animation:doc-spin 1.5s linear infinite}#doc-progress{top:12px;left:auto;right:18px;width:32px;height:32px;background:transparent}#doc-progress:after{width:100%;height:100%;background:url('/favicon.svg') center/contain no-repeat;box-shadow:none;animation:doc-spin 1.5s linear infinite}@media(prefers-reduced-motion:reduce){#doc-progress:after,.page-loading:after,.boot:after{animation:none}}

/* Receipt chooser keeps notes visible instead of a long native select. */
.receipt-parts-picker .receipt-show-used{display:flex;align-items:center;gap:8px;margin:12px 0}
.receipt-parts-picker .receipt-show-used input{width:auto;margin:0}
.receipt-choice-list{max-height:240px;overflow:auto;display:grid;gap:6px;padding:2px}
.receipt-choice-list button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;white-space:normal;background:var(--surface,#fff);color:inherit;border:1px solid var(--border,#d9dee5);border-radius:8px;padding:10px 12px;box-shadow:none}
.receipt-choice-list button[aria-pressed=true]{border-color:#e76115;box-shadow:inset 3px 0 #e76115;background:rgba(234,100,26,.08)}
.receipt-choice-list button small{opacity:.72}
.receipt-choice-note{white-space:pre-wrap;overflow-wrap:anywhere;font-weight:600}
.receipt-parts-picker [data-qty]{width:90px}
[data-theme=dark] .receipt-choice-list button,body.dark .receipt-choice-list button{background:#222529;color:#e8e9ec;border-color:#42464b}
[data-theme=dark] .receipt-choice-list button[aria-pressed=true],body.dark .receipt-choice-list button[aria-pressed=true]{background:#382a22;border-color:#e76115}
.receipt-parts-picker [data-receipt-picker]>label.receipt-show-used{display:flex;align-items:center;gap:8px;margin:10px 0}
.receipt-parts-picker [data-receipt-picker]>label.receipt-show-used input[type=checkbox]{width:18px;flex:0 0 18px;margin:0}
.receipt-parts-picker .receipt-choice-list{max-height:170px}
.receipt-parts-picker td small{display:block;margin-top:3px;color:var(--muted)}

.document-link{color:inherit;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}.document-link:hover{color:var(--orange,#c65300)}

/* The order timestamp always describes the last confirmed server save. */
.orders-compact .order-toolbar #save-state{display:flex;flex-direction:column;gap:3px;max-width:340px;padding:5px 9px;border-radius:7px;background:rgba(93,111,133,.08);color:var(--text,#414b59);font-size:12px;line-height:1.35}
.order-save-label{display:flex;align-items:center;gap:6px;font-weight:600}
.order-save-label:before{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#8994a2}
.orders-compact #save-state small{font-size:10px;color:var(--muted,#6d7785);font-variant-numeric:tabular-nums}
.orders-compact #save-state[data-state=saved] .order-save-label:before{background:#43a67c}
.orders-compact #save-state[data-state=dirty] .order-save-label:before{background:#db901a}
.orders-compact #save-state[data-state=saving] .order-save-label:before{background:#5f94d9}
.orders-compact #save-state[data-state=error] .order-save-label:before,.orders-compact #save-state[data-state=uncertain] .order-save-label:before{background:#dc6262}
.orders-compact #save-state[data-state=dirty]{background:rgba(219,144,26,.12)}
.orders-compact #save-state[data-state=error],.orders-compact #save-state[data-state=uncertain]{background:rgba(220,98,98,.12)}
[data-theme=dark] .orders-compact .order-toolbar #save-state,body.dark .orders-compact .order-toolbar #save-state{color:#e8e9ec}
[data-theme=dark] .orders-compact #save-state small,body.dark .orders-compact #save-state small{color:#aeb7c4}
@media(max-width:700px){.orders-compact .order-toolbar #save-state{max-width:none;flex-basis:100%;order:10}}

/* Outsourced services stay private to the order editor. */
.outsourced-card{margin:12px 0;padding:16px;border:1px solid var(--border,#d8dee5);border-radius:12px;background:var(--surface,#fff)}
.outsourced-card header,.outsourced-card footer,.outsourced-metrics{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.outsourced-card header{justify-content:space-between;margin-bottom:14px}.outsourced-card header span,.outsourced-label{color:var(--muted,#64748b);font-size:12px}
.order-form .outsourced-card fieldset{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin:0;padding:0;border:0}
.outsourced-card label{display:flex;flex-direction:column;gap:6px}.outsourced-card input,.outsourced-card select{width:100%;min-width:0}
.outsourced-metrics{padding:14px 0}.outsourced-metrics span{display:flex;flex-direction:column;gap:4px;font-size:12px}.outsourced-metrics strong{font-size:16px}.outsourced-card footer{border-top:1px solid var(--border,#d8dee5);padding-top:12px}
[data-theme="dark"] .outsourced-card,body.dark .outsourced-card{background:#202224;border-color:#35383c;color:#e7e9ec}
@media(max-width:700px){.order-form .outsourced-card fieldset{grid-template-columns:1fr}.outsourced-card{padding:12px}.outsourced-metrics{gap:18px}}
#missed-call-stack{position:fixed;right:16px;bottom:16px;width:330px;max-width:calc(100vw - 32px);max-height:80vh;overflow:auto;z-index:900;display:grid;gap:8px;filter:drop-shadow(0 5px 14px #0002)}
.missed-call-heading{background:#fff;padding:8px 12px;border:1px solid #e5e7eb;border-radius:10px;font-size:12px;font-weight:700}.missed-call-heading small{float:right;font-weight:400}
.missed-call-card{position:relative;background:#fff;border:1px solid #f1d3c1;border-left:4px solid #dc681d;border-radius:12px;padding:10px 12px;display:grid;gap:4px;color:#222;font-size:13px}.missed-call-card>small{font-size:11px;color:#68717f;padding-right:18px}.missed-call-card>strong{font-size:15px;overflow-wrap:anywhere;padding-right:20px}.missed-call-close{position:absolute;right:4px;top:3px;border:0;background:transparent;font-size:24px;color:#68717f;padding:2px 7px;cursor:pointer}.missed-call-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:3px;font-size:11px}.missed-call-actions button{padding:7px 10px;font-size:12px}.missed-call-card.is-answered{border-left-color:#35996e}.missed-call-card.is-answered .missed-call-actions>span{color:#23764f}.missed-call-card .error:empty{display:none}.missed-call-card .error{margin:0;font-size:11px}
/* Missed calls use the same light/dark palette as the rest of CRM. */
#missed-call-stack{filter:none;padding:4px;right:12px;bottom:12px}
#missed-call-stack .missed-call-heading{background:var(--surface-2);border-color:var(--line);color:var(--fg);box-shadow:var(--shadow)}
#missed-call-stack .missed-call-card{background:var(--surface);border-color:var(--line);border-left-color:var(--accent);color:var(--fg);box-shadow:var(--shadow-pop);padding:12px 14px;gap:5px}
#missed-call-stack .missed-call-card>small{color:var(--fg-2)}
#missed-call-stack .missed-call-close{color:var(--fg-2);border-radius:8px;min-width:28px;min-height:28px}
#missed-call-stack .missed-call-close:hover{color:var(--fg);background:var(--surface-3)}
#missed-call-stack .missed-call-actions{border-top:1px solid var(--line);padding-top:8px;color:var(--accent-ink)}
#missed-call-stack .missed-call-actions button{background:var(--accent-soft);color:var(--accent-ink);border:1px solid var(--accent-line);font-weight:600;white-space:nowrap;border-radius:8px}
#missed-call-stack .missed-call-actions button:hover{background:var(--accent-strong);color:#fff;border-color:var(--accent-strong)}
#missed-call-stack .missed-call-card.is-answered{border-left-color:var(--ok)}
#missed-call-stack .missed-call-card.is-answered .missed-call-actions>span{color:var(--ok)}
#missed-call-stack button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* Subtle status glow, without flashing or motion. */
#missed-call-stack .missed-call-card{--call-glow:var(--accent);background:linear-gradient(115deg,color-mix(in srgb,var(--call-glow) 5%,var(--surface)),var(--surface) 58%);border-color:color-mix(in srgb,var(--call-glow) 25%,var(--line));border-left-color:var(--call-glow);box-shadow:0 4px 14px #00000012,0 0 0 1px color-mix(in srgb,var(--call-glow) 8%,transparent),0 0 18px color-mix(in srgb,var(--call-glow) 12%,transparent)}
#missed-call-stack .missed-call-card.is-answered{--call-glow:var(--ok)}
:root[data-theme=dark] #missed-call-stack .missed-call-card{box-shadow:0 6px 18px #0005,0 0 0 1px color-mix(in srgb,var(--call-glow) 14%,transparent),0 0 22px color-mix(in srgb,var(--call-glow) 18%,transparent)}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]) #missed-call-stack .missed-call-card{box-shadow:0 6px 18px #0005,0 0 0 1px color-mix(in srgb,var(--call-glow) 14%,transparent),0 0 22px color-mix(in srgb,var(--call-glow) 18%,transparent)}}
/* The board grows with its cards; vertical scrolling belongs to the page. */
.content .crm-kanban{height:auto;min-height:calc(100dvh - 210px);overflow-x:auto;overflow-y:hidden;align-items:stretch}
.content .crm-kanban .crm-lane{display:flex;flex-direction:column;min-height:0;max-height:none;overflow:visible;padding-bottom:8px}
.content .crm-kanban .crm-lane>header{flex:none}
.content .crm-kanban .crm-lane-cards{flex:none;min-height:0;max-height:none;overflow:visible}

/* Missed-call queue: counter above the phone icon, attempts on the card, the queue on the calls page. */
.sidebar .nav .missed-nav-count{position:absolute;left:19px;top:1px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#e5342b;color:#fff;font-size:10px;line-height:16px;font-weight:700;text-align:center;box-shadow:0 0 0 2px var(--rail,#232423);pointer-events:none;letter-spacing:0}
.sidebar-collapsed .sidebar .nav .missed-nav-count{left:auto;right:4px;top:1px;font-size:10px}
#missed-call-stack .missed-call-split{font-weight:400;color:var(--fg-2);margin-top:3px}
#missed-call-stack .missed-call-card.is-attempted{--call-glow:#c98a00}
#missed-call-stack .missed-call-card.is-attempted .missed-call-actions>span{color:#a06c00;font-weight:600}
.missed-queue{margin:10px 0 14px;border:1px solid var(--line,#e5e7eb);border-left:4px solid var(--accent,#dc681d);border-radius:10px;background:var(--surface,#fff);overflow:auto}
.missed-queue>header{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline;padding:10px 14px}.missed-queue>header strong{font-size:15px}.missed-queue>header span{color:var(--fg-2,#68717f);font-size:12px}.missed-queue>header small{margin-left:auto;color:var(--fg-2,#68717f);font-size:11px}
.missed-queue>p{margin:0;padding:0 14px 12px;color:var(--fg-2,#68717f)}
.missed-queue-row{display:grid;grid-template-columns:130px minmax(150px,1.3fr) minmax(150px,1.2fr) 110px minmax(160px,1.2fr) auto;gap:6px 14px;align-items:start;padding:8px 14px;border-top:1px solid var(--line,#e5e7eb);font-size:13px;min-width:820px}
.missed-queue-row small{display:block;color:var(--fg-2,#68717f);font-size:11px}.missed-queue-row i{font-style:normal;color:var(--fg-2,#68717f)}
.missed-queue-head{font-size:11px;font-weight:600;color:var(--fg-2,#68717f);padding:6px 14px}
.missed-queue-row.is-attempted .missed-queue-attempts{color:#b47a00}
/* On the queue itself the floating cards would only cover it. */
body:has(.missed-queue:not([hidden])) #missed-call-stack{display:none}
.missed-queue-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.missed-queue-actions .missed-queue-remove{color:var(--fg-2,#68717f)}
/* Draggable column edges (resizableColumns). */
th.column-resizable{position:relative}
.column-grip{position:absolute;top:0;right:-4px;bottom:0;width:9px;cursor:col-resize;z-index:2;touch-action:none}
.column-grip::after{content:"";position:absolute;top:22%;bottom:22%;left:4px;width:1px;background:currentColor;opacity:.22}
.column-grip:hover::after,.columns-dragging .column-grip::after{top:0;bottom:0;width:2px;left:3px;background:#f46b18;opacity:1}
.columns-dragging{user-select:none;cursor:col-resize}
.columns-sized :is(th,td){overflow:hidden;overflow-wrap:anywhere}
.columns-sized .deal-loss-cell{min-width:0;max-width:none}

.lang-toggle{border:1px solid var(--line,#e4e5e9);background:var(--surface,#fff);color:var(--fg-2,#727984);border-radius:6px;cursor:pointer;height:28px;min-width:34px;padding:0 8px;margin-left:8px;font-size:11px;font-weight:700;letter-spacing:.04em}.lang-toggle:hover{color:#d65b12;border-color:#d65b12}.lang-toggle-login{position:fixed;top:14px;right:14px;z-index:5;height:32px}
