* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    /* Iframe optimizations */
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    /* Iframe optimizations */
    width: 100%;
    position: relative;
}

.header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.dashboard-link {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.dashboard-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filters {
    padding: 30px;
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
}

.filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 0.9rem;
}

.filter-input,
.filter-select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.clear-filters,
.btn-primary {
    background: #333;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-end;
    text-decoration: none;
    display: inline-block;
}

.clear-filters:hover,
.btn-primary:hover {
    background: #555;
    transform: translateY(-2px);
}

.btn-orange {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-orange:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding: 30px;
}

.member-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #EF9739;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #EF9739;
}

.member-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.member-position {
    font-size: 1.1rem;
    color: #EF9739;
    font-weight: 600;
    margin-bottom: 12px;
}

.member-detail {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.member-detail strong {
    color: #333;
    min-width: 80px;
    font-weight: 600;
}

.member-detail span {
    color: #666;
}

.member-class {
    display: inline-block;
    background: #EF9739;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #17a2b8;
    color: white;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-1px);
}

.no-results {
    text-align: center;
    padding: 60px 30px;
    color: #666;
    font-size: 1.2rem;
}

.no-results-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.stats {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #666;
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dashboard-header {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dashboard-content {
    padding: 30px;
}

.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.form-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.members-table th,
.members-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.members-table th {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.members-table tr:hover {
    background-color: #f8f9fa;
}

.members-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .members-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .header h1,
    .dashboard-header h1 {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
    }

    .dashboard-link,
    .back-link {
        position: static;
        margin-top: 20px;
        text-align: center;
    }

    .members-table {
        font-size: 0.9rem;
    }

    .members-table th,
    .members-table td {
        padding: 10px;
    }
}

/* ===================================================
   IFRAME OPTIMIZATIONS
   =================================================== */

/* Iframe-specific styles for Elementor and other iframe contexts */
body.iframe-mode {
    padding: 10px;
    background-color: transparent;
    min-height: auto;
}

body.iframe-mode .container {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: none;
    margin: 0;
}

/* Remove unnecessary padding in iframe */
@media (max-width: 768px) {
    body.iframe-mode {
        padding: 5px;
    }
    
    body.iframe-mode .container {
        border-radius: 6px;
    }
    
    body.iframe-mode .members-grid {
        padding: 15px;
    }
}

/* Extra small screens in iframe */
@media (max-width: 480px) {
    body.iframe-mode {
        padding: 2px;
    }
    
    body.iframe-mode .container {
        border-radius: 4px;
    }
    
    body.iframe-mode .header {
        padding: 20px 15px;
    }
    
    body.iframe-mode .header h1 {
        font-size: 1.5rem;
    }
    
    body.iframe-mode .members-grid {
        padding: 10px;
        grid-template-columns: 1fr;
    }
    
    body.iframe-mode .member-card {
        padding: 15px;
    }
}

/* Prevent scrollbars in iframe when possible */
body.iframe-mode {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Enhanced responsive member cards for iframe */
@media (max-width: 600px) {
    body.iframe-mode .member-card {
        margin-bottom: 15px;
    }
}

/* Ensure filters work well in iframe */
body.iframe-mode .filter-container {
    padding: 15px;
}

body.iframe-mode .advanced-filters-section {
    padding: 10px 0;
}

@media (max-width: 768px) {
    body.iframe-mode .filter-container {
        padding: 10px;
    }
}

/* ===================================================
   TOP AND BOTTOM PAGINATION STYLES
   =================================================== */

/* Top pagination styling */
.pagination-container.top-pagination {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: rgba(239, 151, 57, 0.03);
    border-radius: 6px 6px 0 0;
}

/* Bottom pagination styling */
.pagination-container.bottom-pagination {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
    margin-top: 20px;
    background: rgba(239, 151, 57, 0.03);
    border-radius: 0 0 6px 6px;
}

/* Responsive adjustments for dual pagination */
@media (max-width: 768px) {
    .pagination-container.top-pagination,
    .pagination-container.bottom-pagination {
        padding: 10px 0;
        margin: 15px 0;
    }
    
    /* Keep top pagination visible on mobile but make it more compact */
    .pagination-container.top-pagination {
        padding: 8px 10px;
        margin-bottom: 15px;
        font-size: 0.9rem;
    }
    
    .pagination-container.top-pagination .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-container.top-pagination .pagination-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Iframe-specific pagination adjustments */
body.iframe-mode .pagination-container.top-pagination {
    margin-bottom: 15px;
    padding-bottom: 10px;
}

body.iframe-mode .pagination-container.bottom-pagination {
    margin-top: 15px;
    padding-top: 10px;
} 