@font-face {
    font-family: "Albra";
    src: url("../fonts/Albra-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Albra";
    src: url("../fonts/Albra-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Aventa";
    src: url("../fonts/Aventa-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
  --scitech-ink: #0F1918;
  --scitech-navy: #1d2827;
  --scitech-navy-alt: #455251;
  --scitech-blue: #1d2827;
  --scitech-teal: #455251;
  --scitech-purple: #757F7E;
  --scitech-lime: #d9f98a;
  --scitech-ink-soft: #1D2827;
  --scitech-warm-gray: #999387;
  --scitech-lime-muted: #D6E39C;
  --scitech-purple-muted: #D6D2EA;

  --scitech-text: #0F1918;
  --scitech-text-muted: #666D69;

  --scitech-background: #F3F5F7;
  --scitech-surface: #FFFFFF;
  --scitech-surface-muted: #E8E8E4;
  --scitech-surface-teal: #E8F4F3;
  --scitech-surface-blue: #EAF2F8;
  --scitech-surface-warning: #FFF4E5;

  --scitech-border: #D8DEDF;
  --scitech-border-strong: #B9C4C7;

  --scitech-success: #D9F98A;
  --scitech-warning: #B56A00;
  --scitech-danger: #B42318;
  --scitech-info: #455251;

  --font-family-base: "Aventa", "Segoe UI", Arial, sans-serif;
  --font-family-display: "Albra", "Aventa", "Segoe UI", Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 3px rgba(15, 25, 24, 0.08);
  --shadow-md: 0 6px 18px rgba(15, 25, 24, 0.10);

  --navy: var(--scitech-navy);
  --muted: var(--scitech-text-muted);
  --border: var(--scitech-border);
  --surface: var(--scitech-surface);
  --background: var(--scitech-background);
  --accent: var(--scitech-teal);
  --low: var(--scitech-success);
  --medium: var(--scitech-warning);
  --high: var(--scitech-danger);

  --navy-hover: #455251;
  --navy-pressed: #0F1918;
  --blue-hover: #455251;
  --teal-hover: #455251;
  --danger-hover: #951D14;
  --focus-ring: 0 0 0 3px rgb(217, 249, 138);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--scitech-background);
  color: var(--scitech-text);
  font-family: var(--font-family-base);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

* {
  scrollbar-color: rgba(23, 54, 93, 0.38) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(23, 54, 93, 0.32);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(23, 54, 93, 0.48);
  background-clip: padding-box;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 180px;
  background: linear-gradient(180deg, rgba(23, 54, 93, 0.07), rgba(243, 245, 247, 0));
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--scitech-teal);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
.metric {
  color: var(--scitech-ink);
  font-family: var(--font-family-display);
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 1.55rem + 0.6vw, 2.35rem);
  line-height: 1.14;
  font-weight: 760;
}

h2 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  line-height: 1.25;
  font-weight: 740;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 740;
}

p {
  margin-top: 0;
}

pre {
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--scitech-border);
  border-radius: var(--radius-sm);
  background: var(--scitech-surface-blue);
  color: var(--scitech-ink);
  font-size: 0.88rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 10px;
  z-index: 20;
  transform: translateY(-140%);
  border-radius: var(--radius-sm);
  background: var(--scitech-lime);
  color: var(--scitech-ink);
  padding: 8px 12px;
  font-weight: 760;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-header {
  background: var(--scitech-navy);
  color: var(--scitech-surface);
  box-shadow: 0 2px 12px rgba(15, 25, 24, 0.18);
}

.site-nav {
  display: flex;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  min-width: 0;
  max-width: 2480px;
  margin: 0 auto;
  padding: 8px 18px;
  align-items: center;
  column-gap: 10px;
}

.brand {
  display: flex;
  min-width: 0;
  width: 88px;
  align-items: flex-start;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  color: var(--scitech-surface);
  font-family: var(--font-family-display);
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
}

.brand:hover {
  color: var(--scitech-surface);
  text-decoration: none;
}

.brand.active {
  text-decoration: none;
}

.brand.active .brand-product {
  color: var(--scitech-surface);
}

.brand-logo {
  display: block;
  width: 78px;
  height: auto;
  max-height: 21px;
  flex: 0 0 auto;
}

.brand-product {
  display: block;
  color: var(--scitech-surface);
  font-family: var(--font-family-base);
  font-size: 0.72rem;
  font-weight: 720;
  line-height: 1;
}

.nav-links,
.nav-session {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.nav-links {
  justify-content: flex-start;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}

.nav-session {
  justify-content: flex-end;
  white-space: nowrap;
}

.nav-link,
.btn-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 7px 8px;
  font: inherit;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.btn-link:hover {
  border-color: rgba(217, 249, 138, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--scitech-surface);
  text-decoration: none;
}

.nav-link.active {
  border-color: rgb(217, 249, 138);
  background: rgb(69, 82, 81);
  color: var(--scitech-surface);
}

.nav-link.active::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--scitech-lime);
}

