/**
 * Laporan Analitis Styles
 * Styling untuk halaman laporan analitis
 */

/* Page Header */
.laporan-header {
    background: linear-gradient(135deg, #667eea 0%, #5a6fd8 100%);
    color: #fff;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.laporan-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.laporan-header h1 i {
    opacity: 0.9;
}

.laporan-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

/* Filter Controls */
.laporan-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #667eea;
}

.laporan-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 140px;
}

.laporan-filters .filter-group label {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.laporan-filters input[type="date"] {
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.2s;
}

.laporan-filters input[type="date"]:hover {
    border-color: #667eea;
}

.laporan-filters input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #f8f9ff;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Button styles are defined in components.css */

/* Service Dropdown */
.svc-dropdown {
    position: relative;
}

.svc-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 160px;
    justify-content: space-between;
    font-weight: 500;
    transition: all 0.2s;
}

.svc-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.svc-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 320px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 1.25rem;
    margin-top: 6px;
}

.svc-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.svc-item input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.svc-item:hover {
    color: #667eea;
}

.svc-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.svc-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Stats Grid */
.laporan-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.laporan-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.laporan-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.laporan-stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.laporan-stat-card.stat-total .stat-icon {
    background: linear-gradient(135deg, #667eea, #5a6fd8);
}

.laporan-stat-card.stat-today .stat-icon {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.laporan-stat-card.stat-done .stat-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.laporan-stat-card.stat-archive .stat-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.laporan-stat-card .stat-info h3 {
    margin: 0;
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.laporan-stat-card .stat-info p {
    margin: 0.25rem 0 0 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
}

/* Chart Section */
.laporan-chart-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h3 i {
    color: #667eea;
}

.chart-container {
    position: relative;
    height: 320px;
}

.pie-chart-container {
    height: 250px;
}

/* Two Column Charts */
.laporan-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.laporan-chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pie-legend,
.service-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.pie-legend > div,
.service-legend > div {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Section Header */
.laporan-section-header {
    margin: 2rem 0 1rem 0;
}

.laporan-section-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.laporan-section-header h3 i {
    color: #667eea;
}

/* Service Stats Grid */
.service-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
    transition: transform 0.2s;
}

.service-stat-card:hover {
    transform: translateY(-2px);
}

.service-stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.service-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.service-stat-card.service-all {
    border-left-color: #667eea;
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(102,126,234,0.1));
}

.service-stat-card.service-P { border-left-color: #2E8B57; }
.service-stat-card.service-D { border-left-color: #FF8C00; }
.service-stat-card.service-B { border-left-color: #DC143C; }
.service-stat-card.service-BP { border-left-color: #6f42c1; }
.service-stat-card.service-PSD { border-left-color: #17a2b8; }
.service-stat-card.service-L { border-left-color: #6c757d; }
.service-stat-card.service-DISP { border-left-color: #007bff; }

/* Table Styles */
.laporan-table-container {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.laporan-table {
    width: 100%;
    border-collapse: collapse;
}

.laporan-table th,
.laporan-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.laporan-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    white-space: nowrap;
}

.laporan-table tbody tr:hover {
    background: #f8f9fa;
}

.laporan-table tbody td {
    font-size: 0.9rem;
    color: #333;
}

/* Notification, Modal, and Button styles are defined in components.css */

/* Page-specific archive tab styling */
.archive-tab-btn {
    transition: all 0.3s;
}

.archive-tab-btn.active {
    color: #667eea !important;
    border-bottom-color: #667eea !important;
}

/* Responsive */
@media (max-width: 768px) {
    .laporan-header {
        padding: 1.5rem;
    }

    .laporan-header h1 {
        font-size: 1.4rem;
    }

    .laporan-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        width: 100%;
        flex-direction: row;
    }

    .filter-buttons button {
        flex: 1;
        min-width: auto;
    }

    .laporan-filters .filter-group {
        width: 100%;
    }

    .laporan-filters input[type="date"],
    .svc-btn,
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .laporan-stats-grid {
        grid-template-columns: 1fr;
    }

    .laporan-charts-row {
        grid-template-columns: 1fr;
    }

    .service-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 250px;
    }

    .laporan-table th,
    .laporan-table td {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .laporan-stat-card {
        padding: 1rem;
    }

    .laporan-stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .laporan-stat-card .stat-info p {
        font-size: 1.4rem;
    }

    .service-stats-grid {
        grid-template-columns: 1fr;
    }
}
