:root {
  --navy: #07365c;
  --navy-dark: #052944;
  --green: #0dac72;
  --green-dark: #0a8f5e;
  --text: #545454;
  --muted: #88939d;
  --border: #e4e7eb;
  --surface: #ffffff;
  --danger: #ff4b55;
  --purple: #7a3f9d;
  --blue: #0f52ba;
  --slate: #708090;
  --gold: #daa520;
  --olive: #7b9a5e;
  --shadow: 0 8px 28px rgba(9, 38, 63, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #041f35;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at 62% 62%, rgba(0, 228, 255, 0.22), transparent 30%),
    linear-gradient(rgba(2, 30, 50, 0.84), rgba(2, 30, 50, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 74px, rgba(0, 217, 255, 0.06) 75px),
    repeating-linear-gradient(0deg, transparent 0 74px, rgba(0, 217, 255, 0.05) 75px),
    #03233a;
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: flex;
  min-height: 90px;
  align-items: center;
  gap: 26px;
  padding: 0 4.4vw;
  color: white;
  background: var(--navy);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.brand {
  flex: 0 0 auto;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.brand img {
  display: block;
  width: 150px;
  max-height: 46px;
}

.main-nav {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(13px, 1.45vw, 28px);
}

.main-nav > a,
.nav-trigger {
  padding: 32px 0;
  border: 0;
  color: white;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-trigger:hover,
.nav-group.active .nav-trigger {
  color: #27bb79;
}

.nav-group {
  position: relative;
}

.nav-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-menu {
  position: absolute;
  top: calc(100% - 14px);
  left: -18px;
  display: none;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text);
  background: white;
  box-shadow: var(--shadow);
}

.nav-menu-wide {
  min-width: 300px;
}

.nav-group:hover .nav-menu,
.nav-group.open .nav-menu {
  display: grid;
}

.nav-menu a {
  padding: 10px 12px;
  border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--green);
  background: #f3faf7;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border: 0;
  color: white;
  background: transparent;
}

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: white;
  font-weight: 700;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  width: 200px;
  padding: 8px;
  border-radius: 6px;
  color: var(--text);
  background: white;
  box-shadow: var(--shadow);
}

.account-dropdown.open {
  display: grid;
}

.account-dropdown a {
  padding: 10px 12px;
  border-radius: 4px;
}

.account-dropdown a:hover {
  color: var(--green);
  background: #f3faf7;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: white;
  background: transparent;
  font-size: 24px;
}

.app-shell {
  width: min(1500px, calc(100% - 68px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 42px 0 70px;
}

.app-shell:focus {
  outline: none;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.page-title {
  margin: 0;
  color: white;
  font-size: 21px;
  font-weight: 500;
}

.page-subtitle {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 600;
}

.button-primary {
  color: white;
  background: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary {
  color: var(--text);
  border-color: var(--border);
  background: white;
}

.translation-toolbar,
.translation-filters form,
.translation-pagination {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.translation-toolbar label,
.translation-filters label {
  display: grid;
  gap: .4rem;
  min-width: 220px;
}

.translation-import {
  cursor: pointer;
}

.translation-import input {
  display: none;
}

.translation-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.translation-stats article {
  display: grid;
  gap: .35rem;
}

.translation-stats article span {
  color: var(--muted);
  font-size: .82rem;
}

.translation-stats article strong {
  font-size: 1.65rem;
}

.translation-table {
  min-width: 1320px;
}

.translation-table textarea,
.translation-table input,
.translation-table select {
  width: 100%;
  min-width: 150px;
}

.translation-table textarea {
  resize: vertical;
}

.translation-source {
  min-width: 260px;
  max-width: 360px;
  white-space: normal;
}

.translation-warning {
  display: block;
  width: max-content;
  margin-top: .45rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a5700;
  font-size: .72rem;
  font-weight: 700;
}

.translation-pagination {
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.translation-pagination > div {
  display: flex;
  gap: .5rem;
}

.translation-glossary {
  margin-top: 1rem;
}

.translation-glossary summary {
  cursor: pointer;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .translation-stats {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {
  .translation-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .translation-toolbar > *,
  .translation-filters label,
  .translation-filters button {
    width: 100%;
  }
}

.button-danger {
  color: white;
  background: var(--danger);
}

.button-icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: white;
  background: var(--green);
}

.button-icon.danger {
  background: var(--danger);
}

.card {
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 26px 36px;
}

.metric-card {
  position: relative;
  min-height: 106px;
  overflow: visible;
  padding: 18px 22px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  color: white;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.metric-card.blue { background: var(--blue); }
.metric-card.slate { background: var(--slate); }
.metric-card.gold { background: var(--gold); }
.metric-card.olive { background: var(--olive); }
.metric-card.purple { background: var(--purple); }

.metric-value {
  font-size: 25px;
  font-weight: 600;
}

.metric-label {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 500;
}

.metric-icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  font-size: 32px;
  opacity: 0.9;
}

.metric-icon img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.metric-badge {
  position: absolute;
  top: -14px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 18px;
  background: var(--danger);
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.table-card {
  overflow: hidden;
  padding: 34px 38px 42px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.table-size,
.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-size select,
.search-field input,
.form-control {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: white;
}

.search-field input {
  min-width: 250px;
}

.table-size select:focus,
.search-field input:focus,
.form-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(13, 172, 114, 0.12);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 15px 16px;
  border-top: 1px solid #eceef0;
  text-align: left;
}

.data-table th {
  font-weight: 500;
}

.data-table tbody tr:nth-child(odd) {
  background: #f5f5f5;
}

.data-table tbody tr:hover {
  background: #edf8f3;
}

.table-empty {
  padding: 52px 20px !important;
  text-align: center !important;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.read-only-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #cbd7e3;
  border-radius: 999px;
  color: #40566d;
  background: #eef3f7;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
}

.pagination {
  display: flex;
  gap: 6px;
}

.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: white;
}

.pagination button.active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.status {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status.active,
.status.approved,
.status.completed {
  color: #0a774e;
  background: #dff6eb;
}

.status.pending,
.status.incomplete {
  color: #9a6a00;
  background: #fff1c9;
}

.status.expired {
  color: #b02934;
  background: #ffe0e3;
}

.form-card {
  padding: 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 26px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 500;
}

.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.required::after {
  content: " *";
  color: var(--danger);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.archive-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.summary-box {
  padding: 22px;
}

.summary-value {
  display: block;
  font-size: 27px;
  font-weight: 600;
  color: var(--navy);
}

.archive-link {
  color: var(--green);
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 21, 36, 0.72);
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 24px;
}

.modal-body {
  padding: 28px;
}

.modal-wide {
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.modal-kicker {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.builder-modal-body {
  overflow-y: auto;
}

.builder-metadata {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.builder-template-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid #d9e4ec;
  border-radius: 6px;
  background: #f7fafc;
}

.archive-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.archive-result-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.builder-template-bar label {
  flex: 1;
  color: var(--navy);
  font-weight: 700;
}

.builder-template-bar select {
  margin-top: 7px;
}

.builder-workspace {
  display: grid;
  gap: 16px;
}

.builder-card {
  padding: 18px;
  border: 1px solid #dbe4eb;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: white;
}

.builder-card-header,
.builder-block-toolbar,
.builder-inline-actions,
.builder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-index {
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.builder-label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--navy);
  font-weight: 700;
}

.builder-items,
.builder-blocks {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.builder-item {
  display: grid;
  grid-template-columns: 32px 1fr 170px 38px;
  align-items: center;
  gap: 8px;
}

.builder-item-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

.form-control.compact {
  width: auto;
  min-width: 120px;
}

.builder-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #c9d6df;
  border-radius: 5px;
  background: #fbfcfd;
}

.builder-textarea {
  min-height: 110px;
}

.builder-question-options {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
}

.builder-question-options label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.builder-inline-actions {
  justify-content: flex-start;
}

.builder-footer {
  position: sticky;
  bottom: -28px;
  z-index: 2;
  margin: 24px -28px -28px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: white;
}

.button-small {
  padding: 8px 12px;
  font-size: 13px;
}

.button-link {
  padding: 3px;
  border: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.button-link.danger {
  color: var(--danger);
}

.toast-root {
  position: fixed;
  z-index: 700;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  padding: 14px 18px;
  border-radius: 5px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: var(--danger);
}

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.loading-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 14px;
  color: #545454;
  background: rgba(247, 249, 251, 0.93);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.loading-screen.hidden {
  visibility: hidden;
  opacity: 0;
}

.loading-dots {
  display: flex;
}

.loading-dots span {
  width: 20px;
  height: 20px;
  margin-left: -4px;
  border: 2px solid white;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite alternate;
}

.loading-dots span:nth-child(1) { background: #d18d27; }
.loading-dots span:nth-child(2) { background: #f3a53b; animation-delay: 100ms; }
.loading-dots span:nth-child(3) { background: #64bee5; animation-delay: 200ms; }
.loading-dots span:nth-child(4) { background: #f8df3e; animation-delay: 300ms; }

@keyframes pulse {
  to { transform: translateY(-5px); }
}

.footer {
  padding: 18px 34px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.error-card {
  padding: 50px;
  text-align: center;
}

.error-card h2 {
  color: var(--navy);
}

@media (max-width: 1280px) {
  .topbar {
    gap: 16px;
    padding-inline: 26px;
  }

  .main-nav {
    gap: 14px;
  }

  .main-nav > a,
  .nav-trigger {
    font-size: 14px;
  }

  .account-name {
    display: none;
  }

  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    min-height: 72px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-basis: 100%;
    align-items: stretch;
    padding-bottom: 18px;
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav > a,
  .nav-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 10px 0;
    text-align: left;
  }

  .nav-menu {
    position: static;
    margin-top: 3px;
    box-shadow: none;
  }

  .account-menu {
    margin-left: 0;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 28px, 1500px);
    padding-top: 28px;
  }

  .brand {
    font-size: 24px;
  }

  .dashboard-grid,
  .form-grid,
  .archive-summary {
    grid-template-columns: 1fr;
  }

  .builder-template-bar,
  .builder-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-item,
  .builder-question-options {
    grid-template-columns: 1fr;
  }

  .table-card,
  .form-card {
    padding: 22px 18px 28px;
  }

  .table-toolbar,
  .table-footer,
  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field input {
    width: 100%;
    min-width: 0;
  }

  .page-header .button {
    align-self: flex-start;
  }
}

/* Modern application shell */

:root {
  --navy: #0b1f33;
  --navy-dark: #071727;
  --green: #16a77a;
  --green-dark: #0e8a64;
  --text: #17243a;
  --muted: #69778d;
  --border: #dfe6ee;
  --surface: #ffffff;
  --danger: #e5484d;
  --purple: #7257c5;
  --blue: #2f6fec;
  --slate: #60738a;
  --gold: #d6922f;
  --olive: #5f9274;
  --shadow: 0 12px 32px rgba(20, 40, 67, 0.08);
  --shadow-soft: 0 4px 16px rgba(20, 40, 67, 0.06);
  --sidebar-width: 272px;
}

html {
  color-scheme: light;
  background: #f4f7fb;
}

body {
  color: var(--text);
  background: #f4f7fb;
  background-image: none;
  background-attachment: initial;
}

.app-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 300;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  color: #dce7f3;
  background:
    radial-gradient(circle at 10% 0, rgba(46, 116, 186, 0.24), transparent 32%),
    linear-gradient(180deg, #0b2238 0%, #081a2c 100%);
  box-shadow: 8px 0 30px rgba(9, 28, 47, 0.08);
}

.sidebar-brand {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .brand {
  padding: 0;
}

.sidebar .brand img {
  width: 154px;
}

.sidebar-close {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  color: white;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
}

.sidebar-context {
  display: grid;
  gap: 5px;
  margin: 20px 18px 10px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.context-eyebrow,
.workspace-eyebrow {
  color: #8ba0b5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar-context strong {
  overflow: hidden;
  color: white;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #96a9bb;
  font-size: 11px;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #31d59b;
  box-shadow: 0 0 0 4px rgba(49, 213, 155, 0.12);
}

.sidebar .main-nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 4px;
  overflow-y: auto;
  padding: 14px 14px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.sidebar .main-nav > a,
.sidebar .nav-trigger {
  display: grid;
  width: 100%;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #b7c6d5;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.sidebar .main-nav > a:hover,
.sidebar .main-nav > a.active,
.sidebar .nav-trigger:hover,
.sidebar .nav-group.active > .nav-trigger,
.sidebar .nav-group.open > .nav-trigger {
  color: white;
  background: rgba(255, 255, 255, 0.085);
}

.sidebar .main-nav > a.active {
  background: linear-gradient(135deg, #197e67, #159b76);
  box-shadow: 0 8px 18px rgba(13, 143, 105, 0.22);
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #9fb2c4;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.sidebar a.active .nav-icon,
.sidebar .nav-trigger:hover .nav-icon,
.sidebar .nav-group.open .nav-icon,
.sidebar .nav-group.active .nav-icon {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.nav-chevron {
  color: #7890a7;
  transition: transform 160ms ease;
}

.nav-group.open .nav-chevron,
.nav-group.active .nav-chevron {
  transform: rotate(180deg);
}

.sidebar .nav-group {
  position: static;
}

.sidebar .nav-menu {
  position: static;
  display: none;
  min-width: 0;
  margin: 3px 0 5px 40px;
  padding: 3px 0 4px 12px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: #aabccd;
  background: transparent;
  box-shadow: none;
}

.sidebar .nav-group.open .nav-menu,
.sidebar .nav-group.active .nav-menu {
  display: grid;
}

.sidebar .nav-menu a {
  padding: 8px 10px;
  border-radius: 7px;
  color: #9fb2c4;
  font-size: 12px;
  font-weight: 550;
}

.sidebar .nav-menu a:hover,
.sidebar .nav-menu a.active {
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 18px 18px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
}

.secure-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #4adeaa;
  background: rgba(49, 213, 155, 0.12);
  font-weight: 800;
}

.sidebar-footer div {
  display: grid;
}

.sidebar-footer strong {
  color: white;
  font-size: 11px;
}

.sidebar-footer span:last-child {
  color: #8399ad;
  font-size: 10px;
}

.nav-overlay {
  display: none;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.workspace-header {
  position: sticky;
  z-index: 200;
  top: 0;
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(214, 224, 234, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 14px rgba(27, 48, 74, 0.035);
  backdrop-filter: blur(16px);
}

.workspace-heading,
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.workspace-heading > div {
  display: grid;
  gap: 2px;
}

.workspace-heading strong {
  color: #223149;
  font-size: 14px;
}

.workspace-eyebrow {
  color: #7b8ba0;
}

.header-help {
  padding: 8px 12px;
  border-radius: 8px;
  color: #627289;
  font-size: 12px;
  font-weight: 700;
}

.header-help:hover {
  color: var(--green-dark);
  background: #eef9f5;
}

.workspace-header .account-menu {
  position: relative;
}

.workspace-header .account-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 7px;
  border: 1px solid #e3e9f0;
  border-radius: 12px;
  color: var(--text);
  background: white;
  box-shadow: 0 3px 12px rgba(21, 45, 72, 0.045);
}

.workspace-header .avatar {
  width: 36px;
  height: 36px;
  color: white;
  background: linear-gradient(135deg, #0f7e64, #20b587);
}

.account-copy {
  display: grid;
  min-width: 96px;
  text-align: left;
}

.account-copy strong {
  color: #24344a;
  font-size: 12px;
}

.account-copy small {
  color: #8491a2;
  font-size: 10px;
}

.account-chevron {
  color: #8997a8;
}

.workspace-header .account-dropdown {
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 7px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.workspace-header .account-dropdown a {
  padding: 10px 11px;
  border-radius: 8px;
  color: #53637a;
  font-size: 12px;
  font-weight: 600;
}

.workspace-header .account-dropdown a:hover {
  color: var(--green-dark);
  background: #eef9f5;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #dfe6ee;
  border-radius: 10px;
  color: #32445b;
  background: white;
  font-size: 19px;
}

.app-shell {
  width: auto;
  max-width: 1540px;
  min-height: calc(100vh - 130px);
  margin: 0 auto;
  padding: 34px 34px 52px;
}

.app-shell:focus {
  outline: none;
}

.page-header {
  align-items: flex-end;
  margin-bottom: 24px;
}

.page-title {
  color: #14233a;
  font-size: clamp(25px, 2.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-subtitle {
  margin-top: 6px;
  color: #728197;
  font-size: 13px;
}

.card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.metric-card,
.metric-card.blue,
.metric-card.slate,
.metric-card.gold,
.metric-card.olive,
.metric-card.purple {
  --accent: #2f6fec;
  min-height: 132px;
  padding: 24px 84px 22px 22px;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  color: #24344a;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card.slate { --accent: #60738a; }
.metric-card.gold { --accent: #d6922f; }
.metric-card.olive { --accent: #5f9274; }
.metric-card.purple { --accent: #7257c5; }

.metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: var(--accent);
  content: "";
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: #cfd9e5;
  box-shadow: 0 16px 30px rgba(20, 40, 67, 0.11);
}

.metric-value {
  color: #15253b;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.metric-label {
  margin-top: 6px;
  color: #718096;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-icon {
  right: 19px;
  bottom: 22px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent);
  opacity: 1;
}

.metric-icon img {
  width: 34px;
  height: 34px;
}

.metric-badge {
  top: 14px;
  right: 16px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #b4232d;
  background: #fff0f1;
  box-shadow: none;
  font-size: 9px;
  font-weight: 800;
}

.dashboard-hero {
  position: relative;
  display: grid;
  min-height: 236px;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 30px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(40, 83, 115, 0.15);
  border-radius: 18px;
  color: white;
  background:
    radial-gradient(circle at 92% 10%, rgba(43, 204, 154, 0.24), transparent 34%),
    linear-gradient(135deg, #0b2a42 0%, #104562 58%, #12665f 100%);
  box-shadow: 0 18px 42px rgba(12, 48, 72, 0.16);
}

.dashboard-hero::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.025),
    0 0 0 68px rgba(255, 255, 255, 0.02);
  content: "";
}

.dashboard-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-eyebrow {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #a9e7d4;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  max-width: 570px;
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.dashboard-hero p {
  max-width: 590px;
  margin: 14px 0 0;
  color: #c5d7e2;
  font-size: 13px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.dashboard-hero .button-primary {
  border-color: #27b98d;
  background: #27b98d;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
}

.hero-stats > div {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(8px);
}

.hero-stats span {
  color: white;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-stats small {
  color: #c2d5df;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.4;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 16px;
}

.section-heading > div {
  display: grid;
  gap: 3px;
}

.section-heading span {
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading strong {
  color: #26364c;
  font-size: 16px;
}

.section-heading small {
  color: #8794a5;
  font-size: 10px;
}

.compliance-section-heading {
  margin-top: 24px;
}

.compliance-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.compliance-summary-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 15px 16px 15px 19px;
  overflow: hidden;
  border: 1px solid #e1e8ef;
  border-radius: 12px;
  color: #34475e;
  background: white;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(15, 35, 55, 0.04);
}

.compliance-summary-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: #8090a2;
  content: "";
}

.compliance-summary-card:hover {
  border-color: #c9d5e0;
  box-shadow: 0 9px 24px rgba(15, 35, 55, 0.09);
  transform: translateY(-1px);
}

.compliance-summary-card.expired::before {
  background: #d64753;
}

.compliance-summary-card.due-soon::before {
  background: #e5a42f;
}

.compliance-summary-card.valid::before {
  background: #2c82c9;
}

.compliance-summary-card span {
  overflow: hidden;
  color: #718096;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.compliance-summary-card strong {
  color: #203249;
  font-size: 23px;
  line-height: 1;
}

.compliance-summary-card small {
  color: #8a97a6;
  font-size: 9px;
}

.compliance-alert-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.compliance-alert-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e1e8ef;
  border-radius: 13px;
  background: white;
  box-shadow: 0 5px 16px rgba(15, 35, 55, 0.04);
}

.compliance-alert-panel-wide {
  grid-column: 1 / -1;
}

.operations-section-heading {
  margin-top: 6px;
}

.operations-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.operations-summary-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 16px;
  border: 1px solid #dce8e4;
  border-radius: 12px;
  color: #34475e;
  background: linear-gradient(145deg, #fff, #f4faf8);
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(15, 35, 55, 0.04);
}

.operations-summary-card:hover {
  border-color: #aed3c7;
  box-shadow: 0 9px 24px rgba(15, 35, 55, 0.09);
  transform: translateY(-1px);
}

.operations-summary-card.attention {
  border-color: #eadcbf;
  background: linear-gradient(145deg, #fff, #fff9ec);
}

.operations-summary-card span {
  overflow: hidden;
  color: #718096;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.operations-summary-card strong {
  color: #183d4a;
  font-size: 24px;
}

.operations-summary-card small {
  color: #7f8d9e;
  font-size: 9px;
  line-height: 1.45;
}

.compliance-alert-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e9eef3;
  background: #fbfcfd;
}

.compliance-alert-panel header span,
.compliance-alert-panel header h3 {
  display: block;
  margin: 0;
}

.compliance-alert-panel header span {
  margin-bottom: 2px;
  color: #087a5b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compliance-alert-panel header h3 {
  color: #273a51;
  font-size: 13px;
}

.compliance-alert-panel header a {
  flex: 0 0 auto;
  color: #087a5b;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.compliance-alert-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compliance-alert-panel li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f5;
}

.compliance-alert-panel li:last-child {
  border-bottom: 0;
}

.compliance-alert-panel li > div {
  min-width: 0;
}

.compliance-alert-panel li strong,
.compliance-alert-panel li small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compliance-alert-panel li strong {
  color: #3a4d64;
  font-size: 10px;
}

.compliance-alert-panel li small {
  margin-top: 2px;
  color: #8895a5;
  font-size: 8px;
}

.alert-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8c9aaa;
  box-shadow: 0 0 0 3px rgba(140, 154, 170, 0.12);
}

.alert-status-dot.expired {
  background: #d64753;
  box-shadow: 0 0 0 3px rgba(214, 71, 83, 0.12);
}

.alert-status-dot.due_soon {
  background: #e5a42f;
  box-shadow: 0 0 0 3px rgba(229, 164, 47, 0.14);
}

.alert-state {
  padding: 4px 7px;
  border-radius: 999px;
  color: #657589;
  background: #eef2f5;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.alert-state.expired {
  color: #b42e3b;
  background: #fff0f1;
}

.alert-state.due_soon {
  color: #8d5a09;
  background: #fff6e3;
}

.alert-empty {
  display: block !important;
  color: #7f8d9e;
  font-size: 10px;
  text-align: center;
}

.table-card,
.form-card {
  padding: 22px;
  border-radius: 14px;
}

.table-toolbar {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf1f5;
}

.table-toolbar label,
.table-size,
.search-field {
  color: #6d7b8e;
  font-size: 11px;
  font-weight: 700;
}

.table-toolbar select,
.search-field input {
  min-height: 38px;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  color: #26364c;
  background: #f9fbfd;
}

.search-field input {
  min-width: 250px;
  padding: 8px 12px;
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: -2px 0 18px;
  padding: 16px;
  border: 1px solid #e4ebf2;
  border-radius: 11px;
  background: #f8fafc;
}

.worker-list-filters {
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
}

.risk-assessment-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
}

.distribution-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
}

.catalog-filters {
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
}

.qr-state {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
}

.qr-state.available {
  color: #087a5b;
  background: #e5f7f0;
}

.qr-state.unavailable {
  color: #7d8998;
  background: #eef1f4;
}

.advanced-filters label {
  display: grid;
  gap: 7px;
  color: #68778b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.date-range-filter {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 7px;
}

.filter-label {
  color: #68778b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.advanced-filters select,
.advanced-filters input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d8e2eb;
  border-radius: 9px;
  color: #26364c;
  background: white;
  font-size: 12px;
}

.date-range-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d8e2eb;
  border-radius: 9px;
  color: #53647a;
  background: white;
  font-size: 12px;
  text-align: left;
}

.date-range-trigger strong {
  overflow: hidden;
  color: #26364c;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-range-trigger.active {
  border-color: rgba(22, 167, 122, 0.45);
  color: #087a5b;
  background: #f5fcf9;
}

.date-range-popover {
  position: absolute;
  z-index: 40;
  top: calc(100% + 9px);
  left: 0;
  width: 320px;
  padding: 14px;
  border: 1px solid #dfe7ef;
  border-radius: 13px;
  background: white;
  box-shadow: 0 18px 45px rgba(15, 35, 55, 0.2);
}

.date-range-popover.hidden {
  display: none;
}

.calendar-header {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin-bottom: 10px;
}

.calendar-header strong {
  color: #25364c;
  font-size: 13px;
  text-align: center;
}

.calendar-header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  color: #52657b;
  background: #f3f7fa;
  font-size: 19px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-weekdays span {
  padding: 5px 0 7px;
  color: #91a0b2;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 0;
  color: #3d4f65;
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.calendar-day:not(.empty):hover {
  border-radius: 8px;
  color: #087a5b;
  background: #e9f8f3;
}

.calendar-day.in-range {
  color: #087a5b;
  background: #e9f8f3;
}

.calendar-day.selected {
  border-radius: 8px;
  color: white;
  background: var(--green);
  box-shadow: 0 4px 10px rgba(22, 167, 122, 0.24);
}

.calendar-day.today:not(.selected)::after {
  position: absolute;
  right: 50%;
  bottom: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--green);
  content: "";
  transform: translateX(50%);
}

.calendar-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
}

.calendar-footer small {
  max-width: 210px;
  color: #7b899a;
  font-size: 9px;
  line-height: 1.45;
}

.calendar-footer button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: #087a5b;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.advanced-filters select:focus,
.advanced-filters input:focus,
.date-range-trigger:focus {
  border-color: var(--green);
  outline: 3px solid rgba(22, 167, 122, 0.12);
}

.clear-filters {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #d8e2eb;
  border-radius: 9px;
  color: #607086;
  background: white;
  font-size: 11px;
  font-weight: 750;
}

.clear-filters:hover {
  border-color: #b7c6d5;
  color: #26364c;
}

.table-scroll {
  border: 1px solid #e6ebf1;
  border-radius: 11px;
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead {
  position: sticky;
  z-index: 2;
  top: 0;
}

.data-table th {
  padding: 13px 14px;
  border-bottom: 1px solid #dfe6ee;
  color: #637289;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  color: #405169;
  font-size: 12px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background: #f8fbfd;
}

.table-footer {
  padding-top: 16px;
  color: #7d8a9c;
  font-size: 11px;
}

.pagination button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  color: #64748a;
  background: white;
}

.pagination button.active {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.button {
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
}

.button-primary {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 7px 16px rgba(22, 167, 122, 0.2);
}

.button-primary:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.button-secondary {
  border-color: #d9e2eb;
  color: #53647a;
  background: white;
}

.button-icon {
  border-radius: 8px;
  color: #527087;
  background: #f2f6f9;
}

.button-icon.danger {
  color: #c93642;
  background: #fff1f2;
}

.button-icon.view-document {
  display: inline-flex;
  width: auto;
  min-width: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  color: #087a5b;
  background: #e9f8f3;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.button-icon.view-document:hover {
  color: white;
  background: var(--green);
}

.document-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #087a5b;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.document-link span {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #e9f8f3;
  font-size: 12px;
}

.file-type-badge {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 7px;
  color: #a52a36;
  background: #fff0f1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.document-link:hover {
  color: var(--green);
}

.document-links {
  display: grid;
  min-width: 170px;
  gap: 6px;
}

.document-links .document-link {
  width: max-content;
  max-width: 260px;
}

.status {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.form-control {
  border: 1px solid #d9e2eb;
  border-radius: 9px;
  color: #2c3d54;
  background: #fbfcfe;
}

.form-control:focus {
  border-color: #63bda4;
  outline: 3px solid rgba(22, 167, 122, 0.11);
}

.modal-backdrop {
  background: rgba(7, 20, 35, 0.68);
  backdrop-filter: blur(4px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(7, 20, 35, 0.28);
}

.modal-header {
  padding: 20px 24px;
  background: #fbfcfe;
}

.modal-header h2 {
  color: #17273d;
}

body.modal-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

body.auth-screen .sidebar,
body.auth-screen .workspace-header,
body.auth-screen .footer,
body.auth-screen .nav-overlay {
  display: none;
}

body.auth-screen .workspace,
body.auth-screen .app-layout {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

body.auth-screen .app-shell {
  display: grid;
  width: 100%;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 16% 15%, rgba(22, 131, 111, 0.22), transparent 34%),
    linear-gradient(145deg, #0c2338, #153e52 58%, #176b61);
}

.auth-panel {
  display: grid;
  width: min(440px, 100%);
  gap: 10px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 30px 80px rgba(2, 16, 29, 0.38);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  color: #17364a;
  font-size: 13px;
  font-weight: 850;
}

.auth-brand img {
  width: 30px;
  height: 30px;
}

.auth-eyebrow {
  color: #16836f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel h1,
.auth-panel p {
  margin: 0;
}

.auth-panel h1 {
  color: #172d42;
  font-size: 24px;
}

.auth-panel p {
  color: #718096;
  font-size: 10px;
  line-height: 1.6;
}

.auth-panel form {
  display: grid;
  gap: 12px;
  margin-top: 9px;
}

.auth-panel label {
  display: grid;
  gap: 6px;
}

.auth-panel label span {
  color: #66768a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-panel input {
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #d6e0e8;
  border-radius: 9px;
  color: #26384c;
  background: #fbfcfd;
}

.auth-panel form .button {
  justify-content: center;
  min-height: 44px;
}

.auth-panel > small {
  color: #8a97a6;
  font-size: 8px;
  text-align: center;
}

.auth-error {
  min-height: 15px;
  color: #bc3541;
  font-size: 9px;
  font-weight: 700;
}

.audit-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  color: #748296;
  font-size: 9px;
}

.audit-summary strong {
  color: #173b4b;
  font-size: 22px;
}

.security-role-grid,
.local-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.security-role-grid article {
  display: grid;
  gap: 5px;
  padding: 15px;
  border: 1px solid #dfe7ed;
  border-radius: 11px;
  background: white;
}

.security-role-grid span,
.local-section-heading > span {
  color: #16836f;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.security-role-grid strong {
  color: #2a3e53;
  font-size: 12px;
}

.security-role-grid small {
  color: #7f8d9e;
  font-size: 9px;
  line-height: 1.45;
}

.compact-form-card {
  margin-top: 18px;
}

.local-workflow-boundary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #bcded3;
  border-radius: 10px;
  color: #527064;
  background: #eff9f6;
  font-size: 9px;
  line-height: 1.5;
}

.local-workflow-boundary strong {
  color: #087a5b;
  text-transform: uppercase;
}

.local-workflow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.local-section-heading h2,
.local-section-heading p {
  margin: 0;
}

.local-section-heading h2 {
  margin-top: 3px;
  color: #263a4f;
  font-size: 15px;
}

.local-section-heading p {
  margin-top: 4px;
  color: #7d8a9b;
  font-size: 9px;
  line-height: 1.5;
}

.workflow-card form {
  display: grid;
  gap: 10px;
}

.workflow-card form label {
  display: grid;
  gap: 6px;
}

.workflow-card form label > span {
  color: #68778b;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-card input,
.workflow-card select,
.workflow-card textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d8e2eb;
  border-radius: 9px;
  color: #26364c;
  background: white;
  font-size: 10px;
}

.workflow-card textarea {
  min-height: 86px;
  resize: vertical;
}

.workflow-card form .button {
  justify-content: center;
}

.workflow-history {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid #e7ecf1;
}

.workflow-history > strong {
  color: #617185;
  font-size: 9px;
  text-transform: uppercase;
}

.workflow-history > p {
  margin: 4px 0 0;
  color: #8a97a6;
  font-size: 9px;
}

.workflow-history > a,
.workflow-history-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e5ebf0;
  border-radius: 8px;
  color: #34475e;
  background: #fafbfd;
  text-decoration: none;
}

.workflow-history > a > span,
.workflow-history-row > span {
  display: grid;
  min-height: 28px;
  place-items: center;
  padding: 3px;
  border-radius: 7px;
  color: #087a5b;
  background: #e5f6f0;
  font-size: 8px;
  font-weight: 850;
}

.workflow-history a strong,
.workflow-history a small,
.workflow-history-row strong,
.workflow-history-row small {
  display: block;
}

.workflow-history a strong,
.workflow-history-row strong {
  font-size: 9px;
}

.workflow-history a small,
.workflow-history-row small {
  margin-top: 2px;
  color: #8491a1;
  font-size: 8px;
}

.pdf-preview-backdrop {
  padding: 18px;
}

.pdf-preview-modal {
  display: grid;
  width: min(1400px, calc(100vw - 36px));
  height: min(920px, calc(100vh - 36px));
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: #eef2f6;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.38);
}

.pdf-preview-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid #dce4ec;
  background: white;
}

.pdf-preview-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.pdf-badge {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #b4232d;
  background: #fff0f1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.pdf-preview-title small {
  display: block;
  margin-bottom: 2px;
  color: #8491a2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pdf-preview-title h2 {
  overflow: hidden;
  margin: 0;
  color: #1d2e43;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.pdf-preview-actions .button {
  min-height: 38px;
}

.pdf-preview-close {
  display: grid;
  width: 40px;
  height: 40px;
  margin-left: 2px;
  place-items: center;
  border: 1px solid #dce4ec;
  border-radius: 10px;
  color: #5d6e83;
  background: #f8fafc;
  font-size: 22px;
}

.pdf-preview-close:hover {
  color: #c93642;
  background: #fff1f2;
}

.pdf-preview-body {
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 12px;
}

.pdf-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 10px;
  background: #d9e0e7;
}

.pdf-preview-loading {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 9px;
  color: #53647a;
  background: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(16, 36, 57, 0.15);
  transform: translate(-50%, -50%);
}

.pdf-preview-loading span {
  width: 14px;
  height: 14px;
  border: 2px solid #cfe2dc;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: preview-spin 700ms linear infinite;
}

.pdf-preview-body.loaded .pdf-preview-loading {
  display: none;
}

@keyframes preview-spin {
  to {
    transform: rotate(360deg);
  }
}

.pdf-preview-fallback {
  margin: 0;
  padding: 8px 4px 0;
  color: #76869a;
  font-size: 10px;
  text-align: center;
}

.pdf-preview-fallback a {
  color: #087a5b;
  font-weight: 750;
}

.image-badge {
  color: #1769aa;
  background: #eaf5ff;
}

.image-preview-body {
  display: grid;
  min-height: 0;
  overflow: auto;
  place-items: center;
  padding: 18px;
  background: #dfe6ed;
}

.image-preview-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  background: white;
  box-shadow: 0 12px 38px rgba(7, 20, 35, 0.18);
  object-fit: contain;
}

.document-set-backdrop {
  padding: 18px;
}

.document-set-modal {
  display: grid;
  width: min(1100px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 16px;
  background: #f6f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.38);
}

.document-set-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #dce4ec;
  background: white;
}

.document-set-header small {
  display: block;
  margin-bottom: 3px;
  color: #8491a2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.document-set-header h2 {
  margin: 0;
  color: #1d2e43;
  font-size: 18px;
}

.document-set-content {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.document-set-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: #e0e7ee;
}

.document-set-summary div {
  min-width: 0;
  padding: 12px 14px;
  background: white;
}

.document-set-summary dt {
  margin-bottom: 4px;
  color: #7a899b;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.document-set-summary dd {
  overflow: hidden;
  margin: 0;
  color: #2c3e54;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-set-files {
  display: grid;
  gap: 9px;
}

.document-set-file {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: white;
}

.document-set-file-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #087a5b;
  background: #e9f8f3;
  font-size: 11px;
  font-weight: 850;
}

.document-set-file-copy {
  min-width: 0;
}

.document-set-file-copy small,
.document-set-file-copy strong {
  display: block;
}

.document-set-file-copy small {
  margin-bottom: 3px;
  color: #8996a6;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-set-file-copy strong {
  overflow: hidden;
  color: #34475e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-set-file-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.document-set-file-actions .button {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 10px;
}

.button-quiet {
  border-color: transparent;
  color: #5b6d82;
  background: #f3f6f9;
}

.document-set-empty {
  margin: 0;
  padding: 32px;
  color: #7a899b;
  text-align: center;
}

.shared-document-backdrop {
  padding: 18px;
}

.shared-document-modal {
  display: grid;
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 17px;
  background: #f5f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.4);
}

.shared-document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #dce4ec;
  background: white;
}

.shared-document-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.shared-document-type {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  color: #b42e3b;
  background: #fff0f1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.shared-document-heading small {
  display: block;
  margin-bottom: 3px;
  color: #8491a2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shared-document-heading h2 {
  overflow: hidden;
  margin: 0;
  color: #1d2e43;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-document-content {
  display: grid;
  min-height: 0;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.shared-document-notice {
  padding: 11px 13px;
  border: 1px solid #cfe2dc;
  border-radius: 10px;
  color: #426b60;
  background: #edf8f4;
  font-size: 10px;
  font-weight: 650;
}

.shared-document-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: #e0e7ee;
}

.shared-document-summary div {
  min-width: 0;
  padding: 11px 13px;
  background: white;
}

.shared-document-summary dt {
  margin-bottom: 4px;
  color: #7f8d9e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shared-document-summary dd {
  overflow: hidden;
  margin: 0;
  color: #34475e;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shared-document-history {
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 12px;
  background: white;
}

.shared-document-section-heading {
  padding: 13px 15px;
  border-bottom: 1px solid #e8edf2;
  background: #fafbfd;
}

.shared-document-section-heading span,
.shared-document-section-heading h3 {
  display: block;
  margin: 0;
}

.shared-document-section-heading span {
  margin-bottom: 2px;
  color: #087a5b;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shared-document-section-heading h3 {
  color: #26394f;
  font-size: 13px;
}

.shared-document-history article {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
}

.version-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #087a5b;
  background: #e9f8f3;
  font-size: 10px;
  font-weight: 850;
}

.shared-document-history article strong,
.shared-document-history article small {
  display: block;
}

.shared-document-history article strong {
  color: #34475e;
  font-size: 11px;
}

.shared-document-history article small {
  margin-top: 3px;
  color: #8592a2;
  font-size: 9px;
}

.version-state {
  padding: 5px 8px;
  border-radius: 999px;
  color: #087a5b;
  background: #e9f8f3;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.shared-document-history > p {
  margin: 0;
  padding: 10px 15px;
  border-top: 1px solid #edf1f5;
  color: #7e8c9d;
  background: #fafbfd;
  font-size: 9px;
}

.risk-detail-backdrop {
  padding: 18px;
}

.risk-detail-modal {
  display: grid;
  width: min(900px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 17px;
  background: #f5f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.4);
}

.risk-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px;
  color: white;
  background: linear-gradient(120deg, #172d46, #244e63 64%, #657b4a);
}

.risk-detail-header small {
  display: block;
  margin-bottom: 3px;
  color: #c8d8df;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.risk-detail-header h2,
.risk-detail-header p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-detail-header h2 {
  font-size: 19px;
}

.risk-detail-header p {
  margin-top: 3px;
  color: #d8e3e6;
  font-size: 10px;
}

.risk-detail-header .pdf-preview-close {
  border-color: rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.risk-detail-content {
  display: grid;
  min-height: 0;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.risk-status-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  padding: 13px 15px;
  border: 1px solid #d7e5ef;
  border-radius: 11px;
  background: #eef6fb;
}

.risk-status-banner span {
  grid-row: 1 / span 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #236b9e;
  background: #dbeefa;
  font-size: 9px;
  font-weight: 850;
}

.risk-status-banner strong {
  color: #2c455a;
  font-size: 12px;
}

.risk-status-banner small {
  color: #7e8d9d;
  font-size: 8px;
}

.risk-status-banner.expired {
  border-color: #f1cfd3;
  background: #fff4f5;
}

.risk-status-banner.expired span {
  color: #b42e3b;
  background: #ffe2e5;
}

.risk-status-banner.due_soon {
  border-color: #f0dfb9;
  background: #fff9eb;
}

.risk-status-banner.due_soon span {
  color: #8d5a09;
  background: #ffefc9;
}

.risk-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: #e0e7ee;
}

.risk-detail-summary div {
  min-width: 0;
  padding: 11px 13px;
  background: white;
}

.risk-detail-summary dt {
  margin-bottom: 4px;
  color: #7f8d9e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.risk-detail-summary dd {
  overflow: hidden;
  margin: 0;
  color: #34475e;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-attachment-state {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #d9cda9;
  border-radius: 11px;
  background: #fffaf0;
}

.risk-attachment-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #8d5a09;
  background: #ffedbf;
  font-size: 15px;
  font-weight: 900;
}

.risk-attachment-state h3,
.risk-attachment-state p {
  margin: 0;
}

.risk-attachment-state h3 {
  color: #59491f;
  font-size: 12px;
}

.risk-attachment-state p {
  margin-top: 4px;
  color: #7c6d46;
  font-size: 9px;
  line-height: 1.5;
}

.distribution-detail-backdrop {
  padding: 18px;
}

.distribution-detail-modal {
  display: grid;
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: #f5f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.4);
}

.distribution-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  color: white;
  background: linear-gradient(120deg, #102b49, #174d68 62%, #16836f);
}

.distribution-detail-header small {
  display: block;
  margin-bottom: 3px;
  color: #c4dce3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.distribution-detail-header h2,
.distribution-detail-header p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-detail-header h2 {
  font-size: 19px;
}

.distribution-detail-header p {
  margin-top: 3px;
  color: #d7e8ec;
  font-size: 10px;
}

.distribution-detail-header .pdf-preview-close {
  border-color: rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.distribution-detail-content {
  display: grid;
  min-height: 0;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.distribution-status-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid #f0dfb9;
  border-radius: 11px;
  background: #fff9eb;
}

.distribution-status-banner > span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #8d5a09;
  background: #ffefc9;
  font-size: 9px;
  font-weight: 850;
}

.distribution-status-banner.submitted,
.distribution-status-banner.completed {
  border-color: #cfe5dd;
  background: #f1faf7;
}

.distribution-status-banner.submitted > span,
.distribution-status-banner.completed > span {
  color: #087a5b;
  background: #dff4ed;
}

.distribution-status-banner strong,
.distribution-status-banner small {
  display: block;
}

.distribution-status-banner strong {
  color: #34475e;
  font-size: 12px;
}

.distribution-status-banner small {
  margin-top: 2px;
  color: #7f8d9e;
  font-size: 8px;
}

.distribution-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: #e0e7ee;
}

.distribution-detail-summary div {
  min-width: 0;
  padding: 11px 13px;
  background: white;
}

.distribution-detail-summary dt {
  margin-bottom: 4px;
  color: #7f8d9e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.distribution-detail-summary dd {
  overflow: hidden;
  margin: 0;
  color: #34475e;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-lifecycle {
  padding: 15px;
  border: 1px solid #e0e7ee;
  border-radius: 12px;
  background: white;
}

.distribution-section-heading span,
.distribution-section-heading h3 {
  display: block;
  margin: 0;
}

.distribution-section-heading span {
  color: #16836f;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.distribution-section-heading h3 {
  margin-top: 2px;
  color: #203249;
  font-size: 13px;
}

.distribution-lifecycle ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.distribution-lifecycle li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 11px;
  border: 1px solid #e5ebf1;
  border-radius: 10px;
  background: #fafbfd;
}

.distribution-timeline-marker {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  border: 3px solid #d9e1e9;
  border-radius: 50%;
  background: white;
}

.distribution-lifecycle li.complete .distribution-timeline-marker {
  border-color: #20a27d;
  background: #20a27d;
  box-shadow: inset 0 0 0 3px white;
}

.distribution-lifecycle li.current .distribution-timeline-marker {
  border-color: #e5a42f;
}

.distribution-lifecycle strong,
.distribution-lifecycle small {
  display: block;
}

.distribution-lifecycle strong {
  color: #34475e;
  font-size: 10px;
}

.distribution-lifecycle small {
  margin-top: 3px;
  color: #8491a1;
  font-size: 8px;
  line-height: 1.4;
}

.distribution-evidence-state {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 13px;
  border: 1px dashed #cbdce7;
  border-radius: 11px;
  color: #536d80;
  background: #f2f8fb;
}

.distribution-evidence-state > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  color: #236b9e;
  background: #dceefa;
  font-weight: 900;
}

.distribution-evidence-state h3,
.distribution-evidence-state p {
  margin: 0;
}

.distribution-evidence-state h3 {
  color: #345269;
  font-size: 11px;
}

.distribution-evidence-state p {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.5;
}

.record-inspector-backdrop {
  padding: 18px;
}

.record-inspector-modal {
  display: grid;
  width: min(1040px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: #f5f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.4);
}

.record-inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  color: white;
  background: linear-gradient(120deg, #102b49, #174d68 62%, #16836f);
}

.record-inspector-header small {
  display: block;
  margin-bottom: 3px;
  color: #c4dce3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.record-inspector-header h2,
.record-inspector-header p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-inspector-header h2 {
  font-size: 19px;
}

.record-inspector-header p {
  margin-top: 3px;
  color: #d7e8ec;
  font-size: 10px;
}

.record-inspector-header .pdf-preview-close {
  flex: 0 0 auto;
  border-color: rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.asset-inspector-header {
  background: linear-gradient(120deg, #202e43, #40566a 66%, #7a6731);
}

.training-inspector-header {
  background: linear-gradient(120deg, #3c263e, #694267 66%, #97612f);
}

.form-inspector-header {
  background: linear-gradient(120deg, #182d49, #30547a 64%, #4f775a);
}

.record-inspector-content {
  display: grid;
  min-height: 0;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.inspector-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.inspector-summary-grid div {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #dfe8ed;
  border-radius: 10px;
  background: white;
}

.inspector-summary-grid span {
  color: #7b899a;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inspector-summary-grid strong {
  color: #203f4c;
  font-size: 19px;
}

.record-inspector-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: #e0e7ee;
}

.record-inspector-fields div {
  min-width: 0;
  padding: 11px 13px;
  background: white;
}

.record-inspector-fields dt {
  margin-bottom: 4px;
  color: #7f8d9e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.record-inspector-fields dd {
  overflow: hidden;
  margin: 0;
  color: #34475e;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-inspector-fields a {
  color: #087a5b;
}

.inspector-disclosure {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed #cbdce7;
  border-radius: 10px;
  color: #617789;
  background: #f3f8fb;
  font-size: 9px;
  line-height: 1.5;
}

.inspector-disclosure strong {
  color: #31586e;
  font-size: 9px;
  text-transform: uppercase;
}

.induction-preview-layout {
  display: grid;
  min-height: 420px;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
}

.induction-qr-modal {
  width: min(760px, calc(100vw - 2rem));
}

.induction-qr-content {
  display: grid;
  grid-template-columns: minmax(210px, 270px) 1fr;
  gap: 1.5rem;
  align-items: center;
}

.induction-qr-image {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid #d8e5e1;
  border-radius: 18px;
  background: #f7fbfa;
}

.induction-qr-image img {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1;
}

.induction-link-field {
  display: grid;
  gap: .45rem;
  margin-top: 1rem;
}

.induction-link-field span {
  color: #5f7387;
  font-size: .78rem;
  font-weight: 750;
}

.induction-link-field input {
  width: 100%;
}

.induction-registration-summary {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid #d8e5e1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 50, 77, .06);
}

.induction-registration-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}

.induction-registration-heading span {
  color: #0b8068;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.induction-registration-heading h2 {
  margin: .2rem 0 0;
  font-size: 1.15rem;
}

.induction-registration-heading > strong {
  padding: .5rem .75rem;
  border-radius: 999px;
  background: #e3f5ef;
  color: #08705c;
  font-size: .78rem;
}

.induction-registration-cards {
  display: grid;
  gap: .55rem;
}

.induction-registration-cards article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .85rem;
  border: 1px solid #e1ebe8;
  border-radius: 12px;
  background: #f9fcfb;
}

.induction-registration-cards article > div {
  display: grid;
  gap: .22rem;
}

.induction-registration-cards article > div:last-child {
  justify-items: end;
}

.induction-registration-cards small {
  color: #667b8f;
}

@media (max-width: 680px) {
  .induction-qr-content {
    grid-template-columns: 1fr;
  }

  .induction-qr-image img {
    max-width: 220px;
  }

  .induction-registration-heading,
  .induction-registration-cards article {
    align-items: flex-start;
    flex-direction: column;
  }

  .induction-registration-cards article > div:last-child {
    justify-items: start;
  }
}

.induction-page-navigation {
  display: grid;
  align-content: start;
  gap: 6px;
  max-height: 500px;
  overflow: auto;
  padding-right: 3px;
}

.induction-page-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid #e0e7ee;
  border-radius: 9px;
  color: #53647a;
  background: white;
  text-align: left;
}

.induction-page-button > span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 8px;
  color: #527083;
  background: #eef4f7;
  font-size: 9px;
  font-weight: 850;
}

.induction-page-button strong {
  font-size: 10px;
}

.induction-page-button small {
  color: #8794a4;
  font-size: 8px;
}

.induction-page-button.active {
  border-color: #8fc8b7;
  color: #08684f;
  background: #eefaf6;
}

.induction-page-button.active > span {
  color: white;
  background: #16836f;
}

.induction-page-stage {
  min-width: 0;
}

.induction-page-panel {
  display: none;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 12px;
  background: white;
}

.induction-page-panel.active {
  display: block;
}

.induction-page-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e6ecf1;
  color: #738196;
  background: #f9fbfc;
  font-size: 9px;
}

.induction-page-panel > header span {
  color: #16836f;
  font-weight: 850;
  text-transform: uppercase;
}

.induction-page-blocks {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.induction-preview-block {
  padding: 13px;
  border: 1px solid #e5ebf1;
  border-radius: 10px;
  background: #fbfcfd;
}

.preview-block-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #8390a0;
  font-size: 8px;
}

.preview-block-label span {
  color: #16836f;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.induction-preview-block p,
.induction-preview-block h4 {
  margin: 0;
  color: #34475e;
  font-size: 11px;
  line-height: 1.6;
}

.induction-preview-block h4 {
  font-size: 13px;
}

.mapped-media-note {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #765c27;
  background: #fff7e4;
  font-size: 8px;
}

.induction-answer-options {
  display: grid;
  gap: 6px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.induction-answer-options li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e4eaf0;
  border-radius: 8px;
  color: #617185;
  background: white;
  font-size: 9px;
}

.induction-answer-options li.correct {
  border-color: #b9dfd3;
  color: #087a5b;
  background: #eff9f6;
}

.induction-answer-options small {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.asset-inspector-modal,
.training-inspector-modal {
  width: min(820px, calc(100vw - 36px));
}

.asset-qr-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #e2e8ee;
  border-radius: 12px;
  background: white;
}

.asset-qr-panel img,
.asset-qr-missing {
  width: 190px;
  height: 190px;
  object-fit: contain;
  border: 1px solid #e1e6eb;
  border-radius: 10px;
  background: white;
}

.asset-qr-missing {
  display: grid;
  place-items: center;
  color: #8794a4;
  background: #f4f6f8;
  font-size: 10px;
}

.asset-qr-panel span {
  color: #9a762e;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.asset-qr-panel h3,
.asset-qr-panel p {
  margin: 0;
}

.asset-qr-panel h3 {
  margin-top: 3px;
  color: #293c51;
  font-size: 15px;
}

.asset-qr-panel p {
  margin-top: 6px;
  color: #778597;
  font-size: 9px;
  line-height: 1.5;
}

.inspector-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.training-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #efd2d5;
  border-radius: 11px;
  background: #fff4f5;
}

.training-indicator > span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #ae3440;
  background: #ffe1e4;
  font-size: 9px;
  font-weight: 850;
}

.training-indicator.not-recorded {
  border-color: #dbe3ea;
  background: #f5f7f9;
}

.training-indicator.not-recorded > span {
  color: #69788b;
  background: #e8edf1;
}

.training-indicator strong,
.training-indicator small {
  display: block;
}

.training-indicator strong {
  color: #34475e;
  font-size: 11px;
}

.training-indicator small {
  margin-top: 2px;
  color: #8491a1;
  font-size: 8px;
}

.form-definition-sections {
  display: grid;
  gap: 10px;
}

.form-definition-sections article {
  overflow: hidden;
  border: 1px solid #e0e7ee;
  border-radius: 11px;
  background: white;
}

.form-definition-sections article > header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border-bottom: 1px solid #e7edf2;
  background: #f8fafc;
}

.form-definition-sections article > header > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #087a5b;
  background: #e4f6f0;
  font-size: 9px;
  font-weight: 850;
}

.form-definition-sections header small,
.form-definition-sections header h3 {
  display: block;
  margin: 0;
}

.form-definition-sections header small {
  color: #8391a1;
  font-size: 7px;
  text-transform: uppercase;
}

.form-definition-sections header h3 {
  color: #2c4055;
  font-size: 11px;
}

.form-definition-sections header > strong {
  color: #6f7e90;
  font-size: 8px;
}

.form-definition-sections ol {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  background: #edf1f4;
  list-style: none;
}

.form-definition-sections li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 13px;
  color: #405368;
  background: white;
  font-size: 9px;
}

.form-definition-sections li > span {
  padding: 4px 6px;
  border-radius: 6px;
  color: #406580;
  background: #edf4f8;
  font-size: 7px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.worker-profile-backdrop {
  padding: 18px;
}

.worker-profile-modal {
  display: grid;
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: #f5f8fb;
  box-shadow: 0 30px 90px rgba(4, 17, 30, 0.4);
}

.worker-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  color: white;
  background: linear-gradient(120deg, #0c2b42, #104f5d 65%, #0b7d63);
}

.worker-profile-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.worker-profile-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 16px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  font-size: 17px;
  font-weight: 850;
}

.worker-profile-header small {
  display: block;
  margin-bottom: 3px;
  color: #b9d7dd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.worker-profile-header h2,
.worker-profile-header p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-profile-header h2 {
  font-size: 20px;
}

.worker-profile-header p {
  margin-top: 3px;
  color: #d5e7e9;
  font-size: 11px;
}

.worker-profile-header .pdf-preview-close {
  border-color: rgba(255, 255, 255, 0.24);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.worker-profile-content {
  display: grid;
  min-height: 0;
  gap: 13px;
  overflow: auto;
  padding: 18px;
}

.worker-profile-notice {
  padding: 11px 13px;
  border: 1px solid #cfe2dc;
  border-radius: 10px;
  color: #426b60;
  background: #edf8f4;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
}

.worker-profile-section {
  padding: 16px;
  border: 1px solid #e0e7ee;
  border-radius: 13px;
  background: white;
}

.worker-profile-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.worker-profile-section-heading > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: #087a5b;
  background: #e9f8f3;
  font-size: 10px;
  font-weight: 850;
}

.worker-profile-section-heading small,
.worker-profile-section-heading h3 {
  display: block;
  margin: 0;
}

.worker-profile-section-heading small {
  color: #8a97a6;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.worker-profile-section-heading h3 {
  color: #203249;
  font-size: 14px;
}

.worker-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e5ebf1;
  border-radius: 10px;
  background: #e5ebf1;
}

.worker-profile-grid-compact {
  margin-top: 12px;
}

.worker-profile-field {
  min-width: 0;
  padding: 10px 12px;
  background: #fafbfd;
}

.worker-profile-field dt {
  margin-bottom: 4px;
  color: #8390a0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.worker-profile-field dd {
  overflow: hidden;
  margin: 0;
  color: #34475e;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.worker-compliance-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #e4eaf0;
  border-radius: 10px;
  background: #fafbfd;
}

.worker-compliance-card > span {
  color: #7b899a;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.worker-compliance-value {
  overflow: hidden;
  color: #4f6176;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worker-compliance-value.active,
.worker-compliance-value.approved {
  color: #087a5b;
}

.worker-compliance-value.expiring-soon,
.worker-compliance-value.pending {
  color: #9a6712;
}

.worker-induction-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d8e8e2;
  border-radius: 9px;
  color: #617185;
  background: #f1f9f6;
  font-size: 9px;
}

.worker-induction-progress strong {
  color: #087a5b;
  font-size: 10px;
}

.worker-induction-links {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.worker-induction-links article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid #e3e9ef;
  border-radius: 9px;
  background: #fafbfd;
}

.worker-induction-links strong,
.worker-induction-links small {
  display: block;
}

.worker-induction-links strong {
  color: #34475e;
  font-size: 10px;
}

.worker-induction-links small {
  margin-top: 3px;
  color: #8491a1;
  font-size: 8px;
}

.worker-induction-links article > span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #087a5b;
  background: #e4f6f0;
  font-size: 8px;
  font-weight: 850;
}

.worker-induction-links p,
.worker-profile-relationship-note {
  margin: 0;
  color: #788697;
  font-size: 9px;
  line-height: 1.5;
}

.worker-profile-relationship-note {
  margin-top: 10px;
  padding: 9px 11px;
  border-left: 3px solid #9eb8c7;
  background: #f4f7f9;
}

.worker-compliance-value.expired {
  color: #c93642;
}

.builder-card {
  border-radius: 11px;
  border-left-color: var(--green);
  box-shadow: 0 3px 12px rgba(20, 40, 67, 0.04);
}

.archive-summary {
  gap: 16px;
}

.summary-box {
  border-radius: 13px;
}

.summary-value {
  color: #17273d;
}

.archive-link {
  color: var(--green-dark);
  font-weight: 750;
}

.footer {
  padding: 16px 32px 24px;
  color: #8996a7;
  background: transparent;
  font-size: 10px;
}

.loading-screen {
  color: #33445a;
  background: rgba(245, 248, 251, 0.96);
  backdrop-filter: blur(8px);
}

.loading-mark {
  display: flex;
  gap: 6px;
}

.loading-mark span {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
  animation: loading-bars 700ms ease-in-out infinite alternate;
}

.loading-mark span:nth-child(2) {
  animation-delay: 120ms;
}

.loading-mark span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes loading-bars {
  to {
    height: 12px;
    opacity: 0.45;
  }
}

@media (max-width: 1180px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .workspace {
    margin-left: 0;
  }

  .nav-overlay {
    position: fixed;
    z-index: 250;
    inset: 0;
    border: 0;
    background: rgba(6, 17, 29, 0.46);
    backdrop-filter: blur(2px);
  }

  .nav-overlay.open {
    display: block;
  }
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .workspace-header {
    padding-inline: 20px;
  }

  .app-shell {
    padding-inline: 20px;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stats > div {
    grid-template-columns: 1fr;
  }

  .advanced-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compliance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-role-grid,
  .local-workflow-grid {
    grid-template-columns: 1fr;
  }

  .compliance-alert-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .pdf-preview-backdrop {
    padding: 0;
  }

  .pdf-preview-modal {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .pdf-preview-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .pdf-preview-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr 40px;
  }

  .pdf-preview-actions .button {
    padding-inline: 8px;
  }

  .pdf-preview-body {
    padding: 6px;
  }

  .document-set-backdrop {
    padding: 0;
  }

  .document-set-modal {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .document-set-header,
  .document-set-content {
    padding: 13px;
  }

  .document-set-summary {
    grid-template-columns: 1fr 1fr;
  }

  .document-set-file {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .document-set-file-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .document-set-file-actions .button {
    justify-content: center;
  }

  .shared-document-backdrop {
    padding: 0;
  }

  .shared-document-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .shared-document-header,
  .shared-document-content {
    padding: 13px;
  }

  .shared-document-summary {
    grid-template-columns: 1fr;
  }

  .shared-document-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shared-document-actions .button {
    justify-content: center;
  }

  .shared-document-history article {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .version-state {
    grid-column: 2;
    justify-self: start;
  }

  .risk-detail-backdrop {
    padding: 0;
  }

  .risk-detail-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .risk-detail-header,
  .risk-detail-content {
    padding: 13px;
  }

  .risk-detail-summary {
    grid-template-columns: 1fr;
  }

  .distribution-detail-backdrop {
    padding: 0;
  }

  .distribution-detail-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .distribution-detail-header,
  .distribution-detail-content {
    padding: 13px;
  }

  .distribution-detail-summary,
  .distribution-lifecycle ol {
    grid-template-columns: 1fr;
  }

  .record-inspector-backdrop {
    padding: 0;
  }

  .record-inspector-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .record-inspector-header,
  .record-inspector-content {
    padding: 13px;
  }

  .inspector-summary-grid,
  .record-inspector-fields {
    grid-template-columns: 1fr;
  }

  .induction-preview-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .induction-page-navigation {
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .induction-page-button {
    min-width: 135px;
  }

  .asset-qr-panel {
    grid-template-columns: 1fr;
  }

  .asset-qr-panel img,
  .asset-qr-missing {
    width: min(190px, 100%);
    justify-self: center;
  }

  .form-definition-sections article > header {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .form-definition-sections header > strong {
    grid-column: 2;
  }

  .form-definition-sections li {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .worker-profile-backdrop {
    padding: 0;
  }

  .worker-profile-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .worker-profile-header,
  .worker-profile-content {
    padding: 13px;
  }

  .worker-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .worker-profile-grid,
  .worker-compliance-grid {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  .workspace-heading > div,
  .header-help,
  .account-copy,
  .account-chevron {
    display: none;
  }

  .workspace-header .account-trigger {
    padding: 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .app-shell {
    width: 100%;
    padding: 24px 14px 42px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    padding: 25px 20px;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats > div {
    grid-template-columns: 72px 1fr;
  }

  .advanced-filters {
    grid-template-columns: 1fr;
  }

  .compliance-summary-grid {
    grid-template-columns: 1fr;
  }

  .operations-summary-grid {
    grid-template-columns: 1fr;
  }

  .local-workflow-boundary {
    grid-template-columns: 1fr;
  }

  .compliance-alert-panel li {
    grid-template-columns: 9px minmax(0, 1fr);
  }

  .alert-state {
    grid-column: 2;
    justify-self: start;
  }

  .date-range-popover {
    width: min(320px, calc(100vw - 56px));
  }

  .metric-card,
  .metric-card.blue,
  .metric-card.slate,
  .metric-card.gold,
  .metric-card.olive,
  .metric-card.purple {
    min-height: 116px;
  }

  .page-header,
  .table-toolbar,
  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .page-header .button {
    width: 100%;
    justify-content: center;
  }

  .search-field,
  .search-field input {
    width: 100%;
    min-width: 0;
  }

  .table-card,
  .form-card {
    padding: 14px;
  }
}

.pilot-workflow-grid {
  margin-bottom: 20px;
}

.pilot-submission-card,
.pilot-certificate-card {
  margin-bottom: 20px;
  padding: 24px;
}

.assignment-picker {
  display: grid;
  gap: 7px;
  max-width: 760px;
  margin: 20px 0;
}

.submission-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.submission-context div,
.expiry-summary-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.submission-context span,
.expiry-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.pilot-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pilot-question {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.pilot-question > span {
  color: var(--ink);
  font-weight: 700;
}

.pilot-question > span b {
  color: #b72f45;
  font-size: 10px;
  text-transform: uppercase;
}

.pilot-question small {
  min-height: 30px;
  color: var(--muted);
}

.signature-pad canvas {
  width: 100%;
  height: 120px;
  border: 1px dashed #9cb1bb;
  border-radius: 10px;
  background: #fbfdfd;
  touch-action: none;
}

.signature-pad .signature-clear {
  margin-top: 7px;
}

.signature-readout {
  padding: 18px;
  border-radius: 10px;
  background: #edf7f3;
  color: #0d745d;
  font-weight: 700;
}

.evidence-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.evidence-panel > div {
  margin-right: auto;
}

.evidence-panel small,
.evidence-panel strong {
  display: block;
}

.evidence-panel a,
.certificate-actions a,
.certificate-actions button,
.user-actions button {
  border: 0;
  background: #e8f3ef;
  color: #0b725b;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
}

.evidence-upload {
  cursor: pointer;
}

.certificate-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin: 20px 0;
}

.certificate-form label,
.expiry-controls label {
  display: grid;
  gap: 7px;
}

.certificate-register {
  display: grid;
  gap: 8px;
}

.certificate-register article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.certificate-register small,
.certificate-register strong {
  display: block;
}

.certificate-actions,
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.auth-text-button {
  border: 0;
  background: transparent;
  color: #0d745d;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.user-inline-name {
  min-width: 150px;
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.expiry-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.expiry-summary-grid strong {
  display: block;
  font-size: 30px;
}

.expiry-summary-grid .expiry-overdue {
  border-color: #f1bbc1;
  background: #fff4f5;
}

.expiry-summary-grid .expiry-due {
  border-color: #f0d69b;
  background: #fffaeb;
}

.expiry-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px;
  margin-bottom: 18px;
}

.expiry-controls > span {
  margin-left: auto;
  color: var(--muted);
}

.expiry-overdue {
  color: #ad2d42;
}

.expiry-due-soon {
  color: #956710;
}

@media (max-width: 900px) {
  .submission-context,
  .expiry-summary-grid,
  .certificate-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pilot-question-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .submission-context,
  .expiry-summary-grid,
  .certificate-form {
    grid-template-columns: 1fr;
  }

  .certificate-register article {
    grid-template-columns: 1fr;
  }

  .expiry-controls {
    align-items: stretch;
    flex-direction: column;
  }

.expiry-controls > span {
    margin-left: 0;
  }
}

.auth-privacy-link { display: block; margin-top: .85rem; color: var(--muted); font-size: .86rem; text-align: center; }
.footer a { color: inherit; text-decoration: underline; text-underline-offset: .2rem; }
.system-status-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.system-status-grid article { min-height: 126px; padding: 1rem; border: 1px solid var(--border); border-radius: 16px; background: #fff; display: flex; flex-direction: column; gap: .45rem; }
.system-status-grid span, .system-status-grid small { color: var(--muted); }
.system-status-grid strong { color: var(--navy); font-size: 1.35rem; }
.system-status-grid .system-ready { border-color: #99d7c6; background: #f1fbf7; }
.system-status-grid .system-hold { border-color: #f2d598; background: #fffaf0; }
.system-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 1rem; margin-bottom: 1rem; }
.system-settings-card, .system-operations-card { padding: 1.3rem; }
.system-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.system-settings-form label { display: grid; gap: .45rem; }
.system-settings-form label span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.system-settings-form input { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: .72rem .8rem; }
.system-form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem; }
.system-detail-list { display: grid; gap: .7rem; margin: 1rem 0; }
.system-detail-list div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); }
.system-detail-list dt { color: var(--muted); }
.system-detail-list dd { margin: 0; font-weight: 700; text-align: right; }
.retention-preview { display: grid; gap: .45rem; margin: 1.25rem 0; padding: 1rem; border-radius: 12px; background: #f5f8fa; }
.retention-preview span, .delivery-error { display: block; color: var(--muted); font-size: .8rem; }

.mfa-enrolment-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1.5rem;
  align-items: center;
  margin: 1.25rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f7faf9;
}

.mfa-enrolment-grid img {
  width: 100%;
  max-width: 240px;
  padding: .75rem;
  border-radius: 12px;
  background: #fff;
}

.mfa-enrolment-grid code,
.mfa-backup-codes {
  display: block;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  padding: 1rem;
  border-radius: 10px;
  background: #102d3e;
  color: #f4fbf8;
  letter-spacing: .08em;
}

@media (max-width: 700px) {
  .mfa-enrolment-grid { grid-template-columns: 1fr; }
}
.delivery-error { max-width: 300px; margin-top: .3rem; color: #a33b43; }

@media (max-width: 1180px) {
  .system-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .system-status-grid, .system-layout, .system-settings-form { grid-template-columns: 1fr; }
  .system-form-actions { grid-column: auto; }
}
.universal-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:0 0 20px}.universal-summary article{background:#fff;border:1px solid #d9e6e3;border-radius:16px;padding:20px;display:grid;gap:4px}.universal-summary span,.universal-summary small{color:#61788a}.universal-summary strong{font-size:30px;color:#123b55}.universal-card{padding:26px;margin-bottom:20px}.universal-workers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.universal-worker{border:1px solid #d9e6e3;border-radius:15px;padding:18px;display:grid;gap:16px}.universal-worker-heading,.universal-worker-heading>div,.universal-actions,.universal-documents>div,.token-list>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.universal-worker-heading .avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#e2f3ee;color:#08735e;font-weight:800}.universal-worker h3,.universal-worker p{margin:0}.universal-worker p,.universal-actions small,.token-list small{color:#667e8e;font-size:12px}.universal-worker dl{display:grid;gap:8px;margin:0}.universal-worker dl div{display:grid;grid-template-columns:110px 1fr;gap:10px}.universal-worker dt{color:#667e8e}.universal-documents{border-top:1px solid #d9e6e3;padding-top:12px;display:grid;gap:10px}.universal-documents>div{font-size:13px}.universal-documents a,.universal-documents button{border:0;background:transparent;color:#08735e;font-weight:700;cursor:pointer;margin-left:8px}.inline-create,.tenant-form{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.inline-create input,.tenant-form input{border:1px solid #c7d9d4;border-radius:9px;padding:10px 12px}.tenant-form label{display:grid;gap:6px;font-size:12px;font-weight:700}.token-list{display:grid;gap:10px}.token-list>div{border-top:1px solid #d9e6e3;padding-top:10px}.token-list span{display:grid}.tenant-count{color:#61788a}@media(max-width:850px){.universal-summary,.universal-workers{grid-template-columns:1fr}.universal-worker-heading,.universal-actions{align-items:flex-start;flex-direction:column}}
/* Supervisor workflow and communications */
.app-language { display:flex; align-items:center; gap:.45rem; color:var(--ink-muted); font-size:.75rem; font-weight:700; }
.app-language select { border:1px solid var(--line); border-radius:.65rem; padding:.55rem .75rem; background:#fff; color:var(--ink); font:inherit; }
@media (max-width:720px) { .app-language span { display:none; } .app-language select { max-width:6.5rem; } }
.workflow-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.workflow-span { grid-column:1/-1; }
.workflow-card { padding:1.35rem; min-width:0; }
.workflow-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; margin:1rem 0 1.25rem; }
.workflow-form label { display:grid; gap:.35rem; color:var(--ink-muted); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.workflow-form .wide { grid-column:1/-1; }
.workflow-form input,.workflow-form select,.workflow-form textarea,.workflow-actions input,.workflow-actions select,.conversation-reply input,.preference-form select { width:100%; border:1px solid var(--line); border-radius:.65rem; padding:.7rem; background:#fff; color:var(--ink); font:inherit; text-transform:none; letter-spacing:normal; }
.workflow-form textarea { min-height:5rem; resize:vertical; }
.workflow-list { display:grid; gap:.7rem; max-height:38rem; overflow:auto; }
.workflow-item { border:1px solid var(--line); border-radius:.85rem; padding:.9rem; background:#fff; }
.workflow-item header,.contact-row { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; }
.workflow-item header div,.contact-row span { display:grid; gap:.25rem; }
.workflow-item small,.contact-row small,.notification-row small { color:var(--ink-muted); }
.workflow-item > p { color:var(--ink-muted); margin:.7rem 0; white-space:pre-wrap; }
.workflow-actions,.conversation-reply { display:grid; grid-template-columns:minmax(9rem,.7fr) minmax(12rem,1.3fr) auto; gap:.5rem; align-items:center; }
.workflow-history { margin:.45rem 0; font-size:.8rem; color:var(--ink-muted); }
.message-thread { display:grid; gap:.45rem; margin:.7rem 0; max-height:16rem; overflow:auto; }
.message-thread p { display:grid; gap:.15rem; margin:0; padding:.55rem .65rem; background:var(--surface-soft); border-radius:.65rem; }
.message-thread span { white-space:pre-wrap; }
.contact-row { border-bottom:1px solid var(--line); padding:.65rem 0; }
.notification-row { display:grid; gap:.25rem; text-align:left; width:100%; border:1px solid var(--line); border-radius:.75rem; padding:.8rem; background:#fff; color:var(--ink); cursor:pointer; }
.notification-row.unread { border-left:4px solid var(--accent); background:#f3fbf8; }
.preference-form { display:grid; gap:.75rem; }
.preference-form > label { display:grid; grid-template-columns:auto 1fr; gap:.2rem .5rem; align-items:center; text-transform:capitalize; }
.preference-form > label small { grid-column:2; color:var(--ink-muted); text-transform:none; }
@media (max-width:900px) { .workflow-grid { grid-template-columns:1fr; } .workflow-span { grid-column:auto; } }
@media (max-width:640px) { .workflow-form,.workflow-actions,.conversation-reply { grid-template-columns:1fr; } .workflow-form .wide { grid-column:auto; } }

/* Worker QR access requests */
.access-request-layout { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr); gap:1.25rem; align-items:start; }
.access-request-layout .workflow-form { margin-bottom:.5rem; }
.request-fieldset { border:1px solid var(--line); border-radius:.8rem; padding:.9rem; }
.request-fieldset legend { color:var(--ink-muted); font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:0 .35rem; }
.request-field-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; }
.request-field-grid label { display:flex; align-items:center; gap:.45rem; color:var(--ink); font-size:.82rem; font-weight:600; text-transform:capitalize; letter-spacing:normal; }
.access-request-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:.7rem; }
.qr-scanner-panel { padding:1rem; border:1px solid var(--line); border-radius:1rem; background:var(--surface-soft); }
.qr-scanner-panel video { width:100%; min-height:220px; border-radius:.75rem; background:#0d2130; object-fit:cover; }
.qr-scanner-panel p { color:var(--ink-muted); font-size:.85rem; }
.access-request-list { margin-top:1.25rem; border-top:1px solid var(--line); padding-top:1rem; }
.access-request-list > h3 { margin:0 0 .75rem; }
.access-request-list article { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:1rem; border-top:1px solid var(--line); padding:.75rem 0; }
.access-request-list article > span:first-child { display:grid; gap:.2rem; }
.access-request-list small { color:var(--ink-muted); }
@media (max-width:900px) { .access-request-layout { grid-template-columns:1fr; } .request-field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .request-field-grid { grid-template-columns:1fr; } .access-request-list article { grid-template-columns:1fr auto; } .access-request-list article > small { grid-column:1/-1; } }
.page-header-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.65rem; }

/* Review and acceptance centre */
.review-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border: 1px solid #a9d9cd;
  border-radius: 18px;
  background: linear-gradient(135deg, #f1fbf7 0%, #eef7fb 100%);
}
.review-hero span,
.review-hero p,
.review-summary-grid span,
.review-summary-grid small,
.review-generated { color: var(--ink-muted); }
.review-hero h2 { margin: .25rem 0; color: var(--navy); font-size: clamp(1.45rem, 3vw, 2.2rem); }
.review-hero p { margin: 0; }
.review-hero-ready { border-color: #5fbca5; background: linear-gradient(135deg, #eafaf4 0%, #f3fbf8 100%); }
.review-score { min-width: 150px; text-align: right; }
.review-score strong { display: block; color: var(--accent); font-size: 3rem; line-height: 1; }
.review-score span,
.review-score small { display: block; }
.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}
.review-summary-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.review-summary-grid strong { display: block; margin: .25rem 0; color: var(--navy); font-size: 1.8rem; }
.review-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}
.review-check {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 14px;
  background: #fff;
}
.review-check header { display: grid; gap: .25rem; }
.review-check header span { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.review-check p { margin: .55rem 0 .25rem; color: var(--ink); }
.review-check small { color: var(--ink-muted); }
.review-pass { border-left-color: #149777; }
.review-pass header span { color: #08745d; }
.review-attention { border-left-color: #d99a25; }
.review-attention header span { color: #9b6410; }
.review-hold { border-left-color: #5d83a6; }
.review-hold header span { color: #315f84; }
.review-block { border-left-color: #cf4352; }
.review-block header span { color: #a52e40; }
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 1rem;
  align-items: start;
}
.review-card { padding: 1.35rem; }
.review-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 1rem; }
.review-form > label,
.review-email-form label {
  display: grid;
  gap: .4rem;
  color: var(--ink-muted);
  font-size: .8rem;
  font-weight: 700;
}
.review-form input,
.review-form select,
.review-form textarea,
.review-email-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b8ccd3;
  border-radius: .7rem;
  padding: .75rem;
  background: #f9fcfd;
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(7, 54, 92, .04);
}
.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus,
.review-email-form input:focus { outline: 3px solid rgba(13, 172, 114, .18); border-color: var(--green-dark); }
.review-form textarea { resize: vertical; }
.review-wide,
.review-checklist,
.review-form-actions { grid-column: 1 / -1; }
.review-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.review-checklist legend { padding: 0 .35rem; color: var(--ink-muted); font-size: .8rem; font-weight: 800; }
.review-checklist label { display: flex; gap: .55rem; align-items: flex-start; }
.review-checklist input { width: auto; margin-top: .2rem; }
.review-form-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.review-form-actions small { color: var(--ink-muted); }
.review-email-form { display: grid; gap: .75rem; margin: 1rem 0 1.25rem; }
.review-diagnostic-history { display: grid; gap: .5rem; }
.review-diagnostic-history h3 { margin-bottom: .2rem; }
.review-diagnostic-history > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem .75rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
}
.review-diagnostic-history > div span:first-child { display: grid; }
.review-diagnostic-history > div > small { grid-column: 1 / -1; color: #a33b43; }
.review-generated { margin: 1rem 0 0; font-size: .78rem; text-align: right; }
@media (max-width: 1050px) {
  .review-summary-grid,
  .review-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-layout { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .review-hero,
  .review-summary-grid,
  .review-check-grid,
  .review-form,
  .review-checklist { grid-template-columns: 1fr; }
  .review-score { text-align: left; }
  .review-wide,
  .review-checklist,
  .review-form-actions { grid-column: auto; }
}
@media print {
  .sidebar,
  .workspace-header,
  .footer,
  .page-header-actions,
  .review-email-test-form,
  .review-form-actions { display: none !important; }
  .workspace,
  .app-shell { margin: 0; padding: 0; max-width: none; }
  .review-layout,
  .review-check-grid,
  .review-summary-grid { break-inside: avoid; }
  .review-check,
  .review-card { box-shadow: none; }
}

/* =========================================================
   PHOTO MANAGEMENT, LIGHTBOX VIEWER & ANNOTATION ENGINE
   ========================================================= */

.hidden-file-input {
  display: none !important;
}

.photo-evidence-panel {
  margin-top: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
}

.photo-question-field {
  margin-top: 0.75rem;
  width: 100%;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.photo-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.photo-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.photo-card.failed {
  border-color: #fca5a5;
  background: #fff5f5;
}

.photo-thumb {
  position: relative;
  width: 100%;
  height: 120px;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-thumb:hover img {
  transform: scale(1.04);
}

.photo-status-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  color: white;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.photo-status-badge.uploaded {
  background: #16a34a;
}

.photo-status-badge.uploading {
  background: #0284c7;
}

.photo-status-badge.failed {
  background: #dc2626;
}

.photo-status-badge.pending {
  background: #ea580c;
}

.photo-annotated-pill {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.85);
  color: #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
}

.photo-card-info {
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f1f5f9;
}

.photo-filename {
  font-size: 11px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-info small {
  font-size: 10px;
  color: #64748b;
}

.photo-card-actions {
  display: flex;
  gap: 4px;
  padding: 0.4rem 0.5rem;
  background: #f8fafc;
  align-items: center;
  justify-content: flex-start;
}

.photo-card-actions .button-small {
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: white;
  cursor: pointer;
  color: #334155;
}

.photo-card-actions .button-small:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.photo-card-actions .button-retry {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.photo-card-actions .button-danger {
  color: #dc2626;
  border-color: #fecaca;
  margin-left: auto;
}

.photo-card-actions .button-danger:hover {
  background: #fee2e2;
}

.photo-add-card {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 1rem;
  text-align: center;
}

.photo-add-card:hover {
  border-color: #08745d;
  background: #f0fdf4;
}

.photo-add-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.photo-add-icon {
  font-size: 28px;
}

.photo-add-content strong {
  font-size: 12px;
  color: #0f172a;
}

.photo-add-content small {
  font-size: 10px;
  color: #64748b;
}

/* =========================================================
   FULL-SCREEN LIGHTBOX MODAL (PH05, PH06)
   ========================================================= */

.photo-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-modal {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: white;
}

.photo-lightbox-header {
  height: 58px;
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.photo-lightbox-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  background: #08745d;
  color: white;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.photo-lightbox-title strong {
  font-size: 14px;
}

.photo-lightbox-title small {
  font-size: 11px;
  color: #94a3b8;
}

.photo-lightbox-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 6px;
  border-radius: 6px;
}

.zoom-controls .button-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.zoom-controls .button-icon:hover {
  background: rgba(255, 255, 255, 0.25);
}

.zoom-readout {
  font-size: 12px;
  font-weight: 700;
  min-width: 44px;
  text-align: center;
  color: #e2e8f0;
}

.photo-lightbox-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.photo-lightbox-close:hover {
  color: #ef4444;
}

.photo-lightbox-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-lightbox-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  overflow: hidden;
}

.photo-lightbox-image {
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  transition: transform 0.08s ease-out;
  user-select: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.lightbox-nav-btn:hover:not(:disabled) {
  background: rgba(8, 116, 93, 0.9);
  border-color: white;
}

.lightbox-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.lightbox-nav-btn.prev-btn {
  left: 20px;
}

.lightbox-nav-btn.next-btn {
  right: 20px;
}

.photo-lightbox-filmstrip {
  height: 80px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
}

.filmstrip-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #000;
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filmstrip-thumb:hover {
  opacity: 0.9;
}

.filmstrip-thumb.active {
  border-color: #08745d;
  opacity: 1;
  transform: scale(1.08);
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   IN-APP HAZARD ANNOTATION & EDITOR (PH07, PH08, PH09)
   ========================================================= */

.photo-editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 15, 29, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.photo-editor-modal {
  width: 96vw;
  height: 94vh;
  background: #0f172a;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.photo-editor-header {
  height: 56px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-title {
  display: flex;
  flex-direction: column;
}

.editor-title strong {
  font-size: 14px;
  color: white;
}

.editor-title small {
  font-size: 11px;
  color: #94a3b8;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-editor-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 26px;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
}

.photo-editor-close:hover {
  color: #ef4444;
}

.photo-editor-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.photo-editor-toolbar {
  width: 200px;
  background: #1e293b;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
}

.tool-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tool-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.tool-btn.active {
  background: #08745d;
  color: white;
  border-color: #10b981;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.color-swatch {
  height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.08);
}

.color-swatch.active {
  border-color: white;
  box-shadow: 0 0 0 2px #08745d;
}

.size-palette {
  display: flex;
  gap: 6px;
}

.size-btn {
  flex: 1;
  padding: 6px 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.size-btn.active {
  background: #08745d;
  color: white;
  border-color: #10b981;
}

.photo-editor-canvas-container {
  flex: 1;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
  position: relative;
}

#photo-annotation-canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  cursor: crosshair;
  background: black;
  touch-action: none;
}

/* ==========================================
   OFFLINE-FIRST PWA & SYNC BANNER STYLES
   ========================================== */
.offline-status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  pointer-events: none;
}

.offline-status-banner.active {
  transform: translateY(0);
  pointer-events: auto;
}

.offline-status-banner.offline {
  background: #f59e0b;
  color: #1e1b4b;
  border-bottom: 2px solid #d97706;
}

.offline-status-banner.syncing {
  background: #2563eb;
  color: #ffffff;
  border-bottom: 2px solid #1d4ed8;
  animation: pulseSync 1.5s infinite;
}

.offline-status-banner.synced {
  background: #10b981;
  color: #ffffff;
  border-bottom: 2px solid #059669;
}

@keyframes pulseSync {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* ==========================================
   AI HAZARD SCAN BUTTON STYLES
   ========================================== */
.button-ai-scan {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35) !important;
  transition: all 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.button-ai-scan:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.5) !important;
}

.button-ai-scan:disabled {
  opacity: 0.7;
  cursor: wait;
}


