:root {
  --color-primary: #27488d;
  --color-primary-dark: #1f3d7a;
  --color-primary-ink: #132a5f;
  --color-secondary: #59bcbd;
  --color-secondary-dark: #379fa1;
  --color-secondary-soft: #eaf7f7;
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-surface-muted: #f9fafb;
  --color-border: #e5e7eb;
  --color-border-strong: #d7dce3;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-success: #16a34a;
  --color-success-soft: #eaf7ee;
  --color-warning: #f59e0b;
  --color-warning-soft: #fff7e6;
  --color-danger: #dc2626;
  --color-danger-soft: #fef2f2;
  --color-info-soft: #eef5ff;
  --shadow-soft: 0 18px 42px rgba(31, 61, 122, 0.1);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.055);
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --font-family: "Tajawal", "IBM Plex Sans Arabic", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --app-sidebar-width: 292px;
  --app-content-max-width: 1680px;
  --app-wide-content-max-width: 1840px;
  --app-content-padding-x: clamp(16px, 1.35vw, 28px);
  --z-dropdown: 1200;
  --z-modal: 3000;
  --z-modal-step: 20;
  --z-toast: 6000;
  --z-loading: 6500;

  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --line: var(--color-border);
  --text: var(--color-text);
  --muted: var(--color-muted);
  --teal: var(--color-secondary);
  --teal-soft: var(--color-secondary-soft);
  --amber: var(--color-warning);
  --amber-soft: var(--color-warning-soft);
  --red: var(--color-danger);
  --red-soft: var(--color-danger-soft);
  --violet: var(--color-primary);
  --green: var(--color-success);
  --shadow: var(--shadow-card);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--color-text);
  background:
    radial-gradient(circle at 12% 10%, rgba(89, 188, 189, 0.11), transparent 28rem),
    linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 44%, var(--color-bg) 100%);
  background-color: var(--color-bg);
  font-family: var(--font-family);
  font-size: 14px;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--color-primary);
  font-weight: 800;
}

.shell {
  display: grid;
  grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, var(--color-bg) 0 calc(100% - var(--app-sidebar-width)), #102858 calc(100% - var(--app-sidebar-width)) 100%);
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-self: start;
  color: #f8fbff;
  padding: 14px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(circle at 30% 0%, rgba(89, 188, 189, 0.22), transparent 15rem),
    linear-gradient(180deg, #102a5e 0%, #183a78 48%, #102858 100%);
  box-shadow: -14px 0 34px rgba(4, 15, 38, 0.18) inset;
  scrollbar-color: rgba(89, 188, 189, 0.62) transparent;
}

.brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 14px;
}

.brand-logo-wrap {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(5, 18, 45, 0.24);
  overflow: visible;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  transform: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #ffffff;
  line-height: 1.45;
  font-size: 13.5px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 4px;
  color: #cde7f3;
  font-size: 12px;
  font-weight: 700;
}

.nav {
  display: block;
  flex: 1;
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 18px;
}

.nav-group {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(5, 18, 45, 0.08);
}

.nav-group + .nav-group {
  margin-top: 9px;
}

.nav-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 11px;
  color: #f8fbff;
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.55;
  list-style: none;
  cursor: pointer;
}

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

.nav-group-icon {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 9px;
  background: rgba(89, 188, 189, 0.15);
  color: transparent;
  border: 1px solid rgba(89, 188, 189, 0.32);
  font-size: 0;
  font-weight: 900;
}

.nav-group-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-secondary);
  color: #073e47;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(5, 18, 45, 0.16);
}

.nav-group-icon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7bd7d8;
  box-shadow: 0 0 0 4px rgba(123, 215, 216, 0.13);
}

.nav-group summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-inline-start: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.02);
  color: #d9eef7;
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-group[open] summary::after {
  content: "-";
  background: rgba(89, 188, 189, 0.28);
  border-color: rgba(89, 188, 189, 0.3);
  transform: none;
}

.nav-group-bottom {
  margin-top: 12px;
}

.nav-items {
  display: grid;
  gap: 5px;
  padding: 5px 9px 11px;
}

.nav button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  text-align: right;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: #e8f2fb;
  font-size: 13px;
  line-height: 1.45;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav button > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.11);
  transform: translateX(-1px);
}

.nav button.active {
  background: linear-gradient(90deg, #ffffff 0%, #eefafa 100%);
  color: var(--color-primary-dark);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(8, 17, 45, 0.16);
}

.nav button.active::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--color-secondary);
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-secondary);
  color: #073e47;
  font-size: 11px;
  font-weight: 900;
}

.nav button.active .nav-count {
  background: var(--color-primary);
  color: white;
}

.workspace {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 16rem),
    transparent;
  background-color: var(--color-bg);
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: none;
  position: static;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.035);
  width: min(100%, var(--app-content-max-width));
  margin-inline: auto;
}

.topbar > div:first-child {
  flex: 1 1 280px;
  min-width: 240px;
}

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

h1 {
  margin-bottom: 4px;
  font-size: 24px;
  line-height: 1.35;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.breadcrumb {
  margin-bottom: 5px;
  color: var(--color-secondary-dark);
  font-size: 12px;
  font-weight: 800;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--color-primary-ink);
}

details,
[role="tabpanel"],
.section.card {
  scroll-margin-top: 112px;
}

.topbar p,
.muted {
  color: var(--color-muted);
}

.topbar p {
  margin-bottom: 0;
  line-height: 1.5;
  font-weight: 700;
}

.user-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.user-panel > div {
  min-width: 145px;
  padding: 7px 11px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.user-panel strong {
  display: block;
  margin-top: 2px;
  color: var(--color-primary-ink);
}

.topbar-actions {
  display: flex;
  flex: 1 1 520px;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  justify-content: flex-end;
  min-width: 0;
}

.support-impersonation-banner {
  width: min(100%, var(--app-content-max-width));
  margin: 12px auto 0;
  padding-inline: var(--app-content-padding-x);
}

.support-impersonation-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-inline-start: 4px solid var(--color-warning);
  border-radius: 10px;
  background: linear-gradient(180deg, #fffaf0, #fff7e6);
  color: var(--color-primary-ink);
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.08);
}

.support-impersonation-content strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 950;
}

.support-impersonation-content span {
  color: #7c4a04;
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.6;
}

.demo-mode-banner {
  position: sticky;
  top: 0;
  z-index: 90;
  width: min(100%, var(--app-content-max-width));
  margin: 12px auto 0;
  padding: 11px var(--app-content-padding-x);
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-inline-start: 5px solid #0e7490;
  border-radius: 10px;
  background: #ecfeff;
  color: #164e63;
  box-shadow: 0 10px 24px rgba(14, 116, 144, 0.08);
  text-align: center;
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.6;
}

.demo-mode-banner[hidden] {
  display: none !important;
}

.global-search {
  position: relative;
  min-width: min(280px, 100%);
  flex: 1 1 320px;
  max-width: 520px;
}

.global-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  padding: 8px 13px;
  color: var(--color-primary-ink);
  font: inherit;
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.045);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline: 0;
  max-height: 440px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  z-index: 60;
  padding: 10px;
}

body[data-view="firstMeeting"] .topbar .global-search {
  display: none;
}

.search-group-title {
  margin: 8px 6px 6px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.search-result {
  width: 100%;
  text-align: start;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  padding: 10px;
  cursor: pointer;
  color: var(--color-primary-ink);
  display: grid;
  gap: 4px;
}

.search-result:hover {
  background: var(--color-secondary-soft);
}

.tag-list,
.attachment-list,
.timeline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--color-secondary-soft);
  color: #0d6468;
  font-weight: 900;
  border: 1px solid rgba(89, 188, 189, 0.24);
}

.tag button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

.timeline-list {
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  position: relative;
  padding: 13px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfcfe;
}

.timeline-item strong {
  color: var(--color-primary-ink);
}

.priority-عاجل,
.health-عاجل {
  border-inline-start: 4px solid var(--color-danger);
}

.priority-مهم,
.health-مهم {
  border-inline-start: 4px solid var(--color-warning);
}

.priority-عادي,
.health-عادي {
  border-inline-start: 4px solid var(--color-secondary);
}

.attachment-list {
  flex-direction: column;
}

.attachment-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: #fbfcfe;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--color-primary-ink);
}

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--color-secondary-soft);
  color: #0d6468;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid rgba(89, 188, 189, 0.2);
}

.view {
  width: min(100%, var(--app-content-max-width));
  margin-inline: auto;
  padding: 22px var(--app-content-padding-x) 46px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.grid.five {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.grid.six {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.registrant-files-header {
  display: grid;
  gap: 24px;
  padding: 26px 26px 28px;
  border-color: rgba(215, 225, 238, 0.76);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(39, 72, 141, 0.04), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 18px 44px rgba(31, 61, 122, 0.075);
}

.registrant-files-overview {
  display: grid;
  grid-template-columns: minmax(180px, max-content) minmax(280px, 620px);
  grid-template-areas: "count search";
  direction: ltr;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.registrant-search-slot {
  grid-area: search;
  direction: rtl;
  min-width: 0;
}

.registrant-search-slot .section-search {
  margin-bottom: 0;
}

.registrant-search-slot .section-search input {
  min-height: 48px;
  border-radius: 10px;
  border-color: #dbe4f1;
  box-shadow: 0 8px 20px rgba(31, 61, 122, 0.035);
}

.registrant-files-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  direction: rtl;
  gap: 14px;
  align-items: end;
}

.registrant-files-toolbar .wide {
  min-width: 0;
}

.result-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 14px;
  border: 1px solid #c9ddfb;
  background: #eef6ff;
  color: var(--color-primary-ink);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(39, 72, 141, 0.055);
}

.registrant-files-header .result-count {
  grid-area: count;
  direction: rtl;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  margin: 0;
  padding: 9px 18px;
  border: 1px solid #c9ddfb;
  border-radius: 14px;
  background: #eef6ff;
  color: var(--color-primary-ink);
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(39, 72, 141, 0.055);
}

.registrant-sort-control {
  direction: rtl;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 11px 14px;
  min-height: 64px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(31, 61, 122, 0.045);
}

.registrant-sort-control span,
.registrant-filter-block > span {
  color: #8390a8;
  font-size: 12px;
  font-weight: 850;
}

.registrant-sort-control select,
.registrant-filter-block select {
  width: 100%;
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.registrant-filter-block {
  direction: rtl;
  display: grid;
  gap: 7px;
  justify-items: stretch;
  margin: 0;
  padding: 11px 14px;
  min-height: 64px;
  border: 1px solid #dce6f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(31, 61, 122, 0.045);
}

.registrant-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.registrant-role-tabs button {
  min-width: 104px;
  min-height: 40px;
  padding: 8px 17px;
  border: 1px solid #d9e3f1;
  border-radius: 9px;
  background: #fff;
  color: var(--color-primary-ink);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(31, 61, 122, 0.035);
}

.registrant-role-tabs button.active {
  color: #fff;
  border-color: #16366f;
  background: linear-gradient(180deg, #1d4b94 0%, #14366f 100%);
  box-shadow: 0 13px 24px rgba(20, 54, 111, 0.18);
}

.registrant-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: stretch;
  gap: 22px;
}

.registrant-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 358px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #ffffff 60%, #fbfdff 100%);
  border: 1px solid #e1e8f2;
  border-top: 3px solid #68a7ff;
  box-shadow: 0 16px 34px rgba(21, 43, 85, 0.075);
  overflow: visible;
}

.registrant-card-female {
  border-top-color: #ff7eb4;
}

.registrant-card::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  inset-block-start: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
}

.registrant-avatar-zone {
  display: grid;
  place-items: center;
  min-height: 76px;
  width: 100%;
}

.registrant-avatar {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef5ff;
  border: 1px solid #dce7f6;
  box-shadow: 0 9px 20px rgba(31, 61, 122, 0.09);
  overflow: hidden;
}

.registrant-avatar svg {
  width: 100%;
  height: 100%;
}

.registrant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.registrant-avatar-female {
  background: #fff0f6;
  border-color: #ffd3e4;
}

.registrant-avatar .avatar-bg {
  fill: #eef5ff;
}

.registrant-avatar-female .avatar-bg {
  fill: #fff0f6;
}

.registrant-avatar .avatar-shadow {
  fill: rgba(15, 42, 83, 0.12);
}

.registrant-avatar .avatar-face {
  fill: #ffe8d0;
  stroke: #d2a47d;
  stroke-width: 1.3;
}

.avatar-thobe {
  fill: #ffffff;
  stroke: #d3dce8;
  stroke-width: 1.4;
}

.avatar-ghutra {
  fill: #f7fbff;
  stroke: #c8d4e4;
  stroke-width: 1.3;
}

.avatar-agal {
  fill: none;
  stroke: #111827;
  stroke-width: 4;
  stroke-linecap: round;
}

.avatar-ghutra-fold {
  fill: none;
  stroke: #d3dce8;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.avatar-cloth {
  fill: #2f3439;
}

.avatar-cloth-light {
  fill: rgba(255, 255, 255, 0.11);
}

.registrant-card-head {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  width: 100%;
}

.registrant-card h3 {
  margin: 0;
  min-height: 44px;
  color: var(--color-primary-ink);
  font-size: 16px;
  line-height: 1.38;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.registrant-card-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #62718b;
  font-size: 12px;
  font-weight: 850;
}

.registrant-card-subtitle span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f5f8fc;
  color: #536786;
}

.registrant-mini-icon,
.registrant-button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.registrant-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 15px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2764b5;
  border: 0;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.registrant-stage-green {
  background: #e9f7ef;
  color: #188052;
}

.registrant-stage-purple {
  background: #f3edff;
  color: #6c45bd;
}

.registrant-stage-amber {
  background: #fff1d6;
  color: #b66a00;
}

.registrant-stage-rose {
  background: #ffeaf2;
  color: #c43d70;
}

.registrant-stage-sky {
  background: #eaf5ff;
  color: #2472c8;
}

.registrant-stage-teal {
  background: #e9f7f7;
  color: #178082;
}

.registrant-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
  flex: 1;
  align-content: start;
}

.registrant-card-body span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #9aa5b8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
}

.registrant-card-body strong {
  display: block;
  margin-top: 1px;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.registrant-card-body strong[dir="ltr"] {
  direction: ltr;
  text-align: right;
  white-space: nowrap;
  overflow-wrap: normal;
}

.registrant-card-foot {
  display: block;
  width: 100%;
  margin-top: auto;
}

.registrant-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #fff;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(31, 61, 122, 0.04);
}

.registrant-open-button:hover {
  border-color: #b8cdf0;
  background: #f8fbff;
}

.registrant-pagination {
  justify-content: center;
  margin-top: 16px;
}

.person-profile-hero {
  display: grid;
}

.person-profile-current {
  display: grid;
  gap: 12px;
}

.compact-summary {
  margin: 0;
}

.person-profile-dashboard {
  display: grid;
  gap: 14px;
}

.profile-hero-card {
  display: grid;
  grid-template-areas: "actions stages identity";
  grid-template-columns: minmax(170px, 210px) minmax(280px, 1fr) minmax(340px, 1.25fr);
  gap: 14px;
  align-items: stretch;
  direction: ltr;
  padding: 14px;
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--shadow-card);
}

.profile-quick-actions,
.profile-stage-strip,
.profile-identity-panel,
.profile-metric-strip,
.profile-card,
.profile-internal-nav {
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(21, 43, 85, 0.055);
}

.profile-quick-actions {
  display: grid;
  gap: 9px;
  align-content: start;
  padding: 14px;
  grid-area: actions;
  direction: rtl;
}

