/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 *= require base/variables
 *= require base/mixins
 *= require components/_buttons
 *= require components/_cards
 *= require components/_dashboard
 *= require components/_forms
 *= require components/_utilities
 *= require pages/home
 *= require pages/members
 *= require pages/criteria
 *= require pages/list
 *= require statistics
 *= require_self
 *= require newsletter
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    overflow-x: hidden;
}

.container-main {
    display: flex;
    min-height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #8b4513;
    text-decoration: none;
}

.logo::before {
    content: "🐝";
    margin-right: 0.5rem;
    font-size: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #8b4513;
}

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #8b4513;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu:hover .hamburger-line {
    background-color: #654321;
}

/* Hamburger animation when active */
.sidebar-mobile-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.sidebar-mobile-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.sidebar-mobile-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hamburger menu is controlled by Bootstrap d-md-none class */

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none; /* Hidden by default on desktop */
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.notification-badge {
    position: relative;
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-badge:hover {
    transform: scale(1.1);
}

.notification-badge::after {
    content: "3";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    margin-top: 70px;
    height: calc(100vh - 70px);
    position: fixed;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid #3a4b5c;
}

.sidebar-title {
    font-size: 1.1rem;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.sidebar-subtitle {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    margin: 0.5rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.875rem 1.5rem;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.875rem;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-left-color: #ffd700;
}

.nav-icon {
    margin-right: 0.875rem;
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    margin-top: 70px;
    padding: 2rem;
    background: #f8f9fa;
}

.page-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ffd700;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ffb347);
}

