/* =============================================================================
    🎨 IDENTIDADE VISUAL E-MÍDIAS - CHECKING OOH
    ============================================================================= */

:root {
    /* 🎨 Paleta de Cores E-MÍDIAS */
    --emidias-primary: #06055B;
    --emidias-magenta: #FC1E75;
    --emidias-rosa: #D71E97;
    --emidias-roxo: #AA1EA5;
    --emidias-success: #10B981;
    --emidias-warning: #F59E0B;
    --emidias-danger: #EF4444;
    --emidias-gray: #64748B;
    --emidias-light-gray: #F1F5F9;
    --emidias-white: #FFFFFF;
    --emidias-dark: #1E293B;
    
    /* 🎨 Gradientes E-MÍDIAS */
    --gradient-primary: linear-gradient(135deg, var(--emidias-primary) 0%, var(--emidias-roxo) 100%);
    --gradient-accent: linear-gradient(135deg, var(--emidias-magenta) 0%, var(--emidias-rosa) 100%);
    --gradient-success: linear-gradient(135deg, var(--emidias-success) 0%, #34D399 100%);
    --gradient-warning: linear-gradient(135deg, var(--emidias-warning) 0%, #FBBF24 100%);
    --gradient-danger: linear-gradient(135deg, var(--emidias-danger) 0%, #F87171 100%);
    
    /* 📝 Tipografia */
    --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* 🎨 Sombras */
    --shadow-sm: 0 1px 3px rgba(6, 5, 91, 0.05);
    --shadow-md: 0 4px 12px rgba(6, 5, 91, 0.1);
    --shadow-lg: 0 8px 25px rgba(6, 5, 91, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--emidias-white);
    color: var(--emidias-dark);
    line-height: 1.6;
    font-weight: var(--font-weight-normal);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* =============================================================================
    🎨 HEADER E LOGO
    ============================================================================= */
.top-header {
    background: var(--emidias-primary);
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(6, 5, 91, 0.2);
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 2px solid var(--emidias-magenta);
}

.top-logo {
    max-height: 40px;
    height: auto;
    max-width: 200px;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

.top-logo:hover {
    transform: scale(1.05);
}

.header {
    background: var(--emidias-white);
    color: var(--emidias-primary);
    padding: 28px 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--emidias-primary);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 5, 91, 0.05), transparent);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header-title {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.header-subtitle {
    font-size: 17px;
    opacity: 0.85;
    font-weight: var(--font-weight-medium);
    position: relative;
    z-index: 1;
    color: var(--emidias-gray);
}

/* =============================================================================
    📋 CARDS DE INFORMAÇÃO
    ============================================================================= */
.info-card {
    background: var(--emidias-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--emidias-primary);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 24px;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 12px 12px 0 0;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--emidias-magenta);
}

.card-title {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--emidias-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--emidias-light-gray);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: var(--font-weight-semibold);
    color: var(--emidias-gray);
}

.info-value {
    font-weight: var(--font-weight-medium);
    color: var(--emidias-dark);
}

/* =============================================================================
    🏗️ PONTOS DE MÍDIA
    ============================================================================= */
.pontos-container {
    background: var(--emidias-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
    border: 1px solid var(--emidias-light-gray);
    overflow: hidden;
    position: relative;
}

.pontos-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 16px 16px 0 0;
    z-index: 3;
}

/* Campo de Pesquisa */
.search-container {
    padding: 20px;
    background: linear-gradient(135deg, rgba(6, 5, 91, 0.02) 0%, var(--emidias-white) 100%);
    border-bottom: 2px solid var(--emidias-light-gray);
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    border: 2px solid var(--emidias-light-gray);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background: var(--emidias-white);
    color: var(--emidias-dark);
}

.search-input:focus {
    border-color: var(--emidias-primary);
    box-shadow: 0 0 0 3px rgba(6, 5, 91, 0.1);
}

.search-input::placeholder {
    color: var(--emidias-gray);
    opacity: 0.7;
}

.search-results-count {
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--emidias-gray);
    font-weight: var(--font-weight-medium);
}

.ponto-item {
    border-bottom: 1px solid var(--emidias-light-gray);
    transition: all 0.3s ease;
}

.ponto-item.hidden-by-search {
    display: none;
}

.ponto-item:last-child {
    border-bottom: none;
}

.ponto-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(6, 5, 91, 0.02) 0%, var(--emidias-white) 100%);
}