.nav-user {
  max-width: 210px;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 20px 64px;
}

.page-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--scitech-border);
}

.page-header h1::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--scitech-purple);
}

.page-header .muted {
  max-width: 740px;
  margin: 8px 0 0;
}

.section-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.muted,
.helptext {
  color: var(--scitech-text-muted);
}

.floating-field {
    position: relative;
}

.floating-field input {
    width: 100%;
    height: 48px;
    padding: 14px 14px 10px;
    border: 1px solid var(--scitech-border-strong);
    border-radius: 5px;
    background: var(--scitech-surface);
    font: inherit;
    outline: none;
}

.floating-field label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 4px;
    background: var(--scitech-surface);
    color: var(--scitech-border-strong);
    pointer-events: none;
    transition:
        top 0.15s ease,
        transform 0.15s ease,
        font-size 0.15s ease,
        color 0.15s ease;
}

.floating-field input:focus {
    border-color: var(--scitech-lime);
    border-width: 1.5px;
}

.floating-field input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--scitech-border-strong);
}

.floating-field input:hover + label {
    color: var(--scitech-blue);
}

.floating-field input:focus + label {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--scitech-blue);
}

.small-text {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
}

.helptext {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
}

.card {
  margin-bottom: 18px;
  border: 1px solid var(--scitech-border);
  border-radius: var(--radius-md);
  background: var(--scitech-surface);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.panel-muted {
  border-color: rgba(36, 91, 138, 0.22);
  background: var(--scitech-surface-blue);
}

.panel-teal {
  border-color: rgba(28, 124, 131, 0.22);
  background: var(--scitech-surface-teal);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  overflow: visible;
  min-height: 118px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--scitech-teal);
}

.metric-card.accent-purple::before {
  background: var(--scitech-purple);
}

.metric-card.accent-lime::before {
  background: var(--scitech-lime);
}

.metric {
  margin-top: 8px;
  color: var(--scitech-navy);
  font-size: 2rem;
  font-weight: 780;
  line-height: 1.1;
  transition: opacity 120ms ease;
}

.metric a {
  color: var(--scitech-navy);
}

.metric-card[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 48px;
  right: 14px;
  left: 14px;
  z-index: 8;
  display: block;
  border: 1px solid rgba(23, 54, 93, 0.18);
  border-radius: var(--radius-sm);
  background: var(--scitech-navy);
  color: var(--scitech-surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.metric-card:hover,
.metric-card:focus,
.metric-card:focus-within {
  z-index: 9;
}

.metric-card:hover .metric,
.metric-card:focus .metric,
.metric-card:focus-within .metric {
  opacity: 0.12;
}

.metric-card[data-tooltip]:hover::after,
.metric-card[data-tooltip]:focus::after,
.metric-card[data-tooltip]:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--scitech-navy);
  border-radius: var(--radius-sm);
  background: var(--scitech-navy);
  color: var(--scitech-surface);
  padding: 9px 15px;
  font: inherit;
  font-weight: 730;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.btn:hover {
  border-color: var(--navy-hover);
  background: var(--navy-hover);
  color: var(--scitech-surface);
  text-decoration: none;
}

.btn:active {
  border-color: var(--navy-pressed);
  background: var(--navy-pressed);
}

.btn:disabled,
.btn[aria-disabled="true"],
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.btn-secondary {
  border-color: var(--scitech-blue);
  background: var(--scitech-surface);
  color: var(--scitech-blue);
}

.btn-secondary:hover {
  border-color: var(--blue-hover);
  background: var(--scitech-surface-blue);
  color: var(--blue-hover);
}

.btn-accent {
  border-color: var(--scitech-purple);
  background: var(--scitech-purple);
  color: var(--scitech-ink);
}

.btn-accent:hover {
  border-color: var(--scitech-navy-alt);
  background: var(--scitech-navy-alt);
  color: var(--scitech-surface);
}

.btn-success {
  border-color: var(--scitech-teal);
  background: var(--scitech-teal);
  color: var(--scitech-surface);
}

.btn-success:hover {
  border-color: var(--teal-hover);
  background: var(--teal-hover);
}

.btn-danger {
  border-color: var(--scitech-danger);
  background: var(--scitech-danger);
  color: var(--scitech-surface);
}

.btn-danger:hover {
  border-color: var(--danger-hover);
  background: var(--danger-hover);
}

.actions,
.form-actions,
.action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-actions {
  margin-top: 18px;
}

.action-links {
  gap: 12px;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--scitech-ink);
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--scitech-border-strong);
  border-radius: var(--radius-sm);
  background: var(--scitech-surface);
  color: var(--scitech-text);
  padding: 9px 10px;
  font: inherit;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--scitech-blue);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--scitech-teal);
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin: 0 8px 0 0;
  accent-color: var(--scitech-teal);
}

