/* summary.css - Khusus untuk halaman Summary Index (KPI Summary, Premium Dashboard) */

/* SUMMARY PROGRESS */
.summary-progress-section {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#summaryProgress {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#summaryProgress * {
    letter-spacing: 0;
}

/* PREMIUM DASHBOARD */
.premium-dashboard {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: 100%;
    flex: 1;
}

.premium-metrics-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.premium-metric-card,
.premium-composition-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.premium-composition-card {
    flex: 1;
    justify-content: space-between;
}

.pm-header,
.pc-header {
    margin-bottom: 12px;
}

.pm-title,
.pc-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.pm-subtitle,
.pc-subtitle {
    font-size: 0.7rem;
    color: #64748b;
}

.pm-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.pm-value.success {
    color: #2e7d32;
}
.pm-value.progress {
    color: #1565c0;
}

.pm-bar-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pm-bar-fill {
    height: 100%;
    border-radius: 4px;
}
.pm-bar-fill.success {
    background: #66b345;
}
.pm-bar-fill.progress {
    background: #3b82f6;
}

.pm-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #475569;
}
.pm-meta strong {
    color: #0f172a;
    font-weight: 700;
}

/* COMPOSITION CARD */
.pc-stacked-bar {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 16px 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pc-bar {
    height: 100%;
    transition: width 0.3s ease;
}
.pc-bar.pass {
    background: #66b345;
}
.pc-bar.kondisional {
    background: #e6b800;
}
.pc-bar.fail {
    background: #ed1c24;
}

.pc-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: auto;
}

.pc-stat-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.pc-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.pc-indicator.pass {
    background: #66b345;
    box-shadow: 0 0 0 2px #dcfce7;
}
.pc-indicator.kondisional {
    background: #e6b800;
    box-shadow: 0 0 0 2px #fef08a;
}
.pc-indicator.fail {
    background: #ed1c24;
    box-shadow: 0 0 0 2px #fee2e2;
}

.pc-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pc-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}

.pc-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pc-stat-value span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

/* KPI SUMMARY GRID */
.summary-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px;
}

.summary-stat-card {
    min-width: 0;
    padding: 10px 10px 9px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #94a3b8;
    border-radius: 8px;
}

.summary-stat-label {
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.25;
    color: #475569;
    text-transform: uppercase;
}

.summary-stat-value {
    margin-top: 5px;
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1;
    color: #0f172a;
}

.summary-stat-sub {
    margin-top: 5px;
    font-size: 0.64rem;
    line-height: 1.35;
    color: #64748b;
}

.summary-stat-total {
    border-left-color: #1b5e20;
}
.summary-stat-evaluated {
    border-left-color: #1e88e5;
}
.summary-stat-pending {
    border-left-color: #94a3b8;
}
.summary-stat-pass {
    border-left-color: #66b345;
}
.summary-stat-kondisional {
    border-left-color: #e6b800;
}
.summary-stat-fail {
    border-left-color: #ed1c24;
}

.summary-stat-total .summary-stat-value,
.summary-stat-pass .summary-stat-value {
    color: #2e7d32;
}

.summary-stat-evaluated .summary-stat-value {
    color: #1565c0;
}

.summary-stat-kondisional .summary-stat-value {
    color: #9a6b00;
}

.summary-stat-fail .summary-stat-value {
    color: #c62828;
}

/* RESPONSIVE & PRINT */
@media (max-width: 768px) {
    .summary-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 540px) {
    .summary-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .summary-stat-card {
        padding: 9px;
    }
    .summary-stat-value {
        font-size: 1.45rem;
    }
    .summary-progress-list {
        gap: 8px;
    }
    .summary-progress-list .summary-metric {
        padding: 10px 9px;
    }
    .summary-progress-list .summary-metric-head {
        min-height: 66px;
        padding-right: 42px;
    }
    .summary-progress-list .summary-metric-value {
        top: 9px;
        right: 9px;
        padding: 3px 7px;
        font-size: 0.7rem;
    }
    .summary-bar-meta {
        flex-direction: column;
        gap: 2px;
    }
}
@media (max-width: 380px) {
    .summary-stat-grid {
        grid-template-columns: 1fr;
    }
    .summary-composition-head {
        flex-direction: column;
    }
    .summary-progress-list {
        grid-template-columns: 1fr;
    }
    .summary-progress-list .summary-metric-head {
        min-height: 0;
        padding-right: 48px;
    }
    .summary-legend-item {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .summary-legend-item strong {
        grid-column: 2;
    }
}