.ponto-info h3 {
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    color: var(--emidias-primary);
    margin-bottom: 4px;
}

.ponto-info p {
    color: var(--emidias-gray);
    font-size: 14px;
}

.ponto-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ponto-content {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* =============================================================================
    📥📤 SEÇÕES ENTRADA E SAÍDA
    ============================================================================= */
.secao {
    background: rgba(6, 5, 91, 0.02);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid var(--emidias-light-gray);
    transition: all 0.3s ease;
}

.secao.entrada {
    border-color: var(--emidias-success);
}

.secao.saida {
    border-color: var(--emidias-warning);
}

.secao:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.secao-title {
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entrada .secao-title {
    color: var(--emidias-success);
}

.saida .secao-title {
    color: var(--emidias-warning);
}

.secao-actions {
    display: flex;
    flex-direction: row; /* ✅ MUDANÇA: Botões lado a lado */
    flex-wrap: wrap; /* ✅ NOVO: Quebra linha se necessário */
    gap: 12px;
    margin-bottom: 16px;
}

.media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.media-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative; /* ✅ CORREÇÃO: Posicionar badges corretamente */
}

.media-item:hover {
    transform: scale(1.05);
    border-color: var(--emidias-primary);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-count {
    font-size: 12px;
    color: var(--emidias-gray);
    text-align: center;
    margin-top: 8px;
}

/* =============================================================================
    🔘 BOTÕES
    ============================================================================= */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-primary);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--emidias-white);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(6, 5, 91, 0.3);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--emidias-white);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: var(--gradient-warning);
    color: var(--emidias-white);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: var(--gradient-danger);
    color: var(--emidias-white);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
    background: var(--emidias-gray);
    color: var(--emidias-white);
}

.btn-camera {
    background: var(--gradient-accent);
    color: var(--emidias-white);
}