input[readonly],
select[readonly],
textarea[readonly],
input:disabled,
select:disabled,
textarea:disabled {
  border-color: var(--scitech-border);
  background: var(--scitech-surface-muted);
  color: var(--scitech-text-muted);
}

form p {
  margin: 0 0 16px;
}

.form-card form p:last-of-type {
  margin-bottom: 0;
}

.inline-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--scitech-text-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.inline-check input[type="checkbox"] {
  margin: 0;
}

.checkbox-group {
  margin: 0 0 16px;
  border: 1px solid var(--scitech-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.checkbox-group legend {
  padding: 0 6px;
  color: var(--scitech-ink);
  font-weight: 740;
}

.checkbox-list ul {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkbox-list label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-weight: 650;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

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

.filters p {
  margin: 0;
}

.filters .btn {
  align-self: end;
}

.period-filter {
  display: grid;
  grid-template-columns: auto minmax(145px, 160px) auto;
  gap: 10px;
  align-items: end;
}

.period-filter label {
  color: var(--scitech-text-muted);
  font-weight: 720;
}

.period-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.period-all.is-active {
  border-color: rgba(69, 82, 81, 0.45);
  background: var(--scitech-surface-teal);
  color: var(--scitech-navy);
}

.errorlist {
  margin: 7px 0;
  padding-left: 18px;
  color: var(--scitech-danger);
  font-weight: 650;
}

.message {
  margin-bottom: 14px;
  border: 1px solid rgba(36, 91, 138, 0.25);
  border-left: 4px solid var(--scitech-blue);
  border-radius: var(--radius-sm);
  background: var(--scitech-surface-blue);
  color: var(--scitech-ink);
  padding: 12px 14px;
}

.message.error {
  border-color: rgba(180, 35, 24, 0.24);
  border-left-color: var(--scitech-danger);
  background: #FCEBE9;
  color: var(--scitech-ink);
}

.message.success {
  border-color: rgba(28, 124, 131, 0.24);
  border-left-color: var(--scitech-success);
  background: var(--scitech-surface-teal);
  color: var(--scitech-ink);
}

.message.warning {
  border-color: rgba(181, 106, 0, 0.28);
  border-left-color: var(--scitech-warning);
  background: var(--scitech-surface-warning);
  color: var(--scitech-ink);
}

.table-card {
  padding: 0;
  overflow: visible;
}

.table-card > h2,
.table-card > .section-header {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--scitech-border);
}

.table-card > .section-header h2 {
  margin: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--scitech-surface);
}

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

th {
  background: var(--scitech-surface-blue);
  color: var(--scitech-navy);
  font-size: 0.8rem;
  font-weight: 780;
  text-transform: uppercase;
}

td {
  color: var(--scitech-text);
}

tbody tr:hover {
  background: rgba(232, 244, 243, 0.55);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.numeric,
.date-cell {
  white-space: nowrap;
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.date-cell {
  font-variant-numeric: tabular-nums;
}

.actions-cell {
  min-width: 170px;
}

.empty-row {
  color: var(--scitech-text-muted);
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--scitech-border);
  border-radius: 999px;
  background: var(--scitech-surface-muted);
  color: var(--scitech-ink);
  padding: 4px 9px;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.badge.low,
.badge.status-approved,
.badge.status-active,
.badge.status-cleared,
.badge.status-false_positive,
.badge.status-completed {
  border-color: rgba(28, 124, 131, 0.28);
  background: var(--scitech-surface-teal);
  color: var(--scitech-ink);
}

.badge.medium,
.badge.status-returned,
.badge.status-return,
.badge.status-needs_changes,
.badge.status-review_required,
.badge.status-overdue {
  border-color: rgba(181, 106, 0, 0.30);
  background: var(--scitech-surface-warning);
  color: var(--scitech-ink);
}

.badge.high,
.badge.status-rejected,
.badge.status-restricted,
.badge.status-error,
.badge.status-match_confirmed,
.badge.status-confirmed_match {
  border-color: rgba(180, 35, 24, 0.24);
  background: #FCEBE9;
  color: var(--scitech-ink);
}

.badge.status-draft,
.badge.status-prospect,
.badge.status-inactive,
.badge.status-uncategorized,
.badge.status-unclassified {
  background: var(--scitech-surface-muted);
  color: var(--scitech-ink);
}

.badge.status-submitted,
.badge.status-pending,
.badge.status-pending_review,
.badge.status-under_review,
.badge.status-running,
.badge.status-due,
.badge.status-upcoming,
.badge.status-possible_match {
  border-color: rgba(36, 91, 138, 0.28);
  background: var(--scitech-surface-blue);
  color: var(--scitech-ink);
}

.badge.info,
.badge.status-superseded {
  border-color: rgb(217, 249, 138);
  background: rgb(234, 240, 206);
  color: var(--scitech-ink);
}

.badge.highlight {
  border-color: rgba(217, 249, 138, 0.78);
  background: var(--scitech-lime);
  color: var(--scitech-ink);
}

.customer-heading-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.dashboard-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: -6px 0 26px;
  color: var(--scitech-text-muted);
  font-size: 0.88rem;
}

.dashboard-context a {
  font-size: 0.88rem;
}

.risk-metrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 18px;
}

.chart-card h2 {
  margin-top: 0;
}

.chart-wrap {
  height: 280px;
  max-width: 480px;
  margin: 0 auto;
}

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

.detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--scitech-border);
}

