/* Modern Dashboard Layout */
.wrap {
    background: #f3f4f6;
    margin: 20px;
    padding: 25px;
    border-radius: 16px;
    min-height: calc(100vh - 100px);
}

/* Header Section */
.wrap h1 {
    color: #111827;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px; /* Update margin */
}

/* Period Filters - Modern Style */
.period-filters {
    /* Remove all styles */
}

.period-filters button {
    /* Remove all styles */
}

/* Add after your period-filters styles */
.location-filters {
    background: #fff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-buttons button {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-buttons button:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.filter-buttons button.active {
    background: #2271b1;
    border-color: #2271b1;
    color: white;
}

/* Modern Select Styles */
.filter-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin: 0; /* Remove individual margins */
}

.filter-select select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #f8f9fa;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23495057' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.filter-select select:hover {
    border-color: #2271b1;
}

.filter-select select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Update container spacing */
.filters-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
    order: 1; /* Ensure filters come first */
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Tabs */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

.nav-tab {
    margin-left: 0;
    margin-right: 5px;
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.71428571;
    border-radius: 4px 4px 0 0;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

/* Charts and Data Display */
.postbox {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.postbox .hndle {
    padding: 12px 15px;
    border-bottom: 1px solid #ccd0d4;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

.postbox .inside {
    padding: 15px;
    margin: 0;
}

/* Modern Chart Containers */
.dashboard-charts {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 24px 0;
    order: 2; /* Ensure charts come after filters but before feedback */
}

.main-charts,
.hidden-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 400px; /* Fixed height */
    display: flex;
    flex-direction: column;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chart-container h2 {
    color: #111827;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    flex: 0 0 auto; /* Prevent title from flexing */
}

.chart-container canvas {
    flex: 1; /* Take remaining space */
    width: 100% !important;
    height: calc(100% - 44px) !important; /* Subtract title height */
}

/* Criteria Rankings Grid */
.criteria-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Overview Stats */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
}

.stat-box h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 14px;
}

.aggregate-score,
.name-sharing {
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
}

/* Rating Distribution */
.rating-distribution {
    padding: 15px;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    text-align: center;
}

.rating-box {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rating-box h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #1d2327;
}

.rating-count {
    font-size: 20px;
    font-weight: bold;
    color: #2271b1;
}

/* Public Display Styles */
.pub-feedback-public {
    max-width: 800px;
    margin: 0 auto;
}

.pub-feedback-public .feedback-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pub-feedback-public .feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pub-feedback-public .feedback-header h3 {
    margin: 0;
    color: #1d2327;
    font-size: 18px;
}

.pub-feedback-public .feedback-date {
    color: #666;
    font-size: 14px;
}

.pub-feedback-public .rating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.pub-feedback-public .rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.pub-feedback-public .rating-label {
    color: #666;
}

.pub-feedback-public .rating-value {
    font-weight: bold;
    color: #2271b1;
}

.pub-feedback-public .staff-name {
    margin: 15px 0;
    padding: 10px;
    background: #f0f7ff;
    border-radius: 4px;
}

.pub-feedback-public .feedback-section {
    margin: 15px 0;
}

.pub-feedback-public .feedback-section strong {
    display: block;
    margin-bottom: 5px;
    color: #1d2327;
}

.pub-feedback-public .feedback-section p {
    margin: 0;
    color: #50575e;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modernize Chart Appearance */
.chart-container canvas {
    border-radius: 8px;
    width: 100% !important;
    height: 300px !important; /* Fixed height for charts */
    max-width: 100%;
}

/* Add subtle animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container, .feedback-card {
    animation: slideIn 0.3s ease-out;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .criteria-rankings {
        grid-template-columns: 1fr;
    }

    .distribution-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-tab-wrapper {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-tab {
        flex: 1 1 auto;
        text-align: center;
        margin-bottom: 5px;
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 16px;
        min-height: 250px;
    }

    .chart-container canvas {
        height: 200px !important;
    }

    .wrap {
        margin: 15px;
        padding: 15px;
    }
}

/* Modern Feedback Cards */
.feedback-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden; /* Add this */
    order: 3; /* Ensure feedback comes last */
}

/* Remove the old feedback-containers and feedback-list styles */
.feedback-containers,
.feedback-list {
    display: none;
}

/* Modern Rating Display */
.rating-stars {
    color: #f59e0b;
    letter-spacing: 3px;
    font-size: 15px;
}

.rating-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.rating-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Add gradient classes for different ratings */
.rating-item[data-rating="5"] {
    background: linear-gradient(135deg, #98D8C1 0%, #7EBCA3 100%);
    color: #2C4C40;
}

.rating-item[data-rating="4"] {
    background: linear-gradient(135deg, #A8E6CF 0%, #8DCEB6 100%);
    color: #2C4C40;
}

.rating-item[data-rating="3"] {
    background: linear-gradient(135deg, #FFD3B6 0%, #FFBF9B 100%);
    color: #4A3828;
}

.rating-item[data-rating="2"] {
    background: linear-gradient(135deg, #FF9B9B 0%, #FF8282 100%);
    color: #4A2F2F;
}

.rating-item[data-rating="1"] {
    background: linear-gradient(135deg, #FF7B7B 0%, #FF6262 100%);
    color: #4A2F2F;
}

/* Update text colors for better contrast on gradients */
.rating-item[data-rating] .rating-label {
    color: inherit;
}

.rating-item[data-rating] .rating-stars {
    color: inherit;
    opacity: 0.9;
}

/* Custom Scrollbar */
.feedback-list::-webkit-scrollbar {
    width: 8px;
}

.feedback-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.feedback-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 8px;
}

.feedback-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .feedback-containers {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove duplicate debug sections */
.debug-info {
    display: none;
}

/* Stats Overview Styles */
.location-stats {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; /* Match filters margin */
    margin: 16px 0; /* Match filters margin */
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Stats Cards */
.stat-card {
    flex: 1;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    margin: 0; /* Remove individual margins */
}

.stat-title {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    color: #212529;
    font-size: 24px;
    font-weight: 600;
}

/* Match Period Filters Spacing */

/* Location Stats */
.location-stats {
    margin: 16px 0; /* Match other containers */
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .stats-overview,
    .location-filters {
        flex-direction: column;
        padding: 12px;
    }

    .location-filters button {
        width: 100%;
    }
}

/* Update spacing for filters and stats */

.location-filters {
    margin-bottom: 20px;
}

.date-range-picker {
    display: none;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 8px;
    width: 100%;
}

.date-range-picker.active {
    display: flex;
}

/* Update date range styles */
.date-range-container {
    width: 100%;
    margin-top: 16px;
}

.date-range-picker {
    display: none; /* Hidden by default */
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
}

.date-range-picker.active {
    display: flex;
}

.date-range-picker input[type="date"] {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    min-width: 120px;
    flex: 1;
}

.date-range-picker button {
    padding: 12px 24px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

@media screen and (max-width: 768px) {
    .date-range-picker {
        flex-direction: column;
    }
    
    .date-range-picker input[type="date"] {
        width: 100%;
    }
}

/* Remove any margin from date range container */
.date-range-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.date-range-picker input[type="date"] {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    min-width: 120px;
    flex: 1;
    min-width: 0; /* Add this to prevent overflow */
}

.date-range-picker button {
    padding: 12px 24px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    min-width: 120px;
}

.date-range-picker button:hover {
    background: #185a8c;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 640px) {
    .date-range-picker {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .date-range-picker input[type="date"] {
        width: 100%;
        min-width: 0;
    }

    .date-range-picker button {
        width: 100%;
        min-width: 0;
    }
}

.error-message, .no-data-message {
    text-align: center;
    padding: 20px;
    margin: 10px 0;
    border-radius: 4px;
}

.error-message {
    background-color: #fee8e7;
    color: #d32f2f;
    border: 1px solid #fcccc7;
}

.no-data-message {
    background-color: #f5f6fa;
    color: #666;
    border: 1px solid #e0e0e0;
}

/* Feedback Slider */
.feedback-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-x; /* Only allow horizontal scrolling */
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.slider-btn {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn.view-all {
    background: #f3f4f6;
    padding: 10px 24px;
    flex-grow: 1;
    margin: 0 12px;
    max-width: 200px;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    touch-action: pan-x; /* Only allow horizontal scrolling */
}

.slider-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slider-btn.view-all:hover {
    background: #e5e7eb;
}

.slider-counter {
    text-align: center;
    color: #636e72;
    font-size: 14px;
    margin-bottom: 16px;
}

.slider-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    cursor: grab; /* Add grab cursor */
    touch-action: pan-y pinch-zoom;
}

.slider-track:active {
    cursor: grabbing; /* Change cursor when dragging */
}

.feedback-card {
    min-width: 100%;
    flex: 0 0 100%;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    transition: opacity 0.3s ease;
    position: relative; /* Add this */
    width: 100%; /* Ensure full width */
}

/* Remove the transform on hover since we don't want cards lifting up in the slider */
.feedback-card:hover {
    transform: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.staff-badge {
    background: linear-gradient(135deg, #98D8C1 0%, #7EBCA3 100%);
    border: none;
    color: #2C4C40;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(152, 216, 193, 0.2);
}

.staff-badge i {
    color: #2C4C40;
}

.staff-badge span {
    color: #2C4C40;
    opacity: 0.8;
}

.staff-badge strong {
    color: #2C4C40;
    font-weight: 600;
}

.rating-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.rating-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.rating-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.rating-stars {
    color: #f59e0b;
    letter-spacing: 1px;
    font-size: 15px;
    white-space: nowrap;
}

.feedback-comments {
    margin-top: 24px;
}

.feedback-liked,
.feedback-improve {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #636e72;
}

.modal-body {
    padding: 20px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rating-value {
    color: #f1c40f;
    letter-spacing: 2px;
}

/* Add responsive breakpoints */
@media screen and (max-width: 640px) {
    .rating-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Force two columns */
        gap: 8px;
        margin-bottom: 8px;
        width: 100%;
    }

    .rating-item {
        width: 100%;
        padding: 8px 12px;
        min-height: 60px; /* Add minimum height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .rating-label {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .rating-stars {
        font-size: 12px;
    }

    /* Meta row mobile styles */
    .meta-row {
        display: flex;
        gap: 8px;
        flex-direction: row;
    }

    .feedback-date, .feedback-location {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Base rating row styles */
.rating-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.rating-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile styles - keep the same grid layout */
@media screen and (max-width: 640px) {
    .rating-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        margin-bottom: 8px;
    }

    .rating-item {
        padding: 8px 12px;
        min-height: 50px;
    }

    .rating-label {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .rating-stars {
        font-size: 12px;
    }
}

.feedback-average {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: #f8fafc;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
    width: fit-content;
}

.average-score {
    font-size: 24px;
    font-weight: 600;
    color: #2D3436;
}

.average-label {
    color: #64748b;
    font-size: 14px;
}

.feedback-average .average-score {
    font-size: 20px;
    font-weight: 700;
}

.feedback-average .average-label {
    font-size: 16px;
    opacity: 0.8;
}

/* Score gradients - more subtle pastel versions */
.score-excellent {
    background: linear-gradient(135deg, #98D8C1 0%, #7EBCA3 100%);
    color: #2C4C40;
}

.score-good {
    background: linear-gradient(135deg, #A8E6CF 0%, #8DCEB6 100%);
    color: #2C4C40;
}

.score-above-average {
    background: linear-gradient(135deg, #FFD3B6 0%, #FFBF9B 100%);
    color: #4A3828;
}

.score-average {
    background: linear-gradient(135deg, #FFAAA5 0%, #FF9B8F 100%);
    color: #4A2F2D;
}

.score-below-average {
    background: linear-gradient(135deg, #FF9B9B 0%, #FF8282 100%);
    color: #4A2F2F;
}

.score-poor {
    background: linear-gradient(135deg, #FF8B8B 0%, #FF7272 100%);
    color: #4A2F2F;
}

.score-very-poor {
    background: linear-gradient(135deg, #FF7B7B 0%, #FF6262 100%);
    color: #4A2F2F;
}

/* Ensure consistent spacing */

/* Add styles for hidden charts and load more button */
.hidden-charts {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.load-more-stats {
    display: block;
    margin: 24px auto 0;
    padding: 12px 24px;
    background: #2271b1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.load-more-stats:hover {
    background: #185a8c;
    transform: translateY(-1px);
}

.hidden-charts {
    display: none;
}

.hidden-charts.visible {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.main-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    width: 100%;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .main-charts,
    .hidden-charts {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 350px; /* Slightly smaller on mobile */
        padding: 16px;
    }

    .chart-container canvas {
        height: 200px !important;
    }
}

.date-range-wrapper {
    width: 100%;
    margin-top: 16px;
}

.date-range-container {
    display: none;
    width: 100%;
    margin: 8px 0 0 0;
}

.date-range-container.active {
    display: block;
}

.date-range-picker {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
}

.date-range-picker input[type="date"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

@media screen and (max-width: 768px) {
    .date-range-picker {
        flex-direction: column;
        gap: 8px;
    }

    .date-range-picker input[type="date"],
    .date-range-picker button {
        width: 100%;
    }
}

.date-range-container {
    display: none;
    width: 100%;
    margin-top: 8px;
}

.date-range-container.active {
    display: block;
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.date-range-picker input[type="date"] {
    flex: 1;
    min-width: 0; /* Prevents input from overflowing */
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.date-range-picker button {
    white-space: nowrap;
    padding: 8px 16px;
}

@media screen and (max-width: 768px) {
    .date-range-picker {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
    }

    .date-range-picker input[type="date"] {
        width: 100%;
    }

    .date-range-picker button {
        width: 100%;
        margin-top: 4px;
    }
}

/* Trend Card Styles */
.trend-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
}

.trend-card.up::before {
    background: #10b981;
}

.trend-card.down::before {
    background: #ef4444;
}

.trend-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 600;
}

.trend-card.up .trend-value {
    color: #10b981;
}

.trend-card.down .trend-value {
    color: #ef4444;
}

.trend-number {
    font-family: 'Inter', system-ui, sans-serif;
    font-feature-settings: "tnum";
}

.trend-card .fas {
    font-size: 18px;
}

/* Animation for trend changes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.trend-card.up .trend-value,
.trend-card.down .trend-value {
    animation: pulse 0.5s ease-in-out;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.slider-btn {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
}

.slider-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.slider-btn.view-all {
    background: #f3f4f6;
    padding: 8px 20px;
    font-weight: 500;
}

.slider-btn.view-all:hover {
    background: #e5e7eb;
}

.slider-counter {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
}

.slider-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.slider-btn i {
    font-size: 14px;
}

.meta-row {
    display: flex;  /* Change from grid to flex */
    gap: 16px;
    margin-bottom: 12px;
}

.feedback-date, .feedback-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex: 1;  /* Make both elements take equal width */
    min-width: 0;
    text-align: center;
}

.feedback-date i, .feedback-location i {
    color: #94a3b8;
    font-size: 16px;
    margin-bottom: 2px;
}

/* Mobile styles */
@media screen and (max-width: 640px) {
    .feedback-date, .feedback-location {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Mobile responsive adjustment */
@media screen and (max-width: 640px) {
    .meta-row {
        flex-direction: column;
        gap: 8px;
    }

    .feedback-date, .feedback-location {
        width: 100%;
        padding: 10px 12px;
    }
}

.feedback-date, .feedback-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 14px;
}

.feedback-date i, .feedback-location i {
    color: #94a3b8;
}

.feedback-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.feedback-meta {
    width: 100%;
}

.meta-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

.feedback-date, .feedback-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 0; /* Add this to prevent overflow */
}

/* Update mobile styles - remove column direction */
@media screen and (max-width: 640px) {
    .meta-row {
        display: flex; /* Keep flex display */
        gap: 8px; /* Reduce gap on mobile */
        flex-direction: row; /* Ensure row direction */
    }

    .feedback-date, .feedback-location {
        padding: 8px 12px; /* Slightly reduce padding */
        font-size: 13px; /* Slightly smaller font */
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden; /* Hide overflow */
        text-overflow: ellipsis; /* Add ellipsis for overflow */
    }
}

/* Update mobile styles */
@media screen and (max-width: 640px) {
    .meta-row {
        display: flex; /* Keep flex display */
        gap: 8px; /* Reduce gap on mobile */
    }

    .feedback-date, .feedback-location {
        padding: 8px 12px; /* Slightly reduce padding */
        font-size: 13px; /* Slightly smaller font */
    }

    /* Optionally hide icons on very small screens */
    @media screen and (max-width: 360px) {
        .feedback-date i, .feedback-location i {
            display: none;
        }
    }
}

/* Update mobile styles */
@media screen and (max-width: 640px) {
    .rating-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Force two columns */
        gap: 8px;
        margin-bottom: 8px;
        width: 100%;
    }

    .rating-item {
        width: 100%;
        padding: 8px 12px;
        min-height: 60px; /* Add minimum height */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
    }

    .rating-label {
        font-size: 12px;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .rating-stars {
        font-size: 12px;
    }

    .rating-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Keep two columns */
        gap: 8px; /* Reduce gap on mobile */
    }

    .rating-item {
        width: auto; /* Remove fixed width */
        padding: 8px 12px; /* Slightly reduce padding */
        flex-direction: column; /* Stack label and stars vertically */
        align-items: flex-start;
    }

    .rating-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .rating-stars {
        font-size: 12px;
    }

    /* For very small screens */
    @media screen and (max-width: 360px) {
        .rating-row {
            gap: 6px; /* Further reduce gap */
        }

        .rating-item {
            padding: 6px 10px;
        }
    }
}
    font-size: 14px;
}

.feedback-date i, .feedback-location i {
    color: #94a3b8;
}

.feedback-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.feedback-meta {
    width: 100%;
}

.meta-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}

/* Add location-specific gradients for the feedback location box */
.feedback-location[class*="location-"] {
    background: #f8fafc;
    color: #64748b;
}

.feedback-location[class*="location-"] i {
    color: #94a3b8;
    opacity: 0.9;
}