:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #151a21;
  --muted: #65717e;
  --line: #dfe4ea;
  --blue: #0f4c81;
  --blue-dark: #0b365e;
  --red-brand: #b31621;
  --red-dark: #7d1118;
  --charcoal: #20252c;
  --text: var(--ink);
  --brand: var(--red-brand);
  --green: #198754;
  --amber: #b7791f;
  --red: #c2413b;
}

.section-heading {
  color: var(--charcoal);
  font-size: 20px;
  margin: 30px 0 12px;
}

.segmented-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented-options .check-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 52px;
  padding: 12px 14px;
}

.material-manifest-editor table,
.material-progress + .detail-grid .table-wrap table {
  min-width: 820px;
}

.material-manifest-editor input,
.material-manifest-editor select {
  min-width: 120px;
}

.material-related {
  align-content: start;
  grid-template-columns: 1fr;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 3px solid var(--red-brand);
  box-shadow: 0 8px 24px rgba(21, 26, 33, 0.06);
  display: grid;
  gap: 0;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.global-header {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 240px) minmax(240px, 1fr) max-content;
  min-height: 68px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 14px;
  min-width: 0;
}

.brand img {
  display: block;
  height: 42px;
  max-width: 160px;
  object-fit: contain;
}

.brand small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.global-actions,
.app-nav {
  align-items: center;
  display: flex;
  font-size: 14px;
  gap: 10px;
}

.global-actions {
  gap: 8px;
  justify-content: flex-end;
  min-width: max-content;
  white-space: nowrap;
}

.app-nav {
  flex: 1 1 auto;
  overflow: visible;
  white-space: nowrap;
}

.global-actions span,
.app-nav span {
  color: var(--muted);
}

.global-actions a,
.app-nav a {
  color: var(--charcoal);
  font-weight: 700;
}

.global-actions a:hover,
.app-nav a:hover {
  color: var(--red-brand);
}

.application-header {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  min-height: 48px;
  overflow: visible;
}

.app-nav a,
.compact-action,
.workflow-pill,
.app-nav-menu summary {
  border-radius: 999px;
  padding: 8px 10px;
}

.app-nav a:hover,
.compact-action:hover,
.app-nav-menu summary:hover {
  background: #f4f6f8;
  text-decoration: none;
}

.app-nav a[aria-current="page"] {
  background: #f4f6f8;
  color: var(--red-brand);
}

.app-nav-menu {
  position: relative;
}

.app-nav-menu summary {
  color: var(--charcoal);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.app-nav-menu summary::-webkit-details-marker {
  display: none;
}

.app-nav-menu summary::after {
  color: var(--muted);
  content: "v";
  font-size: 10px;
  margin-left: 6px;
}

.app-nav-menu-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(21, 26, 33, 0.16);
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.app-nav-menu-panel a {
  border-radius: 6px;
  display: block;
  padding: 9px 10px;
}

.workflow-pill {
  align-items: center;
  background: var(--blue);
  color: #ffffff !important;
  display: inline-flex;
  gap: 6px;
}

.workflow-pill:hover {
  background: var(--blue-dark);
  text-decoration: none;
}

.user-menu {
  position: relative;
}

.user-menu summary {
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  max-width: 210px;
  overflow: hidden;
  padding: 8px 12px;
  text-overflow: ellipsis;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(21, 26, 33, 0.16);
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
}

.user-menu-panel p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 4px;
  padding: 6px 8px;
}

.user-menu-panel a {
  border-radius: 6px;
  padding: 8px;
}

.global-search-form {
  align-items: center;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  justify-self: stretch;
  min-width: 0;
  padding: 4px 6px 4px 12px;
  width: 100%;
}

.global-search-form input {
  background: transparent;
  border: 0;
  font-size: 13px;
  outline: 0;
  width: 100%;
}

.global-search-form button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.global-search-form svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px;
}

.release-footer {
  color: var(--muted);
  font-size: 12px;
  margin: 0 auto 24px;
  max-width: 1180px;
  padding: 0 32px;
  text-align: right;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 28px auto;
  max-width: 720px;
  min-height: calc(100vh - 210px);
  padding: clamp(14px, 3vw, 28px);
  position: relative;
}

.login-shell::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 249, 252, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(15, 76, 129, 0.08), transparent 34%);
  border-radius: 10px;
  content: "";
  inset: 0;
  position: absolute;
}

.login-shell-single {
  max-width: 680px;
  place-items: center;
}

.login-product-panel,
.login-panel {
  position: relative;
}

.login-product-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--text);
  display: grid;
  gap: 16px;
  justify-items: center;
  min-height: auto;
  padding: 18px 10px 4px;
  text-align: center;
}

.login-product-brand {
  align-items: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.login-product-brand img {
  height: 62px;
  max-width: 260px;
  object-fit: contain;
}

.login-product-brand span {
  background: #fff5f6;
  border: 1px solid rgba(179, 22, 33, 0.18);
  border-radius: 999px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  text-transform: uppercase;
}

.login-product-panel .eyebrow {
  color: var(--brand);
  margin-top: 8px;
}

.login-product-panel h1 {
  color: var(--text);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  margin: 0;
  max-width: 720px;
}

.login-product-panel p:not(.eyebrow) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 680px;
}

.login-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(24, 34, 48, 0.08);
  align-content: center;
  display: grid;
  gap: 18px;
  justify-self: center;
  min-height: auto;
  padding: clamp(24px, 4vw, 36px);
  width: 100%;
  max-width: 500px;
}