.profile-quick-actions h2,
.profile-card-title h2,
.profile-stage-strip h3 {
  margin: 0;
  color: var(--color-primary-ink);
  font-size: 16px;
  font-weight: 950;
}

.profile-quick-actions .btn {
  width: 100%;
  justify-content: center;
}

.profile-stage-strip {
  display: grid;
  gap: 14px;
  padding: 14px;
  grid-area: stages;
  direction: rtl;
}

.profile-stage-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
  position: relative;
}

.profile-stage-line::before {
  content: "";
  position: absolute;
  inset-inline: 10%;
  top: 24px;
  height: 2px;
  background: linear-gradient(90deg, #d7e3f3, #b8d5ff, #d7e3f3);
}

.profile-stage-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
  color: #6b7890;
  font-size: 11px;
  font-weight: 850;
}

.profile-stage-step > span {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #d8e5f4;
  border-radius: 999px;
  background: #fff;
  color: #1e7bc5;
  box-shadow: 0 10px 22px rgba(31, 61, 122, 0.07);
  z-index: 1;
}

.profile-stage-step svg,
.profile-card-icon svg,
.profile-metric svg,
.profile-photo-change svg {
  width: 20px;
  height: 20px;
}

.profile-stage-step.current {
  color: #168154;
}

.profile-stage-step.current > span {
  background: #e9f7ef;
  border-color: #bfe8d1;
  color: #168154;
}

.profile-stage-step strong {
  min-height: 30px;
  color: var(--color-primary-ink);
  line-height: 1.35;
}

.profile-stage-step small {
  color: #7f8da3;
}

.profile-identity-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  grid-area: identity;
  direction: rtl;
  padding: 14px 16px;
}

.profile-photo-shell {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.profile-photo-frame {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.profile-photo-frame .registrant-avatar {
  position: static;
  width: 112px;
  height: 112px;
  transform: none;
  inset: auto;
}

.profile-photo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.profile-photo-change {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  background: #16366f;
  color: #fff;
}

.profile-photo-delete {
  min-height: 32px;
  color: #b42352;
}

.profile-identity-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-identity-copy h2 {
  margin: 0;
  color: var(--color-primary-ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.25;
}

.profile-status-line {
  margin: 0;
  color: #188052;
  font-weight: 950;
}

.profile-current-chip {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f2fbf7;
  color: #188052;
  border: 1px solid #cfeedd;
}

.profile-current-chip span {
  color: #7b8aa0;
  font-size: 12px;
  font-weight: 850;
}

.profile-current-chip strong {
  color: #188052;
  font-size: 14px;
}

.profile-internal-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 9px;
}

.profile-internal-nav button {
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #dbe6f3;
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 900;
}

.profile-internal-nav button:hover {
  border-color: #aac2e8;
  background: #f6faff;
}

.profile-tab-nav {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 9px;
  border: 1px solid #dce5f1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(21, 43, 85, 0.055);
}

.profile-tab-nav button {
  min-height: 34px;
  padding: 6px 15px;
  border: 1px solid #dbe6f3;
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 900;
  transition: 0.16s ease;
}

.profile-tab-nav button:hover,
.profile-tab-nav button.active {
  border-color: #9fc0ec;
  background: #153c7a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(21, 60, 122, 0.12);
}

.profile-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  overflow: hidden;
}

.person-return-banner {
  margin-bottom: 12px;
  border-color: #cfe4ff;
  background: linear-gradient(90deg, rgba(240, 247, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.profile-metric {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 14px 18px;
  border-inline-start: 1px solid #e3ebf5;
}

.profile-metric:last-child {
  border-inline-start: 0;
}

.profile-metric span {
  color: #7f8da3;
  font-size: 12px;
  font-weight: 850;
}

.profile-metric strong {
  color: var(--color-primary-ink);
  font-size: 17px;
  font-weight: 950;
}

.profile-metric i {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 16px;
  color: #1e9bd7;
}

.profile-section-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.profile-tab-panel {
  scroll-margin-top: 88px;
}

.profile-summary-grid,
.profile-detail-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

.profile-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.profile-detail-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.profile-card {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  align-content: start;
  overflow: visible;
}

.profile-card-wide {
  grid-column: span 2;
}

.profile-card-summary {
  min-height: 0;
}

.profile-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e7eef7;
}

.profile-card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #eef6ff;
  color: #1c80c8;
}

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

.profile-card-wide .profile-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-info-item {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid #eef3f8;
}

.profile-info-item.wide {
  grid-column: span 2;
}

.profile-card-wide .profile-info-item.wide {
  grid-column: span 3;
}

.profile-info-item span {
  color: #7f8da3;
  font-size: 11px;
  font-weight: 850;
}

.profile-info-item strong {
  overflow-wrap: anywhere;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 950;
}

.profile-card-summary .profile-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-card-summary .profile-info-item {
  padding: 6px 0;
}

.profile-card-summary .profile-info-item.wide {
  grid-column: 1 / -1;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-attachment-list,
.profile-note-list {
  display: grid;
  gap: 8px;
}

.profile-attachment-row,
.profile-note-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e4ecf6;
  border-radius: 10px;
  background: #fbfdff;
  color: var(--color-primary-ink);
  text-decoration: none;
}

.profile-attachment-row small,
.profile-note-item small,
.profile-note-item span {
  color: #7f8da3;
  font-size: 11px;
  font-weight: 800;
}

.profile-note-item.important {
  border-color: #ffd3a3;
  background: #fffaf2;
}

.profile-note-item div {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.profile-note-item p {
  margin: 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
}

.profile-summary-list {
  display: grid;
  gap: 8px;
}

.profile-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e4ecf6;
  border-radius: 10px;
  background: #fbfdff;
}

.profile-summary-row strong {
  display: block;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 950;
}

.profile-summary-row span {
  display: block;
  margin-top: 3px;
  color: #7f8da3;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.profile-summary-row-side {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-table-wrap {
  overflow-x: auto;
  border: 1px solid #e6eef7;
  border-radius: 12px;
}

.profile-compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.profile-compact-table th {
  padding: 8px;
  background: #f4f7fb;
  color: #1d355f;
  font-size: 11px;
  font-weight: 950;
}

.profile-compact-table td {
  padding: 8px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-weight: 800;
  vertical-align: middle;
}

.profile-show-all {
  width: 100%;
  justify-content: center;
  min-height: 32px;
}

.profile-empty {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 10px;
  border: 1px dashed #d5e1ef;
  border-radius: 10px;
  background: #fbfdff;
  color: #7f8da3;
  font-size: 12px;
  font-weight: 850;
}

.profile-timeline {
  display: grid;
  gap: 8px;
}

.profile-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
}

.profile-timeline-item::before {
  content: "";
  position: absolute;
  inset-block: 24px -8px;
  inset-inline-start: 8px;
  width: 2px;
  background: #e2ebf5;
}

.profile-timeline-item:last-child::before {
  display: none;
}

.profile-timeline-dot {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 999px;
  border: 3px solid #d8e8fb;
  background: #fff;
}

.profile-timeline-item.current .profile-timeline-dot {
  border-color: #15a66b;
}

.profile-timeline-item strong {
  color: var(--color-primary-ink);
  font-size: 13px;
  font-weight: 950;
}

.profile-timeline-item p {
  margin: 3px 0;
  color: #617089;
  font-size: 12px;
}

.profile-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  color: #7f8da3;
  font-size: 11px;
  font-weight: 800;
}

.profile-detail-grid .profile-stage-strip {
  grid-column: 1 / -1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

.card {
  background: var(--color-surface);
  border: 1px solid rgba(214, 222, 232, 0.88);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 8px 0 18px;
}

.summary-grid article {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.summary-grid article span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.health-summary-grid {
  align-items: stretch;
}

.health-summary-card {
  text-align: start;
  cursor: pointer;
  min-height: 104px;
}

.health-summary-card:disabled {
  cursor: default;
  opacity: 1;
}

.health-summary-card.active,
.health-summary-card:not(:disabled):hover {
  border-color: rgba(37, 75, 151, 0.34);
  background: #f7fbff;
}

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

.metric-strip article {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  min-width: 0;
}

.metric-strip span {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.system-health-page,
.system-health-page * {
  box-sizing: border-box;
  min-width: 0;
}

.system-health-page {
  max-width: 100%;
  overflow: visible;
}

.system-health-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.system-health-intro h2,
.system-health-intro p {
  margin: 0 0 6px;
}

.system-health-intro .btn {
  flex: 0 0 auto;
}

.system-health-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border-inline-start: 5px solid var(--color-primary);
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.health-status-critical {
  border-inline-start-color: #dc2626;
}

.health-status-attention {
  border-inline-start-color: #f59e0b;
}

.health-status-watch {
  border-inline-start-color: #2563eb;
}

.health-status-normal {
  border-inline-start-color: #16a34a;
}

.health-status-main {
  display: grid;
  gap: 5px;
}

.health-status-main span,
.health-status-main small,
.health-data-note span,
.tiny-text {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.health-status-main h2 {
  margin: 0;
  color: var(--color-primary-ink);
  font-size: clamp(22px, 2vw, 30px);
}

.health-status-main p {
  margin: 0;
  color: var(--color-text);
  font-weight: 800;
}

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

.health-manager-summary .health-summary-card {
  text-align: center;
}

.health-data-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 12px;
  border-color: rgba(37, 99, 235, 0.18);
  background: #f8fbff;
}

.health-tab-shell {
  display: grid;
  gap: 16px;
}

.health-main-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.health-main-tabs button {
  min-height: 38px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary-ink);
  cursor: pointer;
  padding: 8px 16px;
  font-weight: 950;
}

.health-main-tabs button.active {
  border-color: var(--color-primary);
  background: var(--color-primary-ink);
  color: #fff;
}

.health-tab-content {
  display: grid;
  gap: 16px;
}

.health-ops-grid,
.health-integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.health-ops-card,
.health-integration-card,
.health-ops-issue {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.health-ops-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
}

.health-ops-card h3,
.health-tab-heading h2,
.health-integration-card strong {
  margin: 0;
  color: var(--color-primary-ink);
}

.health-ops-card p,
.health-integration-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.8;
}

.health-integration-details {
  display: grid;
  gap: 8px;
  margin: 4px 0;
  padding: 10px;
  border: 1px solid rgba(31, 70, 132, 0.08);
  border-radius: 10px;
  background: #f8fbff;
}

.health-integration-details div {
  display: grid;
  grid-template-columns: minmax(92px, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
}

.health-integration-details dt,
.health-integration-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.6;
}

.health-integration-details dt {
  color: var(--color-muted);
}

.health-integration-details dd {
  color: var(--color-primary-ink);
  font-weight: 700;
}

.health-tab-heading {
  margin-top: 2px;
}

.health-ops-list {
  display: grid;
  gap: 10px;
}

.health-ops-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-inline-start-width: 4px;
}

.health-priority-line-critical {
  border-inline-start-color: #dc2626;
}

.health-priority-line-important {
  border-inline-start-color: #f59e0b;
}

.health-priority-line-warning {
  border-inline-start-color: #2563eb;
}

.health-priority-line-resolved {
  border-inline-start-color: #16a34a;
}

.health-priority-line-deferred {
  border-inline-start-color: #64748b;
}

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

.health-ops-issue-title strong {
  color: var(--color-primary-ink);
}

.health-ops-issue p {
  margin: 7px 0;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.75;
}

.health-ops-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.health-ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.compact-empty {
  min-height: 78px;
}

.health-readable-table td:first-child {
  display: grid;
  gap: 3px;
}

.health-integration-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-inline-start-width: 4px;
}

.health-integration-card span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.compact-metric-strip article {
  min-height: 68px;
}

.compact-filters-card {
  margin-top: 6px;
}

.technical-health-groups {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 900px) {
  .system-health-hero,
  .health-ops-issue {
    grid-template-columns: 1fr;
  }

  .health-status-actions,
  .health-ops-actions {
    justify-content: stretch;
  }

  .health-status-actions .btn,
  .health-ops-actions .btn {
    width: 100%;
  }
}

.system-health-filters-card,
.system-health-list-card {
  position: relative;
  overflow: visible;
}

.system-health-filters-card {
  z-index: 80;
}

.system-health-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: end;
  gap: 10px;
  width: 100%;
  overflow: visible;
}

.system-health-filter-grid .multi-select-filter,
.system-health-filter-grid label,
.system-health-filter-grid input,
.system-health-filter-grid select,
.system-health-filter-grid button {
  width: 100%;
  max-width: 100%;
}

.system-health-filter-grid .multi-select-filter {
  min-width: 0;
  max-width: none;
}

.system-health-filter-grid .multi-select-filter[open] {
  z-index: 1500;
}

.system-health-filter-grid .multi-select-menu {
  z-index: 1500;
  max-width: min(300px, calc(100vw - 40px));
}

.system-health-advanced {
  margin-top: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
  overflow: visible;
}

.system-health-advanced > summary {
  padding: 11px 12px;
  color: var(--color-primary-ink);
  cursor: pointer;
  font-weight: 950;
  list-style: none;
}

.system-health-advanced > summary::-webkit-details-marker {
  display: none;
}

.system-health-advanced .system-health-filter-grid {
  padding: 0 12px 12px;
}

.system-health-last-check {
  display: grid;
  gap: 5px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.system-health-last-check span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.results-count {
  color: var(--color-primary-ink);
  background: var(--color-secondary-soft);
  border: 1px solid rgba(89, 188, 189, 0.22);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}

.filters-panel {
  margin: 14px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfcfe;
  scroll-margin-top: 112px;
}

.filters-panel > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 900;
  color: var(--color-primary-ink);
}

.filters-form {
  padding: 0 14px 14px;
}

.health-groups-table table {
  min-width: 1180px;
}

.system-health-list-card .table-wrap,
.health-details-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.health-group-row strong {
  color: var(--color-primary-ink);
}

.health-count-button {
  border: 0;
  border-radius: 999px;
  min-width: 46px;
  padding: 7px 13px;
  background: var(--color-primary);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.health-count-button:hover {
  background: var(--color-primary-ink);
}

.health-priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid transparent;
}

