#bcrmViewObras .obras-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
#bcrmViewObras .obras-title { margin: 0; font-size: 1.35rem; font-weight: 700; color: #0f172a; }
#bcrmViewObras .obras-subtitle { margin: 4px 0 0; font-size: 13px; color: #64748b; }
#bcrmViewObras .obras-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
#bcrmViewObras .obras-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
}
#bcrmViewObras .obras-kpi small {
  display: block;
  color: #64748b;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
#bcrmViewObras .obras-kpi strong { display: block; margin-top: 6px; font-size: 1.35rem; color: #0f172a; }
#bcrmViewObras .obras-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
}
#bcrmViewObras .obras-field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
#bcrmViewObras .obras-field label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; }
#bcrmViewObras .obras-field input,
#bcrmViewObras .obras-field select,
#bcrmViewObras .obras-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
#bcrmViewObras .obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
#bcrmViewObras .obras-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  background: #fff;
  display: grid;
  gap: 8px;
}
#bcrmViewObras .obras-card:hover { border-color: #93c5fd; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); }
#bcrmViewObras .obras-card.has-pendencia { border-color: #fca5a5; background: #fff7f7; }
#bcrmViewObras .obras-card.has-pendencia.is-overdue { border-color: #ef4444; background: #fef2f2; }
#bcrmViewObras .obras-card-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
#bcrmViewObras .obras-card h3 { margin: 0; font-size: 15px; color: #0f172a; }
#bcrmViewObras .obras-card .obras-meta { font-size: 12px; color: #64748b; line-height: 1.45; }
#bcrmViewObras .obras-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
}
#bcrmViewObras .obras-pill.planejamento { background: #e0e7ff; color: #3730a3; }
#bcrmViewObras .obras-pill.em_andamento { background: #dbeafe; color: #1d4ed8; }
#bcrmViewObras .obras-pill.paralisada { background: #fef3c7; color: #92400e; }
#bcrmViewObras .obras-pill.concluida { background: #dcfce7; color: #166534; }
#bcrmViewObras .obras-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
#bcrmViewObras .obras-progress span {
  display: block;
  height: 100%;
  background: #2563eb;
}
#bcrmViewObras .obras-empty {
  padding: 28px;
  text-align: center;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}
#bcrmViewObras .obras-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
#bcrmViewObras .obras-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}
#bcrmViewObras .obras-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}
#bcrmViewObras .obras-box h3 { margin: 0 0 10px; font-size: 14px; }
#bcrmViewObras .obras-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#bcrmViewObras .obras-box h3 {
  margin: 0 0 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}
