/**
 * WPDM Elegant Insights Page Styles
 * Professional and modern design for the insights analytics page
 */

/* Modern Color Palette */
:root {
    --wpdm-primary: #2c3e50;
    --wpdm-secondary: #3498db;
    --wpdm-success: #27ae60;
    --wpdm-warning: #f39c12;
    --wpdm-danger: #e74c3c;
    --wpdm-info: #17a2b8;
    --wpdm-light: #f8f9fa;
    --wpdm-dark: #343a40;
    --wpdm-muted: #6c757d;
    --wpdm-white: #ffffff;
    --wpdm-border: #dee2e6;
    --wpdm-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --wpdm-shadow-hover: 0 4px 15px rgba(0, 0, 0, 0.12);
    --wpdm-radius: 12px;
    --wpdm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   INSIGHTS HEADER
============================================================================= */

body.wpdmpro_page_wpdm-stats .wpdm-admin-page-content{
    padding: 5px;
    padding-top: 140px;
}

.insights-header {
    background: var(--wpdm-secondary);
    border-radius: var(--wpdm-radius);
    margin-bottom: 2rem;
    box-shadow: var(--wpdm-shadow);
    overflow: hidden;
    color: var(--wpdm-white);
}

.insights-title {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.title-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-content i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.title-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--wpdm-white);
}

.title-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 500;
}

/* Insights Filters */
.insights-filters {
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.date-range-filter {
    display: flex;
    align-items: end;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.elegant-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wpdm-white);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.elegant-input {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--wpdm-primary) !important;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--wpdm-transition);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.elegant-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: var(--wpdm-white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    color: var(--wpdm-primary) !important;
}

.elegant-input:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: var(--wpdm-white);
}

.elegant-input::placeholder {
    color: var(--wpdm-muted);
}


.filter-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-elegant {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: var(--wpdm-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wpdm-transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-elegant:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    color: var(--wpdm-white);
    text-decoration: none;
}

.btn-elegant.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--wpdm-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.btn-elegant.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    color: var(--wpdm-white);
}

/* =============================================================================
   INSIGHTS SUMMARY CARDS
============================================================================= */

.insights-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: var(--wpdm-white);
    border: 1px solid var(--wpdm-border);
    border-radius: var(--wpdm-radius);
    padding: 2rem;
    box-shadow: var(--wpdm-shadow);
    transition: var(--wpdm-transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: var(--wpdm-transition);
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wpdm-shadow-hover);
}

.summary-card:hover::before {
    height: 6px;
}

/* Individual Card Colors */
.total-card::before {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.users-card::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.packages-card::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.period-card::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--wpdm-white);
    flex-shrink: 0;
    position: relative;
}

.total-card .card-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.users-card .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.packages-card .card-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.period-card .card-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--wpdm-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.card-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wpdm-primary);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--wpdm-muted);
    font-weight: 500;
}

/* =============================================================================
   INSIGHTS CONTENT
============================================================================= */

.insights-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.insights-section {
    display: grid;
    gap: 1.5rem;
}

.insights-section.single-row {
    grid-template-columns: 1fr;
}

.insights-section:not(.full-width):not(.three-columns):not(.single-row) {
    grid-template-columns: 1fr 1fr;
}

.insights-section.three-columns {
    grid-template-columns: 1fr 1fr 1fr;
}

.insights-section.full-width {
    grid-template-columns: 1fr;
}

.insights-card {
    background: var(--wpdm-white);
    border: 1px solid var(--wpdm-border);
    border-radius: var(--wpdm-radius);
    box-shadow: var(--wpdm-shadow);
    overflow: hidden;
    transition: var(--wpdm-transition);
}

.insights-card:hover {
    box-shadow: var(--wpdm-shadow-hover);
}

.card-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid var(--wpdm-border);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content i {
    font-size: 1.5rem;
    color: var(--wpdm-secondary);
}

.header-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--wpdm-primary);
    margin: 0 0 0.25rem 0;
}

.header-text p {
    font-size: 0.9rem;
    color: var(--wpdm-muted);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* =============================================================================
   TOP PACKAGES SECTION
============================================================================= */

.top-packages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.package-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--wpdm-light);
    border-radius: 8px;
    transition: var(--wpdm-transition);
    border: 1px solid transparent;
}

.package-item:hover {
    background: var(--wpdm-white);
    border-color: var(--wpdm-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.package-rank {
    min-width: 40px;
    text-align: center;
}

.rank-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--wpdm-white);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.package-info {
    flex: 1;
    min-width: 0;
}

.package-name a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wpdm-primary);
    text-decoration: none;
    line-height: 1.3;
    display: block;
    margin-bottom: 0.25rem;
}

