.directory-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
    width: 100%;
    margin-top: 20px;
    font-family: "Segoe UI", Roboto, sans-serif;
}

.directory-menu {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-dir-header th {
    background-color: #0e4308 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 15px !important;
    border: none !important;
}

.directory-table-container .table {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.directory-menu button {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background: #f0f5f0;
    color: #0e4308;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}
.directory-menu button.active { background: #0e4308; color: #fff; }

.directory-content { min-width: 0; }
.directory-search { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px; }


.directory-table-container {
    width: 100%;
    overflow-x: auto; 
    border: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0; 
    background: #fff;
    position: relative; 
    -webkit-overflow-scrolling: touch;
}

.directory-table-container table {
    width: 100%;
    min-width: 800px; 
    margin-bottom: 0 !important;
}

.directory-loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.directory-table-container.loading .directory-loading-overlay {
    opacity: 1;
    visibility: visible;
}

.directory-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    gap: 8px;
    
    overflow-x: auto;
    white-space: nowrap;
}

.directory-pagination .page-btn {
    flex: 0 0 auto;
    background: #f0f5f0;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    color: #0e4308;
    font-weight: 600;
    transition: 0.2s ease;
}

.directory-pagination .page-btn.active { 
    background: #0e4308; 
    color: #fff; 
}

@media (max-width: 768px) {
    .directory-wrapper { grid-template-columns: 1fr; }
    
    .directory-menu {
        flex-direction: row !important;
        justify-content: center;
        flex-wrap: wrap;
        border: none; box-shadow: none; background: transparent;
    }

    .directory-pagination {
        display: flex;
        justify-content: center; 
        padding-left: 15px;
    }
}