.card-header-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.card-icon.members {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.card-icon.services {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.card-icon.events {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.card-icon.finance {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.card-icon.ordinary {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.card-icon.supporting {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.card-icon.paid_memberships {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.card-icon.pending_memberships {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.card-icon.overdue_memberships {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.card-icon.secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.card-title-new {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.card-trend {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
}

.trend-up {
    color: #27ae60;
}

.trend-down {
    color: #e74c3c;
}

/* Overdue Members Section */
.overdue-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border-left: 4px solid #dc3545;
}

.section-header {
    margin-bottom: 1.5rem;
}

.overdue-title {
    font-size: 1rem;
    color: #dc3545;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.overdue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.overdue-item:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.member-number {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

.member-details {
    font-size: 0.85rem;
    color: #6c757d;
}

.overdue-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.overdue {
    background: #dc3545;
    color: white;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    text-decoration: none;
}

.view-all {
    margin-top: 1rem;
    text-align: center;
}

.view-all-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.no-overdue {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.success-message {
    text-align: center;
    padding: 1.5rem;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    font-weight: 500;
}

/* Compact Statistics Page Styles */
.main-statistics-compact {
    margin-bottom: 25px;
}

.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-card-compact {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 80px;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-card-compact.total {
    background: linear-gradient(135deg, #4c6ef5 0%, #364fc7 100%);
    color: white;
}

.stat-card-compact.paid {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
}

.stat-card-compact.unpaid {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
    color: white;
}

.stat-card-compact .stat-icon {
    font-size: 32px;
    opacity: 0.9;
}

.stat-card-compact .stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card-compact .stat-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.stat-card-compact .stat-percentage {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

/* Import Grouping Styles */
.import-grouping-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.import-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.import-group-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.import-group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.import-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.import-value {
    flex: 1;
}

.import-badge-display {
    background: linear-gradient(135deg, #4c6ef5, #364fc7);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.import-badge-empty {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

.import-count {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.import-percentage-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.import-fill {
    height: 100%;
    background: linear-gradient(90deg, #51cf66, #37b24d);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.import-fill-unpaid {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #fa5252);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.import-percentage-text {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.import-details-section {
    margin-top: 25px;
}

.import-detail-group {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
}

.import-summary {
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    list-style: none;
    outline: none;
}

.import-summary::-webkit-details-marker {
    display: none;
}

.import-summary::before {
    content: "▶";
    margin-right: 10px;
    transition: transform 0.2s ease;
}

.import-detail-group[open] .import-summary::before {
    transform: rotate(90deg);
}

.import-summary-label {
    font-size: 14px;
}

.import-members-list {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.import-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.import-member-item:last-child {
    border-bottom: none;
}

.import-member-name {
    flex: 1;
}

.member-link-small {
    color: #4c6ef5;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.member-link-small:hover {
    text-decoration: underline;
}

.membership-id-tiny {
    display: block;
    color: #6c757d;
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.import-member-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.import-member-email {
    font-size: 12px;
    color: #6c757d;
}

.import-member-status {
    font-size: 11px;
}

.status-paid {
    color: #37b24d;
    font-weight: 600;
}

.status-unpaid {
    color: #fa5252;
    font-weight: 600;
}

@media (max-width: 768px) {
    .import-groups-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .import-group-card {
        padding: 12px;
    }
    
    .import-member-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .import-member-info {
        align-items: flex-start;
        width: 100%;
    }
}

/* Unpaid Members Table Styles */
.unpaid-members-section {
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.unpaid-members-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.unpaid-members-table th,
.unpaid-members-table td {
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    line-height: 1.3;
}

.unpaid-members-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
}

.unpaid-member-row:hover {
    background: #f8f9fa;
}

.member-name-cell {
    min-width: 150px;
}

.member-link {
    color: #364fc7;
    text-decoration: none;
    font-weight: 600;
}

.member-link:hover {
    text-decoration: underline;
}

.membership-id-small {
    display: block;
    color: #6c757d;
    font-size: 11px;
    font-weight: 500;
    margin-top: 2px;
}

.email-link {
    color: #495057;
    text-decoration: none;
    font-size: 13px;
}

.email-link:hover {
    color: #364fc7;
    text-decoration: underline;
}

.phone-link {
    color: #495057;
    text-decoration: none;
    font-size: 13px;
}

.phone-link:hover {
    color: #51cf66;
}

.codice-badge-small {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #495057;
}

.import-badge-small {
    background: linear-gradient(135deg, #51cf66, #37b24d);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.btn-small {
    display: inline-block;
    padding: 2px 5px;
    margin: 0 1px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.btn-small:hover {
    transform: scale(1.05);
}

.btn-small.create-membership {
    background: linear-gradient(135deg, #4c6ef5, #364fc7);
    color: white;
}

.btn-small.send-email {
    background: linear-gradient(135deg, #ff6b6b, #fa5252);
    color: white;
}

.empty-state-small {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-small .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-small h4 {
    color: #51cf66;
    margin-bottom: 10px;
}

.empty-state-small p {
    color: #6c757d;
    margin: 0;
}

@media (max-width: 768px) {
    .stats-grid-compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card-compact {
        padding: 15px;
        min-height: 70px;
    }
    
    .unpaid-members-table {
        font-size: 11px;
    }
    
    .unpaid-members-table th,
    .unpaid-members-table td {
        padding: 4px 3px;
        font-size: 11px;
    }
    
    .p-group-banner {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .p-group-icon {
        width: 24px;
        height: 24px;
        font-size: 1rem;
    }
    
    .p-group-title {
        font-size: 0.8rem;
    }
    
    .p-group-count {
        font-size: 0.65rem;
    }
}

.stat-card-large {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-large:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.stat-card-large.total:hover {
    box-shadow: 0 20px 40px rgba(76, 110, 245, 0.35);
}

.stat-card-large.paid:hover {
    box-shadow: 0 20px 40px rgba(81, 207, 102, 0.35);
}

.stat-card-large.unpaid:hover {
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.35);
}

.stat-card-large.total {
    background: linear-gradient(135deg, #4c6ef5 0%, #364fc7 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(76, 110, 245, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card-large.paid {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(81, 207, 102, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card-large.unpaid {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(255, 107, 107, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card-large .stat-icon {
    font-size: 48px;
    opacity: 0.9;
}

.stat-card-large .stat-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card-large .stat-label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-card-large .stat-sublabel {
    font-size: 14px;
    opacity: 0.8;
}

/* Chart Styles */
.chart-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4c6ef5, #37b24d, #fa5252);
    border-radius: 20px 20px 0 0;
}

.chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.pie-chart {
    position: relative;
    width: 200px;
    height: 200px;
}

.donut {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-total {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.chart-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-color.paid-color {
    background: #37b24d;
    border: 2px solid rgba(55, 178, 77, 0.3);
    box-shadow: 0 2px 8px rgba(55, 178, 77, 0.2);
}

.legend-color.unpaid-color {
    background: #fa5252;
    border: 2px solid rgba(250, 82, 82, 0.3);
    box-shadow: 0 2px 8px rgba(250, 82, 82, 0.2);
}

.legend-text {
    flex: 1;
}

.legend-label {
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 3px;
    letter-spacing: 0.2px;
}

.legend-value {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Progress Bar Styles */
.progress-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.progress-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #37b24d, #51cf66);
    border-radius: 20px 20px 0 0;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.progress-bar-wrapper {
    flex: 1;
}

.progress-bar {
    height: 30px;
    background: #f1f3f4;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #37b24d, #51cf66);
    transition: width 0.8s ease;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(55, 178, 77, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 15px 15px 0 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.progress-current {
    font-weight: 600;
    color: #37b24d;
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.progress-stat {
    text-align: center;
}

.progress-stat .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 8px;
}

.progress-stat .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Statistics Page */
.statistics-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

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

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

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

.stat-card.primary {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
}

.stat-card.success {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
}

.stat-card.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
}

.stat-card.danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-detail {
    font-size: 0.9rem;
    color: #28a745;
    font-weight: 600;
    margin-top: 0.25rem;
}

.payment-overview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.subsection-title {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.payment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.payment-label {
    font-weight: 500;
    color: #6c757d;
}

.payment-value {
    font-weight: 600;
    color: #2c3e50;
}

.completion-rate {
    color: #28a745 !important;
}

.trends-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.trends-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.trends-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.trends-table th,
.trends-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.trends-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.trends-table .current-year {
    background: rgba(255, 193, 7, 0.1);
    font-weight: 600;
}

.year-cell {
    font-weight: 600;
    color: #2c3e50;
}

.current-badge {
    background: #ffc107;
    color: #8b4513;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.success-cell {
    color: #28a745;
    font-weight: 600;
}

.warning-cell {
    color: #ffc107;
    font-weight: 600;
}

.danger-cell {
    color: #dc3545;
    font-weight: 600;
}

.revenue-cell {
    font-weight: 600;
    color: #2c3e50;
}

.distribution-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.distribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.distribution-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.distribution-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.distribution-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0.25rem 0;
}

.distribution-percentage {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 600;
}

/* P Group Styling */
.p-group-section {
  margin-bottom: 1rem;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-left: 3px solid transparent;
}

.p-group-section:has(.p-group-badge.p-25) {
  border-left-color: #dc3545;
}

.p-group-section:has(.p-group-badge.p-24) {
  border-left-color: #ffc107;
}

.p-group-section:has(.p-group-badge.p-23) {
  border-left-color: #28a745;
}

.p-group-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0;
}

.p-group-banner {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
}

.p-group-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.p-group-content {
  flex: 1;
}

.p-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.p-group-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.p-group-badge.p-25 {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.p-group-badge.p-24 {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.p-group-badge.p-23 {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.p-group-badge-empty {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 4px rgba(108, 117, 125, 0.2);
}

.p-group-count {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 500;
}

.p-group-section .members-table-container {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.p-group-section .unpaid-members-table {
  margin: 0;
}

.p-group-section .unpaid-members-table thead th {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  color: white;
  border: none;
  padding: 0.4rem 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.7rem;
}

.p-group-section .unpaid-members-table thead th:first-child {
  border-top-left-radius: 0;
}

.p-group-section .unpaid-members-table thead th:last-child {
  border-top-right-radius: 0;
}

/* Compact member row styling */
.member-name-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
}

.membership-id-inline {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.3rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
  display: inline-block;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.membership-id-inline:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d7a 100%);
  box-shadow: 0 3px 6px rgba(0, 123, 255, 0.4);
  transform: translateY(-1px);
}

.membership-id-inline.membership-id-primary {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
  font-weight: 800;
}

.membership-id-inline.membership-id-primary:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  box-shadow: 0 3px 6px rgba(40, 167, 69, 0.4);
}

.unpaid-member-row {
  height: auto;
}

/* Export Controls Styles */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.export-controls {
  animation: fadeIn 0.3s ease;
}

.member-checkbox,
.group-select-all {
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.member-checkbox:hover,
.group-select-all:hover {
  transform: scale(1.1);
}

.member-checkbox:checked,
.group-select-all:checked {
  accent-color: #007bff;
}

.group-select-all:indeterminate {
  accent-color: #6c757d;
}

#selectAllBtn {
  transition: all 0.3s ease;
}

#selectAllBtn:hover {
  background: #5a6268 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

#exportCsvBtn:not(:disabled):hover {
  background: linear-gradient(135deg, #1e7e34, #155724) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(40,167,69,0.4) !important;
}

#exportCsvBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#exportPdfBtn:not(:disabled):hover {
  background: linear-gradient(135deg, #c82333, #a71e2e) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(220,53,69,0.4) !important;
}

#exportPdfBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#filterByP {
  transition: all 0.3s ease;
}

#filterByP:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

#selectedCount {
  transition: color 0.3s ease;
}

.unpaid-member-row.selected {
  background-color: rgba(0, 123, 255, 0.05);
}

.unpaid-member-row td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.member-name-cell {
  min-width: 200px;
}

.email-cell, .phone-cell, .codice-cell {
  white-space: nowrap;
}

.actions-cell {
  white-space: nowrap;
  width: 100px;
}

/* Reports Link Section */
.reports-link-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.reports-link-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.reports-link-content {
    text-align: center;
}

.reports-link-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.reports-link-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.reports-link-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.reports-link-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Reports Dashboard */
.reports-dashboard {
    margin-top: 2rem;
}

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

.report-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.report-card.coming-soon {
    opacity: 0.6;
    background: #f8f9fa;
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.report-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.report-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-report {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-report.primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.btn-report.primary:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.coming-soon-badge {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Summary Statistics for Reports */
.quote-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.summary-card.total-unpaid {
    border-left: 4px solid #dc3545;
}

.summary-card.revenue-lost {
    border-left: 4px solid #ffc107;
}

.summary-icon {
    font-size: 2.5rem;
}

.summary-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin: 1rem 0 2rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #6c757d;
    font-weight: bold;
}

.breadcrumb-current {
    color: #6c757d;
    font-weight: 600;
}

/* Sidebar Submenu Styling */
.nav-item.has-submenu .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding-right: 3rem; /* Extra space for arrow */
}

.nav-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    position: absolute;
    right: 1.5rem;
}

.nav-item.has-submenu .nav-link[aria-expanded="true"] .nav-arrow,
.nav-item.has-submenu .nav-submenu.show + .nav-link .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(0,0,0,0.05);
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    padding: 0;
}

.nav-submenu.show {
    max-height: 200px;
    padding: 0.5rem 0;
}

.nav-subitem {
    list-style: none;
}

.nav-sublink {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.75rem 1.5rem 0.75rem 3.5rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    gap: 0.75rem;
}

.nav-sublink:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    text-decoration: none;
}

.nav-sublink.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
    font-weight: 600;
}

.nav-subicon {
    font-size: 0.9rem;
}

/* Statistics Overview with Progress Charts */
.statistics-overview {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.progress-chart-container,
.revenue-chart-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.chart-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
}

.progress-fraction {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 600;
}

.progress-bar-container {
    margin-bottom: 1rem;
}

.progress-bar-bg {
    position: relative;
    background: #e9ecef;
    border-radius: 25px;
    height: 50px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    height: 100%;
    border-radius: 25px;
    transition: width 1.5s ease-in-out;
    position: relative;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.paid-text {
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.unpaid-text {
    color: #495057;
}

.progress-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.indicator.paid .indicator-dot {
    background: #28a745;
}

.indicator.unpaid .indicator-dot {
    background: #dc3545;
}

/* Revenue Chart Styling */
.revenue-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #ffc107;
}

.revenue-potential {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 600;
}

.revenue-progress-container {
    margin-bottom: 1.5rem;
}

.revenue-bar-bg {
    background: #e9ecef;
    border-radius: 15px;
    height: 30px;
    overflow: hidden;
}

.revenue-bar-fill {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
    height: 100%;
    border-radius: 15px;
    transition: width 1.5s ease-in-out;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.revenue-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.revenue-stat {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
}

.revenue-stat.collected {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.revenue-stat.missing {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border-left: 4px solid #dc3545;
}

.revenue-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.revenue-stat.collected .revenue-stat-value {
    color: #155724;
}

.revenue-stat.missing .revenue-stat-value {
    color: #721c24;
}

.revenue-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
}

/* Quick Stats Grid */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.quick-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.quick-stat-card:hover {
    transform: translateY(-3px);
}

.quick-stat-card.members {
    border-top: 4px solid #007bff;
}

.quick-stat-card.average {
    border-top: 4px solid #28a745;
}

.quick-stat-card.efficiency {
    border-top: 4px solid #ffc107;
}

.quick-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quick-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.quick-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .chart-summary {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .progress-bar-text {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
        font-size: 0.8rem;
    }
    
    .progress-indicators {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .revenue-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Newsletter Section Styles */
.newsletter-overview {
    margin-bottom: 2rem;
}

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

.newsletter-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.newsletter-stat-card:hover {
    transform: translateY(-3px);
}

.newsletter-stat-card.total-subscribers {
    border-left: 4px solid #007bff;
}

.newsletter-stat-card.subscription-rate {
    border-left: 4px solid #28a745;
}

.newsletter-stat-card.paid-members {
    border-left: 4px solid #ffc107;
}

.newsletter-stat-card.pending-members {
    border-left: 4px solid #dc3545;
}

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

.stat-icon {
    font-size: 1.8rem;
}

.stat-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.stat-content .stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-percentage {
    color: #28a745;
    font-weight: 600;
    font-size: 0.9rem;
}

.subscription-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.subscription-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    height: 100%;
    transition: width 1s ease-in-out;
}

/* Newsletter Actions */
.newsletter-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    min-width: 250px;
}

.download-btn.primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.download-btn.primary:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.download-btn.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.download-btn.google {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
}

.download-btn.google:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
}

.download-btn.anomalie {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.download-btn.anomalie:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.8rem;
}

.btn-title {
    font-size: 1rem;
    font-weight: 700;
}

.btn-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Newsletter Alerts Section */
.newsletter-alerts-section {
    background: linear-gradient(135deg, #ffffff 0%, #fbfcfd 100%);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.newsletter-alerts-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--danger-color), var(--warning-color), var(--info-color));
    opacity: 0.7;
}

.newsletter-alerts-section .section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.newsletter-alerts-section .section-title {
    font-size: 1.875rem;
    font-weight: var(--font-weight-bold);
    color: var(--dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.newsletter-alerts-section .section-subtitle {
    color: var(--gray);
    font-size: var(--font-size-lg);
    margin: 0;
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-relaxed);
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0;
}

.alert-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.02);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    isolation: isolate;
}

.alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    border-radius: 0 8px 8px 0;
    transition: all var(--transition-base);
    z-index: 1;
}

.alert-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.06);
}

.alert-card:hover::before {
    width: 6px;
}

.alert-card:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.1s ease;
}

.alert-card.warning {
    background: 
        linear-gradient(135deg, rgba(255, 251, 240, 0.9) 0%, rgba(254, 243, 226, 0.95) 100%),
        radial-gradient(ellipse at top right, rgba(245, 158, 11, 0.05), transparent 50%);
    border-color: rgba(245, 158, 11, 0.12);
}

.alert-card.warning::before {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 50%, #f59e0b 100%);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.alert-card.warning:hover {
    background: 
        linear-gradient(135deg, rgba(255, 251, 240, 0.95) 0%, rgba(253, 230, 138, 0.8) 100%),
        radial-gradient(ellipse at top right, rgba(245, 158, 11, 0.08), transparent 50%);
    border-color: rgba(245, 158, 11, 0.18);
}

.alert-card.info {
    background: 
        linear-gradient(135deg, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 0.95) 100%),
        radial-gradient(ellipse at top left, rgba(14, 165, 233, 0.05), transparent 50%);
    border-color: rgba(14, 165, 233, 0.12);
}

.alert-card.info::before {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0ea5e9 100%);
    box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.1);
}

.alert-card.info:hover {
    background: 
        linear-gradient(135deg, rgba(240, 249, 255, 0.95) 0%, rgba(186, 230, 253, 0.8) 100%),
        radial-gradient(ellipse at top left, rgba(14, 165, 233, 0.08), transparent 50%);
    border-color: rgba(14, 165, 233, 0.18);
}

.alert-card.danger {
    background: 
        linear-gradient(135deg, rgba(254, 242, 242, 0.9) 0%, rgba(254, 226, 226, 0.95) 100%),
        radial-gradient(ellipse at center, rgba(239, 68, 68, 0.05), transparent 60%);
    border-color: rgba(239, 68, 68, 0.12);
}

.alert-card.danger::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #ef4444 100%);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.alert-card.danger:hover {
    background: 
        linear-gradient(135deg, rgba(254, 242, 242, 0.95) 0%, rgba(254, 202, 202, 0.8) 100%),
        radial-gradient(ellipse at center, rgba(239, 68, 68, 0.08), transparent 60%);
    border-color: rgba(239, 68, 68, 0.18);
}

.alert-icon {
    position: relative;
}

/* Add subtle icon animations and effects */
.alert-icon .icon-wrapper i {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.alert-card:hover .alert-icon .icon-wrapper i {
    transform: scale(1.1) rotate(5deg);
}

.alert-card.danger:hover .alert-icon .icon-wrapper i {
    animation: dangerIconShake 0.5s ease-in-out;
}

@keyframes dangerIconShake {
    0%, 100% { transform: scale(1.1) rotate(5deg); }
    25% { transform: scale(1.15) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(8deg); }
}

.alert-card.warning:hover .alert-icon .icon-wrapper i {
    animation: warningIconBounce 0.6s ease-out;
}

@keyframes warningIconBounce {
    0% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.2) rotate(-3deg) translateY(-2px); }
    100% { transform: scale(1.1) rotate(5deg); }
}

.alert-card.info:hover .alert-icon .icon-wrapper i {
    animation: infoIconPulse 0.4s ease-in-out;
}

@keyframes infoIconPulse {
    0% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.15) rotate(0deg); }
    100% { transform: scale(1.1) rotate(5deg); }
}

.alert-icon .icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.alert-card.warning .icon-wrapper {
    background: 
        linear-gradient(135deg, #f59e0b 0%, #eab308 50%, #f59e0b 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 50%);
    box-shadow: 
        0 8px 25px rgba(245, 158, 11, 0.35),
        0 3px 12px rgba(245, 158, 11, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.alert-card:hover.warning .icon-wrapper {
    box-shadow: 
        0 12px 35px rgba(245, 158, 11, 0.4),
        0 6px 18px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.alert-card.info .icon-wrapper {
    background: 
        linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0ea5e9 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 50%);
    box-shadow: 
        0 8px 25px rgba(14, 165, 233, 0.35),
        0 3px 12px rgba(14, 165, 233, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.alert-card:hover.info .icon-wrapper {
    box-shadow: 
        0 12px 35px rgba(14, 165, 233, 0.4),
        0 6px 18px rgba(14, 165, 233, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.alert-card.danger .icon-wrapper {
    background: 
        linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #ef4444 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 50%);
    box-shadow: 
        0 8px 25px rgba(239, 68, 68, 0.35),
        0 3px 12px rgba(239, 68, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.alert-card:hover.danger .icon-wrapper {
    box-shadow: 
        0 12px 35px rgba(239, 68, 68, 0.4),
        0 6px 18px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.alert-expand {
    margin-left: auto;
    color: #6b7280;
    font-size: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
}

.alert-card:hover .alert-expand {
    color: #374151;
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.05);
}

.alert-content {
    flex: 1;
    z-index: 2;
    position: relative;
    padding-right: 1rem;
}

.alert-number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.alert-card.warning .alert-number {
    color: #d97706;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.alert-card.info .alert-number {
    color: #0284c7;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.alert-card.danger .alert-number {
    color: #dc2626;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.alert-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.alert-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-weight: 500;
}

.alert-action {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.alert-action::before {
    content: '→';
    margin-right: 0.5rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.alert-card:hover .alert-action::before {
    opacity: 1;
    transform: translateX(0);
}

/* Alert Details Sections */
.alert-details {
    margin-top: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--light-gray);
    overflow: hidden;
    transition: var(--transition-base);
    backdrop-filter: blur(8px);
}

.alert-details.show {
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 0, 0, 0.08);
}

.details-header {
    background: linear-gradient(135deg, var(--light) 0%, var(--light-gray) 100%);
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.details-header h4 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-header h4 i {
    color: var(--gray);
    font-size: 1.1rem;
}

.details-content {
    padding: 1.5rem 1.75rem;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--light);
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
    transition: var(--transition-fast);
}

.contact-item:hover {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: rgba(14, 165, 233, 0.2);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.contact-email {
    font-size: 0.9rem;
    color: #6c757d;
}

.contact-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.badge-primary {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99ccff;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #a3d977;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #ced4da;
}

.show-more {
    text-align: center;
    padding: 16px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 12px;
}

.no-data {
    text-align: center;
    padding: 32px;
    color: #6c757d;
    font-style: italic;
}

/* Duplicate Groups */
.duplicate-group {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.duplicate-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.numero-socio {
    font-size: 0.9rem;
    color: #495057;
}

.duplicate-count {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
}

.category-people_different { background: #6c757d; }
.category-same_person_different { background: #17a2b8; }
.category-family_members { background: #28a745; }
.category-name_variations { background: #ffc107; color: #212529; }
.category-email_different { background: #fd7e14; }
.category-data_conflicts { background: #dc3545; }

.duplicate-contacts {
    padding: 12px 16px;
}

.duplicate-contact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.duplicate-contact:last-child {
    margin-bottom: 0;
}

.contact-labels {
    margin-top: 4px;
}

/* Categories Summary */
.duplicate-categories-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #dee2e6;
    margin-top: 24px;
}

.categories-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.category-summary-item {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.category-summary-item:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.category-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Duplicate Categories */
.duplicate-categories {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.categories-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.category-item:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-count {
    background: #e74c3c;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 28px;
    text-align: center;
}

.category-label {
    flex: 1;
    margin-left: 12px;
    font-size: 0.9rem;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .alerts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0.25rem 0;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .newsletter-alerts-section {
        padding: 1.25rem;
        margin-top: 1rem;
    }
    
    .newsletter-alerts-section .section-title {
        font-size: 1.5rem;
    }
    
    .alert-card {
        padding: 1.5rem;
        gap: 1.25rem;
        border-radius: 16px;
        box-shadow: 
            0 2px 12px rgba(0, 0, 0, 0.06),
            0 1px 4px rgba(0, 0, 0, 0.04);
    }
    
    .alert-card:hover {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 
            0 6px 24px rgba(0, 0, 0, 0.08),
            0 3px 12px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    
    .alert-icon .icon-wrapper {
        width: 64px;
        height: 64px;
        font-size: 1.625rem;
        border-radius: 14px;
    }
    
    .alert-number {
        font-size: 2rem;
        margin-bottom: 0.375rem;
    }
    
    .alert-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    .alert-description {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
    }
    
    .alert-action {
        font-size: 0.75rem;
    }
    
    .alert-expand {
        padding: 0.625rem;
        font-size: 1.125rem;
    }
    
    .alert-content {
        padding-right: 0.75rem;
    }
    
    .details-header,
    .details-content {
        padding: 1rem 1.25rem;
    }
    
    .contact-item {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Enhanced Alert Animations & Effects */
.alert-card {
    animation: slideUp 0.6s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
    animation-delay: calc(var(--animation-index, 0) * 0.15s);
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    will-change: transform, opacity;
}

.alert-card:nth-child(1) { --animation-index: 0; }
.alert-card:nth-child(2) { --animation-index: 1; }
.alert-card:nth-child(3) { --animation-index: 2; }
.alert-card:nth-child(4) { --animation-index: 3; }

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Advanced hover effects with morphing shadows */
.alert-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.alert-card:hover::after {
    opacity: 1;
}

/* Enhanced pulse animation with breathing effect */
.alert-card.danger .alert-number {
    animation: dangerPulse 2.5s ease-in-out infinite;
    position: relative;
}

.alert-card.danger .alert-number::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2), transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    animation: dangerGlow 2.5s ease-in-out infinite;
    z-index: -1;
}

@keyframes dangerPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

@keyframes dangerGlow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

/* Enhanced warning card subtle animation */
.alert-card.warning .alert-number {
    animation: warningGlow 3s ease-in-out infinite;
}

@keyframes warningGlow {
    0%, 100% { 
        text-shadow: 0 0 0 rgba(217, 119, 6, 0);
    }
    50% { 
        text-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
    }
}

/* Subtle info card enhancement */
.alert-card.info .alert-number {
    position: relative;
}

.alert-card.info .alert-number::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(2, 132, 199, 0.4), transparent);
    border-radius: 2px;
    animation: infoUnderline 2s ease-in-out infinite;
}

@keyframes infoUnderline {
    0%, 100% { 
        transform: scaleX(0.7);
        opacity: 0.3;
    }
    50% { 
        transform: scaleX(1);
        opacity: 0.8;
    }
}

/* Enhanced focus states with modern ring */
.alert-card:focus {
    outline: none;
    box-shadow: 
        var(--shadow-xl),
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 0 0 2px rgba(59, 130, 246, 0.5);
}

.alert-card:focus-visible {
    outline: none;
    box-shadow: 
        var(--shadow-xl),
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Enhanced loading state with sophisticated shimmer */
.alert-card.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
    overflow: hidden;
}

.alert-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255,255,255,0.4) 20%,
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0.4) 80%,
        transparent
    );
    animation: modernShimmer 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes modernShimmer {
    0% { 
        left: -100%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% { 
        left: 100%;
        opacity: 0;
    }
}

/* Advanced micro-interactions for expand icon */
.alert-expand {
    position: relative;
    overflow: hidden;
}

.alert-expand::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.alert-card:hover .alert-expand::before {
    width: 100%;
    height: 100%;
}

.alert-expand i {
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.alert-card:hover .alert-expand i {
    transform: scale(1.1) rotate(5deg);
}

/* Enhanced click feedback */
.alert-card:active {
    transform: translateY(-1px) scale(1.01);
    transition: all 0.15s cubic-bezier(0.4, 0.0, 0.6, 1);
}

.alert-card:active .alert-expand i {
    transform: scale(0.95);
    transition: all 0.15s ease;
}

/* Newsletter Statistics Table */
.newsletter-table-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.newsletter-summary-table {
    overflow-x: auto;
}

.stats-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.stats-summary-table th {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    color: white;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    border: none;
    font-size: 0.9rem;
}

.stats-summary-table th:first-child {
    border-top-left-radius: 8px;
}

.stats-summary-table th:last-child {
    border-top-right-radius: 8px;
}

.stats-summary-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.summary-row {
    transition: background-color 0.2s ease;
}

.summary-row:hover {
    background-color: #f8f9fa;
}

.summary-row.total {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.02) 100%);
    border-left: 4px solid #007bff;
}

.summary-row.paid {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%);
    border-left: 4px solid #28a745;
}

.summary-row.unpaid {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.02) 100%);
    border-left: 4px solid #dc3545;
}

.category-cell {
    min-width: 200px;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.category-icon {
    font-size: 1.2rem;
}

.category-name {
    font-weight: 600;
    color: #2c3e50;
}

.number-cell,
.email-cell {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    min-width: 100px;
}

.percentage-cell {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    text-align: center;
    min-width: 80px;
}

.coverage-cell {
    min-width: 150px;
    text-align: center;
}

.coverage-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
}

.coverage-fill {
    height: 100%;
    transition: width 1.2s ease-in-out;
    border-radius: 10px;
}

.summary-row.total .coverage-fill {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

.coverage-fill.paid-fill {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.coverage-fill.unpaid-fill {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.coverage-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

/* Import Groups Section */
.import-groups-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.import-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.import-group-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem;
    border-left: 4px solid #007bff;
}

.import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.import-badge-display {
    background: #007bff;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.import-badge-empty {
    background: #6c757d;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.import-count {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.import-progress {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.import-bar {
    flex: 1;
    background: #e9ecef;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
}

.import-fill {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    height: 100%;
    transition: width 1s ease-in-out;
}

.import-percentage {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    min-width: 40px;
    text-align: right;
}

/* Google Mailing List Styles */
.google-status-section {
    margin-bottom: 2rem;
}

.status-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-left: 4px solid transparent;
}

.status-card.connected {
    border-left-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

.status-card.disconnected {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.03) 0%, rgba(255, 255, 255, 1) 100%);
}

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

.status-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.status-description {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
}

.status-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.status-btn.fetch-contacts {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.status-btn.fetch-contacts:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.status-btn.sync-members {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.status-btn.sync-members:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.status-setup {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.setup-steps h4 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

.setup-steps ol {
    margin-left: 1.5rem;
    color: #6c757d;
}

.setup-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.setup-steps code {
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Google Contacts Results */
.contacts-results-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.results-count {
    display: flex;
    align-items: center;
}

.count-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.sync-info {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.contacts-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.download-btn.google-csv {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    flex: 1;
    min-width: 200px;
}

.download-btn.google-csv:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.3);
}

.download-btn.google-json {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    color: white;
    flex: 1;
    min-width: 200px;
}

.download-btn.google-json:hover {
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.3);
}

.google-contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* Labels styling */
.contact-labels {
    max-width: 300px;
}

.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.label-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.label-more {
    display: inline-block;
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    color: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
}

.google-contacts-table th {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: none;
}

.google-contacts-table th:first-child {
    border-top-left-radius: 8px;
}

.google-contacts-table th:last-child {
    border-top-right-radius: 8px;
}

.google-contacts-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.contact-row:hover {
    background-color: #f8f9fa;
}

.numero-socio-badge {
    background: #ffc107;
    color: #212529;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.table-footer {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-style: italic;
}

/* Sync Results */
.sync-results-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sync-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.sync-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sync-stat-card.updated {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.sync-stat-card.created {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.sync-stat-card.errors {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.sync-stat-icon {
    font-size: 2rem;
}

.sync-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sync-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

.sync-errors {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.sync-errors h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.error-list {
    margin: 0;
    padding-left: 1.5rem;
}

.error-item {
    color: #856404;
    margin-bottom: 0.5rem;
}

/* Back Navigation */
.back-navigation {
    margin-top: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .newsletter-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-actions {
        flex-direction: column;
    }
    
    .download-btn {
        min-width: auto;
        flex: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .newsletter-table {
        font-size: 0.8rem;
    }
    
    .newsletter-table th,
    .newsletter-table td {
        padding: 0.7rem 0.5rem;
    }
    
    .import-groups-grid {
        grid-template-columns: 1fr;
    }
}

/* Reports Actions */
.reports-actions {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 2rem;
}

.statistics-actions {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn.danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.action-btn.danger:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
    text-decoration: none;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.filter-tab.active {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #8b4513;
    border-color: #ffd700;
}

/* Year Filter */
.year-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.year-label {
    font-weight: 500;
    color: #495057;
    margin: 0;
}

.year-buttons {
    display: flex;
    gap: 0.5rem;
}

.year-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
}

.year-btn:hover {
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
}

.year-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Tipologia Allevamento Styles */
.tipologia-allevamento-info {
    text-align: center;
    padding: 0.5rem;
}

.tipologia-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.tipologia-badge.tipologia-ordinario {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.2);
}

.tipologia-badge.tipologia-familiare {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.2);
}

.tipologia-badge.tipologia-none {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.2);
}

.tipologia-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Email and Phone Action Buttons */
.btn-action-compact.email {
    background: #28a745;
    color: white;
}

.btn-action-compact.email:hover {
    background: #218838;
    color: white;
}

.btn-action-compact.phone {
    background: #007bff;
    color: white;
}

.btn-action-compact.phone:hover {
    background: #0056b3;
    color: white;
}

.email-all {
    background: #28a745 !important;
    color: white !important;
}

.email-all:hover {
    background: #218838 !important;
    color: white !important;
}

.export-list {
    background: #6c757d !important;
    color: white !important;
}

.export-list:hover {
    background: #5a6268 !important;
    color: white !important;
}

/* Activity Feed */
.activity-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "📋";
    margin-right: 0.5rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    background: #f8f9fa;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    background: white;
    color: #6c757d;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #8b4513;
    border-color: #ffd700;
    text-decoration: none;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-3px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.service-description {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 999;
        position: fixed;
        width: 280px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* Ensure overlay appears only on mobile */
    .sidebar-overlay {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Prevent body scroll when mobile sidebar is open */
    body.sidebar-mobile-open {
        overflow: hidden;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .header {
        padding: 0 1rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card, .activity-section {
    animation: fadeInUp 0.5s ease forwards;
}

.dashboard-card:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-card:nth-child(3) {
    animation-delay: 0.2s;
}

.dashboard-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Hide Bootstrap navbar when using new layout */
.new-layout .navbar {
    display: none;
}

/* Table Styles for Members and Leads */
.table-responsive {
    margin-top: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.members-table, .leads-table {
    width: 100%;
    background: white;
    margin: 0;
    font-size: 0.9rem;
}

.members-table thead, .leads-table thead {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #ffffff;
    border-bottom: 2px solid #2d3748;
}

.members-table th, .leads-table th {
    padding: 1rem 0.75rem;
    font-weight: 600;
    color: #8b4513;
    border: none;
    text-align: left;
    font-size: 0.85rem;
}

.member-row, .lead-row {
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.member-row:hover, .lead-row:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 179, 71, 0.05));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.members-table td, .leads-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
}

/* Member/Lead Info Column */
.member-info, .lead-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar, .lead-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.event-avatar {
    background: linear-gradient(135deg, #17a2b8, #007bff) !important;
}

.member-details, .lead-details {
    flex: 1;
}

.member-name, .lead-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.member-id, .lead-id {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Contact Info */
.contact-info {
    line-height: 1.4;
}

.contact-email {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-phone {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.lead-status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.lead-status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.lead-status-badge.contacted {
    background: #d1ecf1;
    color: #0c5460;
}

.lead-status-badge.qualified {
    background: #d4edda;
    color: #155724;
}

.lead-status-badge.lost {
    background: #f8d7da;
    color: #721c24;
}

/* Date Info */
.date-info {
    line-height: 1.4;
}

.date-primary {
    color: #2c3e50;
    font-weight: 500;
}

.date-secondary {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-action.view {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-action.view:hover {
    background: #bbdefb;
    color: #1565c0;
    transform: scale(1.1);
}

.btn-action.edit {
    background: #fff3e0;
    color: #f57c00;
}

.btn-action.edit:hover {
    background: #ffe0b2;
    color: #ef6c00;
    transform: scale(1.1);
}

.btn-action.deactivate {
    background: #ffebee;
    color: #d32f2f;
}

.btn-action.deactivate:hover {
    background: #ffcdd2;
    color: #c62828;
    transform: scale(1.1);
}

.btn-action.activate {
    background: #e8f5e8;
    color: #2e7d32;
}

.btn-action.activate:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: scale(1.1);
}

.btn-action.contact {
    background: #e1f5fe;
    color: #0277bd;
}

.btn-action.contact:hover {
    background: #b3e5fc;
    color: #01579b;
    transform: scale(1.1);
}

.btn-action.conversations {
    background: #e8f5e8;
    color: #2e7d32;
}

.btn-action.conversations:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: scale(1.1);
}
.btn-action.delete {
    background: #ffebee;
    color: #d32f2f;
    border: none;
    cursor: pointer;
}
.btn-action.delete:hover {
    background: #ffcdd2;
    color: #c62828;
    transform: scale(1.1);
}
.btn-action.archive {
    background: #fff3e0;
    color: #f57c00;
    border: none;
    cursor: pointer;
}
.btn-action.archive:hover {
    background: #ffe0b2;
    color: #ef6c00;
    transform: scale(1.1);
}
.btn-action.unarchive {
    background: #e8f5e8;
    color: #2e7d32;
    border: none;
    cursor: pointer;
}
.btn-action.unarchive:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: scale(1.1);
}

/* Archived leads styling */
.archived-lead {
    opacity: 0.7;
    background-color: #f8f9fa !important;
}
.archived-indicator {
    margin-left: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

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

.empty-state h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Book and Source Info */
.book-info, .source-info {
    color: #2c3e50;
    font-weight: 500;
}

/* Responsive Design for Tables */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .members-table th, .leads-table th,
    .members-table td, .leads-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .member-avatar, .lead-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Membership Status Badges */
.membership-status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.membership-status-badge.success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.membership-status-badge.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.membership-status-badge.danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
}

.membership-status-badge.secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.payment-date {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.125rem;
}

.membership-info {
    min-width: 120px;
}

/* Membership action button */
.btn-action.membership {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #000;
}

.btn-action.membership:hover {
    background: linear-gradient(135deg, #ffcc00, #ff9500);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

/* Compact Members Table Styles */
.member-row.compact {
    height: 60px;
}

.member-info-compact {
    min-width: 220px;
    padding: 0.75rem 1rem;
}

.member-name-primary {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.member-details-secondary {
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.2;
}

.book-info-compact {
    text-align: center;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

.membership-info-compact {
    text-align: center;
    padding: 0.75rem 0.25rem;
    vertical-align: middle;
    min-width: 70px;
    max-width: 80px;
}

.status-info-compact {
    text-align: center;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    min-width: 100px;
}

.book-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
}

.membership-id-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    margin: 0 2px;
}

.import-info {
    text-align: center;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    min-width: 120px;
    max-width: 150px;
}

.import-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.membership-status-badge-mini, .status-badge-mini {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.membership-status-badge-mini.success, .status-badge-mini.active {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.membership-status-badge-mini.warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.membership-status-badge-mini.danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
}

.status-badge-mini.inactive {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.actions-compact {
    width: 140px;
    padding: 0.5rem;
}

.action-buttons-compact {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action-compact {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
}

.btn-action-compact.view {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.btn-action-compact.edit {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-action-compact.technical-sheet {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-action-compact.technical-support {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #000;
}

.btn-action-compact.appointment {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.btn-action-compact.deactivate {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.btn-action-compact.activate {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-action-compact.delete {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    color: white;
}

.btn-action-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Pagination Styles */
.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: flex;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a {
    background: white;
    border: 1px solid #dee2e6;
    color: #495057;
}

.pagination a:hover {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border-color: #ffd700;
    color: #000;
}

.pagination .current {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border: 1px solid #ffd700;
    color: #000;
}

.pagination .disabled span {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
}

@media (max-width: 768px) {
    .member-info-compact {
        min-width: 180px;
    }
    
    .member-name-primary {
        font-size: 0.85rem;
    }
    
    .member-details-secondary {
        font-size: 0.7rem;
    }
    
    .membership-info-compact {
        min-width: 60px;
        max-width: 70px;
        padding: 0.5rem 0.15rem;
    }
    
    .actions-compact {
        width: 100px;
    }
    
    .action-buttons-compact {
        gap: 0.15rem;
    }
    
    .btn-action-compact {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
}

/* Sortable Table Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}

.sortable-link:hover {
    color: #ffd700;
    text-decoration: none;
}

.sortable-link.current {
    color: #ffd700;
    font-weight: 600;
}

.sort-arrow {
    font-size: 0.8rem;
    margin-left: 0.25rem;
    color: #e2e8f0;
    font-weight: bold;
}

.members-table thead .sort-arrow {
    color: #ffffff;
    opacity: 0.8;
}

.members-table thead th.sortable-header:hover .sort-arrow {
    opacity: 1;
    color: #f7fafc;
}

.members-table thead th.sortable-header:hover {
    background: linear-gradient(135deg, #5a6578 0%, #3d4852 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.members-table thead th.sortable-header {
    transition: all 0.2s ease;
    position: relative;
}

.members-table thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.members-table thead th:last-child {
    border-right: none;
}

/* Gift Lead Highlighting - Enhanced Visibility */
.gift-lead {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.35), rgba(255, 235, 59, 0.25)) !important;
    border-left: 8px solid #ff6b6b !important;
    border-right: 4px solid #ffc107 !important;
    position: relative;
    box-shadow: inset 0 0 15px rgba(255, 193, 7, 0.2), 0 2px 8px rgba(255, 193, 7, 0.15) !important;
    animation: gift-glow 2s ease-in-out infinite alternate;
}

@keyframes gift-glow {
    from { box-shadow: inset 0 0 15px rgba(255, 193, 7, 0.2), 0 2px 8px rgba(255, 193, 7, 0.15); }
    to { box-shadow: inset 0 0 20px rgba(255, 193, 7, 0.3), 0 4px 12px rgba(255, 193, 7, 0.25); }
}

.gift-lead::before {
    content: "🎁";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    z-index: 2;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: gift-bounce 1.5s ease-in-out infinite;
}

@keyframes gift-bounce {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
}

.gift-lead::after {
    content: "REGALO";
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.4);
    letter-spacing: 0.5px;
}

.gift-lead:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.5), rgba(255, 235, 59, 0.35)) !important;
    transform: translateY(-2px) scale(1.002);
    box-shadow: inset 0 0 25px rgba(255, 193, 7, 0.3), 0 6px 20px rgba(255, 193, 7, 0.4) !important;
    border-left-color: #ff5252 !important;
}

.gift-lead .lead-avatar {
    background: linear-gradient(135deg, #ff6b6b, #ffc107);
    color: white;
    border: 3px solid #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    transform: scale(1.1);
    animation: avatar-pulse 2s ease-in-out infinite alternate;
}

@keyframes avatar-pulse {
    from { box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4); }
    to { box-shadow: 0 6px 16px rgba(255, 107, 107, 0.6); }
}

.gift-lead .payer-details {
    font-weight: bold;
    color: #d32f2f !important;
}

/* General Notes Highlighting */
.general-notes-info {
    max-width: 200px;
    padding: 0.75rem;
}

.general-notes-wrapper {
    position: relative;
}

.notes-highlight {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1), rgba(30, 136, 229, 0.05));
    border-left: 3px solid #2196f3;
    padding: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(33, 150, 243, 0.1);
    transition: all 0.2s ease;
}

.notes-highlight:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(30, 136, 229, 0.1));
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
    transform: translateY(-1px);
}

.notes-text {
    font-weight: 500;
    color: #1565c0;
    line-height: 1.3;
    display: block;
    margin-top: 0.25rem;
}

/* Conversations Summary */
.conversations-info {
    max-width: 180px;
    padding: 0.75rem;
}

.conversations-summary {
    text-align: center;
}

.conversation-count {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(67, 160, 71, 0.05));
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.latest-conversation {
    margin-top: 0.5rem;
}

.conversation-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
}

.judgment-positive {
    color: #28a745;
}

.judgment-negative {
    color: #dc3545;
}

.judgment-neutral {
    color: #6c757d;
}

/* Membership History Styles */
.membership-history-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.membership-history-card .card-header {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.membership-history-card .card-header h5 {
    color: #000;
    font-weight: 600;
    margin: 0;
}

.memberships-history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.memberships-history-table thead {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.memberships-history-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.875rem;
}

.membership-row {
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.membership-row:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 179, 71, 0.05));
}

.membership-row td {
    padding: 1rem;
    vertical-align: middle;
}

.year-cell strong {
    font-size: 1.1rem;
    color: #333;
}

.amount-cell {
    font-weight: 600;
    color: #28a745;
    font-size: 1rem;
}

.membership-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-membership-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
}

.btn-membership-action.view {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.btn-membership-action.edit {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.btn-membership-action.delete {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.btn-membership-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

.notes-preview {
    cursor: help;
    border-bottom: 1px dotted #6c757d;
}

/* Membership Summary */
.membership-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.summary-stat {
    padding: 0.5rem;
}

.summary-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.summary-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Empty State */
.empty-memberships {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-memberships .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-memberships h6 {
    color: #495057;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .memberships-history-table {
        font-size: 0.875rem;
    }
    
    .memberships-history-table th,
    .membership-row td {
        padding: 0.5rem;
    }
    
    .membership-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-membership-action {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .membership-summary .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* MEMBERS PAGE ESSENTIAL CSS - Added to fix loading issues */

/* Members Search Section CSS */
.search-section-enhanced {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-grid-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.search-input-position-relative {
  position: relative;
}

.search-grid-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.search-grid-four-col {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.search-form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

.active-filters-info {
  margin-top: 12px;
  padding: 10px;
  background: #e7f5ff;
  border-left: 3px solid #0066cc;
  border-radius: 4px;
}

.active-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.active-filters-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.active-filters-label {
  font-weight: 600;
  color: #0056b3;
  margin-right: 8px;
}

.active-filter-badge {
  background: #007bff;
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.total-results-badge {
  background: #28a745;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Import Modal CSS */
.import-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
}

.import-modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

.import-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #17a2b8;
  padding-bottom: 10px;
}

.import-modal-title {
  margin: 0;
  color: #17a2b8;
}

.import-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6c757d;
}

.import-instructions {
  background: #e7f3ff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.import-instructions-title {
  color: #0056b3;
  margin-bottom: 10px;
}

.import-form-group {
  margin-bottom: 15px;
}

.import-form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
}

.import-form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.import-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.import-btn-cancel {
  background: #6c757d;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.import-btn-submit {
  background: #17a2b8;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.import-progress {
  display: none;
  text-align: center;
  padding: 20px;
}

.import-results {
  display: none;
  margin-top: 20px;
}

.import-results-success {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.import-results-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Members Table CSS */
.members-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.members-table th,
.members-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.members-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.activity-section {
  margin-bottom: 2rem;
}

.activity-section .section-title {
  color: #495057;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-grid-two-col,
  .search-grid-three-col,
  .search-grid-four-col {
    grid-template-columns: 1fr;
  }
  
  .import-modal-content {
    margin: 2% 5%;
    width: 90%;
  }
}
