/* assets/css/layout.css */

/* Main Container */
.container {
    max-width: 1400px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Main Content Area (pushes content when sidebar is open) */
.main-content {
    margin-left: 250px; /* Default space for expanded sidebar */
    padding: 20px;
    transition: margin-left 0.3s ease; /* Tambahkan transisi untuk margin */
}

/* Header User Info */
.header-user {
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.95em;
    color: #555;
}
.header-user strong {
    color: #2c3e50;
}

/* Filter Section */
.filter-section {
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f0f8ff;
    border: 1px solid #e0eaf4;
    border-radius: 8px;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0eaf4;
    margin-bottom: 15px;
}
.filter-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
}
.filter-header .toggle-icon {
    font-size: 1.5em;
    color: #3498db;
    transition: transform 0.3s ease;
}
.filter-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}
.filter-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
    overflow: hidden;
    max-height: 500px; /* Arbitrary large value */
}
.filter-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e9f5ff;
    border-radius: 8px;
    border: 1px solid #d0eaff;
}
.data-summary {
    text-align: right;
    margin-bottom: 0; /* Adjusted */
    font-size: 1.1em;
    color: #666;
}
.download-button-container {
    text-align: right;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 8px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .filter-content {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 0; /* Remove body padding on small screens */
    }
    .container {
        padding: 15px;
        margin: 10px auto;
    }
    .filter-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-buttons button {
        width: 100%;
    }
    .table-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .download-button-container {
        text-align: center;
        width: 100%;
    }
    .main-content {
        margin-left: 0; /* No margin on mobile */
        padding-top: 60px; /* Space for the toggle button */
    }
}

/* Adjustments for smaller screens (e.g., phones) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
        margin: 5px auto;
    }
    h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .filter-section {
        padding: 15px;
    }
    .filter-header h3 {
        font-size: 1.1em;
    }
    .data-summary {
        font-size: 1em;
    }
}
