/* Tractorio client portal standard V1.
   Loaded last by the client layout so public pages and every workspace context
   share the same readable scale, geometry, focus states and mobile behaviour. */

:root{
  --portal-content:1180px;
  --portal-content-wide:1320px;
  --portal-sidebar:252px;
  --portal-gap:20px;
  --portal-control-height:42px;
  --portal-touch-height:44px;
  --portal-radius-sm:8px;
  --portal-radius-md:12px;
  --portal-radius-lg:16px;
  --portal-border:#dfe6e1;
  --portal-divider:#e9eeeb;
  --portal-surface:#fff;
  --portal-subtle:#f8faf9;
  --portal-muted:#66746c;
  --portal-ink:#17211b;
  --portal-focus:0 0 0 3px rgba(47,107,45,.18);
  --portal-shadow:0 1px 2px rgba(16,24,40,.04),0 7px 22px rgba(16,24,40,.035);
}

html{scrollbar-gutter:stable}
body.client-portal-v2{min-width:0;overflow-x:hidden;background:#fff;color:var(--portal-ink)}
body.client-portal-v2 *{box-sizing:border-box}
body.client-portal-v2 :where(img,svg,video,canvas){max-width:100%}
body.client-portal-v2 :where(p,li,dd,td,th,a,button,label,span,strong){overflow-wrap:anywhere}
body.client-portal-v2 .site-main,
body.client-portal-v2 .workspace-content{min-height:calc(100vh - 260px);min-height:calc(100dvh - 260px)}

/* One visual rhythm for page titles across catalog, buyer and seller contexts. */
body.client-portal-v2.client-ui-v1 :where(.ui-page-header,.workspace-dashboard-hero,[class*="__header"]){min-width:0}
body.client-portal-v2.client-ui-v1 :where(.ui-title,.public-title,.workspace-content h1,.site-main:not(.site-main--product) h1){
  color:#101828;
  font-size:clamp(24px,2.2vw,32px);
  line-height:1.12;
  font-weight:850;
  letter-spacing:-.03em;
}
body.client-portal-v2.client-ui-v1 :where(.ui-subtitle,.public-lead,.workspace-content [class*="__lead"],.site-main [class*="__lead"]){
  max-width:760px;
  color:var(--portal-muted);
  font-size:13px;
  line-height:1.55;
}
body.client-portal-v2.client-ui-v1 :is(.ui-eyebrow,.public-eyebrow,[class*="__eyebrow"],[class$="-eyebrow"]){
  font-size:11px;
  line-height:15px;
  font-weight:850;
  letter-spacing:.075em;
}
body.client-portal-v2.client-ui-v1 :is([class*="__meta"],[class*="__hint"],[class*="__label"],[class*="__caption"]){
  font-size:11.5px;
  line-height:1.45;
}
body.client-portal-v2.client-ui-v1 :where(.site-main small,.workspace-content small){font-size:11.5px;line-height:1.45}

/* Shared surfaces. Route CSS can keep its layout, but cards no longer look like
   separate products designed by different systems. */
body.client-portal-v2.client-ui-v1 :is(.ui-card,[class*="__panel"],[class*="__card"]){
  border-color:var(--portal-border);
}
body.client-portal-v2.client-ui-v1 .ui-card{border-radius:var(--portal-radius-md);box-shadow:var(--portal-shadow)}
body.client-portal-v2.client-ui-v1 .ui-card__header{padding:16px 18px 0}
body.client-portal-v2.client-ui-v1 .ui-card__body{padding:16px 18px}
body.client-portal-v2.client-ui-v1 .ui-card__footer{padding:12px 18px}
body.client-portal-v2.client-ui-v1 :where(.ui-alert,[role="alert"]){border-radius:var(--portal-radius-sm)}

/* Forms and actions use one height and one focus language. */
body.client-portal-v2.client-ui-v1 :where(
  .site-main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .site-main select,
  .workspace-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .workspace-content select
){min-height:var(--portal-control-height);font-size:13px;line-height:20px}
body.client-portal-v2.client-ui-v1 :where(.site-main textarea,.workspace-content textarea){min-height:104px;font-size:13px;line-height:1.5;resize:vertical}
body.client-portal-v2.client-ui-v1 :where(.site-main input,.site-main select,.site-main textarea,.workspace-content input,.workspace-content select,.workspace-content textarea){
  border-radius:var(--portal-radius-sm);
}
body.client-portal-v2.client-ui-v1 :where(.site-main input,.site-main select,.site-main textarea,.workspace-content input,.workspace-content select,.workspace-content textarea):focus-visible{
  border-color:#6e996d;
  outline:0;
  box-shadow:var(--portal-focus);
}
body.client-portal-v2.client-ui-v1 :where(.ui-label,fieldset legend,.site-main label>span:first-child,.workspace-content label>span:first-child){
  color:#34443a;
  font-size:12px;
  line-height:1.4;
  font-weight:750;
}
body.client-portal-v2.client-ui-v1 :where(.ui-field-error,[class*="__error"]){font-size:11.5px;line-height:1.45}
body.client-portal-v2.client-ui-v1 :where(.ui-btn,button[type="submit"],button[type="button"],button[type="reset"]){font-size:13px;line-height:20px}
body.client-portal-v2.client-ui-v1 .ui-btn{min-height:var(--portal-control-height);border-radius:var(--portal-radius-sm);padding:9px 14px}
body.client-portal-v2.client-ui-v1 :where(button,input,select,textarea,a[href],summary):focus-visible{
  outline:2px solid #2f6b2d;
  outline-offset:2px;
}
body.client-portal-v2.client-ui-v1 :where(button,input,select,textarea):disabled{opacity:.62}
body.client-portal-v2.client-ui-v1 :where(.ui-form-actions,.ui-actions,.ui-page-header__actions)>*{flex:0 0 auto}

/* Statuses remain compact, but never jump to a second row because a sibling
   message appears. */
body.client-portal-v2.client-ui-v1 :where(.ui-badge,[class*="__status"]){font-size:11px;line-height:15px}
body.client-portal-v2.client-ui-v1 .ui-badge{min-height:24px;padding:4px 8px;white-space:nowrap}
body.client-portal-v2.client-ui-v1 :where(.ui-page-header,.workspace-dashboard-hero,[class*="__hero"]){align-items:flex-start}
body.client-portal-v2.client-ui-v1 :where(.ui-page-header__actions,[class*="__hero-side"],[class*="__header-actions"]){align-self:flex-start}

/* Tables and dense result lists stay usable instead of shrinking text. */
body.client-portal-v2.client-ui-v1 :where(.ui-table-wrap,[class*="table-wrap"],[class*="__table-wrap"]){
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
}
body.client-portal-v2.client-ui-v1 :where(.ui-table,table){border-collapse:separate;border-spacing:0}
body.client-portal-v2.client-ui-v1 :where(.ui-table th,.ui-table td,.workspace-content table th,.workspace-content table td){
  min-height:42px;
  font-size:12px;
  line-height:1.45;
  vertical-align:middle;
}

/* Stable overlays and feedback. */
body.client-portal-v2.client-ui-v1 :where([role="dialog"]){max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
body.client-portal-v2.client-ui-v1 .ui-toast-region{z-index:100}
body.client-portal-v2.client-ui-v1 :where([aria-live="polite"],[aria-live="assertive"]){overflow-wrap:anywhere}

@media(max-width:860px){
  body.client-portal-v2.client-ui-v1 :where(.ui-page-header,.workspace-dashboard-hero,[class*="__hero"]){gap:12px}
  body.client-portal-v2.client-ui-v1 :where(.ui-page-header__actions,[class*="__hero-actions"]){width:100%;justify-content:flex-start}
}

@media(max-width:1024px){
  body.client-portal-v2.client-ui-v1 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
  /* Scoped selectors outrank compact catalog sort styles without priority overrides. */
  body.client-portal-v2.client-ui-v1 .site-main select,
  body.client-portal-v2.client-ui-v1 .workspace-content select,
  body.client-portal-v2.client-ui-v1 textarea{font-size:16px}
}

@media(max-width:640px){
  body.client-portal-v2.client-ui-v1 :where(
    .brand-directory,
    .brand-directory__head,
    .brand-directory__head-copy,
    .brand-directory__controls,
    .brand-directory__results,
    .brand-directory-grid,
    .brand-directory__control-row,
    .brand-directory__search,
    .brand-directory__view,
    .brand-directory__alphabet,
    .brand-directory__hint
  ){width:100%;max-width:100%;min-width:0}
  body.client-portal-v2.client-ui-v1 .brand-directory__control-row{grid-template-columns:minmax(0,1fr)}
  body.client-portal-v2.client-ui-v1 .brand-directory__view{display:flex}
  body.client-portal-v2.client-ui-v1 .brand-directory__view button{min-width:0}

  :root{--portal-gap:14px}
  html{scrollbar-gutter:auto}
  body.client-portal-v2 .site-main,
  body.client-portal-v2 .workspace-content{min-height:0}
  body.client-portal-v2.client-ui-v1 :where(.ui-title,.public-title,.workspace-content h1,.site-main:not(.site-main--product) h1){font-size:24px;line-height:1.15}
  body.client-portal-v2.client-ui-v1 :where(.ui-page-header,.workspace-dashboard-hero,[class*="__hero"]){flex-direction:column}
  body.client-portal-v2.client-ui-v1 :where(.ui-form-actions,.ui-actions,.ui-page-header__actions){width:100%}
  body.client-portal-v2.client-ui-v1 :where(.ui-form-actions,.ui-actions,.ui-page-header__actions)>.ui-btn{flex:1 1 auto}
  body.client-portal-v2.client-ui-v1 :where(.ui-btn,button[type="submit"]:not(.site-header-mobile__search-submit),button[type="button"],button[type="reset"],select){min-height:var(--portal-touch-height)}
  body.client-portal-v2.client-ui-v1 :where(
    .site-main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .site-main select,
    .site-main textarea,
    .workspace-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .workspace-content select,
    .workspace-content textarea
  ){font-size:16px}
  body.client-portal-v2.client-ui-v1 :where(input[type="checkbox"],input[type="radio"]){min-width:20px;min-height:20px}
  body.client-portal-v2.client-ui-v1 :where(.ui-card__header,.ui-card__body,.ui-card__footer){padding-left:14px;padding-right:14px}
  body.client-portal-v2.client-ui-v1 :where([role="dialog"]){max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
}

@media(prefers-reduced-motion:reduce){
  body.client-portal-v2 *,body.client-portal-v2 *::before,body.client-portal-v2 *::after{
    scroll-behavior:auto;
    animation-duration:.01ms;
    animation-iteration-count:1;
    transition-duration:.01ms;
  }
}

@media print{
  body.client-portal-v2 .site-header,
  body.client-portal-v2 .site-footer-v2,
  body.client-portal-v2 .workspace-sidebar,
  body.client-portal-v2 .ui-toast-region{display:none}
  body.client-portal-v2 .workspace-shell{display:block}
  body.client-portal-v2 :where(.ui-card,[class*="__panel"],[class*="__card"]){box-shadow:none;break-inside:avoid}
}
.support-session-bar{position:sticky;top:0;z-index:100;display:flex;align-items:center;justify-content:center;gap:16px;padding:9px 18px;background:#183d28;color:#fff;font-size:13px}
.support-session-bar__mode{opacity:.78}
.support-session-bar__form{margin:0}
.support-session-bar__stop{cursor:pointer;border:1px solid rgba(255,255,255,.45);border-radius:7px;background:#fff;color:#183d28;padding:5px 10px;font-weight:700}
@media (max-width:767px){.support-session-bar{position:relative;flex-wrap:wrap;gap:8px;padding:8px 12px;text-align:center}}


/* Admin-only development indicator shares the maintenance-preview placement. */
.frontend-cache-preview{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:10px 12px;border:1px solid #fed7aa;border-radius:12px;background:#fff7ed;color:#7c2d12;font-size:13px;line-height:1.45}
.frontend-cache-preview__dot{flex:none;color:#c2410c;font-size:13px}
.frontend-cache-preview__copy{min-width:0;flex:1}
.frontend-cache-preview__copy strong{font-weight:700;color:#7c2d12}
.frontend-cache-preview>a{flex:none;margin-left:auto;padding:5px 8px;border-radius:6px;color:#9a3412;font-weight:700;text-decoration:none}
.frontend-cache-preview>a:hover{background:#ffedd5}
.frontend-cache-preview.is-pending{border-color:#e2e8f0;background:#f8fafc;color:#475569}
.frontend-cache-preview.is-pending .frontend-cache-preview__dot,.frontend-cache-preview.is-pending .frontend-cache-preview__copy strong,.frontend-cache-preview.is-pending>a{color:#475569}
@media(max-width:600px){.frontend-cache-preview{align-items:flex-start;flex-wrap:wrap;gap:6px 10px}.frontend-cache-preview>a{margin-left:18px}}

/* Canonical account page heading: shared by dashboard, orders, RFQs, notifications and settings. */
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px 20px;
  min-width:0;
  margin:0 0 20px;
  padding:0 0 16px;
  border:0;
  border-bottom:1px solid var(--portal-border,#dfe6e1);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__copy{
  display:flex;
  flex:1 1 320px;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
  gap:0;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__eyebrow{
  display:block;
  margin:0 0 4px;
  color:#2f6b2d;
  font-size:11px;
  font-weight:850;
  line-height:16px;
  letter-spacing:.065em;
  text-transform:uppercase;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__title{
  display:block;
  width:auto;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  outline:0;
  color:#101828;
  font-family:Inter,Roboto,system-ui,sans-serif;
  font-size:28px;
  font-weight:850;
  line-height:1.18;
  letter-spacing:-.03em;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__subtitle{
  display:block;
  width:auto;
  max-width:760px;
  margin:6px 0 0;
  color:#66758a;
  font-family:Inter,Roboto,system-ui,sans-serif;
  font-size:13px;
  font-weight:400;
  line-height:1.5;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  margin:0;
  padding:0;
  align-self:flex-start;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__action{
  align-self:flex-start;
  flex:0 0 auto;
  margin:0;
}
body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading .account-overview__context{
  margin-top:4px;
}
@media(max-width:767px){
  body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading{
    flex-direction:column;
    align-items:stretch;
    flex-wrap:nowrap;
    gap:10px;
    margin-bottom:16px;
    padding:0 0 14px;
  }
  body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__copy{flex:0 1 auto;width:100%}
  body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__title{font-size:24px;line-height:1.2}
  body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__actions{
    width:100%;
    justify-content:flex-start;
  }
  body.client-ui-v1.client-portal-v2 .workspace-content .account-page-heading__action{max-width:100%}
}
