/**
 * CARD COMPONENT - Simplified & Corrected
 * Based on reference: UI-modernization_documents/financial_dashboard
 * Date: November 12, 2025 - 7:20 PM
 */

/* ==========================================================================
   BASE CARD STYLES
   ========================================================================== */

.ds-card {
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-color); /* Increased to 1.5px for better visibility */
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ==========================================================================
   CARD SECTIONS
   ========================================================================== */

.ds-card__header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ds-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.ds-card__body {
  padding: 1.25rem;
  flex-grow: 1;
  color: var(--text-primary);
}

.ds-card__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   STAT CARD VARIANT
   ========================================================================== */

.ds-card--stat {
  border-left: 4px solid var(--text-primary);
}

.ds-card--stat .ds-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ds-card__stat-value {
  font-size: 1.5rem;
  font-family: var(--font-monospace);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.ds-card__stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.ds-card__stat-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.ds-card__stat-trend--positive {
  color: var(--accent-green);
}

.ds-card__stat-trend--negative {
  color: var(--accent-red);
}

/* ==========================================================================
   ELEVATED VARIANT
   ========================================================================== */

.ds-card--elevated {
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   CARD GRIDS
   ========================================================================== */

.ds-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ds-card-grid--2col {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.ds-card-grid--3col {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Responsive */
@media (max-width: 992px) {
  .ds-card-grid--3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ds-card-grid--2col,
  .ds-card-grid--3col {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   HOVER STATES (Optional)
   ========================================================================== */

.ds-card--hoverable {
  cursor: pointer;
  transition: var(--transition-fast);
}

.ds-card--hoverable:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
