/* =====================================================
   GARANTIAS APROVACAO — login garantia/admin
   Cards categorizados + modal detalhe + timeline
   ===================================================== */

/* -------- Sub-tabs (Pendentes / Resolvidas) -------- */
.ga-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #eee;
  margin-bottom: 14px;
}
.ga-tab-btn {
  background: none;
  border: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.ga-tab-btn.active {
  color: #2d7a4f;
  border-bottom-color: #2d7a4f;
}
.badge-count {
  display: inline-block;
  background: #c00;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 4px;
  vertical-align: middle;
}

/* -------- Filtros e busca -------- */
.ga-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ga-filtros button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  color: #555;
}
.ga-filtros button:hover { border-color: #2d7a4f; color: #2d7a4f; }
.ga-filtros button.filter-active {
  background: #2d7a4f;
  border-color: #2d7a4f;
  color: #fff;
}
.ga-busca {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.ga-busca input {
  flex: 1;
  min-width: 200px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}
.ga-busca select {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
}

/* -------- Cards categorizados -------- */
.ga-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid #888;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.ga-card:hover {
  border-color: #2d7a4f;
  box-shadow: 0 2px 6px rgba(45,122,79,.10);
  transform: translateY(-1px);
}
.ga-card.cat-produto    { border-left-color: #2d7a4f; }
.ga-card.cat-logistica  { border-left-color: #b8860b; }
.ga-card.cat-financeira { border-left-color: #c00;    }

.ga-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  margin-bottom: 4px;
}
.ga-card-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}
.ga-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f0f0f0;
}
.ga-card.cat-produto .ga-cat    { background: #e8f5ee; color: #2d7a4f; }
.ga-card.cat-logistica .ga-cat  { background: #fff8dc; color: #7a5a00; }
.ga-card.cat-financeira .ga-cat { background: #fde8e8; color: #c00;    }

.ga-card-valor {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}
.ga-card-desc {
  font-size: 12px;
  color: #555;
  font-style: italic;
}

/* -------- Detalhe inline expansivel (substituiu o modal) -------- */
.ga-expandir-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 12px;
  background: #88529d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.ga-expandir-btn:hover { background: #73428a; }
.ga-inline-detalhe { display: none; }
.ga-inline-detalhe.aberto {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e6e0ee;
  text-align: left;
}

/* -------- Tabela resolvidas -------- */
.ga-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.ga-tabela thead {
  background: #f8f9fa;
}
.ga-tabela th, .ga-tabela td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}
.ga-tabela th {
  font-size: 11px;
  color: #777;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.ga-tabela tr:hover {
  background: #fafafa;
}
.ga-tabela tr:last-child td { border-bottom: 0; }
.ga-tabela code {
  background: #f0f0f0;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.btn-link {
  background: none;
  border: 0;
  color: #2d7a4f;
  cursor: pointer;
  text-decoration: underline;
  font-size: 12px;
  padding: 0;
}

/* -------- Modal detalhe -------- */
.modal-ga-detalhe {
  max-width: 720px;
  width: 96%;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-ga-detalhe h3 {
  margin: 0 0 8px;
  color: #2d7a4f;
}
.dt-meta {
  font-size: 12px;
  color: #555;
  margin-bottom: 14px;
  background: #f8f9fa;
  padding: 8px 10px;
  border-radius: 6px;
}
.dt-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.dt-section:last-child {
  border-bottom: 0;
}
.dt-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #777;
  margin: 0 0 8px;
}
.dt-historico {
  background: #fff8dc;
  border-left: 3px solid #b8860b;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: #555;
}
.dt-historico div { margin: 2px 0; }
.dt-descricao {
  background: #fff;
  border: 1px solid #ddd;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #333;
  font-style: italic;
}
.dt-anexos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dt-anexo-img {
  max-width: 180px;
  max-height: 180px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  object-fit: cover;
}
.dt-anexo-link {
  display: inline-block;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  text-decoration: none;
  color: #555;
}
.dt-anexo-link:hover { border-color: #2d7a4f; color: #2d7a4f; }

.dt-aprovado {
  background: #e8f5ee;
  border-left: 3px solid #2d7a4f;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #1a5d3a;
}
.dt-rejeitado {
  background: #fde8e8;
  border-left: 3px solid #c00;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: #700;
}
.dt-desfecho pre {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  white-space: pre-wrap;
  margin: 0;
  color: #444;
}
.dt-info {
  background: #fff8dc;
  border-left: 3px solid #b8860b;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.dt-log {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #555;
}
.dt-log li {
  padding: 4px 0;
  border-bottom: 1px solid #f5f5f5;
}
.dt-log li:last-child { border-bottom: 0; }
.dt-log small {
  color: #999;
}

.dt-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eee;
}

/* -------- Mobile -------- */
@media (max-width: 640px) {
  .ga-card-head { flex-direction: column; gap: 4px; }
  .ga-busca { flex-direction: column; align-items: stretch; }
  .ga-busca input, .ga-busca select { width: 100%; }
  .ga-tabela { font-size: 11px; }
  .ga-tabela th, .ga-tabela td { padding: 6px 4px; }
  .modal-ga-detalhe { padding: 10px; }
  .dt-anexo-img { max-width: 120px; max-height: 120px; }
}