#bcrmViewObras .obras-form-grid .full { grid-column: 1 / -1; }
#bcrmViewObras .hidden { display: none !important; }
#bcrmViewObras .obras-timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
#bcrmViewObras .obras-timeline-head h3 { margin: 0; }
#bcrmViewObras .obras-timeline {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  position: relative;
}
#bcrmViewObras .obras-timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #cbd5e1;
}
#bcrmViewObras .obras-diary-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 12px 12px 28px;
  background: #fff;
  position: relative;
}
#bcrmViewObras .obras-diary-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #93c5fd;
}
#bcrmViewObras .obras-diary-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
#bcrmViewObras .obras-diary-item p { margin: 6px 0; font-size: 13px; color: #334155; white-space: pre-wrap; }
#bcrmViewObras .obras-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
#bcrmViewObras .obras-photo-thumb {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  text-align: left;
}
#bcrmViewObras .obras-photo-thumb img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
}
#bcrmViewObras .obras-photo-thumb span {
  display: block;
  padding: 4px 6px;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bcrmViewObras .obras-attachments {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
#bcrmViewObras .obras-attachments a {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
}
#bcrmViewObras .obras-file-preview { font-size: 12px; color: #475569; }
#bcrmViewObras .obras-pending-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
#bcrmViewObras .obras-pending-photo {
  display: grid;
  gap: 6px;
}
#bcrmViewObras .obras-pending-photo img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
#bcrmViewObras .obras-pending-files {
  margin: 8px 0 0;
  padding-left: 18px;
}
#bcrmViewObras .obras-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  grid-column: 1 / -1;
  height: 0;
  min-height: 0;
  overflow: visible;
}
#bcrmViewObras .obras-viewer.hidden { display: none !important; }
#bcrmViewObras .obras-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}
#bcrmViewObras .obras-viewer-card {
  position: relative;
  z-index: 1;
  max-width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
}
#bcrmViewObras .obras-viewer-card img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  background: #0f172a;
}
#bcrmViewObras .obras-viewer-meta {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}
#bcrmViewObras .obras-viewer-meta a { color: #1d4ed8; font-weight: 700; }
@media (max-width: 720px) {
  #bcrmViewObras .obras-viewer-card { grid-template-columns: 1fr; }
}
#bcrmViewObras .obras-link-btn {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font-weight: 700;
  cursor: pointer;
}
#bcrmViewObras .obras-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#obrasPendenciasBoardBtn.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
#bcrmViewObras .obras-kpis-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
#bcrmViewObras .obras-kpi-btn {
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
}
#bcrmViewObras .obras-kpi-btn:hover { border-color: #93c5fd; background: #eff6ff; }
#bcrmViewObras .obras-kpi-btn.is-active { border-color: #2563eb; background: #eff6ff; box-shadow: inset 0 0 0 1px #2563eb; }
#bcrmViewObras .obras-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
#bcrmViewObras .obras-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#bcrmViewObras .obras-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
#bcrmViewObras .obras-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  color: #0f172a;
}
#bcrmViewObras .obras-table tr[data-obra-id] { cursor: pointer; }
#bcrmViewObras .obras-table tr[data-obra-id]:hover td { background: #f8fafc; }
#bcrmViewObras .obras-table tr.overdue td { background: #fef2f2; }
#bcrmViewObras .obras-table .obras-empty {
  text-align: center;
  color: #64748b;
  padding: 28px 12px;
}
@media (max-width: 1100px) {
  #bcrmViewObras .obras-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
#bcrmViewObras .obras-pendencia-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
}
#bcrmViewObras .obras-pendencia-item:hover { border-color: #93c5fd; }
#bcrmViewObras .obras-pendencia-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 6px;
}
#bcrmViewObras .obras-pendencia-item p { margin: 6px 0 0; font-size: 13px; color: #334155; white-space: pre-wrap; }
#bcrmViewObras .obras-pendencia-item.overdue { border-color: #fca5a5; background: #fef2f2; }
#bcrmViewObras .obras-pill.aberta { background: #fee2e2; color: #b91c1c; }
#bcrmViewObras .obras-pill.atrasada { background: #fecaca; color: #991b1b; }
#bcrmViewObras .obras-pill.em_andamento { background: #dbeafe; color: #1d4ed8; }
#bcrmViewObras .obras-pill.resolvida { background: #dcfce7; color: #166534; }
#bcrmViewObras .obras-pill.cancelada { background: #e2e8f0; color: #475569; }
#bcrmViewObras .obras-pendencia-item .obras-pill.em_andamento { background: #dbeafe; color: #1d4ed8; }
#bcrmViewObras .obras-tasks-box,
#bcrmViewObras .obras-consolidated-box { margin-top: 16px; }
#bcrmViewObras .obras-task-list { display: grid; gap: 8px; }
#bcrmViewObras .obras-task-node {
  margin-left: calc(var(--task-depth, 0) * 24px);
  display: grid;
  gap: 8px;
}
#bcrmViewObras .obras-task-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}
#bcrmViewObras .obras-task-item:hover { border-color: #93c5fd; }
#bcrmViewObras .obras-task-item header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
#bcrmViewObras .obras-task-item p {
  margin: 6px 0;
  color: #334155;
  font-size: 13px;
  white-space: pre-wrap;
}
#bcrmViewObras .obras-task-item .obras-progress { margin-bottom: 6px; }
#bcrmViewObras .obras-task-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#bcrmViewObras .obras-task-files span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: #eff6ff;
  font-size: 12px;
}
#bcrmViewObras .obras-task-files a { color: #1d4ed8; }
#bcrmViewObras .obras-task-files button {
  border: 0;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
  font-size: 16px;
}
#bcrmViewObras .obras-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 13px;
}
#bcrmViewObras .obras-status-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
#bcrmViewObras .obras-status-config-item {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 9px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 3px 8px;
  text-align: left;
  background: #fff;
  cursor: pointer;
}
#bcrmViewObras .obras-status-config-item > span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  grid-row: 1 / 3;
  margin-top: 2px;
}
#bcrmViewObras .obras-status-config-item small { color: #64748b; }
#bcrmViewObras .obras-timeline-event {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding-left: 28px;
  position: relative;
}
#bcrmViewObras .obras-timeline-event::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #93c5fd;
}
#bcrmViewObras .obras-timeline-event time {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
#bcrmViewObras .obras-timeline-event p {
  margin: 3px 0;
  color: #475569;
  font-size: 13px;
  white-space: pre-wrap;
}
#bcrmViewObras .obras-timeline-event.pendencia_aberta::before { background: #dc2626; }
#bcrmViewObras .obras-timeline-event.pendencia_resolvida::before,
#bcrmViewObras .obras-timeline-event.tarefa_atualizada::before { background: #16a34a; }
#bcrmViewObras .obras-status { min-height: 18px; font-size: 12px; color: #64748b; margin: 8px 0 0; }
@media (max-width: 960px) {
  #bcrmViewObras .obras-kpis,
  #bcrmViewObras .obras-detail-grid,
  #bcrmViewObras .obras-form-grid { grid-template-columns: 1fr; }
}
