/* Shared navigation and readability. No calculation or document styles are changed. */
@media screen {
:root{--workspace-action:#153e56;--workspace-action-hover:#0e2d40}
html body .sidebar{display:flex;flex-direction:column}.side-nav{min-height:0;scrollbar-width:thin;overscroll-behavior:contain}.menu-search{padding:12px 14px 6px}.menu-search label{display:block;font-size:11px;color:var(--muted);margin-bottom:5px}.menu-search input{min-height:40px;font-size:13px;background:var(--surface-alt)}.menu-search p{margin:6px 0 0;color:var(--muted);font-size:12px}
html body .nav-group{border:0;background:transparent;margin:0 0 9px;padding:0;box-shadow:none}.nav-group>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;padding:10px 9px;font-size:11px;letter-spacing:.03em;font-weight:750;color:var(--ink);border-radius:7px;user-select:none}.nav-group>summary::-webkit-details-marker{display:none}.nav-group>summary::after{content:'+';font-size:17px;font-weight:400}.nav-group[open]>summary::after{content:'−'}.nav-group>summary:hover{background:var(--surface-alt)}html body .nav-group-links{position:static;background:transparent;box-shadow:none;max-height:none;overflow:visible;padding:0 0 2px}.side-link{min-height:40px;font-size:12px;padding:9px 10px;margin:2px 0;line-height:1.4}.side-link.active{box-shadow:inset 3px 0 var(--brand);font-weight:750}.side-link .badge{margin-left:auto}.side-bottom{display:flex;flex-direction:column;gap:5px;padding:11px 15px;font-size:11px}.help-link{font-weight:700;color:var(--ink);padding:6px 0}.side-brand{min-height:94px}.brand-logo{object-fit:contain;max-height:74px;width:118px}
html body .record-nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:16px 0 0;padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px}.record-nav>span{font-weight:750;font-size:12px;margin-right:5px}.record-step{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;color:var(--ink);font-size:12px;background:var(--surface-alt)}.record-step:hover,.record-step.active{background:var(--workspace-action);border-color:var(--workspace-action);color:#fff;text-decoration:none}
html body .wrap{min-width:0}.wrap .head{align-items:center;flex-wrap:wrap}.wrap .head .quick{display:flex;flex-wrap:wrap;gap:8px}.wrap .head h1{overflow-wrap:anywhere}.wrap :is(.panel,.card,.field,.formgrid,.ops-panel){min-width:0}.wrap :is(input,select,textarea){max-width:100%;min-width:0}.wrap :is(input[type=checkbox],input[type=radio]){width:18px;min-width:18px;height:18px;flex-shrink:0;vertical-align:middle;accent-color:var(--workspace-action)}.wrap :is(input,select,textarea):focus-visible,.side-nav a:focus-visible,summary:focus-visible{outline:3px solid #65b9e3;outline-offset:2px}.wrap :is(.actions,.quick){row-gap:9px;column-gap:9px}.wrap .actions>form{margin:0;max-width:100%}.wrap .btn{white-space:normal;line-height:1.4;min-height:42px}.wrap .btn[aria-disabled=true]{opacity:.55;pointer-events:none}.wrap .field label{line-height:1.5}.wrap .field small{line-height:1.5;color:var(--muted)}.wrap :is(.alert,.section-note,.muted){overflow-wrap:anywhere}.wrap .alert{line-height:1.6}.wrap .alert a{font-weight:700}
html body .wrap table th{text-transform:none;letter-spacing:0;font-size:12px;line-height:1.4;color:var(--ink)}.table-wrap,.friendly-table-wrap{max-width:100%;overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.friendly-scroll-note{display:block;font-size:11px;color:var(--muted);margin:5px 0}.friendly-scroll-note[hidden]{display:none}.table-wrap:focus-visible,.friendly-table-wrap:focus-visible{outline:3px solid #65b9e3;outline-offset:2px}.wrap tbody tr:hover{background:var(--brand-soft)}
.friendly-list-caption{text-align:left;font-size:12px;color:var(--muted);padding:0 0 12px}.friendly-jump{display:flex;align-items:center;gap:10px;margin:0 0 16px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.friendly-jump label{white-space:nowrap}.friendly-jump select{max-width:360px;min-height:40px;font-size:13px}.wrap section[id]{scroll-margin-top:100px}.workspace-help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.workspace-help-grid .panel{margin:0}.workspace-help-grid ol{padding-left:20px}.workspace-help-grid li{padding-left:3px;margin:9px 0}.friendly-start{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:18px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.friendly-start p{margin:0;color:var(--muted);font-size:12px}.friendly-start .actions{margin:0}.friendly-start strong{display:block;margin-bottom:4px}
html body .wrap [hidden],html body .sidebar [hidden]{display:none!important}
@media(min-width:761px){html body .menu-toggle{display:none!important}.record-nav{margin-left:0}.topbar-right{min-width:0}.global-search{width:clamp(180px,22vw,320px)}html body .topbar{gap:14px}.topbar-title{max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:1100px) and (min-width:761px){.topbar .top-user{display:none}.global-search{width:180px}}
@media(max-width:760px){html body .sidebar{left:0;top:0;bottom:0;border-radius:0;width:min(310px,86vw);transform:translateX(-105%);z-index:70}.app-shell.sidebar-open .sidebar{transform:translateX(0)}html body .app-shell.sidebar-open .app-overlay{z-index:60;inset:0;display:block;background:rgba(0,0,0,.55)}html body .topbar{height:auto;min-height:64px;display:flex;flex-wrap:wrap;gap:8px;padding:10px}.topbar-left{flex:0 0 auto}.topbar-title{display:none}.topbar-right{flex:1;gap:7px;min-width:0}.topbar .global-search{flex:1;width:auto;min-width:70px}.global-search input{font-size:13px;min-height:42px}.topbar .theme-toggle{width:42px;min-width:42px;font-size:12px;padding:8px 4px!important}.topbar .top-user{display:none}.topbar .btn{font-size:11px;min-height:42px;padding:8px!important}.topbar .menu-toggle{display:inline-flex!important;min-width:42px;min-height:42px;padding:8px!important;font-size:19px}.menu-search input{font-size:16px}.record-nav{padding:9px;gap:6px}.record-nav>span{width:100%;margin-bottom:2px}.record-step{flex:1 1 calc(33.33% - 8px);font-size:11px;padding:7px 6px}.wrap .head{gap:12px}.wrap .head .quick{width:100%}.wrap .head .quick>.btn{flex:1 1 140px}.wrap .panel{padding:14px}.wrap label{font-size:12px}.wrap :is(input,select,textarea){font-size:16px}.wrap .friendly-jump select{font-size:14px}.workspace-help-grid{grid-template-columns:1fr}.friendly-jump{align-items:flex-start;flex-direction:column;gap:5px}.friendly-jump select{max-width:100%}.friendly-start{padding:13px}.friendly-start .actions{width:100%}.friendly-start .btn{flex:1}
/* Only the lead list uses cards. Financial and quotation tables retain their columns. */
html body .wrap table.friendly-leads{min-width:0;border:0;display:block}.friendly-leads thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.friendly-leads tbody{display:grid;grid-template-columns:1fr;gap:12px}.friendly-leads tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid var(--line);border-radius:10px;padding:11px;gap:8px;background:var(--surface-alt)}html body .friendly-leads td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere}.friendly-leads td:before{content:attr(data-label);display:block;font-size:11px;font-weight:700;color:var(--muted);margin-bottom:4px}.friendly-leads td:first-child,.friendly-leads td:last-child{grid-column:1/-1}.friendly-leads td:first-child:before,.friendly-leads td:last-child:before{display:none}.friendly-leads td:first-child{padding-bottom:9px;border-bottom:1px solid var(--line)}.friendly-leads td:first-child strong{font-size:15px}.friendly-leads td:last-child .btn{width:100%;margin:3px 0!important}.friendly-leads td .badge{white-space:normal}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.sidebar{transition:none}}
}
@media print{.record-nav,.friendly-jump,.friendly-start,.friendly-scroll-note,.menu-search{display:none!important}}

/* 15 Oct: shared compact actions, aligned filters and independent controls. */
@media screen {
html body .wrap :is(.actions,.workspace-button-row,.workspace-action-buttons){display:flex;align-items:center;flex-wrap:wrap;gap:10px}
html body .wrap .workspace-button-row{margin:12px 0}
html body .wrap :is(.workspace-action-buttons,.workspace-button-row)>.btn{margin:0!important;flex:0 0 auto}
html body .wrap .workspace-action-cell{width:1%;min-width:0;white-space:nowrap;text-align:right}
html body .wrap .workspace-action-buttons{justify-content:flex-end;flex-wrap:nowrap}
html body .wrap .workspace-action-buttons>form{display:inline-flex;width:auto;margin:0!important;flex:0 0 auto}
html body .wrap .workspace-action-buttons :is(.actions,.quick){margin:0!important;width:auto!important;display:flex!important;gap:10px!important}
html body .wrap .workspace-action-buttons .btn{margin:0!important;white-space:nowrap;width:auto;flex:0 0 auto}
html body .wrap .workspace-inline-filter{display:flex;align-items:flex-end;flex-wrap:nowrap;gap:12px;margin:0 0 18px;max-width:100%}
html body .wrap .workspace-inline-filter>.formgrid{display:flex!important;flex:1 1 auto;align-items:flex-end;gap:12px!important;min-width:0;margin:0}
html body .wrap .workspace-inline-filter .field{flex:1 1 0;min-width:0;margin:0}
html body .wrap .workspace-inline-filter>.field{max-width:540px}
html body .wrap .workspace-inline-filter>.actions{flex:0 0 auto;margin:0!important;padding:0}
html body .wrap .workspace-inline-filter>.btn{flex:0 0 auto;margin:0!important}
html body .wrap .workspace-inline-filter .field :is(input,select){width:100%}
html body .wrap .workspace-inline-filter>label{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0}
html body .wrap .workspace-inline-filter .actions>label{display:flex;align-items:center;gap:10px}
html body .wrap .workspace-section-actions{margin:16px 0 20px}
html body .wrap .panel>form + :is(.table-wrap,.friendly-table-wrap){margin-top:16px}
@media(max-width:760px){html body .wrap .workspace-inline-filter>.formgrid{flex-wrap:wrap}.workspace-inline-filter .formgrid>.field{flex-basis:120px}html body .wrap .workspace-inline-filter .btn{font-size:12px;padding:9px 12px!important}html body .wrap .workspace-action-buttons{gap:8px}.wrap .workspace-action-cell .btn{font-size:12px}}
}

@media screen {html body .wrap .panel>.btn+form{margin-top:14px}html body .wrap .workspace-action-cell .team-action-form{margin:0;display:inline-flex;width:auto}html body .wrap .workspace-action-cell .team-action-select{width:auto;min-width:140px}html body .wrap .workspace-inline-filter>.actions:has(>label){align-items:flex-end}html body .wrap .workspace-inline-filter>.actions>label{align-items:flex-end;margin:0}}