.btn-camera:hover {
    box-shadow: 0 6px 20px rgba(252, 30, 117, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-expand {
    background: transparent;
    color: var(--emidias-primary);
    border: 2px solid var(--emidias-primary);
    padding: 6px 8px;
    font-size: 16px;
}

.btn-expand:hover {
    background: var(--emidias-primary);
    color: var(--emidias-white);
}

/* =============================================================================
    📱 MODAIS
    ============================================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--emidias-white);
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 2px solid var(--emidias-light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-primary);
    color: var(--emidias-white);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-weight-bold);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--emidias-white);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* =============================================================================
    📸 GRID DE FOTOS
    ============================================================================= */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.photo-item:hover {
    transform: scale(1.02);
    border-color: var(--emidias-primary);
    box-shadow: var(--shadow-md);
}

.photo-item img,
.photo-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-actions {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: all 0.3s ease;
}

.photo-item:hover .photo-actions {
    opacity: 1;
}

/* ✅ V10.7.1: Badge de deletar APENAS em media-items com foto/vídeo */
.media-item .delete-badge {
    position: absolute;
    top: 6px;
    left: 6px; /* ✅ LADO ESQUERDO para não conflitar com download */
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    border-radius: 50%;
    display: none; /* Oculto por padrão */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    transition: all 0.3s ease;
    z-index: 1000; /* Sempre no topo */
    line-height: 1;
    user-select: none;
    border: 2px solid white;
}

/* ✅ V10.7.1: Ocultar badges que não estejam dentro de media-items */
.delete-badge:not(.media-item .delete-badge) {
    display: none !important;
}

/* ✅ V10.2: VISÍVEL quando em modo edição (SEM hover!) */
.media-item.editing .delete-badge {
    display: flex !important; /* Força exibição no modo edição */
}

/* ✅ V10.2: Efeito de toque para mobile */
.delete-badge:active {
    transform: scale(0.9);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

/* Desktop: hover opcional */
@media (hover: hover) {
    .delete-badge:hover {
        transform: scale(1.15);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }
}

/* ✅ V10.7.1: Badge de download APENAS em media-items com foto/vídeo */
.media-item .download-badge {
    position: absolute;
    top: 4px;                   /* ✅ Canto superior direito */
    right: 4px;
    width: 24px;                /* ✅ REDUZIDO para ser discreto */
    height: 24px;               /* ✅ REDUZIDO para ser discreto */
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;            /* ✅ Ícone menor */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);  /* ✅ Sombra sutil */
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
    border: 1.5px solid white;  /* ✅ Borda mais fina */
    opacity: 0.7;               /* ✅ DISCRETO por padrão */
}

/* ✅ V10.7.1: Ocultar badges que não estejam dentro de media-items */
.download-badge:not(.media-item .download-badge) {
    display: none !important;
}

/* ✅ V10.7: Efeito de toque para mobile */
.download-badge:active {
    transform: scale(0.9);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Desktop: hover para destacar quando necessário */
@media (hover: hover) {
    .download-badge:hover {
        transform: scale(1.2);   /* ✅ Cresce suavemente */
        opacity: 1;              /* ✅ Fica totalmente visível */
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    }
}

/* ✅ MELHORIA: Grid maior no modo cliente (fotos maiores) */
.media-preview-large {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

@media (max-width: 768px) {
    .media-preview-large {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.photo-date {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: var(--font-weight-medium);
}

/* =============================================================================
    📤 UPLOAD
    ============================================================================= */
.upload-zone {
    border: 3px dashed var(--emidias-primary);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(6, 5, 91, 0.02);
}

.upload-zone:hover {
    border-color: var(--emidias-magenta);
    background: rgba(6, 5, 91, 0.05);
}

.upload-zone.drag-over {
    border-color: var(--emidias-success);
    background: rgba(16, 185, 129, 0.1);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    color: var(--emidias-gray);
}

.upload-text strong {
    color: var(--emidias-primary);
}

.upload-progress {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--emidias-light-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-success);
    transition: width 0.3s ease;
    width: 0%;
}

.upload-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* =============================================================================
    📷 CÂMERA
    ============================================================================= */
.camera-modal .modal-content {
    max-width: 600px;
}

#camera-video {
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: block;
}

.camera-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ✅ CORREÇÃO 8: Garantir que botões da câmera sejam sempre visíveis no mobile */
.camera-modal .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 85vh;
    overflow-y: auto;
    padding: 16px;
}

/* =============================================================================
    ⏳ LOADING E ERROR
    ============================================================================= */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--emidias-gray);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--emidias-light-gray);
    border-top: 4px solid var(--emidias-primary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FFFFFF 100%);
    border: 1px solid #FECACA;
    color: var(--emidias-danger);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    margin: 24px 0;
}

/* =============================================================================
    🧪 MODO DEMO
    ============================================================================= */
.demo-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FFFFFF 100%);
    border: 2px solid var(--emidias-warning);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.demo-content h3 {
    color: var(--emidias-warning);
    margin-bottom: 12px;
    font-weight: var(--font-weight-bold);
}

.demo-content p {
    color: var(--emidias-dark);
    margin-bottom: 16px;
}

.demo-close-btn {
    background: var(--gradient-warning);
    color: var(--emidias-white);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* =============================================================================
    🦶 RODAPÉ
    ============================================================================= */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 2px solid var(--emidias-light-gray);
    background: linear-gradient(135deg, #FAFBFC 0%, var(--emidias-white) 100%);
    border-radius: 16px 16px 0 0;
}

.footer-text {
    font-size: 14px;
    color: var(--emidias-gray);
    font-weight: var(--font-weight-medium);
}

/* =============================================================================
    📱 RESPONSIVIDADE
    ============================================================================= */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 20px 16px;
    }
    
    .header-title {
        font-size: 24px;
    }
    
    .header-subtitle {
        font-size: 15px;
    }
    
    .ponto-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ponto-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ponto-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .upload-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0 20px;
    }

    .camera-controls .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    #camera-video {
        max-width: 100%;
        max-height: 50vh;
        object-fit: contain;
    }

    .camera-modal .modal-body {
        max-height: 90vh;
        padding: 12px;
    }
}

/* =============================================================================
    🎠 CARROSSEL DE MÍDIA (NOVO)
    ============================================================================= */
.media-carousel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1;
}

