:root {
  color-scheme: light;
  --bg: #f5f6f7;
  --panel: #ffffff;
  --line: #d8dde3;
  --text: #1f2933;
  --muted: #667085;
  --accent: #1f6f8b;
  --accent-dark: #16536a;
  --soft: #eef6f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.topbar nav a:hover {
  border-color: #b9d7e4;
  background: var(--soft);
  color: var(--accent-dark);
}

.topbar nav a.active {
  border-color: #8fc1d3;
  background: var(--soft);
  color: var(--accent-dark);
}

.topbar-actions,
.logout-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.organization-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.organization-switcher label {
  font-size: 12px;
  color: #cbd5e1;
}

.organization-switcher select {
  max-width: 220px;
  padding: 7px 28px 7px 10px;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #f8fafc;
  background: #1e293b;
}

.invitation-link-result {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.invitation-link-result input {
  width: 100%;
}

.user-badge {
  max-width: 150px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-undo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #cfd6dd;
  border-radius: 999px;
  background: #f8fbfc;
  color: #475467;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.global-undo-button:hover,
.global-undo-button:focus {
  border-color: #9fc9d8;
  background: #eef8fb;
  color: var(--accent-dark);
}

.global-undo-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.logout-button:hover,
.logout-button:focus {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
}

.page {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto;
}

.login-body {
  min-height: 100vh;
  background: #eef3f6;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(31, 41, 51, 0.12);
}

.login-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-weight: 800;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.auth-form input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

p, small {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.button:hover {
  background: var(--accent-dark);
  color: #fff;
}

.button.ghost {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.button.ghost:hover {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
}

.button.small {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.link-button.as-button {
  height: 32px;
}

.action-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(320px, calc(100vw - 24px));
  padding: 9px 10px;
  border: 1px solid #b9d7e4;
  border-radius: 8px;
  background: #102a43;
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.18);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
}

.action-tooltip[hidden] {
  display: none;
}

.global-undo-status {
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid #cfe3d3;
  border-radius: 8px;
  background: #f1faf3;
  color: #24683a;
  font-size: 13px;
  font-weight: 700;
}

.global-undo-status[hidden] {
  display: none;
}

.floating-preview-button {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: min(240px, calc(100vw - 24px));
  padding: 0 14px;
  border: 1px solid #b9d7e4;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.14);
  color: #16536a;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.floating-preview-button:hover {
  background: var(--soft);
  color: var(--accent-dark);
}

.request-focus-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr) minmax(220px, 0.55fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.request-focus-main,
.request-focus-log {
  display: grid;
  align-content: start;
  gap: 8px;
}

.request-focus-main h2 {
  margin-bottom: 0;
}

.request-focus-main p {
  line-height: 1.4;
}

.request-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.request-focus-actions form {
  display: inline-flex;
  margin: 0;
}

.request-focus-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.request-focus-stats div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid #d6e5d8;
  border-radius: 8px;
  background: #f2f8f3;
}

.request-focus-stats span {
  color: #24683a;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.request-focus-log {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.request-focus-log strong {
  font-size: 13px;
}

.request-focus-log span {
  font-weight: 700;
}

.next-actions {
  margin-bottom: 18px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.quick-start {
  margin-bottom: 18px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-title-row.quick-start-heading {
  justify-content: center;
  width: 100%;
  text-align: center;
}

.quick-start-heading > div {
  width: 100%;
}

.mvp-flow {
  margin-bottom: 18px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mvp-flow .panel-title-row {
  align-items: flex-start;
}

.mvp-flow .panel-title-row p {
  margin-top: 4px;
  line-height: 1.4;
}

.mvp-flow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.mvp-flow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 122px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.mvp-flow-step:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.mvp-flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.mvp-flow-step strong,
.mvp-flow-step small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mvp-flow-step strong {
  margin-bottom: 5px;
  line-height: 1.25;
}

.mvp-flow-step small {
  grid-column: 1 / -1;
  line-height: 1.35;
}

.mvp-flow-step.muted {
  background: #f3f4f6;
  color: var(--muted);
}

.mvp-flow-step.muted span {
  background: #98a2b3;
}

.mvp-test-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mvp-test-summary h2 {
  margin: 4px 0;
}

.mvp-test-summary p,
.mvp-test-summary span,
.mvp-test-summary small {
  color: var(--muted);
}

.mvp-test-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
}

.mvp-test-metrics div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.mvp-test-metrics span {
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
}

.mvp-test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.mvp-test-main,
.mvp-test-side > div,
.mvp-test-requests {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.mvp-test-main .panel-title-row,
.mvp-test-requests .panel-title-row {
  align-items: flex-start;
}

.mvp-test-main .panel-title-row p {
  margin-top: 4px;
  color: var(--muted);
}

.mvp-test-checklist {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.mvp-test-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.mvp-test-step:hover,
.mvp-section-row:hover,
.mvp-request-row:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.mvp-test-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.mvp-test-step small {
  grid-column: 2 / -1;
  color: var(--muted);
  line-height: 1.35;
}

.mvp-test-step b {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
  font-size: 12px;
}

.mvp-test-step.ready b {
  background: #dcfae6;
  color: #067647;
}

.mvp-test-side {
  display: grid;
  gap: 18px;
}

.mvp-test-side > div {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.mvp-section-row,
.mvp-request-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.mvp-section-row span,
.mvp-request-row span {
  color: var(--muted);
  font-size: 13px;
}

.mvp-section-row.ready span {
  color: #067647;
}

.mvp-section-row.blocked span {
  color: #b42318;
}

.mvp-test-requests {
  margin-top: 18px;
}

.mvp-request-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.mvp-request-row.active {
  border-color: #8fc1d3;
  background: var(--soft);
}

.module-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.module-main,
.module-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.module-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.module-card-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.module-card:hover,
.module-side-link:hover {
  border-color: #b9d7e4;
  background: var(--soft);
  color: var(--accent-dark);
}

.module-card strong,
.module-card span,
.module-card b,
.module-side strong,
.module-side span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-card span,
.module-side span {
  color: var(--muted);
  line-height: 1.4;
}

.module-card b {
  align-self: end;
  color: var(--accent-dark);
  font-size: 13px;
}

.module-side {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.module-side h2 {
  margin: 0;
}

.module-side-link {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.object-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.object-card:hover {
  border-color: #8fc1d3;
  background: var(--soft);
  color: var(--accent-dark);
}

.object-card strong {
  font-size: 18px;
}

.object-card span {
  color: var(--muted);
  line-height: 1.4;
}

.object-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.object-card div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.object-card dt {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.object-card dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.object-card b {
  align-self: end;
  color: var(--accent-dark);
}

.object-fill-button,
.fill-entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff !important;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(0, 105, 145, .2);
}

.object-fill-button {
  width: 100%;
}

.fill-entry-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 22px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: var(--soft);
}

.fill-entry-panel div {
  display: grid;
  gap: 5px;
}

.fill-entry-explanation {
  max-width: 680px;
  text-align: center;
}

.fill-entry-panel strong {
  font-size: 21px;
}

.fill-entry-panel span {
  color: var(--muted);
}

.fill-entry-button:hover {
  background: #c2410c;
  color: #fff;
}

.fill-entry-button {
  min-width: 280px;
  min-height: 104px;
  padding: 0 48px;
  background: #ea580c;
  font-size: 28px;
  box-shadow: 0 10px 24px rgba(234, 88, 12, .32);
}

.next-action-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.next-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.status-flow-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-flow-current {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.status-flow-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.status-flow-actions button[disabled] {
  cursor: default;
  opacity: 0.7;
}

.status-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.dashboard-search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-search label {
  font-weight: 700;
}

.dashboard-search div {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.dashboard-search input {
  min-height: 38px;
}

.status-filter-card {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.status-filter-card:hover,
.status-filter-card.active {
  border-color: #8fc1d3;
  background: var(--soft);
  color: var(--accent-dark);
}

.status-filter-card span {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.status-filter-card strong {
  font-size: 13px;
  line-height: 1.25;
}

.dashboard-sort {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-sort > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-sort div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sort-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
  color: var(--text);
  font-size: 13px;
}

.sort-chip:hover,
.sort-chip.active {
  border-color: #8fc1d3;
  background: var(--soft);
  color: var(--accent-dark);
}

.table-title-row {
  padding: 16px 16px 0;
}

.dashboard-readiness {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.dashboard-readiness strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  min-height: 28px;
  border: 1px solid #efd3a9;
  border-radius: 999px;
  background: #fff7e8;
  color: #80540d;
  font-size: 13px;
}

.dashboard-readiness.ready strong {
  border-color: #b9d7e4;
  background: var(--soft);
  color: var(--accent-dark);
}

.dashboard-readiness.complete strong {
  border-color: #abd9bb;
  background: #eef8f1;
  color: #24683a;
}

.dashboard-readiness.empty strong {
  border-color: var(--line);
  background: #f9fafb;
  color: var(--muted);
}

.dashboard-readiness span {
  color: var(--muted);
  font-size: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.table-actions form {
  display: inline-flex;
  margin: 0;
}

.table-actions button.link-button {
  min-height: 32px;
}

.next-action-card strong {
  display: block;
  margin-bottom: 5px;
}

.next-action-card p {
  line-height: 1.35;
}

.readiness,
.metrics,
.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.readiness div,
.metrics div,
.import-summary div,
.table-shell,
.single-panel > div,
.details-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.readiness div,
.metrics div,
.import-summary div {
  padding: 16px;
}

.readiness span,
.metrics span,
.import-summary span {
  display: block;
  font-size: 26px;
  font-weight: 700;
}

.progress-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.progress-step {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.progress-step:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.progress-step.ready {
  border-left: 4px solid #5aa872;
}

.progress-step.blocked {
  border-left: 4px solid #d69a2d;
}

.progress-step span,
.progress-step small {
  color: var(--muted);
  font-size: 13px;
}

.work-cards {
  margin-bottom: 18px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.work-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.work-card,
.empty-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.work-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.work-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.work-card-title strong {
  font-size: 16px;
}

.work-card-title span {
  color: var(--accent-dark);
  font-weight: 700;
}

.work-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.work-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.work-card dd {
  margin: 3px 0 0;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mini-list strong,
.mini-list span {
  font-size: 13px;
}

.mini-list span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
}

.empty-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafb;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

td small {
  display: block;
  margin-top: 4px;
}

.word-hint {
  display: grid;
  gap: 8px;
}

.word-hint.compact {
  min-width: 220px;
}

.word-hint strong {
  font-size: 13px;
}

.hint-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hint-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #d6e5d8;
  border-radius: 999px;
  background: #f2f8f3;
  color: #315d3a;
  font-size: 12px;
  line-height: 1.25;
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #b9d7e4;
  border-radius: 999px;
  background: var(--soft);
  color: #16536a;
  font-size: 13px;
}

.status.good {
  border-color: #abd9bb;
  background: #eef8f1;
  color: #24683a;
}

.status.bad {
  border-color: #7a2e00;
  background: #b54708;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(122, 46, 0, 0.35);
}

.actions {
  min-width: 160px;
}

.actions,
.actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.message.success {
  border-color: #abd9bb;
  background: #eef8f1;
}

.message.error {
  border-color: #e6a4a4;
  background: #fff0f0;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.single-panel > div {
  overflow: auto;
  padding-top: 14px;
}

.single-panel h2 {
  padding: 0 14px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 12px;
}

.activity-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.activity-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row time,
.activity-row span,
.activity-row p {
  color: var(--muted);
  font-size: 13px;
}

.activity-row strong,
.activity-row span {
  display: block;
}

.panel-title-row h2 {
  margin: 0;
  padding: 0;
}

.single-panel {
  margin-top: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.details-grid > div {
  overflow: auto;
  padding-top: 14px;
}

.details-grid h2 {
  padding: 0 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.edit-form {
  display: grid;
  gap: 18px;
  padding-bottom: 88px;
}

.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  scroll-margin-top: 72px;
}

.form-panel.smart-target {
  border-color: #8fc1d3;
  box-shadow: 0 0 0 3px rgba(143, 193, 211, 0.22);
}

.smart-target-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #b9d7e4;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.fill-route-step.smart-target,
.section-nav a.smart-target {
  border-color: #8fc1d3;
  background: var(--soft);
  color: var(--accent-dark);
}

.step-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.step-heading h2 {
  margin: 0;
}

.step-missing {
  margin: -2px 0 12px;
  padding: 9px 10px;
  border: 1px solid #efd3a9;
  border-radius: 6px;
  background: #fff7e8;
  color: #80540d;
  font-size: 13px;
}

.important-field {
  position: relative;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.important-field-empty {
  border-color: #efd3a9;
  background: #fffaf0;
}

.important-field-filled {
  border-color: #d6e5d8;
  background: #fbfdfb;
}

.important-field-hint {
  display: block;
  margin-top: 5px;
  color: #80540d;
  font-size: 12px;
  line-height: 1.3;
}

.important-field-filled .important-field-hint {
  color: #4b7355;
}

.section-check-actions {
  display: grid;
  gap: 8px;
  margin: -2px 0 12px;
  justify-items: start;
}

.section-check-result {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
  font-size: 13px;
  line-height: 1.35;
}

.section-check-result.good {
  border-color: #abd9bb;
  background: #eef8f1;
  color: #24683a;
}

.section-check-result.bad {
  border-color: #efd3a9;
  background: #fff7e8;
  color: #80540d;
}

.fill-route {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.fill-route-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.fill-route-head h2 {
  margin: 0 0 5px;
  padding: 0;
}

.fill-route-head p {
  line-height: 1.4;
}

.fill-route-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.fill-route-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  min-height: 132px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.fill-route-step:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.fill-route-step.ready {
  border-color: #abd9bb;
  background: #eef8f1;
}

.fill-route-step.blocked {
  border-color: #efd3a9;
  background: #fff7e8;
}

.fill-route-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.fill-route-step strong,
.fill-route-step small,
.fill-route-step em,
.fill-route-step b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.fill-route-step strong {
  margin-bottom: 4px;
  line-height: 1.25;
}

.fill-route-step small {
  line-height: 1.3;
}

.fill-route-step em {
  margin-top: 7px;
  color: #80540d;
  font-style: normal;
  line-height: 1.3;
}

.fill-route-step b {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--muted);
  font-size: 13px;
}

.fill-route-step.ready b {
  color: #24683a;
}

.fill-route-step.blocked b {
  color: #80540d;
}

.section-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
}

.section-nav a:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid label {
  display: grid;
  gap: 5px;
}

.form-grid label span {
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.formset-list {
  display: grid;
  gap: 12px;
}

.formset-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.formset-row[hidden],
.link-button[hidden] {
  display: none;
}

.formset-row-opened {
  border-color: #b9d7e4;
  background: var(--soft);
}

.formset-row-new {
  border-color: #8fc1d3;
  box-shadow: 0 0 0 3px rgba(143, 193, 211, 0.18);
}

.new-row-note {
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #b9d7e4;
  border-radius: 6px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.compact-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.compact-row-summary {
  color: #475467;
  font-size: 13px;
  font-weight: 700;
}

.compact-row-hidden {
  display: none;
}

.add-row-panel {
  display: flex;
  justify-content: flex-start;
  margin-top: 12px;
}

.form-row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.form-row-title strong {
  font-size: 15px;
}

.document-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -2px 0 10px;
}

.document-row-actions span {
  color: #667085;
  font-size: 13px;
}

.upload-hint {
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid #b9d7e4;
  border-radius: 6px;
  background: var(--soft);
  color: #16536a;
  font-size: 13px;
}

.current-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #abd9bb;
  border-radius: 6px;
  background: #eef8f1;
}

.current-file span {
  color: #24683a;
  font-size: 13px;
  font-weight: 700;
}

.form-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.advanced-fields {
  margin-top: 10px;
}

.advanced-fields summary {
  width: max-content;
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.advanced-fields summary:hover {
  color: var(--accent-dark);
}

.advanced-fields .form-grid {
  margin-top: 10px;
}

.check-line {
  align-content: end;
}

.check-line input {
  width: auto;
  min-height: 0;
}

.field-error {
  color: #b42318;
}

.quick-edit-hint {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 11px;
}

.quick-edit-button {
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

.quick-company-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .28);
}

.quick-company-dialog::backdrop {
  background: rgba(15, 23, 42, .48);
}

.quick-company-dialog-content {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.quick-company-dialog-content h2,
.quick-company-dialog-content p {
  margin: 0;
}

.quick-company-dialog-content input {
  width: 100%;
}

.quick-company-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.scroll-top-button {
  --scroll-progress: 0deg;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: grid;
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(
    #1f2937 var(--scroll-progress),
    rgba(31, 41, 55, .18) 0
  );
  cursor: pointer;
  opacity: 1;
  transition: transform .2s ease;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .24);
}

.scroll-top-button:hover {
  transform: translateY(-3px);
}

.scroll-top-button span {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
}

.scroll-top-button span::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 2px;
  height: 29px;
  border-radius: 2px;
  background: #1f2937;
  transform: translateX(-50%);
}

.scroll-top-button span::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-top: 2px solid #1f2937;
  border-left: 2px solid #1f2937;
  transform: translateX(-50%) rotate(45deg);
}

.participant-role-title {
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 15px;
}

.form-panel h2 {
  margin-bottom: 12px;
}

.hint-table {
  overflow: auto;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hint-table table {
  background: #fff;
}

.hint-table th,
.hint-table td {
  padding: 9px 10px;
  font-size: 13px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.autosave-restore-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #d6e5d8;
  border-radius: 8px;
  background: #f2f8f3;
}

.autosave-restore-panel strong,
.autosave-restore-panel span {
  display: block;
}

.autosave-restore-panel span {
  margin-top: 3px;
  color: #315d3a;
  font-size: 13px;
}

.autosave-restore-panel.restored {
  border-color: #abd9bb;
  background: #eef8f1;
}

.sticky-save-bar {
  position: fixed;
  right: max(16px, calc((100vw - 1280px) / 2 + 16px));
  bottom: 16px;
  left: max(16px, calc((100vw - 1280px) / 2 + 16px));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.12);
}

.sticky-save-bar strong {
  display: block;
  margin-bottom: 3px;
}

.sticky-save-bar span {
  color: var(--muted);
  font-size: 13px;
}

.sticky-save-bar .autosave-status {
  display: block;
  margin-top: 4px;
  color: #315d3a;
}

.sticky-save-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.inline-form-action {
  align-items: end;
  justify-content: flex-start;
}

.tender-url-grid {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tender-excerpt {
  margin-top: 18px;
}

.tender-create-action {
  margin-top: 12px;
}

.tender-excerpt p {
  color: var(--text);
  line-height: 1.55;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reference-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.reference-card:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.reference-card strong {
  font-size: 17px;
}

.reference-card span {
  color: var(--muted);
}

.inline-action {
  font-weight: 700;
}

.import-result-hero {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #abd9bb;
  border-radius: 8px;
  background: #eef8f1;
}

.import-result-hero strong {
  display: block;
  margin-bottom: 6px;
  color: #24683a;
  font-size: 18px;
}

.import-result-hero p {
  max-width: 760px;
  line-height: 1.45;
}

.next-step-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.next-step-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  color: var(--text);
}

.next-step-row:hover {
  border-color: #b9d7e4;
  background: var(--soft);
}

.next-step-row span {
  color: var(--muted);
}

.next-step-list.compact {
  padding: 0;
}

.import-result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.45fr);
  gap: 18px;
  align-items: start;
}

.import-result-side {
  display: grid;
  gap: 18px;
}

.import-result-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.import-result-panel h2 {
  margin-bottom: 12px;
  padding: 0;
}

.import-result-group {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.import-result-group h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.import-result-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.plain-list,
.priority-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.plain-list {
  list-style: none;
}

.plain-list li,
.priority-list li {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.plain-list li {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.plain-list li.empty {
  color: var(--muted);
  text-align: left;
}

.priority-list {
  padding-left: 22px;
}

.priority-list li {
  padding-left: 4px;
}

.import-selection-form {
  display: grid;
  gap: 18px;
  padding-bottom: 88px;
}

.import-check-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.import-check-hero strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.import-check-hero p {
  line-height: 1.45;
}

.import-check-total {
  min-width: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  text-align: center;
}

.import-check-total span {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

.import-summary.import-summary-wide {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.import-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.import-review-group {
  display: flex;
  min-width: 0;
  max-height: 520px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.import-review-group:first-child {
  grid-column: 1 / -1;
}

.import-review-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.import-review-head h2 {
  margin: 0 0 4px;
  padding: 0;
}

.import-review-head p {
  line-height: 1.35;
}

.import-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.import-review-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding: 10px;
}

.import-review-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 52px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
}

.import-review-row:has(input:checked) {
  border-color: #b9d7e4;
  background: var(--soft);
}

.import-review-row input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.import-review-row span,
.import-review-row strong,
.import-review-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.import-review-row strong {
  margin-bottom: 3px;
  font-size: 14px;
  line-height: 1.35;
}

.import-review-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.selection-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  cursor: pointer;
}

.selection-line input {
  width: auto;
  min-height: 0;
  margin-top: 2px;
}

.selection-line span {
  display: block;
}

.selection-line small {
  display: block;
}

.readiness-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card,
.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-card {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.summary-card strong {
  font-size: 24px;
}

.summary-card span {
  color: var(--muted);
}

.summary-card.good {
  border-color: #abd9bb;
}

.summary-card.bad {
  border-color: #efd3a9;
}

.readiness-issue-groups {
  margin-bottom: 18px;
  padding-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.readiness-issue-groups .panel-title-row {
  padding: 0 14px;
}

.issue-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 0 14px 14px;
}

.issue-group-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid #efd3a9;
  border-radius: 8px;
  background: #fffaf0;
}

.issue-group-card strong,
.readiness-groups-empty strong {
  display: block;
}

.issue-group-card span,
.readiness-groups-empty span {
  color: var(--muted);
  font-size: 13px;
}

.issue-preview-list {
  display: grid;
  gap: 6px;
}

.issue-preview-list p {
  line-height: 1.35;
}

.issue-preview-list b {
  font-size: 13px;
}

.readiness-groups-empty {
  display: grid;
  gap: 4px;
  margin: 0 14px 14px;
  padding: 14px;
  border: 1px solid #abd9bb;
  border-radius: 8px;
  background: #eef8f1;
}

.checklist {
  display: grid;
  gap: 12px;
}

.preview-document-list {
  display: grid;
  gap: 14px;
}

.preview-document-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.preview-document-card.ready {
  border-left: 4px solid #5aa872;
}

.preview-document-card.blocked {
  border-left: 4px solid #d69a2d;
}

.preview-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preview-document-head span {
  color: var(--muted);
  font-size: 13px;
}

.preview-document-head h2 {
  margin: 4px 0;
}

.preview-mini-paper {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.preview-section-list {
  display: grid;
  gap: 8px;
}

.preview-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.preview-section.ready {
  border-left: 4px solid #5aa872;
}

.preview-section.blocked {
  border-left: 4px solid #d69a2d;
}

.preview-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.preview-section summary::marker {
  color: var(--muted);
}

.preview-section .hint-chip-list {
  padding: 0 12px 12px;
}

.check-item {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.check-item.ready {
  border-left: 4px solid #5aa872;
}

.check-item.blocked {
  border-left: 4px solid #d69a2d;
}

.check-main,
.check-actions,
.check-badges {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.check-main {
  justify-content: space-between;
}

.check-main h2 {
  margin-bottom: 4px;
}

.check-badges,
.check-actions {
  flex-wrap: wrap;
}

.missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.missing-list span {
  padding: 5px 8px;
  border: 1px solid #efd3a9;
  border-radius: 999px;
  background: #fff7e8;
  color: #80540d;
  font-size: 13px;
}

.completion-meter {
  display: grid;
  gap: 7px;
}

.completion-meter.compact {
  min-width: 128px;
}

.completion-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.completion-meter-head strong {
  color: var(--text);
  font-size: 18px;
}

.completion-meter-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.completion-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.completion-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f855a;
}

.document-content-list {
  display: grid;
  gap: 7px;
}

.document-content-list span {
  padding: 8px 10px;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  background: #f9fafb;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.excel-bridge-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.excel-bridge-summary div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.excel-bridge-summary span {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
}

.excel-table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.excel-import-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.excel-import-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 14px 14px;
}

.excel-import-form label {
  grid-column: 1 / -1;
  font-weight: 700;
}

.excel-import-form input[type="file"] {
  min-height: 38px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.excel-preview-form {
  display: grid;
  gap: 12px;
  padding-bottom: 14px;
}

.excel-attention-hint {
  margin-top: 4px;
  color: #9f3a38;
  font-size: 13px;
}

.excel-preview-form .toolbar-actions {
  align-items: center;
}

.excel-preview-form .toolbar-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.excel-attention-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(196, 65, 61, 0.28);
  border-radius: 999px;
  background: rgba(220, 53, 69, 0.08);
  color: #8b3331;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.excel-fill-status {
  margin: 0 14px;
  padding: 9px 10px;
  border: 1px solid #cfe3d3;
  border-radius: 8px;
  background: #f1faf3;
  color: #24683a;
  font-size: 13px;
  font-weight: 700;
}

.excel-participants-preview {
  display: grid;
  gap: 10px;
  padding: 0 14px;
}

.excel-participants-preview h2 {
  margin: 0;
}

.excel-participants-preview p {
  margin: 4px 0 0;
  color: var(--muted);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.excel-table-scroll {
  overflow-x: auto;
  padding: 0 14px 14px;
}

.excel-bridge-table {
  min-width: 1680px;
  table-layout: fixed;
}

.excel-bridge-table th:nth-child(1),
.excel-bridge-table td:nth-child(1) {
  width: 46px;
}

.excel-bridge-table th:nth-child(2),
.excel-bridge-table td:nth-child(2) {
  width: 130px;
}

.excel-bridge-table th:nth-child(3),
.excel-bridge-table td:nth-child(3),
.excel-bridge-table th:nth-child(4),
.excel-bridge-table td:nth-child(4) {
  width: 118px;
}

.excel-bridge-table th:nth-child(5),
.excel-bridge-table td:nth-child(5),
.excel-bridge-table th:nth-child(7),
.excel-bridge-table td:nth-child(7),
.excel-bridge-table th:nth-child(8),
.excel-bridge-table td:nth-child(8),
.excel-bridge-table th:nth-child(9),
.excel-bridge-table td:nth-child(9),
.excel-bridge-table th:nth-child(10),
.excel-bridge-table td:nth-child(10) {
  width: 190px;
}

.excel-bridge-table input,
.excel-bridge-table textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.excel-fill-cell {
  display: grid;
  gap: 6px;
}

.mini-fill-button {
  justify-self: start;
  min-height: 26px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 3px 8px;
  background: #f8fbfc;
  color: #475467;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.mini-fill-button:hover,
.mini-fill-button:focus {
  border-color: #9fc9d8;
  background: #eef8fb;
  color: var(--accent-dark);
}

.excel-preview-table {
  min-width: 1900px;
}

.excel-preview-table td {
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
}

.excel-preview-table tr.excel-row-needs-attention td:first-child {
  box-shadow: inset 3px 0 0 rgba(196, 65, 61, 0.45);
}

.excel-preview-table tr[hidden] {
  display: none;
}

.excel-attention-empty td {
  background: #fff8f8;
  color: #9f3a38;
}

.excel-bridge-table input.needs-attention,
.excel-bridge-table textarea.needs-attention {
  border-color: rgba(196, 65, 61, 0.72);
  background: rgba(220, 53, 69, 0.12);
  box-shadow: 0 0 0 1px rgba(196, 65, 61, 0.12);
}

.excel-bridge-table input.needs-attention:focus,
.excel-bridge-table textarea.needs-attention:focus {
  border-color: rgba(196, 65, 61, 0.95);
  background: rgba(220, 53, 69, 0.16);
  outline: 2px solid rgba(196, 65, 61, 0.18);
}

.excel-preview-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
}

.excel-participants-table {
  min-width: 1180px;
}

.excel-participants-table th:nth-child(1),
.excel-participants-table td:nth-child(1) {
  width: 70px;
}

.excel-participants-table th:nth-child(2),
.excel-participants-table td:nth-child(2) {
  width: 250px;
}

.excel-participants-table th:nth-child(3),
.excel-participants-table td:nth-child(3),
.excel-participants-table th:nth-child(4),
.excel-participants-table td:nth-child(4),
.excel-participants-table th:nth-child(5),
.excel-participants-table td:nth-child(5) {
  width: 180px;
}

.excel-participants-table th:nth-child(6),
.excel-participants-table td:nth-child(6) {
  width: 320px;
}

.excel-participants-table td strong,
.excel-participants-table td small {
  display: block;
  overflow-wrap: anywhere;
}

.excel-participants-table td small {
  margin-top: 5px;
  color: var(--muted);
}

.excel-bridge-table textarea {
  resize: vertical;
}

.readonly-cell {
  min-height: 76px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.excel-new-row td {
  background: #f2f8f3;
}

.ready-note {
  color: #24683a;
}

.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.preview-main,
.preview-side > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.preview-main {
  padding: 18px;
}

.preview-paper {
  min-height: 680px;
  padding: 30px;
  border: 1px solid var(--line);
  background: #fff;
}

.official-document {
  display: grid;
  gap: 18px;
}

.official-page {
  width: min(100%, 210mm);
  min-height: 297mm;
  margin: 0 auto;
  padding: 18mm 16mm;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.official-page-label {
  display: block;
  margin: -8mm 0 8mm;
  color: #98a2b3;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  text-align: right;
}

.official-appendix {
  display: grid;
  gap: 3px;
  max-width: 360px;
  margin-left: auto;
  text-align: center;
}

.official-continuation {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  text-align: center;
}

.official-continuation strong,
.official-continuation span {
  color: #111827;
}

.official-title {
  margin: 24px 0 20px;
  text-align: center;
}

.official-title span,
.official-title h2 {
  display: block;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

.official-title h2 {
  margin: 4px 0;
}

.official-lines,
.official-text,
.official-signatures {
  display: grid;
  gap: 8px;
}

.official-field {
  display: grid;
  gap: 4px;
}

.official-field span,
.official-fill-line {
  min-height: 22px;
  padding: 0 4px 2px;
  border-bottom: 1px solid #111827;
  color: #111827;
}

.official-lines p,
.official-text p {
  color: #111827;
}

.official-text h3,
.official-signatures h3 {
  margin: 10px 0 0;
  color: #111827;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}

.official-text ul {
  margin: 0;
  padding-left: 22px;
}

.official-signatures {
  margin-top: 18px;
}

.official-signatures small {
  display: block;
  margin-top: 3px;
}

.signature-line {
  display: block;
  min-width: 128px;
  min-height: 22px;
  border-bottom: 1px solid #111827;
}

@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  body {
    background: #fff;
  }

  .topbar,
  .messages,
  .toolbar,
  .preview-side,
  .floating-preview-button {
    display: none;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  .preview-layout {
    display: block;
  }

  .preview-main,
  .preview-paper {
    border: 0;
  }

  .preview-paper {
    min-height: 0;
    padding: 0;
  }

  .official-document {
    display: block;
  }

  .official-page {
    width: auto;
    min-height: calc(297mm - 28mm);
    padding: 0;
    border: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  .official-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .official-page-label {
    display: none;
  }
}

.preview-paper-head {
  margin-bottom: 24px;
  text-align: center;
}

.preview-paper-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.preview-paper-head h2 {
  margin: 8px 0;
  font-size: 22px;
}

.preview-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.preview-fields div {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.preview-fields dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.preview-fields dd {
  margin: 4px 0 0;
}

.preview-block {
  margin-top: 18px;
}

.preview-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.preview-block p {
  color: var(--text);
  line-height: 1.5;
}

.preview-side {
  display: grid;
  gap: 12px;
}

.preview-side > div {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.preview-side h2 {
  margin: 0;
}

.file-actions {
  display: grid;
  gap: 8px;
}

.user-create-panel form {
  display: grid;
  gap: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
}

.user-table th,
.user-table td {
  padding: 12px;
  border-bottom: 1px solid #dfe5ec;
  text-align: left;
  vertical-align: middle;
}

.user-table small {
  display: block;
  color: #667085;
}

.user-access-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(130px, auto) auto;
  gap: 12px;
  align-items: center;
}

.access-toggle {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .topbar,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 12px 16px;
  }

  .topbar nav {
    gap: 10px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .toolbar-actions {
    width: 100%;
  }

  .dashboard-search div {
    grid-template-columns: 1fr;
  }

  .readiness,
  .metrics,
  .import-summary,
  .import-summary.import-summary-wide,
  .request-focus-panel,
  .request-focus-stats,
  .readiness-summary,
  .mvp-test-summary,
  .mvp-test-metrics,
  .mvp-test-layout,
  .module-layout,
  .module-card-list,
  .module-card-list.compact,
  .object-grid,
  .mvp-flow-grid,
  .next-action-list,
  .progress-strip,
  .reference-grid,
  .work-card-list,
  .form-grid,
  .form-grid.wide,
  .fill-route-grid,
  .import-check-hero,
  .import-review-grid,
  .import-review-head,
  .import-result-layout,
  .import-result-control-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .page {
    width: min(100% - 20px, 1280px);
    margin-top: 16px;
  }

  .check-main {
    flex-direction: column;
  }

  .floating-preview-button {
    top: auto;
    right: 12px;
    bottom: 76px;
  }

  .preview-document-head {
    flex-direction: column;
  }

  .next-action-card {
    grid-template-columns: 1fr;
  }

  .preview-layout,
  .preview-fields {
    grid-template-columns: 1fr;
  }

  .mvp-test-step {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mvp-test-step b,
  .mvp-test-step small {
    grid-column: 1 / -1;
  }

  .preview-paper {
    min-height: 0;
    padding: 18px;
  }

  .work-card dl {
    grid-template-columns: 1fr;
  }

  .step-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .fill-route-head {
    flex-direction: column;
  }

  .import-review-group:first-child {
    grid-column: auto;
  }

  .import-review-actions {
    justify-content: flex-start;
  }

  .import-check-total {
    min-width: 0;
    text-align: left;
  }

  .sticky-save-bar {
    align-items: stretch;
    flex-direction: column;
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .sticky-save-actions {
    justify-content: stretch;
  }

  .sticky-save-actions .button,
  .sticky-save-actions .link-button {
    flex: 1;
  }

  .user-access-form {
    grid-template-columns: 1fr;
  }

  .fill-entry-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .scroll-top-button {
    right: 14px;
    bottom: 82px;
    width: 52px;
    height: 52px;
  }
}
.connection-status {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff1c9;
  color: #563c00;
  font-weight: 700;
}

.global-search-form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.global-search-form input {
  width: min(220px, 18vw);
  min-width: 110px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.global-search-form button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.management-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.management-metrics a {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.management-metrics > span {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.portfolio-table-wrap { overflow-x: auto; }
.portfolio-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.portfolio-table th, .portfolio-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.health-badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.health-badge.green { background: #dff4e7; color: #17643a; }
.health-badge.amber { background: #fff1cc; color: #765100; }
.health-badge.red { background: #fde2e2; color: #9b2424; }
.kpi-danger { color: #a32b2b; }
.muted { color: var(--muted); }

.mobile-checklist { list-style: none; padding: 0; }
.mobile-checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-checklist form { margin: 0; }
.mobile-checklist small { display: block; color: var(--muted); }
.check-toggle { min-width: 42px; min-height: 42px; font-size: 22px; }
.mobile-photo-form input[type="file"] { width: 100%; min-height: 44px; }
.task-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.task-photo-grid figure { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.task-photo-grid img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; }
.task-photo-grid small { overflow-wrap: anywhere; color: var(--muted); }
.integration-state { padding: 8px 10px; border-radius: 8px; background: #fff1cc; color: #765100; }
.integration-state.ready { background: #dff4e7; color: #17643a; }
.hash-cell { max-width: 280px; overflow-wrap: anywhere; font-family: monospace; font-size: 12px; }
.forecast-card { margin-bottom: 16px; }
.forecast-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.confidence { padding: 5px 9px; border-radius: 999px; background: #fde2e2; color: #8d2424; }
.confidence.medium { background: #fff1cc; color: #765100; }
.confidence.high { background: #dff4e7; color: #17643a; }
@media (max-width: 800px) { .forecast-grid { grid-template-columns: 1fr; } }

.management-metrics strong {
  color: var(--text);
  font-size: 28px;
}

.management-metrics span {
  color: var(--muted);
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.saved-view-toolbar,
.list-filter-form,
.save-view-form,
.saved-view-list {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.saved-view-toolbar {
  align-items: stretch;
  margin-bottom: 18px;
}

.list-filter-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.list-filter-form .checkbox-label {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.save-view-form,
.saved-view-list {
  width: 100%;
}

.saved-view-list span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.saved-view-list form {
  display: inline;
}

.saved-view-list button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

@media (max-width: 800px) {
  .dashboard-columns {
    grid-template-columns: 1fr;
  }
}

.install-app-button {
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.offline-card {
  max-width: 620px;
  margin: 12vh auto 0;
}