.health-critical {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.health-important {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.health-warning {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.health-deferred {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.health-resolved {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.health-details-row > td {
  background: #f8fafc;
  padding: 0;
}

.health-details-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.health-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.health-detail-summary article {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.health-detail-summary span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.health-detail-summary strong,
.health-groups-table td,
.health-details-panel td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.health-details-head,
.health-bulk-panel,
.health-inline-fix {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.health-details-head {
  justify-content: space-between;
}

.health-bulk-panel {
  justify-content: space-between;
  border: 1px solid rgba(89, 188, 189, 0.22);
  border-radius: var(--radius-lg);
  background: #ffffff;
  padding: 12px;
}

.health-bulk-panel select,
.health-inline-fix select {
  min-width: 210px;
  max-width: 100%;
}

.health-inline-fix {
  margin-top: 8px;
}

.system-health-page [data-health-issue-check],
.system-health-page [data-health-select-all] {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 16px;
  padding: 0;
}

.system-health-action-menu {
  position: relative;
  display: inline-block;
}

.system-health-action-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--color-primary-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
  white-space: nowrap;
}

.system-health-action-menu summary::-webkit-details-marker {
  display: none;
}

.system-health-action-menu > div {
  position: absolute;
  inset-inline-end: 0;
  z-index: 360;
  display: grid;
  gap: 6px;
  width: min(230px, calc(100vw - 42px));
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.health-groups-table .system-health-action-menu > div {
  transform: translateX(100%);
}

.system-health-action-menu button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--color-primary-ink);
  cursor: pointer;
  text-align: right;
  font-weight: 850;
}

.system-health-action-menu button:hover {
  background: #eef3fb;
}

.compact-toolbar {
  gap: 6px;
}

.summary-grid article strong {
  color: var(--color-primary-ink);
  font-size: 14px;
}

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

.stacked-cell {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.stacked-cell strong {
  color: var(--color-primary-ink);
  font-weight: 900;
}

.btn.mini {
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

.applicant-card {
  display: grid;
  gap: 18px;
}

.applicant-card > .toolbar {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.applicant-subsection {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.applicant-subsection:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.applicant-subsection h3,
.applicant-original h3 {
  margin: 0 0 12px;
  color: var(--color-primary-ink);
  font-size: 16px;
  font-weight: 900;
}

.applicant-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.applicant-field {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

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

.applicant-field span {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.applicant-field strong {
  display: block;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.75;
  font-weight: 800;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.applicant-field a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.applicant-original {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.data-review-card {
  border-color: rgba(245, 158, 11, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #fffbf2 100%);
}

.review-reasons,
.review-subsection {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.review-reason-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: #fff8e8;
  color: #7c4a03;
  font-weight: 800;
  line-height: 1.7;
}

.review-reason-item.is-soft {
  border-color: rgba(16, 185, 129, 0.22);
  background: #ecfdf5;
  color: #065f46;
}

.clean-list {
  margin: 0;
  padding: 0 20px 0 0;
  color: var(--color-text);
  line-height: 1.9;
}

.metric {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 18px 20px;
  overflow: hidden;
  text-align: right;
  border: 1px solid rgba(39, 72, 141, 0.11);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.98)),
    #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metric::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
}

.metric::after {
  display: none;
}

.metric:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 188, 189, 0.28);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.075);
}

.dashboard-metric {
  cursor: pointer;
}

.dashboard-metric:focus-visible {
  outline: 3px solid rgba(89, 188, 189, 0.35);
  outline-offset: 3px;
}

.dashboard-page,
.dashboard-page * {
  box-sizing: border-box;
  min-width: 0;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-hero h2 {
  margin: 4px 0;
  color: var(--color-primary-ink);
}

.dashboard-last-updated {
  color: var(--color-muted);
  font-weight: 800;
  font-size: 13px;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-filter-card {
  overflow: visible;
}

.dashboard-filter-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 188, 189, 0.32);
  border-radius: 8px;
  background: rgba(89, 188, 189, 0.08);
  color: var(--color-primary-ink);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-filter-note strong {
  white-space: nowrap;
}

.dashboard-filter-note span {
  color: var(--color-muted);
  font-weight: 800;
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
  gap: 10px;
}

.dashboard-filter-grid label,
.dashboard-filter-grid input,
.dashboard-filter-grid select,
.dashboard-filter-grid button,
.dashboard-filter-grid .multi-select-filter {
  width: 100%;
  max-width: 100%;
}

.dashboard-section-card {
  overflow: visible;
}

.dashboard-section-card .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.dashboard-action-card {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(39, 72, 141, 0.12);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: right;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  outline: none;
}

.dashboard-action-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  color: var(--color-primary);
}

.dashboard-action-card span {
  display: block;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.dashboard-action-card p {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-weight: 800;
  line-height: 1.45;
}

.dashboard-action-card small {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-weight: 800;
}

.dashboard-action-card.priority-critical {
  border-inline-start: 5px solid var(--color-danger);
}

.dashboard-action-card.priority-warning {
  border-inline-start: 5px solid #f59e0b;
}

.dashboard-action-card.priority-info {
  border-inline-start: 5px solid var(--color-primary);
}

.dashboard-action-card.priority-good {
  border-inline-start: 5px solid #16a34a;
}

.dashboard-no-actions {
  padding: 16px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-weight: 900;
}

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

.dashboard-journey-stage {
  padding: 14px;
  border: 1px solid rgba(39, 72, 141, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.88);
}

.dashboard-journey-stage h3 {
  margin: 0 0 10px;
  color: var(--color-primary-ink);
}

.dashboard-journey-stats {
  display: grid;
  gap: 8px;
}

.dashboard-journey-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(39, 72, 141, 0.08);
  border-radius: 8px;
  background: #fff;
  color: var(--color-primary-ink);
  text-align: right;
}

.dashboard-journey-stat strong {
  min-width: 34px;
  color: var(--color-primary);
  font-size: 20px;
}

.dashboard-journey-stat span {
  font-weight: 850;
}

.dashboard-journey-stat.is-zero {
  opacity: 0.58;
}

.dashboard-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.dashboard-period-grid > .empty {
  grid-column: 1 / -1;
}

.dashboard-period-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(39, 72, 141, 0.1);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: var(--color-primary-ink);
  text-align: right;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-period-card:hover,
.dashboard-period-card:focus-visible {
  border-color: rgba(89, 188, 189, 0.55);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
  outline: none;
}

.dashboard-period-card strong {
  color: var(--color-primary);
  font-size: 26px;
  line-height: 1;
}

.dashboard-period-card span {
  color: var(--color-muted);
  font-weight: 900;
  line-height: 1.45;
}

.dashboard-workload-section .table-wrap,
.dashboard-workload-section table {
  width: 100%;
}

.dashboard-workload-section th,
.dashboard-workload-section td {
  white-space: normal;
  vertical-align: middle;
}

.dashboard-pressure-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.dashboard-pressure-badge.pressure-normal {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.dashboard-pressure-badge.pressure-medium {
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
}

.dashboard-pressure-badge.pressure-high {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.dashboard-pressure-badge.pressure-critical {
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.dashboard-section-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-section-title-row h2 {
  margin: 0;
}

.dashboard-pressure-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 150px;
}

.dashboard-pressure-cell small {
  color: var(--color-muted);
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-workload-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(82vh, 780px);
  overflow: auto;
}

.dashboard-guide-modal {
  width: min(620px, calc(100vw - 32px));
}

.dashboard-guide-body {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.9;
}

.dashboard-guide-body p {
  margin: 0;
}

.dashboard-workload-guide-body {
  display: grid;
  gap: 16px;
}

.dashboard-workload-guide-body h3 {
  margin: 0 0 8px;
  color: var(--color-primary-ink);
  font-size: 1rem;
}

.dashboard-workload-guide-body p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.8;
}

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

.dashboard-workload-guide-grid article {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.dashboard-workload-guide-grid strong,
.dashboard-workload-guide-grid span {
  display: block;
}

.dashboard-workload-guide-grid strong {
  color: var(--color-primary-ink);
  margin-bottom: 5px;
}

.dashboard-workload-guide-grid span {
  color: var(--color-primary);
  font-weight: 900;
  margin-bottom: 6px;
}

.dashboard-workload-thresholds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-workload-example {
  border: 1px solid rgba(70, 190, 190, 0.32);
  border-radius: 8px;
  background: rgba(70, 190, 190, 0.08);
  color: var(--color-primary-ink);
  font-weight: 900;
  padding: 12px;
  line-height: 1.8;
}

.dashboard-workload-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-workload-detail-summary > div {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.dashboard-workload-detail-summary span {
  display: block;
  color: var(--color-muted);
  font-weight: 800;
  margin-bottom: 6px;
}

.dashboard-workload-detail-summary strong {
  color: var(--color-primary-ink);
}

.dashboard-workload-detail-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.dashboard-workload-detail-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 10px 12px;
}

.dashboard-workload-detail-list span {
  color: var(--color-muted);
  font-weight: 900;
}

@media (max-width: 760px) {
  .dashboard-workload-guide-grid,
  .dashboard-workload-detail-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-workload-detail-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

.dashboard-changes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 900;
  color: var(--color-primary-ink);
}

.dashboard-changes summary small {
  color: var(--color-muted);
  font-weight: 800;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 900;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.metric strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--color-primary);
  font-weight: 900;
}

.metric span {
  color: var(--color-muted);
  line-height: 1.45;
  font-weight: 800;
}

.metric small {
  margin-top: 10px;
  color: var(--color-secondary-dark);
  font-size: 12px;
  font-weight: 800;
  opacity: 0.82;
}

.report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(89, 188, 189, 0.22);
  background:
    linear-gradient(135deg, rgba(234, 247, 247, 0.9), rgba(255, 255, 255, 0.96) 58%),
    #fff;
}

.report-hero h2 {
  margin: 3px 0 6px;
  color: var(--color-primary-ink);
  font-size: 24px;
}

.eyebrow {
  margin: 0;
  color: var(--color-secondary-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.report-filter-form {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-kpis .metric,
.report-metric {
  min-height: 104px;
}

.report-indicator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.report-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.report-indicator span {
  color: var(--color-muted);
  font-weight: 800;
  line-height: 1.5;
}

.report-indicator strong {
  color: var(--color-primary);
  font-size: 22px;
  font-weight: 900;
}

.indicator-detail-shell {
  display: grid;
  gap: 14px;
}

.indicator-detail-shell .report-section-header {
  align-items: flex-start;
}

.indicator-detail-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.indicator-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.indicator-summary-card {
  min-height: 86px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
}

.indicator-summary-card strong {
  font-size: 20px;
}

.indicator-calculation-card,
.indicator-source-card,
.indicator-related-cases {
  min-width: 0;
}

.indicator-calculation-card.report-detail-block,
.indicator-source-card.report-detail-block,
.indicator-related-cases.report-detail-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #fff;
}

.indicator-calculation-card.report-detail-block h4,
.indicator-source-card.report-detail-block h4,
.indicator-related-cases.report-detail-block h4 {
  margin-top: 0;
}

.indicator-empty-state {
  grid-column: 1 / -1;
  margin: 0;
}

.indicator-technical-details {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  background: var(--color-surface-soft);
}

.indicator-technical-details summary {
  color: var(--color-muted);
}

.report-panel {
  min-width: 0;
  padding: 16px;
}

.report-panel h2 {
  margin-top: 0;
}

.section {
  margin-bottom: 16px;
}

.alert {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: #fff;
  color: var(--color-text);
  font-weight: 800;
}

.alert.warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
  color: #92400e;
}

.alert.info {
  border-color: rgba(89, 188, 189, 0.32);
  background: #eefbfb;
  color: #155e75;
}

.followup-test-admin .alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-row {
  margin-top: 0.35rem;
}

.alert.success {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
  color: #166534;
}

.alert.good {
  border-color: rgba(22, 163, 74, 0.28);
  background: #f0fdf4;
  color: #166534;
}

.autosave-draft-panel {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius-md);
  color: var(--color-text);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.autosave-draft-panel p {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 2px 0 0;
}

.autosave-draft-status {
  color: var(--color-muted);
  display: inline-block;
  font-size: 0.82rem;
  margin-top: 6px;
}

.autosave-draft-status[data-tone="saved"],
.autosave-draft-status[data-tone="restored"],
.autosave-draft-status[data-tone="cleared"] {
  color: #0f766e;
}

.autosave-draft-status[data-tone="saving"] {
  color: #0369a1;
}

.autosave-draft-status[data-tone="error"] {
  color: #b91c1c;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-heading-row h2,
.section-heading-row h3 {
  margin: 0;
}

.criteria-summary .metric {
  min-height: 112px;
}

.criteria-section .table-wrap {
  max-height: none;
}

.criteria-total,
.criteria-warning {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.criteria-total {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid rgba(22, 163, 74, 0.22);
}

.criteria-warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.formula-box {
  margin: 10px 0 12px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(39, 72, 141, 0.18);
  background: linear-gradient(135deg, #f8fbff, #eefbfb);
  color: var(--color-primary-ink);
  font-weight: 900;
}

.criteria-test-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfdff;
}

.criteria-test-panel h3 {
  margin: 0 0 10px;
  color: var(--color-primary-ink);
  font-size: 15px;
  font-weight: 900;
}

.criteria-score-input {
  width: 74px;
  min-width: 74px;
  text-align: center;
  font-weight: 900;
}

.criteria-preview-result {
  margin-top: 14px;
}

.criteria-coverage-section .table-wrap {
  max-height: none;
}

.criteria-coverage-result {
  display: grid;
  gap: 14px;
}

.criteria-coverage-result h3 {
  margin: 4px 0 0;
  color: var(--color-primary-ink);
  font-size: 15px;
  font-weight: 950;
}

.compact-list {
  margin: 0;
  padding-inline-start: 18px;
}

.compact-list li {
  margin: 2px 0;
}

.criteria-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.criteria-result-grid > div {
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(214, 222, 232, 0.88);
  background: #fff;
}

.criteria-result-grid strong,
.criteria-result-grid span {
  display: block;
}

.criteria-result-grid strong {
  color: var(--color-primary);
  font-size: 22px;
  font-weight: 950;
}

.criteria-result-grid span {
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 900;
}

.criteria-page,
.criteria-page * {
  box-sizing: border-box;
  min-width: 0;
}

.criteria-page {
  max-width: 100%;
  overflow-x: hidden;
}

.criteria-page input,
.criteria-page select,
.criteria-page textarea,
.criteria-page button {
  max-width: 100%;
}

.criteria-page input,
.criteria-page select,
.criteria-page textarea {
  width: 100%;
}

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

.criteria-page .grid.two,
.criteria-info-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.criteria-filter-bar {
  align-items: flex-start;
  position: relative;
  z-index: 45;
}

.criteria-filter-bar .multi-select-filter {
  flex: 1 1 220px;
}

.criteria-version-card {
  position: relative;
  z-index: 30;
}

.criteria-draft-summary,
.criteria-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.criteria-draft-summary > div,
.criteria-detail-grid > div {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.criteria-draft-summary span,
.criteria-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
}

.criteria-sections {
  display: grid;
  gap: 14px;
}

.criteria-accordion {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(214, 222, 232, 0.88);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.criteria-accordion summary,
.criteria-compact-details > summary {
  cursor: pointer;
  color: var(--color-primary-ink);
  font-weight: 950;
  list-style: none;
}

.criteria-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
}

.criteria-accordion summary::-webkit-details-marker,
.criteria-compact-details > summary::-webkit-details-marker {
  display: none;
}

.criteria-accordion summary small {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.criteria-summary-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.criteria-open-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--color-primary-ink);
  font-size: 12px;
  font-weight: 900;
}

.criteria-accordion-body {
  padding: 0 16px 16px;
}

.criteria-compact-details {
  overflow: visible;
}

.criteria-compact-details > summary {
  padding: 2px 0 12px;
}

.criteria-custom-test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
}

.criteria-score-list {
  display: grid;
  gap: 8px;
}

.criteria-score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 90px);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(214, 222, 232, 0.88);
  border-radius: 8px;
  background: #fff;
}

.criteria-score-row span,
.criteria-score-row strong,
.criteria-score-row small {
  min-width: 0;
}

.criteria-score-row strong,
.criteria-score-row small {
  display: block;
}

.criteria-score-row strong {
  color: var(--color-primary-ink);
  font-size: 13px;
  line-height: 1.4;
}

.criteria-score-row small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
}

.criteria-page .criteria-score-input {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-weight: 900;
}

.criteria-test-result {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.criteria-guide-text {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--color-text);
  font-family: inherit;
  line-height: 1.7;
}

.criteria-modal-card {
  width: min(760px, calc(100vw - 34px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.criteria-modal-wide {
  width: min(1080px, calc(100vw - 34px));
}

@media (max-width: 980px) {
  .criteria-accordion summary,
  .section-heading-row {
    display: grid;
  }

  .criteria-summary-inline {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .criteria-custom-test-grid,
  .criteria-page .grid.two,
  .criteria-info-grid {
    grid-template-columns: 1fr;
  }

  .criteria-score-row {
    grid-template-columns: 1fr;
  }
}

.copy-line {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--color-border);
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.section-search {
  position: relative;
  margin-bottom: 14px;
}

.section-search input {
  padding-inline-end: 42px;
  min-height: 42px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.section-search-clear {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--color-primary);
  font-weight: 950;
  display: inline-grid;
  place-items: center;
}

.section-search-clear:hover {
  background: var(--color-secondary-soft);
}

.section-search-suggestions {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + 6px);
  z-index: 20;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-md);
}

.section-search-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  text-align: right;
  cursor: pointer;
}

.section-search-suggestion:hover,
.section-search-suggestion:focus-visible {
  outline: none;
  background: var(--color-secondary-soft);
}

.section-search-suggestion strong {
  color: var(--color-primary);
  font-size: 13px;
}

.section-search-suggestion span {
  color: var(--color-muted);
  font-size: 12px;
}

.section-search-suggestion mark {
  color: inherit;
  background: #fff1a8;
  border-radius: 4px;
  padding: 0 2px;
}

.section-search-empty {
  padding: 10px 12px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

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

.form.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form.compact-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.form label {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.form .inline-check {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.form label:has(:required)::after {
  content: "*";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: -10px;
  color: var(--color-danger);
  font-weight: 900;
}

.case-section .form label:has(:required)::after,
.case-accordion .form label:has(:required)::after,
.form-section label:has(:required)::after {
  display: none;
}

.required-star {
  color: var(--color-danger);
  font-weight: 900;
  margin-inline-start: 4px;
}

.case-field-help {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.form-section {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.form-section > h3 {
  margin-bottom: 12px;
  color: var(--color-primary-ink);
  font-size: 16px;
  font-weight: 900;
}

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

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--color-text);
}

.checkbox-line input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.followup-live-summary {
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.case-section,
.case-accordion,
.case-help {
  overflow: hidden;
  scroll-margin-top: 112px;
}

.case-section > summary,
.case-accordion > summary,
.case-help > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  list-style: none;
  text-align: right;
  user-select: none;
}

.case-section > summary::-webkit-details-marker,
.case-accordion > summary::-webkit-details-marker,
.case-help > summary::-webkit-details-marker {
  display: none;
}

.case-section > summary {
  justify-content: flex-start;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(39, 72, 141, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8fbff 0%, #eef6fb 100%);
  color: var(--color-primary-ink);
  font-size: 18px;
  font-weight: 900;
}

.case-section > summary::before {
  content: "\25BE";
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(39, 72, 141, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: var(--color-primary);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.case-section[open] > summary::before {
  content: "\25B4";
  background: var(--color-primary);
  color: #ffffff;
}

.case-accordion {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.case-accordion > summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-inline-start: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  background: rgba(39, 72, 141, 0.035);
  font-size: 15px;
  font-weight: 900;
}

.case-criterion > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(39, 72, 141, 0.18);
  border-radius: 8px;
  background: var(--color-secondary-soft);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.case-criterion[open] > summary::before {
  content: "-";
  background: var(--color-secondary);
  color: #ffffff;
}

.case-criterion > summary > span:first-of-type {
  flex: 1 1 180px;
  color: var(--color-primary-ink);
}

.case-help {
  margin: 10px 0;
  margin-inline-start: 28px;
  padding: 10px 12px;
  border: 1px dashed rgba(39, 72, 141, 0.24);
  border-radius: var(--radius-md);
  background: #f8fbfd;
}

.case-help > summary {
  justify-content: flex-start;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 900;
}

.case-help > summary::before {
  content: "\203A";
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: transparent;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.case-help[open] > summary::before {
  content: "\2304";
  color: var(--color-primary);
}

.case-section > summary:focus-visible,
.case-accordion > summary:focus-visible,
.case-help > summary:focus-visible {
  outline: 3px solid rgba(89, 188, 189, 0.3);
  outline-offset: 2px;
}

.auto-scroll-highlight {
  outline: 3px solid rgba(89, 188, 189, 0.45);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(89, 188, 189, 0.12);
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

.case-help ol {
  margin: 10px 20px 0 0;
  color: var(--color-text);
  line-height: 1.9;
}

.system-suggestion {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(89, 188, 189, 0.35);
  border-radius: var(--radius-md);
  background: var(--color-secondary-soft);
  color: var(--color-text);
}

.system-suggestion strong {
  color: var(--color-primary);
}

.system-suggestion span {
  display: inline-block;
  margin-inline-start: 6px;
  color: var(--color-secondary-dark);
  font-weight: 900;
}

.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 6px 0 12px;
  padding: 6px 12px;
  border: 1px solid rgba(89, 188, 189, 0.32);
  border-radius: 999px;
  background: var(--color-secondary-soft);
  color: var(--color-primary-ink);
  font-weight: 900;
}

.interview-case-header {
  display: grid;
  gap: 14px;
}

.interview-case-heading {
  align-items: flex-start;
}

.interview-case-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.interview-case-metric {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(89, 188, 189, 0.28);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #ffffff 0%, #f6fbfc 100%);
  color: var(--color-primary-ink);
  text-align: right;
  box-shadow: 0 10px 20px rgba(13, 35, 73, 0.04);
}

.interview-case-metric:hover,
.interview-case-metric:focus-visible {
  border-color: rgba(89, 188, 189, 0.62);
  box-shadow: 0 0 0 4px rgba(89, 188, 189, 0.13), 0 10px 22px rgba(13, 35, 73, 0.06);
}

.interview-case-metric span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 850;
}

.interview-case-metric strong {
  color: var(--color-primary);
  font-size: 26px;
  line-height: 1;
}

.interview-case-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
}

.case-study-section-card {
  --section-accent: var(--color-primary);
  --section-accent-dark: var(--color-primary-ink);
  --section-bg: #f5f8ff;
  --section-border: rgba(42, 83, 167, 0.24);
  --section-focus: rgba(42, 83, 167, 0.18);
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  min-height: 112px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid var(--section-border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--color-text);
  text-align: right;
  box-shadow: 0 12px 26px rgba(13, 35, 73, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.case-study-section-card--appointments {
  --section-accent: #16a6a5;
  --section-accent-dark: #0f766e;
  --section-bg: #eefdfc;
  --section-border: rgba(22, 166, 165, 0.32);
  --section-focus: rgba(22, 166, 165, 0.18);
}

.case-study-section-card--studies {
  --section-accent: var(--color-primary);
  --section-accent-dark: var(--color-primary-ink);
  --section-bg: #eef5ff;
  --section-border: rgba(42, 83, 167, 0.30);
  --section-focus: rgba(42, 83, 167, 0.18);
}

.case-study-section-card::before {
  content: "";
  position: absolute;
  inset-block: 16px;
  inset-inline-start: 0;
  width: 5px;
  border-radius: 999px;
  background: var(--section-accent);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.case-study-section-card__indicator {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px var(--section-border), 0 8px 18px rgba(13, 35, 73, 0.06);
}

.case-study-section-card__indicator::before,
.case-study-section-card__indicator::after {
  content: "";
  position: absolute;
}

.case-study-section-card--appointments .case-study-section-card__indicator::before {
  top: 10px;
  left: 10px;
  width: 17px;
  height: 16px;
  border: 2px solid var(--section-accent-dark);
  border-radius: 5px;
  box-shadow: inset 0 5px 0 rgba(22, 166, 165, 0.16);
}

.case-study-section-card--appointments .case-study-section-card__indicator::after {
  top: 14px;
  left: 14px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--section-accent-dark);
  box-shadow: -8px 0 0 var(--section-accent-dark);
}

.case-study-section-card--studies .case-study-section-card__indicator::before {
  top: 9px;
  left: 11px;
  width: 16px;
  height: 19px;
  border: 2px solid var(--section-accent-dark);
  border-radius: 5px;
}

.case-study-section-card--studies .case-study-section-card__indicator::after {
  top: 16px;
  left: 14px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: var(--section-accent-dark);
  box-shadow: 0 5px 0 var(--section-accent-dark);
}

.case-study-section-card__content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.case-study-section-card__content strong {
  color: var(--color-primary-ink);
  font-size: 18px;
  line-height: 1.35;
}

.case-study-section-card__content span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.case-study-section-card__side {
  display: grid;
  gap: 7px;
  justify-items: end;
  align-content: center;
  min-width: 76px;
}

.case-study-section-card__count {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 42px;
  padding: 5px 12px;
  border-radius: 16px;
  background: var(--section-bg);
  color: var(--section-accent-dark);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px var(--section-border);
}

.case-study-section-card__badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--section-accent-dark);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  box-shadow: inset 0 0 0 1px var(--section-border);
}

.case-study-section-card:hover,
.case-study-section-card:focus-visible {
  border-color: var(--section-accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--section-bg) 100%);
  box-shadow: 0 0 0 4px var(--section-focus), 0 14px 28px rgba(13, 35, 73, 0.08);
  transform: translateY(-1px);
}

.case-study-section-card:active {
  transform: translateY(0);
  box-shadow: 0 0 0 3px var(--section-focus), 0 8px 18px rgba(13, 35, 73, 0.06);
}

.case-study-section-card--active {
  border-color: var(--section-accent);
  background: linear-gradient(180deg, var(--section-bg) 0%, #ffffff 100%);
  box-shadow: inset 0 3px 0 var(--section-accent), 0 14px 30px rgba(13, 35, 73, 0.10);
}

.case-study-section-card--active::before {
  opacity: 1;
}

.case-study-section-card--active .case-study-section-card__indicator {
  background: var(--section-accent);
  box-shadow: 0 10px 22px var(--section-focus);
}

.case-study-section-card--active .case-study-section-card__indicator::before {
  border-color: #ffffff;
}

.case-study-section-card--active.case-study-section-card--appointments .case-study-section-card__indicator::after {
  background: #ffffff;
  box-shadow: -8px 0 0 #ffffff;
}

.case-study-section-card--active.case-study-section-card--studies .case-study-section-card__indicator::after {
  background: #ffffff;
  box-shadow: 0 5px 0 #ffffff;
}

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

.case-study-workspace {
  display: grid;
  gap: 14px;
}

.case-responsibility-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.case-progress-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(89, 188, 189, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f7fcfc 100%);
}

.case-progress-panel h3 {
  margin: 0 0 4px;
  color: var(--color-primary-ink);
}

.case-progress-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.case-progress-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num status";
  gap: 2px 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  text-align: right;
}

.case-progress-step span {
  grid-area: num;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-secondary-soft);
  color: var(--color-primary);
  font-weight: 950;
}

.case-progress-step strong {
  grid-area: title;
  color: var(--color-primary-ink);
  font-size: 13px;
}

.case-progress-step small {
  grid-area: status;
  color: var(--color-muted);
  font-weight: 800;
}

.case-progress-step[data-status="مكتملة"] {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--color-success-soft);
}

.case-progress-step[data-status="تحتاج مراجعة"] {
  border-color: rgba(245, 158, 11, 0.34);
  background: var(--color-warning-soft);
}

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

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

.case-basic-grid .wide,
.case-basic-grid label.wide,
.case-interview-grid .wide,
.case-interview-grid label.wide {
  grid-column: 1 / -1;
}

.form-field-group {
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--color-primary-ink);
  font-weight: 900;
}

.case-multi-field {
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.case-other-input {
  margin-top: 6px;
}

.case-other-wrap {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.case-other-wrap[hidden] {
  display: none;
}

.case-multi-field .case-field-help {
  margin-top: -2px;
}

.case-section-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.case-completion-pill {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--color-info-soft);
  color: var(--color-primary);
  font-weight: 900;
}

.case-completion-draft-badge {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--color-warning-soft);
  color: var(--color-warning-strong);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.case-missing-panel {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: var(--radius-lg);
  background: var(--color-danger-soft);
}

.case-missing-panel h3 {
  margin: 0 0 4px;
  color: var(--color-danger);
}

.case-missing-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.case-missing-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.case-missing-item strong {
  color: var(--color-primary-ink);
}

.case-missing-item span {
  color: var(--color-muted);
  font-weight: 800;
}

.case-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 0 0;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, #ffffff 52%);
}

@media (max-width: 1180px) {
  .interview-case-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .case-responsibility-card,
  .case-missing-item {
    grid-template-columns: 1fr;
    display: grid;
  }

  .interview-case-metrics,
  .case-basic-grid,
  .case-interview-grid {
    grid-template-columns: 1fr;
  }

  .interview-case-tabs {
    grid-template-columns: 1fr;
  }

  .case-study-section-card {
    min-height: 104px;
    padding: 16px;
  }
}

@media (max-width: 560px) {
  .case-study-section-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 10px;
    border-radius: var(--radius-lg);
  }

  .case-study-section-card__indicator {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .case-study-section-card__content strong {
    font-size: 16px;
  }

  .case-study-section-card__content span {
    font-size: 12px;
  }

  .case-study-section-card__side {
    grid-column: 2;
    justify-self: start;
    justify-items: start;
    min-width: 0;
  }

  .case-study-section-card__count {
    min-width: 46px;
    min-height: 36px;
    font-size: 23px;
    border-radius: 14px;
  }
}

.system-suggestion p {
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: white;
  color: var(--color-text);
  padding: 9px 11px;
  min-height: 38px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(89, 188, 189, 0.16);
}

.time-picker-field {
  position: relative;
  width: 100%;
  max-width: 100%;
  direction: rtl;
  box-sizing: border-box;
}

.time-picker-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}

.time-picker-field:focus-within .time-picker-control {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 4px rgba(89, 188, 189, 0.16);
}

.time-picker-display {
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  padding: 8px 11px;
  text-align: right;
}

.time-picker-display:focus {
  box-shadow: none;
}

.time-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  border-inline-start: 1px solid var(--color-border);
  background: #f8fbfd;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.time-picker-popover {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 6px);
  z-index: 420;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100vw - 40px));
  max-width: 100vw;
  padding: 12px;
  border: 1px solid rgba(20, 46, 82, 0.14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.time-picker-popover[hidden] {
  display: none;
}

.time-picker-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.time-picker-quick {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(39, 72, 141, 0.12);
  border-radius: 8px;
  background: #f4f8fb;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.time-picker-quick:hover,
.time-picker-quick:focus {
  border-color: var(--color-secondary);
  background: var(--color-secondary-soft);
}

.time-picker-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.time-picker-select-grid label {
  min-width: 0;
  gap: 5px;
}

.time-picker-select-grid .btn {
  grid-column: 1 / -1;
  justify-content: center;
}

.time-picker-error {
  margin-top: 5px;
  color: var(--color-danger);
  font-size: 12px;
  font-weight: 800;
}

.time-picker-invalid .time-picker-control {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 4px rgba(222, 72, 72, 0.12);
}

.accent-card {
  border-color: rgba(89, 188, 189, 0.35);
  background:
    linear-gradient(180deg, rgba(234, 247, 247, 0.55), rgba(255, 255, 255, 0.98));
}

.ready-matching-page {
  overflow: visible;
}

.ready-matching-filters {
  align-items: end;
}

.ready-selected-card,
.ready-results-header {
  display: grid;
  gap: 14px;
}

.ready-selected-header,
.ready-results-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.ready-selected-header h2,
.ready-results-header h2 {
  margin-bottom: 4px;
}

.ready-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.ready-summary-grid article {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
}

.ready-summary-grid article span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.ready-summary-grid article strong {
  color: var(--color-primary-ink);
  font-size: 14px;
  line-height: 1.6;
}

.small-text {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

@media (max-width: 900px) {
  .ready-selected-header,
  .ready-results-header {
    grid-template-columns: 1fr;
  }
}

.match-score-details {
  min-width: 240px;
}

.match-score-details summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 900;
}

.match-score-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.match-score-section h3 {
  margin: 0 0 10px;
  color: var(--color-primary-ink);
  font-size: 1rem;
}

.match-score-total {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--color-secondary-soft);
  color: var(--color-primary);
  font-weight: 900;
}

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

.btn {
  min-height: 36px;
  padding: 7px 13px;
  border-radius: var(--radius-md);
  background: #eef2f7;
  color: var(--color-primary-ink);
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn.is-loading,
button.is-loading,
a.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(39, 72, 141, 0.22);
  border-block-start-color: currentColor;
  border-radius: 999px;
  animation: spin 0.72s linear infinite;
  vertical-align: middle;
}

.global-loading-indicator {
  position: fixed;
  inset-inline-start: 18px;
  inset-block-end: 18px;
  z-index: var(--z-loading);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(320px, calc(100vw - 36px));
  padding: 10px 13px;
  border: 1px solid rgba(39, 72, 141, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-primary-ink);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.13);
  font-weight: 900;
}

.loading-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dashboard-refreshing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 8px;
  color: var(--color-primary);
  font-weight: 900;
}

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

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 61, 122, 0.12);
}

#notificationsButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef3f8;
}

#notificationsButton.has-unread {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(39, 72, 141, 0.18);
}

