/* 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, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-title {
    flex: 1;
    text-align: left;
}

a.header-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.header-title-link:hover h1 {
    color: #667eea;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    font-size: 15px;
    font-weight: 500;
}

.user-info i {
    font-size: 24px;
    color: #667eea;
}

.logout-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(245, 101, 101, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn i {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-title {
        text-align: center;
        width: 100%;
    }
    
    .header-user {
        width: 100%;
        justify-content: space-between;
    }
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: rgba(103, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(103, 126, 234, 0.3);
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #667eea;
    font-size: 1.2rem;
    pointer-events: none;
}

.search-input {
    flex: 1;
    padding: 15px 50px 15px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7fafc;
    color: #2d3748;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
    color: #a0aec0;
}

.search-clear {
    position: absolute;
    right: 15px;
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.search-results-info {
    margin-top: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.search-results-info span {
    font-size: 1.1rem;
    font-weight: 700;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Scripts Grid */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.script-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.script-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.script-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.script-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge:not(.running):not(.error) {
    background: #d4edda;
    color: #155724;
}

.status-badge.running {
    background: #fff3cd;
    color: #856404;
    animation: pulse 1.5s infinite;
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Form Styles */
.script-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.form-input, .filter-select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
}

.execute-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.execute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(103, 126, 234, 0.3);
}

.execute-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Results Section */
.results-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.refresh-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.results-list {
    display: grid;
    gap: 20px;
}

.result-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.result-title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
}

.result-date {
    color: #6c757d;
    font-size: 0.9rem;
}

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

