/* ===== STILI GLOBALI ===== */

/* Background generale dell'applicazione */
body {
    background-color: #f4f5f5;
}

/* ===== SEZIONE CANALI MARKETING ===== */
.channels-section {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Variabili CSS personalizzate */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.15s ease-in-out;
}

/* ===== NAVBAR ===== */
.navbar-brand {
    font-weight: 600;
}

.user-info {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.dropdown-header {
    font-weight: 600;
    color: #495057;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
    border: none;
    box-shadow: var(--box-shadow);
}

.navbar-nav .dropdown-item {
    transition: var(--transition);
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--light-color);
}

.badge {
    font-size: 0.7rem;
}

/* Responsive navbar */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        border: none;
        background-color: transparent;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .navbar-nav .dropdown-item:hover {
        color: white;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    border: 1px solid #dee2e6;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* ===== PAGINATION STYLES ===== */
.pagination-sm .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.pagination-sm .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination-sm .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* ===== EXCHANGE RATES PAGE ===== */
.exchange-rates-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.exchange-rates-table td {
    color: #212529;
    vertical-align: middle;
}

.exchange-rates-badge {
    font-size: 0.875em;
    font-weight: 500;
}

.exchange-rates-text-muted {
    color: #6c757d !important;
}

.exchange-rates-card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.exchange-rates-btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.exchange-rates-btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.breadcrumb-item.active {
    color: var(--secondary-color);
    font-weight: 500;
}

.breadcrumb-item i {
    margin-right: 0.25rem;
}

/* Responsive breadcrumb */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .breadcrumb-item {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ===== CARD E COMPONENTI ===== */
.card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.config-card {
    border-left: 4px solid var(--primary-color);
}

.log-card {
    border-left: 4px solid var(--success-color);
}

/* ===== TABELLE ===== */

/* Stile per i titoli della tabella in execution_details */
.table-dark th {
    color: white !important;
    font-weight: 600;
    text-align: center;
}

.table-dark thead {
    background-color: #343a40;
}

.table {
    font-size: 0.9rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.success-row {
    background-color: #d4edda;
}

.error-row {
    background-color: #f8d7da;
}

/* ===== PREZZI E VARIAZIONI ===== */
.price-change-positive {
    color: var(--danger-color);
    font-weight: bold;
}

.price-change-negative {
    color: var(--success-color);
    font-weight: bold;
}

.price-change-neutral {
    color: var(--secondary-color);
}

/* ===== FORM E INPUT ===== */
.time-input {
    max-width: 80px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* ===== STATUS INDICATORS ===== */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-active {
    background-color: var(--success-color);
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
}

.status-inactive {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* ===== LOG STYLES ===== */
.log-container {
    max-height: 400px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.log-entry {
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.log-timestamp {
    color: #6c757d;
    font-weight: bold;
    margin-right: 0.5rem;
}

.log-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.log-message {
    color: #212529;
}

/* ===== IMMAGINI ===== */
.product-image {
    max-width: 80px;
    max-height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.product-image-large {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* ===== UTILITY CLASSES ===== */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PRODUCT DETAIL STYLES ===== */
.product-price-info p small{
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-price-info p strong {
    font-weight: 600;
    color: #495057;
}

/* ===== PRODUCTS TABLE STYLES ===== */
.products-table {
    font-size: 0.8rem;
}

.products-table th,
.products-table td {
    padding: 0.5rem 0.25rem;
    vertical-align: middle;
}

.products-table .product-image {
    max-width: 60px;
    max-height: 60px;
}



.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== LOADING STATES ===== */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .log-container {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}

/* ===== REPORT STYLES ===== */
.report-card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.report-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-top: none;
}

.report-alert {
    border-radius: 0.5rem;
}

/* Report specific price changes */
.report-price-change-positive {
    color: #d63384;
    font-weight: bold;
}

.report-price-change-negative {
    color: #198754;
    font-weight: bold;
}

.report-price-change-neutral {
    color: #6c757d;
    font-weight: bold;
}

/* Report specific row styles */
.report-success-row {
    background-color: #f8f9fa;
}

.report-error-row {
    background-color: #fff5f5;
}

.report-success-row:hover {
    background-color: #e9ecef;
}

.report-error-row:hover {
    background-color: #ffe6e6;
}

/* ===== CRONJOB STATUS STYLES ===== */
.cronjob-status .card {
    transition: all 0.3s ease;
}

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

.cronjob-status .status-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin: 0 auto;
}

.cronjob-status .status-indicator.running {
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.cronjob-status .status-indicator.stopped {
    background-color: #dc3545;
}

.cronjob-status .status-indicator.external {
    background-color: #6c757d;
}

.cronjob-status .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.cronjob-status .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.cronjob-status .btn {
    transition: all 0.2s ease;
}

.cronjob-status .btn:hover {
    transform: translateY(-1px);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .btn,
    .dropdown-menu {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6;
        box-shadow: none;
    }
    
    .table {
        font-size: 0.8rem;
    }
}

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

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

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.running {
    background-color: #28a745;
    animation: pulse 1.5s infinite;
}

.status-indicator.stopped {
    background-color: #dc3545;
}

.status-indicator.completed {
    background-color: #17a2b8;
}

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

/* Current Activity Styling */
#currentActivity {
    font-weight: 500;
    color: #495057;
}

/* Price Change Indicators */
.price-change-positive {
    color: #28a745;
    font-weight: bold;
}

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

.price-change-neutral {
    color: #6c757d;
    font-weight: bold;
}

/* Success and Error Rows */
.success-row {
    background-color: rgba(40, 167, 69, 0.05);
}

.error-row {
    background-color: rgba(220, 53, 69, 0.05);
}

.success-row:hover {
    background-color: rgba(40, 167, 69, 0.1);
}

.error-row:hover {
    background-color: rgba(220, 53, 69, 0.1);
} 

/* Responsive table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem 0.25rem;
    }
}

/* ===== PREZZI BARRATI PER OFFERTE ===== */
.price-strikethrough {
    text-decoration: line-through;
    color: #474d54;
    opacity: 0.7;
}

.price-offer {
    color: #052c65;
}

.price-offer-error {
    color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.price-offer-badge {
    background-color: #dc3545;
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* ===== VISUALIZZAZIONE COMPATTA STOCK ===== */
.stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stock-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.stock-item small {
    min-width: 50px;
    font-weight: 500;
}

.stock-item .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* ===== TAG SOTTO IL NOME PRODOTTO ===== */
.product-name-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-tag {
    font-size: 9px;
    padding: 0.15rem 0.3rem;
    border-radius: 0.2rem;
    display: inline-block;
    max-width: fit-content;
}

/* ===== VISUALIZZAZIONE PREZZI COMPATTA ===== */
.price-container {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.price-excl {
    font-size: 0.7rem;
    color: #6c757d;
    line-height: 1.1;
    margin-bottom: 10px;
}

.price-incl {
    font-size: 1rem;
    line-height: 1.1;
    margin-bottom: 8px;
}

.price-incl strong {
    font-weight: 600;
}

/* Recently Updated Badge */
.recently-updated-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
}

/* Motivo Offerta */
.motivo-offerta {
    font-size: 0.75rem;
    color: #46627a;
    margin-top: 0.25rem;
    line-height: 1.2;
}

/* Price Margin */
.price-margin {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.2;
}

/* Colori margini basati sui valori percentuali */
.margin-negative {
    color: #dc3545; /* Rosso per 0 o negativo */
    font-weight: bold;
}

.margin-low {
    color: #dc2626; /* Arancione scuro, tendente al rosso -> maggiore di 0 fino a 5 */
    font-weight: bold;
}

.margin-medium-low {
    color: #ea580c; /* Arancione da 5 a 15 */
    font-weight: bold;
}

.margin-medium {
    color: #f97316; /* Arancione chiaro da 15 a 20 */
    font-weight: bold;
}

.margin-good {
    color: #16a34a; /* Verde da 20 a 25 */
    font-weight: bold;
}

.margin-excellent {
    color: #15803d; /* Verde scuro sopra 25 */
    font-weight: bold;
}

/* Prezzi IVA Inclusa - Simbolo € e decimali ridotti */
.price-symbol {
    font-size: 0.8em;
    opacity: 0.8;
}

.price-decimals {
    font-size: 0.75em;
    opacity: 0.7;
} 

/* ===== BUG REPORT FLY-IN ===== */
#bug-report-flyin {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bug-report-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: var(--transition);
    position: relative;
    animation: bug-pulse 2s infinite;
}

@keyframes bug-pulse {
    0% {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.5), 0 0 0 10px rgba(0, 123, 255, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }
}

.bug-report-toggle:hover {
    background: #0056b3;
    transform: scale(1.05);
    animation: none; /* Ferma l'animazione al hover */
}

/* Opzione per disabilitare l'animazione */
.bug-report-toggle.no-pulse {
    animation: none;
}

.bug-report-toggle i {
    color: white;
    font-size: 24px;
}

.bug-report-toggle i.fa-bug {
    font-size: 26px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color: #fff;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Icona 2D personalizzata in stile con il sito */
.bug-report-toggle i.fa-bug::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15h2v2h-2v-2zm0-8h2v6h-2V9z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.bug-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.bug-report-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.bug-report-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.bug-report-panel.minimized {
    height: 50px;
    overflow: hidden;
}

.bug-report-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bug-report-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.bug-report-header i {
    margin-right: 8px;
}

.bug-report-controls {
    display: flex;
    gap: 5px;
}

.bug-report-controls .btn {
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.bug-report-controls .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.bug-report-content {
    padding: 0;
}

.bug-report-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #f8f9fa;
}

.tab-content {
    max-height: 500px;
    overflow-y: auto;
}

/* Rimuovi altezza massima e scroll per la sezione canali */
.channels-section .tab-content {
    max-height: none;
    overflow-y: visible;
}

/* ===== MEDIA SELECTOR MODAL ===== */
.media-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

.media-card.border-primary {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.media-thumbnail {
    height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.media-thumbnail img,
.media-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-preview {
    min-height: 100px;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    border-radius: 0.375rem;
}

/* ===== MEDIA PREVIEW RESPONSIVE GRID ===== */
.media-preview-grid {
    display: grid;
    gap: 0.75rem;
    width: 100%;
}

/* Per 1 media: 1 colonna */
.media-preview-grid[data-count="1"] {
    grid-template-columns: 1fr;
    max-width: 200px;
}

/* Per 2 media: 2 colonne */
.media-preview-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
}

/* Per 3 media: 3 colonne */
.media-preview-grid[data-count="3"] {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
}

/* Per 4 media: 4 colonne */
.media-preview-grid[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
    max-width: 800px;
}

/* Per 5 media: 5 colonne */
.media-preview-grid[data-count="5"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Per 6 media: 5 colonne (massimo per riga) */
.media-preview-grid[data-count="6"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Per 7 media: 5 colonne */
.media-preview-grid[data-count="7"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Per 8 media: 5 colonne */
.media-preview-grid[data-count="8"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Per 9 media: 5 colonne */
.media-preview-grid[data-count="9"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Per 10 media: 5 colonne */
.media-preview-grid[data-count="10"] {
    grid-template-columns: repeat(5, 1fr);
    max-width: 1000px;
}

/* Media preview item */
.media-preview-item {
    position: relative;
    border-radius: 0.375rem;
    overflow: hidden;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.media-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-preview-item .media-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.media-preview-item:hover .media-info {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .media-preview-grid {
        gap: 0.5rem;
    }
    
    /* Su mobile, limita a massimo 3 colonne per riga */
    .media-preview-grid[data-count="1"] {
        grid-template-columns: 1fr;
        max-width: 150px;
    }
    
    .media-preview-grid[data-count="2"] {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .media-preview-grid[data-count="3"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 450px;
    }
    
    .media-preview-grid[data-count="4"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 450px;
    }
    
    .media-preview-grid[data-count="5"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 450px;
    }
    
    .media-preview-grid[data-count="6"],
    .media-preview-grid[data-count="7"],
    .media-preview-grid[data-count="8"],
    .media-preview-grid[data-count="9"],
    .media-preview-grid[data-count="10"] {
        grid-template-columns: repeat(3, 1fr);
        max-width: 450px;
    }
}

/* ===== MEDIA DIMENSION WARNING ===== */
.media-dimension-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.media-dimension-warning .warning-icon {
    color: #856404;
    margin-right: 0.5rem;
}

.media-dimension-warning .warning-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.25rem;
}

.media-dimension-warning .warning-details {
    color: #856404;
    margin-bottom: 0.5rem;
}

.media-dimension-warning .required-sizes {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.media-dimension-warning .size-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.media-dimension-warning .size-item:last-child {
    border-bottom: none;
}

.media-dimension-warning .size-name {
    font-weight: 500;
    color: #495057;
}

.media-dimension-warning .size-dimensions {
    color: #6c757d;
    font-size: 0.8rem;
}

.media-dimension-warning .size-status {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.media-dimension-warning .size-status.match {
    background-color: #d4edda;
    color: #155724;
}

.media-dimension-warning .size-status.mismatch {
    background-color: #f8d7da;
    color: #721c24;
}

.media-dimension-warning .size-status.partial {
    background-color: #fff3cd;
    color: #856404;
}

.tab-pane {
    display: none;
    padding: 20px;
}

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

/* Form styles */
#bug-report-form .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

#bug-report-form .form-control,
#bug-report-form .form-select {
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: var(--transition);
}

#bug-report-form .form-control:focus,
#bug-report-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#bug-report-form .btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: var(--transition);
}

#bug-report-form .btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Reports list styles */
.bug-reports-list {
    max-height: 400px;
    overflow-y: auto;
}

.bug-report-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.bug-report-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bug-report-item-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.bug-report-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    flex: 1;
    margin-right: 10px;
}

.bug-report-badges {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.bug-report-badges .badge {
    font-size: 10px;
    padding: 2px 6px;
}

.bug-report-item-body {
    padding: 12px 16px;
}

.bug-report-description {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.bug-report-meta {
    margin-bottom: 8px;
}

.bug-report-meta small {
    font-size: 11px;
}

.bug-report-meta i {
    margin-right: 4px;
    margin-left: 8px;
}

.bug-report-meta i:first-child {
    margin-left: 0;
}

.bug-report-resolution {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
}

.bug-report-resolution strong {
    color: var(--success-color);
    font-size: 12px;
}

.bug-report-resolution p {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .bug-report-panel {
        width: 320px;
        right: -10px;
    }
    
    .bug-report-toggle {
        width: 50px;
        height: 50px;
    }
    
    .bug-report-toggle i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .bug-report-panel {
        width: calc(100vw - 40px);
        right: -20px;
    }
    
    #bug-report-flyin {
        right: 10px;
        bottom: 10px;
    }
}

/* ===== TEMPLATE LOAD BUTTON STYLES ===== */
.template-load-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.template-load-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.template-load-btn i {
    font-size: 0.875rem;
}

.template-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.template-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.template-card.selected {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}

.template-card .card-body {
    padding: 1rem;
}

.template-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.template-card .card-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.template-card .badge {
    font-size: 0.7rem;
}

/* ===== PREVIEW SYSTEM STYLES ===== */

/* Base preview styles */
.preview-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    min-height: 400px;
}

.preview-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.preview-refresh-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Blog Article Preview */
.blog-article-preview {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-header {
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-content {
    padding: 2rem;
}

.article-excerpt {
    font-size: 1.1rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.article-body {
    line-height: 1.7;
    color: #333;
}

.article-body h2 {
    color: #495057;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    color: #6c757d;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.author-info h3 {
    color: #495057;
    margin-bottom: 1rem;
}

.author-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

.comments-section {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.comments-section h3 {
    color: #495057;
    margin-bottom: 1.5rem;
}

.comment {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.comment strong {
    color: #495057;
}

.comment p {
    margin: 0.5rem 0;
    color: #6c757d;
}

.comment small {
    color: #adb5bd;
}

/* Newsletter Preview */
.newsletter-preview {
    max-width: 600px;
    margin: 0 auto;
}

.email-container {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.email-header {
    background: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9rem;
}

.email-sender {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.email-subject {
    color: #6c757d;
}

.email-body {
    padding: 2rem;
}

.email-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1.5rem;
    text-align: center;
}

.email-title {
    font-size: 2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
    text-align: center;
}

.email-content {
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
}

.email-cta {
    text-align: center;
    margin: 2rem 0;
}

.cta-button {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.email-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

.email-footer p {
    margin: 0.25rem 0;
}

.email-footer a {
    color: #007bff;
    text-decoration: none;
}

/* Lab Preview */
.lab-preview {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lab-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.lab-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.lab-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.lab-content {
    padding: 2rem;
}

.lab-main {
    line-height: 1.7;
    color: #333;
    margin-bottom: 2rem;
}

.lab-specs {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #ff6b6b;
}

.lab-specs h3 {
    color: #495057;
    margin-bottom: 1rem;
}

.lab-specs ul {
    margin: 0;
    padding-left: 1.5rem;
}

.lab-specs li {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* Generic Preview */
.generic-preview {
    max-width: 600px;
    margin: 0 auto;
}

.preview-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

.preview-content {
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
}

.preview-meta {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
}

/* ===== SOCIAL MEDIA PREVIEW STYLES ===== */

/* Instagram Post Preview */
.instagram-post-preview {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ig-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dbdbdb;
}

.ig-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.ig-profile-info {
    flex: 1;
}

.ig-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #262626;
}

.ig-location {
    font-size: 0.8rem;
    color: #8e8e8e;
}

.ig-content {
    position: relative;
}

.ig-image {
    aspect-ratio: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-image-placeholder {
    font-size: 3rem;
    color: #8e8e8e;
}

.ig-actions {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.ig-action-btn {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.ig-action-btn:hover {
    transform: scale(1.1);
}

.ig-caption {
    padding: 0 1rem 1rem;
}

.ig-caption-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #262626;
    margin-bottom: 0.5rem;
}

.ig-hashtags {
    font-size: 0.9rem;
    color: #00376b;
}

/* Instagram Reel Preview */
.instagram-reel-preview {
    max-width: 300px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ig-reel-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dbdbdb;
}

.ig-follow-btn {
    background: #0095f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
    cursor: pointer;
}

.ig-reel-content {
    position: relative;
}

.ig-reel-video {
    aspect-ratio: 9/16;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ig-reel-placeholder {
    font-size: 4rem;
    color: white;
}

.ig-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.ig-reel-actions {
    position: absolute;
    right: 0.75rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ig-reel-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.ig-reel-action div:first-child {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.ig-reel-action div:last-child {
    font-size: 0.8rem;
    font-weight: 600;
}

.ig-reel-caption {
    padding: 1rem;
    background: white;
}

/* Facebook Post Preview */
.facebook-post-preview {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid #dadde1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fb-header {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.fb-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.fb-profile-info {
    flex: 1;
}

.fb-page-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1c1e21;
}

.fb-post-time {
    font-size: 0.8rem;
    color: #65676b;
}

.fb-content {
    padding: 0 1rem;
}

.fb-post-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1c1e21;
    margin-bottom: 1rem;
}

.fb-post-image {
    margin: 0 -1rem 1rem;
}

.fb-image-placeholder {
    aspect-ratio: 16/9;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #8e8e8e;
}

.fb-actions {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid #dadde1;
    gap: 1rem;
}

.fb-action-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #65676b;
    cursor: pointer;
    transition: background-color 0.2s;
}

.fb-action-btn:hover {
    background: #f0f0f0;
}

/* Facebook Reel Preview */
.facebook-reel-preview {
    max-width: 300px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fb-reel-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dadde1;
}

.fb-reel-content {
    position: relative;
}

.fb-reel-video {
    aspect-ratio: 9/16;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fb-reel-placeholder {
    font-size: 4rem;
    color: white;
}

.fb-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.fb-reel-caption {
    padding: 1rem;
    background: white;
}

.fb-caption-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #1c1e21;
}

/* Twitter Post Preview */
.twitter-post-preview {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tw-header {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.tw-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.tw-profile-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tw-display-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #14171a;
}

.tw-username {
    font-size: 0.9rem;
    color: #657786;
}

.tw-post-time {
    font-size: 0.9rem;
    color: #657786;
    margin-left: auto;
}

.tw-content {
    padding: 0 1rem 1rem;
}

.tw-tweet-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #14171a;
    margin-bottom: 1rem;
}

.tw-actions {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e1e8ed;
    gap: 1rem;
}

.tw-action-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #657786;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tw-action-btn:hover {
    background: #f7f9fa;
}

/* LinkedIn Post Preview */
.linkedin-post-preview {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.li-header {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.li-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.li-profile-info {
    flex: 1;
}

.li-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #000000;
}

.li-title {
    font-size: 0.8rem;
    color: #666666;
}

.li-post-time {
    font-size: 0.8rem;
    color: #666666;
}

.li-content {
    padding: 0 1rem 1rem;
}

.li-post-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #000000;
    margin-bottom: 1rem;
}

.li-actions {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e0e0e0;
    gap: 1rem;
}

.li-action-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #666666;
    cursor: pointer;
    transition: background-color 0.2s;
}

.li-action-btn:hover {
    background: #f3f2ef;
}

/* YouTube Video Preview */
.youtube-video-preview {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.yt-video {
    aspect-ratio: 16/9;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.yt-video-placeholder {
    font-size: 4rem;
    color: white;
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.yt-info {
    padding: 1rem;
}

.yt-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f0f0f;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.yt-channel {
    font-size: 0.8rem;
    color: #606060;
    margin-bottom: 0.25rem;
}

.yt-views {
    font-size: 0.8rem;
    color: #606060;
}

/* TikTok Video Preview */
.tiktok-video-preview {
    max-width: 300px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tt-video {
    aspect-ratio: 9/16;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tt-video-placeholder {
    font-size: 4rem;
    color: white;
}

.tt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.tt-info {
    padding: 1rem;
    background: white;
}

.tt-username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #161823;
    margin-bottom: 0.5rem;
}

.tt-caption {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #161823;
    margin-bottom: 0.5rem;
}

.tt-hashtags {
    font-size: 0.9rem;
    color: #161823;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .lab-title {
        font-size: 2rem;
    }
    
    .email-title {
        font-size: 1.5rem;
    }
    
    .article-header,
    .article-content,
    .article-sidebar,
    .comments-section,
    .email-body,
    .lab-header,
    .lab-content {
        padding: 1rem;
    }
    
    /* Social media previews responsive */
    .instagram-post-preview,
    .facebook-post-preview,
    .twitter-post-preview,
    .linkedin-post-preview,
    .youtube-video-preview {
        max-width: 100%;
    }
    
    .instagram-reel-preview,
    .facebook-reel-preview,
    .tiktok-video-preview {
        max-width: 100%;
    }
}

/* Ottimizzazioni preview per schermi 4K */
@media (min-width: 1920px) {
    .blog-article-preview {
        max-width: 1000px;
    }
    
    .newsletter-preview {
        max-width: 700px;
    }
    
    .lab-preview {
        max-width: 1000px;
    }
    
    .generic-preview {
        max-width: 700px;
    }
    
    .article-title {
        font-size: 3rem;
    }
    
    .lab-title {
        font-size: 3rem;
    }
    
    .email-title {
        font-size: 2.5rem;
    }
    
    .article-header,
    .article-content,
    .article-sidebar,
    .comments-section,
    .email-body,
    .lab-header,
    .lab-content {
        padding: 2.5rem;
    }
}

@media (min-width: 2560px) {
    .blog-article-preview {
        max-width: 1200px;
    }
    
    .newsletter-preview {
        max-width: 800px;
    }
    
    .lab-preview {
        max-width: 1200px;
    }
    
    .generic-preview {
        max-width: 800px;
    }
    
    .article-title {
        font-size: 3.5rem;
    }
    
    .lab-title {
        font-size: 3.5rem;
    }
    
    .email-title {
        font-size: 3rem;
    }
    
    .article-header,
    .article-content,
    .article-sidebar,
    .comments-section,
    .email-body,
    .lab-header,
    .lab-content {
        padding: 3rem;
    }
}

/* ===== EDIT CONTENT PAGE STYLES ===== */
.modern-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Container ottimizzato per schermi 4K */
.modern-container-4k {
    max-width: 1800px;
    padding: 2.5rem;
}

/* Layout responsive per schermi grandi */
@media (min-width: 1920px) {
    .modern-container-4k {
        max-width: 2000px;
        padding: 3rem;
    }
    
    /* Aumenta le dimensioni dei font per schermi 4K */
    .modern-container-4k h1,
    .modern-container-4k h2,
    .modern-container-4k h3 {
        font-size: 1.1em;
    }
    
    .modern-container-4k .form-label,
    .modern-container-4k .form-label-modern {
        font-size: 1.05em;
    }
    
    .modern-container-4k .form-control,
    .modern-container-4k .form-control-modern {
        font-size: 1.05em;
        padding: 0.75rem 1rem;
    }
    
    /* Aumenta le dimensioni delle card */
    .modern-container-4k .modern-card {
        margin-bottom: 2rem;
    }
    
    .modern-container-4k .card-body {
        padding: 2rem;
    }
    
    /* Ottimizza il preview panel per schermi grandi */
    .modern-container-4k .preview-panel {
        min-height: 500px;
        padding: 2rem;
    }
    
    /* Aumenta le dimensioni dei bottoni */
    .modern-container-4k .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1.05em;
    }
    
    .modern-container-4k .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 1em;
    }
    
    /* Ottimizza le icone per schermi 4K */
    .modern-container-4k .bi {
        font-size: 1.1em;
    }
    
    /* Aumenta lo spacing tra gli elementi */
    .modern-container-4k .mb-3 {
        margin-bottom: 1.5rem !important;
    }
    
    .modern-container-4k .mb-4 {
        margin-bottom: 2rem !important;
    }
    
    /* Ottimizza i tab per schermi grandi */
    .modern-container-4k .nav-tabs .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1.05em;
    }
    
    /* Aumenta le dimensioni del template load button */
    .modern-container-4k .template-load-btn {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Layout ultra-wide per schermi molto grandi */
@media (min-width: 2560px) {
    .modern-container-4k {
        max-width: 2400px;
        padding: 4rem;
    }
    
    /* Layout a 4 colonne per schermi ultra-wide */
    .modern-container-4k .col-lg-3 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .modern-container-4k .col-lg-6 {
        flex: 0 0 45%;
        max-width: 45%;
    }
    
    .modern-container-4k .col-lg-3:last-child {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    /* Aumenta ulteriormente le dimensioni per schermi ultra-wide */
    .modern-container-4k h1,
    .modern-container-4k h2,
    .modern-container-4k h3 {
        font-size: 1.2em;
    }
    
    .modern-container-4k .form-control,
    .modern-container-4k .form-control-modern {
        font-size: 1.1em;
        padding: 1rem 1.25rem;
    }
    
    .modern-container-4k .preview-panel {
        min-height: 600px;
        padding: 2.5rem;
    }
    
    .modern-container-4k .btn {
        padding: 1rem 2rem;
        font-size: 1.1em;
    }
}

.minimal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.icons-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 20px;
    border: 1px solid #e9ecef;
    font-size: 0.875rem;
    color: #6c757d;
}

.channel-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.primary-channel {
    border: 2px solid #007bff !important;
    background: rgba(0, 123, 255, 0.1) !important;
}

.rating-approval-minimal {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rating-btn, .approval-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.rating-btn:hover, .approval-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.approval-btn.approved {
    border-color: #28a745;
    background: #28a745;
    color: white;
}

.approval-btn.rejected {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
}

.modern-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    background: white;
}

.card-header-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
    font-weight: 600;
    color: #495057;
}

.form-control-modern {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-control-modern:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    background: white;
}

.form-label-modern {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.btn-modern {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.btn-save-modern:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    color: white;
}

.btn-secondary-modern {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.btn-secondary-modern:hover {
    background: linear-gradient(135deg, #545b62 0%, #3d4043 100%);
    color: white;
}

.sector-icon-large {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-right: 1rem;
}

.sector-icon-large img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag-item {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

.quill-editor {
    min-height: 200px;
}

.ql-editor {
    min-height: 200px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.media-preview {
    border-radius: 8px;
    margin-top: 0.5rem;
}

.media-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Editor styles */
.ql-editor {
    min-height: 200px;
}

.CodeMirror {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    min-height: 200px;
}

.field-editor-container {
    margin-bottom: 1rem;
}

.field-editor-container .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.field-editor-container .form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Field type specific styles */
.field-type-rich_text .ql-toolbar {
    border-top: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
}

.field-type-rich_text .ql-container {
    border-bottom: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    border-radius: 0 0 0.375rem 0.375rem;
}

.field-type-html .CodeMirror {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
}

.field-type-textarea textarea {
    min-height: 120px;
    font-family: inherit;
}

.field-type-url input[type="url"] {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.field-type-number input[type="number"] {
    text-align: right;
}

.field-type-date input[type="date"] {
    font-family: inherit;
}

.field-type-boolean .form-check {
    padding: 0.5rem 0;
}

.field-type-image .file-input-container,
.field-type-video .file-input-container {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.15s ease-in-out;
}

.field-type-image .file-input-container:hover,
.field-type-video .file-input-container:hover {
    border-color: #007bff;
}

.media-preview {
    margin-top: 1rem;
    text-align: center;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dimension-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

.dimension-warning.show {
    display: block;
}

.dimension-warning .warning-icon {
    color: #856404;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.dimension-warning .warning-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 0.5rem;
}

.dimension-warning .warning-text {
    color: #856404;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.dimension-warning .suggested-size {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #856404;
}

/* Channel icon small for tabs */
.channel-icon-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    background: #6c757d;
}

/* Responsive adjustments for edit content */
@media (max-width: 768px) {
    .modern-container {
        padding: 1rem;
    }
    
    .icons-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sector-icon-large {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
}