.notification-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--color-secondary);
  color: #073e47;
  font-size: 12px;
  font-weight: 900;
}

.btn.primary {
  background: var(--color-primary);
  color: white;
}

.btn.primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
}

.btn.warning {
  background: var(--color-warning-soft);
  color: #a16207;
  border-color: rgba(245, 158, 11, 0.2);
}

.btn.danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.18);
}

.btn.manager {
  background: var(--color-secondary-soft);
  color: #0d6468;
  border-color: rgba(89, 188, 189, 0.28);
}

.link-action {
  min-height: 34px;
  padding: 6px 0;
  background: transparent;
  color: var(--color-primary);
  font-weight: 900;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quick-assign {
  min-width: 190px;
}

.quick-assign-select {
  min-width: 250px;
}

.registration-page {
  display: grid;
  gap: 14px;
}

.registration-filters,
.registration-results-toolbar,
.registration-pagination,
.registration-bulk-panel {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.registration-filters {
  position: relative;
  z-index: 25;
  background: #fff;
}

.registration-filters label,
.registration-results-toolbar label {
  min-width: 190px;
}

.registration-results-toolbar {
  justify-content: space-between;
}

.multi-select-filter {
  position: relative;
  min-width: 190px;
}

.multi-select-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-primary-ink);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.multi-select-filter summary::-webkit-details-marker {
  display: none;
}

.multi-select-filter summary::after {
  content: "⌄";
  font-size: 13px;
  color: var(--color-muted);
}

.multi-select-filter[open] summary {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(89, 188, 189, 0.12);
}

.multi-select-menu {
  position: fixed;
  top: var(--multi-select-menu-top, 0);
  left: var(--multi-select-menu-left, 0);
  z-index: 140;
  width: var(--multi-select-menu-width, min(320px, 92vw));
  max-height: var(--multi-select-menu-max-height, 360px);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(20, 46, 82, 0.14);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.multi-select-actions,
.filter-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.multi-select-actions {
  margin-bottom: 8px;
}

.multi-select-search {
  width: 100%;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
}

.multi-select-options {
  display: grid;
  gap: 4px;
}

.multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.multi-select-option:hover {
  background: #f4f8fb;
}

.filter-chip-list {
  align-items: center;
  margin-top: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(89, 188, 189, 0.3);
  border-radius: 999px;
  background: #f5fbfb;
  color: var(--color-primary-ink);
  font-weight: 800;
  cursor: pointer;
}

.registration-bulk-panel {
  padding: 10px 12px;
  border: 1px solid rgba(89, 188, 189, 0.28);
  border-radius: var(--radius-lg);
  background: #f5fbfb;
}

.registration-table-wrap th,
.registration-table-wrap td {
  vertical-align: middle;
}

.table-wrap.registration-requests-table-wrap table {
  width: 100%;
  min-width: max-content;
}

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

.sortable-header {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-primary-ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.sortable-header:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.select-search-wrapper {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: min(100%, 220px);
  position: relative;
}

.select-search-wrapper[hidden] {
  display: none;
}

.select-search-input {
  width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(89, 188, 189, 0.34);
  border-radius: var(--radius-md);
  background: #fbfefe;
  color: var(--color-text);
  font: inherit;
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.select-search-input:focus {
  border-color: var(--color-secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(89, 188, 189, 0.14);
}

.select-search-input::placeholder {
  color: #8b96a6;
}

.select-search-suggestions {
  position: absolute;
  inset-block-start: calc(34px + 6px);
  inset-inline: 0;
  z-index: 90;
  max-height: 270px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(39, 72, 141, 0.15);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.select-search-suggestions[hidden] {
  display: none;
}

.select-search-option {
  width: 100%;
  min-height: 34px;
  display: block;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--color-primary-ink);
  padding: 7px 10px;
  text-align: right;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.select-search-option:hover,
.select-search-option.is-active {
  background: var(--color-secondary-soft);
  color: var(--color-primary);
}

.select-search-empty {
  padding: 7px 10px;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.live-search-label {
  position: relative;
}

.live-search-results {
  inset-block-start: calc(100% + 8px);
  text-align: right;
}

.table-wrap {
  overflow: visible;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

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

.first-meeting-table-wrap table {
  min-width: 1320px;
}

.trial-filter-grid {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
  background: #fff;
}

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

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

.trial-period-table-wrap table {
  min-width: 1380px;
}

.trial-alert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.trial-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-secondary-soft);
  color: var(--color-primary-ink);
  border: 1px solid rgba(89, 188, 189, 0.22);
}

.selected-trial-panel,
.trial-action-panel {
  scroll-margin-top: 112px;
}

.trial-action-panel:focus {
  outline: none;
}

.trial-action-panel:focus-visible {
  outline: 3px solid rgba(89, 188, 189, 0.3);
  outline-offset: 3px;
}

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

.validation-list {
  border: 1px solid rgba(184, 65, 65, 0.22);
  border-radius: var(--radius-md);
  background: #fff5f5;
  color: #8b1e1e;
  padding: 10px 12px;
}

.validation-list ul {
  margin: 8px 0 0;
  padding-inline-start: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: right;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

th {
  background: #f3f6fb;
  font-size: 12px;
  color: var(--color-primary-ink);
  position: sticky;
  top: 0;
  z-index: 4;
  font-weight: 900;
  box-shadow: 0 1px 0 var(--color-border), 0 8px 14px rgba(15, 23, 42, 0.045);
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover {
  background: #fbfdff;
}

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

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 900;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status.info {
  background: var(--color-info-soft);
  color: var(--color-primary);
  border-color: rgba(39, 72, 141, 0.14);
}

.status.good {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: rgba(22, 163, 74, 0.16);
}

.status.wait {
  background: var(--color-warning-soft);
  color: #a16207;
  border-color: rgba(245, 158, 11, 0.16);
}

.status.risk {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.14);
}

.status.status-success {
  background: var(--color-success-soft);
  color: var(--color-success);
  border-color: rgba(22, 163, 74, 0.16);
}

.status.status-warning {
  background: var(--color-warning-soft);
  color: #a16207;
  border-color: rgba(245, 158, 11, 0.16);
}

.status.status-danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.14);
}

.status-with-reason {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  vertical-align: middle;
}

.status-reason-button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--color-warning-soft);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.28);
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
}

.status-reason-button:hover {
  background: #ffefd1;
}

.status-reason-popover {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 80;
  width: min(330px, 72vw);
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: var(--radius-md);
  background: #fffaf0;
  color: #4b3515;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
  font-size: 13px;
  line-height: 1.8;
  text-align: right;
  white-space: normal;
}

.status-reason-popover::before {
  content: "";
  position: absolute;
  inset-block-start: -7px;
  inset-inline-end: 16px;
  width: 12px;
  height: 12px;
  border-block-start: 1px solid rgba(245, 158, 11, 0.32);
  border-inline-start: 1px solid rgba(245, 158, 11, 0.32);
  background: #fffaf0;
  transform: rotate(45deg);
}

.status-reason-popover strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary);
  font-weight: 900;
}