.package-name a:hover {
    color: var(--wpdm-secondary);
    text-decoration: underline;
}

.package-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.download-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wpdm-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.download-count i {
    color: var(--wpdm-success);
}

.package-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--wpdm-transition);
}

.package-item:hover .package-actions {
    opacity: 1;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--wpdm-light);
    color: var(--wpdm-muted);
    text-decoration: none;
    transition: var(--wpdm-transition);
    border: 1px solid var(--wpdm-border);
}

.action-btn:hover {
    background: var(--wpdm-secondary);
    color: var(--wpdm-white);
    border-color: var(--wpdm-secondary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* =============================================================================
   CHART SECTION
============================================================================= */

.chart-card .card-body {
    padding: 0;
}

.chart-container {
    height: 400px;
    width: 100%;
    padding: 1rem;
}

/* =============================================================================
   TOP USERS SECTION
============================================================================= */

/* Compact Users List for Three Column Layout */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.user-item-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--wpdm-light);
    border-radius: 8px;
    transition: var(--wpdm-transition);
    border: 1px solid transparent;
}

.user-item-compact:hover {
    background: var(--wpdm-white);
    border-color: var(--wpdm-border);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpdm-white);
    font-size: 1rem;
    flex-shrink: 0;
}

.user-item-compact.guest-user .user-avatar-small {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.user-item-compact.deleted-user .user-avatar-small {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.user-info-compact {
    flex: 1;
    min-width: 0;
}

.user-header-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.user-rank-badge-small {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--wpdm-white);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.user-name-compact {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wpdm-primary);
}

.user-stats-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--wpdm-muted);
}

.stat-item-compact i {
    color: var(--wpdm-success);
    width: 12px;
    text-align: center;
}

.user-actions-compact {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: var(--wpdm-transition);
}

.user-item-compact:hover .user-actions-compact {
    opacity: 1;
}

.action-btn-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--wpdm-light);
    color: var(--wpdm-muted);
    text-decoration: none;
    transition: var(--wpdm-transition);
    border: 1px solid var(--wpdm-border);
    font-size: 0.8rem;
}

.action-btn-small:hover {
    background: var(--wpdm-secondary);
    color: var(--wpdm-white);
    border-color: var(--wpdm-secondary);
    text-decoration: none;
    transform: translateY(-1px);
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--wpdm-light);
    border-radius: var(--wpdm-radius);
    transition: var(--wpdm-transition);
    border: 1px solid transparent;
    position: relative;
}

.user-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--wpdm-radius) var(--wpdm-radius) 0 0;
    opacity: 0;
    transition: var(--wpdm-transition);
}

.user-item:hover {
    background: var(--wpdm-white);
    border-color: var(--wpdm-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-item:hover::before {
    opacity: 1;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpdm-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.user-item.guest-user .user-avatar {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.user-item.deleted-user .user-avatar {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.user-rank-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--wpdm-white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wpdm-primary);
}

.user-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--wpdm-muted);
}

.stat-item i {
    color: var(--wpdm-secondary);
    width: 16px;
    text-align: center;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--wpdm-transition);
}

.user-item:hover .user-actions {
    opacity: 1;
}

