/* Working-application layout. Loaded last: compact, full-width screens; the sidebar and the
   top bar identify the current section, so pages carry no large titles or explanations. */
.workspace-main{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:13px}
.workspace-main button,.workspace-main input,.workspace-main select,.workspace-main textarea,.crm-dialog{font-family:inherit}

/* Shell */
@media(min-width:861px){
  .sidebar{width:216px;padding:16px 10px 14px;position:sticky;top:0;align-self:flex-start;height:calc(100svh / var(--ui-zoom,1));overflow-y:auto}
  .sidebar .brand,.sidebar .brand.logo-surface{margin:0 8px 12px;max-width:150px}
  .sidebar .brand img{max-width:150px}
  .nav-caption{margin:14px 10px 4px;font-size:9px}
  .nav-item{padding:7px 10px;font-size:13px;gap:10px;border-radius:4px}
  .sidebar-bottom{margin:14px 4px 0;padding-top:12px}
}
.workspace-header{padding:8px 16px;min-height:44px;box-sizing:border-box;font-size:12px}
.workspace-header>div{gap:14px}
.workspace-content,.workspace-content.order-entry-active,.workspace-content.planner-active{max-width:none;margin:0;padding:12px 16px 24px}

/* Page titles and descriptions: the sidebar and breadcrumb already say where you are. */
#workspace-title,.workspace-content>.workspace-subtitle{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ops-toolbar{margin:0 0 10px;justify-content:flex-end;min-height:0}
.ops-toolbar>div:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ops-toolbar:not(:has(.ops-actions > *)){display:none}
.order-entry-active h1{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Section headings inside a screen: small labels, not banners. */
#operations-content h3,#catalog-content h3,#customer-content h3,.access-heading{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#3d6470;margin:18px 0 6px}
#operations-content h2,#catalog-content h2{font-size:15px;margin:0 0 6px}
.ops-help,.access-hint{font-size:12px;margin:2px 0 8px;line-height:1.45}
.ops-message:empty,.crm-message:empty{display:none}

/* Tabs */
.ops-tabs{margin:0 0 10px;padding-bottom:0;gap:2px;border-bottom:1px solid var(--line)}
.ops-tabs button{padding:7px 12px;border-radius:0;border-bottom:2px solid transparent;font-size:13px}
.ops-tabs button.active{background:none;color:var(--ink);font-weight:600;border-bottom-color:var(--brand-blue)}
.access-tabs{margin-bottom:10px}.access-tabs button{padding:7px 12px}

/* Buttons */
.crm-primary,.crm-secondary{min-height:32px;padding:6px 12px;font-size:12.5px;border-radius:4px}

/* Tables: denser rows, readable headers. */
.crm-table-scroll{border-radius:6px}
.crm-table th{padding:8px 10px;font-size:10.5px;letter-spacing:.04em}
.crm-table td{padding:7px 10px;font-size:12.5px}
.crm-table td:first-child{min-width:160px}
.crm-toolbar{margin:0 0 10px;gap:10px}

/* Overview cards */
.module-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.module-card{padding:14px 16px}
.module-card h3{margin:8px 0 0;font-size:13px}
.planned-panel{padding:20px}

/* Order list metrics and filters */
.order-metric{padding:10px 14px}


/* Form controls at normal application height (login page keeps its own sizes). */
.workspace-main input:not([type=checkbox]):not([type=radio]),.workspace-main select,.crm-dialog input:not([type=checkbox]):not([type=radio]),.crm-dialog select{height:32px;min-height:0;padding:4px 8px;font-size:12.5px;box-sizing:border-box}
.workspace-main textarea,.crm-dialog textarea{font-size:12.5px;padding:6px 8px}
.workspace-main label,.crm-dialog label{margin-bottom:4px}

/* Order list counters: compact strip. */
.order-metric{padding:8px 12px;border-radius:6px}
.order-metric span{font-size:11.5px}
.order-metric strong{margin-top:2px;font-size:20px;font-weight:600}

/* Empty lists: a quiet line, not a large box. */
.ops-empty{padding:14px 16px;border-radius:6px;font-size:12px}
.crm-empty{padding:24px 16px}
#operations-content select,#operations-content input:not([type=checkbox]):not([type=radio]),#operations-content .crm-secondary,#operations-content .crm-primary{height:32px;min-height:0}

/* Planner: whole week fits the window; only a busy day's column scrolls. */
.workspace-content.planner-active{padding-bottom:8px}

/* Display size selector in the top bar */
.ui-scale{display:flex;align-items:center;gap:6px;margin:0;font-size:11px;color:#587e84}
.workspace-main .ui-scale select{height:26px;padding:0 4px;font-size:11.5px;width:auto}

/* Orders list: everything above the table stays put; only the order rows scroll, under fixed column headings. */
.workspace-main:has(.orders-list-active:not(.order-entry-active)){height:calc(100svh / var(--ui-zoom,1));display:flex;flex-direction:column;min-height:0}
.workspace-content.orders-list-active:not(.order-entry-active){flex:1;min-height:0;display:flex;flex-direction:column;padding-bottom:8px}
.orders-list-active:not(.order-entry-active) #operations-content{flex:1;min-height:0;display:flex;flex-direction:column}
.orders-list-active:not(.order-entry-active) #order-browser-results{flex:1;min-height:0;overflow:auto;border:1px solid #d3e6eb;border-radius:6px;background:#fff}
.orders-list-active:not(.order-entry-active) #order-browser-results .crm-table-scroll{overflow:visible;border:0;border-radius:0}
.orders-list-active:not(.order-entry-active) #order-browser-results thead th{position:sticky;top:0;z-index:2}
.orders-list-active:not(.order-entry-active) #order-browser-pagination{flex:none}

/* Signed-in person at the bottom of the sidebar */
@media(min-width:861px){.sidebar-bottom{margin-top:auto}}
.order-metrics{margin:0 0 8px}
.order-view-toolbar,.order-compact-toolbar{margin:0 0 6px}
.orders-list-active .ops-toolbar{margin-bottom:6px}

/* Settings */
.settings-tabs{margin-bottom:12px}
.settings-card{background:#fff;border:1px solid var(--line);border-radius:6px;padding:14px 16px;margin:0 0 12px;max-width:820px}
.settings-card h2{margin:0 0 4px;font-size:14px}
.settings-hint{margin:0 0 10px;font-size:12px;color:#6a7e83}
.settings-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#40555b;margin:0}
.settings-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px}
.settings-form .wide{grid-column:1/-1}
.settings-card>.settings-field select{max-width:260px}
.settings-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:12px}
.settings-status{font-size:12px;color:#2f6f5e}.settings-status.settings-error{color:#a3352b}
.settings-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;margin:0}
.settings-facts dt{font-size:11px;color:#6a7e83}.settings-facts dd{margin:2px 0 0;font-size:13.5px;color:var(--ink)}
#password-change-form{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:700px){.settings-form,.settings-facts,#password-change-form{grid-template-columns:1fr}}
[data-settings-tab][hidden],.settings-pane[hidden]{display:none!important}

/* Sidebar icons: line drawings in the text colour (current section uses the highlight colour). */
.nav-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.9}
.nav-item.selected .nav-icon{opacity:1}
/* Presentation polish: empty states, section titles, consistent tabs, status capitalization */
.ops-empty{display:flex;flex-direction:column;gap:6px;align-items:center;padding:34px 20px;background:var(--panel,#fff);border:1px dashed #c9d9dd;border-radius:10px;color:#5c757c}
.ops-empty strong{font-size:14px;font-weight:600;color:#1d4652}.ops-empty span{font-size:12.5px;max-width:560px;line-height:1.6}
.ops-section-title{font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#2c5764;margin:18px 0 8px}
.catalog-tabs{gap:2px;border-bottom:1px solid var(--line,#d6e2e4);padding-bottom:0;margin-bottom:12px}
.catalog-tabs button{padding:7px 12px!important;border-radius:0!important;border-bottom:2px solid transparent!important;font-size:13px!important;color:#45616a}
.catalog-tabs button.selected{background:none!important;color:var(--ink,#123f4a)!important;font-weight:600;border-bottom-color:var(--brand-blue,#1286a0)!important}
.crm-badge{text-transform:capitalize}
.ops-summary-wait{opacity:.55}.ops-summary strong small{font-size:11px;font-weight:400;text-align:right}
.nav-item[hidden]{display:none!important}
/* Page actions share the tab row instead of sitting alone above it */
.ops-toolbar:has(+ .ops-tabs){position:relative;z-index:2;margin:0 0 -46px;height:46px;align-items:center;pointer-events:none}
.ops-toolbar:has(+ .ops-tabs) .ops-actions{pointer-events:auto}
.ops-toolbar:has(+ .ops-tabs)+.ops-tabs{min-height:46px;align-items:flex-end;padding-right:320px}
/* Shipping settings: day / area pickers */
.ship-days{display:flex;flex-wrap:wrap;gap:6px}
.ship-days label{display:inline-flex;align-items:center;gap:6px;margin:0;padding:6px 10px;border:1px solid #cbdadd;border-radius:7px;background:#fff;font-weight:400;font-size:13px;cursor:pointer}
.ship-days input{width:auto!important;margin:0}
.ship-areas label small{color:#6a7e83;font-size:11px}
.ship-areas label.ship-area-today{border-color:#1286a0;background:#eaf6f9}
/* Quick status and delete in lists */
.rec-status{border:1px solid #cbdadd;border-radius:14px;padding:3px 8px;font:inherit;font-size:12px;background:#e9f6ee;color:#21613f;cursor:pointer}
.rec-status-archived,.rec-status-inactive{background:#f1f1f1;color:#6a6a6a}
.rec-delete{border:1px solid transparent;background:none;border-radius:6px;padding:4px;cursor:pointer;color:#8aa0a6;line-height:0}
.rec-delete svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rec-delete:hover{color:#a3352b;border-color:#f0c9c4;background:#fdf3f2}
.rec-danger{background:#a3352b!important;border-color:#a3352b!important}
.rec-message{color:#a3352b}
/* Send email window */
.em-dialog{max-width:760px}.em-from{display:block;color:#6a7e83;font-size:12px;margin-top:3px}
.em-preview{border:1px solid #d6e2e4;border-radius:8px;padding:10px 12px;max-height:260px;overflow:auto;background:#fbfdfd;margin-top:6px}
.em-ok{color:#21613f}.em-off{color:#946b2d}
.em-preview table{width:100%;border-collapse:collapse;font-size:12.5px}.em-preview th{background:#123f4a;color:#fff;text-align:left;padding:5px 7px}.em-preview td{padding:5px 7px;border-bottom:1px solid #e3ecee}.em-preview p{margin:6px 0}
/* Settings → Email: signature switches and preview */
.em-sig-options{border:0;padding:0;display:flex;flex-direction:column;gap:6px}.em-sig-options legend{padding:0;margin-bottom:4px}
.em-sig-options label{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;font-size:13px;color:#1b2b30;margin:0}
.em-sig-options input[type=checkbox]{width:16px;height:16px;min-height:0;flex:none;margin:0;padding:0}
.em-sig-preview{width:100%;height:410px;border:1px solid #d6e2e4;border-radius:8px;background:#f4f8f9}
/* Shipping settings → Pallet patterns */
.ship-pallet-actions{margin:8px 0 18px}
.ship-pallet-row{display:grid;grid-template-columns:minmax(150px,2fr) repeat(3,minmax(80px,1fr)) 70px minmax(90px,1fr) 32px;gap:8px;align-items:end;padding:8px 0;border-bottom:1px solid #e3ecee}
.ship-pallet-row label{display:block;font-size:11px;color:#40555b;margin-bottom:3px}.ship-pallet-row input{width:100%}
.ship-pallet-total output{display:block;padding:7px 0;font-weight:700;color:#123f4a}
.ship-pallet-row .crm-close{margin-bottom:4px}
@media(max-width:760px){.ship-pallet-row{grid-template-columns:1fr 1fr 1fr}.ship-pallet-row>div:first-child{grid-column:1/-1}}
.welcome-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
/* Settings → History */
.hist{max-width:none}
.hist-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin:8px 0 14px}
.hist-filters .settings-field{flex:1 1 150px;min-width:140px}.hist-filters .settings-field:first-child{flex:2 1 240px}
.hist-table td{vertical-align:top}.hist-when{white-space:nowrap;font-size:12.5px;color:#45616a}
.hist-table td small{display:block;color:#6a7e83;font-size:11.5px}
.hist-more{border:0;background:none;padding:0;text-align:left;font:inherit;font-size:12.5px;color:#0f6f88;cursor:pointer}
.hist-more:hover{text-decoration:underline}
.hist-json{margin:6px 0 0;max-height:320px;overflow:auto;background:#f4f8f9;border:1px solid #e3ecee;border-radius:6px;padding:8px;font-size:11.5px;white-space:pre-wrap;word-break:break-word}
.hist-older{text-align:center}
/* Columns you choose (public/gridcols.js) */
.gc-bar{display:flex;justify-content:flex-end;margin:0 0 3px}
.gc-btn{border:1px solid #d6e2e4;background:#fff;border-radius:6px;padding:2px 8px;font:inherit;font-size:11.5px;color:#4a6870;cursor:pointer}.gc-btn:hover{border-color:#1286a0;color:#0f6f88}
.gc-hide{display:none!important}
th.gc-drag{cursor:grab}th.gc-drag:active{cursor:grabbing}
.gc-menu{position:absolute;z-index:200;width:270px;max-height:60vh;overflow:auto;background:#fff;border:1px solid #cbdadd;border-radius:10px;box-shadow:0 12px 30px #123d4c33;padding:8px;font-size:13px}
.gc-menu header{display:flex;align-items:center;gap:6px;margin-bottom:6px}.gc-menu header strong{flex:1;color:#173f4a}
.gc-menu header button{border:1px solid #d6e2e4;background:#fff;border-radius:6px;padding:2px 8px;font:inherit;font-size:12px;cursor:pointer}
.gc-menu ol{list-style:none;margin:0;padding:0}.gc-menu li{display:flex;align-items:center;gap:6px;padding:3px 4px;border-radius:6px}.gc-menu li:hover{background:#f2f7f8}
.gc-menu li label{flex:1;display:flex;align-items:center;gap:6px;cursor:pointer;color:#173f4a}.gc-menu li input{margin:0;width:15px;height:15px}
.gc-menu li button{border:0;background:none;color:#6a7e83;cursor:pointer;font-size:11px;padding:0 3px}.gc-menu li button:disabled{opacity:.3}
.gc-grip{color:#a5b6ba;cursor:grab;font-size:12px}

/* Sidebar: only the icons show. It opens over the screen while the mouse is on it (or keyboard focus is in it),
   and the ☰ button at the top keeps it open (remembered on this computer). */
.nav-top{display:flex;align-items:center;gap:8px;margin:0 0 10px;height:48px;flex:none}
.nav-toggle{display:none;background:none;border:0;color:#96aab7;padding:8px 10px;border-radius:4px;cursor:pointer}
.nav-toggle:hover{color:#fff;background:#7ecfdf10}
.nav-toggle[aria-pressed=true]{color:var(--brand-gold)}
@media(min-width:601px){
  .workspace .sidebar{width:56px;padding:12px 8px 12px;overflow-x:hidden;z-index:60;transition:width .14s ease,margin-right .14s ease,box-shadow .14s;box-sizing:border-box;position:sticky;top:0;align-self:flex-start;height:calc(100svh / var(--ui-zoom,1));overflow-y:auto}
  .nav-toggle{display:inline-flex;flex:none}
  .nav-top .brand,.nav-top .brand.logo-surface{margin:0;max-width:130px;width:130px;flex:none}
  .nav-top .brand img{max-width:130px;max-height:44px;width:auto}
  .workspace .sidebar-bottom{margin-top:auto}
  .nav-item{position:relative;white-space:nowrap;overflow:hidden}
  .nav-item .nav-count{position:absolute;left:22px;top:2px;min-width:14px;padding:0 4px;font-size:9.5px;line-height:15px}
  .sidebar:not(.nav-wide) .nav-top .brand{display:none}
  .sidebar:not(.nav-wide) .nav-item>span{display:none}
  .sidebar:not(.nav-wide) .nav-caption{color:transparent;background:linear-gradient(#ffffff1c,#ffffff1c) center/100% 1px no-repeat;white-space:nowrap;overflow:hidden}
  .sidebar:not(.nav-wide) .sidebar-bottom{margin-left:0;margin-right:0;justify-content:center}
  .sidebar:not(.nav-wide) .sidebar-bottom>div:not(.avatar){display:none}
  .sidebar.nav-wide{width:216px;margin-right:-160px;box-shadow:6px 0 24px #0003}
  .sidebar.nav-wide.nav-pinned{margin-right:0;box-shadow:none}
}
@media(max-width:600px){.nav-top{width:100%;height:auto}.nav-toggle{display:none}}

/* The logo stays in the top bar, always visible (it is not part of the folding sidebar). */
.header-left{display:flex;align-items:center;gap:16px;min-width:0}
.header-logo{display:block;flex:none;line-height:0;position:relative;z-index:61}
.header-logo img{display:block;height:36px;width:auto}
.nav-top{height:40px}
@media(max-width:600px){.header-logo img{height:28px}.header-left{gap:10px}.nav-top{display:none}}

/* Orders: one compact bar instead of big count boxes (owner: "too much real estate"). Field names show as tooltips. */
.order-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 6px}
.order-bar label:not(.order-columns label){position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.order-bar>div,.order-bar .order-query-controls,.order-bar .order-view-controls{display:flex;align-items:center;gap:6px;margin:0;flex-wrap:nowrap}
.order-bar .order-query-controls>div,.order-bar .order-view-controls>div,.order-bar #order-filter-value>div,.order-bar .order-date-values{display:flex;align-items:center;gap:6px;margin:0}
.order-bar select,.order-bar input:not([type=checkbox]),.order-bar .crm-secondary,.order-bar .crm-primary,.order-bar .order-columns>summary{height:30px!important;min-height:0;font-size:12.5px;padding:3px 8px}
.order-bar select{width:auto;max-width:200px}
.order-show select{font-weight:600}
.order-bar .order-view-controls{margin-left:auto}
.order-bar .order-filter-operator{font-size:12px;color:#6a8c94;margin:0!important;padding:0!important;align-self:center;height:auto}
.order-quick{background:none;border:0;padding:3px 6px;border-radius:12px;font-size:12px;color:#3d6470;cursor:pointer;white-space:nowrap}
.order-quick:hover{background:#eef8fa}.order-quick[aria-pressed=true]{background:#e3f4f8;color:var(--ink);font-weight:600}
.order-bar .order-columns{position:relative}.order-bar .order-columns>summary{display:flex;align-items:center;box-sizing:border-box}
.order-result-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 6px;font-size:12px;min-height:24px}
.order-result-row .order-filter-chips{margin:0;display:flex;gap:6px;flex-wrap:wrap}
.order-result-row .order-filter-chips button{padding:2px 8px;font-size:11.5px}
.order-bar .order-view-controls{justify-content:flex-end;flex-wrap:wrap;grid-template-columns:none}
.order-bar .order-view-controls>*{flex:none;width:auto}
.order-result-row{justify-content:flex-start}.order-result-row #order-clear-filters{margin-left:auto}

/* Lists grouped by category (items, materials, bulk products). */
.ops-listbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.ops-listbar .ops-search{flex:1;min-width:220px;max-width:360px;margin:0}
.ops-listbar select{width:auto}
.crm-table tr.ops-group-row td{background:#eef7fa!important;border-top:2px solid #cfe3e9;padding:6px 10px;color:var(--navy,#10343e)}
.crm-table tr.ops-group-row small{color:#6a8c94;margin-left:6px;display:inline}
.ops-listbar .ops-inline{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#527982;margin:0}.ops-listbar input[type=date]{width:auto}

/* Phones: the menu folds behind a ☰ button in the top bar and opens as a drawer from the left;
   wide tables scroll sideways inside their box instead of pushing the page wider than the screen. */
.phone-menu{display:none}
@media(max-width:600px){
  .workspace{flex-direction:column}
  .workspace .sidebar{display:none}
  .workspace .sidebar.phone-open{display:flex;flex-direction:column;flex-wrap:nowrap;position:fixed;top:0;left:0;bottom:0;width:min(300px,84vw);height:auto;padding:14px 10px calc(env(safe-area-inset-bottom) + 14px);overflow-y:auto;z-index:200;box-shadow:8px 0 40px #0006;animation:phone-drawer .16s ease-out}
  .workspace .sidebar.phone-open .nav-item{width:100%;font-size:15px;padding:11px 12px;gap:12px}
  .workspace .sidebar.phone-open .nav-caption{margin:14px 12px 4px}
  .workspace .sidebar.phone-open .sidebar-bottom{margin-top:auto;padding-top:14px}
  .phone-backdrop{position:fixed;inset:0;background:#0b2a3366;z-index:199}
  .phone-menu{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin-left:-6px;border:0;border-radius:10px;background:none;color:var(--navy,#123f4a);cursor:pointer;flex:none}
  .phone-menu svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
  .workspace-main{min-width:0;width:100%;overflow-x:hidden}
  .workspace-content table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .workspace-content table th,.workspace-content table td{white-space:nowrap}
  .workspace-content table td small,.workspace-content table td span{white-space:nowrap}
}
@keyframes phone-drawer{from{transform:translateX(-30px);opacity:.3}to{transform:none;opacity:1}}
@media(max-width:900px){.pl-layout{grid-template-columns:1fr}.pl-side{position:static;height:auto;max-height:none}}
@media(max-width:600px){
  .workspace-header{gap:8px}
  .workspace-header .header-left>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;font-size:13px}
  .workspace-header .header-left>span>.breadcrumb{color:inherit}
  .workspace-header #account-badge{display:none}
  .workspace-header #sign-out{white-space:nowrap}
  /* Tabs: one row that scrolls sideways; the page's main button sits above it instead of on top of it. */
  .ops-toolbar:has(+ .ops-tabs){margin:0 0 6px;height:auto;pointer-events:auto;justify-content:flex-end}
  .ops-toolbar:has(+ .ops-tabs)+.ops-tabs{padding-right:0;min-height:0}
  .ops-tabs,.catalog-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .ops-tabs::-webkit-scrollbar{display:none}
  .ops-tabs button,.catalog-tabs button{white-space:nowrap;flex:none}
}
@media(max-width:600px){.crumb-root,.crumb-sep{display:none}.workspace-header .breadcrumb{color:var(--ink,#173f4a);font-weight:600}}
@media(max-width:900px){.pl-layout>*{min-width:0}.pl-side{width:auto}}
.crm-table td.num,.crm-table th.num{text-align:right}.ops-btn-gap{display:inline-block;width:66px;flex:none}

/* Column widths (colresize.js): a grip on the right edge of each heading. */
table thead th{position:relative}
.cr-grip{position:absolute;top:0;right:-4px;bottom:0;width:9px;cursor:col-resize;z-index:3;touch-action:none}
.cr-grip::after{content:"";position:absolute;top:22%;bottom:22%;left:4px;width:1px;background:#c5d5d9;opacity:0;transition:opacity .12s}
thead tr:hover .cr-grip::after{opacity:1}
.cr-grip:hover::after,.cr-dragging .cr-grip::after{opacity:1;background:var(--brand-blue,#1286a0);width:2px;top:0;bottom:0}
thead th:last-child>.cr-grip{right:0}
table.cr-fixed{table-layout:fixed;max-width:none}
table.cr-fixed th,table.cr-fixed td{overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.cr-dragging,.cr-dragging *{cursor:col-resize!important;user-select:none!important}
.orders-list-active:not(.order-entry-active) #order-browser-results .crm-table-scroll:has(table.cr-fixed),.crm-table-scroll:has(table.cr-fixed){overflow-x:auto}
.order-stepper{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#5c757c}.order-stepper button{min-width:34px;font-size:18px;line-height:1;padding:4px 10px}.order-stepper button:disabled{opacity:.4}
.cust-link{color:inherit;text-decoration:none;border-bottom:1px dotted currentColor;cursor:pointer}.cust-link:hover{color:var(--th-accent,#087e9c);border-bottom-style:solid}

/* Customer page: compact header, key facts side by side, tabs underneath (owner: "very spread out"). */
.cust-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 10px}
.cust-title{display:flex;align-items:center;gap:12px;flex:1;min-width:260px}
.cust-title .crm-company-avatar{width:42px;height:42px;font-size:15px;flex:none}
.cust-title h2{margin:0;font-size:20px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cust-title p{margin:2px 0 0;font-size:12.5px;color:#5c757c}
.cust-actions{display:flex;gap:8px;flex-wrap:wrap}
.cust-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#fff;border:1px solid var(--line,#dae5e7);border-radius:8px;margin:0 0 12px}
.cust-facts section{padding:10px 14px;border-left:1px solid #e6eef0;display:flex;flex-direction:column;gap:2px;font-size:13px;min-width:0}
.cust-facts section:first-child{border-left:0}
.cust-facts h3{margin:0 0 4px;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:#6a7e83}
.cust-facts h3 small{text-transform:none;letter-spacing:0;font-weight:400}
.cust-facts span{color:#5c757c}.cust-facts a{color:var(--th-accent,#087e9c);text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cust-facts .crm-address{margin:0;line-height:1.45}
.cust-who div{margin:1px 0}.cust-who b{font-weight:600}
.cust-tabs{margin-bottom:8px}
.cust-notes{background:#fff;border:1px solid var(--line,#dae5e7);border-radius:8px;padding:12px 14px;white-space:pre-wrap;margin:0}
.cust-details{display:grid;grid-template-columns:140px 1fr;gap:4px 12px;font-size:13px;margin:0 0 12px}.cust-details dt{color:#6a7e83}.cust-details dd{margin:0}
#customer-detail-view .crm-history{margin:0;padding:0;border:0;background:none}
#customer-detail-view .crm-history-head{margin:0 0 8px}
@media(max-width:900px){.cust-facts{grid-template-columns:1fr 1fr}.cust-facts section:nth-child(3){border-left:0}.cust-facts section:nth-child(n+3){border-top:1px solid #e6eef0}}
@media(max-width:560px){.cust-facts{grid-template-columns:1fr}.cust-facts section{border-left:0;border-top:1px solid #e6eef0}.cust-facts section:first-child{border-top:0}}
#customer-detail-view .cust-facts section{padding:10px 14px;margin:0;min-height:0}#customer-detail-view .cust-facts h3{margin:0 0 4px;padding:0}
/* Customer credit status (watch / hold / block) */
.crm-badge.credit-watch{border-color:#ecd9a3;background:#fdf6e1;color:#8a6510;text-transform:none}
.crm-badge.credit-hold{border-color:#f0c49a;background:#fdeedf;color:#a1501a;text-transform:none}
.crm-badge.credit-block{border-color:#ebb5b5;background:#fbe9e9;color:#a12a2a;text-transform:none}
.cust-credit{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:1px solid;border-radius:8px;padding:10px 14px;margin:0 0 12px;font-size:12.5px;line-height:1.6}
.cust-credit span{color:inherit;opacity:.85}
.cust-credit.credit-watch,.order-credit.credit-watch{border-color:#ecd9a3;background:#fdf6e1;color:#6e520d}
.cust-credit.credit-hold,.order-credit.credit-hold{border-color:#f0c49a;background:#fdeedf;color:#86410f}
.cust-credit.credit-block,.order-credit.credit-block{border-color:#ebb5b5;background:#fbe9e9;color:#8c1f1f}
.order-credit{border:1px solid;border-radius:6px;padding:8px 12px;margin:8px 0 0;font-size:12px;line-height:1.5}
.override-code{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin:14px 0 4px;padding:12px 14px;border:1px dashed #87c3d2;border-radius:8px;background:#eef8fb}
.override-code span{font-size:11px;color:#5c7d87}
.override-code strong{font-size:28px;letter-spacing:6px;font-variant-numeric:tabular-nums;color:#0b5f76}
.override-code small{font-size:11px;color:#5c7d87}
#of-credit:empty{display:none}#of-credit .order-credit{margin:0}
.order-entry-fields>#of-credit{display:block}
.order-entry-fields #of-credit>div{display:block}
/* Settings → Assistant */
.as-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:10px;margin-top:6px}
.as-group{border:1px solid #d3e6eb;border-radius:8px;padding:10px 12px;background:#fff;display:grid;gap:8px}
.as-group-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.as-group-head label{display:flex;align-items:center;gap:6px;font-size:12px;color:#456d78}
.as-group textarea{width:100%;box-sizing:border-box;min-height:52px}
/* Customer account tab in an order (executives) */
.acct-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:8px}
.acct-tile{background:#fff;border:1px solid #d3e6eb;border-radius:8px;padding:12px 14px;display:grid;gap:4px}
.acct-tile>span{font-size:11px;color:#5c7d87;text-transform:uppercase;letter-spacing:.5px}
.acct-tile strong{font-size:20px;color:#123f4a;font-variant-numeric:tabular-nums}
.acct-tile small{font-size:11px;color:#6e8b94}
.acct-note{margin:4px 0 12px;font-size:12px}
.acct-this td{background:#f2f9fb}
.settings-form .as-group-head input[type=checkbox]{width:16px;height:16px;min-height:0;flex:none;margin:0;padding:0;accent-color:#087e9c}.as-group-head label{white-space:nowrap}
/* Formulator → Mixing now (lab codes at mixing stops) */
.lab-mix-list{display:grid;gap:12px}
.lab-batch{background:#fff;border:1px solid #d3e6eb;border-radius:10px;padding:14px 16px}.lab-batch.hold{border-color:#f0c49a}
.lab-batch header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.lab-batch header small{display:block;color:#6e8b94;font-size:12px;margin-top:3px}
.lab-qc{font-size:12.5px;color:#456d78;margin:8px 0 0}
.lab-stops{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:6px}
.lab-stops li{display:flex;align-items:center;gap:12px;border:1px solid #ebc4c2;background:#fdf3f2;border-radius:8px;padding:8px 12px;font-size:13px}
.lab-stops li>span{font-weight:800;color:#a12a2a;min-width:40px}.lab-stops li>div{flex:1}.lab-stops li small{display:block;color:#5c7d87;margin-top:2px}
.lab-stops li.next{border-width:2px;border-color:#d9534f}
.lab-stops li.done{border-color:#bfe0cb;background:#f1faf4}.lab-stops li.done>span{color:#1d7a43}
/* Settings → Billing */
.bs{display:grid;gap:16px}
.bs-fs{border:0;padding:0;margin:0;min-width:0}
.bs-scroll{overflow-x:auto}
.bs-table{border-collapse:collapse;width:100%;min-width:560px;font-size:13px}
.bs-table th{font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:#63808b;text-align:left;padding:6px 8px;background:#eaf4f7}
.bs-table td{padding:5px 8px;border-top:1px solid #e3eef1}
.bs-table input:not([type=checkbox]):not([type=radio]),.bs-table select{width:100%;box-sizing:border-box;height:34px;border:1px solid #cce0e0;border-radius:4px;padding:0 8px;font:inherit;background:#fff}
.bs-table input[type=number]{max-width:120px}
.bs-c{text-align:center}.bs-c input{width:16px;height:16px;accent-color:#087e9c}
.bs-off td{opacity:.55}
.bs-counter{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;padding:8px 0;border-top:1px solid #e3eef1}
.bs-counter>span{min-width:110px;font-weight:600;padding-bottom:8px}
.bs-counter label{display:grid;gap:4px;font-size:12px;color:#567882}
.bs-counter input{height:34px;border:1px solid #cce0e0;border-radius:4px;padding:0 8px;font:inherit;width:130px}
.bs-counter output{padding-bottom:8px;font-size:13px}
.bs-check{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 0;border-top:1px solid #e3eef1;font-size:13px;color:#315961}.bs-check input[type=checkbox]{width:18px;height:18px;accent-color:#087e9c}.bs-check input[type=number]{width:70px;height:34px;border:1px solid #cce0e0;border-radius:4px;padding:0 8px;font:inherit}.bs-check small{color:#7b96a0}
/* Customer page → Notes: conversations from the sales site. */
.cust-talk h3{font-size:13px;margin:16px 0 8px}
.cust-talk-list{list-style:none;margin:0;padding:0;border:1px solid var(--line,#dae5e7);border-radius:8px;background:#fff}
.cust-talk-list li{padding:10px 14px;border-top:1px solid #edf3f4}
.cust-talk-list li:first-child{border-top:0}
.cust-talk-list small{color:#6a7e83}
.cust-talk-list .crm-notes{margin:4px 0}
.cust-talk-list audio{display:block;width:100%;max-width:420px;height:40px;margin:4px 0}