.detail-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-row dt {
  color: var(--scitech-text-muted);
  font-weight: 720;
}

.detail-row dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

pre + .detail-list {
  margin-top: 14px;
}

.related-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--scitech-border);
}

.related-list li:last-child {
  border-bottom: 0;
}

.person-relationship-list li {
  display: grid;
  gap: 6px;
}

.related-person-main,
.related-person-meta,
.related-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.related-person-name {
  color: var(--scitech-ink);
  font-weight: 760;
}

.related-person-meta {
  color: var(--scitech-text-muted);
  font-size: 0.9rem;
}

.related-actions {
  font-size: 0.88rem;
}

.related-list-subheading {
  color: var(--scitech-text-muted);
  font-size: 0.82rem;
  font-weight: 780;
  text-transform: uppercase;
}

.questionnaire-card {
  padding-top: 6px;
}

.category-title {
  margin: 26px 0 0;
  padding: 14px 0 10px;
  border-bottom: 2px solid var(--scitech-navy);
  color: var(--scitech-navy);
  font-size: 1.05rem;
}

.category-title:first-child {
  margin-top: 0;
}

.question {
  padding: 18px 0;
  border-bottom: 1px solid var(--scitech-border);
}

.question:last-child {
  border-bottom: 0;
}

.question h3 {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.question-number {
  flex: 0 0 auto;
  min-width: 2rem;
  color: var(--scitech-navy);
  font-variant-numeric: tabular-nums;
}

.question-title {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
}

.tooltip-trigger {
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(36, 91, 138, 0.35);
  border-radius: 999px;
  background: var(--scitech-surface);
  color: var(--scitech-blue);
  padding: 0;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1;
  cursor: help;
}

.tooltip-trigger:hover,
.tooltip-trigger:focus-visible {
  border-color: var(--scitech-teal);
  color: var(--scitech-teal);
}

.tooltip-content {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 30;
  display: block;
  width: max-content;
  max-width: min(360px, calc(100vw - 40px));
  border: 1px solid rgba(15, 25, 24, 0.2);
  border-radius: var(--radius-sm);
  background: var(--scitech-ink);
  color: var(--scitech-surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  padding: 9px 10px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-transform: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.tooltip-content-wide {
  max-width: min(460px, calc(100vw - 40px));
}

.tooltip-wrap:hover,
.tooltip-wrap:focus-within {
  z-index: 31;
}

.tooltip-wrap:hover .tooltip-content,
.tooltip-wrap:focus-within .tooltip-content {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-list-item {
  display: block;
  white-space: normal;
}

.tooltip-list-item + .tooltip-list-item {
  margin-top: 4px;
}

.question-meta {
  margin: 0 0 8px;
  color: var(--scitech-text-muted);
  font-size: 0.9rem;
}

.question-help,
.question-note {
  margin: 8px 0;
  color: var(--scitech-text-muted);
}

.question-linked-field {
  max-width: 560px;
  margin: 10px 0 12px;
}

.question-note {
  border-left: 3px solid var(--scitech-warning);
  background: var(--scitech-surface-warning);
  padding: 8px 10px;
  color: var(--scitech-ink);
}

.suggestion-box {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  border: 1px solid rgba(36, 91, 138, 0.24);
  border-left: 4px solid var(--scitech-blue);
  border-radius: var(--radius-sm);
  background: var(--scitech-surface-blue);
  padding: 11px 12px;
}

.suggestion-box.is-review-required {
  border-color: rgba(181, 106, 0, 0.28);
  border-left-color: var(--scitech-warning);
  background: var(--scitech-surface-warning);
}

.suggestion-box p {
  margin: 0;
}

.suggestion-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.suggestion-warning {
  color: var(--scitech-danger);
  font-weight: 650;
}

.answer-options {
  margin: 12px 0 14px;
}

.answer-options select {
  max-width: 560px;
}

.notes-field {
  margin-top: 8px;
}

.notes-field summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--scitech-blue);
  font-weight: 720;
  cursor: pointer;
}

.notes-field summary:hover {
  color: var(--blue-hover);
  text-decoration: underline;
}

.notes-field textarea {
  margin-top: 8px;
  max-width: 720px;
}

.automatic-high-message h2 {
  margin-bottom: 8px;
}

.automatic-high-message ul {
  margin: 8px 0 10px;
  padding-left: 22px;
}

.answer-options label,
.answer-options > div > div label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  font-weight: 600;
}

.notes-field label {
  color: var(--scitech-text-muted);
  font-size: 0.9rem;
}

.submit-strip {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
}

.review-decision {
  padding: 14px 0;
  border-bottom: 1px solid var(--scitech-border);
}

.review-decision:last-child {
  border-bottom: 0;
}

.login-page {
  background:
    linear-gradient(135deg, rgba(232, 244, 243, 0.72) 0%, rgba(243, 245, 247, 0) 46%),
    var(--scitech-background);
}

.login-page .site-header {
  box-shadow: none;
}

.login-page .site-nav {
  min-height: 62px;
}

.login-page .app-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.login-shell {
  min-height: calc(100vh - 62px);
  display: grid;
  align-items: center;
  padding: 34px 0;
}

.login-layout {
  width: min(100%, 920px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(320px, 1fr);
  overflow: hidden;
  border: 1px solid var(--scitech-border);
  border-radius: var(--radius-lg);
  background: var(--scitech-surface);
  box-shadow: var(--shadow-md);
}

.login-context {
  position: relative;
  display: flex;
  min-height: 410px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(145, 142, 244, 0.24), rgba(217, 249, 138, 0.14) 42%, rgba(28, 124, 131, 0.22)),
    var(--scitech-navy);
  color: var(--scitech-surface);
  padding: 34px;
}

.login-context::before,
.login-context::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-context::before {
  inset: 26px 28px auto auto;
  width: 118px;
  height: 118px;
  border-top: 2px solid rgba(217, 249, 138, 0.58);
  border-right: 2px solid rgba(145, 142, 244, 0.62);
  border-radius: var(--radius-md);
}

.login-context::after {
  inset: auto 0 0 auto;
  width: 58%;
  height: 7px;
  background: linear-gradient(90deg, var(--scitech-purple), var(--scitech-lime));
}

.login-context-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 142px;
  height: auto;
  max-height: 38px;
  object-fit: contain;
  object-position: left center;
}