.status-reason-popover p {
  margin: 0;
}

.status-reason-popover ul {
  margin: 0;
  padding-inline-start: 18px;
}

.status-reason-popover li + li {
  margin-top: 4px;
}

.scores {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px minmax(220px, 2fr) 92px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfcfe;
}

.score-row .points {
  background: var(--color-secondary-soft);
  color: #0d6468;
  border-radius: var(--radius-md);
  min-height: 44px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.bar {
  height: 12px;
  border-radius: 999px;
  background: #edf1f7;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  max-width: min(460px, calc(100vw - 40px));
  background: var(--color-primary-ink);
  color: white;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  z-index: var(--z-toast);
  font-weight: 800;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-muted);
  background: #fbfcfe;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-tabs .btn {
  min-height: 36px;
  padding: 8px 12px;
}

.auth-card {
  max-width: 680px;
}

.raw-json {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 420px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #f8fafc;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(4px);
  isolation: isolate;
  z-index: var(--modal-stack-z, var(--z-modal));
}

#modalRoot:empty {
  display: none;
}

.modal-card {
  width: min(540px, 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: white;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.modal-card p {
  color: var(--color-muted);
}

.modal-card textarea {
  width: 100%;
  min-height: 110px;
}

.person-basic-data-edit-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.person-basic-data-edit-modal .forms-modal-head {
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--color-border);
}

.person-basic-data-edit-modal .forms-modal-head p {
  margin: 4px 0 0;
}

.person-basic-data-edit-form {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.person-basic-data-edit-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px 20px;
  overscroll-behavior: contain;
}

.person-basic-data-edit-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  background: #fff;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
}

.person-basic-data-edit-footer .btn {
  min-width: 132px;
}

.classification-correction-modal {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 42px);
  overflow: auto;
}

.classification-correction-modal .forms-modal-head {
  align-items: flex-start;
}

.classification-correction-modal .forms-modal-head p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-weight: 800;
}

.classification-correction-form {
  display: grid;
  gap: 16px;
}

.classification-current-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(89, 188, 189, 0.36);
  border-radius: 10px;
  background: linear-gradient(180deg, #f6fcfc, #fff);
}

.classification-current-card span,
.classification-current-card small {
  color: var(--color-muted);
  font-weight: 850;
}

.classification-current-card strong {
  color: var(--color-primary-ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.classification-choice-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.classification-choice-fieldset legend {
  margin-bottom: 10px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

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

.classification-choice-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--color-primary-ink);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.classification-choice-card:hover {
  border-color: rgba(89, 188, 189, 0.65);
  background: #fbffff;
  box-shadow: 0 12px 26px rgba(31, 61, 122, 0.075);
}

.classification-choice-card.disabled {
  cursor: default;
  opacity: 0.72;
  background: #f8fafc;
}

.classification-choice-card.disabled:hover {
  border-color: var(--color-border);
  box-shadow: none;
}

.classification-choice-card:has(input:focus-visible) {
  outline: 3px solid rgba(89, 188, 189, 0.28);
  outline-offset: 2px;
}

.classification-choice-card:has(input:checked) {
  border-color: var(--color-primary);
  background: #f0f6ff;
  box-shadow: inset 4px 0 0 var(--color-secondary), 0 14px 28px rgba(31, 61, 122, 0.09);
}

.classification-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.classification-choice-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(39, 72, 141, 0.34);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

.classification-choice-card:has(input:checked) .classification-choice-indicator {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.classification-choice-card strong,
.classification-choice-card small {
  grid-column: 2;
  display: block;
}

.classification-choice-card strong {
  font-size: 1rem;
  font-weight: 950;
}

.classification-choice-card small {
  color: var(--color-muted);
  font-weight: 800;
}

.classification-impact-panel,
.classification-impact-placeholder,
.classification-impact-empty {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
  padding: 14px;
}

.classification-impact-panel {
  display: grid;
  gap: 12px;
}

.classification-impact-panel.success {
  border-color: rgba(22, 163, 74, 0.22);
  background: #f7fdf9;
}

.classification-impact-panel.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: #fffaf0;
}

.classification-impact-panel.danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fff7f7;
}

.classification-impact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.classification-impact-head strong {
  color: var(--color-primary-ink);
  font-size: 1rem;
  font-weight: 950;
}

.classification-affected-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.classification-affected-grid article {
  padding: 10px;
  border: 1px solid rgba(214, 222, 232, 0.8);
  border-radius: 8px;
  background: #fff;
}

.classification-affected-grid strong,
.classification-affected-grid span {
  display: block;
}

.classification-affected-grid strong {
  color: var(--color-primary);
  font-size: 1.3rem;
  font-weight: 950;
}

.classification-affected-grid span {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.classification-impact-list {
  padding: 10px 12px;
  border: 1px solid rgba(214, 222, 232, 0.8);
  border-radius: 8px;
  background: #fff;
}

.classification-impact-list.danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: var(--color-danger-soft);
}

.classification-impact-list.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--color-warning-soft);
}

.classification-impact-list.info {
  border-color: rgba(39, 72, 141, 0.18);
  background: var(--color-info-soft);
}

.classification-impact-list.success {
  border-color: rgba(22, 163, 74, 0.22);
  background: var(--color-success-soft);
}

.classification-impact-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.classification-impact-list ul {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--color-text);
  font-weight: 800;
  line-height: 1.75;
}

.classification-impact-placeholder,
.classification-impact-empty {
  color: var(--color-muted);
  font-weight: 850;
  text-align: center;
}

.classification-reason-field {
  display: grid;
  gap: 8px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.classification-sensitive-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 10px;
  background: var(--color-warning-soft);
  color: #8a5200;
  font-weight: 900;
  line-height: 1.7;
}

.classification-sensitive-confirm input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.profile-card-action {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.compatibility-audit-section {
  display: grid;
  gap: 14px;
}

.compatibility-audit-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: #fbfdff;
}

