.procedures-body {
  --procedures-gap: 16px;
}

.procedures-workspace {
  min-width: 0;
  padding: 22px 24px 28px;
}

.procedures-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  margin-bottom: 18px;
}

.procedures-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.procedures-heading h1,
.procedures-summary h2 {
  margin: 0;
  color: var(--color-brand-navy);
  letter-spacing: 0;
}

.procedures-heading h1 {
  font-size: 22px;
  line-height: 1.2;
}

.procedures-total {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 4px;
  padding: 0 7px;
  color: var(--color-brand-navy);
  background: var(--color-brand-mist);
  font-size: 11px;
  font-weight: 900;
}

.procedures-toolbar-actions,
.view-switcher {
  display: flex;
  align-items: center;
}

.procedures-toolbar-actions {
  gap: 8px;
}

.view-switcher {
  height: 38px;
  border: 1px solid var(--color-brand-mist);
  border-radius: 6px;
  padding: 3px;
  background: var(--color-white);
}

.view-switcher-button,
.procedures-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--color-brand-slate);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
}

.view-switcher-button {
  gap: 6px;
  height: 30px;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 11px;
}

.view-switcher-button svg,
.procedures-refresh svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.view-switcher-button.is-active {
  color: var(--color-white);
  background: var(--color-brand-navy);
}

.view-switcher-button:focus-visible,
.procedures-refresh:focus-visible,
.procedure-source-link:focus-visible {
  outline: 3px solid var(--color-brand-cyan);
  outline-offset: 2px;
}

.procedures-refresh {
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-brand-mist);
  border-radius: 6px;
}

.procedures-refresh.is-loading svg {
  animation: procedures-spin 700ms linear infinite;
}

.procedures-content {
  min-width: 0;
}

.procedures-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 320px;
  color: var(--color-brand-slate);
  text-align: center;
}

.procedures-state p {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.procedures-state strong {
  color: var(--color-brand-navy);
  font-size: 14px;
}

.procedures-loader {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-brand-mist);
  border-top-color: var(--color-brand-cyan);
  border-radius: 50%;
  animation: procedures-spin 700ms linear infinite;
}

.procedure-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--color-brand-mist);
}

.procedure-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.procedure-table th,
.procedure-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--color-brand-mist);
  text-align: left;
  vertical-align: top;
}

.procedure-table th {
  color: var(--color-brand-slate);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.procedure-table td {
  color: var(--color-brand-slate);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.procedure-table th:nth-child(1) { width: 32%; }
.procedure-table th:nth-child(2) { width: 22%; }
.procedure-table th:nth-child(3) { width: 14%; }
.procedure-table th:nth-child(4) { width: 12%; }
.procedure-table th:nth-child(5) { width: 11%; }
.procedure-table th:nth-child(6) { width: 9%; }

.procedure-name {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--color-brand-navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.procedure-name-link {
  color: inherit;
  text-decoration: none;
}

.procedure-entry {
  cursor: pointer;
}

.procedure-table tbody tr:hover {
  background: rgb(170 171 184 / 18%);
}

.procedure-card:hover,
.kanban-card:hover {
  border-color: var(--color-brand-blue);
}

.procedure-name-link:focus-visible {
  border-radius: 2px;
  outline: 3px solid var(--color-brand-cyan);
  outline-offset: 2px;
}

.procedure-reference,
.procedure-meta,
.procedure-deadline-label {
  display: block;
  margin-top: 6px;
  color: var(--color-brand-slate);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.procedure-status {
  display: inline-block;
  max-width: 100%;
  border-left: 3px solid var(--color-brand-cyan);
  padding-left: 7px;
  color: var(--color-brand-navy);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
}

.procedure-source-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--color-brand-blue);
  font-size: 9px;
  font-weight: 900;
  text-decoration: none;
}

.procedure-source-link svg {
  width: 12px;
  height: 12px;
}

.procedure-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--procedures-gap);
}

