:root {
  --portal-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --portal-bg: #f6f8f7;
  --portal-surface: #ffffff;
  --portal-surface-muted: #f0f5f3;
  --portal-surface-raised: #fbfdfc;
  --portal-text: #13241f;
  --portal-muted: #60736c;
  --portal-line: #d8e3de;
  --portal-line-strong: #becdc6;
  --portal-accent: #0f6f5a;
  --portal-accent-ink: #073c32;
  --portal-accent-soft: #e7f4ef;
  --portal-info: #2463a6;
  --portal-info-soft: #e7f0fb;
  --portal-success: #22784a;
  --portal-success-soft: #e8f5ec;
  --portal-warning: #a66712;
  --portal-warning-soft: #fff3d9;
  --portal-danger: #b84539;
  --portal-danger-soft: #fdebea;
  --portal-shadow: 0 14px 34px rgba(19, 36, 31, .08);
  --portal-radius-sm: 6px;
  --portal-radius: 8px;
  --portal-focus: 0 0 0 3px rgba(36, 99, 166, .22);
  --portal-shell-max: 1520px;
}

.portal-shell--hospital {
  --portal-accent: #0f6f5a;
  --portal-accent-ink: #073c32;
  --portal-accent-soft: #e7f4ef;
}

.portal-shell--vendor {
  --portal-accent: #2c6575;
  --portal-accent-ink: #123d49;
  --portal-accent-soft: #e7f2f5;
}

.portal-shell--provider {
  --portal-accent: #4f667a;
  --portal-accent-ink: #243847;
  --portal-accent-soft: #edf2f6;
}

.portal-body,
.portal-shell,
.vendor-vms.portal-shell {
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: var(--portal-font);
  isolation: isolate;
  margin: 0 auto;
  max-width: none;
  min-height: calc(100vh - 96px);
  padding: 24px clamp(14px, 2vw, 28px) 40px;
}

.portal-topbar,
.portal-shell .vms-topbar {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto 16px;
  max-width: var(--portal-shell-max);
  padding: 12px;
  position: sticky;
  top: 16px;
  z-index: 30;
}

.portal-shell .vms-brand,
.portal-brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  min-width: 0;
}

.portal-shell .vms-logo {
  height: 42px;
  object-fit: contain;
  width: auto;
}

.portal-shell .vms-org,
.portal-topbar-title {
  display: grid;
  gap: 2px;
  min-width: 180px;
}