.login-context-title {
  position: relative;
  z-index: 1;
  max-width: 320px;
  font-family: var(--font-family-display);
  font-size: clamp(1.85rem, 1.52rem + 1vw, 2.65rem);
  font-weight: 780;
  line-height: 1.05;
}

.login-context-accent {
  position: relative;
  z-index: 1;
  width: 74px;
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--scitech-purple);
}

.login-card {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 42px;
}

.login-card h1 {
  color: var(--scitech-navy);
  margin-bottom: 24px;
}

.login-card form p {
  margin-bottom: 18px;
}

.login-card input {
  min-height: 44px;
  border-color: var(--scitech-border-strong);
  background: #FBFCFD;
}

.login-card input:focus {
  background: var(--scitech-surface);
}

.login-card .errorlist {
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: var(--radius-sm);
  background: #FCEBE9;
  padding: 10px 12px 10px 30px;
}

.login-card .form-actions {
  margin-top: 22px;
}

.login-card .btn {
  width: 100%;
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1100px) {
  .site-nav {
    padding: 7px 12px;
    column-gap: 6px;
  }

  .brand {
    width: 82px;
  }

  .brand-logo {
    width: 72px;
    max-height: 20px;
  }

  .nav-links,
  .nav-session {
    gap: 2px;
  }

  .nav-link,
  .btn-link {
    padding: 6px 5px;
    font-size: 0.94rem;
  }

  .nav-user {
    max-width: 165px;
  }
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: 210px;
  }
}