.login-panel-single {
  max-width: 560px;
}

.login-brand-block {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.login-brand-block h1 {
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.08;
  margin-bottom: 0;
}

.login-brand-block .muted {
  line-height: 1.45;
  margin: 0;
  max-width: 420px;
}

.login-portal-mark {
  align-items: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 4px;
}

.login-portal-mark img {
  height: 46px;
  max-width: 210px;
  object-fit: contain;
}

.login-portal-mark span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  text-transform: uppercase;
}

.hiveone-icon {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(24, 34, 48, 0.12);
  display: inline-flex;
  height: 68px;
  justify-content: center;
  position: relative;
  width: 68px;
}

.hiveone-icon img {
  display: block;
  height: 48px;
  object-fit: contain;
  width: 48px;
}

.hiveone-icon span {
  align-items: center;
  background: var(--blue);
  border: 2px solid #ffffff;
  border-radius: 999px;
  bottom: -6px;
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: -6px;
  width: 26px;
}

.login-hiveone-icon {
  margin-bottom: 4px;
}

.login-choice-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.sso-button {
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.microsoft-mark {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  height: 16px;
  width: 16px;
}

.microsoft-mark i {
  display: block;
}

.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }

.email-login-fields {
  display: grid;
  gap: 14px;
}

.login-secondary-action {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.login-secondary-action .button {
  justify-content: center;
  width: 100%;
}

.button.disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.portal-choice {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: 0;
}

.app-launcher-panel {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1100px;
  width: min(1100px, 100%);
}

.app-launcher-grid {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}

.app-tile {
  min-height: 138px;
}

.launcher-group {
  display: grid;
  gap: 10px;
}

.launcher-group-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.launcher-group-heading h2 {
  color: var(--charcoal);
  font-size: 16px;
  margin: 0;
}

.app-tile-disabled {
  color: #6f7782;
  cursor: default;
  opacity: 1;
}

.app-tile-disabled .portal-icon {
  background: #eef2f6;
  box-shadow: none;
}

.future-badge circle {
  fill: #8d96a0;
}

.search-shell {
  display: grid;
  gap: 20px;
}

.search-panel {
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) auto;
  padding: 18px;
}

.search-panel label {
  display: grid;
  gap: 8px;
}

.search-panel label span {
  font-size: 12px;
  font-weight: 800;
}

.search-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.scope-chip {
  align-items: center;
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex !important;
  gap: 6px !important;
  padding: 7px 10px;
}

.scope-chip span {
  color: var(--charcoal);
  font-size: 12px;
}

.search-results {
  display: grid;
  gap: 12px;
}

.crm-lookup {
  align-items: start;
}

.crm-field {
  min-width: 0;
  position: relative;
}

.crm-field > label {
  display: grid;
  gap: 6px;
}

.crm-assist {
  margin: 0;
  min-height: 20px;
}

.crm-error {
  color: #a3121b;
  font-weight: 700;
}

.crm-results {
  left: 0;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: grid;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(21, 32, 51, 0.1);
}

.crm-result {
  display: grid;
  gap: 0.2rem;
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 5px;
  color: #152033;
  background: #fff;
  text-align: left;
}

.crm-result-group {
  display: grid;
  gap: 6px;
}

.crm-result-group + .crm-result-group {
  border-top: 1px solid #d8dee8;
  margin-top: 2px;
  padding-top: 8px;
}

.crm-result-company {
  align-items: center;
  color: #152033;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 2px 4px;
}

.crm-result-company span {
  color: #5b6678;
  font-size: 11px;
  font-weight: 600;
}

.crm-result:hover,
.crm-result:focus-visible {
  border-color: #b71922;
}

.crm-result span {
  color: #5b6678;
  font-size: 0.86rem;
}

.result-summary {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  gap: 6px;
}

.result-summary strong {
  color: var(--charcoal);
  font-size: 22px;
}

.search-result-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.search-result-card h2 {
  font-size: 18px;
  margin: 0;
}

.search-result-card p {
  margin: 0;
}

.result-app {
  color: var(--red-brand);
  font-size: 12px;
  font-weight: 800;
  margin-right: 8px;
  text-transform: uppercase;
}

.live-update-notice {
  background: var(--blue);
  border: 0;
  border-radius: 999px;
  bottom: 24px;
  box-shadow: 0 14px 32px rgba(24, 34, 48, 0.22);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
  position: fixed;
  right: 24px;
  z-index: 40;
}

.live-update-notice:hover {
  background: var(--blue-dark);
}

.suite-stack {
  display: grid;
  gap: 14px;
}

.suite-card {
  background: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.suite-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr auto;
  list-style: none;
  padding: 16px;
}

.suite-summary::-webkit-details-marker {
  display: none;
}

.suite-summary:hover {
  background: #ffffff;
}

.core-summary {
  cursor: default;
}

.core-badge circle {
  fill: #0f4c81;
}

.suite-summary .portal-icon {
  filter: grayscale(1);
}

.core-summary .portal-icon {
  filter: none;
}

.suite-summary-copy {
  display: grid;
  gap: 2px;
}

.suite-summary-copy strong {
  color: var(--charcoal);
  font-size: 15px;
}

.suite-summary-copy span,
.suite-expand-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.suite-expand-label::after {
  content: "+";
  display: inline-block;
  font-size: 16px;
  margin-left: 8px;
}