.compatibility-audit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.compatibility-audit-header h4,
.comparison-values h4 {
  margin: 0 0 6px;
  color: var(--color-primary-ink);
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.comparison-grid {
  align-items: start;
}

.comparison-values {
  min-width: 0;
}

.comparison-notes .table-wrap,
.comparison-values .table-wrap {
  margin-top: 6px;
}

.manual-review-panel {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px dashed rgba(89, 188, 189, 0.55);
  border-radius: var(--radius-md);
  background: var(--color-secondary-soft);
}

.manual-review-panel label {
  display: grid;
  gap: 7px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.manual-review-panel textarea {
  min-height: 84px;
}

.match-score-warning,
.match-low-score-note {
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: #8a4b08;
  font-weight: 800;
  line-height: 1.7;
}

.match-low-score-note {
  font-size: 12px;
  font-weight: 700;
}

.match-exception-modal label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.user-edit-modal-card {
  width: min(860px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.users-page,
.users-page *,
.user-management-modal,
.user-management-modal * {
  box-sizing: border-box;
  min-width: 0;
}

.users-page {
  max-width: 100%;
  overflow: visible;
}

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

.users-page table {
  min-width: 960px;
}

.users-page input,
.users-page select,
.users-page textarea,
.users-page button,
.user-management-modal input,
.user-management-modal select,
.user-management-modal textarea,
.user-management-modal button {
  max-width: 100%;
}

.user-management-modal input,
.user-management-modal select,
.user-management-modal textarea {
  width: 100%;
}

.users-smtp-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.users-smtp-alert.success {
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 10px;
  background: #f0fdf4;
  color: #166534;
}

.grid.seven,
.users-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.users-summary .metric {
  min-height: 92px;
  cursor: pointer;
}

.users-filter-bar {
  align-items: flex-start;
  position: relative;
  z-index: 80;
  margin-bottom: 10px;
}

.users-list-card {
  position: relative;
  z-index: 70;
  overflow: visible;
}

.users-filter-bar .multi-select-filter {
  flex: 1 1 200px;
  position: relative;
  z-index: 1;
}

.users-filter-bar .multi-select-filter[open] {
  z-index: 1400;
}

.users-filter-bar .multi-select-menu {
  z-index: 1400;
  pointer-events: auto;
}

.user-email-cell {
  display: inline-block;
  max-width: 260px;
  overflow-wrap: anywhere;
  word-break: break-word;
  direction: ltr;
  text-align: left;
}

.user-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.support-action {
  background: var(--color-warning-soft);
  color: #8a5200;
}

.support-action:hover {
  background: #ffedd5;
}

.user-action-menu {
  position: relative;
  display: inline-block;
}

.user-action-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--color-primary-ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
  white-space: nowrap;
}

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

.user-action-menu > div {
  position: absolute;
  inset-inline-start: auto;
  inset-inline-end: 0;
  z-index: 260;
  display: grid;
  gap: 6px;
  width: min(240px, calc(100vw - 42px));
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.users-page .table-wrap .user-action-menu > div {
  transform: translateX(100%);
}

.user-action-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--color-primary-ink);
  cursor: pointer;
  text-align: right;
  font-weight: 850;
}

.user-action-menu button:hover {
  background: #eef3fb;
}

.user-action-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.user-management-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
}

.user-management-modal .form,
.user-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.user-management-modal .form label:has(:required)::after {
  inset-inline-start: 2px;
}

.user-account-form {
  gap: 14px;
}

.user-account-form .form-section {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
}

.user-account-form .form-section legend {
  padding: 0 6px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.switch-field {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.switch-field input {
  flex: 0 0 auto;
  width: 38px;
  inline-size: 38px;
  min-width: 38px;
  height: 20px;
  block-size: 20px;
  min-height: 20px;
  padding: 0;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid rgba(39, 72, 141, 0.22);
  border-radius: 999px;
  background: #d8e1ed;
  position: relative;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.switch-field input::before {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-end: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  transition: transform 0.16s ease;
}

.switch-field input:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.switch-field input:checked::before {
  transform: translateX(-18px);
}

[dir="rtl"] .switch-field input:checked::before {
  transform: translateX(18px);
}

.switch-field input:focus-visible {
  outline: 3px solid rgba(89, 188, 189, 0.3);
  outline-offset: 2px;
}

.switch-card {
  min-height: 0;
}

.switch-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.switch-copy strong {
  color: var(--color-primary-ink);
  font-weight: 950;
}

.switch-copy small {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.55;
}

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

.user-permissions-profile {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(89, 188, 189, 0.28);
  border-radius: 10px;
  background: #f3fbfb;
}

.user-permissions-profile > div {
  display: grid;
  gap: 3px;
}

.user-permissions-profile span,
.permission-option small {
  color: var(--color-muted);
  font-weight: 750;
}

.user-permissions-profile strong {
  color: var(--color-primary-ink);
  font-weight: 950;
}

.user-permissions-groups {
  display: grid;
  gap: 12px;
}

.permission-group {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
}

.permission-group legend {
  padding: 0 6px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.permission-option-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.permission-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.permission-option:hover {
  border-color: rgba(89, 188, 189, 0.65);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.permission-option.selected {
  border-color: rgba(34, 76, 147, 0.65);
  background: #f1f7ff;
  box-shadow: inset 0 3px 0 var(--color-accent);
}

.permission-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--color-primary);
}

.permission-option-body {
  display: grid;
  gap: 6px;
}

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

.permission-option-title strong {
  color: var(--color-primary-ink);
  font-weight: 950;
}

.permission-option-title em,
.permission-source {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}

.permission-option-title em {
  background: #fff7ed;
  color: #9a3412;
}

.permission-source.role,
.permission-source.allow {
  background: #e8f8f5;
  color: #0f766e;
}

.permission-source.deny {
  background: #fff1f2;
  color: #be123c;
}

.permission-source.none {
  background: #f1f5f9;
  color: #64748b;
}

.user-permissions-actions {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.email-preferences-profile {
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(130px, 1fr));
}

.user-email-preferences-form,
.email-settings-modal {
  display: grid;
  gap: 14px;
}

.email-pref-master {
  padding: 14px;
  border: 1px solid rgba(89, 188, 189, 0.32);
  border-radius: 10px;
  background: #f3fbfb;
}

.email-pref-groups {
  display: grid;
  gap: 12px;
}

.email-pref-group {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
}

.email-pref-group legend {
  padding: 0 6px;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.email-pref-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.email-pref-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  min-height: 94px;
  padding: 12px;
  border: 1px solid rgba(214, 222, 232, 0.9);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.email-pref-option:hover {
  border-color: rgba(89, 188, 189, 0.65);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.email-pref-option.selected {
  border-color: rgba(34, 76, 147, 0.65);
  background: #f1f7ff;
  box-shadow: inset 0 3px 0 var(--color-accent);
}

.email-pref-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--color-primary);
}

.email-pref-option span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.email-pref-option strong {
  color: var(--color-primary-ink);
  font-weight: 950;
}

.email-pref-option small {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.55;
}

.email-pref-option em {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: #eef6ff;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

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

.smtp-status-grid > div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fbfdff;
}

.smtp-status-grid span {
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.smtp-status-grid strong {
  overflow-wrap: anywhere;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.email-test-form {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.support-impersonation-form {
  gap: 14px;
}

.support-target-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(89, 188, 189, 0.32);
  border-radius: 10px;
  background: #f3fbfb;
}

.support-target-card span,
.support-target-card small {
  color: var(--color-muted);
  font-weight: 800;
}

.support-target-card strong {
  color: var(--color-primary-ink);
  font-size: 1.08rem;
  font-weight: 950;
}

.support-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.support-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(39, 72, 141, 0.22);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.support-mode-option.selected {
  border-color: rgba(39, 72, 141, 0.72);
  background: #f1f7ff;
  box-shadow: inset 0 3px 0 var(--color-secondary);
}

.support-mode-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--color-primary);
}

.support-mode-option span {
  display: grid;
  gap: 5px;
}

.support-mode-option strong {
  color: var(--color-primary-ink);
  font-weight: 950;
}

.support-mode-option small {
  color: var(--color-muted);
  font-weight: 800;
  line-height: 1.55;
}

.user-email-section {
  display: grid;
  gap: 12px;
}

.user-setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(39, 72, 141, 0.1);
  border-radius: 8px;
  background: #fff;
}

.user-setting-card .status {
  flex: 0 0 auto;
}

.user-helper-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(214, 222, 232, 0.8);
  border-radius: 8px;
  background: #fff;
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.7;
}

.user-helper-note.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--color-warning-soft);
  color: #8a5200;
}

.user-helper-note.success {
  border-color: rgba(22, 163, 74, 0.22);
  background: var(--color-success-soft);
  color: #146c36;
}

.user-password-panel,
.user-activity-panel,
.users-role-summary {
  overflow: visible;
}

.user-password-panel > summary,
.user-activity-panel > summary,
.users-role-summary > summary {
  display: grid;
  gap: 3px;
  cursor: pointer;
  color: var(--color-primary-ink);
  font-weight: 950;
}

.user-password-panel > summary small {
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.user-password-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.user-password-grid {
  align-items: start;
}

.user-activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.user-activity-grid > div {
  padding: 11px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.user-activity-grid span,
.user-activity-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.user-activity-grid span {
  margin-bottom: 5px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
}

.user-action-confirm label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--color-primary-ink);
  font-weight: 900;
}

.user-action-confirm textarea {
  width: 100%;
  min-height: 100px;
}

.activity-audit-card {
  overflow: visible;
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.audit-summary-card {
  position: relative;
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid #dce6f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 14px 30px rgba(21, 43, 85, 0.055);
}

.audit-summary-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 16px;
  height: 3px;
  border-radius: 999px;
  background: #59bcbd;
}

.audit-summary-card.warning::before,
.audit-summary-card.notice::before {
  background: #f59e0b;
}

.audit-summary-card.risk::before {
  background: #dc2626;
}

.audit-summary-card span {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
}

.audit-summary-card strong {
  display: block;
  margin-top: 8px;
  color: var(--color-primary);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 950;
}

.audit-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 14px;
}

.audit-quick-filter {
  min-height: 34px;
}

.audit-quick-filter.active {
  border-color: rgba(39, 72, 141, 0.28);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 22px rgba(39, 72, 141, 0.16);
}

.audit-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
  margin-top: 12px;
}

.audit-filter-toggle {
  grid-column: auto;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #f8fafc;
}

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

.activity-audit-card .activity-audit-table-wrap table {
  width: max(1910px, 100%);
  min-width: 1910px;
  table-layout: fixed;
}

.activity-audit-table-wrap th,
.activity-audit-table-wrap td {
  min-width: 0;
  max-width: none;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.55;
}

.activity-audit-table-wrap th {
  position: static;
  inset: auto;
  z-index: auto;
}

.activity-audit-table-wrap th:nth-child(1),
.activity-audit-table-wrap td:nth-child(1) {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.activity-audit-table-wrap th:nth-child(2),
.activity-audit-table-wrap td:nth-child(2) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.activity-audit-table-wrap th:nth-child(3),
.activity-audit-table-wrap td:nth-child(3) {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.activity-audit-table-wrap th:nth-child(4),
.activity-audit-table-wrap td:nth-child(4) {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
}

.activity-audit-table-wrap th:nth-child(5),
.activity-audit-table-wrap td:nth-child(5) {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.activity-audit-table-wrap th:nth-child(6),
.activity-audit-table-wrap td:nth-child(6) {
  width: 340px;
  min-width: 340px;
  max-width: 340px;
}

.activity-audit-table-wrap th:nth-child(7),
.activity-audit-table-wrap td:nth-child(7) {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.activity-audit-table-wrap th:nth-child(8),
.activity-audit-table-wrap td:nth-child(8) {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

.activity-audit-table-wrap tbody tr:hover {
  --audit-row-bg: #f8fbff;
}

.audit-row-normal {
  --audit-row-bg: #fff;
}

.audit-row-info {
  --audit-row-bg: #fbfdff;
}

.audit-row-notice,
.audit-row-warning {
  --audit-row-bg: #fffdf7;
}

.audit-row-critical {
  --audit-row-bg: #fff8f8;
}

.audit-row-normal td,
.audit-row-info td,
.audit-row-notice td,
.audit-row-warning td,
.audit-row-critical td {
  background: var(--audit-row-bg);
}

.audit-row-grouped td {
  box-shadow: inset 0 1px 0 rgba(89, 188, 189, 0.22), inset 0 -1px 0 rgba(89, 188, 189, 0.22);
}

.audit-route-cell,
.audit-detail-cell {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.audit-route-cell {
  direction: ltr;
  text-align: left;
  color: var(--color-muted);
}

.audit-pagination {
  justify-content: flex-end;
  margin-top: 12px;
}

.audit-time-cell {
  display: block;
  direction: ltr;
  min-width: 0;
  text-align: end;
  font-weight: 850;
  line-height: 1.45;
  white-space: normal;
  unicode-bidi: isolate;
}

.audit-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.audit-severity-cell {
  display: grid;
  gap: 7px;
  align-content: start;
}

.audit-severity-cell small {
  display: block;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
}

.activity-audit-table-wrap td strong,
.activity-audit-table-wrap td .muted {
  display: block;
  min-width: 0;
}

.activity-audit-table-wrap .status {
  max-width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.activity-audit-table-wrap .audit-severity-normal {
  background: #f1f8f3;
  border-color: rgba(22, 163, 74, 0.18);
  color: #15803d;
}

.activity-audit-table-wrap .audit-severity-info {
  background: #eef7ff;
  border-color: rgba(39, 72, 141, 0.16);
  color: #27488d;
}

.activity-audit-table-wrap .audit-severity-notice {
  background: #fff8e8;
  border-color: rgba(245, 158, 11, 0.22);
  color: #9a5a05;
}

.activity-audit-table-wrap .audit-severity-warning {
  background: #fff1e7;
  border-color: rgba(234, 88, 12, 0.22);
  color: #b45309;
}

.activity-audit-table-wrap .audit-severity-critical {
  background: #fff1f2;
  border-color: rgba(220, 38, 38, 0.22);
  color: #b91c1c;
}

.activity-audit-table-wrap .btn.mini {
  min-height: 32px;
  padding-inline: 10px;
  white-space: nowrap;
}

.activity-audit-modal {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.audit-severity-guide-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.audit-severity-guide-list article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 12px;
  background: #fbfdff;
}

.audit-severity-guide-list p {
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.audit-detail-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #fbfdff;
}

.audit-detail-section h3 {
  margin: 0 0 10px;
  color: var(--color-primary-ink);
  font-size: 16px;
}

.audit-technical-details summary {
  cursor: pointer;
  color: var(--color-primary-ink);
  font-size: 15px;
  font-weight: 900;
}

.audit-technical-details[open] summary {
  margin-bottom: 10px;
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.audit-detail-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e5edf6;
  border-radius: 10px;
  background: #fff;
}

.audit-detail-grid > div.wide {
  grid-column: 1 / -1;
}

.audit-detail-grid span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 850;
}

.audit-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--color-primary-ink);
  font-size: 13px;
  line-height: 1.7;
}

.audit-json-block {
  max-height: 220px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  border-radius: 8px;
  background: #0f172a;
  color: #e5edf6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.audit-sub-events {
  display: grid;
  gap: 8px;
}

.audit-sub-events article {
  padding: 10px 12px;
  border: 1px solid #e3ebf5;
  border-radius: 10px;
  background: #fff;
}

.audit-sub-event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.audit-sub-events strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-sub-events span {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
}

.audit-sub-events p {
  margin: 5px 0 0;
}

.audit-sub-event-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.audit-sub-event-values > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: #f8fbff;
}

.audit-sub-event-values pre {
  max-height: 160px;
}

.audit-sub-events .audit-technical-details {
  padding: 10px;
  margin-top: 8px;
  background: #f8fbff;
}

@media (max-width: 760px) {
  .users-smtp-alert,
  .user-actions-cell {
    display: grid;
  }

  .activity-audit-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
  }

  .audit-summary-grid,
  .audit-detail-grid,
  .audit-severity-guide-list article {
    grid-template-columns: 1fr;
  }

  .user-management-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    padding: 14px;
  }

  .user-management-modal .form,
  .user-form-grid {
    grid-template-columns: 1fr;
  }

  .user-setting-card {
    align-items: stretch;
    display: grid;
  }

  .user-permissions-profile,
  .permission-option-list {
    grid-template-columns: 1fr;
  }

  .switch-field {
    align-items: flex-start;
  }
}

.section-subtitle {
  padding-top: 6px;
  color: var(--color-primary);
  font-weight: 900;
  border-top: 1px solid var(--color-border);
}

.indicator-center {
  display: grid;
  gap: 16px;
}

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

.indicator-card {
  display: grid;
  gap: 12px;
}

.indicator-result {
  color: var(--color-primary);
  font-size: 28px;
  white-space: nowrap;
}

.indicator-details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--color-surface-soft);
}

.indicator-count-button {
  min-width: 42px;
  justify-content: center;
  font-weight: 900;
}

.indicator-details .alert {
  margin-bottom: 10px;
}