/* =============================================================================
   EMPTY STATES
============================================================================= */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--wpdm-muted);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.empty-message h4 {
    color: var(--wpdm-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-message p {
    margin: 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* =============================================================================
   RESPONSIVE DESIGN
============================================================================= */

@media (max-width: 1200px) {
    .insights-section.three-columns {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .insights-section:not(.full-width):not(.three-columns):not(.single-row) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .insights-header {
        margin-bottom: 1.5rem;
    }

    .insights-title {
        padding: 1.5rem;
    }

    .title-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .title-content i {
        font-size: 2rem;
    }

    .title-text h2 {
        font-size: 1.5rem;
    }

    .insights-filters {
        padding: 1rem 1.5rem;
    }

    .date-range-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-actions {
        flex-direction: column;
    }

    .insights-summary {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .summary-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .card-number {
        font-size: 2rem;
    }

    .users-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .top-packages-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .user-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .user-header {
        justify-content: center;
    }

    .package-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .package-actions {
        opacity: 1;
    }

    .user-actions {
        opacity: 1;
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .insights-title {
        padding: 1rem;
    }

    .insights-filters {
        padding: 1rem;
    }

    .card-header {
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .chart-container {
        height: 250px;
        padding: 0.5rem;
    }
}

/* =============================================================================
   ANIMATIONS
============================================================================= */

.insights-header {
    animation: fadeInUp 0.6s ease-out;
}

.insights-summary {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.insights-section:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.insights-section:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   ACCESSIBILITY
============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.insights-card:focus-within,
.summary-card:focus-within,
.user-item:focus-within,
.package-item:focus-within {
    outline: 2px solid var(--wpdm-secondary);
    outline-offset: 2px;
}

.btn-elegant:focus,
.elegant-input:focus,
.action-btn:focus {
    outline: 2px solid var(--wpdm-secondary);
    outline-offset: 2px;
}

/* =============================================================================
   NEW INSIGHTS FEATURES STYLING
============================================================================= */

/* Browser Analytics */
.browser-analytics-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.browser-chart {
    min-height: 300px;
}

.browser-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.browser-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--wpdm-light);
    border-radius: 8px;
    transition: var(--wpdm-transition);
}

.browser-item:hover {
    background: var(--wpdm-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.browser-rank {
    font-weight: 700;
    color: var(--wpdm-secondary);
    font-size: 0.9rem;
    min-width: 25px;
}

.browser-info {
    flex: 1;
}

.browser-name {
    font-weight: 600;
    color: var(--wpdm-primary);
    font-size: 0.95rem;
}

.browser-count {
    font-size: 0.8rem;
    color: var(--wpdm-muted);
}

.browser-percentage {
    font-weight: 600;
    color: var(--wpdm-success);
    font-size: 0.9rem;
}

/* Download Patterns */
.patterns-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.pattern-chart h4,
.pattern-stats h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wpdm-primary);
    margin-bottom: 1rem;
}

.chart-container-small {
    height: 200px;
    width: 100%;
}

.weekly-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.day-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--wpdm-light);
    border-radius: 6px;
    transition: var(--wpdm-transition);
}

.day-stat:hover {
    background: rgba(52, 152, 219, 0.1);
}

.day-name {
    font-weight: 600;
    color: var(--wpdm-primary);
}

.day-downloads {
    font-weight: 600;
    color: var(--wpdm-secondary);
}

/* Top Files */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--wpdm-light);
    border-radius: 8px;
    transition: var(--wpdm-transition);
}

.file-item:hover {
    background: var(--wpdm-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.file-rank .rank-number {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: var(--wpdm-white);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--wpdm-primary);
    margin-bottom: 0.25rem;
}

.file-name i {
    color: var(--wpdm-secondary);
}

.file-downloads {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--wpdm-muted);
}

.file-downloads i {
    color: var(--wpdm-success);
}

.file-percentage {
    font-weight: 600;
    color: var(--wpdm-warning);
    font-size: 0.9rem;
}

/* User Analytics */
.user-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.user-type-card {
    background: var(--wpdm-light);
    border-radius: var(--wpdm-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--wpdm-transition);
    border: 2px solid transparent;
}

.user-type-card:hover {
    background: var(--wpdm-white);
    box-shadow: var(--wpdm-shadow);
    transform: translateY(-2px);
}

.user-type-card.registered-users {
    border-color: rgba(52, 152, 219, 0.2);
}

.user-type-card.registered-users:hover {
    border-color: var(--wpdm-secondary);
}

.user-type-card.guest-users {
    border-color: rgba(108, 117, 125, 0.2);
}

.user-type-card.guest-users:hover {
    border-color: var(--wpdm-muted);
}

.user-type-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--wpdm-white);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.user-type-card.guest-users .user-type-icon {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.user-type-stats h4 {
    margin: 0 0 1rem 0;
    color: var(--wpdm-primary);
    font-size: 1.1rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--wpdm-muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--wpdm-primary);
}

/* Package Engagement */
.engagement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.engagement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--wpdm-light);
    border-radius: 8px;
    transition: var(--wpdm-transition);
}

.engagement-item:hover {
    background: var(--wpdm-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.engagement-rank .rank-number {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: var(--wpdm-white);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.engagement-info {
    flex: 1;
    min-width: 0;
}

.package-title {
    font-weight: 600;
    color: var(--wpdm-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.engagement-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--wpdm-muted);
}

.stat-item i {
    color: var(--wpdm-secondary);
}

.engagement-score {
    text-align: center;
    min-width: 60px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wpdm-success);
    line-height: 1;
}

.score-label {
    font-size: 0.7rem;
    color: var(--wpdm-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design for New Features */
@media (max-width: 768px) {
    .browser-analytics-container,
    .patterns-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .files-grid,
    .engagement-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .user-analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .user-type-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .chart-container-small {
        height: 150px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wpdm-dark-mode {
        --wpdm-primary: #e9ecef;
        --wpdm-light: #343a40;
        --wpdm-white: #212529;
        --wpdm-border: #495057;
        --wpdm-muted: #adb5bd;
    }
}
