/* Dashboard Container */
#hpra-dashboard-wrap {
    max-width: 100%;
    padding: 2rem 1rem;
}

/* Header */
.hpra-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.hpra-header h1 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #111827;
    margin: 0;
}

/* User Menu */
.hpra-user-menu {
    position: relative;
}

.hpra-user-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s;
}

.hpra-user-button:hover {
    color: #ffffff;
}

.hpra-user-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.hpra-logout-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.hpra-user-menu:hover .hpra-logout-dropdown {
    opacity: 1;
    visibility: visible;
}

.hpra-logout-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    border-radius: 0.5rem;
}

.hpra-logout-dropdown a:hover {
    background-color: #f9fafb;
    color: white;
}

.hpra-logout-dropdown svg {
    width: 1rem;
    height: 1rem;
}

/* Filters Section */
.hpra-filters {
    margin-bottom: 1.5rem;
}

.hpra-filters-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.hpra-filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.hpra-filter-group input,
.hpra-filter-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #111827;
    background-color: white;
    /* transition: border-color 0.2s, box-shadow 0.2s; */
}

.hpra-filter-group input:focus,
.hpra-filter-group select:focus {
    outline: none;
    border-color: #9ca3af;
    /* box-shadow: 0 0 0 1px #9ca3af; */
}

.hpra-filter-group input::placeholder {
    color: #9ca3af;
}

/* Button Group */
.hpra-button-group {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.hpra-btn {
    flex: 1;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

/* Apply Button */
.hpra-btn-apply {
    background-color: #04AEB2;
    border-color: #04AEB2;
    color: white;
}

.hpra-btn-apply:hover {
    background-color: #FF4858;
    border-color: #FF4858;
}

/* Reset Button */
.hpra-btn-reset {
    background-color: white;
    border-color: #04AEB2;
    color: #04AEB2;
}

.hpra-btn-reset:hover {
    background-color: #04AEB2;
    border-color: #04AEB2;
    color: #FFFFFF;
}

/* Remove focus/active states that cause the weird colors */
.hpra-btn-reset:focus,
.hpra-btn-reset:active {
    background-color: white;
    border-color: #04AEB2;
    color: #04AEB2;
    outline: none;
}

/* Controls Row */
.hpra-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hpra-entries-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hpra-entries-control label,
.hpra-entries-control span {
    font-size: 0.875rem;
    color: #6b7280;
}

.hpra-entries-control select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background-color: white;
}

.hpra-entries-control select:focus {
    outline: none;
    border-color: #9ca3af;
}

/* Download Button */
.hpra-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background-color: #215732;
    border: 1px solid #215732;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.hpra-btn-download:hover {
    background-color: #FF4858;
    border-color: #FF4858;
}

.hpra-btn-download svg {
    width: 1rem;
    height: 1rem;
}

/* Table Container */
.hpra-table-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hpra-table-wrapper {
    overflow-x: auto;
}

/* Table Styles */
#hpra-members-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0; /* Remove any spacing */
}

#hpra-members-table thead tr {
    border-bottom: 1px solid #e5e7eb;
}

#hpra-members-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: white;
    border: none; /* Remove individual borders */
}

#hpra-members-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.1s;
}

#hpra-members-table tbody tr:last-child {
    border-bottom: none; /* Remove border from last row */
}

#hpra-members-table tbody tr:hover {
    background-color: #f9fafb;
}

#hpra-members-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border: none; /* Remove individual borders */
}

/* DataTables Pagination */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
    display: none;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-color: #d1d5db;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f9fafb !important;
    border-color: #d1d5db;
    color: #111827;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DataTables Sorting Arrows */
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after {
    opacity: 0.3;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hpra-filters-grid {
        grid-template-columns: 1fr;
    }
   
    .hpra-button-group {
        width: 100%;
    }
   
    .hpra-controls-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
   
    .hpra-btn-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hpra-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}


/* Stats Dashboard Section */
.hpra-stats-dashboard {
    background-color: #F7F7F7;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.hpra-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 100%;
}

/* Stat Cards */
.hpra-stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.hpra-stat-value {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.hpra-stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.95;
}

/* Chart Card - Special styling */
.hpra-stat-chart {
    background: white !important;
    color: #374151 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}

/* Force canvas size */
#hpra-membership-chart {
    width: 140px !important;
    height: 140px !important;
    max-width: 140px !important;
    max-height: 140px !important;
}

.hpra-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hpra-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.hpra-legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.hpra-legend-label {
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hpra-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hpra-stats-dashboard {
        padding: 1rem;
    }
    
    .hpra-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hpra-stat-value {
        font-size: 2.5rem;
    }
    
    .hpra-stat-card {
        padding: 1.5rem 1rem;
    }
}