.app-shell{--brand:#f58200;--brand2:#ff9c00;--ink:#17212e;--line:#e3e7ed}
.app-shell .btn.primary{background:#ff8a00;border-color:#ff8a00;color:#181818;font-weight:800}.app-shell .btn.primary:hover{background:#ffa321}.app-shell .eyebrow,.app-shell .deal-quotation-number{color:#a84e00}.app-shell .sidebar .nav-item.active{background:#ff9100;color:#171717;font-weight:800}.app-shell .sidebar .active .nav-icon{color:#171717}.app-shell .sidebar-user .avatar,.app-shell .profile-avatar{background:#202b3c;color:white}.app-shell .btn.danger{background:#d91f26;border-color:#d91f26;color:#fff}.app-shell .btn.success{background:#007c58;color:white}.app-shell .tab.active{color:#212b38;border-color:#ff8a00}.app-shell .pill{border-radius:8px}
.app-shell .profile-hero{display:grid;grid-template-columns:64px minmax(0,1fr);gap:16px;align-items:center;padding:22px}.app-shell .profile-info{min-width:0}.app-shell .profile-contact{overflow-wrap:anywhere}.app-shell .profile-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:8px;border-top:1px solid #e5e8ed;padding-top:14px}.app-shell .profile-actions>.btn{flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:40px;white-space:nowrap;padding:10px 14px}.profile-secondary-actions{position:relative;margin-left:auto}.profile-secondary-actions>summary{list-style:none;border:1px solid #dae0e8;border-radius:12px;padding:10px 14px;cursor:pointer;font-weight:700}.profile-secondary-actions[open]{display:flex;flex-wrap:wrap;gap:8px}.profile-secondary-actions .btn{margin:5px;min-height:40px}
.party-kind-tabs{display:flex;gap:5px;margin:8px 0 10px}.party-kind-tabs button{border:1px solid #d9e0e8;border-radius:10px;background:white;color:#475569;padding:7px 14px;cursor:pointer}.party-kind-tabs button[aria-pressed=true]{background:#202b3c;color:white;border-color:#202b3c}.related-picker .related-results{max-height:none!important;overflow:visible!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.related-picker.party-selected .related-results{display:none!important}.related-picker{background:#fff!important;border-color:#dce2ea!important}.party-paging{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px}.party-paging button{width:auto!important;min-height:32px!important;padding:5px 10px!important}.party-paging button:disabled{opacity:.4}.related-results button>span{min-width:0}.related-results strong{overflow-wrap:anywhere}
.modal-backdrop .modal{display:flex;flex-direction:column;max-height:calc(100dvh - 40px);overflow:hidden;border-radius:24px}.modal-backdrop .modal-head,.modal-backdrop .modal-foot{flex-shrink:0}.modal-backdrop .modal-body{overflow:auto;min-height:0;scrollbar-width:thin;scrollbar-color:#c8d0da transparent}.modal-backdrop .modal-head{padding:18px 22px}.modal-backdrop .modal-foot{padding:14px 22px;border-top:1px solid #e3e7ed;background:#fff}.modal-backdrop .form-grid{gap:14px}.modal-backdrop .related-picker{padding:12px}
.app-shell .month-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important}.app-shell .calendar-cell{min-width:0;overflow:hidden}.app-shell .calendar-event{white-space:normal!important;overflow-wrap:anywhere;max-width:100%;width:100%;height:auto;min-height:28px;line-height:1.35;padding:6px!important;text-align:left;border-radius:8px}.app-shell .calendar-panel{overflow:hidden}
.app-shell .kanban{gap:14px;align-items:stretch}.app-shell .kanban .column{min-width:265px;width:265px;border-radius:20px;background:#f0f2f5}.app-shell .kanban .lead-card{border-left:1px solid #dce2e9;padding:16px}.app-shell .kanban .card-company{font-size:15px}.app-shell .kanban .card-contact{font-size:12px;line-height:1.4}.app-shell .kanban .pipeline-quote{background:#202b3c;color:white;border-radius:12px;padding:11px;gap:8px}.app-shell .kanban .pipeline-quote strong{color:#ffad32}.app-shell .kanban .card-foot{border-top:1px solid #edf0f4;padding-top:10px}.pipeline-next-action{display:grid;gap:7px;margin:12px 0;padding:12px;border:1px solid #d5dce5;border-top:3px solid #ff8a00;border-radius:12px;background:white}.pipeline-next-action small{font-size:11px;text-transform:uppercase;font-weight:800;color:#64748b}.pipeline-next-action span{font-size:12px}.pipeline-focus-toggle{margin:0 0 12px}.focus-active-stages .column.empty-stage{display:none!important}
@media(max-width:760px){.app-shell .profile-hero{grid-template-columns:48px minmax(0,1fr);padding:16px;gap:12px}.app-shell .profile-avatar{width:48px;height:48px}.app-shell .profile-actions>.btn{flex:1 1 100px!important;font-size:13px;padding:10px}.profile-secondary-actions{margin-left:0;width:100%}.profile-secondary-actions>summary{text-align:center}.related-picker .related-results{grid-template-columns:1fr}.party-kind-tabs button{flex:1;padding:8px}.modal-backdrop .modal{max-height:calc(100dvh - 20px)}.modal-backdrop .modal-head,.modal-backdrop .modal-body,.modal-backdrop .modal-foot{padding:14px}.app-shell .kanban .column{width:100%;min-width:0}}
.sidebar-size-toggle{display:grid;place-items:center;padding:0;margin-left:auto;flex:none;border:1px solid #dce2e9;border-radius:9px;background:#fff;color:#334155;width:28px;height:30px;font-size:23px;line-height:1;cursor:pointer}
[hidden]{display:none!important}
@media(min-width:761px){.app-shell.sidebar-compact{grid-template-columns:82px minmax(0,1fr)!important}.sidebar-compact .sidebar{width:82px!important;min-width:0;padding:10px 7px}.sidebar-compact .sidebar .brand{font-size:0;padding:8px 0;height:88px;display:flex;flex-direction:column;gap:6px}.sidebar-compact .sidebar-size-toggle{margin:0;width:34px;height:24px}.sidebar-compact .sidebar .brand-mark{width:32px;height:32px}.sidebar-compact .sidebar-navigation{padding:0 4px}.sidebar-compact .sidebar .nav-item{font-size:0;justify-content:center;gap:0;padding:10px 0;position:relative;min-height:42px}.sidebar-compact .sidebar .nav-icon{width:22px;height:22px}.sidebar-compact .sidebar .nav-label{font-size:0;margin:9px 7px;height:1px;background:#e1e6ed}.sidebar-compact .nav-badge{position:absolute;right:0;top:2px;font-size:9px;padding:0 4px;min-width:14px}.sidebar-compact .nav-manage .nav-section-toggle{font-size:9px;letter-spacing:0;padding:10px 0;justify-content:center;gap:3px}.sidebar-compact .sidebar-user{padding:8px 0;margin:8px 0 0;justify-content:center}.sidebar-compact .sidebar-user strong,.sidebar-compact .sidebar-user small,.sidebar-compact .sidebar-user .muted,.sidebar-compact .sidebar-user-summary>div{display:none}.sidebar-compact .sidebar-user-summary{justify-content:center;padding:4px;gap:0}.sidebar-compact .sidebar-user-summary>span:last-child:not(.avatar){display:none}}
@media(max-width:760px){.sidebar-size-toggle{display:none}}
.app-shell .pipeline-progress{padding:10px;margin:9px 0 0;border:1px solid #dce2ea;border-radius:12px;background:#f8fafc;display:grid;gap:8px;font-size:11px}.progress-facts{display:grid;gap:5px}.progress-facts span{display:flex;align-items:center;gap:7px;color:#465569;font-weight:700}.progress-facts i{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#fff;border:1px solid #ccd5e0;color:#536274;font-style:normal;font-size:10px}.progress-facts .is-done,.progress-facts .is-ready{color:#087449}.progress-facts .is-done i,.progress-facts .is-ready i{background:#087449;border-color:#087449;color:white}.progress-facts .needs-action{color:#263344}.progress-facts .needs-action i{background:#ff8a00;border-color:#ff8a00;color:#171717}.progress-visit{display:grid;gap:2px;padding:7px 8px;border-radius:9px;background:#fff;line-height:1.35}.progress-visit strong{font-size:11px}.progress-visit small{color:#637186;font-size:10px}.progress-actions{display:flex;gap:5px}.progress-actions:empty{display:none}.app-shell .progress-actions .btn{padding:5px 8px;min-height:28px;font-size:10px;flex:0 1 auto;background:#fff;border:1px solid #ccd6e2}.app-shell .category-chips{display:flex;flex-wrap:wrap;overflow:visible!important;max-width:100%;gap:8px;padding-bottom:0}.app-shell .category-chips button{white-space:normal;flex:none}.app-shell .customer-profile-page{padding-top:10px}.app-shell .customer-profile-page>button:first-child{margin-bottom:10px;min-height:32px;padding:6px 10px}.app-shell .calendar-progress-done{background:#f0f3f4!important;color:#586b62!important;border-left-color:#178653!important}.app-shell .calendar-progress-overdue{border-left-color:#d91f26!important;background:#fff!important;box-shadow:inset 0 0 0 1px #d91f26;color:#9e1720!important}.app-shell .calendar-progress-cancelled{opacity:.6;text-decoration:line-through}.calendar-status-label{display:block!important;font-size:11px!important;font-weight:800;margin-top:3px;line-height:1.4}.calendar-progress-legend{display:flex;flex-wrap:wrap;gap:16px;padding:8px 16px;font-size:12px;border-bottom:1px solid #e3e8ee;background:white}.calendar-progress-legend span:first-child{color:#087449}.calendar-progress-legend span:last-child{color:#b51b26}.mobile-agenda-item .calendar-status-label{grid-column:3;text-align:left;margin:0}.todo .calendar-status-label{flex:none}.app-shell .calendar-progress-done .calendar-status-label{color:#087449}
@media(max-width:760px){.app-shell .progress-actions .btn{min-height:32px}.app-shell .category-chips{gap:6px}.app-shell .category-chips button{padding:8px 11px}.calendar-progress-legend{font-size:11px;gap:12px}}
/* Revision and sharing controls must fit inside narrow mobile panels. */
.quotation-detail-page .portal-link-box{display:grid;grid-template-columns:minmax(0,1fr);width:100%;max-width:100%;min-width:0;box-sizing:border-box;gap:12px}
.quotation-detail-page .portal-link-box>div{min-width:0;max-width:100%}
.quotation-detail-page .portal-link-box strong{white-space:normal;overflow-wrap:anywhere;font-size:13px;line-height:1.5;color:#173c76}
.quotation-detail-page .portal-link-box .quote-share-actions{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px}
.quotation-detail-page .quote-share-actions>.btn{flex:1 1 130px;min-width:0;max-width:100%;white-space:normal;box-sizing:border-box;justify-content:center}
.quotation-detail-page .builder-head-actions .quote-view-button{border:1px solid #bac7d9;background:#fff;color:#142238;box-shadow:0 1px 2px #1422380d}
.revision-draft-notice,.appointment-revision-warning{border:1px solid #c7d0dc;border-left:4px solid #ff8a00;padding:14px 16px;border-radius:14px;background:#fff;color:#142238;margin:12px 0}
.appointment-revision-warning p{font-size:13px;line-height:1.5;margin:8px 0}
.revision-choice{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid #c7d0dc;border-radius:12px;margin-top:10px}
.revision-choice input{width:auto;flex:none;margin-top:3px}
.quotation-saving-overlay{position:fixed;inset:0;z-index:10000;background:#132033cc;display:grid;place-items:center;color:white;font-size:18px;font-weight:600;cursor:wait}
.grn-modal .grn-add-bottom{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:12px 0 16px;border:1px dashed #8294ad;background:#fff;color:#142238;border-radius:12px;font-weight:600}
.grn-modal .grn-add-bottom:hover{border-color:#ff8a00;background:#fffaf2}
.grn-modal .grn-add-bottom:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.grn-modal .grn-category{min-width:0}.grn-modal .grn-category small{font-size:11px;font-weight:400;color:#62728a;line-height:1.4}
#modal-form .modal-body{overflow-x:hidden}
#modal-form .appointment-equipment-panel{min-width:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:480px){.quotation-detail-page .quote-share-actions>.btn{flex-basis:100%}.quotation-appointment-review .modal-foot{flex-wrap:wrap}.quotation-appointment-review .modal-foot .btn{flex:1 1 100%;white-space:normal}}
.grn-revision-history{margin-bottom:20px;display:grid;gap:8px}
.grn-history-entry{display:flex;gap:12px;justify-content:space-between;align-items:center;text-align:left;width:100%;padding:12px 14px;border:1px solid #dce3ed;border-radius:14px;background:#fff;color:#182438}
.grn-history-entry.selected{border-color:#ff8a00;box-shadow:inset 3px 0 #ff8a00}
.grn-history-entry>span:first-child{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
.grn-history-entry>span:last-child{font-size:12px;flex-shrink:0}
.grn-history-entry small{font-size:11px;color:#5c6e84}
.grn-revision-notice{padding:12px 14px;border:1px solid #cdd8e8;border-left:3px solid #ff8a00;border-radius:12px;line-height:1.5}
.grn-impact-list{display:grid;gap:10px;margin:16px 0}
.grn-impact-list article{display:grid;gap:6px;padding:14px;border:1px solid #dce3ed;border-radius:14px}
.grn-impact-list article span{font-size:13px;color:#40546d}
.grn-form-error{color:#b91c1c;font-weight:600;white-space:normal;overflow-wrap:anywhere}
.grn-receipt-modal .modal-body{overflow-x:hidden}
.grn-receipt-modal .modal-foot{flex-shrink:0}
.grn-modal [hidden]{display:none!important}
@media(max-width:600px){.grn-history-entry{padding:10px;gap:8px}.grn-history-entry>span:last-child{font-size:11px}.grn-receipt-modal .modal-foot .btn{flex:1;min-width:0}.grn-receipt-open{white-space:normal!important}}
.grn-cost-breakdown{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px;width:100%;padding:10px 0}
.grn-cost-breakdown>span{display:grid;gap:4px;font-size:11px;color:#566a83}
.grn-cost-breakdown strong{font-size:14px;color:#182438}
.grn-cost-breakdown .grn-cost-total strong{color:#0866d9}
.grn-line-totals{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #dce3ed;padding:9px 0 2px;font-size:12px}
.grn-modal .grn-line-result{display:block;grid-column:1/-1}
.grn-rounding-note{grid-column:1/-1;font-size:11px;color:#566a83;font-weight:400}
.customer-account-toggle{display:flex;align-items:center;gap:10px;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.customer-account-toggle:focus-visible{outline:3px solid #0866d9;outline-offset:6px;border-radius:6px}
.customer-account-toggle small{margin-left:auto}
.customer-account-location[hidden]{display:none!important}
.customer-account-toggle .customer-folder-icon{flex:none;font-size:19px}
.row-order-controls{display:flex;gap:6px;flex:none}
.row-order-controls .btn{min-width:34px;min-height:34px;border:1px solid #cbd5e1;background:#fff;padding:5px}
.category-manager .category-manager-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.category-manager-row>input{flex:1;min-width:140px}
.product-order-list{display:grid;gap:8px;margin-top:14px}
.product-order-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dce3ed;border-radius:12px;padding:12px}
.product-order-row>span:first-child{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.product-order-row small{font-size:11px;color:#62728a}
[data-order-category]{display:block;width:100%;margin-top:6px}
.app-shell .kanban,.pipeline-scrollbar{scroll-behavior:auto!important;scroll-snap-type:none!important}
@media(max-width:600px){.customer-account-toggle{flex-wrap:wrap}.customer-account-toggle small{width:100%;padding-left:40px;margin:0}.category-manager-row>input{flex-basis:100%}}
/* Shared calendar legend, schedule picker, and inventory thresholds. */
:root{--schedule-appointment:#4f46e5;--schedule-task:#c56a08;--schedule-issue:#dc3545}
@media(max-width:760px){
 html:has(.mobile-calendar-page),body:has(.mobile-calendar-page){overflow-x:clip}
 .app-shell:has(.mobile-calendar-page),.app-shell:has(.mobile-calendar-page) .main,.mobile-calendar-page{overflow:visible!important}
 .smooth-calendar{overflow:visible!important;box-sizing:border-box;overflow-anchor:none}
 .smooth-calendar .mobile-calendar-top{position:sticky!important;top:58px!important;z-index:12;touch-action:pan-y;overflow:hidden;isolation:isolate}
 .smooth-calendar .mobile-month-clip{overflow:hidden;will-change:height}
 .smooth-calendar .mobile-calendar-grid{will-change:transform}
 .smooth-calendar.week-pinned .mobile-calendar-top{box-shadow:0 6px 16px #20253a18}
 .smooth-calendar .mobile-day-agenda{padding-bottom:110px}
 .smooth-calendar .mobile-day-agenda>header{position:sticky;top:var(--calendar-day-top,278px);z-index:11;background:#fff;padding:10px 5px;border-bottom:1px solid #eceef2}
 .smooth-calendar .mobile-day-agenda>header>button{display:none}
 .smooth-calendar .mobile-calendar-add{position:fixed!important;bottom:calc(76px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:25;width:calc(100% - 56px);max-width:360px;margin:0!important;min-height:52px;background:#fff;box-shadow:0 4px 18px #20253a26}
 .smooth-calendar .calendar-mode-toggle{padding:5px 12px!important;min-height:28px!important;margin:4px auto!important;font-size:11px}
}
.schedule-type.appointment,.schedule-legend .appointment{color:var(--schedule-appointment)}.schedule-type.task,.schedule-legend .task{color:var(--schedule-task)}.schedule-type.issue,.schedule-legend .issue{color:var(--schedule-issue)}
.schedule-type input{accent-color:currentColor}.schedule-type:before,.schedule-legend span:before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:currentColor;margin-right:5px}
.calendar-event.appointment-event{border-left-color:var(--schedule-appointment)!important}.calendar-event.task-event{border-left-color:var(--schedule-task)!important}.calendar-event.issue-event{border-left-color:var(--schedule-issue)!important}
.mobile-calendar-bars i.appointment,.mobile-agenda-item.appointment>i,.schedule-dot.appointment{background:var(--schedule-appointment)!important}.mobile-calendar-bars i.task,.mobile-agenda-item.task>i,.schedule-dot.task{background:var(--schedule-task)!important}.mobile-calendar-bars i.issue,.mobile-agenda-item.issue>i,.schedule-dot.issue{background:var(--schedule-issue)!important}
.calendar-staff{display:block;font-size:10px;line-height:1.3;white-space:normal;font-weight:600;color:#475569}.mobile-agenda-item .calendar-staff{grid-column:3;font-size:12px}.calendar-event{white-space:normal!important}
.date-picker-trigger{width:100%;text-align:left;border:1px solid #cbd5e1!important}.schedule-date-panel{padding:10px;border:1px solid #cbd5e1;border-radius:12px;margin-top:6px;background:white}.schedule-date-panel[hidden]{display:none}.schedule-date-panel header{display:flex;align-items:center;justify-content:space-between}.schedule-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center;margin:10px 0}.schedule-date-grid button{min-height:42px;padding:5px 2px;border:1px solid transparent;border-radius:7px;background:#f8fafc;color:#172033}.schedule-date-grid button.selected{border-color:#ff9000;background:#fff0df}.schedule-date-grid .outside{color:#8892a3}.schedule-dots{display:flex;justify-content:center;gap:3px;min-height:7px;margin-top:4px}.schedule-dot{width:5px;height:5px;border-radius:50%}.schedule-legend{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;margin-top:7px}
.stock-low-badge{margin-left:auto;background:#ffe6cc;color:#9a4100;border-radius:20px;padding:2px 6px;font-size:11px}.stock-level-overview{padding:20px;margin:18px 0}.stock-level-overview header{display:flex;justify-content:space-between;align-items:center;gap:10px}.stock-level-overview h2{margin:0}.stock-level-list{max-height:310px;overflow:auto}.stock-level-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;padding:10px 0;border-top:1px solid #e2e8f0}.stock-level-row small{grid-column:1/-1;color:#64748b}.stock-is-low{border-color:#edb166!important}.stock-level-row.stock-is-low strong,.stock-threshold-note.stock-is-low{color:#9a4100}.stock-threshold-note{padding:9px 12px;background:#f8fafc;border-radius:8px;font-size:12px}.stock-alert-review{display:flex;flex-wrap:wrap;gap:12px}
