@font-face {
  font-family: Poppins;
  src: url("/assets/poppins-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url("/assets/poppins-semibold.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
:root {
  --navy: #15304c;
  --ink: #0c1e34;
  --teal: #0fb3a1;
  --teal-dark: #08786b;
  --tint: #e6f6f3;
  --canvas: #f5f6f8;
  --border: #e1e4ea;
  --muted: #667085;
  --warning: #fff4d9;
  --red: #c03229;
  --radius: 14px;
  --shadow: 0 12px 24px -15px #0a9d8e90;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    14px/1.6 Poppins,
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button,
a {
  transition:
    background 0.15s,
    color 0.15s;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 22px;
  line-height: 1.4;
  margin-bottom: 2px;
  font-weight: 600;
}
h2 {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
  font-weight: 600;
}
p {
  margin-bottom: 16px;
}
small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.mono,
code {
  font-family: ui-monospace, monospace;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #0a7a6c;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  padding: 12px;
  background: white;
  z-index: 99;
}
.skip:focus {
  top: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 16px 18px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img {
  flex: none;
}
.brand strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}
.brand span {
  display: block;
  letter-spacing: 1.7px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}
.sidebar .brand {
  padding: 0 6px 23px;
  border-bottom: 1px solid #8496ad55;
}
.sidebar .brand span {
  color: #a5b2c4;
}
.nav-group {
  color: #a8b8cc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  margin: 23px 10px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  margin-bottom: 5px;
  border-radius: 9px;
  color: #bdc8d8;
  min-height: 44px;
}
.nav-item img {
  flex: none;
}
.nav-item.active {
  background: var(--teal);
  color: var(--ink);
  font-weight: 600;
}
.nav-item:hover:not(.active) {
  background: #ffffff12;
  color: white;
}
.nav-count {
  margin-left: auto;
  background: #f5a623;
  color: var(--ink);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
}
.sidebar-footer {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 24px 6px 10px;
}
.sidebar-footer strong {
  font-size: 12px;
}
.sidebar-footer small {
  color: #a5b2c4;
}
.signout {
  background: none;
  border: 0;
  color: #c4d0df;
  text-align: left;
  padding: 10px 12px;
  width: 100%;
  font-size: 13px;
}
.signout:hover {
  color: white;
}
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 24px 30px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.topbar > div {
  flex: 1;
  min-width: 0;
}
.topbar p {
  font-size: 12px;
  color: var(--muted);
  margin: 3px 0 0;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  flex: 0 0 38px;
  font-size: 12px;
  font-weight: 600;
}
.avatar.small {
  height: 32px;
  width: 32px;
  flex-basis: 32px;
  background: #24476b;
}
.content {
  padding: 26px 30px;
  flex: 1;
}
.workspace-footer {
  padding: 16px 30px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  width: 38px;
  height: 38px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.metric {
  background: white;
  border: 1px solid var(--border);
  padding: 17px 15px;
  border-radius: var(--radius);
  min-width: 0;
}
.metric h2 {
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.metric strong {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.4;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.panel-heading h2 {
  margin: 0;
}
.panel-heading p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}
.chart-panel {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
.chart {
  margin-top: auto;
  padding-top: 30px;
}
.bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 280px;
  border-bottom: 1px solid var(--border);
}
.bar-track {
  height: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.bar-track meter {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.bar {
  width: 100%;
  background: var(--tint);
  border-radius: 5px 5px 0 0;
  min-height: 3px;
}
.bar-track:last-child .bar {
  background: var(--teal);
}
.axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding-top: 8px;
}
.chart-empty {
  position: absolute;
  top: 45%;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid #edeff3;
}
.activity-row:last-child {
  border: 0;
}
.activity-row > div {
  flex: 1;
  min-width: 0;
}
.activity-row strong {
  font-size: 12px;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.activity-row small {
  font-size: 11px;
}
.activity-row time {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  max-width: 95px;
}
.activity-dot {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  flex: none;
}
.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.toolbar p {
  margin: 0;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.tabs a {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px 14px;
  background: white;
  white-space: nowrap;
}
.tabs a.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--ink);
}
.tabs.compact {
  background: #f1f3f5;
  padding: 3px;
  border-radius: 8px;
  flex-wrap: nowrap;
  gap: 2px;
}
.tabs.compact a {
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
}
.tabs.compact a.selected {
  background: white;
}
.text-link {
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 13px;
}
.text-link:hover {
  text-decoration: underline;
}
.button {
  border: 1px solid transparent;
  border-radius: 11px;
  min-height: 42px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
}
.button.primary {
  background: var(--teal);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.button.primary:hover:not(:disabled) {
  background: #15c4af;
}
.button.secondary {
  border-color: var(--border);
  background: white;
  color: var(--ink);
}
.button.secondary:hover {
  background: var(--canvas);
}
.button.danger {
  background: var(--red);
  color: white;
}
.button.danger-outline {
  border-color: #f5c3bd;
  color: var(--red);
  background: white;
}
.button.link {
  color: var(--teal-dark);
  padding: 8px;
}
.button.small {
  padding: 7px 12px;
  min-height: 32px;
  font-size: 12px;
}
.button.full {
  width: 100%;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.button-row .button {
  flex: 1;
  padding: 9px;
  font-size: 12px;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.search-form input:not([type="hidden"]) {
  max-width: 360px;
  flex: 1;
}
.search-form .muted {
  margin-left: auto;
  font-size: 12px;
}
.table-panel {
  padding: 0;
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #55617a;
  background: #f1f3f5;
  font-weight: 600;
  padding: 13px 17px;
}
td {
  padding: 16px 17px;
  border-top: 1px solid #edeff3;
  font-size: 12px;
  color: #44516a;
}
td strong {
  color: var(--ink);
}
.right {
  text-align: right;
}
.person {
  display: flex;
  align-items: center;
  gap: 11px;
}
.person strong {
  font-size: 13px;
  display: block;
}
.person small {
  font-size: 11px;
}
.person h2 {
  margin-bottom: 2px;
}
.badge {
  display: inline-flex;
  border-radius: 20px;
  padding: 3px 9px;
  background: #f1f3f5;
  color: #55617a;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-active,
.badge-approved {
  background: var(--tint);
  color: var(--teal-dark);
}
.badge-pending,
.badge-needs_info {
  background: var(--warning);
  color: #855900;
}
.badge-rejected,
.badge-suspended,
.badge-disabled {
  background: #feecea;
  color: var(--red);
}
.badge-protected {
  background: var(--navy);
  color: white;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}
.notice {
  padding: 13px 15px;
  border-radius: 11px;
  margin: 0 0 18px;
  line-height: 1.6;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.notice img {
  margin-top: 3px;
  flex: none;
}
.notice.warning {
  background: var(--warning);
  border: 1px solid #f5a62355;
  color: #825900;
}
.notice.danger {
  background: #feecea;
  border: 1px solid #f0443855;
  color: #a42b22;
}
.notice.success {
  background: var(--tint);
  border: 1px solid #0fb3a144;
  color: var(--teal-dark);
}
.notice.subtle {
  background: #f5f8fb;
  color: #55617a;
}
.empty {
  text-align: center;
  padding: 66px 24px;
  max-width: 540px;
  margin: auto;
}
.empty-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--tint);
  color: var(--teal-dark);
  border-radius: 16px;
  margin-bottom: 18px;
  font-size: 22px;
}
.empty h2 {
  font-size: 16px;
  margin-bottom: 8px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0 0 18px;
  min-width: 0;
}
.field > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #55617a;
}
input:not([type="checkbox"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  background: #f8f9fb;
  color: var(--ink);
  min-height: 44px;
}
textarea {
  resize: vertical;
}
input[type="checkbox"] {
  accent-color: var(--teal);
  width: 18px;
  height: 18px;
  flex: none;
  margin: 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 13px 0;
  font-size: 12px;
}
.check input {
  margin-top: 1px;
}
.check:has(input:disabled) {
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: grid;
  place-items: center;
  padding: 36px 20px;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 30px 28px;
  width: 400px;
  max-width: 100%;
  box-shadow: 0 22px 54px -14px #0c1e3466;
}
.login-card .brand {
  margin-bottom: 27px;
}
.login-card h1 {
  font-size: 21px;
  margin-bottom: 24px;
}
.login-card .notice {
  margin-top: 18px;
}
.login-card .text-link {
  display: block;
  text-align: center;
  margin-top: 18px;
}
.fine-print {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  margin: 17px 0 0;
  line-height: 1.8;
}
.otp {
  letter-spacing: 8px;
  text-align: center;
  font-size: 22px;
  background: white !important;
}
.setup-key {
  background: #f1f3f5;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  overflow-wrap: anywhere;
  margin: 20px 0;
}
.setup-key code {
  font-size: 16px;
}
.login-card .muted {
  font-size: 13px;
}
.setup-key + .fine-print {
  margin-bottom: 22px;
}
.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1fr);
  gap: 18px;
}
.review-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.review-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.profile-edit { margin-top: 22px; }
.content > .profile-history { margin-top: 20px; }
.history-entry { border-top: 1px solid var(--border); padding: 16px 0; margin-top: 16px; }
.history-entry summary { cursor: pointer; overflow-wrap: anywhere; }
.history-entry summary small { margin: 4px 0 12px; }
.history-entry table { min-width: 420px; }
.history-entry td { white-space: normal; overflow-wrap: anywhere; max-width: 260px; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 16px; }
.followup-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.field-chip { padding: 4px 9px; border-radius: 6px; background: var(--canvas); font-size: 11px; }
.followup-event { padding: 12px 0; border-top: 1px solid var(--border); }
.followup-event p { margin-bottom: 0; }
.correction-options { border: 0; padding: 0; margin: 0 0 18px; }
.correction-options legend { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.search-form .followup-filter { width: auto; max-width: 230px; }
.search-form input:not([type="hidden"]), .search-form select { min-width: 0; }
.followup-status { margin-top: 7px; }
.badge-awaiting_response, .badge-follow_up_due, .badge-expired { background: var(--warning); color: #825900; }
.badge-response_received, .badge-resolved { background: var(--tint); color: var(--teal-dark); }
.badge-replaced, .badge-cancelled { background: var(--canvas); color: var(--muted); }
.documents-panel {
  min-height: 540px;
}
.document-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #edeff3;
}
.document-row > div {
  flex: 1;
  min-width: 0;
}
.document-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.document-row small {
  font-size: 10px;
}
.document-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tint);
  border-radius: 8px;
  width: 34px;
  height: 38px;
  flex: none;
}
.documents-panel > .notice {
  margin-top: 22px;
}
.history-heading {
  padding-top: 10px;
}
.facts {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px 16px;
  font-size: 12px;
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid #edeff3;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
  color: #55617a;
}
.review-aside .field {
  margin-top: 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.narrow {
  max-width: 650px;
  margin: auto;
}
.recovery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 25px 0;
}
.recovery-grid code {
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 12px;
  text-align: center;
  letter-spacing: 1px;
  overflow-wrap: anywhere;
  font-size: 12px;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  max-width: calc(100vw - 32px);
  width: 620px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 22px 54px -14px #0c1e3480;
}
dialog::backdrop {
  background: #0c1e34aa;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 20px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 20px;
}
.icon-button {
  background: transparent;
  border: 0;
  font-size: 25px;
  color: var(--muted);
  width: 36px;
  height: 36px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 350px;
  font-size: 11px;
}
summary {
  cursor: pointer;
  color: var(--teal-dark);
}
@media (min-width: 1600px) {
  .content {
    padding: 32px 40px;
  }
  .topbar {
    padding: 26px 40px;
  }
  .chart-panel {
    min-height: 560px;
  }
  .bars {
    height: 330px;
  }
}
@media (max-width: 1200px) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1.3fr 1fr;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .review-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-row: 1;
  }
  .documents-panel {
    min-height: 0;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .content {
    padding: 22px;
  }
  .topbar {
    padding: 20px 22px;
  }
}
@media (max-width: 850px) {
  .search-form { flex-wrap: wrap; }
  .search-form input:not([type="hidden"]) { flex: 1 1 220px; max-width: none; }
  .search-form .followup-filter { flex: 1 1 180px; max-width: none; }
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    width: 230px;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 16px 0 40px #0c1e3420;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .menu-toggle {
    display: block;
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px;
  }
  .content {
    padding: 18px 16px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .chart-panel {
    min-height: 360px;
  }
  .bars {
    height: 200px;
  }
  .review-aside,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .workspace-footer {
    padding: 16px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .topbar h1 {
    font-size: 19px;
  }
  .topbar p {
    font-size: 11px;
  }
  .search-form .muted {
    display: none;
  }
  .metric strong {
    font-size: 22px;
  }
  .metric {
    padding: 14px 12px;
  }
  .metrics {
    gap: 8px;
  }
  .metric h2 {
    font-size: 9px;
  }
  .panel {
    padding: 18px;
  }
  .table-panel {
    padding: 0;
  }
  .panel-heading {
    gap: 10px;
  }
  .panel-heading > .button {
    font-size: 11px;
    padding: 8px 10px;
  }
}
@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .document-row {
    flex-wrap: wrap;
  }
  .document-row > .button {
    margin-left: 48px;
  }
  .login-card {
    padding: 26px 22px;
  }
  .tabs {
    gap: 6px;
  }
  .tabs a {
    padding: 6px 11px;
    font-size: 11px;
  }
  .topbar > .avatar {
    display: none;
  }
}

/* Ensure original exported icons remain legible against both navigation states. */
.nav-item:not(.active) img {
  filter: brightness(0) invert(1);
  opacity: 0.72;
}
.nav-item.active img {
  filter: brightness(0);
  opacity: 0.78;
}
@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}