.carousel-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.carousel-media {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.carousel-media img,
.carousel-media video {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.carousel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.carousel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-weight: 300;
    line-height: 1;
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 30px;
}

.carousel-next {
    right: 30px;
}

.carousel-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 36px;
    }

    .carousel-prev {
        left: 15px;
    }

    .carousel-next {
        right: 15px;
    }

    .carousel-close {
        width: 45px;
        height: 45px;
        font-size: 32px;
        top: 15px;
        right: 15px;
    }

    .carousel-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* =============================================================================
    ⏳ SKELETON LOADERS (OTIMIZAÇÃO)
    ============================================================================= */
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-media-item {
    aspect-ratio: 1;
    border-radius: 8px;
}

.media-preview.loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

@media (max-width: 480px) {
    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .secao-actions {
        gap: 8px;
    }

    .btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* =============================================================================
    ⏳ TELA DE CARREGAMENTO V10.4 - MODELO PIXEL-PERFECT
    ============================================================================= */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--emidias-white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

.loading-logo-container {
    margin-bottom: 30px;
}

.loading-logo {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    animation: logoRotate 3s ease-in-out infinite;
}

@keyframes logoRotate {
    0% { transform: rotate(-15deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
    100% { transform: rotate(-15deg); }
}

.loading-title {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    color: var(--emidias-primary);
    margin-bottom: 16px;
}

.loading-text {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: var(--emidias-gray);
    margin-bottom: 24px;
    min-height: 24px;
}

.loading-progress {
    width: 100%;
    height: 4px;
    background: var(--emidias-light-gray);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    height: 100%;
    background: var(--gradient-primary);
    animation: progressSlide 2s ease-in-out infinite;
    width: 40%;
}

@keyframes progressSlide {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(150%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    .loading-logo {
        max-width: 100px;
        max-height: 100px;
    }

    .loading-title {
        font-size: 24px;
    }

    .loading-text {
        font-size: 14px;
    }
}

/* =============================================================================
    🚫 V10.5: GARANTIR QUE LOADING SECUNDÁRIO NUNCA APAREÇA
    ============================================================================= */
#loading {
    display: none !important; /* FORÇAR ocultação */
}

/* =============================================================================
    📥 V10.7.1: BOTÕES DE DOWNLOAD - APENAS EM FOTOS/VÍDEOS
    ============================================================================= */

/* ✅ V10.7.1: Download badge NÃO aparece fora de media-items */
.secao .download-badge:not(.media-item .download-badge),
.ponto-item .download-badge:not(.media-item .download-badge),
.bisemana-header .download-badge,
.loading-logo .download-badge,
.top-logo .download-badge,
.loading-screen .download-badge,
.top-header .download-badge {
    display: none !important;
}

/* ✅ V10.7.1: Efeito de toque para mobile APENAS dentro de media-items */
.media-item .download-badge:active {
    transform: scale(0.9);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Desktop: hover para destacar APENAS dentro de media-items */
@media (hover: hover) {
    .media-item .download-badge:hover {
        transform: scale(1.2);   /* ✅ Aumenta um pouco ao passar mouse */
        opacity: 1;              /* ✅ Opacidade total ao hover */
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.6);
    }
}

/* =============================================================================
    📄 V10.5: NOTIFICAÇÃO FLUTUANTE PARA PDF
    ============================================================================= */

/* Spinner para PDF */
.pdf-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--emidias-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Container da notificação */
.pdf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--emidias-white);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 4px solid var(--emidias-primary);
    display: none;
}

.pdf-notification.show {
    opacity: 1;
    transform: translateX(0);
    display: block !important;
}

.pdf-notification.success {
    border-left-color: var(--emidias-success);
}

.pdf-notification.error {
    border-left-color: var(--emidias-danger);
}

.pdf-notification.progress {
    border-left-color: var(--emidias-primary);
}

/* Conteúdo da notificação */
.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
    color: var(--emidias-dark);
    font-size: 14px;
}

/* Responsividade da notificação */
@media (max-width: 768px) {
    .pdf-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 16px;
    }

    .notification-content {
        font-size: 13px;
    }

    .pdf-spinner {
        width: 14px;
        height: 14px;
    }
}

/* =============================================================================
    🖼️ V10.6: MODAL DE IMAGEM CORRIGIDO
    ============================================================================= */
.image-modal-v10-6 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop-v10-6 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1;
}

