/**
 * Frontend CSS per Zelania Campaign Plugin
 * File: assets/css/frontend.css
 */

/* ===== RESET E BASE ===== */
.wizardcampagne-container * {
    box-sizing: border-box;
}

.wizardcampagne-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ===== UTILITÀ ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.sr-only { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px; 
    overflow: hidden; 
    clip: rect(0,0,0,0); 
    border: 0; 
}

/* ===== TIPOGRAFIA ===== */
.wizardcampagne-container h1, .wizardcampagne-container h2, .wizardcampagne-container h3, 
.wizardcampagne-container h4, .wizardcampagne-container h5, .wizardcampagne-container h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
}

.wizardcampagne-container h1 { font-size: 2.5rem; }
.wizardcampagne-container h2 { font-size: 2rem; }
.wizardcampagne-container h3 { font-size: 1.75rem; }
.wizardcampagne-container h4 { font-size: 1.5rem; }
.wizardcampagne-container h5 { font-size: 1.25rem; }
.wizardcampagne-container h6 { font-size: 1rem; }

.wizardcampagne-container p {
    margin: 0 0 1rem 0;
}

/* ===== LAYOUT ===== */
.wizardcampagne-grid {
    display: grid;
    gap: 1rem;
}

.wizardcampagne-grid-2 { grid-template-columns: repeat(2, 1fr); }
.wizardcampagne-grid-3 { grid-template-columns: repeat(3, 1fr); }
.wizardcampagne-grid-4 { grid-template-columns: repeat(4, 1fr); }

.wizardcampagne-flex {
    display: flex;
    gap: 1rem;
}

.flex-center { align-items: center; }
.flex-between { justify-content: space-between; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

/* ===== CARDS ===== */
.wizardcampagne-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wizardcampagne-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.wizardcampagne-card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.wizardcampagne-card-body {
    margin-bottom: 1rem;
}

.wizardcampagne-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* ===== BUTTONS ===== */
.wizardcampagne-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    user-select: none;
}

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

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

.wizardcampagne-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button variants */
.wizardcampagne-btn-primary {
    background: linear-gradient(135deg, #2c5aa0, #1e3a6f);
    color: #fff;
}

.wizardcampagne-btn-primary:hover {
    background: linear-gradient(135deg, #1e3a6f, #2c5aa0);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.wizardcampagne-btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: #fff;
}

.wizardcampagne-btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
}

.wizardcampagne-btn-success:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.wizardcampagne-btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
}

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

.wizardcampagne-btn-outline {
    background: transparent;
    border: 2px solid #2c5aa0;
    color: #2c5aa0;
}

.wizardcampagne-btn-outline:hover {
    background: #2c5aa0;
    color: #fff;
}

/* Button sizes */
.wizardcampagne-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.wizardcampagne-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.wizardcampagne-btn-block {
    width: 100%;
    justify-content: center;
}

/* Loading state */
.wizardcampagne-btn.loading {
    position: relative;
    color: transparent;
}

.wizardcampagne-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
    color: inherit;
}

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