@media (max-width: 900px) {
  .site-nav {
    grid-template-columns: max-content minmax(0, 1fr);
    padding: 10px 14px;
    row-gap: 8px;
  }

  .brand {
    width: 86px;
  }

  .brand-logo {
    width: 78px;
    max-height: 21px;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-session {
    justify-self: end;
    order: 2;
    justify-content: flex-end;
  }

  .nav-user {
    max-width: 240px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .app-shell {
    padding: 22px 14px 48px;
  }

  .page-header {
    flex-direction: column;
    gap: 14px;
  }

  .page-header .actions,
  .page-header .btn,
  .period-filter,
  .search-form {
    width: 100%;
  }

  .period-filter,
  .search-form {
    grid-template-columns: 1fr;
  }

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

  .cards,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .actions .btn,
  .form-actions .btn,
  .submit-strip .btn {
    width: 100%;
  }

  .login-shell {
    min-height: calc(100vh - 62px);
    padding: 18px 0;
  }

  .login-layout {
    border-radius: var(--radius-md);
  }

  .login-context,
  .login-card {
    padding: 26px 22px;
  }

  .login-context {
    min-height: 176px;
  }

  .submit-strip {
    display: block;
  }
}

.notification-menu {
  position: relative;
}

.notification-menu summary {
  list-style: none;
}

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

.notification-bell {
  position: relative;
  display: inline-flex;
  width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.notification-bell:hover {
  border-color: rgba(217, 249, 138, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--scitech-surface);
}

.notification-count {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 18px;
  border: 1px solid var(--scitech-navy);
  border-radius: 999px;
  background: var(--scitech-lime);
  color: var(--scitech-ink);
  padding: 1px 5px;
  font-size: 0.7rem;
  font-weight: 780;
  line-height: 1.3;
  text-align: center;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(360px, calc(100vw - 28px));
  border: 1px solid var(--scitech-border-strong);
  border-radius: var(--radius-sm);
  background: var(--scitech-surface);
  color: var(--scitech-text);
  box-shadow: var(--shadow-md);
  padding: 8px;
  white-space: normal;
}

.notification-item {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--scitech-border);
  padding: 9px 8px;
}

.notification-item:last-of-type {
  border-bottom: 0;
}

.notification-item.unread {
  background: var(--scitech-surface-blue);
}

.notification-title {
  color: var(--scitech-ink);
  font-weight: 780;
}

.notification-message,
.notification-meta {
  color: var(--scitech-text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.notification-all-link {
  display: block;
  border-top: 1px solid var(--scitech-border);
  padding: 10px 8px 4px;
}

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

.inline-form {
  display: inline;
  margin: 0;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--scitech-teal);
  padding: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  color: var(--teal-hover);
  text-decoration: underline;
}