.portal-shell .vms-org strong,
.portal-topbar-title strong {
  color: var(--portal-text);
  font-size: 15px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.portal-shell .vms-org span,
.portal-topbar-title span {
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-shell .hospital-global-search {
  align-items: end;
  display: flex;
  flex: 1 1 420px;
  gap: 8px;
  max-width: 620px;
}

.portal-shell .hospital-global-search label {
  flex: 1 1 260px;
  min-width: 180px;
}

.portal-shell .hospital-global-search input {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  min-height: 40px;
  padding: 9px 11px;
  width: 100%;
}

.portal-shell > .hospital-search-results {
  clear: both;
  margin: 0 auto 16px;
  max-width: var(--portal-shell-max);
  position: relative;
  width: 100%;
  z-index: 20;
}

.portal-shell .hospital-search-results .vms-panel-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.portal-shell .hospital-search-groups {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portal-shell .hospital-search-group {
  background: var(--portal-surface-raised);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.portal-shell .hospital-search-group h3 {
  color: var(--portal-text);
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
}

.portal-shell .hospital-search-result {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: inherit;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  position: relative;
  text-decoration: none;
  z-index: 1;
}

.portal-shell .hospital-search-result:hover,
.portal-shell .hospital-search-result:focus-visible {
  border-color: var(--portal-line-strong);
  box-shadow: 0 8px 18px rgba(19, 36, 31, .08);
}

.portal-shell .hospital-search-result strong,
.portal-shell .hospital-search-result span,
.portal-shell .hospital-search-result em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.portal-shell .hospital-search-result strong {
  color: var(--portal-text);
  font-size: 13px;
  line-height: 1.25;
}

.portal-shell .hospital-search-result span,
.portal-shell .hospital-search-result em {
  color: var(--portal-muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
}

.portal-shell .vms-topbar-actions,
.portal-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portal-sidebar,
.portal-shell .vms-tabs {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 10px 24px rgba(19, 36, 31, .06);
  margin: 0 auto 16px;
  max-width: var(--portal-shell-max);
  padding: 10px;
}

.portal-sidebar-toggle {
  align-items: center;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-accent-ink);
  display: none;
  font: inherit;
  font-weight: 850;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
}

.portal-sidebar-identity {
  border-bottom: 1px solid var(--portal-line);
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 2px 2px 10px;
}

.portal-sidebar-org {
  display: grid;
  gap: 2px;
}

.portal-sidebar-org strong {
  color: var(--portal-text);
  font-size: 13px;
}

.portal-sidebar-org span {
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-shell .vms-tabs .portal-sidebar-home {
  justify-content: center;
  width: 100%;
}

.portal-shell .vms-tabs > div {
  gap: 6px;
}

.portal-shell .vms-tabs strong {
  color: var(--portal-muted);
}

.portal-shell .vms-tabs a,
.portal-tab {
  align-items: center;
  border-radius: var(--portal-radius-sm);
  color: var(--portal-muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 750;
  min-height: 36px;
  padding: 8px 10px;
}

.portal-shell .vms-tabs a.active,
.portal-shell .vms-tabs a[aria-current="page"],
.portal-tab.is-active {
  background: var(--portal-accent-soft);
  color: var(--portal-accent-ink);
}

.portal-workspace,
.portal-app,
.portal-shell .vms-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  margin: 0 auto;
  max-width: var(--portal-shell-max);
}

.portal-shell .vms-layout--focus {
  grid-template-columns: minmax(0, 1fr);
}

.portal-main,
.portal-shell .vms-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.portal-rail,
.portal-shell .vms-activity {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.portal-page-header,
.portal-shell .portal-page-filter-header {
  background: linear-gradient(180deg, var(--portal-surface), var(--portal-surface-raised));
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 12px 28px rgba(19, 36, 31, .06);
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.portal-page-header__top,
.portal-shell .portal-page-filter-top {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.portal-page-header__breadcrumbs {
  align-items: center;
  color: var(--portal-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
}

.portal-page-header__breadcrumbs a {
  color: var(--portal-accent);
  text-decoration: none;
}

.portal-page-header__breadcrumbs a:hover,
.portal-page-header__breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.portal-page-header__copy,
.portal-shell .portal-page-filter-copy {
  min-width: 0;
}

.portal-page-header__copy > span,
.portal-shell .portal-page-filter-copy > span,
.portal-kicker {
  color: var(--portal-accent);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portal-page-header h1,
.portal-page-header h2,
.portal-shell .portal-page-filter-copy h2 {
  color: var(--portal-text);
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.12;
  margin: 3px 0 4px;
}

.portal-page-header p,
.portal-shell .portal-page-filter-copy p {
  color: var(--portal-muted);
  margin: 0;
  max-width: 72ch;
}

.portal-page-header__summary,
.portal-shell .portal-page-filter-summary {
  background: var(--portal-accent-soft);
  border: 1px solid color-mix(in srgb, var(--portal-accent) 24%, var(--portal-line));
  border-radius: var(--portal-radius);
  color: var(--portal-accent-ink);
  display: grid;
  gap: 2px;
  min-width: 126px;
  padding: 10px 12px;
}

.portal-page-header__summary span,
.portal-shell .portal-page-filter-summary span {
  color: var(--portal-accent-ink);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-page-header__summary strong,
.portal-shell .portal-page-filter-summary strong {
  font-size: 24px;
  line-height: 1;
}

.portal-page-header__summary em,
.portal-shell .portal-page-filter-summary em {
  color: var(--portal-muted);
  font-size: 12px;
  font-style: normal;
}

.portal-page-header__actions,
.portal-shell .portal-page-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portal-filter-bar,
.portal-shell .portal-filter-strip,
.portal-shell .queue-control-bar,
.portal-shell .message-work-filters {
  align-items: center;
  background: var(--portal-surface-muted);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
}

.portal-filter-chip,
.portal-shell .portal-filter-chip,
.portal-shell .message-work-filters a {
  align-items: center;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-muted);
  display: inline-flex;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
}

.portal-filter-chip strong,
.portal-shell .portal-filter-chip strong {
  color: var(--portal-text);
}

.portal-work-scope {
  display: grid;
  gap: 8px;
}

.portal-work-scope-more {
  color: var(--portal-muted);
  font-size: 13px;
}

.portal-work-scope-more summary {
  cursor: pointer;
  font-weight: 800;
  width: max-content;
}

.portal-work-scope-more > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.portal-filter-chip.is-active,
.portal-shell .portal-filter-chip.is-active,
.portal-shell .message-work-filters a.active {
  background: var(--portal-accent-soft);
  border-color: color-mix(in srgb, var(--portal-accent) 38%, var(--portal-line));
  color: var(--portal-accent-ink);
}

.portal-filter-chip.needs-action,
.portal-shell .portal-filter-chip.needs-action {
  border-color: color-mix(in srgb, var(--portal-warning) 42%, var(--portal-line));
}

.portal-filter-toolbar {
  align-items: end;
  background: var(--portal-surface-muted);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(220px, 1.6fr) auto minmax(150px, .75fr) minmax(130px, .6fr) auto;
  margin-bottom: 12px;
  padding: 8px;
}

.portal-filter-toolbar label,
.portal-filter-drawer label {
  display: grid;
  gap: 5px;
}

.portal-filter-toolbar span,
.portal-filter-drawer span {
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 850;
}

.portal-filter-toolbar input,
.portal-filter-toolbar select,
.portal-filter-drawer input,
.portal-filter-drawer select {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-text);
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
}

.portal-filter-drawer {
  position: relative;
}

.portal-filter-drawer summary {
  align-items: center;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-text);
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
}

.portal-filter-drawer summary::-webkit-details-marker {
  display: none;
}

.portal-filter-drawer summary strong {
  align-items: center;
  background: var(--portal-accent-soft);
  border-radius: 999px;
  color: var(--portal-accent-ink);
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-width: 24px;
  padding: 2px 7px;
}

.portal-filter-drawer-grid {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  left: 0;
  min-width: min(720px, 86vw);
  padding: 12px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 20;
}

.portal-filter-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
}

.portal-filter-active-chips span {
  background: var(--portal-accent-soft);
  border-radius: 999px;
  color: var(--portal-accent-ink);
  display: inline-flex;
  gap: 5px;
  padding: 5px 8px;
}

.portal-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.portal-filter-toolbar > p {
  color: var(--portal-muted);
  font-size: 12px;
  grid-column: 1 / -1;
  margin: 0;
}

.portal-record-table-wrap {
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  overflow: auto;
}

.portal-record-table {
  background: var(--portal-surface);
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.portal-record-table th,
.portal-record-table td {
  border-bottom: 1px solid var(--portal-line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.portal-record-table th {
  background: var(--portal-surface-muted);
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-detail-header {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 12px 28px rgba(19, 36, 31, .06);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.portal-detail-header__main {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.portal-detail-header h2 {
  color: var(--portal-text);
  font-size: 24px;
  line-height: 1.15;
  margin: 2px 0 4px;
}

.portal-detail-header p {
  color: var(--portal-muted);
  margin: 0;
}

.portal-detail-header__actions,
.portal-detail-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-detail-more {
  position: relative;
}

.portal-detail-more summary {
  align-items: center;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-accent-ink);
  cursor: pointer;
  display: inline-flex;
  min-height: 40px;
  padding: 8px 10px;
}

.portal-detail-more div {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  display: grid;
  gap: 2px;
  min-width: 180px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 25;
}

.portal-detail-more a,
.portal-detail-tabs a {
  border-radius: var(--portal-radius-sm);
  color: var(--portal-accent-ink);
  font-size: 13px;
  font-weight: 850;
  min-height: 40px;
  padding: 8px 10px;
  text-decoration: none;
}

.portal-detail-tabs a {
  border: 1px solid var(--portal-line);
}

.portal-detail-tabs a.active,
.portal-detail-tabs a[aria-current="page"] {
  background: var(--portal-accent-soft);
  border-color: color-mix(in srgb, var(--portal-accent) 38%, var(--portal-line));
}

.portal-detail-header__meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin: 0;
}

.portal-detail-header__meta div {
  background: var(--portal-surface-muted);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  padding: 9px 10px;
}

.portal-detail-header__meta dt {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-detail-header__meta dd {
  color: var(--portal-text);
  font-weight: 750;
  margin: 3px 0 0;
}

.portal-activity-timeline {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-activity-timeline li {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px;
}

.portal-activity-timeline strong {
  color: var(--portal-text);
  display: block;
}

.portal-activity-timeline p,
.portal-activity-timeline time {
  color: var(--portal-muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.finance-match-panel {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.finance-match-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.finance-match-grid span {
  color: var(--portal-muted);
  display: grid;
  font-size: 12px;
  gap: 2px;
}

.finance-match-grid strong {
  color: var(--portal-text);
  font-size: 16px;
}

.portal-record-table td {
  color: var(--portal-text);
  font-size: 14px;
}

.portal-record-table tr:last-child td {
  border-bottom: 0;
}

.portal-table-primary {
  display: grid;
  gap: 3px;
}

.portal-table-primary strong {
  color: var(--portal-text);
}

.portal-table-primary span,
.portal-table-muted {
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-record-card-compact {
  align-items: start;
  gap: 12px;
  padding: 12px;
}

.portal-record-card-compact .candidate-meta-grid {
  margin-top: 8px;
}

.portal-record-card-compact p {
  max-width: 72ch;
}

.portal-status,
.portal-shell .vms-status-pill {
  align-items: center;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  line-height: 1;
  min-height: 28px;
  padding: 7px 10px;
  white-space: nowrap;
}

.portal-status.status-green,
.portal-shell .vms-status-pill.status-green {
  background: var(--portal-success-soft);
  border-color: color-mix(in srgb, var(--portal-success) 32%, var(--portal-line));
  color: var(--portal-success);
}

.portal-status.status-blue,
.portal-shell .vms-status-pill.status-blue {
  background: var(--portal-info-soft);
  border-color: color-mix(in srgb, var(--portal-info) 32%, var(--portal-line));
  color: var(--portal-info);
}

.portal-status.status-yellow,
.portal-shell .vms-status-pill.status-yellow {
  background: var(--portal-warning-soft);
  border-color: color-mix(in srgb, var(--portal-warning) 36%, var(--portal-line));
  color: #75500c;
}

.portal-status.status-red,
.portal-shell .vms-status-pill.status-red {
  background: var(--portal-danger-soft);
  border-color: color-mix(in srgb, var(--portal-danger) 34%, var(--portal-line));
  color: var(--portal-danger);
}

.portal-status.status-muted,
.portal-shell .vms-status-pill.status-muted {
  background: #eef2f0;
  color: var(--portal-muted);
}

.portal-card,
.portal-shell .vms-panel,
.portal-shell .vms-record-card,
.portal-shell .credential-record-card,
.portal-shell .provider-queue-item,
.portal-shell .candidate-review-card,
.portal-shell .vendor-submission-card,
.portal-shell .assignment-command-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 10px 24px rgba(19, 36, 31, .05);
  color: var(--portal-text);
}

.portal-shell .vms-panel,
.portal-shell .vms-record-card {
  padding: 14px;
}

.portal-card:hover,
.portal-shell .vms-record-card:hover {
  border-color: var(--portal-line-strong);
}

.portal-record-card {
  align-items: start;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 10px 24px rgba(19, 36, 31, .05);
  color: var(--portal-text);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.portal-record-card:hover {
  border-color: var(--portal-line-strong);
}

.portal-record-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.portal-record-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-record-card h3 {
  color: var(--portal-text);
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  overflow-wrap: break-word;
}

.portal-record-card p,
.portal-record-next {
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.portal-record-next {
  color: var(--portal-text);
  display: block;
  font-weight: 800;
}

.portal-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
}

.portal-record-meta div {
  align-items: baseline;
  display: inline-flex;
  gap: 4px;
}

.portal-record-meta dt {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-record-meta dd {
  color: var(--portal-text);
  font-size: 12px;
  font-weight: 750;
  margin: 0;
}

.portal-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portal-record-actions .button {
  white-space: nowrap;
}

.portal-detail-header,
.portal-shell .hospital-record-header,
.portal-shell .vendor-record-header {
  background: var(--portal-surface-raised);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  padding: 14px;
}

.portal-table,
.portal-shell .vms-panel table,
.portal-shell .dash-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.portal-table th,
.portal-table td,
.portal-shell .vms-panel table th,
.portal-shell .vms-panel table td,
.portal-shell .dash-table th,
.portal-shell .dash-table td {
  border-bottom: 1px solid var(--portal-line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.portal-table th,
.portal-shell .vms-panel table th,
.portal-shell .dash-table th {
  background: var(--portal-surface-muted);
  color: var(--portal-muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-form,
.portal-shell .compact-form,
.portal-shell .intake-form.compact-form {
  display: grid;
  gap: 12px;
}

.portal-form label,
.portal-shell .vms-panel form label {
  color: var(--portal-text);
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 6px;
}

.portal-form input,
.portal-form select,
.portal-form textarea,
.portal-shell .vms-panel form input,
.portal-shell .vms-panel form select,
.portal-shell .vms-panel form textarea {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-text);
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

.portal-drawer,
.portal-shell .document-action-drawer,
.portal-shell .vendor-finance-submit-drawer,
.portal-shell .vendor-provider-drawer,
.portal-shell .candidate-card-drawer {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: 0 10px 24px rgba(19, 36, 31, .05);
}

.portal-drawer > summary,
.portal-shell .document-action-drawer > summary,
.portal-shell .vendor-finance-submit-drawer > summary,
.portal-shell .vendor-provider-drawer > summary,
.portal-shell .candidate-card-drawer > summary {
  border-radius: var(--portal-radius);
  cursor: pointer;
  list-style: none;
  padding: 12px;
}

.portal-drawer[open] > summary,
.portal-shell .document-action-drawer[open] > summary,
.portal-shell .vendor-finance-submit-drawer[open] > summary,
.portal-shell .vendor-provider-drawer[open] > summary,
.portal-shell .candidate-card-drawer[open] > summary {
  border-bottom: 1px solid var(--portal-line);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.portal-modal,
.portal-shell .lf-confirm-modal,
.portal-shell [data-confirm-modal] {
  backdrop-filter: blur(10px);
}

.portal-empty,
.portal-shell .vms-empty,
.portal-shell .portal-empty-state,
.portal-shell .message-work-empty,
.portal-shell .notification-work-empty,
.portal-shell .packet-exception-empty,
.portal-shell .today-focus-empty,
.portal-shell .work-session-empty {
  background: var(--portal-surface);
  border: 1px dashed var(--portal-line-strong);
  border-radius: var(--portal-radius);
  color: var(--portal-muted);
  padding: 18px;
}

.portal-empty strong,
.portal-shell .portal-empty-state strong,
.portal-shell .vms-empty strong {
  color: var(--portal-text);
}

.portal-toast,
.portal-shell .toast-message,
.portal-shell .Toastify__toast,
.portal-shell .toastify {
  background: var(--portal-text);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  color: #ffffff;
}

.portal-shell .toast-message.is-error {
  background: var(--portal-danger);
}

.portal-timeline,
.portal-shell .timeline,
.portal-shell .assignment-timeline ol,
.portal-shell .assignment-readiness-timeline {
  border-color: var(--portal-line);
}

.portal-timeline article,
.portal-shell .timeline article,
.portal-shell .assignment-timeline li {
  border-color: var(--portal-line);
}

.portal-pagination,
.portal-shell .queue-pagination {
  align-items: center;
  border-top: 1px solid var(--portal-line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 12px;
}

.portal-shell .button,
.portal-shell button,
.portal-shell a,
.portal-shell input,
.portal-shell select,
.portal-shell textarea,
.portal-shell summary,
.portal-shell [tabindex]:not([tabindex="-1"]) {
  outline-offset: 2px;
}

.portal-shell :is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  box-shadow: var(--portal-focus);
  outline: 2px solid var(--portal-info);
}

.portal-shell .provider-cv-summary {
  align-items: flex-start;
  background: var(--portal-surface-muted);
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin: 12px 0;
  padding: 14px;
}

.portal-shell .provider-cv-summary strong,
.portal-shell .provider-cv-summary span {
  display: block;
}

.portal-shell .provider-cv-summary p {
  color: var(--portal-muted);
  margin: 4px 0 0;
}

.portal-shell .provider-cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portal-shell .provider-cv-lifecycle {
  margin: 0 0 12px;
}

.portal-shell .provider-cv-replace {
  border-top: 1px solid var(--portal-line);
  margin-top: 12px;
  padding-top: 12px;
}

.portal-shell .provider-cv-replace > summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-shell .provider-cv-replace > summary::marker {
  content: "";
}

.portal-shell .provider-cv-replace > summary::-webkit-details-marker {
  display: none;
}

.portal-shell .provider-cv-replace > summary em {
  color: var(--portal-muted);
  font-style: normal;
}

.portal-shell .provider-cv-replace[open] .provider-cv-upload-form {
  margin-top: 12px;
}

.portal-shell .button {
  border-radius: var(--portal-radius-sm);
  min-height: 38px;
}

.portal-shell .button.dark,
.portal-shell .button.primary {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #ffffff;
}

.portal-shell .button.dark:hover,
.portal-shell .button.dark:focus-visible,
.portal-shell .button.primary:hover,
.portal-shell .button.primary:focus-visible {
  background: var(--portal-accent-ink);
  border-color: var(--portal-accent-ink);
}

.portal-shell .button.ghost,
.portal-shell .button.secondary,
.portal-shell .button.text {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  color: var(--portal-accent-ink);
}

.portal-shell a:focus-visible,
.portal-shell button:focus-visible,
.portal-shell input:focus-visible,
.portal-shell select:focus-visible,
.portal-shell textarea:focus-visible,
.portal-shell summary:focus-visible {
  box-shadow: var(--portal-focus);
  outline: 2px solid transparent;
}

.portal-shell button,
.portal-shell .button,
.portal-shell input,
.portal-shell select,
.portal-shell textarea,
.portal-shell summary {
  min-height: 44px;
}

/* Vendor shell overlap hotfix v2: explicit shell grid beats older fixed/sidebar rules. */
.vendor-vms.portal-shell:not(.admin-vms) {
  --vendor-shell-sidebar: 284px;
  --vendor-shell-topbar: 96px;
  display: grid;
  grid-template-columns: var(--vendor-shell-sidebar) minmax(0, 1fr);
  grid-template-areas:
    "topbar topbar"
    "search search"
    "notice notice"
    "nav content";
  align-items: start;
  gap: 18px 20px;
  padding: 24px clamp(16px, 2vw, 28px) 44px;
}

.vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar {
  grid-area: topbar;
  display: grid;
  grid-template-columns: auto minmax(160px, 240px) minmax(0, 1fr) auto;
  width: 100%;
  max-width: none;
  min-height: var(--vendor-shell-topbar);
  margin: 0;
  position: sticky;
  top: 0;
  z-index: 45;
}

.vendor-vms.portal-shell:not(.admin-vms) > .hospital-search-results,
.vendor-vms.portal-shell:not(.admin-vms) > .alert {
  grid-column: 1 / -1;
  margin: 0;
}

.vendor-vms.portal-shell:not(.admin-vms) > .hospital-search-results {
  grid-area: search;
  max-width: none;
}

.vendor-vms.portal-shell:not(.admin-vms) > .portal-shell-nav {
  grid-area: nav;
  bottom: auto;
  left: auto;
  position: sticky;
  right: auto;
  top: calc(var(--vendor-shell-topbar) + 18px);
  width: auto;
  max-width: none;
  height: calc(100vh - var(--vendor-shell-topbar) - 42px);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 4;
}

.vendor-vms.portal-shell:not(.admin-vms) > .vms-layout {
  grid-area: content;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.vendor-vms.portal-shell:not(.admin-vms) .vendor-global-search,
.vendor-vms.portal-shell:not(.admin-vms) .provider-global-search {
  min-width: 0;
  max-width: none;
}

.portal-shell--provider > .vms-topbar {
  grid-template-columns: auto minmax(180px, 260px) minmax(280px, 1fr) auto;
}

.portal-shell--provider .provider-workspace-identity strong {
  display: block;
}

.portal-shell--provider .provider-account-menu {
  justify-self: end;
  position: relative;
}

.portal-shell--provider .portal-actions .provider-account-menu {
  display: inline-flex;
}

.portal-shell--provider .provider-account-menu summary {
  align-items: center;
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius-sm);
  color: var(--portal-accent-ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
}

.portal-shell--provider .provider-account-menu summary::-webkit-details-marker {
  display: none;
}

.portal-shell--provider .provider-account-menu summary::after {
  content: "\\25be";
  font-size: 12px;
  line-height: 1;
}

.portal-shell--provider .provider-account-menu > div {
  background: var(--portal-surface);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
}

.portal-shell--provider .provider-account-menu a {
  border-radius: var(--portal-radius-sm);
  color: var(--portal-muted);
  font-size: 13px;
  font-weight: 750;
  padding: 9px 10px;
  text-decoration: none;
}

.portal-shell--provider .provider-account-menu a.active,
.portal-shell--provider .provider-account-menu a:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent-ink);
}

.portal-shell--provider .provider-task-dashboard {
  overflow: visible;
}

.portal-shell--provider .provider-dashboard-sections {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.portal-shell--provider .provider-dashboard-section {
  align-content: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100%;
  min-width: 0;
}

.portal-shell--provider .provider-dashboard-section > .vms-status-pill {
  grid-column: auto;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.portal-shell--provider .provider-dashboard-section > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.portal-shell--provider .provider-dashboard-section h3,
.portal-shell--provider .provider-dashboard-section strong,
.portal-shell--provider .provider-dashboard-section p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.portal-shell--provider .provider-dashboard-section strong {
  line-height: 1.2;
}

.portal-shell--provider .provider-dashboard-section .button {
  justify-self: start;
  margin-top: auto;
  max-width: 100%;
  white-space: normal;
}

.portal-shell--provider .provider-readiness-breakdown {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.vendor-vms.portal-shell:not(.admin-vms) .communication-hub-head,
.vendor-vms.portal-shell:not(.admin-vms) .communication-hub-summary,
.vendor-vms.portal-shell:not(.admin-vms) .communication-route-grid,
.vendor-vms.portal-shell:not(.admin-vms) .message-work-filters {
  min-width: 0;
}

.vendor-vms.portal-shell:not(.admin-vms) .communication-hub-summary,
.vendor-vms.portal-shell:not(.admin-vms) .communication-route-grid {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.vendor-vms.portal-shell:not(.admin-vms) .message-work-filters {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

body:has(> .vendor-vms.portal-shell:not(.admin-vms)) .site-footer {
  margin-left: 0;
}

@media (max-width: 900px) {
  .portal-filter-toolbar {
    grid-template-columns: 1fr;
  }

  .portal-filter-actions {
    justify-content: flex-start;
  }

  .portal-filter-drawer-grid {
    grid-template-columns: 1fr;
    margin-top: 8px;
    min-width: 100%;
    position: static;
  }
}

@media (max-width: 1180px) {
  .vendor-vms.portal-shell:not(.admin-vms) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "topbar"
      "search"
      "nav"
      "notice"
      "content";
  }

  .vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar .vendor-global-search,
  .vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar .provider-global-search,
  .vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar .vms-topbar-actions {
    grid-column: 1 / -1;
  }

  .vendor-vms.portal-shell:not(.admin-vms) > .portal-shell-nav {
    position: sticky;
    top: 0;
    display: flex;
    width: 100%;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
  }
}

@media (max-width: 760px) {
  .vendor-vms.portal-shell:not(.admin-vms) {
    gap: 14px;
    padding: 12px 10px 28px;
  }

  .vendor-vms.portal-shell:not(.admin-vms) > .vms-topbar {
    grid-template-columns: 1fr;
  }

  .vendor-vms.portal-shell:not(.admin-vms) .communication-hub-head,
  .vendor-vms.portal-shell:not(.admin-vms) .communication-hub-summary,
  .vendor-vms.portal-shell:not(.admin-vms) .communication-route-grid,
  .vendor-vms.portal-shell:not(.admin-vms) .message-work-filters,
  .vendor-vms.portal-shell:not(.admin-vms) .message-work-item {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 1080px) {
  .portal-shell,
  .vendor-vms.portal-shell {
    padding-inline: 12px;
  }

  .portal-topbar,
  .portal-shell .vms-topbar {
    top: 12px;
  }

  .portal-app,
  .portal-shell .vms-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-page-header__top,
  .portal-shell .portal-page-filter-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-page-header__actions,
  .portal-shell .portal-page-filter-actions,
  .portal-shell .vms-topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .portal-shell,
  .vendor-vms.portal-shell {
    padding: 12px 10px 28px;
  }

  .portal-topbar,
  .portal-shell .vms-topbar {
    display: grid;
    gap: 10px;
    position: static;
  }

  .portal-shell .hospital-global-search,
  .portal-shell .vms-topbar-actions {
    max-width: none;
    width: 100%;
  }

  .portal-shell .hospital-global-search {
    display: grid;
  }

  .portal-sidebar,
  .portal-shell .vms-tabs,
  .portal-filter-bar,
  .portal-shell .portal-filter-strip,
  .portal-shell .queue-control-bar {
    overflow-x: auto;
    padding: 8px;
  }

  .portal-shell .vms-tabs > div,
  .portal-filter-bar,
  .portal-shell .portal-filter-strip {
    flex-wrap: nowrap;
  }

  .portal-shell .vms-tabs a,
  .portal-filter-chip,
  .portal-shell .portal-filter-chip {
    flex: 0 0 auto;
  }

  .portal-sidebar-toggle {
    display: inline-flex;
    width: max-content;
  }

  .portal-shell .portal-sidebar[data-portal-sidebar-drawer],
  .vendor-vms.portal-shell:not(.admin-vms) > .portal-shell-nav[data-portal-sidebar-drawer] {
    bottom: 0;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .24);
    display: block;
    height: 100vh;
    left: 0;
    margin: 0;
    max-width: min(88vw, 340px);
    overflow-y: auto;
    padding: 14px;
    position: fixed;
    top: 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    width: min(88vw, 340px);
    z-index: 80;
  }

  body.portal-sidebar-open::after {
    background: rgba(15, 23, 42, .35);
    content: "";
    inset: 0;
    position: fixed;
    z-index: 70;
  }

  body.portal-sidebar-open .portal-sidebar[data-portal-sidebar-drawer],
  body.portal-sidebar-open .vendor-vms.portal-shell:not(.admin-vms) > .portal-shell-nav[data-portal-sidebar-drawer] {
    transform: translateX(0);
  }

  .portal-shell .vms-tabs > div,
  .portal-shell .vms-tabs .vms-nav-items,
  .portal-filter-bar,
  .portal-shell .portal-filter-strip {
    flex-wrap: wrap;
  }

  .portal-detail-header__main,
  .portal-detail-header__meta,
  .finance-match-grid {
    grid-template-columns: 1fr;
  }

  .portal-detail-header__actions {
    bottom: 10px;
    position: sticky;
    z-index: 18;
  }

  .portal-record-table-wrap {
    border: 0;
    overflow: visible;
  }

  .portal-record-table {
    min-width: 0;
  }

  .portal-record-table thead {
    display: none;
  }

  .portal-record-table,
  .portal-record-table tbody,
  .portal-record-table tr,
  .portal-record-table td {
    display: block;
    width: 100%;
  }

  .portal-record-table tr {
    background: var(--portal-surface);
    border: 1px solid var(--portal-line);
    border-radius: var(--portal-radius);
    margin-bottom: 10px;
    padding: 8px;
  }

  .portal-record-table td {
    border-bottom: 1px solid var(--portal-line);
    padding: 8px 4px;
  }

  .portal-record-table td:last-child {
    border-bottom: 0;
  }

  .portal-card,
  .portal-shell .vms-panel,
  .portal-shell .vms-record-card {
    padding: 12px;
  }

  .portal-table,
  .portal-shell .vms-panel table,
  .portal-shell .dash-table {
    min-width: 640px;
  }
}
