/* Compact navigation and customer module additions */
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 20%,#dceaff 0,transparent 34%),linear-gradient(135deg,#f5f8fb,#eaf0f5)}.login-card{width:min(420px,100%);background:#fff;border:1px solid #dfe6ec;border-radius:18px;padding:28px;box-shadow:0 25px 70px rgba(16,42,67,.16)}.login-brand{display:flex;align-items:center;gap:10px;padding-bottom:19px;border-bottom:1px solid var(--line)}.login-brand strong,.login-brand span{display:block}.login-brand strong{font-size:17px}.login-brand span{font-size:10px;color:var(--muted);margin-top:2px}.login-copy{margin:24px 0 20px}.login-copy h1{margin:4px 0 7px;font-size:25px}.login-copy p{margin:0;color:var(--muted)}.login-card form{display:flex;flex-direction:column;gap:14px}.login-button{width:100%;margin-top:3px}.login-card .form-message{margin:0}.login-security{display:block;text-align:center;color:#8a98a4;margin-top:17px;font-size:9px}.login-owner-brand{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1f4;min-height:64px}.login-owner-brand span{font-size:9px;color:#788895;white-space:nowrap}.login-owner-brand img{display:block;width:96px;height:72px;object-fit:contain;mix-blend-mode:multiply}
.sidebar{width:205px;padding:16px 10px}.main-area{margin-right:205px}.brand{gap:9px;padding:0 7px 16px}.brand-mark{width:38px;height:38px;border-radius:11px;font-size:13px}.brand strong{font-size:15px}.nav-list{gap:3px;margin-top:15px}.nav-item{padding:9px 10px;gap:9px}.nav-icon{font-size:16px}.sales-subnav,.module-subnav{display:flex;flex-direction:column;margin:-1px 31px 4px 0;border-right:1px solid rgba(255,255,255,.14);padding-right:7px;gap:1px}.subnav-item{border:0;background:transparent;color:#96aabc;font:inherit;font-size:10px;text-align:right;padding:6px 9px;border-radius:7px;cursor:pointer}.subnav-item:hover,.subnav-item.active{color:#fff;background:rgba(255,255,255,.08)}
.customer-code{display:inline-flex;color:#255689;background:#edf4ff;border:1px solid #d7e6ff;border-radius:7px;padding:4px 7px;font-weight:750;font-size:10px}.report-button{color:var(--blue);background:var(--blue-soft);border:0;border-radius:7px;padding:7px 9px;font:inherit;font-size:10px;font-weight:700;cursor:pointer}.customer-stats .stat-card{min-width:0}
.modal-layer{position:fixed;inset:0;background:rgba(9,25,40,.55);backdrop-filter:blur(3px);display:grid;place-items:center;padding:22px;z-index:50}.modal-card{background:#fff;border-radius:15px;box-shadow:0 24px 70px rgba(9,25,40,.28);width:min(760px,100%);max-height:92vh;overflow:auto}.customer-modal-card{width:min(720px,100%)}.report-modal-card{width:min(850px,100%)}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 16px;border-bottom:1px solid var(--line)}.modal-header h2{margin:3px 0 5px;font-size:19px}.modal-header p{margin:0;color:var(--muted);font-size:11px}.modal-header .icon-button{font-size:25px}.modal-form{padding:20px 22px}.modal-actions{display:flex;justify-content:flex-start;gap:8px;padding:15px 22px;border-top:1px solid var(--line);background:#fafbfc;border-radius:0 0 15px 15px}.customer-modal-card .form-message{margin:0 22px 15px}
.report-content{padding:20px 22px}.report-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}.report-metric{border:1px solid var(--line);border-radius:10px;padding:13px;background:#fbfcfd}.report-metric span,.report-metric strong{display:block}.report-metric span{font-size:9px;color:var(--muted);margin-bottom:5px}.report-metric strong{font-size:16px;color:var(--navy)}.report-contact{display:flex;gap:18px;background:#f5f8fb;border-radius:9px;padding:11px 13px;margin-bottom:18px;font-size:10px;color:#586a78}.report-content h3{font-size:13px;margin:0 0 10px}.empty-report{text-align:center;color:var(--muted);padding:28px;background:#fafbfc;border-radius:10px}
@media(max-width:760px){.sidebar{width:68px;padding:12px 7px}.main-area{margin-right:68px}.sales-subnav,.module-subnav{display:none}.brand-mark{width:36px;height:36px}.modal-layer{padding:8px}.modal-card{max-height:96vh}.report-summary{grid-template-columns:repeat(2,1fr)}.customer-stats{grid-template-columns:1fr}.modal-form{grid-template-columns:1fr}.modal-form .span-2{grid-column:auto}}
@media print{body>*:not(.modal-layer){display:none!important}.modal-layer{position:static;background:#fff;padding:0}.report-modal-card{box-shadow:none;width:100%;max-height:none}.modal-actions,.modal-header .icon-button{display:none!important}}

.compact-stats{grid-template-columns:repeat(4,1fr)}.workflow-banner{display:flex;justify-content:space-between;align-items:center;gap:15px;background:linear-gradient(120deg,#122f49,#1c5077);color:#fff;border-radius:13px;padding:17px 20px;margin-bottom:17px}.workflow-banner strong,.workflow-banner span{display:block}.workflow-banner span{font-size:10px;color:#bbcede;margin-top:4px}.order-chips{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.order-chip{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.15);border-radius:20px;padding:7px 10px;font-size:10px;cursor:pointer}.order-chip:hover{background:rgba(255,255,255,.2)}
.report-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.report-panel{padding:18px;min-height:280px}.report-panel.wide{grid-column:span 2}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.panel-heading h2{font-size:15px;margin:0}.panel-heading p{font-size:10px;color:var(--muted);margin:4px 0 0}.bar-chart{height:210px;display:flex;align-items:flex-end;gap:16px;padding:15px 12px 0;border-bottom:1px solid var(--line)}.bar-column{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:7px}.bar-value{font-size:9px;color:var(--muted)}.bar{width:min(48px,75%);min-height:4px;background:linear-gradient(180deg,#4e8cff,#2563eb);border-radius:7px 7px 2px 2px}.bar-label{font-size:9px;color:var(--muted)}.rank-list{display:flex;flex-direction:column;gap:9px}.rank-item{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:9px;border-bottom:1px solid #edf0f2;padding-bottom:9px}.rank-number{width:25px;height:25px;border-radius:7px;background:#edf4ff;color:var(--blue);display:grid;place-items:center;font-size:9px;font-weight:800}.rank-info strong,.rank-info span{display:block}.rank-info strong{font-size:11px}.rank-info span{font-size:9px;color:var(--muted);margin-top:3px}.rank-value{font-size:11px;font-weight:750;color:var(--navy)}
.price-lists-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.price-list-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow);display:flex;justify-content:space-between;align-items:center}.price-list-card strong,.price-list-card span{display:block}.price-list-card strong{font-size:13px}.price-list-card span{font-size:9px;color:var(--muted);margin-top:4px}.default-badge{background:var(--green-soft);color:var(--green);border-radius:14px;padding:5px 8px;font-size:9px;font-weight:700}.action-group{display:flex;gap:5px}.small-action{border:0;border-radius:7px;padding:6px 8px;font:inherit;font-size:9px;font-weight:700;cursor:pointer}.small-action.primary{background:var(--blue-soft);color:var(--blue)}.small-action.success{background:var(--green-soft);color:var(--green)}.small-action.danger{background:#fdecef;color:var(--red)}
@media(max-width:900px){.compact-stats{grid-template-columns:repeat(2,1fr)}.report-grid{grid-template-columns:1fr}.report-panel.wide{grid-column:auto}.price-lists-grid{grid-template-columns:1fr}.workflow-banner{align-items:flex-start;flex-direction:column}.order-chips{justify-content:flex-start}}
.finance-block{margin-bottom:16px}.amount-outstanding{color:var(--red);font-weight:800}.amount-paid{color:var(--green);font-weight:800}.status.posted,.status.partially_paid{background:var(--amber-soft);color:var(--amber)}.status.paid{background:var(--green-soft);color:var(--green)}.status.sent,.status.accepted{background:var(--blue-soft);color:var(--blue)}.status.converted,.status.dispatched,.status.received,.status.credited{background:var(--green-soft);color:var(--green)}.status.rejected,.status.cancelled{background:#fdecef;color:var(--red)}

/* Sales workspace - high density desktop layout */
.app-shell .sidebar{width:172px;padding:9px 7px}
.app-shell .main-area{margin-right:172px}
.app-shell .brand{gap:7px;padding:0 5px 8px}
.app-shell .brand-mark{width:31px;height:31px;border-radius:8px;font-size:11px}
.app-shell .brand strong{font-size:12px;line-height:1.15}
.app-shell .brand span{font-size:8px;line-height:1.15}
.app-shell .nav-list{gap:1px;margin-top:6px}
.app-shell .nav-item{min-height:31px;padding:6px 7px;gap:7px;border-radius:7px;font-size:10.5px;line-height:1.15}
.app-shell .nav-icon{font-size:14px}
.app-shell .sales-subnav,.app-shell .module-subnav{margin:-1px 25px 2px 0;padding-right:5px;gap:0}
.app-shell .subnav-item{padding:4px 6px;border-radius:5px;font-size:8.5px;line-height:1.2}
.app-shell .sidebar-footer{padding-top:7px;font-size:8px}

.app-shell .topbar{height:48px;padding:0 14px}
.app-shell .crumbs{font-size:9px;gap:5px}
.app-shell .top-actions{gap:6px}
.app-shell .global-search{width:220px;height:30px;padding:0 9px;font-size:9.5px;border-radius:7px}
.app-shell .icon-button{width:30px;height:30px;border-radius:7px;font-size:14px}
.app-shell .notification{width:6px;height:6px}
.app-shell .avatar{width:29px;height:29px;font-size:9px}

.app-shell .page-view{padding:8px 14px 20px}
.app-shell .page-heading,.app-shell .document-header{margin-bottom:8px;gap:8px}
.app-shell .page-heading h1,.app-shell .document-title h1{font-size:19px;line-height:1.15;margin:2px 0 3px}
.app-shell .page-heading p,.app-shell .document-title p{font-size:9.5px;line-height:1.35;margin:0}
.app-shell .eyebrow{font-size:8px;line-height:1.2}
.app-shell .document-actions,.app-shell .toolbar-actions{gap:5px}
.app-shell .button{min-height:30px;padding:6px 9px;border-radius:7px;font-size:9.5px;line-height:1.1}

.app-shell .stats-grid{gap:7px;margin-bottom:8px}
.app-shell .stat-card{padding:8px 9px;border-radius:8px;gap:7px;min-height:60px}
.app-shell .stat-icon{width:30px;height:30px;border-radius:7px;font-size:13px}
.app-shell .stat-card strong{font-size:16px;line-height:1.05;margin-top:1px}
.app-shell .stat-card span,.app-shell .stat-card small{font-size:8px;line-height:1.2}

.app-shell .content-card,.app-shell .form-card,.app-shell .lines-card,.app-shell .summary-card,.app-shell .timeline-card,.app-shell .availability-card{border-radius:8px}
.app-shell .card-toolbar{padding:8px 10px;gap:8px}
.app-shell .card-toolbar h2{font-size:12px;margin:0}
.app-shell .card-toolbar p{font-size:8.5px;margin:2px 0 0}
.app-shell .table-search{height:29px;padding:0 8px;font-size:9px;border-radius:6px}
.app-shell .tabs{padding:0 10px;gap:12px}
.app-shell .tabs button{padding:7px 1px;font-size:9px}
.app-shell .table-wrap table{font-size:10px;line-height:1.2}
.app-shell .table-wrap th,.app-shell .table-wrap td{padding:5px 8px}
.app-shell .status{padding:3px 6px;border-radius:10px;font-size:8px;line-height:1}
.app-shell .customer-code,.app-shell .report-button{padding:3px 6px;font-size:8.5px;border-radius:5px}
.app-shell .customer-cell{gap:6px}
.app-shell .order-number{font-size:9px}

.app-shell .workflow-banner{padding:9px 11px;margin-bottom:8px;border-radius:8px;gap:8px}
.app-shell .workflow-banner strong{font-size:11px}
.app-shell .workflow-banner span{font-size:8.5px;margin-top:2px}
.app-shell .order-chips{gap:4px}
.app-shell .order-chip{padding:4px 7px;font-size:8px}
.app-shell .price-lists-grid{gap:7px;margin-bottom:8px}
.app-shell .price-list-card{padding:9px 10px;border-radius:8px}
.app-shell .price-list-card strong{font-size:10.5px}
.app-shell .price-list-card span{font-size:8px;margin-top:2px}
.app-shell .default-badge,.app-shell .small-action{padding:4px 6px;font-size:8px;border-radius:5px}

.app-shell .editor-layout{gap:8px}
.app-shell .editor-main,.app-shell .editor-side{gap:8px}
.app-shell .form-card,.app-shell .lines-card,.app-shell .summary-card,.app-shell .timeline-card,.app-shell .availability-card{padding:9px 10px}
.app-shell .section-title,.app-shell .lines-title,.app-shell .summary-heading{margin-bottom:7px;gap:6px}
.app-shell .section-title h2,.app-shell .lines-title h2,.app-shell .summary-heading h2{font-size:11.5px;margin:0}
.app-shell .section-icon{width:26px;height:26px;border-radius:6px;font-size:11px}
.app-shell .form-grid{gap:7px 8px}
.app-shell .field{gap:3px}
.app-shell .field label{font-size:8.5px}
.app-shell .field input,.app-shell .field select,.app-shell .field textarea{min-height:29px;padding:5px 7px;border-radius:6px;font-size:9.5px}
.app-shell .field textarea{min-height:52px}
.app-shell .lines-table th,.app-shell .lines-table td{padding:4px 5px;font-size:9px}
.app-shell .line-input{min-height:27px;padding:4px 5px;font-size:9px;border-radius:5px}
.app-shell .add-line-wide{padding:6px;font-size:9px}
.app-shell .summary-row{padding:4px 0;font-size:9px}
.app-shell .summary-total{padding-top:7px;margin-top:4px;font-size:11px}
.app-shell .timeline-item,.app-shell .route-item{padding:6px 0;gap:7px;font-size:9px}

.app-shell .report-grid{gap:7px}
.app-shell .report-panel{padding:9px 10px;min-height:205px}
.app-shell .panel-heading{margin-bottom:8px}
.app-shell .panel-heading h2{font-size:11.5px}
.app-shell .panel-heading p{font-size:8px;margin-top:2px}
.app-shell .bar-chart{height:145px;gap:9px;padding:7px 6px 0}
.app-shell .bar-column{gap:4px}
.app-shell .bar-value,.app-shell .bar-label{font-size:7.5px}
.app-shell .bar{width:min(38px,72%)}
.app-shell .rank-list{gap:5px}
.app-shell .rank-item{grid-template-columns:22px 1fr auto;gap:6px;padding-bottom:5px}
.app-shell .rank-number{width:21px;height:21px;border-radius:5px;font-size:8px}
.app-shell .rank-info strong,.app-shell .rank-value{font-size:9.5px}
.app-shell .rank-info span{font-size:7.5px;margin-top:1px}

@media(max-width:760px){
  .app-shell .sidebar{width:68px;padding:10px 6px}
  .app-shell .main-area{margin-right:68px}
  .app-shell .brand{padding:0 1px 8px}
  .app-shell .brand-mark{width:34px;height:34px}
  .app-shell .page-view{padding:8px 9px 18px}
  .app-shell .topbar{padding:0 8px}
  .app-shell .global-search{width:135px}
  .app-shell .stats-grid,.app-shell .compact-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Sales analytics command center */
.report-page-heading{align-items:flex-end}
.report-filterbar{display:grid;grid-template-columns:150px 150px minmax(220px,1fr) auto;align-items:end;gap:8px;padding:8px 10px;margin-bottom:8px;background:#fff}
.compact-field{display:flex;flex-direction:column;gap:3px}
.compact-field span{font-size:8px;font-weight:750;color:#627485}
.compact-field input,.compact-field select{height:29px;border:1px solid var(--line);border-radius:6px;background:#fbfcfd;color:var(--navy);font:inherit;font-size:9.5px;padding:0 7px;outline:0}
.compact-field input:focus,.compact-field select:focus{border-color:#7aa7df;box-shadow:0 0 0 2px rgba(37,99,235,.08)}
.sales-kpi-grid{display:grid;grid-template-columns:1.35fr repeat(4,1fr);gap:7px;margin-bottom:8px}
.sales-kpi{position:relative;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:8px;padding:9px 11px;min-height:69px;box-shadow:0 3px 12px rgba(16,42,67,.035)}
.sales-kpi:before{content:"";position:absolute;inset:0 0 0 auto;width:3px;background:#b5c4d1}
.sales-kpi:nth-child(3):before{background:#8b5cf6}.sales-kpi:nth-child(4):before{background:#16a085}.sales-kpi:nth-child(5):before{background:#e59b28}
.sales-kpi.primary-kpi{color:#fff;border-color:#173e61;background:linear-gradient(125deg,#102f4a,#1c5b87)}
.sales-kpi.primary-kpi:before{background:#53a7ed}
.sales-kpi span,.sales-kpi strong,.sales-kpi small{display:block}
.sales-kpi span{font-size:8.5px;color:#687b8c;font-weight:700}
.sales-kpi strong{font-size:18px;line-height:1.1;margin:5px 0 3px;color:var(--navy)}
.sales-kpi small{font-size:7.5px;color:#8b99a5}
.sales-kpi.primary-kpi span,.sales-kpi.primary-kpi small{color:#bad0e2}.sales-kpi.primary-kpi strong{color:#fff;font-size:20px}
.sales-report-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr);gap:7px}
.analytics-panel{padding:9px 10px;min-width:0;box-shadow:0 3px 14px rgba(16,42,67,.035)}
.sales-trend-panel{min-height:240px}
.analytics-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.analytics-heading h2{font-size:11.5px;line-height:1.2;margin:0;color:var(--navy)}
.analytics-heading p{font-size:8px;color:var(--muted);margin:2px 0 0}
.analytics-heading>strong{font-size:9px;color:var(--blue)}
.live-data-badge{font-size:7.5px;font-weight:750;color:#14815f;background:#e9f8f2;border-radius:12px;padding:4px 7px}
.live-data-badge:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#20aa7d;margin-left:4px}
.sales-trend-chart{height:188px;display:flex;align-items:stretch;gap:6px;padding:4px 2px 0;border-bottom:1px solid var(--line);overflow-x:auto;overflow-y:hidden}
.trend-column{flex:1;min-width:42px;display:grid;grid-template-rows:17px 1fr 18px 15px;align-items:center;text-align:center}
.trend-column>span{font-size:7px;color:#536a7b;font-weight:750;white-space:nowrap}
.trend-track{height:100%;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px dashed #dbe3e9;background:linear-gradient(to top,rgba(226,233,239,.45) 1px,transparent 1px);background-size:100% 25%}
.trend-track i{display:block;width:min(30px,72%);min-height:5px;border-radius:5px 5px 1px 1px;background:linear-gradient(180deg,#4b9bec,#2465a2);box-shadow:0 3px 8px rgba(37,99,235,.16)}
.trend-column>b{font-size:7.5px;color:#516473;white-space:nowrap}.trend-column>small{font-size:7px;color:#95a2ac}
.status-progress-list{display:flex;flex-direction:column;gap:8px}
.status-progress-item>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:6px}
.status-progress-item strong{font-size:8.5px;color:#324b5f}.status-progress-item small{display:block;text-align:left;font-size:7.5px;color:#82919c;margin-top:2px}
.progress-track,.performance-track{height:4px;border-radius:5px;background:#edf1f4;overflow:hidden;margin-top:4px}
.progress-track i,.performance-track i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#2a6da4,#63a8dc)}
.performance-list{display:flex;flex-direction:column;gap:6px}
.performance-item{display:grid;grid-template-columns:20px 1fr;gap:6px;align-items:start;padding-bottom:6px;border-bottom:1px solid #edf1f4}
.performance-item:last-child{padding-bottom:0;border-bottom:0}
.performance-rank{width:19px;height:19px;display:grid;place-items:center;background:#edf4fb;color:#25669b;border-radius:5px;font-size:7.5px;font-weight:800}
.performance-copy>div{display:flex;justify-content:space-between;gap:8px}.performance-copy strong{font-size:9px;color:#243f54}.performance-copy b{font-size:8px;color:#25669b;white-space:nowrap}.performance-copy>span{font-size:7.5px;color:#82919c}
.performance-track{height:3px;margin-top:3px}
.report-orders-panel{grid-column:1/-1;padding:0;overflow:hidden}
.report-orders-panel .analytics-heading{padding:8px 10px;margin:0;border-bottom:1px solid var(--line)}
.report-orders-panel .table-wrap{max-height:280px;overflow:auto}
.report-orders-panel thead{position:sticky;top:0;background:#f7f9fb;z-index:1}

@media(max-width:1050px){.sales-kpi-grid{grid-template-columns:repeat(3,1fr)}.sales-kpi.primary-kpi{grid-column:span 1}.sales-report-layout{grid-template-columns:1fr}.report-orders-panel{grid-column:auto}}
@media(max-width:760px){.report-filterbar{grid-template-columns:1fr 1fr}.report-customer-filter{grid-column:1/-1}.sales-kpi-grid{grid-template-columns:repeat(2,1fr)}.sales-kpi.primary-kpi{grid-column:1/-1}.sales-report-layout{grid-template-columns:1fr}.sales-trend-chart{height:170px}.report-page-heading{align-items:flex-start}.report-page-heading .document-actions{width:100%}}

@media print{
  body>.app-shell:not(.modal-layer){display:block!important}
  .app-shell .sidebar,.app-shell .topbar,.app-shell .report-filterbar,.app-shell .report-page-heading .document-actions{display:none!important}
  .app-shell .main-area{margin:0!important}.app-shell .page-view{display:none!important}.app-shell #reports-view{display:block!important;padding:0!important}
  .sales-report-layout{grid-template-columns:1.6fr .8fr}.analytics-panel,.sales-kpi{box-shadow:none;break-inside:avoid}.report-orders-panel{grid-column:1/-1}.report-orders-panel .table-wrap{max-height:none;overflow:visible}
}

/* Professional multi-line sales order editor */
.lines-heading-actions{display:flex;align-items:center;gap:7px}.lines-heading-actions>span{font-size:8px;color:#6f8290;background:#f1f5f8;border-radius:12px;padding:4px 7px;white-space:nowrap}
.professional-lines-table{min-width:1050px;border-collapse:separate;border-spacing:0}
.professional-lines-table thead{position:sticky;top:0;z-index:3;background:#f5f8fa}
.professional-lines-table th{font-size:8px;color:#627584;font-weight:800;white-space:nowrap;border-bottom:1px solid #dce4ea}
.professional-lines-table th:nth-child(1){width:34px}.professional-lines-table th:nth-child(2){width:255px}.professional-lines-table th:nth-child(3){width:86px}.professional-lines-table th:nth-child(4){width:105px}.professional-lines-table th:nth-child(5),.professional-lines-table th:nth-child(6){width:76px}.professional-lines-table th:nth-child(7){width:108px}.professional-lines-table th:nth-child(8){width:110px}.professional-lines-table th:nth-child(9){width:68px}
.line-main-row td{padding:6px 5px!important;vertical-align:top;border-bottom:0!important;background:#fff}
.line-main-row:hover td{background:#fbfdff}
.line-sequence{display:grid;place-items:center;width:23px;height:23px;border-radius:6px;background:#173e61;color:#fff;font-size:8px;font-weight:800}
.line-product-cell>select{font-weight:700;color:#203c51}.line-product-cell>div{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:3px}.line-product-cell>div>span:first-child{font-size:7px;color:#8796a1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.line-price-source{font-size:6.8px!important;color:#16765b!important;background:#e9f7f2;border-radius:8px;padding:2px 4px;flex:0 0 auto}.line-price-source.manual{color:#8c6115!important;background:#fff4db}
.professional-lines-table .line-input{width:100%;min-width:0;height:27px!important;padding:3px 5px!important;border:1px solid #dce4ea;background:#fbfcfd}
.professional-lines-table .line-input:focus{background:#fff;border-color:#6298cb;box-shadow:0 0 0 2px rgba(42,109,164,.08);outline:0}
.professional-lines-table .quantity-input{font-weight:750}.professional-lines-table .route-select{font-size:8.5px!important}
.professional-lines-table .line-total{text-align:left;white-space:nowrap}.professional-lines-table .line-total strong,.professional-lines-table .line-total small{display:block}.professional-lines-table .line-total strong{font-size:10px;color:#173e61}.professional-lines-table .line-total small{font-size:7px;color:#8a99a5;margin-top:2px}
.line-actions{display:flex;justify-content:center;gap:3px}.line-action{width:25px;height:25px;border:0;border-radius:6px;font:inherit;font-size:12px;cursor:pointer}.line-action.copy{color:#25669b;background:#edf5fc}.line-action.remove{color:#bd394c;background:#fdecef}.line-action:hover{filter:brightness(.96)}
.line-spec-row td{padding:0 5px 6px!important;background:#fff;border-bottom:1px solid #dfe6eb!important}.line-spec-row>td:first-child{border-bottom-color:#fff!important}
.line-spec-grid{display:grid;grid-template-columns:repeat(8,minmax(75px,1fr));gap:5px;padding:5px 6px;background:#f6f9fb;border:1px solid #e5ebef;border-radius:6px}
.line-spec-grid label{display:flex;flex-direction:column;gap:2px;min-width:0}.line-spec-grid label>span{font-size:6.8px;font-weight:750;color:#728593;white-space:nowrap}.line-spec-grid .packaging-field{grid-column:span 4}
.line-spec-grid .line-input{height:24px!important;font-size:8px!important;background:#fff}
.lines-table-wrap{max-height:480px;overflow:auto;border:1px solid #e4e9ed;border-radius:7px}
.add-line-wide{margin-top:6px;border-radius:6px!important;background:#f6f9fb!important;border:1px dashed #a9bdcc!important;color:#27628e!important;font-weight:750!important}

@media(max-width:900px){.line-spec-grid{grid-template-columns:repeat(4,minmax(85px,1fr))}.line-spec-grid .packaging-field{grid-column:span 4}}

/* Sales order editor - compact, full-width, no horizontal scrolling */
.app-shell #editor-view{padding:5px 10px 14px}
.app-shell #editor-view .document-header{margin-bottom:4px;min-height:34px}
.app-shell #editor-view .editor-layout{grid-template-columns:minmax(0,1fr);gap:5px}
.app-shell #editor-view .editor-main{gap:5px;min-width:0}
.app-shell #editor-view .editor-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.app-shell #editor-view .form-card,.app-shell #editor-view .lines-card,.app-shell #editor-view .summary-card,.app-shell #editor-view .availability-card,.app-shell #editor-view .timeline-card{padding:6px 7px}
.app-shell #editor-view .section-title{margin-bottom:4px;gap:5px}
.app-shell #editor-view .section-title p{margin-top:1px;font-size:7.5px;line-height:1.15}
.app-shell #editor-view .section-icon{width:22px;height:22px;font-size:9px}
.app-shell #editor-view .form-grid{gap:4px 6px}
.app-shell #editor-view .field{gap:1px}
.app-shell #editor-view .field label,.app-shell #editor-view .field>span{font-size:7.5px}
.app-shell #editor-view .field input,.app-shell #editor-view .field select{min-height:25px;height:25px;padding:3px 6px;font-size:8.5px}
.app-shell #editor-view .field small{font-size:6.8px;line-height:1.1}
.app-shell #editor-view .field textarea{min-height:38px;padding:4px 6px;font-size:8.5px}
.app-shell #editor-view .lines-title{margin-bottom:4px}
.app-shell #editor-view .lines-heading-actions{gap:4px}.app-shell #editor-view .lines-heading-actions>span{padding:3px 6px;font-size:7px}
.app-shell #editor-view .lines-table-wrap{width:100%;max-width:100%;max-height:460px;overflow-x:hidden;overflow-y:auto;margin:0;border-radius:5px}
.app-shell #editor-view .professional-lines-table{width:100%;min-width:0;table-layout:fixed}
.app-shell #editor-view .professional-lines-table th{padding:4px 3px;font-size:7px;white-space:normal;line-height:1.1}
.app-shell #editor-view .professional-lines-table th:nth-child(1){width:3.5%}.app-shell #editor-view .professional-lines-table th:nth-child(2){width:34%}.app-shell #editor-view .professional-lines-table th:nth-child(3){width:10%}.app-shell #editor-view .professional-lines-table th:nth-child(4){width:12%}.app-shell #editor-view .professional-lines-table th:nth-child(5){width:8%}.app-shell #editor-view .professional-lines-table th:nth-child(6){width:8%}.app-shell #editor-view .professional-lines-table th:nth-child(7){width:14%}.app-shell #editor-view .professional-lines-table th:nth-child(8){width:10.5%}
.app-shell #editor-view .line-main-row td{padding:4px 3px!important}
.app-shell #editor-view .line-main-row:not(:first-child) td{border-top:2px solid #718b9d!important;padding-top:7px!important}
.app-shell #editor-view .line-main-field{display:flex;flex-direction:column;gap:2px;min-width:0}.app-shell #editor-view .line-main-field>span{display:block;font-size:9px;font-weight:800;color:#354f62;white-space:nowrap}
.app-shell #editor-view .line-sequence{width:19px;height:19px;font-size:7px;border-radius:4px}
.app-shell #editor-view .professional-lines-table .line-input{height:23px!important;min-height:23px!important;padding:2px 3px!important;font-size:7.5px!important;border-radius:4px}
.app-shell #editor-view .line-product-cell>div{margin-top:2px}.app-shell #editor-view .line-product-cell>div>span:first-child{font-size:6.2px}
.app-shell #editor-view .line-price-source{font-size:6px!important;padding:1px 3px}
.app-shell #editor-view .professional-lines-table .line-total strong{font-size:8.5px}.app-shell #editor-view .professional-lines-table .line-total small{font-size:6px;margin-top:1px}
.app-shell #editor-view .line-actions{gap:2px}.app-shell #editor-view .line-action{width:21px;height:21px;font-size:10px;border-radius:4px}
.app-shell #editor-view .line-spec-row td{padding:0 3px 4px!important}
.app-shell #editor-view .line-spec-grid{grid-template-columns:repeat(4,78px) 90px 90px 105px 108px minmax(150px,1fr);gap:4px;padding:5px 2px;background:transparent;border:0;border-radius:0;align-items:end}
.app-shell #editor-view .line-spec-grid .packaging-field{grid-column:auto}
.app-shell #editor-view .line-spec-grid label>span{font-size:9px;color:#354f62;white-space:nowrap;overflow:visible;text-overflow:clip}
.app-shell #editor-view .line-spec-grid .line-input{height:26px!important;min-height:26px!important;font-size:10px!important;background:#fff!important}
.app-shell #editor-view .add-line-wide{margin-top:4px;padding:4px;font-size:8px}
.app-shell #editor-view .summary-heading{margin-bottom:3px}.app-shell #editor-view .summary-row{padding:2px 0;font-size:7.5px}.app-shell #editor-view .summary-total{padding-top:4px;font-size:9px}
.app-shell #editor-view .route-item,.app-shell #editor-view .timeline-item{padding:3px 0;font-size:7.5px}.app-shell #editor-view .route-info{padding:4px;font-size:7px;line-height:1.2}

@media(max-width:900px){
  .app-shell #editor-view .editor-side{grid-template-columns:1fr}
  .app-shell #editor-view .line-spec-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .app-shell #editor-view .line-spec-grid .packaging-field{grid-column:span 3}
}

/* Unified high-contrast ERP surfaces */
:root{--muted:#526675;--line:#c4d0d8;--navy:#172f43}
.app-shell{color:#20384b}
.app-shell .content-card,.app-shell .stat-card,.app-shell .form-card,.app-shell .lines-card,.app-shell .summary-card,.app-shell .availability-card,.app-shell .timeline-card,.app-shell .price-list-card{border-color:#bdcbd5;box-shadow:0 3px 12px rgba(20,45,64,.055)}
.app-shell .page-heading p,.app-shell .card-toolbar p,.app-shell .section-title p,.app-shell small{color:#526675}
.app-shell .table-wrap th{color:#314b60;background:#eef3f6;border-bottom:1px solid #b9c8d2;font-weight:800}
.app-shell .table-wrap td{color:#263f52;border-bottom-color:#d8e0e6}
.app-shell input,.app-shell select,.app-shell textarea{color:#1c3548;border-color:#aebdc8!important;background:#fff}
.app-shell input::placeholder,.app-shell textarea::placeholder{color:#718391;opacity:1}
.app-shell .button.secondary,.app-shell .icon-button{border:1px solid #b5c3cd;color:#29475d;background:#fff}
.app-shell .eyebrow{color:#245f8f;font-weight:850}

.order-link{border:0;background:transparent;color:#155f98;font:inherit;font-size:9px;font-weight:850;padding:0;cursor:pointer;text-decoration:underline;text-decoration-color:#9bbbd2;text-underline-offset:2px}
.order-detail-grid{display:flex;flex-direction:column;gap:7px}.order-overview{padding:10px}.detail-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.detail-metrics>div{border-left:1px solid #c8d3db;padding:3px 9px}.detail-metrics>div:last-child{border-left:0}.detail-metrics span,.detail-metrics strong,.detail-metrics small{display:block}.detail-metrics span{font-size:7.5px;color:#526675;font-weight:750}.detail-metrics strong{font-size:11px;color:#172f43;margin:3px 0}.detail-metrics small{font-size:7px}
.order-flow{display:grid;grid-template-columns:repeat(5,1fr);gap:0;margin-top:10px;border-top:1px solid #c7d2da;padding-top:8px}.order-flow>div{position:relative;display:flex;align-items:center;gap:5px;font-size:8px;font-weight:750;color:#687b89}.order-flow>div:after{content:"";position:absolute;height:2px;background:#cbd6dd;width:calc(100% - 27px);right:24px;top:10px}.order-flow>div:last-child:after{display:none}.order-flow i{position:relative;z-index:1;width:20px;height:20px;display:grid;place-items:center;border-radius:50%;font-style:normal;background:#e3e9ed;color:#526675}.order-flow .done{color:#176f54}.order-flow .done i{background:#dff4eb;color:#176f54}.order-flow .done:after{background:#65b59a}
.order-detail-lines{overflow:hidden}.order-detail-lines .specs-cell{max-width:280px}.specs-cell{font-size:7.5px;line-height:1.5;color:#415b6e}.order-related{overflow:hidden}.related-docs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px 10px}.related-docs>div{border:1px solid #c4d0d8;border-radius:6px;padding:7px}.related-docs strong,.related-docs span{display:block}.related-docs strong{font-size:9px}.related-docs span{font-size:7.5px;margin:3px 0;color:#526675}
.route-badge,.task-status{display:inline-flex;align-items:center;border-radius:11px;padding:3px 6px;font-size:7.5px;font-weight:800;white-space:nowrap}.route-badge.stock{background:#e5f4ef;color:#126b50}.route-badge.manufacture{background:#eeeafe;color:#5e45a7}.route-badge.auto{background:#e9f2fa;color:#23628f}.task-status.pending{background:#edf1f4;color:#536a7b}.task-status.reserved{background:#e5f4ef;color:#126b50}.task-status.blocked{background:#fde9ec;color:#a82e40}.task-status.sent_to_production,.task-status.in_production,.task-status.planned,.task-status.released,.task-status.in_progress{background:#eeeafe;color:#5e45a7}.task-status.ready,.task-status.completed{background:#def5e9;color:#13704f}
.warehouse-numbers{text-align:left}.warehouse-numbers b,.warehouse-numbers span{display:block}.warehouse-numbers b{font-size:11px;color:#172f43}.warehouse-numbers span{font-size:7px;color:#526675;margin-top:2px}
#inventory-tasks-body td>small,#manufacturing-orders-body td>small{display:block;font-size:7px;margin-top:2px;color:#526675}

@media(max-width:900px){.detail-metrics{grid-template-columns:repeat(2,1fr)}.order-flow{grid-template-columns:1fr;gap:4px}.order-flow>div:after{display:none}.related-docs{grid-template-columns:1fr}}

@media print{body>.app-shell:not(.modal-layer){display:block!important}.app-shell #order-details-view:not(.hidden){display:block!important}.app-shell #order-details-view:not(.hidden)~*{display:none!important}.order-detail-header .button,.order-detail-header .back{display:none!important}}

/* Preparation and partial warehouse issue workflow */
.workflow-rule{display:flex;align-items:center;gap:9px;margin:0 0 7px;padding:7px 10px;border:1px solid #d2a64b;border-right:4px solid #c48714;border-radius:7px;background:#fff8e7;color:#4f3c19;font-size:8.5px}.workflow-rule strong{white-space:nowrap;color:#7a5109}.workflow-rule span{font-weight:650}
.issue-history-card{margin-top:7px}.issue-progress{min-width:100px}.issue-progress>span{display:block;font-size:8px;color:#314b60;margin-bottom:3px}.issue-progress>i{display:block;height:5px;border-radius:5px;background:#dce4e9;overflow:hidden}.issue-progress>i>b{display:block;height:100%;background:#218968;border-radius:5px}
.small-action.locked{border:1px solid #c9d2d8!important;background:#edf1f3!important;color:#687a87!important;opacity:1;cursor:not-allowed}
.task-status.waiting_issue,.task-status.open{background:#fff1d8;color:#855500}.task-status.partially_issued,.task-status.partial{background:#fce8c4;color:#875307}.task-status.materials_issued,.task-status.issued{background:#dff3ea;color:#11664c}.task-status.in_progress{background:#e9e5fb;color:#59459b}
.issue-modal-card{width:min(980px,95vw);max-height:92vh;overflow:auto}.issue-controls{display:grid;grid-template-columns:1fr 2fr;gap:7px;margin-bottom:7px}.issue-lines-wrap{border:1px solid #b9c7d1;border-radius:6px;max-height:390px;overflow:auto}.issue-lines-wrap table{min-width:760px}.issue-lines-wrap th,.issue-lines-wrap td{padding:6px!important}.issue-lines-wrap td small{display:block;margin-top:2px}.issue-lines-wrap .issue-check{width:16px;height:16px;accent-color:#176e56}.issue-quantity{width:105px!important;height:28px!important;padding:3px 6px!important;font-weight:800}.issue-guidance{margin-top:7px;padding:6px 8px;border:1px solid #b8c9d5;border-radius:5px;background:#edf5fa;color:#294a61;font-size:8px;font-weight:650}
#issue-form-message{margin:6px 0 0;padding:8px 10px;border-width:2px;font-size:10px;font-weight:800;position:sticky;bottom:43px;z-index:4;box-shadow:0 3px 12px rgba(27,47,62,.14)}
#preparation-orders-body td>small,#issue-requests-body td>small{display:block;font-size:7px;margin-top:2px;color:#526675}
@media(max-width:760px){.issue-controls{grid-template-columns:1fr}.workflow-rule{align-items:flex-start;flex-direction:column;gap:3px}}

/* Preparation execution document */
.preparation-modal-card{width:min(850px,94vw);max-height:92vh;overflow:auto}.preparation-order-summary{border:1px solid #b9c8d2;border-radius:7px;background:#f7fafc;margin-bottom:8px;overflow:hidden}.prep-summary-head{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:#d1dce3}.prep-summary-head>span{background:#fff;padding:7px 9px;font-size:8px;color:#526675}.prep-summary-head strong{display:block;color:#172f43;font-size:9px;margin-top:2px}.prep-lines-list{max-height:165px;overflow:auto;padding:4px 8px}.prep-lines-list>div{display:flex;justify-content:space-between;gap:10px;padding:5px 2px;border-bottom:1px solid #dce4e9;font-size:8px}.prep-lines-list>div:last-child{border-bottom:0}.prep-lines-list span{color:#465f71;text-align:left}.execution-detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding:9px 10px}.execution-detail-grid>div{border:1px solid #c3d0d8;border-radius:6px;padding:7px;background:#fbfcfd}.execution-detail-grid span,.execution-detail-grid strong{display:block}.execution-detail-grid span{font-size:7px;color:#536878}.execution-detail-grid strong{font-size:9px;color:#172f43;margin-top:3px}.execution-detail-grid .execution-notes{grid-column:1/-1}.preparation-document .card-toolbar>span{margin-left:8px}
@media(max-width:760px){.prep-summary-head,.execution-detail-grid{grid-template-columns:1fr}.prep-lines-list>div{flex-direction:column;gap:2px}}

/* Integrated delivery documents */
.delivery-modal-card{width:min(980px,95vw);max-height:92vh;overflow:auto}.delivery-order-preview{border:1px solid #b9c8d2;border-radius:7px;background:#f8fafb;min-height:70px;margin:0 10px 8px;overflow:hidden}.delivery-preview-head,.delivery-detail-head{display:grid;grid-template-columns:repeat(5,1fr);gap:1px;background:#cbd7df}.delivery-preview-head>div,.delivery-detail-head>div{background:#fff;padding:7px 8px;min-width:0}.delivery-preview-head span,.delivery-detail-head span{display:block;font-size:7px;color:#526675}.delivery-preview-head strong,.delivery-detail-head strong{display:block;font-size:9px;color:#172f43;margin-top:3px}.delivery-preview-head small,.delivery-detail-head small{display:block;font-size:7px;margin-top:2px}.delivery-preview-lines{max-height:270px;overflow:auto;border-top:1px solid #c5d1d9}.delivery-preview-lines td{padding:6px!important}.delivery-integration-note{margin:8px 0 0;padding:7px 9px;border:1px solid #8fc7b4;border-radius:6px;background:#eaf8f2;color:#165c47;font-size:8px}.delivery-detail-head{margin-bottom:8px}.delivery-detail-head .status{display:inline-flex;width:max-content}.delivery-modal-card .modal-actions{position:sticky;bottom:-1px;background:#fff;border-top:1px solid #cbd5dc;z-index:2}
@media(max-width:760px){.delivery-preview-head,.delivery-detail-head{grid-template-columns:repeat(2,1fr)}.delivery-order-preview{margin-inline:0}}

/* Secure customer order portal inside sales */
.subnav-badge{display:inline-grid;place-items:center;min-width:16px;height:16px;margin-inline-start:4px;padding:0 4px;border-radius:9px;background:#efb32e;color:#172f43;font-size:7px}.portal-invite-card{width:min(680px,94vw)}.portal-result-card{width:min(720px,94vw)}.portal-review-card{width:min(1120px,96vw);max-height:94vh;overflow:auto}.portal-check{display:flex;align-items:center;gap:7px;font-size:9px;font-weight:700}.portal-check input{width:16px;height:16px;accent-color:#176e56}.portal-result-warning{margin:0 10px 12px;padding:8px 10px;border:1px solid #ddb75f;border-radius:6px;background:#fff7e3;color:#68490e;font-size:9px;font-weight:700}.portal-copy-field{display:block;margin:10px}.portal-copy-field>span{display:block;font-size:8px;font-weight:800;color:#425a6d;margin-bottom:4px}.portal-copy-field>div{display:flex;gap:6px}.portal-copy-field input{flex:1;height:36px;padding:6px 9px;direction:ltr;text-align:left;font-size:10px}.portal-copy-field button{border:0;border-radius:6px;background:#196aab;color:#fff;padding:0 14px;font-weight:750;cursor:pointer}.portal-copy-field .portal-code{font-size:17px;letter-spacing:6px;font-weight:900;text-align:center}.portal-status{display:inline-flex;border-radius:12px;padding:3px 7px;font-size:7.5px;font-weight:850}.portal-status.active{background:#e5f4ef;color:#126b50}.portal-status.opened,.portal-status.pending_review{background:#fff0d3;color:#80520a}.portal-status.submitted,.portal-status.approved{background:#e9e5fb;color:#59459b}.portal-status.expired,.portal-status.revoked,.portal-status.rejected{background:#f7e6e9;color:#9e2d3e}.portal-review-head{display:grid;grid-template-columns:repeat(5,1fr);gap:1px;background:#c9d4dc;margin:0 10px 8px;border:1px solid #c1cdd6;border-radius:7px;overflow:hidden}.portal-review-head>div{background:#fff;padding:8px}.portal-review-head span,.portal-review-head strong,.portal-review-head small{display:block}.portal-review-head span{font-size:7px;color:#536878}.portal-review-head strong{font-size:9px;margin-top:3px}.portal-review-head small{font-size:7px;margin-top:2px}.portal-review-lines{margin:0 10px;border:1px solid #bdcbd5;border-radius:7px;overflow:auto}.portal-review-lines table{min-width:980px}.portal-review-lines th,.portal-review-lines td{padding:6px!important}.portal-review-lines input{width:83px!important;height:28px!important;padding:3px 5px!important;font-weight:800}.portal-review-lines .review-product{min-width:180px}.portal-review-lines small{display:block;font-size:7px;margin-top:2px}.portal-review-total{display:flex;justify-content:flex-end;gap:10px;margin:8px 10px;padding:7px 10px;background:#edf4f8;border:1px solid #c4d1d9;border-radius:6px;font-size:9px}.portal-review-total strong{font-size:12px}.button.danger{background:#b63142;color:#fff;border-color:#b63142}.portal-review-card .modal-actions{position:sticky;bottom:-1px;background:#fff;border-top:1px solid #cbd5dc}.portal-review-card .form-message{margin-inline:10px}
@media(max-width:760px){.portal-review-head{grid-template-columns:repeat(2,1fr)}.portal-copy-field>div{flex-direction:column}.portal-copy-field button{padding:9px}}

.warehouse-request-lines{display:grid;gap:3px;min-width:310px}.warehouse-request-lines>div{display:grid;grid-template-columns:minmax(120px,1fr) minmax(250px,2fr);align-items:center;gap:6px;padding:4px 6px;border:1px solid #b9c8d3;border-radius:4px;background:#fff}.warehouse-request-lines b{font-size:9px;color:#102f48}.warehouse-request-lines span{font-size:8px;font-weight:700;color:#304d63}

/* Accounting receivables workspace */
.accounting-module-tabs{display:flex;gap:4px;margin:0 0 7px;padding:4px;background:#e7edf2;border:1px solid #bdcbd5;border-radius:7px}.accounting-module-tabs button{border:0;background:transparent;color:#3b5568;border-radius:5px;padding:6px 12px;font:inherit;font-size:8px;font-weight:800;cursor:pointer}.accounting-module-tabs button.active{background:#173e61;color:#fff;box-shadow:0 2px 7px rgba(19,54,83,.18)}.ar-aging-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:7px}.ar-aging-card{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;border:1px solid #c4d0d8;border-radius:6px;background:#fff}.ar-aging-card span,.ar-aging-card strong,.ar-aging-card small{display:block}.ar-aging-card span{font-size:7px;color:#526675}.ar-aging-card strong{font-size:10px;color:#172f43;margin:2px 0}.ar-aging-card small{font-size:6.5px}.ar-aging-card.overdue{border-right:3px solid #c47b18}.ar-aging-card.critical{border-right:3px solid #b83243}.invoice-age{display:inline-flex;border-radius:10px;padding:3px 6px;background:#e9f1f6;color:#34566e;font-size:7px;font-weight:800}.invoice-age.overdue{background:#fde9dc;color:#994411}.accounting-document-modal{width:min(1120px,96vw);max-height:94vh;overflow:auto}.accounting-document-modal .modal-actions{position:sticky;bottom:-1px;background:#fff;border-top:1px solid #c6d1d8;z-index:3}.accounting-doc-head{display:grid;grid-template-columns:repeat(5,1fr);gap:1px;margin:0 10px 8px;background:#c8d4dc;border:1px solid #becbd4;border-radius:7px;overflow:hidden}.accounting-doc-head>div{background:#fff;padding:8px}.accounting-doc-head span,.accounting-doc-head strong,.accounting-doc-head small{display:block}.accounting-doc-head span{font-size:7px;color:#536878}.accounting-doc-head strong{font-size:10px;color:#172f43;margin-top:3px}.accounting-doc-head small{font-size:7px;margin-top:2px}.accounting-doc-balance{background:#eff6fb!important}.accounting-doc-balance.outstanding{background:#fff2e5!important}.accounting-lines,.accounting-history,.accounting-receipts{margin:7px 10px;border:1px solid #c1ced7;border-radius:7px;overflow:hidden}.accounting-lines .card-toolbar,.accounting-history .card-toolbar,.accounting-receipts .card-toolbar{padding:7px 9px}.accounting-lines td,.accounting-history td,.accounting-receipts td{padding:6px!important}.accounting-history .event-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#2d7db7;margin-left:5px}.accounting-history .event-dot.payment{background:#18815f}.accounting-doc-totals{margin:7px 10px 0;margin-right:auto;width:min(360px,calc(100% - 20px));border:1px solid #bdcad3;border-radius:7px;padding:7px 10px;background:#f8fafb}.accounting-doc-totals>div{display:flex;justify-content:space-between;padding:3px 0;font-size:8px}.accounting-doc-totals>div:last-child{border-top:1px solid #c5d1d9;margin-top:3px;padding-top:6px;font-size:10px;font-weight:900}.receipt-hero{display:grid;grid-template-columns:1.2fr repeat(3,1fr);gap:1px;margin:0 10px 8px;border-radius:7px;overflow:hidden;background:#c4d1d9}.receipt-hero>div{background:#fff;padding:10px}.receipt-hero span,.receipt-hero strong,.receipt-hero small{display:block}.receipt-hero span{font-size:7px;color:#536878}.receipt-hero strong{font-size:12px;margin-top:3px}.receipt-hero .receipt-amount-box{background:#e8f7f1}.receipt-amount-box strong{color:#11684e;font-size:16px}.linked-document-button{border:0;background:transparent;color:#155f98;font:inherit;font-weight:850;text-decoration:underline;cursor:pointer}.amount-outstanding{color:#a24c16!important;font-weight:850}.amount-paid{color:#13704f!important;font-weight:850}
@media(max-width:760px){.accounting-module-tabs{overflow:auto}.accounting-module-tabs button{white-space:nowrap}.ar-aging-grid{grid-template-columns:repeat(2,1fr)}.accounting-doc-head,.receipt-hero{grid-template-columns:repeat(2,1fr)}}
@media print{.accounting-document-modal{width:100%;max-height:none;box-shadow:none}.accounting-document-modal .modal-header .icon-button,.accounting-document-modal .modal-actions{display:none}.accounting-document-modal .table-wrap{overflow:visible}}

/* Unified actions for every printable ERP document */
.document-action-cell{display:flex;align-items:center;gap:3px;flex-wrap:wrap;min-width:max-content}.document-action-cell>.document-action-cell{display:contents}.doc-action{height:25px;border:1px solid #aebfca;border-radius:5px;background:#fff;color:#203c50;padding:0 7px;font:inherit;font-size:7.5px;font-weight:850;cursor:pointer;white-space:nowrap}.doc-action:hover{border-color:#296fa5;background:#eef6fb}.doc-action.details{background:#e9f2ff;border-color:#abc9e6;color:#145f97}.doc-action.print{background:#173e61;border-color:#173e61;color:#fff}.doc-action.pdf{background:#fff0f0;border-color:#e0b8bc;color:#a52834}.doc-action.excel{background:#eaf7f0;border-color:#a9d2bd;color:#126846}.document-header-actions{display:flex;align-items:center;gap:5px}.document-header-actions .button{padding:7px 10px;font-size:8px}.table-wrap td:last-child{white-space:normal}.modal-actions{flex-wrap:wrap}
@media(max-width:760px){.document-header-actions{flex-wrap:wrap;justify-content:flex-end}.doc-action{height:27px}}

/* Unified dense ERP design system — navigation, headers, tables and actions */
.app-shell .sidebar{width:180px;padding:7px 7px 6px;overflow:hidden}
.app-shell .main-area{margin-right:180px}
.app-shell .sidebar>.brand{flex:0 0 40px;height:40px;padding:0 3px 6px;gap:6px}
.app-shell .sidebar>.brand .brand-mark{width:29px;height:29px;border-radius:7px;box-shadow:none}
.app-shell .sidebar>.brand strong{font-size:11px}.app-shell .sidebar>.brand span{font-size:7px;margin-top:1px}
.app-shell .nav-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:4px -2px 3px 0;padding:0 0 5px 3px;gap:1px;scrollbar-width:thin;scrollbar-color:#52708a transparent;overscroll-behavior:contain}
.app-shell .nav-list::-webkit-scrollbar{width:5px}.app-shell .nav-list::-webkit-scrollbar-track{background:transparent}.app-shell .nav-list::-webkit-scrollbar-thumb{background:#52708a;border-radius:5px}
.app-shell .nav-item{flex:0 0 28px;min-height:28px;height:28px;padding:3px 6px;gap:5px;border-radius:5px;font-size:9px;font-weight:750}
.app-shell .nav-icon{width:16px;font-size:12px}.app-shell .nav-item b{padding:1px 5px;font-size:7px}
.app-shell .sales-subnav,.app-shell .module-subnav{flex:0 0 auto;margin:0 20px 2px 0;padding:0 4px 0 0;border-right-color:#45627a;gap:0}
.app-shell .subnav-item{min-height:20px;padding:3px 5px;border-radius:3px;font-size:7.8px;line-height:1.05;font-weight:650}
.app-shell .subnav-item:hover,.app-shell .subnav-item.active{background:#24445f;color:#fff}
.app-shell .sidebar-footer{flex:0 0 37px;height:37px;margin:0;padding:5px 2px 0;gap:5px}.app-shell .sidebar-footer .avatar{width:26px;height:26px}.app-shell .sidebar-footer strong{font-size:8px}.app-shell .sidebar-footer span{font-size:6.5px;margin-top:1px}.app-shell .sidebar-footer .icon-button{width:25px;height:25px;border-color:#4a657c;color:#fff;background:transparent}

.app-shell .topbar{height:38px;padding:0 8px}.app-shell .global-search{height:27px;width:205px;border-radius:4px}.app-shell .connection{padding:3px 6px;border-radius:10px;font-size:8px}.app-shell .top-actions{gap:4px}
.app-shell .page-view{padding:4px 8px 14px}.app-shell .page-heading,.app-shell .document-header{min-height:38px;margin-bottom:4px;padding:2px 0;border-bottom:1px solid #b8c6d0}
.app-shell .page-heading h1,.app-shell .document-title h1{font-size:16px;margin:1px 0;line-height:1.05}.app-shell .page-heading p,.app-shell .document-title p{font-size:8px;line-height:1.15}.app-shell .eyebrow{font-size:7px}
.app-shell .content-card,.app-shell .form-card,.app-shell .lines-card,.app-shell .summary-card,.app-shell .timeline-card,.app-shell .availability-card{border-radius:5px;box-shadow:none}
.app-shell .card-toolbar{min-height:33px;padding:3px 6px}.app-shell .card-toolbar h2{font-size:11px}.app-shell .card-toolbar p{font-size:7.5px;margin-top:1px}.app-shell .toolbar-actions{gap:3px}.app-shell .table-search{height:27px;border-radius:4px}
.app-shell .tabs{min-height:29px;padding:0 6px;gap:9px}.app-shell .tabs button{height:29px;padding:3px 1px;font-size:8px}
.app-shell .table-wrap th,.app-shell .warehouse-panel table th,.app-shell .accounting-table-card th{height:24px;padding:3px 6px;font-size:8.5px;line-height:1.05}
.app-shell .table-wrap td,.app-shell .warehouse-panel table td,.app-shell .accounting-table-card td{height:29px;padding:3px 6px;font-size:9.5px;line-height:1.12}
.app-shell .table-wrap td small,.app-shell .warehouse-panel table td small,.app-shell .accounting-table-card td small{font-size:7.5px;line-height:1.05;margin-top:1px}

.app-shell .button{min-height:27px;height:27px;padding:0 9px;border:1px solid #9fb0bd;border-radius:5px;font-size:9px;line-height:1;font-weight:800;box-shadow:none;white-space:nowrap;transition:background-color .12s,border-color .12s,color .12s,transform .08s}
.app-shell .button:hover{transform:translateY(-1px)}.app-shell .button:active{transform:none}.app-shell .button:focus-visible,.app-shell .small-action:focus-visible,.app-shell .doc-action:focus-visible,.app-shell .icon-button:focus-visible{outline:2px solid #75a9d1;outline-offset:1px}
.app-shell .button.primary{background:#176a9e;border-color:#176a9e;color:#fff}.app-shell .button.primary:hover{background:#125a88;border-color:#125a88}
.app-shell .button.success{background:#167356;border-color:#167356;color:#fff}.app-shell .button.success:hover{background:#105f46;border-color:#105f46}
.app-shell .button.secondary{background:#fff;border-color:#9fb0bd;color:#253f52}.app-shell .button.secondary:hover{background:#edf3f6;border-color:#6e8799}
.app-shell .button.danger{background:#a63b48;border-color:#a63b48;color:#fff}.app-shell .button.tiny{height:24px;min-height:24px;padding:0 7px;background:#fff;border-color:#9fb7c9;color:#175e8d}
.app-shell .icon-button{width:27px;height:27px;min-width:27px;border:1px solid #9fb0bd;border-radius:5px;background:#fff;color:#29475d;font-size:12px;box-shadow:none}.app-shell .icon-button:hover{background:#edf3f6;border-color:#6e8799}
.app-shell .small-action{display:inline-flex;align-items:center;justify-content:center;min-height:24px;height:24px;padding:0 7px;border:1px solid #9fb0bd;border-radius:4px;background:#fff;color:#29475d;font-size:8px;font-weight:800;white-space:nowrap}
.app-shell .small-action.primary{background:#eef5fa;border-color:#8db2cc;color:#155f90}.app-shell .small-action.success{background:#edf7f2;border-color:#8fc3ae;color:#126547}.app-shell .small-action.danger{background:#fff2f3;border-color:#d6a1a7;color:#9f2e3b}.app-shell .small-action:hover{filter:brightness(.97);border-color:#67879d}
.app-shell .document-action-cell{gap:2px}.app-shell .doc-action{height:24px;min-height:24px;padding:0 6px;border:1px solid #9fb0bd;border-radius:4px;background:#fff;color:#29475d;font-size:7.8px;font-weight:800;box-shadow:none}.app-shell .doc-action:hover{background:#f0f4f6;border-color:#6e8799}.app-shell .doc-action.details{background:#fff;border-color:#8eb2cc;color:#155f90}.app-shell .doc-action.print{background:#fff;border-color:#7d94a5;color:#263f52}.app-shell .doc-action.pdf{background:#fff;border-color:#d0a0a5;color:#9b303a}.app-shell .doc-action.excel{background:#fff;border-color:#8fbea8;color:#176646}
.app-shell .warehouse-command-bar{height:33px}.app-shell .warehouse-command-bar .warehouse-compact-header{height:32px}.app-shell .warehouse-command-bar .warehouse-three-tabs{height:28px}.app-shell .warehouse-command-bar .warehouse-three-tabs button{height:25px}
.app-shell #warehouse-finished-view,.app-shell #warehouse-spares-view,.app-shell #warehouse-chemicals-view,.app-shell #issue-requests-view,.app-shell #issue-history-view,.app-shell #accounting-general-view,.app-shell #accounting-customers-view,.app-shell #accounting-suppliers-view,.app-shell #accounting-costs-view,.app-shell #accounting-treasury-view{padding:4px 8px 14px}
.app-shell .accounting-pro-head{height:38px;margin-bottom:3px}.app-shell .accounting-pro-head h1{font-size:16px}.app-shell .accounting-pro-head p{font-size:8px}.app-shell .accounting-inner-tabs,.app-shell .inventory-content-nav{min-height:29px;height:29px;margin-bottom:3px;padding:1px}.app-shell .accounting-inner-tabs button,.app-shell .inventory-content-nav button{height:26px;padding:2px 8px;border-radius:4px;font-size:8.5px}.app-shell .accounting-table-card .card-toolbar.compact{min-height:33px;height:33px;padding:3px 6px}.app-shell .accounting-compact-form{padding:5px 6px;margin-bottom:3px}.app-shell .compact-form-row{gap:3px}.app-shell .compact-form-row input,.app-shell .compact-form-row select{height:27px}.app-shell .compact-form-actions{margin-top:4px}

@media(max-width:760px){.app-shell .sidebar{width:60px;padding:6px 5px}.app-shell .main-area{margin-right:60px}.app-shell .sidebar>.brand{justify-content:center}.app-shell .brand>div:not(.brand-mark),.app-shell .nav-item span:not(.nav-icon),.app-shell .nav-item b,.app-shell .sidebar-footer>div:not(.avatar),.app-shell .sidebar-footer button{display:none}.app-shell .nav-item{justify-content:center}.app-shell .sales-subnav,.app-shell .module-subnav{display:none}.app-shell .page-view{padding:4px 5px 12px}}

/* Focused order entry, narrow navigation and administration */
.app-shell .sidebar{width:150px;padding-inline:5px}.app-shell .main-area{margin-right:150px}.app-shell .subnav-item{font-size:7.3px}.permission-hidden{display:none!important}
.party-badge{display:inline-flex;padding:3px 7px;border-radius:10px;font-size:8px;font-weight:850}.party-badge.customer{background:#e8f2fa;color:#185f91}.party-badge.agent{background:#eee9fb;color:#5d4297}
.app-shell #editor-view .professional-lines-table{min-width:0;table-layout:fixed}.app-shell #editor-view .professional-lines-table th:nth-child(1){width:30px}.app-shell #editor-view .professional-lines-table th:nth-child(2){width:25%}.app-shell #editor-view .professional-lines-table th:nth-child(3){width:11%}.app-shell #editor-view .professional-lines-table th:nth-child(4){width:14%}.app-shell #editor-view .professional-lines-table th:nth-child(5){width:23%}.app-shell #editor-view .professional-lines-table th:nth-child(6){width:14%}.app-shell #editor-view .professional-lines-table th:nth-child(7){width:62px}.line-measure-cell strong,.line-measure-cell small{display:block}.line-measure-cell small{margin-top:2px;color:#166b50!important;font-weight:850}.app-shell #editor-view .line-spec-grid{grid-template-columns:repeat(6,minmax(82px,1fr));gap:4px}.app-shell #editor-view .line-spec-row.weight-line .line-spec-grid{grid-template-columns:repeat(4,minmax(100px,1fr))}.app-shell #editor-view .line-spec-grid .packaging-field{grid-column:span 2}
.admin-editor{padding:8px;margin-bottom:5px;border-right:3px solid #176a9e}.admin-form-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:7px}.admin-label{display:block;font-size:9px;margin-bottom:4px}.permission-checks{display:flex;gap:5px;flex-wrap:wrap}.permission-checks label,.admin-active{display:flex;align-items:center;gap:4px;border:1px solid #b9c7d1;border-radius:5px;padding:5px 7px;background:#fff;font-size:8px}.permission-matrix{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:7px 0}.permission-matrix section{border:1px solid #b9c7d1;border-radius:5px;overflow:hidden}.permission-matrix header{display:flex;justify-content:space-between;align-items:center;padding:5px 6px;background:#eaf0f4;font-size:8px}.permission-matrix section>div{display:grid;grid-template-columns:1fr 1fr;padding:4px}.permission-matrix section>div label{display:grid;grid-template-columns:15px 1fr;align-items:center;padding:3px;font-size:8px}.permission-matrix small{grid-column:2;font-size:6px!important;direction:ltr;text-align:left}.admin-roles-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px}.admin-role-card{display:flex;justify-content:space-between;gap:8px;padding:9px}.admin-role-card strong,.admin-role-card span,.admin-role-card p{display:block}.admin-role-card span,.admin-role-card p{font-size:7.5px;color:#526675}.admin-role-card p{margin:3px 0}.admin-role-card>div:last-child{text-align:left}.admin-role-card b{display:block;font-size:9px;margin-bottom:5px}.system-role{font-size:7px!important;color:#176b50!important}
@media(max-width:760px){.app-shell .sidebar{width:52px;padding:5px 3px}.app-shell .main-area{margin-right:52px}.admin-form-grid,.permission-matrix,.admin-roles-grid{grid-template-columns:1fr}.app-shell #editor-view .professional-lines-table{min-width:720px}.app-shell #editor-view .line-spec-grid,.app-shell #editor-view .line-spec-row.weight-line .line-spec-grid{grid-template-columns:repeat(2,1fr)}}

/* Single-row compact sales order line */
.app-shell #editor-view .professional-lines-table th:nth-child(1){width:28px}
.app-shell #editor-view .professional-lines-table th:nth-child(2){width:22%}
.app-shell #editor-view .professional-lines-table th:nth-child(3){width:8%}
.app-shell #editor-view .professional-lines-table th:nth-child(4){width:9%}
.app-shell #editor-view .professional-lines-table th:nth-child(5){width:26%}
.app-shell #editor-view .professional-lines-table th:nth-child(6){width:9%}
.app-shell #editor-view .professional-lines-table th:nth-child(7){width:9%}
.app-shell #editor-view .professional-lines-table th:nth-child(8){width:11%}
.app-shell #editor-view .professional-lines-table th:nth-child(9){width:54px}
.app-shell #editor-view .line-main-row td{height:36px!important;padding:3px!important;vertical-align:middle!important;border-bottom:1px solid #aebeca!important}
.app-shell #editor-view .line-main-row:not(:first-child) td{border-top:1px solid #7f96a7!important;padding-top:3px!important}
.app-shell #editor-view .line-main-row .line-input{height:25px!important;min-height:25px!important;padding:2px 5px!important;font-size:9px!important;border-radius:4px!important}
.app-shell #editor-view .quantity-input{width:100%!important;text-align:center}
.compact-measure-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;align-items:end}
.compact-measure-fields label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px;min-width:0}
.compact-measure-fields label span{font-size:7px;font-weight:800;color:#40596b;white-space:nowrap}
.app-shell #editor-view .compact-measure-fields .line-input{width:100%;min-width:0;text-align:center;padding-inline:2px!important}
.app-shell #editor-view .line-measure-cell{text-align:center;white-space:nowrap}
.app-shell #editor-view .line-measure-cell strong{font-size:10px;color:#115f47}
.app-shell #editor-view .line-measure-cell small{font-size:6.5px;color:#657b89!important;margin-top:1px}
.weight-basis-note{display:block;text-align:center;font-size:8px;color:#516979;white-space:nowrap}
.app-shell #editor-view .line-actions{gap:2px;justify-content:center}
.app-shell #editor-view .line-action{width:24px;height:24px;min-width:24px;border-radius:4px}

/* Compact sales-order identity, notes, summary and status */
.app-shell #editor-view .order-head-grid{grid-template-columns:minmax(150px,1.1fr) minmax(210px,1.6fr) minmax(150px,1.1fr) 125px 112px 125px minmax(130px,.9fr);gap:3px 5px;align-items:end}
.app-shell #editor-view .order-head-grid .field input,.app-shell #editor-view .order-head-grid .field select{height:23px;min-height:23px}
.app-shell #editor-view .order-head-grid .field small{height:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.app-shell #editor-view .order-creator-field{height:36px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:13px 15px;align-items:center;column-gap:5px;padding:3px 6px;border:1px solid #aebdc8;border-radius:4px;background:#f8fafb;min-width:0}
.app-shell #editor-view .order-creator-field>span{font-size:7px;font-weight:800;color:#526675}
.app-shell #editor-view .order-creator-field>strong{font-size:9px;color:#173e61;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-shell #editor-view .order-creator-field>small{grid-column:1/-1;font-size:6.5px!important;white-space:nowrap}
.app-shell #editor-view .order-notes-card{padding:5px 7px}
.app-shell #editor-view .order-notes-card .section-title{margin-bottom:2px}
.app-shell #editor-view .order-notes-card .section-icon{display:none}
.app-shell #editor-view .order-notes-card textarea{height:31px;min-height:31px;resize:vertical}
.app-shell #editor-view .editor-side{align-items:start}
.app-shell #editor-view .summary-card,.app-shell #editor-view .timeline-card{padding:5px 7px}
.app-shell #editor-view .summary-heading h2,.app-shell #editor-view .timeline-card>h2{font-size:10px;margin:0 0 3px}
.app-shell #editor-view .timeline-item{min-height:31px!important;padding:2px 0!important;gap:5px}
.app-shell #editor-view .timeline-item strong{font-size:8px;line-height:1.05}
.app-shell #editor-view .timeline-item span{font-size:6.5px;line-height:1.05;margin-top:1px}
.app-shell #editor-view .timeline-item:not(:last-child)::after{height:20px!important;top:18px!important}
@media(max-width:900px){.app-shell #editor-view .order-head-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Product catalog and dual metric pricing */
.product-catalog-card .card-toolbar{align-items:center}.product-catalog-card .table-search{width:230px}
.product-catalog-card tbody tr{height:34px}.product-catalog-card td{vertical-align:middle}.catalog-sku{font-family:Consolas,monospace;direction:ltr;display:inline-block;color:#174f76}
.product-grade{display:inline-flex;align-items:center;padding:3px 7px;border:1px solid;border-radius:10px;font-size:8px;font-weight:850;white-space:nowrap}.product-grade.first{background:#e8f6ef;border-color:#9bcdb6;color:#126849}.product-grade.second{background:#fff3df;border-color:#dfbd81;color:#875715}
.catalog-price strong{font-size:10px;color:#123e5e}.catalog-price span{font-size:7.5px;color:#8a5c1b;background:#fff4e2;padding:2px 5px;border-radius:8px}.catalog-inactive{opacity:.65;background:#f5f7f8}
.product-catalog-modal-card{width:min(760px,94vw)}.product-catalog-modal-card .modal-header{padding:8px 10px}.product-catalog-modal-card .modal-header h2{font-size:14px;margin:1px 0}.product-catalog-modal-card .modal-header p{font-size:7.5px;line-height:1.15}.product-catalog-modal-card form{padding-top:2px}.product-catalog-form-grid{grid-template-columns:110px minmax(190px,2fr) 120px 125px;gap:5px 6px;align-items:end;padding:4px 10px}.product-catalog-form-grid .field{gap:2px}.product-catalog-form-grid .field>span{font-size:8px;font-weight:800}.product-catalog-form-grid input,.product-catalog-form-grid select{height:28px;min-height:28px;padding:3px 6px}.catalog-active-field{display:flex;align-items:center;gap:5px;height:28px;padding:0 7px;border:1px solid #aebdc8;border-radius:4px;background:#f8fafb;font-size:8px;font-weight:800}.catalog-active-field input{width:auto;height:auto}.price-field input{font-weight:850;color:#125d46;border-color:#7fb69e!important;background:#f8fffb}.product-catalog-modal-card .modal-actions{padding:7px 10px}
@media(max-width:900px){.product-catalog-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-catalog-card .table-wrap{overflow-x:auto}.product-catalog-card table{min-width:850px}}
.catalog-heading-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.catalog-heading-actions .button{height:29px;min-height:29px;padding:3px 9px;text-decoration:none}.product-catalog-card table{min-width:1240px}.catalog-family{display:inline-flex;padding:2px 7px;border-radius:10px;background:#eef5fb;color:#174f76;font-weight:800;white-space:nowrap}.catalog-opening-fields{display:contents}.catalog-opening-fields.hidden{display:none!important}.catalog-import-result{min-height:36px;margin:0 0 6px;padding:6px 9px;border:1px solid #9eb8cb;border-radius:6px;background:#f7fbfe;display:flex;align-items:center;justify-content:space-between;gap:10px}.catalog-import-result>div{display:flex;flex-direction:column;gap:2px}.catalog-import-result strong{font-size:11px}.catalog-import-result span{font-size:9px;color:#355269}.catalog-import-result.success{border-color:#81b9a0;background:#f2fbf6;color:#0d6647}.catalog-import-result.error{border-color:#d99a9a;background:#fff6f6;color:#9a2525}.catalog-import-result.loading{border-color:#8aaed0;background:#f3f8fd;color:#184f78}
@media(max-width:760px){.catalog-heading-actions{width:100%}.catalog-heading-actions .button{flex:1;justify-content:center}.catalog-import-result{align-items:stretch;flex-direction:column}.catalog-import-result .button{width:100%}.product-catalog-form-grid{grid-template-columns:1fr}.product-catalog-card table{min-width:1180px}}
#delivery-detail-message{position:sticky;top:0;z-index:6;margin:6px 10px;padding:9px 11px;border:2px solid #d96b76;box-shadow:0 4px 14px rgba(120,25,37,.16);font-size:10px;font-weight:850}
#receipt-form-message{position:sticky;bottom:48px;z-index:6;margin:0 10px 6px;padding:9px 11px;border:2px solid #d96b76;box-shadow:0 4px 14px rgba(120,25,37,.16);font-size:10px;font-weight:850}

/* Enterprise approvals: compact personal inbox and workflow designer */
.approval-command-bar{display:flex;align-items:center;gap:6px;min-height:42px;margin-bottom:5px;padding:5px 7px;border:1px solid #b8c8d4;border-radius:6px;background:#fff}.approval-command-bar>div:first-child{margin-left:auto}.approval-command-bar h1{font-size:15px;line-height:1;margin:0 0 2px}.approval-command-bar>div>span{font-size:7.5px;color:#536878}.approval-inline-counts{display:flex;gap:3px!important;margin-left:6px!important}.approval-inline-counts span{display:flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid #c4d0d9;border-radius:12px;background:#f7f9fb;color:#3f5668!important;font-size:7px!important}.approval-inline-counts b{color:#0f5e91;font-size:9px}.approval-tabs{display:flex;gap:3px;margin-bottom:5px;padding:3px;border:1px solid #b9c8d3;border-radius:6px;background:#eaf0f4}.approval-tabs button{border:0;border-radius:4px;padding:5px 11px;background:transparent;color:#385368;font:inherit;font-size:8px;font-weight:850;cursor:pointer}.approval-tabs button.active{background:#153d60;color:#fff}.approval-two-columns{display:grid;grid-template-columns:1fr 1fr;gap:5px}.approval-list-card{overflow:hidden}.approval-section-head{display:flex;align-items:center;justify-content:space-between;min-height:34px;padding:5px 8px;border-bottom:1px solid #c5d1d9}.approval-section-head strong,.approval-section-head span{display:block}.approval-section-head strong{font-size:10px}.approval-section-head span{font-size:7px;color:#5c7080;margin-top:1px}.approval-list-card th,.approval-list-card td{padding:5px 7px!important;font-size:8px}.approval-list-card td strong,.approval-list-card td small{display:block}.approval-list-card td small{font-size:6.8px;color:#5f7382;margin-top:2px}.approval-state,.approval-risk{display:inline-flex;padding:3px 6px;border-radius:9px;font-size:7px;font-weight:850}.approval-state.pending{background:#fff0d8;color:#8b580f}.approval-state.approved{background:#def3e9;color:#11654b}.approval-state.rejected{background:#fde5e8;color:#9c2938}.approval-state.cancelled,.approval-state.waiting,.approval-state.skipped{background:#e9eef2;color:#5b6b77}.approval-risk.low{background:#e4f4ec;color:#176548}.approval-risk.medium{background:#e4eef8;color:#245c86}.approval-risk.high{background:#fff0d8;color:#88540d}.approval-risk.critical{background:#fde3e7;color:#9e2638}.approval-progress{width:75px;height:5px;border-radius:4px;background:#dce5eb;overflow:hidden}.approval-progress i{display:block;height:100%;background:#16805e}.approval-editor-modal{width:min(1180px,96vw);max-height:94vh;overflow:auto}.approval-workflow-head{padding:6px 10px;gap:5px}.approval-step-toolbar{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;border-top:1px solid #c4d1da;border-bottom:1px solid #c4d1da}.approval-step-row{display:grid;grid-template-columns:25px 1.4fr 110px 1.2fr 95px 60px 70px 100px 30px;align-items:end;gap:4px;padding:5px 8px;border-bottom:1px solid #c6d2da;background:#fff}.approval-step-row>b{align-self:center;width:22px;height:22px;display:grid;place-items:center;background:#163d60;color:#fff;border-radius:50%;font-size:8px}.approval-step-row label>span{display:block;font-size:6.8px;font-weight:800;color:#4a6274;margin-bottom:2px}.approval-step-row input,.approval-step-row select{width:100%;height:27px;padding:2px 5px;border:1px solid #9eb1c0;border-radius:4px;font:inherit;font-size:8px}.approval-step-row .approval-self{display:flex;align-items:center;gap:3px;height:27px;font-size:7px}.approval-step-row .approval-self input{width:auto;height:auto}.approval-detail-modal{width:min(920px,95vw);max-height:94vh;overflow:auto}.approval-detail-head{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin:6px 9px;background:#c5d2db;border-radius:5px;overflow:hidden}.approval-detail-head>div{background:#fff;padding:6px}.approval-detail-head span,.approval-detail-head strong{display:block}.approval-detail-head span{font-size:7px;color:#607483}.approval-detail-head strong{font-size:9px;margin-top:2px}.approval-timeline{padding:4px 9px}.approval-timeline section{display:grid;grid-template-columns:26px 1fr;gap:6px;padding:6px 0;border-bottom:1px solid #c8d4dc}.approval-timeline section>b{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#dce5eb;color:#385064;font-size:8px}.approval-timeline section.approved>b{background:#18805e;color:#fff}.approval-timeline section.pending>b{background:#d58a1e;color:#fff}.approval-timeline section.rejected>b{background:#bd3445;color:#fff}.approval-timeline strong,.approval-timeline span{display:block}.approval-timeline strong{font-size:9px}.approval-timeline span{font-size:7px;color:#5a7080}.approval-people{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px}.approval-people em{font-style:normal;padding:3px 6px;border-radius:9px;background:#edf1f4;font-size:7px}.approval-people em.approved{background:#e1f3ea;color:#15654c}.approval-people em.rejected{background:#fbe5e8;color:#982a39}.approval-decision-box{position:sticky;bottom:0;display:grid;grid-template-columns:1fr auto;gap:6px;padding:7px 10px;border-top:1px solid #b9c9d4;background:#fff}.approval-decision-box>div{display:flex;align-items:end;gap:4px}.approval-decision-box textarea{min-height:42px}.approvals-subnav{margin-bottom:2px}
@media(max-width:1000px){.approval-two-columns{grid-template-columns:1fr}.approval-command-bar{flex-wrap:wrap}.approval-inline-counts{order:3;width:100%}.approval-step-row{grid-template-columns:25px repeat(2,1fr)}.approval-step-row .delete-line{grid-column:auto}.approval-detail-head{grid-template-columns:repeat(2,1fr)}}
.approval-command-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin:5px 9px;background:#c6d2db;border:1px solid #b9c8d3;border-radius:5px;overflow:hidden}.approval-command-summary>div{background:#fff;padding:5px 7px}.approval-command-summary span,.approval-command-summary strong{display:block}.approval-command-summary span{font-size:7px;color:#607483}.approval-command-summary strong{font-size:9px;margin-top:2px}.approval-command-lines{margin:0 9px 5px;border:1px solid #bccbd5;border-radius:5px}.approval-command-lines th,.approval-command-lines td{padding:4px 6px!important;font-size:7.5px}.approval-raw-details{margin:4px 9px;border:1px solid #c2d0d9;border-radius:5px;padding:5px 7px;background:#f8fafb;font-size:8px}.approval-raw-details pre{direction:ltr;text-align:left;white-space:pre-wrap;max-height:220px;overflow:auto;font:7px Consolas,monospace;color:#30485a}.status.pending_approval{background:#fff0d8;color:#875610}@media(max-width:700px){.approval-command-summary{grid-template-columns:1fr}.approval-command-lines{overflow-x:auto}}

/* Backup administration: compact schedule, verified files and guarded restore */
.backup-settings-form{display:grid;grid-template-columns:auto 70px 90px 105px minmax(260px,1fr) 90px auto;align-items:end;gap:5px;padding:7px;margin-bottom:4px}.backup-settings-form .field span{font-size:7px}.backup-settings-form input,.backup-settings-form select{height:28px}.backup-enable{display:flex;align-items:center;gap:5px;height:28px;padding:0 7px;border:1px solid #aebfcc;border-radius:5px;background:#f7f9fb;font-size:8px;font-weight:800;white-space:nowrap}.backup-enable input{height:auto}.backup-path-field input{font-size:8px;text-align:left}.backup-save{height:28px}.backup-status-strip{display:flex;align-items:center;gap:14px;min-height:30px;margin-bottom:4px;padding:5px 8px;border:1px solid #b8c7d2;border-radius:5px;background:#f7f9fb;font-size:8px}.backup-status-strip b{color:#173f60}.backup-error{display:block;color:#a32636!important;margin-top:2px}.backup-run-state{display:inline-flex;padding:3px 6px;border-radius:9px;font-size:7px;font-weight:850}.backup-run-state.success{background:#def3e9;color:#11654b}.backup-run-state.running,.backup-run-state.validating,.backup-run-state.restoring,.backup-run-state.queued{background:#e3eef8;color:#205b88}.backup-run-state.failed{background:#fde5e8;color:#9c2938}.backup-hash{font-size:7px;direction:ltr}.backup-path{max-width:290px;direction:ltr;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:7px}.backup-history-card{margin-top:4px}.restore-backup-modal{width:min(760px,95vw)}.restore-warning{display:grid;gap:5px;padding:7px 10px}.restore-warning label{display:grid;grid-template-columns:18px 1fr;align-items:start;gap:5px;padding:7px;border:1px solid #e1a6ad;border-right:4px solid #b32f40;border-radius:5px;background:#fff7f8;font-size:9px;line-height:1.5}.restore-warning input{margin-top:2px}.restore-confirm-fields{padding:5px 10px}.restore-confirm-fields input{border-color:#9b3a47}.compact-heading{min-height:37px!important}@media(max-width:900px){.backup-settings-form{grid-template-columns:repeat(2,1fr)}.backup-enable,.backup-path-field{grid-column:1/-1}.backup-status-strip{flex-wrap:wrap}.restore-confirm-fields{grid-template-columns:1fr}}

/* Compact multi-user navigation and live workflow queues */
.app-shell .sidebar{width:138px;padding-inline:4px}.app-shell .main-area{margin-right:138px}.app-shell .nav-item{font-size:11px;padding-inline:5px;gap:4px}.app-shell .nav-icon{width:15px;font-size:13px}.app-shell .sales-subnav,.app-shell .module-subnav{margin-right:17px;padding-right:3px}.app-shell .subnav-item{font-size:9.3px;padding:3px 4px;min-height:21px}.app-shell .nav-item b,.app-shell .subnav-badge{font-size:8px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#f0b52d;color:#173149}
.sales-order-module-tabs,.customer-portal-module-tabs{display:flex;align-items:center;gap:2px;margin-bottom:4px;padding:2px;border:1px solid #aebfce;border-radius:5px;background:#e9eff4}.sales-order-module-tabs button,.customer-portal-module-tabs button{height:27px;border:1px solid transparent;border-radius:4px;background:transparent;padding:3px 12px;color:#304a5f;font:inherit;font-size:10px;font-weight:800;cursor:pointer}.sales-order-module-tabs button.active,.customer-portal-module-tabs button.active{background:#fff;border-color:#8fa8bd;color:#0b5798}.customer-portal-module-tabs button:disabled{margin-inline-start:auto;color:#7c8b96;cursor:not-allowed}
.approval-document-panel{margin:5px 9px;border:1px solid #aebfce;border-radius:6px;background:#fff;overflow:hidden}.approval-document-title{min-height:34px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 8px;border-bottom:1px solid #c5d1d9;background:#edf3f7}.approval-document-title strong,.approval-document-title span{display:block}.approval-document-title strong{font-size:10px;color:#163b59}.approval-document-title span{font-size:7.5px;color:#536b7d;margin-top:2px}.approval-document-panel .approval-command-summary{margin:0;border:0;border-bottom:1px solid #cbd6dd;border-radius:0}.approval-document-panel .approval-command-lines{max-height:270px}.approval-document-panel .approval-command-lines th,.approval-document-panel .approval-command-lines td{padding:5px 7px!important;font-size:8.5px}.approval-document-panel .approval-command-lines small{display:block;font-size:7px;color:#607483;margin-top:2px}.approval-generic-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#cad5dd}.approval-generic-grid>div{min-height:42px;background:#fff;padding:6px 7px}.approval-generic-grid span,.approval-generic-grid strong{display:block}.approval-generic-grid span{font-size:7px;color:#5a7080}.approval-generic-grid strong{font-size:9px;margin-top:3px;word-break:break-word}.approval-document-note{display:flex;gap:8px;padding:7px 8px;background:#fffbea;font-size:8px}.approval-document-note span{color:#425a6d}
.portal-review-audit{display:grid;gap:3px;margin:6px 10px;padding:6px 8px;border:1px solid #c0ced7;border-radius:5px;background:#f8fafb}.portal-review-audit>strong{font-size:9px;color:#173e61}.portal-review-audit>span{font-size:7.5px;color:#50697b;border-top:1px solid #e1e7eb;padding-top:3px}.portal-review-lines td{white-space:nowrap}.portal-review-lines td:nth-child(2){white-space:normal}
@media(max-width:900px){.approval-generic-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.app-shell .sidebar{width:52px}.app-shell .main-area{margin-right:52px}.approval-generic-grid{grid-template-columns:1fr}.sales-order-module-tabs,.customer-portal-module-tabs{overflow-x:auto}.sales-order-module-tabs button,.customer-portal-module-tabs button{white-space:nowrap}}

/* Agent order lines use the same compact mechanism as the internal sales order. */
.agent-lines-table-wrap{width:100%;max-width:100%;max-height:none;overflow-x:hidden;overflow-y:visible;border-color:#b8c8d4}
.agent-lines-table{width:100%;min-width:0;table-layout:fixed}
.agent-lines-table th{padding:4px 3px;font-size:9px;line-height:1.15;white-space:normal;color:#354f62}
.agent-lines-table th:nth-child(1){width:28px}.agent-lines-table th:nth-child(2){width:22%}.agent-lines-table th:nth-child(3){width:8%}.agent-lines-table th:nth-child(4){width:9%}.agent-lines-table th:nth-child(5){width:26%}.agent-lines-table th:nth-child(6){width:9%}.agent-lines-table th:nth-child(7){width:9%}.agent-lines-table th:nth-child(8){width:11%}.agent-lines-table th:nth-child(9){width:54px}
.agent-lines-table .line-main-row td{height:36px!important;padding:3px!important;vertical-align:middle!important;border-bottom:1px solid #aebeca!important;min-width:0}
.agent-lines-table .line-main-row:not(:first-child) td{border-top:1px solid #7f96a7!important}
.agent-lines-table .line-input{display:block;width:100%;min-width:0;height:27px!important;min-height:27px!important;padding:2px 5px!important;font-size:10px!important;border-radius:4px!important}
.agent-lines-table .quantity-input,.agent-lines-table .density-input,.agent-lines-table .color-input{text-align:center}
.agent-lines-table .compact-measure-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.agent-lines-table .compact-measure-fields label{grid-template-columns:1fr;gap:2px}
.agent-lines-table .compact-measure-fields label span{font-size:8px;text-align:center}
.agent-lines-table .compact-measure-fields .line-input{padding-inline:2px!important;text-align:center}
.agent-lines-table .line-measure-cell{text-align:center;white-space:nowrap}
.agent-lines-table .line-measure-cell strong{display:block;font-size:10px;color:#115f47}.agent-lines-table .line-measure-cell small{display:block;margin-top:1px;font-size:7px;color:#657b89}
.agent-lines-table .line-actions{gap:2px}.agent-lines-table .line-action{width:24px;height:24px;min-width:24px;border-radius:4px}
@media(max-width:900px){.agent-lines-table-wrap{overflow-x:auto}.agent-lines-table{min-width:900px}}
.quantity-with-unit{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px;min-width:0}
.quantity-with-unit small{font-size:8px;font-weight:850;color:#34556c;white-space:nowrap}

/* Two-step readability boost for every working surface; the blue sidebar keeps its current scale. */
.main-area,#agent-portal-shell,.modal-layer,.login-page{font-size:16px}
.main-area :where(th),#agent-portal-shell :where(th),.modal-layer :where(th){font-size:11px!important}
.main-area :where(td),#agent-portal-shell :where(td),.modal-layer :where(td){font-size:12px!important}
.main-area :where(input,select,textarea),#agent-portal-shell :where(input,select,textarea),.modal-layer :where(input,select,textarea),.login-page :where(input,select,textarea){font-size:12px!important}
.main-area :where(button),#agent-portal-shell :where(button),.modal-layer :where(button),.login-page :where(button){font-size:11px!important}
.main-area :where(small),#agent-portal-shell :where(small),.modal-layer :where(small),.login-page :where(small){font-size:10px!important}
.main-area :where(p),#agent-portal-shell :where(p),.modal-layer :where(p),.login-page :where(p){font-size:11px!important}
.main-area :where(.field>span,label>span),#agent-portal-shell :where(.field>span,label>span),.modal-layer :where(.field>span,label>span){font-size:11px!important}
.main-area :where(.card-toolbar h2,.section-title h2,.summary-heading h2,.timeline-card h2),#agent-portal-shell :where(h2),.modal-layer :where(h2){font-size:17px!important}
.main-area :where(.page-heading h1,.document-title h1),#agent-portal-shell :where(h1),.login-page :where(h1){font-size:20px!important}
.main-area :where(.crumbs){font-size:12px!important}.main-area :where(.connection,.status,.task-status,.portal-status){font-size:11px!important}
/* Final compact header contract - loaded last to override legacy screen rules */
.app-shell .topbar{height:30px!important;min-height:30px!important;padding:0 6px!important}.app-shell .topbar .global-search{height:24px!important;width:200px!important}.app-shell .topbar .icon-button{width:24px!important;height:24px!important}.app-shell .topbar .connection{padding:2px 5px!important}.app-shell .topbar .crumbs{font-size:10px!important}.app-shell .page-view{padding-top:2px!important}.app-shell :where(.page-heading,.document-header,.warehouse-page-heading,.accounting-pro-head,.invoice-workspace-head){height:22px!important;min-height:22px!important;max-height:22px!important;margin:0 0 2px!important;padding:0 1px!important;overflow:hidden;align-items:center!important}.app-shell :where(.page-heading h1,.document-title h1,.warehouse-page-heading h1,.accounting-pro-head h1,.invoice-workspace-head h1){font-size:14px!important;line-height:1!important;margin:0!important}.app-shell :where(.page-heading p,.warehouse-page-heading p,.accounting-pro-head p,.invoice-workspace-head p,.page-heading .eyebrow,.warehouse-page-heading .eyebrow,.accounting-pro-head .eyebrow){display:none!important}.app-shell :where(.page-heading,.warehouse-page-heading,.accounting-pro-head,.invoice-workspace-head) .button{height:21px!important;min-height:21px!important;padding:1px 6px!important;font-size:9px!important}.app-shell .approval-command-bar{height:26px!important;min-height:26px!important;max-height:26px!important;padding:0 1px!important;margin-bottom:2px!important}.app-shell .approval-command-bar h1{font-size:14px!important}.app-shell .approval-command-bar .button{height:22px!important;min-height:22px!important;padding:1px 5px!important}.app-shell :where(.catalog-tabs,.warehouse-module-tabs,.inventory-content-nav,.accounting-inner-tabs,.sales-order-module-tabs,.accounting-module-tabs,.approval-tabs){height:27px!important;min-height:27px!important;margin-bottom:2px!important}.app-shell .unified-screen-filter{height:30px!important;margin-bottom:2px!important;padding:2px 3px!important}.app-shell .unified-screen-filter input,.app-shell .unified-screen-filter .button{height:24px!important;min-height:24px!important}
@media(max-width:760px){.app-shell :where(.page-heading,.document-header,.warehouse-page-heading,.accounting-pro-head,.invoice-workspace-head){height:24px!important;min-height:24px!important;max-height:24px!important}.app-shell .unified-screen-filter{height:auto!important}}
/* Merge actions with tabs and database filters with table toolbars */
.app-shell :where(.page-heading,.document-header,.warehouse-page-heading,.accounting-pro-head,.invoice-workspace-head){height:18px!important;min-height:18px!important;max-height:18px!important;margin-bottom:1px!important;border-bottom-color:#c0ccd5}.app-shell :where(.page-heading h1,.document-title h1,.warehouse-page-heading h1,.accounting-pro-head h1,.invoice-workspace-head h1){font-size:13px!important}.app-shell :where(.catalog-tabs,.warehouse-module-tabs,.inventory-content-nav,.accounting-inner-tabs,.sales-order-module-tabs,.accounting-module-tabs,.approval-tabs){height:26px!important;min-height:26px!important;margin-bottom:2px!important;padding:1px 2px!important}.app-shell .unified-tab-actions{display:flex;align-items:center;gap:3px;margin-inline-start:auto;padding-inline-start:2px;white-space:nowrap}.app-shell .unified-tab-actions :where(.button,a.button){height:22px!important;min-height:22px!important;padding:1px 7px!important;font-size:9px!important;border-radius:4px!important}.app-shell .catalog-heading-actions:not(:has(button)):not(:has(a.button)):not(:has(.catalog-list-filter)){display:none!important}.app-shell .catalog-heading-actions.compact{margin-bottom:2px!important}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar){min-height:31px!important;height:31px!important;padding:2px 5px!important;display:flex!important;align-items:center!important;gap:5px}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter{width:min(1040px,78%);height:26px!important;min-height:26px!important;margin:0 0 0 auto!important;padding:0!important;border:0!important;background:transparent!important;grid-template-columns:minmax(180px,1fr) 128px 128px 43px 43px;gap:3px}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter input{height:23px!important;min-height:23px!important;padding-block:1px!important}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter .button{height:23px!important;min-height:23px!important;padding:1px 5px!important}.app-shell .catalog-list-filter{height:24px;margin-inline-start:auto!important}.app-shell .catalog-list-filter select{height:23px!important;min-height:23px!important;padding-block:1px!important}.app-shell .unified-filter-results{margin-top:0!important}.app-shell #prices-view>.page-heading{height:18px!important;min-height:18px!important;max-height:18px!important}.app-shell #prices-view{padding-top:1px!important}
@media(max-width:950px){.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar){height:auto!important;min-height:31px!important;flex-wrap:wrap}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter{width:100%;grid-template-columns:minmax(160px,1fr) 115px 115px 42px 42px}.app-shell .unified-tab-actions{position:sticky;left:0;background:#e7eef4}}
@media(max-width:760px){.app-shell :where(.page-heading,.document-header,.warehouse-page-heading,.accounting-pro-head,.invoice-workspace-head){height:18px!important;min-height:18px!important;max-height:18px!important}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter{grid-template-columns:1fr 1fr}.app-shell :where(.card-toolbar,.approval-section-head,.warehouse-table-toolbar)>.unified-screen-filter .unified-search{grid-column:1/-1}}

/* Professional compact product hierarchy */
.catalog-tree-card{border-color:#9fb2c1;overflow:hidden}.catalog-tree-card .card-toolbar{background:#f8fafc;border-bottom:1px solid #aebfcb}.catalog-title-block{display:flex;align-items:baseline;gap:7px;white-space:nowrap}.catalog-title-block h2{margin:0!important;color:#153e5d}.catalog-title-block span{font-size:9px!important;color:#637887}.product-catalog-card .table-wrap{overflow-x:auto}.product-catalog-card table{width:100%;min-width:980px;table-layout:fixed}.product-catalog-card th:first-child{width:31%}.product-catalog-card th:nth-child(2){width:10%}.product-catalog-card th:nth-child(3){width:8%}.product-catalog-card th:nth-child(4){width:7%}.product-catalog-card th:nth-child(5){width:7%}.product-catalog-card th:nth-child(6){width:7%}.product-catalog-card th:nth-child(7){width:7%}.product-catalog-card th:nth-child(8){width:9%}.product-catalog-card th:nth-child(9){width:7%}.product-catalog-card th:last-child{width:14%}
.catalog-family-row td{padding:3px 6px!important;background:#e6eef4!important;border-top:1px solid #91a8b9!important;border-bottom:1px solid #afc0cc!important}.catalog-family-line{display:grid;grid-template-columns:20px 23px minmax(190px,1fr) auto auto;align-items:center;gap:5px;min-height:27px}.catalog-tree-toggle{width:20px;height:20px;padding:0;border:1px solid #94aabb;border-radius:4px;background:#fff;color:#174b70;font-size:14px;line-height:1;cursor:pointer;transition:transform .12s}.catalog-tree-toggle.expanded{transform:rotate(90deg)}.catalog-family-icon{width:22px;height:22px;display:grid;place-items:center;border-radius:4px;background:#164e75;color:#fff;font-size:11px}.catalog-family-identity{display:flex;align-items:baseline;gap:7px;min-width:0}.catalog-family-identity strong{font-size:12px;color:#123c5b;white-space:nowrap}.catalog-family-identity small{font-size:8px!important;color:#587084;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.catalog-family-summary,.catalog-family-actions,.catalog-row-actions{display:flex;align-items:center;gap:3px;white-space:nowrap}.catalog-family-summary span{padding:2px 6px;border:1px solid #aec0cc;border-radius:9px;background:#f9fbfc;color:#38566c;font-size:8px}.catalog-family-actions .small-action,.catalog-row-actions .small-action{height:22px;min-height:22px;padding:1px 6px;border-radius:4px;font-size:8px!important}
.product-catalog-card tbody .catalog-product-row{height:29px}.catalog-product-row td{height:29px;padding:2px 5px!important;background:#fff;border-bottom:1px solid #d2dce3}.catalog-product-row:hover td{background:#f5f9fc}.catalog-product-row td:first-child{padding-inline-start:25px!important}.catalog-tree-branch{display:inline-block;margin-inline-end:5px;color:#8ba0af}.catalog-product-identity{display:inline-flex;align-items:baseline;gap:7px;max-width:calc(100% - 20px)}.catalog-product-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#173d59;font-size:11px}.catalog-product-identity small{direction:ltr;color:#617687;font:8px Consolas,monospace}.warehouse-chip{display:inline-flex;padding:2px 5px;border:1px solid #b7c5cf;border-radius:8px;background:#f3f6f8;color:#3d5668;font-size:8px;white-space:nowrap}.warehouse-chip.finished_goods{background:#e8f3fa;color:#155d88}.warehouse-chip.spare_parts{background:#f3edf9;color:#68488a}.warehouse-chip.chemicals{background:#fff3df;color:#875b16}.catalog-empty-family td{height:27px!important;padding:4px 48px!important;background:#f8fafb!important;color:#718391;font-size:9px!important}.family-modal-card{width:min(610px,94vw)}.family-modal-card .modal-header{padding:7px 10px}.family-modal-card .modal-header h2{font-size:14px!important;margin:1px 0}.family-modal-card .modal-form{padding:6px 10px;gap:5px}.family-modal-card .modal-actions{padding:7px 10px}
@media(max-width:760px){.catalog-title-block span{display:none}.catalog-family-line{grid-template-columns:20px 22px minmax(130px,1fr) auto}.catalog-family-summary{display:none}.product-catalog-card table{min-width:900px}}

/* Compact chart-account inspection */
.account-details-modal{width:min(780px,95vw)}.account-detail-path{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin:7px 9px;padding:6px 8px;border:1px solid #aebfcb;border-radius:5px;background:#edf3f7}.account-detail-path span{font-size:9px;font-weight:800;color:#194665}.account-detail-path b{color:#7c909f}.account-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin:0 9px 6px;border:1px solid #b6c5cf;border-radius:5px;overflow:hidden;background:#c5d1d9}.account-detail-grid>div{min-height:47px;padding:6px 7px;background:#fff}.account-detail-grid span,.account-detail-grid strong{display:block}.account-detail-grid span{font-size:8px!important;color:#607483}.account-detail-grid strong{margin-top:3px;font-size:10px;color:#173e5d}.account-detail-grid .setting-no{color:#17664d}.account-detail-grid .setting-yes{color:#9b2d3b}.account-detail-note,.account-main-rule{margin:0 9px 6px;padding:6px 8px;border-radius:5px;font-size:9px}.account-detail-note{display:flex;justify-content:space-between;border:1px solid #bdcad3;background:#f8fafb}.account-main-rule{border:1px solid #e1bd78;border-right:4px solid #c88818;background:#fff8e9;color:#775015;font-weight:800}@media(max-width:760px){.account-detail-grid{grid-template-columns:repeat(2,1fr)}}

/* Stable one-line warehouse header */
.app-shell .warehouse-screen-root>.warehouse-command-bar{display:grid!important;grid-template-columns:minmax(205px,auto) minmax(360px,1fr);align-items:center!important;gap:5px!important;width:100%;height:31px!important;min-height:31px!important;margin:0 0 2px!important;padding:1px 2px!important;border:1px solid #a8bac8!important;border-radius:5px!important;background:#f7f9fb!important;overflow:hidden}.app-shell .warehouse-command-bar>.warehouse-compact-header{display:flex!important;align-items:center!important;justify-content:space-between!important;width:auto!important;min-width:0!important;height:27px!important;min-height:27px!important;margin:0!important;padding:0 3px!important;border:0!important;overflow:hidden}.app-shell .warehouse-command-bar .warehouse-compact-header>div:first-child{display:flex;align-items:center;gap:5px;min-width:0}.app-shell .warehouse-command-bar .warehouse-compact-header h1{margin:0!important;font-size:13px!important;line-height:1!important;white-space:nowrap}.app-shell .warehouse-command-bar .warehouse-compact-header small{display:none!important}.app-shell .warehouse-command-bar .warehouse-type-badge{flex:0 0 auto;padding:1px 5px!important;font-size:8px!important}.app-shell .warehouse-command-bar .warehouse-heading-actions{display:flex!important;flex:0 0 auto;margin-inline-start:4px}.app-shell .warehouse-command-bar .warehouse-refresh{width:23px!important;min-width:23px!important;height:23px!important;font-size:11px!important}.app-shell .warehouse-command-bar>.warehouse-module-tabs.warehouse-three-tabs{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:2px!important;width:100%!important;min-width:0!important;height:27px!important;min-height:27px!important;margin:0!important;padding:1px!important;border:0!important;border-radius:4px!important;background:#e4ebf1!important;overflow-x:auto}.app-shell .warehouse-command-bar>.warehouse-module-tabs.warehouse-three-tabs button{flex:1 1 110px;max-width:190px;height:24px!important;min-height:24px!important;margin:0!important;padding:1px 8px!important;border-radius:3px!important;font-size:9px!important;line-height:1!important}.app-shell .warehouse-panel{min-width:0}.app-shell .warehouse-panel>.content-card:first-child{margin-top:0}
@media(max-width:820px){.app-shell .warehouse-screen-root>.warehouse-command-bar{grid-template-columns:1fr;height:auto!important;min-height:58px!important;overflow:visible}.app-shell .warehouse-command-bar>.warehouse-compact-header,.app-shell .warehouse-command-bar>.warehouse-module-tabs.warehouse-three-tabs{width:100%!important}.app-shell .warehouse-command-bar>.warehouse-module-tabs.warehouse-three-tabs button{max-width:none}}

/* Unified compact action language and sales-order command bar */
.app-shell :where(.button,.small-action,.doc-action){display:inline-flex;align-items:center;justify-content:center;gap:4px;height:25px;min-height:25px;padding:0 8px;border:1px solid #9fb1bf;border-radius:5px;background:#fff;color:#24465e;font-weight:800;line-height:1;box-shadow:none;cursor:pointer;white-space:nowrap;transition:background-color .12s,border-color .12s,color .12s}
.app-shell :where(.button,.small-action,.doc-action):hover:not(:disabled){border-color:#3177a8;background:#edf5fb;color:#0d568b}.app-shell :where(.button,.small-action,.doc-action):focus-visible{outline:2px solid #79acd0;outline-offset:1px}.app-shell :where(.button,.small-action,.doc-action):disabled{opacity:.5;cursor:not-allowed}
.app-shell .button.primary{background:#146b9c;border-color:#146b9c;color:#fff}.app-shell .button.primary:hover:not(:disabled){background:#0e5d89;border-color:#0e5d89;color:#fff}.app-shell .button.success{background:#16805d;border-color:#16805d;color:#fff}.app-shell .button.success:hover:not(:disabled){background:#106b4d;border-color:#106b4d;color:#fff}.app-shell .button.danger,.app-shell .small-action.danger{background:#fff5f5;border-color:#d8a7ad;color:#a62f3c}.app-shell .icon-button{border-color:#a8b9c5;background:#fff;color:#24465e;box-shadow:none}
.modal-layer :where(.button,.small-action,.doc-action),#agent-portal-shell :where(.button,.small-action,.doc-action){display:inline-flex;align-items:center;justify-content:center;gap:4px;height:27px;min-height:27px;padding:0 9px;border:1px solid #9fb1bf;border-radius:5px;background:#fff;color:#24465e;font-weight:800;line-height:1;box-shadow:none;cursor:pointer;white-space:nowrap}.modal-layer :where(.button,.small-action,.doc-action):hover:not(:disabled),#agent-portal-shell :where(.button,.small-action,.doc-action):hover:not(:disabled){border-color:#3177a8;background:#edf5fb;color:#0d568b}.modal-layer .button.primary,#agent-portal-shell .button.primary{background:#146b9c;border-color:#146b9c;color:#fff}.modal-layer .button.success,#agent-portal-shell .button.success{background:#16805d;border-color:#16805d;color:#fff}.modal-layer .button.danger,.modal-layer .small-action.danger,#agent-portal-shell .button.danger{background:#fff5f5;border-color:#d8a7ad;color:#a62f3c}.modal-layer :where(.button,.small-action,.doc-action):disabled,#agent-portal-shell :where(.button,.small-action,.doc-action):disabled{opacity:.5;cursor:not-allowed}
.app-shell #orders-view{padding-top:1px!important}.app-shell #orders-view>.sales-orders-command-bar{display:flex!important;align-items:center!important;width:100%;height:28px!important;min-height:28px!important;margin:0 0 2px!important;padding:1px 2px!important;overflow-x:auto}.app-shell .sales-orders-command-bar>button{height:24px!important;min-height:24px!important;padding:1px 10px!important}.app-shell .sales-orders-command-bar>.sales-cycle-actions{display:flex;align-items:center;gap:3px;margin-inline-start:auto}.app-shell .sales-orders-command-bar>.sales-cycle-actions .button{height:23px!important;min-height:23px!important;padding:0 7px!important}
.cutting-create-modal{width:min(690px,95vw)}.cutting-create-body{padding:7px 10px}.cutting-order-search{display:flex!important;width:100%!important;height:29px!important;margin:0 0 5px!important}.cutting-order-search input{height:27px!important}.cutting-orders-dropdown{border:1px solid #9fb3c2;border-radius:5px;background:#fff;overflow:hidden}.cutting-orders-dropdown>summary{display:flex;align-items:center;justify-content:space-between;min-height:31px;padding:4px 8px;background:#eef3f7;color:#173f5d;font-size:11px;font-weight:850;cursor:pointer;list-style:none}.cutting-orders-dropdown>summary::-webkit-details-marker{display:none}.cutting-order-options{max-height:46vh;overflow:auto;padding:3px;border-top:1px solid #bdcbd5}.cutting-order-option{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:7px;min-height:39px;padding:4px 6px;border-bottom:1px solid #d7e0e6;cursor:pointer}.cutting-order-option:last-child{border-bottom:0}.cutting-order-option:hover{background:#f2f7fa}.cutting-order-option input{width:15px;height:15px}.cutting-order-option span,.cutting-order-option strong,.cutting-order-option small{display:block}.cutting-order-option strong{font-size:11px;color:#173d59}.cutting-order-option small{margin-top:2px;font-size:9px!important;color:#5c7180}
@media(max-width:760px){.app-shell .sales-orders-command-bar>.sales-cycle-actions{position:static!important}.cutting-create-modal{width:96vw}.cutting-order-options{max-height:55vh}}

/* Unlimited product-category depth and governed UOM table */
.catalog-family-row{--tree-depth:0}.catalog-family-row .catalog-family-line{padding-inline-start:calc(var(--tree-depth) * 18px)}.catalog-product-row td:first-child{padding-inline-start:calc(25px + var(--tree-depth,1) * 18px)!important}.catalog-family-row .catalog-tree-toggle:disabled{opacity:.28;cursor:default}.catalog-family-row[style*="--tree-depth:0"] td{background:#e4edf3!important}.catalog-family-row:not([style*="--tree-depth:0"]) td{background:#eff4f7!important}.catalog-family-actions{margin-inline-start:auto}.catalog-family-actions .small-action{padding-inline:5px!important}.app-shell #catalog-uoms-panel table{min-width:760px}.app-shell #catalog-uoms-panel td,.app-shell #catalog-uoms-panel th{padding-block:4px!important}.app-shell #catalog-uoms-panel td:first-child{direction:ltr;font-family:Consolas,monospace}.app-shell #catalog-uoms-panel small{display:inline;margin-inline-start:4px;color:#667b89}
body.auth-resolving :is(#login-view,#app-shell,#agent-portal-shell){visibility:hidden!important}
.secure-password-field{position:relative;display:block;width:100%}
.secure-password-field>input{width:100%;padding-left:42px!important}
.secure-password-field>.password-visibility{position:absolute;left:5px;top:50%;display:inline-flex;width:32px;height:30px;min-height:30px;align-items:center;justify-content:center;padding:0;border:0;border-radius:7px;background:transparent;color:#60758a;transform:translateY(-50%);cursor:pointer}
.secure-password-field>.password-visibility:hover,.secure-password-field>.password-visibility.active{background:#eaf4ff;color:#0874df}
.password-change-layer{z-index:2100;background:rgba(12,29,46,.62);backdrop-filter:blur(5px)}
.password-change-card{width:min(520px,calc(100vw - 28px));padding:20px;border:1px solid #d4e0ea;border-radius:14px;box-shadow:0 26px 70px rgba(8,30,52,.28)}
.password-change-card .modal-header{margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #e3ebf1}
.password-change-card .modal-header p:last-child{max-width:420px;margin:5px 0 0;color:#60758a;line-height:1.7}
.password-change-card form{display:grid;gap:13px}
.password-change-card .modal-actions{display:flex;justify-content:space-between;gap:9px;margin-top:5px;padding-top:13px;border-top:1px solid #e3ebf1}