.suite-card[open] .suite-expand-label::after {
  content: "-";
}

.suite-app-grid {
  border-width: 1px 0 0;
  border-radius: 0;
  padding: 16px;
}

.hiveone-shell {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1180px;
  min-height: calc(100vh - 168px);
  width: 100%;
}

.hiveone-hero {
  align-items: end;
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr auto;
}

.hiveone-heading {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.hiveone-heading h1 {
  margin-bottom: 2px;
}

.launcher-summary {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.launcher-summary span {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.launcher-summary strong {
  color: var(--ink);
  margin-right: 4px;
}

.portal-option {
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 14px;
  grid-template-columns: auto 1fr;
  font-size: 13px;
  font-weight: 700;
  min-height: 132px;
  padding: 16px;
  text-align: left;
}

.portal-option input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.portal-option.active {
  background: #ffffff;
  border-color: rgba(179, 22, 33, 0.22);
  box-shadow: 0 10px 24px rgba(24, 34, 48, 0.08);
  color: var(--red-dark);
}

.portal-option:hover {
  background: #ffffff;
  border-color: rgba(15, 76, 129, 0.18);
  box-shadow: 0 12px 28px rgba(24, 34, 48, 0.08);
}

.portal-option-link:hover {
  text-decoration: none;
}

.portal-icon {
  align-items: center;
  background: linear-gradient(135deg, #17395e, #0f4c81);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(24, 34, 48, 0.12);
  display: inline-flex;
  flex: 0 0 auto;
  height: 54px;
  justify-content: center;
  position: relative;
  width: 54px;
}

.portal-mark {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: block;
  height: 18px;
  left: 10px;
  position: absolute;
  top: 10px;
  width: 18px;
}

.portal-initials {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  bottom: auto;
  color: #ffffff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  height: auto;
  justify-content: center;
  position: relative;
  right: auto;
  width: auto;
}

.portal-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.portal-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
}

.portal-description {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.portal-state {
  align-self: end;
  background: #eaf6ef;
  border: 1px solid #c8e8d3;
  border-radius: 999px;
  color: #11633b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-self: start;
  margin-top: 4px;
  padding: 4px 8px;
  text-transform: uppercase;
}

.app-tile-disabled .portal-state {
  background: #f1f3f5;
  border-color: #dce2e8;
  color: #65717e;
}

.app-tile-disabled .portal-name {
  color: #4f5965;
}

.portal-option.active .portal-icon {
  box-shadow: 0 0 0 3px rgba(179, 22, 33, 0.12), 0 12px 24px rgba(24, 34, 48, 0.14);
}

.portal-badge {
  bottom: -5px;
  color: #ffffff;
  height: 24px;
  position: absolute;
  right: -5px;
  stroke: currentColor;
  width: 24px;
}

.portal-badge circle {
  stroke: #ffffff;
  stroke-width: 2;
}

.portal-badge path {
  stroke: currentColor;
}

.portal-badge.voice-badge path {
  fill: currentColor;
  stroke: none;
}

.portal-badge.care-badge path {
  fill: currentColor;
  stroke: none;
}

.access-badge circle {
  fill: #19bca8;
}

.change-badge circle {
  fill: #8d3d78;
}

.voice-badge circle {
  fill: #f4a62a;
}

.care-badge circle {
  fill: #c43b46;
}

.nms-badge circle {
  fill: #0f4c81;
}

.portal-icon-access,
.app-kind-access .portal-icon {
  background: linear-gradient(135deg, #0f766e, #19bca8);
}

.portal-icon-service,
.portal-icon-care,
.app-kind-service .portal-icon,
.app-kind-care .portal-icon {
  background: linear-gradient(135deg, #8f1520, #d32632);
}

.portal-icon-workflow,
.app-kind-workflow .portal-icon {
  background: linear-gradient(135deg, #0b365e, #0f4c81);
}

.portal-icon-whistle,
.app-kind-whistle .portal-icon,
.app-kind-voice .portal-icon {
  background: linear-gradient(135deg, #b7791f, #f4a62a);
}

.portal-icon-compliance,
.app-kind-compliance .portal-icon {
  background: linear-gradient(135deg, #14532d, #256f52);
}

.portal-icon-docs,
.portal-icon-hivedocs,
.app-kind-hivedocs .portal-icon,
.app-kind-docs .portal-icon {
  background: linear-gradient(135deg, #4338ca, #6a5acd);
}

.portal-icon-risk,
.app-kind-risk .portal-icon {
  background: linear-gradient(135deg, #92400e, #b7791f);
}

.portal-icon-audit,
.app-kind-audit .portal-icon {
  background: linear-gradient(135deg, #20252c, #394150);
}

.portal-icon-assets,
.app-kind-assets .portal-icon {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.portal-icon-people,
.app-kind-people .portal-icon,
.app-kind-hr .portal-icon,
.app-kind-recruit .portal-icon,
.app-kind-onboard .portal-icon,
.app-kind-learn .portal-icon {
  background: linear-gradient(135deg, #7e2f6c, #b45391);
}

.portal-icon-vendor,
.app-kind-vendor .portal-icon,
.app-kind-contracts .portal-icon {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
}

.portal-icon-nms,
.app-kind-nms .portal-icon,
.app-kind-guard .portal-icon,
.app-kind-privacy .portal-icon,
.app-kind-bcp .portal-icon,
.app-kind-dr .portal-icon {
  background: linear-gradient(135deg, #0b365e, #0f4c81);
}

.app-kind-incident .portal-icon,
.app-kind-action .portal-icon,
.app-kind-projects .portal-icon,
.app-kind-meet .portal-icon,
.app-kind-ai .portal-icon,
.app-kind-portal .portal-icon {
  background: linear-gradient(135deg, #334155, #64748b);
}

.portal-tabs {
  display: flex;
  gap: 8px;
  margin: -10px 0 18px;
}

.portal-tabs a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--charcoal);
  font-weight: 700;
  padding: 10px 14px;
}

.portal-tabs a.active {
  background: var(--red-brand);
  border-color: var(--red-brand);
  color: white;
}

.hivenms-tabs {
  flex-wrap: wrap;
  margin-top: 0;
}

.hivenms-tabs a {
  min-width: 96px;
  text-align: center;
}

.app-switcher {
  flex: 0 0 auto;
  position: relative;
}

.app-switcher summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  list-style: none;
  min-width: 188px;
  padding: 8px 10px;
}

.app-switcher summary::-webkit-details-marker {
  display: none;
}

.app-switcher summary::after {
  color: var(--muted);
  content: "v";
  font-size: 10px;
  margin-left: auto;
}

.app-switcher-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-switcher-copy small,
.app-switcher-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-switcher-copy strong,
.app-switcher-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.app-switcher-icon {
  align-items: center;
  background: var(--blue);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 34px;
  font-size: 11px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.app-switcher-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(21, 26, 33, 0.16);
  display: grid;
  gap: 4px;
  left: 0;
  max-height: min(70vh, 520px);
  min-width: 290px;
  overflow-y: auto;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 35;
}

.app-switcher-item {
  align-items: center;
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px 1fr;
  padding: 9px;
}

.app-switcher-item:hover,
.app-switcher-item.active {
  background: #f4f6f8;
  text-decoration: none;
}

.app-switcher-item.active {
  box-shadow: inset 3px 0 0 var(--red-brand);
}

.app-switcher-icon.app-kind-access {
  background: #19bca8;
}

.app-switcher-icon.app-kind-service,
.app-switcher-icon.app-kind-care {
  background: var(--red-brand);
}

.app-switcher-icon.app-kind-whistle {
  background: #b7791f;
}

.app-switcher-icon.app-kind-compliance,
.app-switcher-icon.app-kind-risk,
.app-switcher-icon.app-kind-docs {
  background: #256f52;
}

.app-switcher-icon.app-kind-assets,
.app-switcher-icon.app-kind-audit {
  background: #6d3f8f;
}

.app-switcher-icon.app-kind-people,
.app-switcher-icon.app-kind-vendor {
  background: #155e75;
}

.app-switcher-icon.app-kind-guard,
.app-switcher-icon.app-kind-nms {
  background: var(--blue);
}

.signature-preview {
  align-items: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  min-height: 120px;
  padding: 18px;
}

.signature-preview img {
  max-height: 96px;
  max-width: 360px;
  object-fit: contain;
}

.signature-capture {
  display: grid;
  gap: 10px;
}

.signature-capture canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
  height: 160px;
  touch-action: none;
  width: 100%;
}

.visitor-signature-pad canvas {
  height: 72px;
  min-width: 160px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.captured-signature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 56px;
  max-width: 160px;
  object-fit: contain;
  padding: 4px;
}

.visitor-choice-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.visitor-choice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  padding: 16px;
}

.visitor-choice:hover {
  border-color: var(--red-brand);
  text-decoration: none;
}

.visitor-choice span,
.visitor-choice em {
  color: var(--muted);
  font-size: 13px;
}

.visitor-choice.active {
  background: #fff1f1;
  border-color: var(--red-brand);
  box-shadow: 0 8px 20px rgba(179, 22, 33, 0.12);
}

.nda-scroll {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
  padding: 18px;
}

.nda-scroll h3,
.nda-scroll p {
  margin: 0;
}

.visitor-acceptance-form {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.visitor-acceptance-form > button {
  justify-self: start;
}

.workflow-actions-panel > form {
  display: grid;
  gap: 18px;
}

.workflow-actions-panel > form + form,
.workflow-actions-panel > form + button,
.workflow-actions-panel > button + form {
  margin-top: 18px;
}

.workflow-actions-panel > form > button {
  justify-self: start;
}

.page-head {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.service-action-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.service-action-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.service-action-card:hover {
  border-color: rgba(179, 22, 33, 0.35);
  box-shadow: 0 14px 28px rgba(21, 26, 33, 0.08);
  text-decoration: none;
  transform: translateY(-1px);
}

.service-action-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.service-action-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.service-action-card small {
  color: var(--muted);
  font-weight: 700;
}

.service-action-primary {
  border-color: rgba(15, 76, 129, 0.3);
}

.service-action-primary strong {
  color: var(--blue);
}

.admin-users-table table {
  min-width: 980px;
}

.identity-cell {
  display: grid;
  gap: 4px;
}

.identity-cell span,
.assignment-chip small {
  color: var(--muted);
  font-size: 12px;
}

.chip-stack {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignment-chip {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-width: 138px;
  padding: 8px 10px;
}

.assignment-chip.approval-chip {
  border-left: 4px solid var(--blue);
}

.workflow-settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-setting-card {
  display: grid;
  gap: 16px;
}

.workflow-setting-card:only-child {
  grid-column: 1 / -1;
}

.workflow-setting-card header,
.toggle-line {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.workflow-setting-card h2 {
  font-size: 20px;
  margin: 4px 0 0;
}

.workflow-filter-panel {
  align-items: end;
  grid-template-columns: 1fr auto;
}

.workflow-filter-bar {
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.workflow-setting-card .table-wrap {
  overflow-x: auto;
}

.workflow-setting-card table {
  min-width: 1120px;
  table-layout: fixed;
}

.workflow-setting-card th:nth-child(1),
.workflow-setting-card td:nth-child(1) {
  width: 90px;
}

.workflow-setting-card th:nth-child(2),
.workflow-setting-card td:nth-child(2) {
  width: 230px;
}

.workflow-setting-card th:nth-child(3),
.workflow-setting-card td:nth-child(3) {
  width: 190px;
}

.workflow-setting-card th:nth-child(4),
.workflow-setting-card td:nth-child(4) {
  width: 320px;
}

.workflow-setting-card th:nth-child(5),
.workflow-setting-card td:nth-child(5) {
  width: 270px;
}

.workflow-setting-card th:nth-child(6),
.workflow-setting-card td:nth-child(6) {
  width: 180px;
}

.workflow-setting-card td input,
.workflow-setting-card td select {
  min-width: 0;
}

.workflow-setting-card select[multiple] {
  min-height: 148px;
  padding: 8px;
}

.workflow-setting-card select[multiple] option {
  padding: 6px 8px;
}

.toggle-line {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  grid-template-columns: auto auto;
}

.toggle-line input {
  width: auto;
}

.inline-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(80px, .35fr) minmax(160px, 1fr);
}

.control-reference-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-reference-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
}

.control-reference-card strong {
  display: block;
  margin-bottom: 6px;
}

.control-reference-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  margin-bottom: 6px;
}

h2 {
  font-size: 20px;
}

h3 {
  color: var(--blue-dark);
  font-size: 15px;
  margin-bottom: 8px;
}

.eyebrow {
  color: var(--red-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.field-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: -4px 0 4px;
}

.relationship-drawer {
  margin-top: 1rem;
}

.entity-picker-head {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.result-count,
.source-badge {
  background: #eef4fb;
  border: 1px solid #d7e4f2;
  border-radius: 999px;
  color: #254466;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
}

.relationship-sections {
  display: grid;
  gap: 0.75rem;
}

.relationship-group h3 {
  margin-bottom: 0.45rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  align-items: center;
  background: #f3f6f9;
  border: 1px solid #d9e1e8;
  border-radius: 999px;
  display: inline-flex;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
}

.chip button {
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 1.3rem;
  line-height: 1;
  width: 1.3rem;
}

.relationship-results {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.relationship-result {
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  padding: 0.75rem;
}

.relationship-result:focus,
button:focus-visible,
.button:focus-visible,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.workflow-task-overdue {
  border-color: #f4a9a3;
  box-shadow: inset 4px 0 0 #d43f3a;
}

.overdue-text {
  color: #b42318;
}

.status-card.attention {
  border-color: #f4a9a3;
}

.legacy-links,
.traceability-links {
  background: #f8fafc;
}

.legacy-links summary,
.traceability-links summary {
  cursor: pointer;
  font-weight: 800;
}

.small {
  font-size: 13px;
}

.alert {
  background: #fff1f0;
  border: 1px solid #ffd1cf;
  border-radius: 6px;
  color: var(--red);
  padding: 10px 12px;
}

.notice {
  background: #e9f6ef;
  border: 1px solid #bde3cc;
  border-radius: 6px;
  color: #11633b;
  font-weight: 700;
  padding: 12px 14px;
}

.notice.warning {
  background: #fff7e6;
  border-color: #f3d19c;
  color: #8a5200;
}

.compact-notice {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  padding: 9px 11px;
}

.warning-notice {
  background: #fff7e6;
  border-color: #f3d19c;
  color: #8a5200;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 14px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

button,
.button {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  text-decoration: none;
}

button:hover,
.button:hover {
  border-color: var(--red-brand);
  text-decoration: none;
}

.button.danger {
  border-color: #b91c1c;
  color: #991b1b;
}

.button.danger:hover {
  background: #fef2f2;
}

.workflow-requestor-actions {
  justify-content: flex-start;
  margin-top: 16px;
}

.primary {
  background: var(--red-brand);
  border-color: var(--red-brand);
  color: white;
}

.primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
  scroll-margin-top: 96px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 92px;
  padding: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

a.stat-card,
a.metric,
a.metric-card {
  color: inherit;
  text-decoration: none;
}

a.stat-card:hover,
a.metric:hover,
a.metric-card:hover,
a.stat-card:focus-visible,
a.metric:focus-visible,
a.metric-card:focus-visible {
  border-color: rgba(185, 28, 28, 0.42);
  box-shadow: 0 14px 30px rgba(21, 26, 33, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0 0 22px;
}

.metric {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(21, 26, 33, 0.04);
  display: grid;
  gap: 12px;
  min-height: 108px;
  padding: 16px;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric::before {
  background: var(--red-brand);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 16px;
  position: absolute;
  right: 16px;
  top: 0;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  min-height: 30px;
  text-transform: uppercase;
}

.metric strong {
  align-self: end;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.grid-two {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.section-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
}

.section-title a {
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
}

.detail-list {
  display: grid;
  gap: 10px 16px;
  grid-template-columns: minmax(120px, 180px) 1fr;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.panel[id] {
  scroll-margin-top: 96px;
}

.status-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 24px;
}

.access-workspace-switch {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.access-workspace-option {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 16px;
  text-decoration: none;
}

.access-workspace-option:hover {
  border-color: var(--blue);
}

.access-workspace-option.active {
  border-color: var(--red-brand);
  box-shadow: inset 4px 0 0 var(--red-brand);
}

.access-workspace-option span {
  display: grid;
  gap: 4px;
}

.access-workspace-option strong {
  font-size: 16px;
}

.access-workspace-option small {
  color: var(--muted);
  font-size: 13px;
}

.access-workspace-option b {
  font-size: 28px;
  line-height: 1;
}

.status-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
}

.status-card.active {
  border-color: var(--red-brand);
  box-shadow: inset 0 0 0 1px var(--red-brand);
}

.status-card span {
  color: var(--muted);
  font-size: 13px;
}

.status-card strong {
  font-size: 28px;
}

.table-wrap,
.panel,
fieldset {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
}

.batch-label-form {
  display: grid;
  gap: 12px;
}

.batch-label-toolbar {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.batch-label-toolbar > div {
  display: grid;
  gap: 2px;
}

.batch-label-toolbar label {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.batch-label-toolbar select {
  min-width: 220px;
}

.select-cell {
  text-align: center;
  width: 42px;
}

.select-cell input {
  height: 16px;
  width: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.pill {
  background: #eef3f8;
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.risk-low {
  background: #e8f6ef;
  color: var(--green);
}

.risk-medium {
  background: #fff7e6;
  color: var(--amber);
}

.risk-high {
  background: #fff1f0;
  color: var(--red);
}

.form-grid,
.detail-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-bar {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr auto auto;
}

fieldset,
.panel {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 22px;
}

.legacy-links {
  align-content: start;
}

.legacy-links > summary {
  color: var(--charcoal);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.legacy-links[open] > summary {
  margin-bottom: 10px;
}

.workflow-status-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
}

.workflow-step {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  padding: 8px 12px;
}

.workflow-dot {
  background: #cbd5e1;
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.workflow-step-complete {
  background: #e8f6ef;
  color: var(--green);
}

.workflow-step-complete .workflow-dot {
  background: var(--green);
}

.workflow-step-current {
  background: #eef3f8;
  color: var(--blue);
}

.workflow-step-current .workflow-dot {
  background: var(--blue);
}

.workflow-step-rejected,
.workflow-step-returned {
  background: #fff1f0;
  color: var(--red);
}

.workflow-step-rejected .workflow-dot,
.workflow-step-returned .workflow-dot {
  background: var(--red);
}

.workflow-actions-card dl {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: max-content 1fr;
}

.workflow-actions-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.workflow-actions-card dd {
  margin: 0;
}

.workflow-available-actions {
  display: grid;
  gap: 12px;
}

.workflow-action-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.workflow-badge {
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.workflow-badge-rejected,
.workflow-badge-changes-requested {
  background: #fff1f0;
  color: var(--red);
}

.workflow-badge-approved,
.workflow-badge-completed {
  background: #e8f6ef;
  color: var(--green);
}

.workflow-task-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px) auto;
  margin-bottom: 12px;
  padding: 16px;
}

.workflow-task-card h3 {
  margin: 0 0 6px;
}

.workflow-task-main p:not(.eyebrow) {
  color: var(--ink);
  margin: 0;
}

.workflow-task-card dl {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: max-content 1fr;
  margin: 0;
}

.workflow-task-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.workflow-task-card dd {
  margin: 0;
}

.workflow-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workflow-task-actions {
  align-self: end;
}

.workflow-list,
.workflow-grid {
  display: grid;
  gap: 16px;
}

.workflow-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.workflow-list.compact {
  gap: 12px;
}

.workflow-shortcut-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-summary-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.workflow-summary-cards .status-card {
  text-decoration: none;
}

.workflow-summary-cards .status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workflow-filter-bar {
  align-items: end;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto auto;
}

.workflow-filter-bar .checkbox-line {
  align-self: center;
}

.workflow-filter-bar .button,
.workflow-filter-bar button {
  min-height: 42px;
}

[hidden],
.is-hidden {
  display: none !important;
}

fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

legend {
  color: var(--charcoal);
  font-size: 18px;
  font-weight: 700;
  padding: 0 6px;
}

.wide {
  grid-column: 1 / -1;
}

.span-2 {
  grid-column: 1 / -1;
}

fieldset.wide {
  grid-template-columns: 1fr;
}

.form-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
}

.summary-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-list dd {
  margin: 0;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.control-number-field {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  min-height: 42px;
  overflow: hidden;
  padding: 0 12px;
  width: 100%;
}

.control-number-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(15, 76, 129, 0.12);
}

.control-number-field input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-weight: 700;
  min-width: 0;
  outline: 0;
  padding: 10px 2px;
}

.control-number-field input::placeholder {
  color: var(--muted);
  font-weight: 700;
  opacity: 1;
}

.control-number-date {
  flex: 0 0 calc(8ch + 4px);
}

.control-number-sequence {
  flex: 0 0 calc(4ch + 4px);
}

.control-number-fixed {
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 700;
}

.progress {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 22px;
}

.progress span {
  background: #e8edf3;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 10px;
  text-align: center;
}

.progress span.done {
  background: #fff1f1;
  color: var(--red-dark);
}

dl {
  display: grid;
  gap: 10px 16px;
  grid-template-columns: minmax(140px, 0.42fr) 1fr;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

dd {
  margin: 0;
}

.summary {
  align-content: start;
}

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

.file-list li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding-top: 10px;
}

.file-list span,
.timeline span {
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 22px;
}

.timeline p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.panel p {
  line-height: 1.55;
  white-space: pre-wrap;
}

.assignment-note {
  background: #f7f8fa;
  border-left: 4px solid var(--red-brand);
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 5px;
  grid-column: 1 / -1;
  padding: 12px 14px;
}

.assignment-note strong {
  color: var(--ink);
}

.assignment-note code {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.check-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.admin-panel {
  margin-bottom: 18px;
}

.inline-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.department-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.department-list article {
  align-content: start;
}

.department-list form {
  display: grid;
  gap: 14px;
}

.filter-row {
  align-items: end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 320px) auto auto 1fr;
  margin-bottom: 20px;
  padding: 16px;
}

.notification-link {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.badge {
  align-items: center;
  background: var(--red-brand);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 6px;
}

.global-actions .badge,
.app-nav .badge,
.badge {
  color: #ffffff !important;
}

.notification-list {
  display: grid;
  gap: 14px;
}

.notification-item {
  align-items: start;
  border-left: 4px solid transparent;
  grid-template-columns: 1fr auto;
}

.notification-item.unread {
  border-left-color: var(--red-brand);
  box-shadow: 0 8px 24px rgba(21, 26, 33, 0.05);
}

.notification-item h2 {
  margin-bottom: 8px;
}

.meta-row {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
}

.inline-grid.compact {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.visitor-row {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 14px;
}

.visitor-name-reminder {
  background: #fff7e6;
  border: 1px solid #f3d19c;
  border-radius: 6px;
  color: #8a5200;
  display: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  padding: 8px 10px;
}

label:focus-within > .visitor-name-reminder {
  display: block;
}

.visitor-row-action {
  align-items: end;
  display: flex;
}

.visitor-confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  max-width: 560px;
  padding: 0;
  width: calc(100% - 40px);
}

.visitor-confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.visitor-confirm-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.visitor-confirm-list {
  display: grid;
  gap: 10px;
}

.visitor-confirm-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.visitor-confirm-item span,
.visitor-confirm-item em {
  color: var(--muted);
  font-size: 13px;
}

.security-form {
  display: grid;
  gap: 18px;
}

.guard-validation-list {
  display: grid;
  gap: 0;
}

.guard-validation-card {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.guard-validation-card:last-child {
  border-bottom: 1px solid var(--line);
}

.guard-validation-card-head {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.guard-validation-card-head h3 {
  font-size: 18px;
  margin: 0 0 3px;
}

.guard-validation-card-head .pill {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.guard-visitor-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 5px 14px;
  margin-top: 4px;
}

.guard-nda-control {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.guard-nda-control input {
  max-width: 210px;
}

.guard-validation-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.guard-validation-grid > label,
.guard-validation-grid input,
.guard-validation-grid select,
.guard-validation-grid textarea {
  min-width: 0;
}

.guard-checkbox-field .check-row {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 43px;
  padding: 10px 12px;
}

.guard-field-wide {
  grid-column: span 2;
}

.guard-signature-field {
  display: grid;
  gap: 8px;
}

.guard-signature-field .field-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.guard-signature-field .captured-signature {
  max-height: 80px;
  max-width: 260px;
}

.guard-signature-field .signature-capture canvas {
  height: 120px;
  max-width: 100%;
}

.guard-visit-section {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.guard-visit-section h4 {
  font-size: 15px;
  margin: 0 0 12px;
}

.guard-visit-history {
  background: var(--bg);
  border-left: 3px solid var(--brand);
  display: grid;
  font-size: 13px;
  gap: 5px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.guard-visit-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.guard-visit-grid > label,
.guard-visit-grid input,
.guard-visit-grid textarea {
  min-width: 0;
}

.guard-visit-notes {
  grid-column: 1 / -1;
}

.security-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-fields .wide {
  grid-column: 1 / -1;
}

td input {
  min-width: 110px;
}

@media (max-width: 1100px) {
  .guard-validation-grid,
  .guard-visit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .guard-validation-grid,
  .guard-visit-grid,
  .security-fields {
    grid-template-columns: 1fr;
  }

  .guard-field-wide,
  .security-fields .wide {
    grid-column: auto;
  }

  .guard-validation-card-head {
    display: grid;
  }

  .guard-nda-control {
    align-items: stretch;
    display: grid;
    justify-content: stretch;
  }

  .guard-nda-control input {
    max-width: none;
  }
}

.zone-grid,
.report-grid,
.report-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.report-grid .panel {
  min-width: 0;
  overflow-x: auto;
}

.report-grid table {
  min-width: 520px;
}

.report-visitor-list {
  display: grid;
  gap: 4px;
}

section.panel.wide {
  min-width: 0;
}

section.panel.wide > table {
  min-width: 560px;
}

.submission-progress {
  align-items: center;
  background: #f4f8fc;
  border: 1px solid #cbd8e6;
  border-left: 4px solid #0f568f;
  display: flex;
  gap: 14px;
  padding: 14px 16px;
}

.submission-progress[hidden] {
  display: none;
}

.submission-progress strong,
.submission-progress small {
  display: block;
}

.submission-progress small {
  color: #566476;
  margin-top: 3px;
}

.submission-spinner {
  animation: submission-spin 0.8s linear infinite;
  border: 3px solid #cfdae5;
  border-radius: 50%;
  border-top-color: #0f568f;
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

button.is-processing,
button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes submission-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .submission-spinner { animation: none; }
}

@media (max-width: 900px) {
  section.panel.wide {
    overflow-x: auto;
  }
}

.report-card {
  text-decoration: none;
}

.sso-button {
  width: 100%;
}

.divider {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-size: 12px;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  background: var(--line);
  content: "";
  height: 1px;
}

.module-shell {
  display: grid;
  gap: 18px;
}

.page-heading {
  display: grid;
  gap: 4px;
}

.local-tabs {
  align-items: center;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.local-tabs a {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
}

.content-panel,
.warning-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.asset-photo-panel {
  margin-bottom: 18px;
}

.asset-photo-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  max-height: 260px;
  max-width: min(420px, 100%);
  object-fit: contain;
}

.warning-panel {
  border-color: rgba(185, 28, 28, 0.25);
}

.dashboard-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 16px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 26px;
}

.evidence-panel {
  margin: 18px 0;
}

.evidence-actions {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 18px;
}

.evidence-actions .stack-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.evidence-list {
  margin: 0;
}

.field-hint {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.framework-picker {
  margin-bottom: 8px;
}

.settings-summary {
  margin-bottom: 18px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.settings-card h2 {
  font-size: 18px;
  margin: 4px 0 6px;
}

.settings-card-footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 10px;
  }

  .global-header {
    align-items: start;
    gap: 7px;
    grid-template-columns: 1fr;
    max-width: 100%;
    min-width: 0;
    padding: 8px 0;
    position: relative;
  }

  .brand {
    gap: 10px;
    padding-right: 112px;
  }

  .brand img {
    height: 30px;
    max-width: 132px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    font-size: 11px;
  }

  .global-search-form {
    max-width: 100%;
    min-height: 36px;
  }

  .global-actions {
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-start;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
  }

  .global-actions::-webkit-scrollbar,
  .app-nav::-webkit-scrollbar {
    display: none;
  }

  .global-actions,
  .app-nav {
    scrollbar-width: none;
  }

  .global-actions a,
  .global-actions summary,
  .app-nav a,
  .app-nav-menu summary {
    white-space: nowrap;
  }

  .workflow-pill,
  .compact-action,
  .app-nav a,
  .app-nav-menu summary {
    font-size: 12px;
    padding: 7px 9px;
  }

  .user-menu {
    flex: 0 0 auto;
    position: absolute;
    right: 0;
    top: 8px;
  }

  .user-menu summary {
    background: #ffffff;
    max-width: 110px;
    min-height: 34px;
    width: auto;
  }

  .user-menu-panel {
    left: 12px;
    min-width: 0;
    position: fixed;
    right: 12px;
    top: 118px;
    width: auto;
  }

  .application-header {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    padding-bottom: 8px;
  }

  .app-nav {
    border: 1px solid var(--line);
    border-radius: 8px;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 6px;
    width: 100%;
  }

  .app-nav a,
  .app-nav-menu {
    flex: 0 0 auto;
  }

  .app-nav a,
  .app-nav-menu summary {
    justify-content: center;
    text-align: center;
  }

  .app-switcher summary {
    min-width: 0;
    min-height: 42px;
    width: 100%;
  }

  .app-switcher {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .app-switcher-panel {
    max-width: calc(100vw - 24px);
    min-width: min(290px, calc(100vw - 24px));
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-product-panel,
  .login-panel {
    border-radius: 8px;
    min-height: auto;
  }

  .login-product-panel {
    padding: 34px 24px;
  }

  .login-product-panel h1 {
    font-size: 36px;
  }

  .login-panel {
    gap: 15px;
    padding: 24px 18px;
  }

  .login-panel-single {
    max-width: 100%;
  }

  .login-brand-block h1 {
    font-size: 28px;
  }

  .login-portal-mark img {
    height: 38px;
    max-width: 180px;
  }

  .login-portal-mark span {
    font-size: 10px;
    padding: 5px 10px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-head form,
  .page-head button {
    width: 100%;
  }

  .row-actions {
    align-items: stretch;
    width: 100%;
  }

  .row-actions .button,
  .row-actions form,
  .row-actions button {
    width: 100%;
  }

  main {
    padding: 22px 16px;
  }

  .status-grid,
  .stats-grid,
  .workflow-settings-grid,
  .workflow-summary-cards,
  .workflow-shortcut-grid,
  .workflow-grid,
  .service-action-grid,
  .control-reference-grid,
  .grid-two,
  .detail-list,
  .progress,
  .portal-choice,
  .login-choice-row,
  .form-grid,
  .detail-grid,
  fieldset,
  .inline-grid,
  .department-list,
  .notification-item,
  .filter-bar,
  .filter-row,
  .visitor-row,
  .zone-grid,
  .report-card-grid,
  .report-grid,
  .dashboard-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .workflow-task-card {
    grid-template-columns: 1fr;
  }

  .hiveone-hero {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .launcher-summary {
    justify-content: flex-start;
  }

  .portal-option {
    grid-template-columns: auto 1fr;
    min-height: 116px;
  }

  .evidence-actions {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .wide,
  .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .access-workspace-switch {
    grid-template-columns: 1fr;
  }

  .material-progress,
  .segmented-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-progress span {
    align-content: center;
    min-height: 48px;
  }
}
