.checklist-module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 0 0 1rem;
}

.checklist-module-tab {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .72rem 1rem;
  background: rgba(20, 14, 24, .72);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.checklist-module-tab:hover,
.checklist-module-tab.active {
  color: var(--text);
  border-color: #d8a54b;
  box-shadow: 0 0 0 1px rgba(216, 165, 75, .2);
}

.checklist-module-panel.hidden {
  display: none;
}

.checklist-operational-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1rem;
}

.checklist-operational-summary article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(28, 19, 34, .82);
}

.checklist-operational-summary span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.checklist-operational-summary strong {
  display: block;
  margin-top: .3rem;
  color: #e5b451;
  font-size: 1.7rem;
}

.checklist-runtime-status {
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
  color: var(--muted);
  background: rgba(16, 11, 20, .54);
}

.checklist-runtime-status.success {
  border-color: #4e9965;
  color: #d6ffe1;
}

.checklist-runtime-status.error {
  border-color: #aa5149;
  color: #ffd6d1;
}

.checklist-tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 1rem;
}

.checklist-task-card {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(43, 29, 49, .96), rgba(23, 16, 29, .98));
}

.checklist-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.checklist-task-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.checklist-priority {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .27rem .58rem;
  color: var(--muted);
  font-size: .72rem;
  white-space: nowrap;
}

.checklist-priority.Alta { color: #ffd3cf; border-color: #9f4e47; }
.checklist-priority.Média { color: #ffe3aa; border-color: #9b7336; }
.checklist-priority.Baixa { color: #d5e8f8; border-color: #4f7894; }

.checklist-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
  color: var(--muted);
  font-size: .82rem;
}

.checklist-task-instructions {
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

.checklist-model-strip {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .2rem 0;
}

.checklist-model-strip img {
  width: 92px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.checklist-execution-box {
  border-left: 3px solid #6da7cf;
  border-radius: 8px;
  padding: .65rem .75rem;
  background: rgba(109, 167, 207, .08);
  font-size: .88rem;
}

.checklist-execution-box.aprovado {
  border-left-color: #61b879;
  background: rgba(97, 184, 121, .08);
}

.checklist-execution-box.reprovado {
  border-left-color: #d36c65;
  background: rgba(211, 108, 101, .08);
}

.checklist-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: auto;
}

.btn.checklist-success {
  border-color: #4e9965;
  background: #285f3a;
  color: #f4fff7;
}

.checklist-empty {
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}

.checklist-history-list {
  display: grid;
  gap: .7rem;
}

.checklist-history-item {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: .85rem 1rem;
  background: rgba(24, 17, 30, .7);
}

.checklist-history-item strong {
  display: block;
  margin-bottom: .25rem;
}

.checklist-history-item time {
  color: var(--muted);
  font-size: .78rem;
}

.checklist-camera-open {
  overflow: hidden;
}

.checklist-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .8);
}

.checklist-camera-modal.hidden,
.checklist-camera-unavailable.hidden {
  display: none;
}

.checklist-camera-card {
  width: min(760px, 100%);
  max-height: 94vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 1rem;
  background: #17101d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}

.checklist-camera-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.checklist-camera-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
}

.checklist-camera-stage {
  position: relative;
  overflow: hidden;
  margin: 1rem 0;
  border-radius: 13px;
  background: #000;
  aspect-ratio: 4 / 3;
}

.checklist-camera-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checklist-camera-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  color: #ffd6d1;
  text-align: center;
}

.checklist-capture-counter {
  margin: .5rem 0;
  color: #e5b451;
  font-weight: 700;
}

.checklist-capture-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}

.checklist-capture-item {
  position: relative;
}

.checklist-capture-item img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.checklist-capture-item button {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  cursor: pointer;
}

.checklist-camera-actions {
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .checklist-operational-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checklist-module-tab {
    flex: 1 1 140px;
  }

  .checklist-tasks-grid {
    grid-template-columns: 1fr;
  }

  .checklist-camera-actions .btn {
    flex: 1 1 150px;
  }
}
