* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Styles */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.logo h1 {
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #5a67d8;
}

.message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Dashboard Styles */
.header {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left h1 {
    color: #333;
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

#currentUser {
    color: #666;
}

.btn-logout {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

.main-content {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.search-box {
    display: flex;
    gap: 10px;
}

#searchInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn-search {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #5a67d8;
}
.btn-reload {
    padding: 12px 24px;
    background: #d2405b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-reload:hover {
    background: #5a67d8;
}


.results-section,
.payment-section,
.receipt-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.results-section h3,
.payment-section h3,
.receipt-section h3 {
    margin-bottom: 20px;
    color: #333;
}

/* Subscriber Card */
.subscriber-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.subscriber-card.paid-up {
    border-left-color: #28a745;
    background-color: #f8fff8;
}

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

.subscriber-name {
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.subscriber-id {
    font-size: 18px;
    color: #080ce4;
    margin-left: 8px;
}
.subscriber-class {
    font-size: 18px;
    color: #df0b0b;
    margin-left: 8px;
}

.paid-badge {
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.subscriber-details {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 5px;
}

.fee-badge {
    background: #e8f5e9;
    color: #388e3c;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.months-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.months-badge.zero {
    background: #f5f5f5;
    color: #757575;
}

.btn-history {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-history:hover {
    background: #5a32a3;
}

.btn-pay {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-pay:hover {
    background: #218838;
}

/* Months Display */
.months-section {
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.months-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.month-chip {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    display: inline-block;
}

.month-chip-small {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin: 2px;
    display: inline-block;
}

.month-chip.due-month {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.month-chip.advance-month {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.no-months {
    color: #757575;
    font-style: italic;
}

/* Add to your CSS file */
.due-summary {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.due-item {
    text-align: center;
    min-width: 120px;
}

.due-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.due-value {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.due-value.due {
    color: #dc3545;
    border-left: 3px solid #dc3545;
}

.due-value.advance {
    color: #28a745;
    border-left: 3px solid #28a745;
}

.due-value.zero {
    color: #6c757d;
    border-left: 3px solid #6c757d;
}

/* For mobile */
@media (max-width: 768px) {
    .due-summary {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .due-item {
        width: 100%;
        max-width: 200px;
    }
}

/* For extra wide screens (desktops) */
@media (min-width: 1200px) {
    .due-summary {
        gap: 50px;
    }
    
    .due-item {
        min-width: 140px;
    }
    
    .due-value {
        font-size: 22px;
        padding: 10px 20px;
    }
}

.advance-value {
    color: #17a2b8;
    font-weight: bold;
}

/* Group Header */
.mobile-group {
    margin-bottom: 20px;
}

.mobile-group h4 {
    color: #444;
    padding-bottom: 5px;
    border-bottom: 2px solid #667eea;
    margin-bottom: 10px;
}

.group-total {
    background: #f3e5f5;
    padding: 8px;
    border-radius: 5px;
    margin: 10px 0;
    font-size: 14px;
}

.positive-balance {
    color: #28a745;
    font-weight: bold;
}

.negative-balance {
    color: #dc3545;
    font-weight: bold;
}

.zero-balance {
    color: #6c757d;
    font-weight: bold;
}

/* Payment Form */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

#monthsPayableInfo {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 4px;
}

.calculation-info {
    background: #e8f4f8;
    padding: 10px;
    border-radius: 5px;
    margin-top: 5px;
    font-size: 14px;
    border-left: 4px solid #2196F3;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-process {
    flex: 1;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-process:hover {
    background: #218838;
}

.btn-cancel {
    flex: 1;
    padding: 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #5a6268;
}

/* Receipt Section */
.receipt-details {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-family: 'Courier New', monospace;
}

.receipt-details h4 {
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.receipt-details hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid #eee;
}

.receipt-details p {
    margin: 8px 0;
    line-height: 1.5;
}
/* Receipt Actions Styling - Fixed Close Button */
.receipt-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Common button styles for all receipt action buttons */
.receipt-actions .btn-print,
.receipt-actions .btn-whatsapp,
.receipt-actions .btn-new,
.receipt-actions .btn-close {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    min-height: 48px;
}

/* Specific button colors - FIXED: All buttons now have proper background colors */
.btn-print {
    background: #17a2b8 !important;
    color: white;
}

.btn-whatsapp {
    background: #25d366 !important;
    color: white;
}

.btn-new {
    background: #667eea !important;
    color: white;
}

.btn-close {
    background: #6c757d !important;
    color: white;
}

/* Hover effects */
.btn-print:hover {
    background: #138496 !important;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-whatsapp:hover {
    background: #1da851 !important;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-new:hover {
    background: #5a67d8 !important;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-close:hover {
    background: #5a6268 !important;
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Focus states for accessibility */
.btn-print:focus,
.btn-whatsapp:focus,
.btn-new:focus,
.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .receipt-actions {
        flex-direction: column;
    }
    
    .receipt-actions .btn-print,
    .receipt-actions .btn-whatsapp,
    .receipt-actions .btn-new,
    .receipt-actions .btn-close {
        width: 100%;
        padding: 14px;
    }
}

/* Button icon styling */
.receipt-actions i {
    font-size: 18px;
}

/* Section header close button (different from receipt-actions) */
.btn-close-section {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-close-section:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Additional fix: Ensure button text is properly aligned */
.receipt-actions .btn-close span {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Make sure buttons are equal height */
.receipt-actions {
    align-items: stretch;
}

/* Fix for any potential CSS specificity issues */
#receiptSection .btn-close {
    background: #6c757d !important;
    color: white !important;
}
/* Payment History Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h4 {
    margin: 0;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
}

.btn-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.history-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.history-summary p {
    margin: 5px 0;
}

.history-table-container {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.history-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.history-table tr:hover {
    background: #f9f9f9;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-history i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #999;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background: #f8f9fa;
}

.btn-close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-close-modal:hover {
    background: #5a6268;
}

/* Notifications */
.payment-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

.payment-notification.error {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-left: 4px solid #d63031;
}

.payment-notification.success {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    border-left: 4px solid #10ac84;
}

.payment-notification.info {
    background: linear-gradient(135deg, #54a0ff, #2e86de);
    border-left: 4px solid #0abde3;
}

.payment-notification .close-notification {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.8;
}

.payment-notification .close-notification:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* WhatsApp QR Modal */
.qr-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.qr-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: white;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-refresh {
    background: #25d366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.btn-refresh:hover {
    background: #128C7E;
}

/* WhatsApp Status */
.whatsapp-status-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.whatsapp-status:hover {
    background: #e0e0e0;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.connected {
    background-color: #25d366;
}

.status-indicator.connecting {
    background-color: #ff9800;
}

.status-indicator.disconnected {
    background-color: #757575;
}

.status-text {
    font-size: 12px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .main-content {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .search-box {
        flex-direction: column;
    }

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

    .due-summary {
        flex-direction: column;
        gap: 10px;
    }

    .months-container {
        gap: 3px;
    }

    .month-chip {
        font-size: 11px;
        padding: 2px 6px;
    }

    .subscriber-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .payment-notification {
        min-width: 250px;
        max-width: 300px;
        left: 20px;
        right: 20px;
        top: 10px;
    }
}

/* PDF Option Styling */
.pdf-option {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.pdf-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.pdf-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Success Notice */
.success-notice {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 15px;
    border-left: 4px solid #28a745;
}

.success-notice i {
    color: #28a745;
    margin-right: 8px;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Error Messages Styling */
.error-message {
    color: #dc3545;
    padding: 10px;
    border: 1px solid #f5c6cb;
    background-color: #f8d7da;
    border-radius: 5px;
    margin: 10px 0;
}

/* PDF Availability Icons */
.pdf-available {
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-unavailable {
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Action Buttons in History */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-view-pdf, .btn-download-pdf, .btn-whatsapp-pdf {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-pdf:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-download-pdf:hover {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-whatsapp-pdf:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}
/* Months display in receipt */
.receipt-info p {
    margin: 8px 0;
    line-height: 1.5;
}

.receipt-info strong {
    color: #333;
    min-width: 160px;
    display: inline-block;
}

.receipt-info .advance-note {
    color: #28a745;
    font-weight: bold;
    background: #e8f5e9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.receipt-info .due-note {
    color: #dc3545;
    font-weight: bold;
    background: #f8d7da;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

/* Highlight advance months */
.advance-month-tag {
    background: #d1ecf1;
    color: #0c5460;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 0 2px;
    border: 1px solid #bee5eb;
}

.due-month-tag {
    background: #f8d7da;
    color: #721c24;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 0 2px;
    border: 1px solid #f5c6cb;
}
 /* Compact Stats Styles 
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-bottom: 20px;
        }
*/
        
        .stat-card {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            padding: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            transition: all 0.2s ease;
            cursor: pointer;
        }
        
        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 8px rgba(0,0,0,0.1);
        }
        
        .stat-value {
            font-size: 1.3rem;
            font-weight: bold;
            margin-bottom: 3px;
            color: #2c3e50;
        }
        
        .stat-label {
            font-size: 0.75rem;
            color: #666;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            font-weight: 500;
        }
        
        .stat-subtext {
            font-size: 0.7rem;
            color: #888;
            line-height: 1.3;
        }
        
        /* Stats Section Header */
        .stats-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .stats-header h2 {
            margin: 0;
            font-size: 1.1rem;
            color: #333;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-refresh-sm {
            background: #f8f9fa;
            border: 1px solid #ddd;
            color: #666;
            padding: 4px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        .btn-refresh-sm:hover {
            background: #e9ecef;
        }
        
        /* Status Colors */
        .stat-pending {
            color: #ff9800;
        }
        
        .stat-verified {
            color: #4caf50;
        }
        
        .stat-today {
            color: #2196f3;
        }
        
        /* Compact layout for smaller screens */
        @media (max-width: 768px) {
            .stats-container {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            
            .stat-card {
                padding: 10px;
            }
            
            .stat-value {
                font-size: 1.1rem;
            }
            
            .stat-label {
                font-size: 0.7rem;
            }
        }
        
        @media (max-width: 480px) {
            .stats-container {
                grid-template-columns: repeat(2, 1fr);
            }
        }
           
        /* Top Performer Cards */
        .top-performer-card {
            grid-column: span 2;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            border-left: 3px solid #667eea;
        }
        
        .top-subscriber-card {
            background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
            border-left: 3px solid #f093fb;
        }
        
        .top-collector-card {
            background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
            border-left: 3px solid #4facfe;
        }
        
        .performer-name {
            font-size: 0.9rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .performer-stats {
            font-size: 0.75rem;
            color: #666;
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
        }
        
        .performer-amount {
            color: #2e7d32;
            font-weight: bold;
        }
        
        .performer-count {
            color: #1976d2;
            font-weight: bold;
        }
        
        /* Status Colors */
        .stat-pending {
            color: #ff9800;
        }
        
        .stat-verified {
            color: #4caf50;
        }
        
        .stat-today {
            color: #2196f3;
        }
        
        /* Compact layout for smaller screens */
        @media (max-width: 768px) {
            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }
            
            .stat-card {
                padding: 10px;
            }
            
            .top-performer-card {
                grid-column: span 2;
            }
            
            .stat-value {
                font-size: 1.1rem;
            }
            
            .stat-label {
                font-size: 0.7rem;
            }
        }
        
        @media (max-width: 480px) {
            .stats-container {
                grid-template-columns: 1fr;
            }
            
            .top-performer-card {
                grid-column: span 1;
            }
        }
        .column-checkboxes {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}
.btn-admin {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: rgb(249, 246, 246);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-admin:hover {
    background: linear-gradient(135deg, #5a0cb5 0%, #1c68f0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-admin i {
    font-size: 16px;
}
/* Password Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#passwordConfirmModal .modal-content {
    background: white;
    border-radius: 8px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.confirm-message {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.amount-display {
    font-size: 1.2rem;
    color: #2196f3;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e3f2fd;
}

.subscriber-display {
    font-size: 1rem;
    color: #333;
    margin: 10px 0;
}

.password-form {
    margin: 20px 0;
}

.password-form .form-group {
    margin-bottom: 15px;
}

.password-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.password-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.password-form input:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.password-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #dc3545;
}

.password-attempts {
    margin-top: 10px;
    padding: 8px;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.password-attempts .remaining {
    color: #856404;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-confirm {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #218838, #1ea084);
    transform: translateY(-1px);
}

.btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #5a6268;
}


.form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: 600;
            color: #555;
        }
 .csv-url-section {
            display: flex;
            gap: 10px;
        }

        .csv-url-section .form-control {
            flex: 1;
        }
/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 400px;
    min-width: 300px;
    z-index: 99999; /* Ensure it's above modals */
    animation: slideInRight 0.3s ease;
}

.notification-success {
    background-color: #28a745;
    border-left: 4px solid #1e7e34;
}

.notification-error {
    background-color: #dc3545;
    border-left: 4px solid #bd2130;
}

.notification-warning {
    background-color: #ffc107;
    color: #212529;
    border-left: 4px solid #e0a800;
}

.notification-info {
    background-color: #17a2b8;
    border-left: 4px solid #138496;
}

.notification button {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.8;
    padding: 0;
    line-height: 1;
}

.notification button:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}