/* Hansa 1.5.1 DEV: shared operational density; public/portal layouts stay separate. */
.app-shell{--sidebar-width:214px;--topbar-height:56px;--radius-lg:10px;--radius-md:8px;--radius-sm:6px;--shadow-soft:0 1px 3px #12223c0a;--border-color:#dce3ec;--border-strong:#c3cedc;font-size:13px;background:#f5f7fa}
.app-shell .app-sidebar{padding:12px 10px;background:#122239;box-shadow:none}.app-shell .app-brand{padding:8px 6px 16px}.app-shell .app-nav-link{min-height:34px;padding:7px 10px;border-radius:5px;font-size:13px}.app-shell .app-nav{gap:3px}
.app-shell .app-topbar{position:sticky;top:0;z-index:90;min-height:56px;padding:8px 20px;border-bottom:1px solid #dce3ec;background:#fff;box-shadow:none;backdrop-filter:none}.app-shell .topbar-row-unified{display:flex;gap:16px;flex-wrap:nowrap;min-height:40px}.app-shell .topbar-meta{gap:10px;min-width:140px;flex:1}.workspace-product{font-size:15px;font-weight:750;letter-spacing:-.4px;color:#14243c;white-space:nowrap}.workspace-product span{font-weight:450}.workspace-context{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#62728b}
.app-shell .topbar-tenant-shell,.app-shell .topbar-time-cluster{display:none}.app-shell .topbar-actions{gap:9px}.app-shell .topbar-user-copy strong{font-size:12px}.app-shell .user-avatar{height:29px;width:29px;font-size:11px}.app-shell .app-environment-badge{font-size:9px;padding:2px 5px}.app-shell .icon-btn{width:30px;height:30px;border-radius:5px}
.app-shell .app-content{padding:18px 22px;min-width:0}.app-shell .page-shell{width:100%;max-width:none;margin:0;padding:0}.app-shell .page-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;padding:0}.app-shell h1,.app-shell .page-title{font-size:23px;line-height:1.25}.app-shell h2{font-size:19px}.app-shell h3{font-size:15px}.app-shell .page-kicker,.app-shell .section-kicker{font-size:10px;letter-spacing:.07em}.app-shell .page-subtitle{font-size:12px;margin:4px 0 0}.app-shell p{margin-bottom:8px}.app-shell .surface-card,.app-shell .form-card,.app-shell .table-card{border:1px solid #dce3ec;border-radius:8px;box-shadow:none;padding:14px}.app-shell .section-header{margin-bottom:10px;gap:8px}.app-shell .btn{min-height:30px;padding:5px 11px;border-radius:5px;font-size:12px;box-shadow:none}.app-shell .btn-primary{background:#2456a6;border-color:#2456a6}.app-shell .form-control,.app-shell .form-select{min-height:32px;padding:5px 9px;border-radius:5px;font-size:13px;box-shadow:none}.app-shell textarea.form-control{min-height:110px;resize:vertical}.app-shell .form-label,.app-shell label{font-size:12px}.app-shell .row.g-3{--bs-gutter-y:12px;--bs-gutter-x:14px}.app-shell .mt-4{margin-top:16px!important}.app-shell .p-3{padding:14px!important}
.app-shell .table-responsive{overflow-x:auto;max-width:100%}.app-shell .table{font-size:12px;line-height:1.4}.app-shell .table>:not(caption)>*>*{padding:9px 11px;vertical-align:middle;border-color:#e5eaf1}.app-shell .table thead th{background:#f5f7fa;font-weight:650;font-size:11px;letter-spacing:.02em;color:#52617a;white-space:nowrap;border-bottom:1px solid #d4dce8}.app-shell tr[data-row-href]{cursor:pointer}.app-shell tr[data-row-href]:hover>td{background:#eef4fc}.app-shell tr[data-row-href]:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}.app-shell .status-badge{display:inline-flex;align-items:center;gap:4px;border-radius:4px;padding:2px 6px;font-size:10px;line-height:1.5;font-weight:600;white-space:nowrap}.table-sort-button{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:inherit;text-align:left;cursor:pointer}.table-sort-button::after{content:' ↕';opacity:.45}.table-sort-button:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
.app-shell :is(.customers-top-grid,.employee-top-grid,.orders-top-grid,.projects-top-grid){display:flex;flex-direction:column;gap:10px}.app-shell :is(.customers-summary-ribbon,.employee-summary-ribbon,.orders-summary-ribbon,.projects-summary-ribbon,.crm-summary-grid,.kpi-stack,.kpi-grid){display:flex;flex-wrap:wrap;gap:0;box-shadow:none;background:none;margin:0 0 12px;border:1px solid #dce3ec;border-radius:7px;padding:0}.app-shell :is(.customers-summary-chip,.employee-summary-chip,.orders-summary-chip,.projects-summary-chip,.crm-summary-card,.kpi-card){flex:1 1 130px;min-width:0;padding:9px 13px;border:0;border-right:1px solid #dce3ec;background:#fff;box-shadow:none;border-radius:0;display:flex;gap:8px;align-items:center}.app-shell :is(.kpi-value,.crm-summary-value,.customers-summary-value,.employee-summary-value,.orders-summary-value,.projects-summary-value){font-size:17px;line-height:1.2}.app-shell :is(.kpi-icon,.crm-summary-icon){width:27px;height:27px;font-size:14px;flex-shrink:0}.app-shell :is(.customers-search-header,.employee-search-header,.orders-search-header,.projects-search-header){display:none}.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card){padding:10px;background:#fff}.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card) .row{display:flex;flex-wrap:wrap;align-items:end;margin-top:0!important}.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card) .row>div{flex:1 1 135px;width:auto}.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card) .row>div:first-child{flex:3 1 220px}.app-shell :is(.customers-search-actions,.employee-search-actions,.orders-search-actions,.projects-search-actions){display:flex;gap:6px;margin-top:8px;align-items:center;flex-wrap:wrap}.app-shell .empty-state-card{padding:20px;min-height:0;border:1px dashed #d6deea;box-shadow:none}.app-shell .empty-state-card i{font-size:22px}
.business-tabs{display:flex;gap:3px;overflow-x:auto;border-bottom:1px solid #d4dce8;margin:12px 0 16px;white-space:nowrap}.business-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:9px 12px;font-size:12px;color:#53637b}.business-tabs button.is-active{color:#174e9b;border-bottom-color:#2456a6;font-weight:650}.business-section[hidden]{display:none!important}.sticky-save-bar{position:sticky;bottom:12px;z-index:65;border:1px solid #a5bcdf;background:#f3f7fe;border-radius:7px;box-shadow:0 6px 22px #172d4b18;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.sticky-save-bar>div{display:flex;gap:7px}.business-metrics{display:flex;gap:22px;flex-wrap:wrap;padding:12px 0}.business-metrics dl{margin:0}.business-metrics dt{font-size:11px;color:#63728a;font-weight:500}.business-metrics dd{font-size:17px;font-weight:650;margin:2px 0 0}.business-progress{height:22px;min-width:140px;max-width:320px;position:relative;background:#e6edf6;border-radius:4px;overflow:hidden}.business-progress>span{display:block;height:100%;background:#98b9e5}.business-progress>strong{position:absolute;inset:2px 8px;font-size:11px;color:#153967}.business-action-menu{position:relative;display:inline-block}.business-action-menu>summary{list-style:none;cursor:pointer;padding:3px 10px;font-size:18px;border:1px solid #dae2ee;border-radius:5px}.business-action-menu>summary::-webkit-details-marker{display:none}.business-action-menu>summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
/* One shared layer: native popover top layer. It escapes overflow, transforms,
   sticky headers and cards without reparenting Blazor-owned controls. */
.business-action-menu>.row-action-panel{position:fixed;inset:auto;margin:0;right:auto;min-width:min(220px,calc(100vw - 16px));width:max-content;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;box-sizing:border-box;padding:8px;background:#fff;color:#14243c;border:1px solid #d4ddeb;border-radius:6px;box-shadow:0 8px 24px #15284020}
.business-action-menu>.row-action-panel:not([popover]),.business-action-menu>.row-action-panel:popover-open{display:grid;gap:5px}.business-action-menu:not([open])>.row-action-panel{display:none}.row-action-panel .btn{text-align:left}.row-action-panel:focus-visible{outline:2px solid #2563eb}.row-action-panel::backdrop{background:transparent}
.compact-technical{margin-top:12px}.compact-technical summary{cursor:pointer;font-size:12px;color:#65738a}
.global-tracker{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:4px 8px;border:1px solid #d7e1ee;border-radius:7px;background:#f9fbfe}.global-tracker .tracker-clock{font-variant-numeric:tabular-nums;font-size:16px;font-weight:700;letter-spacing:.4px;min-width:76px}.tracker-indicator{height:7px;width:7px;border-radius:50%;background:#8e9bb0}.tracker-indicator.running{background:#199269}.tracker-indicator.paused{background:#bf7a1b}.tracker-context{font-size:11px;max-width:150px;overflow:hidden;text-overflow:ellipsis}.tracker-controls{display:flex;gap:4px}.global-tracker .btn{padding:4px 7px;min-height:27px}.tracker-dialog-backdrop{position:fixed;inset:0;background:#172b4738;z-index:250;display:flex;align-items:flex-start;justify-content:center;padding:80px 16px 20px}.tracker-dialog{width:430px;max-width:100%;background:#fff;padding:18px;border-radius:9px;border:1px solid #ced9e8;box-shadow:0 16px 70px #14253e3f}.tracker-dialog label{display:block;margin-top:10px}.tracker-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.tracker-error{font-size:11px;color:#a22635;max-width:260px;white-space:normal}.employee-unified-fields{border:0;padding:0;margin:0;min-width:0}.object-editor-heading{display:none}.full-page-editor{max-width:none!important;width:100%!important}.app-shell .business-object-summary .text-preline{white-space:pre-wrap;overflow-wrap:anywhere;max-height:none}
@media(min-width:1200px){.app-shell .topbar-time-cluster+.topbar-actions{margin-left:0}.app-shell .app-content{padding-top:16px}.app-shell .topbar-tenant-logo-frame{display:none}.app-shell .app-topbar .topbar-user-inline small{font-size:10px}}
@media(max-width:1199px){.workspace-context{display:none}.tracker-context{max-width:90px}.app-shell .topbar-meta{min-width:0}.app-shell .topbar-user-copy{display:none}}
@media(max-width:767px){.app-shell .app-topbar{padding:6px 10px}.app-shell .topbar-row-unified{gap:7px;flex-wrap:wrap}.app-shell .topbar-meta{flex:1}.app-shell .app-content{padding:12px}.global-tracker{order:3;width:100%;justify-content:space-between}.app-shell .topbar-actions{margin-left:auto}.tracker-context{max-width:120px}.app-shell .page-header{align-items:flex-start;flex-wrap:wrap}.app-shell .page-title,.app-shell h1{font-size:20px}.sticky-save-bar{bottom:6px;padding:8px;font-size:12px}.app-shell .business-tabs button{padding:8px}.app-shell .kpi-stack>div{flex:1 1 45%}}
.compact-filter-disclosure{position:relative;flex:0 0 auto!important;width:auto!important;align-self:end;padding:0 7px}.compact-filter-disclosure>summary{font-size:12px;list-style:none;padding:7px 10px;border:1px solid #d4deeb;border-radius:5px;cursor:pointer;white-space:nowrap}.advanced-filter-fields{position:absolute;top:100%;right:0;z-index:75;width:360px;max-width:calc(100vw - 40px);padding:14px;display:grid;grid-template-columns:1fr 1fr;gap:12px;background:white;border:1px solid #ccd7e6;box-shadow:0 10px 35px #172d4b26;border-radius:6px}.advanced-filter-fields>div{width:100%;padding:0}.app-shell :is(.customer-invoices-top-grid){display:flex;flex-direction:column;gap:10px}.app-shell .customer-invoices-summary-ribbon{display:flex;gap:12px;margin-bottom:10px}.app-shell .customer-invoices-summary-chip{padding:8px 12px;border:1px solid #dce3ec;border-radius:6px;box-shadow:none}.app-shell .customer-invoices-search-header{display:none}.app-shell .customer-invoices-search-card{padding:10px}.app-shell .customer-invoices-search-card>.row{display:flex;align-items:end;flex-wrap:wrap;margin-top:0!important}.app-shell .customer-invoices-search-card>.row>div{flex:1 1 140px;width:auto}.app-shell .customer-invoices-search-card>.row>div:first-child{flex:3 1 220px}.app-shell .customer-invoices-search-actions{display:flex;gap:7px;margin-top:8px}.app-shell .page-actions:empty{display:none}.app-shell .employee-unified-fields>.row>[hidden]{display:none}.app-shell .embedded-customer-editor>.form-card{padding:14px}.app-shell .embedded-customer-editor .page-header[hidden]{display:none}.app-shell .business-action-menu .btn-icon:has(i.bi-eye){display:none}
@media(min-width:1200px){.app-shell :is(.customers-search-shell-integrated,.employee-search-shell-integrated,.orders-search-shell-integrated,.projects-search-shell-integrated,.customer-invoices-search-shell-integrated){display:grid;grid-template-columns:minmax(0,1fr)auto;gap:8px;align-items:end}.app-shell :is(.customers-summary-ribbon,.employee-summary-ribbon,.orders-summary-ribbon,.projects-summary-ribbon,.customer-invoices-summary-ribbon){grid-column:1/-1}.app-shell :is(.customers-search-actions,.employee-search-actions,.orders-search-actions,.projects-search-actions,.customer-invoices-search-actions){margin:0}}
.business-list-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:10px 0 14px}.business-list-toolbar>label:first-child{flex:2 1 220px}.business-list-toolbar>label{flex:1 1 140px}.website-price-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:12px;margin:14px 0}.website-price-grid>p{grid-column:1/-1}.compact-price-editor{margin:14px 0;padding:10px 0;border-top:1px solid #e1e7f0}.compact-price-editor>summary{cursor:pointer;font-weight:600;font-size:12px;color:#2456a6}.app-shell .surface-card>dl{display:grid;grid-template-columns:180px minmax(0,1fr);gap:7px 14px;margin:10px 0}.app-shell .surface-card>dl dt{font-size:12px;color:#62728b;font-weight:500}.app-shell .surface-card>dl dd{margin:0;min-width:0;overflow-wrap:anywhere}.app-shell .detail-item strong,.app-shell code{overflow-wrap:anywhere}.app-shell .crm-summary-meta{font-size:10px}.app-shell .crm-summary-card .crm-summary-value{font-size:16px}.app-shell .crm-summary-card{min-height:0}.app-shell .crm-tab-panel .crm-summary-grid{box-shadow:none}
@media(min-width:1400px){.app-shell .surface-card>dl{grid-template-columns:150px minmax(0,1fr)150px minmax(0,1fr)}}
@media(max-width:900px){.website-price-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}}

.app-shell [hidden]{display:none!important}

/* Explicitly replace legacy column/gap defaults as well as card dimensions. */
.app-shell .page-shell{display:block;gap:0}.app-shell .page-shell>.surface-card{margin-bottom:12px}.app-shell .page-shell>.btn{display:inline-flex;width:auto;margin:0 6px 8px 0}.app-shell .page-shell>p{margin:6px 0}.app-shell .page-shell>article{margin-top:12px}
.app-shell :is(.kpi-stack,.kpi-grid,.crm-summary-grid,.customers-summary-ribbon,.employee-summary-ribbon,.orders-summary-ribbon,.projects-summary-ribbon){flex-direction:row;align-items:stretch}.app-shell :is(.kpi-card,.crm-summary-card){flex-direction:row;min-height:54px}.app-shell .kpi-stack{margin-bottom:12px}
.app-shell .app-topbar{border-radius:0;margin:0;width:100%}.app-shell .platform-brand{display:flex;align-items:center;gap:8px}.app-shell .brand-mark{width:29px;height:29px;border-radius:7px;box-shadow:none;font-size:14px;flex-shrink:0}.app-shell .brand-copy strong{font-size:14px}.app-shell .brand-copy span{font-size:9px;letter-spacing:.08em}.app-shell .app-nav-shell{gap:12px}.app-shell .app-nav-sublink{padding:7px 12px;min-height:30px;font-size:12px;border-radius:5px}.app-shell .app-environment-badge{min-height:22px}
.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card,.customer-invoices-search-card){padding:8px 10px}.app-shell :is(.customers-top-grid,.employee-top-grid,.orders-top-grid,.projects-top-grid,.customer-invoices-top-grid){margin-bottom:12px}.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card,.customer-invoices-search-card) .form-label{margin-bottom:4px}
.app-shell fieldset:disabled{opacity:.7}.app-shell .employee-workspace .employee-unified-fields>.row>div:only-child{max-width:100%}
@media(max-width:767px){.app-shell .surface-card>dl{grid-template-columns:110px minmax(0,1fr);gap:7px}.app-shell .topbar-meta>.platform-brand{display:none}.app-shell .global-tracker{min-width:0}.app-shell .tracker-context{max-width:75px}.app-shell .website-price-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell .business-metrics{gap:12px}.app-shell .page-actions{gap:7px}}

.app-shell .operational-subnav{display:flex;flex-direction:column;gap:2px;margin:0 0 6px 13px}.app-shell .operational-subnav .is-sub{padding:5px 13px;min-height:28px;font-size:11px}
/* List pages: one compact stats line and one toolbar before the data table. */
.app-shell .page-header .page-kicker{display:none}.app-shell .page-subtitle{max-width:none}.app-shell .page-header{margin-bottom:12px}
.app-shell :is(.customers-search-shell-integrated,.employee-search-shell-integrated,.orders-search-shell-integrated,.projects-search-shell-integrated,.customer-invoices-search-shell-integrated){padding-top:0;gap:8px}
.app-shell :is(.customers-summary-ribbon,.employee-summary-ribbon,.orders-summary-ribbon,.projects-summary-ribbon,.customer-invoices-summary-ribbon){margin:0!important;align-items:center}
.app-shell :is(.customers-summary-chip,.employee-summary-chip,.orders-summary-chip,.projects-summary-chip,.customer-invoices-summary-chip){padding:6px 10px;min-height:34px;gap:7px}
.app-shell :is(.customers-summary-copy,.employee-summary-copy,.orders-summary-copy,.projects-summary-copy,.customer-invoices-summary-copy){flex-direction:row;align-items:baseline;gap:8px}
.app-shell :is(.customers-summary-value,.employee-summary-value,.orders-summary-value,.projects-summary-value,.customer-invoices-summary-value){font-size:15px}.app-shell :is(.customers-summary-label,.employee-summary-label,.orders-summary-label,.projects-summary-label,.customer-invoices-summary-label){font-size:10px;letter-spacing:.02em}
.app-shell :is(.customers-summary-chip,.employee-summary-chip,.orders-summary-chip,.projects-summary-chip,.customer-invoices-summary-chip) .kpi-icon{min-width:21px;width:21px;height:21px;border-radius:5px;font-size:12px}
.app-shell :is(.customers-search-card,.employee-search-card,.orders-search-card,.projects-search-card,.customer-invoices-search-card) .row>*{margin-top:0}
.app-shell :is(.customers-search-actions,.employee-search-actions,.orders-search-actions,.projects-search-actions,.customer-invoices-search-actions){padding-left:0}
.app-shell .employee-attendance-strip{gap:6px;margin-top:7px!important}.app-shell .employee-attendance-pill{min-height:21px;padding:2px 6px;border-radius:4px;font-size:10px;border:0}
.app-shell .table-card>.section-header{align-items:center;margin-bottom:6px}.app-shell .table-card>.section-header .section-kicker{display:none}.app-shell .table-card>.section-header h3{margin:0}.app-shell .table-card>.table-responsive.mt-4{margin-top:0!important}
/* Customer workspace overrides its older page-local CRM styles. */
.app-shell .customer-crm-page .crm-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:10px 0 14px}
.app-shell .customer-crm-page .crm-summary-grid .crm-summary-card{display:flex;flex-direction:row;align-items:center;min-height:0;padding:8px 10px;gap:8px}
.app-shell .customer-crm-page .crm-summary-grid .crm-summary-icon{width:24px;height:24px;min-width:24px;flex:0 0 24px;border-radius:5px;font-size:12px}
.app-shell .customer-crm-page .crm-summary-grid .crm-summary-label{font-size:10px;line-height:1.3;letter-spacing:.02em}.app-shell .customer-crm-page .crm-summary-grid .crm-summary-value{font-size:15px;line-height:1.3}.app-shell .customer-crm-page .crm-summary-grid .crm-summary-meta{font-size:10px;line-height:1.3;margin-top:3px}
.app-shell .detail-item{padding:8px 10px;border-radius:5px;min-height:0;gap:3px}.app-shell .detail-item span{font-size:10px;letter-spacing:.02em}.app-shell .detail-item strong{font-size:13px;line-height:1.4}
@media(min-width:1200px){
 .app-shell .operational-project-table,.app-shell .operational-order-table{table-layout:fixed;width:100%}
 .app-shell .operational-project-table>:not(caption)>*>*,.app-shell .operational-order-table>:not(caption)>*>*{padding:8px 6px;overflow-wrap:anywhere;white-space:normal}
 .app-shell .operational-project-table th,.app-shell .operational-order-table th{font-size:10px}
 .app-shell .operational-project-table :is(th,td):nth-child(3){display:none}
 .app-shell .operational-project-table :is(th,td):nth-child(1){width:26%}.app-shell .operational-project-table :is(th,td):nth-child(2){width:18%}.app-shell .operational-project-table :is(th,td):nth-child(4){width:12%}.app-shell .operational-project-table :is(th,td):nth-child(5){width:14%}.app-shell .operational-project-table :is(th,td):nth-child(6){width:23%}.app-shell .operational-project-table :is(th,td):nth-child(7){width:7%}
 .app-shell .operational-project-table .text-preline{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.app-shell .operational-project-table .business-progress{min-width:80px;max-width:130px}
 .app-shell .operational-order-table :is(th,td):nth-child(1){width:16%}.app-shell .operational-order-table :is(th,td):nth-child(2){width:16%}.app-shell .operational-order-table :is(th,td):nth-child(3){width:10%}.app-shell .operational-order-table :is(th,td):nth-child(4){width:9%}.app-shell .operational-order-table :is(th,td):nth-child(5){width:11%}.app-shell .operational-order-table :is(th,td):nth-child(6){width:12%}.app-shell .operational-order-table :is(th,td):nth-child(7){width:18%}.app-shell .operational-order-table :is(th,td):nth-child(8){width:8%}
}
@media(max-width:767px){.app-shell .customer-crm-page .crm-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.app-shell .business-contact{font-size:12px;margin-top:4px;color:#53637b;overflow-wrap:anywhere}