.procedure-card,
.kanban-card {
  min-width: 0;
  border: 1px solid var(--color-brand-mist);
  border-radius: 6px;
  background: var(--color-white);
}

.procedure-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 224px;
  padding: 16px;
}

.procedure-card-topline,
.procedure-card-footer,
.kanban-column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.procedure-card-topline {
  margin-bottom: 12px;
}

.procedure-card .procedure-name {
  font-size: 13px;
  -webkit-line-clamp: 4;
}

.procedure-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.procedure-card-details dt {
  color: var(--color-brand-slate);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-card-details dd {
  margin: 4px 0 0;
  color: var(--color-brand-navy);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.procedure-card-footer {
  align-items: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-brand-mist);
}

.procedure-kanban {
  display: grid;
  grid-auto-columns: minmax(300px, 360px);
  grid-auto-flow: column;
  gap: var(--procedures-gap);
  min-height: 420px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.kanban-column {
  min-width: 0;
  padding: 12px;
  background: var(--color-brand-mist);
}

.kanban-column-heading {
  min-height: 28px;
  margin-bottom: 10px;
  color: var(--color-brand-navy);
}

.kanban-column-heading h2 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0;
}

.kanban-column-heading span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--color-white);
  background: var(--color-brand-navy);
  font-size: 9px;
  font-weight: 900;
}

.kanban-card-list {
  display: grid;
  gap: 8px;
}

.kanban-card {
  padding: 12px;
}

.kanban-card .procedure-name {
  font-size: 11px;
  -webkit-line-clamp: 3;
}

.kanban-card .procedure-status {
  margin-top: 10px;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--color-brand-mist);
  color: var(--color-brand-slate);
  font-size: 9px;
  font-weight: 800;
}

.procedures-summary-panel {
  padding: 24px 24px 28px;
}

.procedures-summary {
  position: sticky;
  top: 18px;
}

.procedures-summary h2 {
  font-size: 14px;
}

.procedures-summary dl {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
}

.procedures-summary dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-brand-mist);
}

.procedures-summary dt {
  color: var(--color-brand-slate);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.procedures-summary dd {
  margin: 0;
  color: var(--color-brand-navy);
  font-size: 15px;
  font-weight: 900;
}

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

@media (max-width: 1280px) {
  .procedures-workspace {
    padding-inline: 20px;
  }

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

  .procedure-table th:nth-child(3),
  .procedure-table td:nth-child(3),
  .procedure-table th:nth-child(4),
  .procedure-table td:nth-child(4) {
    display: none;
  }

  .procedure-table th:nth-child(1) { width: 43%; }
  .procedure-table th:nth-child(2) { width: 27%; }
  .procedure-table th:nth-child(5) { width: 17%; }
  .procedure-table th:nth-child(6) { width: 13%; }
}

@media (max-width: 1024px) {
  .procedures-workspace {
    padding: 18px 18px 24px;
  }

  .procedures-summary-panel {
    display: none;
  }

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

@media (max-width: 700px) {
  .procedures-workspace {
    padding: 14px 12px 20px;
  }

  .procedures-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .procedures-toolbar-actions {
    width: 100%;
  }

  .view-switcher {
    flex: 1 1 auto;
  }

  .view-switcher-button {
    flex: 1 1 0;
    padding-inline: 6px;
  }

  .procedure-cards {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .procedure-card {
    min-height: 210px;
  }

  .procedure-table th:nth-child(2),
  .procedure-table td:nth-child(2),
  .procedure-table th:nth-child(6),
  .procedure-table td:nth-child(6) {
    display: none;
  }

  .procedure-table th:nth-child(1) { width: 68%; }
  .procedure-table th:nth-child(5) { width: 32%; }

  .procedure-table th,
  .procedure-table td {
    padding: 10px 8px;
  }

  .procedure-kanban {
    grid-auto-columns: minmax(280px, calc(100vw - 40px));
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .procedures-loader,
  .procedures-refresh.is-loading svg {
    animation: none;
  }
}
