/* Balanced tab spacing. Keep each feature's visibility, sticky placement and tab behavior. */
body .delegate-tabs,
body[data-page="workspace"] .delegate-tabs,
body[data-page="workspace"] #inbox-workspace .delegate-tabs {
  gap:8px;
  flex-wrap:nowrap;
  flex-shrink:0;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  padding:0;
  border:0;
  border-bottom:1px solid var(--staff-border,#e5e7eb);
  border-radius:0;
  background:#fff;
  box-shadow:none;
}
body .delegate-tabs > .delegate-tab,
body[data-page="workspace"] .delegate-tabs > .delegate-tab,
body[data-page="workspace"] #inbox-workspace .delegate-tabs > .delegate-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:0 0 auto;
  box-sizing:border-box;
  min-width:0;
  min-height:46px;
  height:46px;
  margin:0;
  padding:0 8px;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#686868;
  font:500 13px/20px var(--staff-font,"DM Sans",sans-serif);
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
}
body .delegate-tabs > .delegate-tab:is([aria-selected="true"],[aria-current="page"],[aria-pressed="true"],.is-active),
body[data-page="workspace"] .delegate-tabs > .delegate-tab:is([aria-selected="true"],[aria-current="page"],[aria-pressed="true"],.is-active),
body[data-page="workspace"] #inbox-workspace .delegate-tabs > .delegate-tab:is([aria-selected="true"],[aria-current="page"],[aria-pressed="true"],.is-active) {
  border-bottom-color:#555;
  background:linear-gradient(#fff,#f2f2f2);
  box-shadow:none;
  color:#171717;
  font-weight:600;
}
body .delegate-tabs > .delegate-tab > .delegate-tab-icon {
  width:16px;
  height:16px;
  flex:0 0 16px;
  pointer-events:none;
}
body .delegate-tabs > .delegate-tab:focus-visible {outline:2px solid #466b94;outline-offset:-3px}
body .delegate-tabs > .delegate-tab:disabled {cursor:not-allowed;opacity:.45}
body .delegate-tabs > .delegate-tab[hidden] {display:none}
/* One heading rhythm for every record renderer, including shared and nested panels. */
body .record-content :is(#record-panel,#pl-panel,#tr-panel,.mt-record-panel,.ap-panel,[role="tabpanel"]).delegate-record-panel {padding:24px 0 0}
body .record-content #record-panel:has(> .ins-tab-panel) {padding-top:0}
body .record-content .delegate-record-panel .delegate-panel-heading {
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
  margin:0 0 24px;padding:0;border:0;min-width:0;
}
body .record-content .delegate-panel-heading > :first-child {min-width:0}
body .record-content .delegate-record-panel .delegate-panel-title {
  margin:0;padding:0;font-size:18px;font-weight:600;line-height:28px;letter-spacing:-.3px;
}
body .record-content .delegate-record-panel .delegate-panel-description {
  margin:6px 0 24px;padding:0;font-size:13px;line-height:20px;font-weight:400;color:#727780;
}
body .record-content .delegate-record-panel .delegate-panel-heading .delegate-panel-description {margin-bottom:0}

body .delegate-tabs > .delegate-tab {transition:color .15s ease,border-color .15s ease}
body .delegate-tabs > .delegate-tab:hover:not(:disabled) {color:#404040}
body .delegate-tabs > .delegate-tab:is([aria-selected="true"],[aria-current="page"],[aria-pressed="true"],.is-active) > .delegate-tab-icon {color:#525252}
@media(max-width:760px) {
  body .record-content :is(#record-panel,#pl-panel,#tr-panel,.mt-record-panel,.ap-panel,[role="tabpanel"]).delegate-record-panel {padding-top:20px}
  body .record-content .delegate-record-panel .delegate-panel-heading {flex-wrap:wrap;gap:12px}
}
@media(prefers-reduced-motion:reduce) {body .delegate-tabs > .delegate-tab {transition:none}}
body[data-page="workspace"] .dash-queue-tabs.delegate-tabs {padding-inline:20px}
@media(max-width:760px) {
  body .delegate-tabs > .delegate-tab,
  body[data-page="workspace"] .delegate-tabs > .delegate-tab,
  body[data-page="workspace"] #inbox-workspace .delegate-tabs > .delegate-tab {min-height:46px;height:44px}
  body[data-page="workspace"] .dash-queue-tabs.delegate-tabs {padding-inline:15px}
}

/* Quiet, square tabs with a clear neutral selection. */
body[data-page="workspace"] :is(.record-content,.record-updates,.property-register-tabs) .delegate-tabs{gap:8px}
body[data-page="workspace"] :is(.record-content,.record-updates,.property-register-tabs) .delegate-tabs>.delegate-tab{height:46px;min-height:46px;padding:0 8px;gap:6px;font-size:13px;line-height:20px;border-bottom-width:2px;border-radius:0}
body[data-page="workspace"] :is(.record-content,.record-updates,.property-register-tabs) .delegate-tabs>.delegate-tab>.delegate-tab-icon{width:16px;height:16px;flex-basis:16px}
body[data-page="workspace"] :is(.record-content,.record-updates,.property-register-tabs) .delegate-tabs>.delegate-tab[aria-selected="true"]{background:linear-gradient(#fff,#f2f2f2);border-bottom-color:#555;color:#262626;font-weight:600}
body[data-page="workspace"] :is(.record-content,.record-updates,.property-register-tabs) .delegate-tabs>.delegate-tab:hover:not(:disabled){background:#f6f6f6}
body[data-page="workspace"] .property-register-tabs{margin-bottom:16px}
body[data-page="workspace"] .property-register-tabs .delegate-tabs{display:flex;margin:0}
body[data-page="workspace"] .property-archive-filter{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;color:#666}
body[data-page="workspace"] .property-archive-filter select{width:auto;min-width:150px;height:38px;font:inherit;color:#333;background:#fff;border:1px solid #ddd;border-radius:6px;padding:0 10px}
@media(max-width:600px){body[data-page="workspace"] .property-archive-filter{font-size:0}body[data-page="workspace"] .property-archive-filter select{min-width:0;max-width:150px;font-size:12px}}

/* Bring table navigation closer to its heading on every register surface. */
body[data-page="workspace"] .page-heading:has(+ #register-content .property-register-tabs),
body[data-page="workspace"] :is(.doc-library,.water-register-page) > .page-heading,
body[data-page="workspace"] :is(.nl-heading,.social-heading),
body[data-page="workspace"] #inbox-workspace .inbox-page-heading{margin-bottom:8px}
body[data-page="workspace"] .social-filters.delegate-tabs{display:flex;align-self:stretch}
body[data-page="workspace"] .social-toolbar{gap:12px;margin-bottom:16px}

body[data-page="workspace"] .property-archive-filter select{min-width:116px;height:var(--table-control-height,38px);box-sizing:border-box}

/* Leads and People share one register workspace for Delegate admins. */
body[data-page="workspace"] .page-heading:has(+ .leads-register-tabs){margin-bottom:8px}
body[data-page="workspace"] .leads-register-tabs{margin-bottom:16px}