/* ===== FORMS ===== */
.wizardcampagne-form {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wizardcampagne-form-group {
    margin-bottom: 1.5rem;
}

.wizardcampagne-form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.wizardcampagne-form-label.required::after {
    content: ' *';
    color: #dc3545;
}

.wizardcampagne-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.wizardcampagne-form-control:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.wizardcampagne-form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.wizardcampagne-form-control.success {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.field-error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.wizardcampagne-form-help {
    display: block;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Checkboxes e Radio */
.wizardcampagne-checkbox,
.wizardcampagne-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.wizardcampagne-checkbox input,
.wizardcampagne-radio input {
    width: auto;
    margin: 0.25rem 0 0 0;
    cursor: pointer;
}

.wizardcampagne-checkbox label,
.wizardcampagne-radio label {
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Select personalizzato */
.wizardcampagne-select {
    position: relative;
}

.wizardcampagne-select select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* File upload */
.wizardcampagne-file-upload {
    position: relative;
    display: inline-block;
}

.wizardcampagne-file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizardcampagne-file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wizardcampagne-file-upload-btn:hover {
    border-color: #2c5aa0;
    background: #f0f6fc;
}

.wizardcampagne-file-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.wizardcampagne-file-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

/* ===== PROGRESS BAR ===== */
.wizardcampagne-progress {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin: 1rem 0;
}

.wizardcampagne-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.5s ease;
    border-radius: 6px;
    position: relative;
}

.wizardcampagne-progress-bar.animated {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 1rem 0; }
}

.wizardcampagne-progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ===== BADGES E TAGS ===== */
.wizardcampagne-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.wizardcampagne-badge-primary { background: #2c5aa0; }
.wizardcampagne-badge-secondary { background: #6c757d; }
.wizardcampagne-badge-success { background: #28a745; }
.wizardcampagne-badge-danger { background: #dc3545; }
.wizardcampagne-badge-warning { background: #ffc107; color: #212529; }
.wizardcampagne-badge-info { background: #17a2b8; }

/* ===== MODALS ===== */
.wizardcampagne-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.wizardcampagne-modal.active {
    display: flex;
}

.wizardcampagne-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wizardcampagne-modal.active .wizardcampagne-modal-content {
    transform: scale(1);
}

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

.wizardcampagne-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.wizardcampagne-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.wizardcampagne-modal-close:hover {
    background: #f8f9fa;
}

.wizardcampagne-modal-body {
    padding: 1.5rem;
}

.wizardcampagne-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ===== NOTIFICATIONS ===== */
.wizardcampagne-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #2c5aa0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

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

.wizardcampagne-notification.success {
    border-left-color: #28a745;
}

.wizardcampagne-notification.error {
    border-left-color: #dc3545;
}

.wizardcampagne-notification.warning {
    border-left-color: #ffc107;
}

.wizardcampagne-notification-message {
    flex: 1;
}

.wizardcampagne-notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== TOOLTIPS ===== */
.wizardcampagne-tooltip {
    position: absolute;
    z-index: 1000;
    padding: 0.5rem 0.75rem;
    background: #333;
    color: #fff;
    font-size: 0.875rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.wizardcampagne-tooltip.show {
    opacity: 1;
}

.wizardcampagne-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* ===== TABS ===== */
.wizardcampagne-tabs {
    margin-bottom: 1.5rem;
}

.wizardcampagne-tabs-nav {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.wizardcampagne-tab-button {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.wizardcampagne-tab-button.active {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
}

.wizardcampagne-tab-button:hover {
    color: #2c5aa0;
}

.wizardcampagne-tab-content {
    display: none;
}

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

/* ===== LOADING STATES ===== */
.wizardcampagne-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.wizardcampagne-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.wizardcampagne-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

.wizardcampagne-skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.wizardcampagne-skeleton-text:last-child {
    width: 60%;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== ACCORDIONS ===== */
.wizardcampagne-accordion {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.wizardcampagne-accordion-item {
    border-bottom: 1px solid #e9ecef;
}

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

.wizardcampagne-accordion-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    user-select: none;
}

.wizardcampagne-accordion-header:hover {
    background: #e9ecef;
}

.wizardcampagne-accordion-header.active {
    background: #e9ecef;
}

.wizardcampagne-accordion-icon {
    transition: transform 0.3s ease;
}

.wizardcampagne-accordion-header.active .wizardcampagne-accordion-icon {
    transform: rotate(180deg);
}

.wizardcampagne-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.wizardcampagne-accordion-content.active {
    max-height: 500px;
}

.wizardcampagne-accordion-body {
    padding: 1.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .wizardcampagne-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .wizardcampagne-container {
        padding: 0 1rem;
    }
    
    .wizardcampagne-grid-3,
    .wizardcampagne-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wizardcampagne-modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 768px) {
    .wizardcampagne-container h1 { font-size: 2rem; }
    .wizardcampagne-container h2 { font-size: 1.75rem; }
    .wizardcampagne-container h3 { font-size: 1.5rem; }
    
    .wizardcampagne-grid-2,
    .wizardcampagne-grid-3,
    .wizardcampagne-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .wizardcampagne-flex {
        flex-direction: column;
    }
    
    .wizardcampagne-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .wizardcampagne-btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .wizardcampagne-tabs-nav {
        flex-wrap: wrap;
    }
    
    .wizardcampagne-modal-footer {
        flex-direction: column;
    }
    
    .wizardcampagne-notification {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

@media (max-width: 576px) {
    .wizardcampagne-form {
        padding: 1rem;
    }
    
    .wizardcampagne-card {
        padding: 1rem;
    }
    
    .wizardcampagne-modal-header,
    .wizardcampagne-modal-body {
        padding: 1rem;
    }
    
    .wizardcampagne-btn {
        width: 100%;
        justify-content: center;
    }
    
    .wizardcampagne-btn:not(.wizardcampagne-btn-block) {
        width: auto;
    }
}

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

.wizardcampagne-container :focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

.wizardcampagne-container :focus:not(:focus-visible) {
    outline: none;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .wizardcampagne-card {
        border: 2px solid #000;
    }
    
    .wizardcampagne-btn {
        border: 2px solid currentColor;
    }
    
    .wizardcampagne-form-control {
        border: 2px solid #000;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .wizardcampagne-container {
        color: #e9ecef;
    }
    
    .wizardcampagne-card {
        background: #2d3748;
        border-color: #4a5568;
        color: #e9ecef;
    }
    
    .wizardcampagne-form-control {
        background: #2d3748;
        border-color: #4a5568;
        color: #e9ecef;
    }
    
    .wizardcampagne-form-control:focus {
        border-color: #63b3ed;
    }
    
    .wizardcampagne-modal-content {
        background: #2d3748;
        color: #e9ecef;
    }
    
    .wizardcampagne-notification {
        background: #2d3748;
        color: #e9ecef;
    }
}

i/* ===== CAMPAIGN FORM STYLES ===== */
.wizardcampagne-campaign-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.wizardcampagne-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.wizardcampagne-form-header h2 {
    color: #2c5aa0;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.form-step {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-step.active {
    display: block;
}

.form-step h3 {
    color: #2c5aa0;
    border-bottom: 3px solid #ffd700;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.form-row {
    margin-bottom: 25px;
}

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

.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3a6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.preview-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-outline {
    padding: 8px 16px;
    border: 2px solid #2c5aa0;
    background: transparent;
    color: #2c5aa0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-outline:hover {
    background: #2c5aa0;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
}

/* ========================================
   DASHBOARD - MODAL STYLES
   ======================================== */

.wc-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.wc-modal {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

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

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

.wc-modal-header h3 {
    margin: 0;
    font-size: 24px;
    color: #111827;
}

.wc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.wc-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.wc-modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

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

/* ========================================
   FORM MODIFICA CAMPAGNA
   ======================================== */

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

.wc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.wc-form-group input[type="text"],
.wc-form-group input[type="number"],
.wc-form-group select,
.wc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.wc-form-group input:focus,
.wc-form-group select:focus,
.wc-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wc-form-group textarea {
    min-height: 120px;
    resize: vertical;
}

#edit-image-preview {
    margin-top: 10px;
}

#edit-image-preview img {
    max-width: 200px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

/* ========================================
   STATISTICHE
   ======================================== */

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

.wc-stat-card {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.wc-stat-card.wc-full-width {
    grid-column: 1 / -1;
}

.wc-stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.wc-progress-bar {
    width: 100%;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0 10px 0;
}

.wc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.5s ease;
    border-radius: 15px;
}

/* ========================================
   TIMELINE / GRAFICO
   ======================================== */

.wc-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 150px;
    padding: 20px 0;
    gap: 10px;
}

.wc-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.wc-bar {
    width: 100%;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border-radius: 4px 4px 0 0;
    min-height: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wc-bar:hover {
    opacity: 0.8;
}

.wc-bar-label {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

/* ========================================
   TABELLA DONATORI
   ======================================== */

.wc-donors-list {
    overflow-x: auto;
}

.wc-table {
    width: 100%;
    border-collapse: collapse;
}

.wc-table thead {
    background: #f9fafb;
}

.wc-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.wc-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
}

.wc-table tbody tr:hover {
    background: #f9fafb;
}

/* ========================================
   AGGIORNAMENTI
   ======================================== */

.wc-update-form {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
}

.wc-updates-list {
    max-height: 400px;
    overflow-y: auto;
}

.wc-update-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.wc-update-item h4 {
    margin: 0 0 5px 0;
    color: #111827;
    font-size: 18px;
}

.wc-update-date {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px 0;
}

.wc-update-item p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

/* ========================================
   MESSAGGI VUOTI
   ======================================== */

.wc-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */

#wc-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.wc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

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

@media (max-width: 768px) {
    .wc-modal {
        margin: 20px auto;
    }

    .wc-modal-header,
    .wc-modal-body,
    .wc-modal-footer {
        padding: 20px;
    }

    .wc-stats-grid {
        grid-template-columns: 1fr;
    }

    .wc-table {
        font-size: 14px;
    }

    .wc-table th,
    .wc-table td {
        padding: 8px 10px;
    }
}
