/* =====================================================
   CARDS - Estilos de tarjetas
   ===================================================== */

/* --- PIDT Card Base --- */
.pidt-card {
    border-radius: var(--pidt-radius-large);
    padding: 24px 28px;
    box-shadow: var(--pidt-shadow);
    border: 1px solid #e2e8f0;
    transition: all var(--pidt-transition);
    cursor: default;
    background: white;
}

.pidt-card:hover:not(.no-hover) {
    box-shadow: var(--pidt-shadow-strong);
    transform: translateY(-2px);
}

.pidt-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.pidt-card-title {
    font-family: var(--pidt-font-secondary);
    font-size: 1.4em;
    font-weight: 700;
    color: var(--pidt-primary-dark);
    margin: 0;
}

.pidt-card-subtitle {
    font-size: 1em;
    color: var(--pidt-text-light);
    margin-top: 4px;
    line-height: 1.5;
}

.pidt-card.clickable {
    cursor: pointer;
}

.pidt-card.clickable:hover {
    border-color: var(--pidt-primary);
    transform: translateY(-4px);
}

.pidt-card-icon {
    font-size: 2.4em;
    margin-right: 12px;
}

.pidt-card-meta {
    margin-top: 14px;
}

.pidt-card-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.9em;
    color: var(--pidt-text-light);
}

.pidt-card-description {
    font-size: 0.95em;
    margin-top: 8px;
    line-height: 1.55;
    color: var(--pidt-text);
}

.pidt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* --- KPI Cards --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 13px;
    color: #6b6b6b;
    font-weight: 500;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.kpi-trend {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.kpi-trend.positive { color: #43A047; }
.kpi-trend.negative { color: #E53935; }
.kpi-trend.neutral { color: #FFB300; }

/* --- Chart Cards --- */
.chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.chart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.chart-subtitle {
    font-size: 13px;
    color: #6b6b6b;
}

.chart-body {
    padding: 16px;
}

/* --- Table Cards --- */
.table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.table-body {
    padding: 16px;
}

.view-all-link {
    font-size: 13px;
    color: #4459D7;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: #36C1FF;
}

/* --- Stat Cards --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 16px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #4459D7;
}

.stat-label {
    font-size: 12px;
    color: #6b6b6b;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #4459D7;
}

/* --- Action Cards --- */
.action-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    border-color: #4459D7;
}

.action-icon {
    font-size: 32px;
    color: #4459D7;
}

.action-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
}