.result-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-detail-value {
    color: #2c3e50;
    font-size: 1rem;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn {
    background: #007bff;
    color: white;
}

.download-btn:hover {
    background: #0056b3;
}

.excel-btn {
    background: #28a745;
    color: white;
}

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

.view-btn {
    background: #17a2b8;
    color: white;
}

.view-btn:hover {
    background: #138496;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

/* History Section */
.history-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.history-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.date-input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.filter-btn {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.history-list {
    display: grid;
    gap: 15px;
}

.history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #6c757d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-affiliate {
    font-weight: 700;
    color: #2c3e50;
}

.history-details {
    color: #6c757d;
    font-size: 0.9rem;
}

.history-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.history-status.success {
    background: #d4edda;
    color: #155724;
}

.history-status.error {
    background: #f8d7da;
    color: #721c24;
}

.history-status.running {
    background: #fff3cd;
    color: #856404;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: fit-content;
    min-width: 60%;
    max-width: 98%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
}

.progress-log {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #495057;
    border: 1px solid #e9ecef;
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* Table Styles for Statistics */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
}

.stats-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stats-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.stats-table tbody tr:hover {
    background: #f7fafc;
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    
    .header {
        margin-bottom: 15px;
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header p {
        font-size: 0.9rem;
    }
    
    .scripts-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        margin-bottom: 5px;
    }
    
    /* Modal optimization for mobile */
    .modal {
        padding: 0;
    }
    
    .modal-content {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-height: 100vh !important;
        height: 100vh;
    }
    
    .modal-header {
        padding: 12px 15px;
        border-radius: 0 !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .modal-header h3 {
        font-size: 0.95rem;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .modal-body {
        padding: 10px;
        overflow-x: hidden;
    }
    
    /* Table responsiveness for mobile */
    .table-wrapper {
        margin: 10px -10px;
        border-radius: 0;
        box-shadow: none;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .table-wrapper::before {
        content: '← Scorri orizzontalmente →';
        display: block;
        text-align: center;
        padding: 6px;
        background: #667eea;
        color: white;
        font-size: 0.7rem;
        font-weight: 600;
        position: sticky;
        left: 0;
        z-index: 5;
    }
    
    .stats-table {
        min-width: 100%;
        font-size: 0.7rem;
        width: max-content;
    }
    
    .stats-table th,
    .stats-table td {
        padding: 6px 8px;
        font-size: 0.7rem;
        white-space: nowrap;
    }
    
    .stats-table th {
        font-size: 0.65rem;
        text-transform: uppercase;
        padding: 8px 4px !important;
    }
    
    .stats-table td {
        padding: 8px 4px !important;
    }
    
    /* Prima colonna leggermente più larga */
    .stats-table td:first-child,
    .stats-table th:first-child {
        padding-left: 8px !important;
        padding-right: 8px !important;
        min-width: 80px;
    }
    
    /* Numeri allineati a destra compatti */
    .stats-table td[style*="text-align: right"] {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
    
    /* Ottimizzazione box stats */
    .modal-body > div {
        margin-bottom: 15px;
    }
    
    .modal-body h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
        padding: 0 5px;
    }
    
    .modal-body h2 {
        font-size: 1.1rem;
        padding: 0 5px;
    }
    
    /* Statistiche riepilogo */
    .modal-body > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 0 5px !important;
    }
    
    .modal-body > div > div[style*="padding"] {
        padding: 10px !important;
        font-size: 0.8rem !important;
    }
    
    /* Ottimizzazione icone e testi inline */
    .modal-body i {
        font-size: 0.9rem;
    }
    
    /* Box riepiloghi compatti */
    .modal-body > div > div[style*="background"] {
        margin-bottom: 8px !important;
    }
    
    /* Script cards ottimizzati per mobile */
    .script-card {
        padding: 15px;
    }
    
    .script-header h3 {
        font-size: 1.1rem;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-input {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .execute-btn {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    /* Search bar mobile */
    .search-section {
        padding: 15px 10px;
        margin-bottom: 15px;
    }
    
    .search-input {
        padding: 12px 45px 12px 40px;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 12px;
        font-size: 1rem;
    }
    
    .search-clear {
        right: 10px;
        font-size: 1rem;
    }
    
    .search-results-info {
        font-size: 0.85rem;
        padding: 8px;
        margin-top: 10px;
    }
    
    .results-header,
    .history-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .filter-controls,
    .history-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== FOOTER MINIMALE MODERNO ===== */
.footer-minimal {
    background: linear-gradient(180deg, #1a1f2e 0%, #0f1419 100%);
    color: white;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.footer-minimal-wave {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: -1px;
}

.footer-minimal-wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footer-minimal-content {
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-minimal-left {
    flex: 1;
    min-width: 250px;
}

.footer-minimal-copyright {
    margin: 0;
    color: #cbd5e0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-minimal-copyright i {
    color: #667eea;
    font-size: 1.1rem;
}

.footer-minimal-copyright strong {
    color: #fff;
}

.footer-minimal-center {
    display: flex;
    gap: 25px;
    align-items: center;
}

.footer-minimal-center a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.footer-minimal-center a:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.footer-minimal-center a i {
    font-size: 0.85rem;
}

.footer-minimal-right {
    display: flex;
    gap: 12px;
}

.footer-minimal-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #cbd5e0;
    white-space: nowrap;
}

.footer-minimal-badge i {
    color: #667eea;
    font-size: 0.85rem;
}

/* Responsive Footer Minimale */
@media (max-width: 968px) {
    .footer-minimal-content {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .footer-minimal-left,
    .footer-minimal-center,
    .footer-minimal-right {
        width: 100%;
        justify-content: center;
    }

    .footer-minimal-copyright {
        justify-content: center;
    }

    .footer-minimal-center {
        flex-wrap: wrap;
    }
}

/* ==================== EXCEL DOWNLOAD BUTTON ==================== */

.excel-download-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.btn-download-excel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #1D6F42 0%, #2D7E54 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 111, 66, 0.3);
}

.btn-download-excel:hover {
    background: linear-gradient(135deg, #2D7E54 0%, #3D9E64 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 111, 66, 0.4);
}

.btn-download-excel:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(29, 111, 66, 0.3);
}

.btn-download-excel i {
    font-size: 1.2rem;
    color: #90EE90;
}

/* Animazione pulse per il pulsante Excel */
@keyframes pulse-excel {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(29, 111, 66, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(29, 111, 66, 0.5);
    }
}

.btn-download-excel:hover {
    animation: pulse-excel 2s infinite;
}

/* ==================== CAPTCHA MODAL ==================== */

.captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.captcha-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.captcha-modal-header {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    padding: 20px;
    border-radius: 16px 16px 0 0;
}

.captcha-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.captcha-modal-body {
    padding: 30px;
}

.captcha-modal-body p {
    color: #64748b;
    margin-bottom: 15px;
    line-height: 1.6;
}

.captcha-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
}

.captcha-modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.captcha-modal-buttons button {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.captcha-error {
    padding: 10px;
    background: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