.report-hero-compact {
  margin-bottom: 12px;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.report-tab {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  color: var(--color-primary-ink);
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.report-tab:hover,
.report-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.indicator-settings-shell {
  margin-bottom: 12px;
}

.indicator-settings-tabs {
  margin-bottom: 0;
}

.indicator-settings-table-wrap {
  max-height: min(62vh, 620px);
}

.indicator-definition-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.indicator-definition-form {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.indicator-definition-form h4 {
  margin: 8px 0 0;
  color: var(--color-primary-ink);
}

.sticky-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 34%);
}

.indicator-readiness-summary {
  margin-bottom: 14px;
}

.report-filter-shell {
  margin-bottom: 16px;
}

.report-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.report-page-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
}

.report-page-toolbar .section-search {
  margin: 0;
}

.report-result-count {
  color: var(--color-muted);
  font-weight: 800;
  white-space: nowrap;
}

.report-toolbar-actions,
.report-subfilters,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-subfilters {
  margin: 12px 0;
}

.report-details-summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 900;
  font-size: 18px;
  padding: 4px 0 14px;
}

.report-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.report-export-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.report-page {
  display: grid;
  gap: 16px;
}

body[data-view="reports"] .topbar,
body[data-view="reports"] .view,
body[data-view="registrantFiles"] .view,
body[data-view="personDetails"] .view,
body[data-view="indicatorTargets"] .view,
body[data-view="systemHealth"] .view {
  width: min(100%, var(--app-wide-content-max-width));
}

.report-two-column {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  align-items: start;
}

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

.report-section-header h2,
.report-section-header h3,
.report-detail-block h4 {
  margin-top: 0;
}

.report-summary-card.warning {
  border-color: rgba(245, 158, 11, 0.36);
}

.report-summary-card.danger {
  border-color: rgba(239, 68, 68, 0.32);
}

.report-summary-card.info {
  border-color: rgba(59, 130, 246, 0.32);
}