.modal-content-v10-6 {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image-v10-6 {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.modal-close-v10-6 {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modal-close-v10-6:hover {
    transform: scale(1.2);
}

.modal-nav-v10-6 {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    color: white;
}

.modal-prev-v10-6,
.modal-next-v10-6 {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.modal-prev-v10-6:hover,
.modal-next-v10-6:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-counter-v10-6 {
    font-size: 16px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

/* =============================================================================
    📥 V10.7.1: BOTÕES DE DOWNLOAD NO MODO CAMPANHA - APENAS EM MEDIA-ITEMS
    ============================================================================= */

/* ✅ V10.7.1: Download badges visíveis APENAS dentro de media-items no modo campanha */
body[data-mode="campanha"] .media-item .download-badge,
.campanha-mode .media-item .download-badge {
    display: flex !important;
    opacity: 0.7 !important;
}

/* ✅ V10.7.1: BLOQUEAR download badges fora de media-items mesmo em modo campanha */
body[data-mode="campanha"] .download-badge:not(.media-item .download-badge),
.campanha-mode .download-badge:not(.media-item .download-badge) {
    display: none !important;
}

/* =============================================================================
    ✏️ V10.6: MODO EDIÇÃO CORRIGIDO - BOTÕES SEMPRE VISÍVEIS
    ============================================================================= */

/* ✅ V10.7.1: DELETE BADGE - Garantir que NUNCA apareça fora de media-items */

/* NÃO mostrar delete em logos, headers, containers, etc */
.loading-logo .delete-badge,
.top-logo .delete-badge,
.loading-screen .delete-badge,
.top-header .delete-badge,
.secao .delete-badge:not(.media-item .delete-badge),
.ponto-item .delete-badge:not(.media-item .delete-badge),
.bisemana-header .delete-badge {
    display: none !important;
}

/* ✅ V10.7.1: Efeitos de hover e active APENAS dentro de media-items */
.media-item.editing .delete-badge:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.8) !important;
}

.media-item.editing .delete-badge:active {
    transform: scale(0.9) !important;
}

/* =============================================================================
    📱 V10.6: RESPONSIVIDADE
    ============================================================================= */
@media (max-width: 768px) {
    .modal-image-v10-6 {
        max-width: 95vw;
        max-height: 75vh;
    }

    .modal-close-v10-6 {
        top: -40px;
        font-size: 32px;
        width: 40px;
        height: 40px;
    }

    .modal-prev-v10-6,
    .modal-next-v10-6 {
        padding: 10px 16px;
        font-size: 16px;
    }

    .modal-counter-v10-6 {
        font-size: 14px;
        min-width: 60px;
    }

    .modal-nav-v10-6 {
        gap: 12px;
        margin-top: 15px;
    }
}

/* =============================================================================
    🏠 LANDING PAGE
    ============================================================================= */
.landing-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--emidias-primary) 0%, var(--emidias-roxo) 100%);
    border-radius: 24px;
    color: white;
    margin-bottom: 60px;
    box-shadow: 0 20px 60px rgba(6, 5, 91, 0.3);
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(252, 30, 117, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.landing-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.landing-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.landing-subtitle {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(6, 5, 91, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(6, 5, 91, 0.15);
    border-color: var(--emidias-magenta);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--emidias-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--emidias-gray);
    font-size: 15px;
    line-height: 1.6;
}

.landing-cta {
    background: linear-gradient(135deg, #F1F5F9 0%, #E0E7FF 100%);
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin-bottom: 40px;
    border: 2px solid var(--emidias-primary);
}

.cta-content h2 {
    color: var(--emidias-primary);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-content > p {
    color: var(--emidias-gray);
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(6, 5, 91, 0.1);
    font-size: 15px;
    color: var(--emidias-dark);
}

.badge-icon {
    font-size: 24px;
}

.landing-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--emidias-gray);
    font-size: 14px;
}

.landing-footer strong {
    color: var(--emidias-primary);
    font-weight: 600;
}

/* Responsividade da Landing Page */
@media (max-width: 768px) {
    .landing-title {
        font-size: 36px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .landing-hero {
        padding: 40px 20px;
    }

    .landing-icon {
        font-size: 60px;
    }

    .cta-content h2 {
        font-size: 24px;
    }

    .cta-info {
        flex-direction: column;
        align-items: stretch;
    }

    .info-badge {
        justify-content: center;
    }
}
