/* =========================================================
 *  RESOURCES (dt.resources.css)
 * ======================================================= */

.dt-resources-wrap {
  margin-top: 0;
}

.dt-resources {
  border-radius: var(--dt-radius-md);
  overflow: hidden;
  border: 0;
  background: #ffffff;
  box-shadow: var(--dt-shadow-strong);
  margin-top: 0;
}

.dt-resources .card-body {
  padding: 1.5rem 1.5rem 1.75rem;
}

/* KPI strip */
.dt-res-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dt-res-kpi {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--dt-radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background-color: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  font-size: 0.85rem;
}

.dt-res-kpi::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: var(--dt-radius-pill);
  background: #fb923c;
}

#dtResKpiDocs::before { background: #22c55e; }
#dtResKpiLinks::before { background: #0ea5e9; }

.dt-res-kpi-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.dt-res-kpi-value {
  font-weight: 600;
  color: #0f172a;
}

/* Filter bar */
.dt-res-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.dt-res-filter-search {
  flex: 1 1 260px;
  min-width: 230px;
}

.dt-res-filter-select {
  flex: 0 0 200px;
  min-width: 180px;
}

#dtResSearch,
#dtResTypeFilter,
#dtResCategoryFilter {
  border-radius: var(--dt-radius-pill);
  font-size: 0.9rem;
}

#dtResSearch:focus,
#dtResTypeFilter:focus,
#dtResCategoryFilter:focus {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.12), 0 0 0 4px rgba(248, 113, 113, 0.08);
  outline: none;
}

/* Card grid */
.dt-res-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.dt-res-card {
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dt-res-card-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.25rem;
}

.dt-res-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.dt-res-summary {
  color: #4b5563;
}

.dt-res-meta {
  font-size: 0.75rem;
}

.dt-res-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* type pill */
.dt-res-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.7rem;
  border-radius: var(--dt-radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.dt-res-type-pill--pdf {
  background-color: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.dt-res-type-pill--doc {
  background-color: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.dt-res-type-pill--sheet {
  background-color: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.dt-res-type-pill--link {
  background-color: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

/* open button */
.dt-res-open {
  border-radius: var(--dt-radius-pill);
  padding-inline: 1.1rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .dt-res-grid { grid-template-columns: minmax(0, 1fr); }
  .dt-res-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  .dt-res-kpis { grid-template-columns: minmax(0, 1fr); }
  .dt-resources .card-body { padding: 1.25rem 1.1rem 1.6rem; }
}