.report-summary-card.clickable {
  width: 100%;
  text-align: right;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.report-summary-card.clickable:hover,
.report-summary-card.clickable:focus-visible {
  border-color: rgba(89, 188, 189, 0.55);
  box-shadow: 0 12px 28px rgba(19, 42, 95, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.report-card-hint {
  opacity: 0;
  transition: opacity 0.16s ease;
}

.report-summary-card.clickable:hover .report-card-hint,
.report-summary-card.clickable:focus-visible .report-card-hint {
  opacity: 0.78;
}

.report-more-toolbar {
  margin: -6px 0 4px;
  justify-content: center;
}

.report-last-updated {
  font-weight: 800;
}

.highlight-row {
  outline: 2px solid rgba(89, 188, 189, 0.75);
  outline-offset: -2px;
  background: #f0fbfb;
}

.table-wrap tr.selected-row {
  background: #eef8f8;
  outline: 2px solid rgba(89, 188, 189, 0.35);
  outline-offset: -2px;
}

.report-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.report-action-card {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 12px;
  min-height: 118px;
}

.report-action-card strong {
  color: var(--color-primary);
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.report-action-card span {
  color: var(--color-primary-ink);
  font-weight: 900;
  line-height: 1.45;
}

.report-detail-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(89, 188, 189, 0.28);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.report-detail-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: 12px;
}

.report-rule-list {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding-inline-start: 18px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.report-technical-details {
  margin-top: 10px;
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
}

.report-technical-details summary {
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 900;
}

.report-indicator-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-indicator-grid.compact .report-indicator strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
    background: var(--color-bg);
  }

  .sidebar {
    height: auto;
    position: static;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .form,
  .form.compact {
    grid-template-columns: 1fr;
  }

  .topbar,
  .user-panel,
  .topbar-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    display: grid;
    min-width: 0;
  }

  .global-search {
    min-width: 0;
  }

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

  .score-row {
    grid-template-columns: 1fr;
  }

  .compatibility-audit-header,
  .manual-review-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .report-two-column {
    grid-template-columns: 1fr;
  }

  .report-page-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .report-detail-panel {
    position: static;
    max-height: none;
  }

  .report-section-header {
    display: grid;
  }
}

/* Polished shared multi-select filters */
.registration-filters {
  z-index: 60;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  padding-top: 4px;
}

.multi-select-filter {
  flex: 0 1 224px;
  min-width: 190px;
  max-width: 260px;
  direction: rtl;
  text-align: right;
}

.multi-select-filter[open] {
  z-index: calc(var(--z-dropdown) + 1);
}

.multi-select-filter summary {
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select-filter summary::after {
  content: "\2304";
  flex: 0 0 auto;
}

.multi-select-menu {
  position: fixed;
  inset: auto;
  top: var(--multi-select-menu-top, 0);
  left: var(--multi-select-menu-left, 0);
  right: auto;
  z-index: var(--z-dropdown);
  width: var(--multi-select-menu-width, min(284px, calc(100vw - 40px)));
  max-height: var(--multi-select-menu-max-height, 340px);
  overflow: hidden;
  display: grid;
  gap: 8px;
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.multi-select-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
}

.multi-select-actions .btn {
  justify-content: center;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.multi-select-actions [data-multi-filter-apply] {
  grid-column: 1 / -1;
}

.multi-select-search {
  margin-bottom: 0;
}

.multi-select-options {
  max-height: 232px;
  overflow: auto;
  padding-inline-end: 2px;
  scrollbar-color: rgba(19, 42, 95, 0.28) transparent;
}

.multi-select-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.multi-select-option:hover {
  border-color: rgba(89, 188, 189, 0.2);
}

.multi-select-option input {
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  inline-size: 16px;
  block-size: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--color-primary);
}

.multi-select-option span {
  min-width: 0;
  white-space: normal;
}

.forms-admin-hero,
.forms-admin-links,
.forms-admin-details {
  overflow: visible;
}

.forms-admin-head,
.forms-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.forms-admin-head h2,
.forms-modal-head h3 {
  margin-bottom: 4px;
}

.forms-admin-metric-grid,
.forms-admin-summary-row,
.forms-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.forms-admin-metric {
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.forms-admin-metric span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.forms-admin-metric strong {
  color: var(--color-primary-ink);
  font-size: 20px;
  line-height: 1.35;
}

.forms-admin-metric small {
  color: var(--color-muted);
  font-weight: 700;
}

.forms-admin-metric.metric-good {
  border-color: rgba(56, 161, 105, 0.32);
  background: #f5fbf7;
}

.forms-admin-metric.metric-warning {
  border-color: rgba(214, 158, 46, 0.34);
  background: #fffaf0;
}

.forms-admin-metric.metric-risk {
  border-color: rgba(229, 62, 62, 0.3);
  background: #fff5f5;
}

.forms-admin-metric.metric-info {
  border-color: rgba(49, 130, 206, 0.28);
  background: #f5faff;
}

.forms-admin-filter-row {
  align-items: flex-start;
  margin-top: 12px;
}

.forms-admin-filter-row label {
  min-width: 160px;
}

.forms-info-line {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.forms-info-line span {
  color: var(--color-muted);
  font-weight: 800;
}

.forms-info-line code,
.copy-line code {
  overflow-wrap: anywhere;
  direction: ltr;
  unicode-bidi: plaintext;
}

.forms-steps {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-inline-start: 22px;
}

.forms-admin-result {
  margin-top: 12px;
}

.forms-admin-details {
  padding: 0;
}

.forms-admin-details > summary {
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 900;
}

.forms-admin-details > :not(summary) {
  margin-inline: 20px;
}

.forms-admin-details > :last-child {
  margin-bottom: 20px;
}

.forms-admin-modal {
  width: min(780px, calc(100vw - 32px));
  max-height: min(86vh, 780px);
  overflow: auto;
}

.forms-admin-modal-wide {
  width: min(1080px, calc(100vw - 32px));
}

.forms-modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 10px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.forms-admin-modal h4 {
  margin: 18px 0 8px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-weight: 800;
}

.checkbox-line input {
  inline-size: 16px;
  block-size: 16px;
}

.raw-json {
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
}

.current-relationship-summary {
  align-items: stretch;
}

.current-relationship-metric {
  width: 100%;
  border: 1px solid var(--color-border);
  text-align: right;
  cursor: pointer;
}

.current-relationship-metric:hover,
.current-relationship-metric:focus-visible {
  border-color: rgba(89, 188, 189, 0.55);
  box-shadow: 0 12px 28px rgba(19, 42, 95, 0.08);
}

.current-relationship-filters {
  z-index: 30;
}

.current-relationship-filter-row {
  margin-top: 12px;
}

.current-relationship-advanced {
  margin-top: 12px;
}

.current-relationship-list .table-wrap {
  overflow-x: auto;
}

.current-relationship-row {
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.current-relationship-row.is-selected > td {
  background: rgba(89, 188, 189, 0.12);
  box-shadow: inset 4px 0 0 var(--color-accent);
}

.current-relationship-row.is-return-highlight > td {
  animation: currentRelationshipRowPulse 1.9s ease;
}

@keyframes currentRelationshipRowPulse {
  0%,
  100% {
    background: rgba(89, 188, 189, 0.12);
  }
  35%,
  70% {
    background: rgba(245, 158, 11, 0.2);
  }
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.next-action-cell {
  display: grid;
  gap: 5px;
  justify-items: start;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--color-primary-ink);
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.next-action-cell strong {
  color: var(--color-primary);
}

.next-action-cell small {
  color: var(--color-muted);
  font-weight: 800;
}

.compact-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.rows-per-page-label {
  max-width: 170px;
}

.pagination-bar {
  justify-content: center;
  margin-top: 14px;
}

.current-relationship-empty {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.current-relationship-details {
  display: grid;
  gap: 14px;
  scroll-margin-top: 120px;
}

.current-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-detail-header .compact-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.current-detail-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.current-detail-overview-item {
  display: grid;
  gap: 5px;
  min-height: 74px;
  align-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fbfdff;
}

.current-detail-overview-item span {
  color: var(--color-muted);
  font-weight: 800;
  font-size: 0.84rem;
}

.current-detail-overview-value {
  color: var(--color-primary-ink);
  font-weight: 900;
  line-height: 1.55;
}

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

.current-detail-grid .card h3 {
  margin: 0 0 10px;
  color: var(--color-primary);
}

.current-detail-actions {
  grid-column: 1 / -1;
}

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

.person-link-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
}

.notice.warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fff7ed;
}

.followup-final-summary .metric strong {
  font-size: clamp(1.15rem, 1.8vw, 1.8rem);
  line-height: 1.35;
}

.followup-filter-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.followup-visible-filters {
  align-items: end;
}

.followup-advanced-filters {
  margin: 0;
}

.followup-empty-state {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.followup-selected-card {
  display: grid;
  gap: 14px;
}

.followup-timeline-shell {
  display: grid;
  gap: 10px;
}

.followup-timeline-shell h3 {
  margin: 0;
  color: var(--color-primary);
}

.followup-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.followup-period {
  min-height: 112px;
  border: 1px solid var(--color-border);
  border-right-width: 4px;
  border-radius: 8px;
  background: #fff;
  color: var(--color-primary);
  display: grid;
  gap: 4px;
  text-align: right;
  padding: 10px;
  cursor: pointer;
}

.followup-period:disabled {
  cursor: default;
  opacity: 0.78;
}

.followup-period strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
}

.followup-period span,
.followup-period small,
.followup-period em {
  font-style: normal;
  line-height: 1.35;
}

.followup-period small {
  color: var(--color-muted);
}

.followup-period.done {
  border-color: #22c55e;
}

.followup-period.due {
  border-color: #3b82f6;
}

.followup-period.soon {
  border-color: #60a5fa;
}

.followup-period.late {
  border-color: #f97316;
  background: #fff7ed;
}

.followup-period.future {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.followup-period.selected {
  outline: 3px solid rgba(34, 197, 94, 0.2);
}

.ended-case-summary .metric strong {
  font-size: clamp(1.05rem, 1.7vw, 1.6rem);
  line-height: 1.35;
}

.ended-case-filter-panel {
  display: grid;
  gap: 12px;
}

.ended-case-visible-filters {
  align-items: end;
  margin-top: 10px;
}

.ended-case-advanced {
  margin: 0;
}

.ended-case-list .table-wrap {
  overflow-x: auto;
}

.ended-case-tabs-card {
  padding-block: 12px;
}

.ended-case-list tr.selected-row {
  background: #eef8f8;
  outline: 2px solid rgba(89, 188, 189, 0.35);
  outline-offset: -2px;
}

.ended-case-empty {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.ended-case-details {
  display: grid;
  gap: 14px;
}

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

.termination-relationship-card,
.termination-party-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.termination-party-card {
  display: grid;
  gap: 10px;
}

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

.termination-form .form-section > h3,
.termination-form .form-section > .muted,
.termination-form .form-section > .grid,
.termination-form .form-section > .review-reason-list {
  grid-column: 1 / -1;
}

.expected-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  background: #f8fafc;
}

.expected-status span {
  color: var(--color-muted);
  font-weight: 800;
}

.expected-status strong {
  color: var(--color-primary);
}

@media (max-width: 760px) {
  .termination-form .form-section {
    grid-template-columns: 1fr;
  }
}

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

.detail-grid.compact {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid.compact > div {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.detail-grid.compact span {
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.followup-final-form {
  gap: 14px;
}

.followup-final-form .form-section {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.followup-final-form details.form-section {
  padding: 0;
  overflow: hidden;
}

.followup-final-form .form-section summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  color: var(--color-primary);
  font-weight: 900;
  list-style: none;
}

.followup-final-form .form-section summary::-webkit-details-marker {
  display: none;
}

.followup-final-form .form-section summary::before {
  content: "⌄";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--color-primary);
  transition: transform 0.15s ease;
}

.followup-final-form .form-section[open] summary::before {
  transform: rotate(180deg);
}

.followup-final-form .form-section > .form,
.followup-final-form .form-section > .followup-live-summary {
  padding: 0 14px 14px;
}

.followup-final-form .form-section h3 {
  margin: 0 0 10px;
  color: var(--color-primary);
}

.followup-live-summary {
  margin-bottom: 12px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
}

.segmented-control button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 800;
  padding: 8px 12px;
  cursor: pointer;
}

.segmented-control button.active {
  background: #fff;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.08);
}

.manual-registration {
  display: grid;
  gap: 16px;
}

.manual-registration .form {
  grid-template-columns: 1fr;
}

.manual-registration .form label:has(:required)::after {
  display: none;
}

.manual-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.manual-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-secondary);
  transition: width 0.2s ease;
}

.manual-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.manual-steps button,
.manual-type-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-primary);
  font: inherit;
  font-weight: 800;
  padding: 10px;
  cursor: pointer;
}

.manual-steps button {
  display: grid;
  gap: 4px;
  text-align: start;
}

.manual-steps button small {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.manual-steps button.completed {
  border-color: rgba(22, 163, 74, 0.35);
  background: #f0fdf4;
}

.manual-steps button.needs-completion:not(.active) {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}

.manual-steps button.active,
.manual-type-card.active {
  border-color: var(--color-primary);
  background: #eff6ff;
}

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

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

.manual-field-shell {
  align-content: start;
}

.manual-field-shell.wide {
  grid-column: 1 / -1;
}

.manual-field-shell textarea {
  min-height: 84px;
  resize: vertical;
}

.manual-review-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manual-review-meta article,
.manual-review-section {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.manual-review-section {
  grid-column: 1 / -1;
}

.manual-review-section h4 {
  margin: 0 0 10px;
  color: var(--color-primary);
}

.manual-type-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border-color: rgba(215, 220, 227, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.manual-type-card:hover {
  border-color: rgba(89, 188, 189, 0.85);
  background: #f8fcff;
  box-shadow: 0 14px 32px rgba(39, 72, 141, 0.08);
  transform: translateY(-1px);
}

.manual-type-card:active {
  transform: translateY(0);
}

.manual-type-card.active,
.manual-type-card.is-selected {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, #f2f7ff 0%, #ffffff 100%);
  box-shadow: 0 16px 34px rgba(39, 72, 141, 0.12);
}

.manual-type-card:focus-within {
  outline: 3px solid rgba(89, 188, 189, 0.28);
  outline-offset: 2px;
}

.manual-type-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.manual-type-indicator {
  position: relative;
  inline-size: 24px;
  block-size: 24px;
  border: 2px solid #c8d3e4;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 5px #fff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.manual-type-card.active .manual-type-indicator,
.manual-type-card.is-selected .manual-type-indicator {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 5px #fff, 0 0 0 4px rgba(39, 72, 141, 0.1);
}

.manual-type-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.manual-type-copy strong {
  color: var(--color-primary-ink);
  font-size: 1.02rem;
  font-weight: 950;
}

.manual-type-copy span {
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.6;
}

.manual-review-grid article {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.manual-review-grid span {
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.manual-review-meta span {
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.manual-inline-help {
  display: inline-flex;
  margin-top: 6px;
}

.manual-missing-panel ul {
  margin: 8px 0 0;
  padding-inline-start: 22px;
}

.manual-missing-panel li {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

.manual-duplicate-panel {
  display: grid;
  gap: 10px;
}

.manual-success {
  display: grid;
  gap: 16px;
}

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

.manual-actions {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.manual-drafts {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .profile-hero-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "stages"
      "actions";
    direction: rtl;
  }

  .profile-identity-panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-current-chip {
    grid-column: 1 / -1;
  }

  .profile-metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .profile-summary-grid,
  .profile-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-detail-grid.single {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-card-wide {
    grid-column: span 2;
  }

  .profile-card-wide .profile-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card-wide .profile-info-item.wide {
    grid-column: span 2;
  }

  .manual-field-grid,
  .manual-review-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .system-health-intro {
    display: grid;
  }

  .system-health-filter-grid {
    grid-template-columns: 1fr;
  }

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

  .multi-select-filter {
    max-width: none;
    width: 100%;
  }

  .multi-select-menu {
    width: var(--multi-select-menu-width, 100%);
  }

  .current-detail-header {
    display: grid;
  }

  .current-detail-overview,
  .person-link-grid {
    grid-template-columns: 1fr;
  }

  .current-detail-grid {
    grid-template-columns: 1fr;
  }

  .section-title-row {
    display: grid;
  }

  .detail-grid.compact {
    grid-template-columns: 1fr;
  }

  .segmented-control,
  .manual-steps,
  .manual-type-grid,
  .manual-review-grid,
  .manual-field-grid,
  .manual-review-meta {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .registrant-files-overview,
  .registrant-files-toolbar,
  .registrant-card-head,
  .registrant-card-foot,
  .registrant-card-body {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .registrant-files-header {
    padding: 18px;
  }

  .registrant-files-overview {
    grid-template-areas:
      "search"
      "count";
  }

  .registrant-files-toolbar {
    grid-template-columns: 1fr;
  }

  .registrant-filter-block,
  .registrant-role-tabs {
    justify-items: stretch;
    justify-content: stretch;
  }

  .registrant-role-tabs button {
    flex: 1 1 130px;
  }

  .registrant-files-grid {
    grid-template-columns: 1fr;
  }

  .registrant-stage {
    max-width: none;
    justify-content: center;
  }

  .profile-hero-card,
  .profile-identity-panel,
  .profile-section-grid,
  .profile-summary-grid,
  .profile-detail-grid,
  .profile-info-grid,
  .profile-card-wide .profile-info-grid,
  .profile-metric-strip,
  .profile-stage-line {
    grid-template-columns: 1fr;
  }

  .profile-card-wide,
  .profile-info-item.wide,
  .profile-card-wide .profile-info-item.wide {
    grid-column: auto;
  }

  .profile-identity-panel {
    justify-items: center;
    text-align: center;
  }

  .profile-stage-line::before {
    display: none;
  }

  .profile-internal-nav {
    position: static;
  }

  .profile-tab-nav {
    position: static;
  }

  .profile-metric {
    border-inline-start: 0;
    border-bottom: 1px solid #e3ebf5;
  }

  .profile-summary-row {
    grid-template-columns: 1fr;
  }

  .profile-summary-row-side {
    justify-content: flex-start;
  }
}

/* Responsive containment layer: keep wide content inside its own surface. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

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

.shell,
.workspace,
.topbar,
.topbar-actions,
.view,
.section,
.card,
.grid,
.form,
.toolbar,
.report-page,
.report-panel,
.report-filter-shell,
.report-page-toolbar,
.report-section-header,
.report-two-column,
.report-action-grid,
.report-export-grid,
.indicator-detail-shell,
.system-health-page,
.registrant-files-header,
.registrant-files-overview,
.registrant-files-toolbar,
.registrant-files-grid,
.profile-hero-card,
.profile-section-grid,
.profile-summary-grid,
.profile-detail-grid,
.current-detail-grid,
.current-detail-overview,
.modal-card {
  min-width: 0;
  max-width: 100%;
}

.view,
.report-page,
.system-health-page,
.registration-page,
.manual-registration,
.indicator-center,
.case-study-workspace,
.current-relationship-details,
.followup-selected-card,
.ended-case-details {
  overflow-x: clip;
}

.card,
.section,
.report-panel,
.report-detail-block,
.report-indicator,
.summary-grid article,
.metric-strip article,
.applicant-field,
.registrant-card,
.profile-card,
.health-summary-card,
.report-action-card,
.report-export-card {
  overflow-wrap: anywhere;
}

.btn,
button,
.badge,
.pill,
.status,
.report-tab,
.filter-chip,
.link-action {
  max-width: 100%;
}

.btn,
.link-action,
.report-tab {
  white-space: normal;
}

.toolbar,
.report-actions,
.report-filter-actions,
.report-toolbar-actions,
.report-subfilters,
.inline-actions,
.row-actions,
.compact-actions,
.registration-filters,
.registration-results-toolbar,
.registration-pagination,
.registration-bulk-panel,
.case-section-nav,
.expected-status,
.current-detail-header,
.forms-admin-head,
.forms-modal-head,
.section-heading-row,
.section-title-row {
  flex-wrap: wrap;
  min-width: 0;
}

.toolbar > *,
.report-actions > *,
.report-filter-actions > *,
.report-toolbar-actions > *,
.report-subfilters > *,
.inline-actions > *,
.row-actions > *,
.compact-actions > * {
  min-width: 0;
}

.table-wrap,
.profile-table-wrap,
.first-meeting-table-wrap,
.trial-period-table-wrap,
.current-relationship-list .table-wrap,
.ended-case-list .table-wrap,
.system-health-list-card .table-wrap,
.health-details-panel .table-wrap,
.criteria-section .table-wrap,
.criteria-coverage-section .table-wrap,
.registration-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.floating-table-scrollbar {
  position: fixed;
  left: 16px;
  bottom: 14px;
  width: 0;
  height: 20px;
  padding: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(39, 72, 141, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(19, 42, 95, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 220;
  contain: layout paint style;
  scrollbar-width: thin;
  scrollbar-color: rgba(39, 72, 141, 0.72) rgba(234, 247, 247, 0.8);
}

.floating-table-scrollbar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.modal-open .floating-table-scrollbar {
  opacity: 0;
  pointer-events: none;
}

.floating-table-scrollbar__spacer {
  height: 1px;
  min-height: 1px;
}

.floating-table-scrollbar::-webkit-scrollbar {
  height: 10px;
}

.floating-table-scrollbar::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(234, 247, 247, 0.82);
}

.floating-table-scrollbar::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

.has-floating-table-scrollbar {
  scroll-padding-bottom: 36px;
}

.table-wrap table,
.profile-table-wrap table {
  min-width: max(720px, 100%);
  width: max-content;
  max-width: none;
}

.report-panel .table-wrap table,
.report-page .table-wrap table,
.health-groups-table table,
.health-details-panel table,
.registration-table-wrap table {
  min-width: max-content;
}

.report-indicators-table-wrap {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  scrollbar-gutter: auto;
}

.report-indicators-table-wrap table {
  width: max(1600px, 100%);
  min-width: 1600px;
  table-layout: fixed;
}

.report-indicators-table-wrap.report-indicators-table-wide table {
  width: 3000px;
  min-width: 3000px;
}

.report-indicators-table-wrap th,
.report-indicators-table-wrap td {
  min-width: 0;
  overflow-wrap: normal;
  vertical-align: middle;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.45;
}

.report-indicators-table-wrap th {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.report-indicators-table-wrap td {
  white-space: nowrap;
}

.report-indicators-table-wrap th:nth-child(2),
.report-indicators-table-wrap td:nth-child(2) {
  min-width: 190px;
  width: 220px;
  max-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.report-indicators-table-wrap th:last-child,
.report-indicators-table-wrap td:last-child {
  width: 300px;
}

.report-indicators-table-wrap th:nth-child(8),
.report-indicators-table-wrap td:nth-child(8) {
  width: 150px;
  white-space: normal;
}

.report-indicators-table-wrap th:nth-child(9),
.report-indicators-table-wrap td:nth-child(9) {
  width: 180px;
  white-space: normal;
}

.report-indicators-table-wrap .status,
.report-indicators-table-wrap .badge {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  min-height: 30px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.35;
}

.report-indicators-table-wrap th:first-child,
.report-indicators-table-wrap td:first-child {
  padding-inline-end: 18px;
}

.report-indicators-table-wrap .inline-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  width: max-content;
}

.report-indicators-table-wrap .btn.mini,
.report-indicators-table-wrap .link-action {
  width: auto;
  justify-content: center;
  text-align: center;
  min-height: 28px;
  padding: 5px 8px;
  white-space: nowrap;
  font-size: 12px;
}

th,
td {
  overflow-wrap: anywhere;
  word-break: normal;
}

td .toolbar,
td .row-actions,
td .compact-actions,
td .inline-actions {
  gap: 6px;
  margin-bottom: 0;
}

@media (max-width: 1400px) {
  :root {
    --app-sidebar-width: 224px;
    --app-content-padding-x: 16px;
  }

  .shell {
    grid-template-columns: var(--app-sidebar-width) minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 8px;
  }

  .topbar {
    padding: 12px var(--app-content-padding-x);
  }

  .view {
    padding: 14px var(--app-content-padding-x) 34px;
  }

  .report-page-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .report-page-toolbar .section-search {
    grid-column: 1 / -1;
  }

  body[data-view="reports"] .topbar {
    min-height: 0;
    gap: 10px;
  }

  body[data-view="reports"] .topbar > div:first-child {
    flex: 0 1 300px;
    min-width: 220px;
  }

  body[data-view="reports"] .topbar-actions {
    flex: 1 1 620px;
    gap: 8px;
  }

  body[data-view="reports"] .global-search {
    flex: 1 1 260px;
    max-width: 380px;
  }

  body[data-view="reports"] .user-panel > div {
    min-width: 126px;
  }

  body[data-view="reports"] .card,
  body[data-view="reports"] .report-panel,
  body[data-view="reports"] .report-filter-shell {
    padding: 12px 14px;
    border-radius: 12px;
  }

  body[data-view="reports"] .report-hero {
    gap: 12px;
  }

  body[data-view="reports"] .report-hero.report-hero-compact {
    padding-block: 10px;
  }

  body[data-view="reports"] .report-hero h2 {
    margin-bottom: 3px;
    font-size: 21px;
  }

  body[data-view="reports"] .report-hero.report-hero-compact .muted {
    margin: 0;
    max-width: 620px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-view="reports"] .report-section-header {
    margin-bottom: 6px;
  }

  body[data-view="reports"] .report-section-header h2 {
    font-size: 18px;
  }

  body[data-view="reports"] .report-filter-shell .report-section-header .muted {
    display: none;
  }

  body[data-view="reports"] .report-filter-shell {
    margin-bottom: 12px;
  }

  body[data-view="reports"] .report-filter-form {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
  }

  body[data-view="reports"] .report-filter-form label {
    gap: 4px;
    font-size: 12px;
  }

  body[data-view="reports"] .report-last-updated {
    grid-column: 1 / span 2;
    align-self: center;
  }

  body[data-view="reports"] .report-filter-actions {
    grid-column: 3 / -1;
    justify-content: flex-start;
    gap: 6px;
  }

  body[data-view="reports"] .report-filter-form > .filter-chip-list {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  body[data-view="reports"] .report-page {
    gap: 12px;
  }

  body[data-view="reports"] .report-page-toolbar {
    margin: 8px 0;
  }
}

@media (max-width: 1100px) {
  :root {
    --app-content-padding-x: 14px;
  }

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

  .sidebar {
    position: static;
    height: auto;
    max-width: 100%;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .topbar > div:first-child,
  .topbar-actions,
  .user-panel,
  .global-search {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .topbar-actions,
  .user-panel {
    justify-content: stretch;
  }

  .user-panel > div {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1180px) {
  .report-hero,
  .report-section-header,
  .system-health-hero,
  .system-health-intro,
  .case-responsibility-card,
  .current-detail-header,
  .ready-selected-header,
  .ready-results-header,
  .forms-admin-head,
  .forms-modal-head,
  .classification-impact-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-page-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body[data-view="reports"] .report-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-view="reports"] .report-last-updated,
  body[data-view="reports"] .report-filter-actions {
    grid-column: 1 / -1;
  }

  .report-result-count,
  .results-count {
    white-space: normal;
  }

  .report-filter-actions,
  .report-actions,
  .report-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  :root {
    --app-content-padding-x: 12px;
  }

  .topbar,
  .view {
    padding-inline: var(--app-content-padding-x);
  }

  .card,
  .report-panel,
  .registrant-files-header {
    padding: 12px;
  }

  .dashboard-filter-note,
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-hero-actions {
    justify-content: stretch;
  }

  .dashboard-hero-actions .btn {
    flex: 1 1 140px;
  }

  .dashboard-filter-note strong {
    white-space: normal;
  }

  .grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .grid.five,
  .grid.six,
  .form,
  .form.compact,
  .form.compact-form,
  .report-filter-form,
  .filters-grid,
  .dashboard-filter-grid,
  .dashboard-action-grid,
  .dashboard-journey-grid,
  .dashboard-period-grid,
  .summary-grid,
  .metric-strip,
  .report-indicator-grid,
  .indicator-summary-grid,
  .report-action-grid,
  .report-export-grid,
  .health-detail-summary,
  .health-ops-grid,
  .health-integration-grid,
  .applicant-fields,
  .classification-choice-grid,
  .classification-affected-grid,
  .case-progress-steps,
  .case-basic-grid,
  .current-detail-grid,
  .current-detail-overview,
  .person-link-grid,
  .termination-form .form-section {
    grid-template-columns: 1fr;
  }

  .section-search input,
  .global-search input,
  input,
  select,
  textarea {
    min-width: 0;
  }

  th,
  td {
    padding: 8px 9px;
    font-size: 12px;
  }

  .btn.mini,
  .btn.small,
  .link-action {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  td .toolbar,
  td .row-actions,
  td .compact-actions,
  td .inline-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(180px, 100%);
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-card,
  .criteria-modal-card,
  .forms-admin-modal,
  .forms-admin-modal-wide {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .person-basic-data-edit-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .person-basic-data-edit-footer .btn {
    width: 100%;
  }
}
