/* ============================================
   MODERN KPI CARDS
   Sprint 1-2: Frontend Modernizasyonu
   ============================================ */

/* KPI Card Container */
.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* KPI Card Header */
.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-code {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
}

.kpi-status {
    font-size: 20px;
}

.status-success { color: #10b981; }
.status-warning { color: #f59e0b; }
.status-danger { color: #ef4444; }
.status-info { color: #06b6d4; }

/* KPI Title */
.kpi-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* KPI Metrics */
.kpi-metrics {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.metric-primary,
.metric-secondary {
    flex: 1;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.metric-value .unit {
    font-size: 20px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 2px;
}

.metric-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* KPI Progress Bar */
.kpi-progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.progress-bar.success {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-bar.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* KPI Footer */
.kpi-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

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

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #6b7280;
}

.last-update {
    color: #9ca3af;
}

/* KPI Card Actions */
.kpi-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}

.kpi-card:hover .kpi-actions {
    opacity: 1;
}

.kpi-action-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.kpi-action-btn:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* KPI Grid Layout */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .kpi-metrics {
        flex-direction: column;
        gap: 16px;
    }
    
    .metric-value {
        font-size: 28px;
    }
}
