/**
 * Dashboard de Usuários - Estilização
 * Arquivo dedicado para a página de gerenciamento de usuários
 */

/* ========================================
   ESTRUTURA GERAL
======================================== */
.dashboard-usuarios {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: #f8f9fa;
    min-height: 100vh;
    
}
.control-panel{
padding-left: 300px;
}
/* ========================================
   HEADER DO DASHBOARD
======================================== */
.dashboard-header {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 600;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   BOTÕES
======================================== */
.btn-primary {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ========================================
   FILTROS E BUSCA
======================================== */
.filters-container {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ========================================
   TABELA DE USUÁRIOS
======================================== */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.users-table thead {
    background: #34495e;
    color: #fff;
}

.users-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.users-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.users-table thead th.sortable:hover {
    background: #2c3e50;
}

.users-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.2s ease;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

.users-table tbody td {
    padding: 1rem;
    color: #2c3e50;
}

.users-table tbody tr.selected {
    background: #e3f2fd;
}

/* Checkbox na tabela */
.users-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Ações da tabela */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #7f8c8d;
}

.btn-icon:hover {
    background: #ecf0f1;
}

.btn-icon.edit:hover {
    color: #3498db;
}

.btn-icon.delete:hover {
    color: #e74c3c;
}

/* ========================================
   PAGINAÇÃO
======================================== */
.pagination-container {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #2c3e50;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination button.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   BADGES E STATUS
======================================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

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

/* ========================================
   LOADING E ESTADOS VAZIOS
======================================== */
.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
}

/* ========================================
   RESPONSIVIDADE
======================================== */
@media (max-width: 768px) {
    .dashboard-usuarios {
        padding: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .dashboard-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
    }
    
    .table-wrapper {
        overflow-x: scroll;
    }
    
    .users-table {
        font-size: 0.85rem;
    }
    
    .users-table thead th,
    .users-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .pagination-container {
        flex-direction: column;
    }
}

/* ========================================
   CUSTOMIZAÇÃO SWEETALERT2
======================================== */
.swal2-popup {
    border-radius: 8px;
    padding: 2rem;
}

.swal2-title {
    color: #2c3e50;
}

.swal2-html-container {
    color: #555;
}

.swal2-styled.swal2-confirm {
    background: #3498db !important;
    padding: 0.75rem 2rem;
}

.swal2-styled.swal2-cancel {
    background: #95a5a6 !important;
    padding: 0.75rem 2rem;
}

/* Form dentro do SweetAlert */
.swal2-input,
.swal2-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.swal2-input:focus,
.swal2-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* ========================================
   UTILITÁRIOS
======================================== */
.text-muted {
    color: #7f8c8d;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden {
    display: none !important;
}

/* Vídeos - grid de cards estilizado */
#videos-cards-grid .card-link { text-decoration: none; color: inherit; display: block; }
#videos-cards-grid .card { background:#ffffff; border-radius:10px; overflow:hidden; box-shadow:0 8px 20px rgba(18,38,63,0.06); transition:transform .18s ease, box-shadow .18s ease; display:flex; flex-direction:column; }
#videos-cards-grid .card:hover { transform:translateY(-6px); box-shadow:0 20px 40px rgba(18,38,63,0.12); }
#videos-cards-grid .card-image { position:relative; height:160px; background:#111; display:flex; align-items:center; justify-content:center; overflow:hidden; }
#videos-cards-grid .card-image img { width:100%; height:100%; object-fit:cover; display:block; }
#videos-cards-grid .card-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#ffffff; background:linear-gradient(135deg,#333,#111); font-size:36px; }
#videos-cards-grid .card-play { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); background:rgba(0,0,0,0.55); color:#fff; width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; opacity:0.95; transition:transform .18s ease, opacity .18s ease; font-size:22px; }
#videos-cards-grid .card-image:hover .card-play { transform:translate(-50%,-50%) scale(1.06); opacity:1; }
#videos-cards-grid .card-content { padding:16px; flex:1 1 auto; display:flex; flex-direction:column; }

/* ========================================
   CATEGORIAS - VISUAL APRIMORADO
======================================== */
.categorias-header .header-content { display:flex; align-items:center; gap:16px; }
.categorias-header .header-icon { width:56px; height:56px; background:linear-gradient(135deg,#1976d2,#1565c0); border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:28px; box-shadow:0 4px 12px rgba(25,118,210,0.3); }

.search-box-wrapper { position:relative; display:flex; align-items:center; }
.search-box-wrapper .search-icon { position:absolute; left:14px; color:#999; font-size:16px; pointer-events:none; z-index:2; }
.search-input-enhanced { padding:10px 16px 10px 42px; border-radius:8px; border:2px solid #e0e0e0; font-size:15px; width:280px; transition:all 0.3s ease; }
.search-input-enhanced:focus { border-color:#1976d2; box-shadow:0 0 0 3px rgba(25,118,210,0.1); outline:none; }

/* Card de Informação/Ajuda */
.info-card { background:linear-gradient(135deg,#e3f2fd 0%,#bbdefb 100%); border-radius:12px; padding:20px 24px; margin:24px 0; display:flex; align-items:center; gap:16px; box-shadow:0 2px 8px rgba(25,118,210,0.15); border-left:4px solid #1976d2; }
.info-card-icon { width:48px; height:48px; background:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#ffa726; font-size:24px; flex-shrink:0; box-shadow:0 2px 8px rgba(0,0,0,0.1); }
.info-card-content h3 { margin:0 0 6px 0; font-size:16px; font-weight:600; color:#1565c0; }
.info-card-content p { margin:0; font-size:14px; line-height:1.5; color:#424242; }
.info-card-content strong { color:#1976d2; font-weight:600; }

/* Seção Grid */
.categorias-grid-section { margin-top:32px; }
.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; padding-bottom:12px; border-bottom:2px solid #e0e0e0; }
.section-header h2 { margin:0; font-size:20px; font-weight:600; color:#333; display:flex; align-items:center; }
.badge-count { background:linear-gradient(135deg,#42a5f5,#1976d2); color:#fff; padding:6px 14px; border-radius:20px; font-size:14px; font-weight:600; box-shadow:0 2px 8px rgba(25,118,210,0.3); }

/* Grid Enhanced */
.cards-grid-enhanced { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:20px; margin-top:16px; }

/* Cards de Categoria Aprimorados */
.categoria-card { background:#fff; border-radius:12px; padding:20px; box-shadow:0 2px 8px rgba(0,0,0,0.08); transition:all 0.3s cubic-bezier(0.4,0,0.2,1); position:relative; overflow:hidden; border:2px solid transparent; }
.categoria-card::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background:linear-gradient(90deg,#1976d2,#42a5f5); transform:scaleX(0); transform-origin:left; transition:transform 0.3s ease; }
.categoria-card:hover { transform:translateY(-4px); box-shadow:0 8px 24px rgba(25,118,210,0.2); border-color:#1976d2; }
.categoria-card:hover::before { transform:scaleX(1); }
.categoria-card.selected { border-color:#1976d2; background:linear-gradient(135deg,#e3f2fd 0%,#fff 100%); }

/* Header do Card */
.categoria-card > div:first-child { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.categoria-card .categoria-name-wrapper { display:flex; align-items:center; gap:10px; flex:1; }
.categoria-card .categoria-icon { width:40px; height:40px; background:linear-gradient(135deg,#1976d2,#1565c0); border-radius:8px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:20px; flex-shrink:0; }
.categoria-card .categoria-title { font-weight:600; font-size:17px; color:#212121; line-height:1.3; }

/* Botão Ver Aprimorado */
.btn-view-cat { padding:8px 16px; border-radius:8px; background:linear-gradient(135deg,#1976d2,#1565c0); color:#fff; border:none; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px; font-size:14px; font-weight:600; transition:all 0.3s ease; box-shadow:0 2px 8px rgba(25,118,210,0.3); }
.btn-view-cat:hover { background:linear-gradient(135deg,#1565c0,#0d47a1); transform:scale(1.05); box-shadow:0 4px 12px rgba(25,118,210,0.4); }
.btn-view-cat::after { content:'\f061'; font-family:'Font Awesome 5 Free'; font-weight:900; margin-left:4px; transition:transform 0.3s ease; }
.btn-view-cat:hover::after { transform:translateX(4px); }

/* Descrição e Meta */
.categoria-card .categoria-description { color:#666; font-size:14px; line-height:1.5; margin:8px 0 12px 0; min-height:42px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.categoria-card .categoria-meta { display:flex; align-items:center; gap:8px; font-size:13px; color:#999; padding-top:12px; border-top:1px solid #f0f0f0; }
.categoria-card .categoria-meta i { color:#1976d2; }

/* Ações Admin */
.card-actions { display:flex; gap:6px; align-items:center; }
.card-actions .btn-icon { width:32px; height:32px; border-radius:6px; border:none; background:#f5f5f5; color:#666; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:all 0.2s ease; font-size:14px; }
.card-actions .btn-icon:hover { background:#1976d2; color:#fff; transform:scale(1.1); }
.card-actions .btn-delete-cat:hover { background:#f44336; }
.card-select-checkbox { width:18px; height:18px; cursor:pointer; accent-color:#1976d2; }

/* Empty State Aprimorado */
.cards-grid-enhanced .empty-state { grid-column:1/-1; text-align:center; padding:60px 20px; }
.cards-grid-enhanced .empty-state .empty-state-icon { font-size:64px; margin-bottom:16px; opacity:0.3; }
.cards-grid-enhanced .empty-state h3 { color:#999; font-weight:400; font-size:18px; }

/* Loading Spinner Enhanced */
.cards-grid-enhanced > div[style*="grid-column:1/-1"] { text-align:center; padding:40px; }

/* Responsividade */
@media (max-width:768px) {
    .categorias-header .header-content { flex-direction:column; align-items:flex-start; }
    .categorias-header .header-icon { width:48px; height:48px; font-size:24px; }
    .search-input-enhanced { width:100%; }
    .cards-grid-enhanced { grid-template-columns:1fr; gap:16px; }
    .info-card { flex-direction:column; text-align:center; }
    .section-header { flex-direction:column; align-items:flex-start; gap:12px; }
}

/* ========================================
   BATCH CONTROLS BAR - CONTROLES DE SELEÇÃO
======================================== */
.batch-controls-bar {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #1976d2;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
    animation: slideDown 0.4s ease-out;
}

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

.batch-controls-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.batch-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1565c0;
    font-size: 15px;
}

.batch-info i {
    font-size: 20px;
    color: #1976d2;
}

.batch-info strong {
    font-size: 18px;
    font-weight: 700;
    color: #1565c0;
}

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

.batch-actions .btn-secondary,
.batch-actions .btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.batch-actions .btn-secondary {
    background: #fff;
    color: #1976d2;
    border: 2px solid #1976d2;
}

.batch-actions .btn-secondary:hover {
    background: #1976d2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.batch-actions .btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.batch-actions .btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.batch-actions button i {
    font-size: 16px;
}

/* Responsividade Batch Controls */
@media (max-width: 768px) {
    .batch-controls-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-info {
        justify-content: center;
        text-align: center;
    }
    
    .batch-actions {
        flex-direction: column;
    }
    
    .batch-actions button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   HEADERS ADMINISTRATIVOS APRIMORADOS
======================================== */
.admin-header .header-content { display:flex; align-items:center; gap:16px; }
.admin-header .header-icon { width:56px; height:56px; background:linear-gradient(135deg,#1976d2,#1565c0); border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:28px; box-shadow:0 4px 12px rgba(25,118,210,0.3); animation:iconPulse 2s ease-in-out infinite; }

@keyframes iconPulse {
    0%, 100% { box-shadow:0 4px 12px rgba(25,118,210,0.3); }
    50% { box-shadow:0 4px 20px rgba(25,118,210,0.5); }
}

/* Melhorias nas Tabelas */
.users-table tbody tr { transition:all 0.2s ease; }
.users-table tbody tr:hover { background-color:#f5f9ff; transform:translateX(4px); }
.users-table tbody tr.selected { background-color:#e3f2fd; border-left:3px solid #1976d2; }
.users-table thead th { position:relative; }
.users-table thead th::after { content:''; position:absolute; bottom:0; left:0; right:0; height:2px; background:linear-gradient(90deg,transparent,#1976d2,transparent); opacity:0; transition:opacity 0.3s ease; }
.users-table thead th:hover::after { opacity:1; }

/* Labels com ícones */
.filter-group label i { color:#1976d2; }

/* Animação de carregamento aprimorada */
.loading-spinner { animation:fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* Empty state melhorado */
.empty-state { animation:fadeInUp 0.5s ease; }
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

/* Responsividade para headers admin */
@media (max-width:768px) {
    .admin-header .header-content { flex-direction:column; align-items:flex-start; }
    .admin-header .header-icon { width:48px; height:48px; font-size:24px; }
}
#videos-cards-grid .card-title { margin:0 0 6px 0; font-size:1.05rem; line-height:1.25; color:#2c3e50; }
#videos-cards-grid .card-title a { color:inherit; text-decoration:none; }
#videos-cards-grid .card .meta { color:#7f8c8d; font-size:0.85rem; margin-top:auto; }

@media (max-width: 480px) {
    #videos-cards-grid .card-image { height:120px; }
}

/* Admin controls overlay */
.card-wrapper .card-select input[type="checkbox"] { width:18px; height:18px; }
.card-wrapper .card-admin-actions .btn-icon { background: rgba(255,255,255,0.9); border-radius:6px; padding:6px; color:#2c3e50; }
.card-wrapper .card-admin-actions .btn-icon:hover { background:#fff; color:#000; box-shadow:0 2px 6px rgba(0,0,0,0.08); }
.card-wrapper .card-link { display:block; }
.card-wrapper .card { min-height:220px; }

/* Selection overlay */
.card-wrapper { transition:transform .18s ease; }
.card-wrapper .select-overlay { position:absolute; left:8px; top:8px; z-index:15; width:42px; height:42px; border-radius:8px; background:rgba(52,152,219,0.95); color:#fff; display:flex; align-items:center; justify-content:center; font-size:18px; box-shadow:0 6px 20px rgba(0,0,0,0.12); }
.card-wrapper .select-overlay i { margin:0; }
.card-wrapper.selected { outline: 3px solid rgba(52,152,219,0.18); transform: translateY(-6px); }
.card-wrapper .card-image .card-play { opacity:0.95; }

/* ========================================
   SINGLE VIDEO PAGE
======================================== */
.single-video-container { padding:2rem 1rem; max-width:1400px; margin:0 auto; }
.single-video-layout { display:grid; grid-template-columns:1fr 380px; gap:2rem; align-items:start; }

/* Main Content */
.video-main-content { background:#fff; border-radius:12px; padding:2rem; box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.video-main-content .entry-header { margin-bottom:1.5rem; }
.video-main-content .entry-title { font-size:2rem; color:#2c3e50; margin:0 0 1rem 0; font-weight:600; line-height:1.3; }
.video-categories { display:flex; flex-wrap:wrap; gap:0.5rem; margin-bottom:1.5rem; }
.video-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; background:linear-gradient(135deg,#3498db,#2980b9); color:#fff; border-radius:20px; font-size:0.9rem; text-decoration:none; transition:transform .18s ease, box-shadow .18s ease; }
.video-chip:hover { transform:translateY(-2px); box-shadow:0 4px 10px rgba(52,152,219,0.3); }

/* Video Sections */
.video-sections-wrapper { display:flex; flex-direction:column; gap:1.5rem; }
.video-section-card { background:#f8f9fa; border-radius:10px; padding:1.5rem; border:1px solid #e9ecef; }
.video-section-title { font-size:1.3rem; color:#2c3e50; margin:0 0 1rem 0; display:flex; align-items:center; gap:8px; font-weight:600; }
.video-section-title i { color:#3498db; }

/* Video Player */
.video-player-wrapper { position:relative; border-radius:8px; overflow:hidden; background:#000; }
.video-player-wrapper video { width:100%; height:auto; display:block; max-height:600px; }
.video-player-wrapper .video-embed { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; }
.video-player-wrapper .video-embed iframe { position:absolute; top:0; left:0; width:100%; height:100%; }

/* Entry Content */
.video-main-content .entry-content { margin-top:2rem; padding-top:2rem; border-top:1px solid #e9ecef; color:#555; line-height:1.8; }

/* Sidebar */
.video-sidebar { position:sticky; top:20px; }
.sidebar-widget { background:#fff; border-radius:12px; padding:1.5rem; box-shadow:0 4px 12px rgba(0,0,0,0.06); }
.widget-title { font-size:1.2rem; color:#2c3e50; margin:0 0 1.2rem 0; font-weight:600; display:flex; align-items:center; gap:8px; }
.widget-title i { color:#3498db; }

/* Related Videos List */
.related-videos-list { display:flex; flex-direction:column; gap:1rem; }
.related-video-item { display:flex; gap:12px; padding:10px; border-radius:8px; transition:background .18s ease, transform .18s ease; text-decoration:none; color:inherit; border:1px solid transparent; }
.related-video-item:hover { background:#f8f9fa; transform:translateX(4px); border-color:#e9ecef; }
.related-video-thumb { position:relative; width:120px; min-width:120px; height:68px; border-radius:6px; overflow:hidden; background:#000; }
.related-video-thumb img { width:100%; height:100%; object-fit:cover; }
.related-video-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#555,#333); color:#fff; font-size:24px; }
.related-play-icon { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:32px; height:32px; background:rgba(52,152,219,0.9); border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px; }
.related-video-info { flex:1; display:flex; flex-direction:column; justify-content:center; }
.related-video-info h4 { margin:0 0 4px 0; font-size:0.95rem; color:#2c3e50; font-weight:500; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.related-video-date { font-size:0.8rem; color:#7f8c8d; }
.no-related { text-align:center; padding:1rem; color:#7f8c8d; font-style:italic; }

/* Responsive Single Video */
@media (max-width: 1024px) {
    .single-video-layout { grid-template-columns:1fr; }
    .video-sidebar { position:static; margin-top:2rem; }
}

@media (max-width: 768px) {
    .single-video-container { padding:1rem 0.5rem; }
    .video-main-content { padding:1.5rem; border-radius:8px; }
    .video-main-content .entry-title { font-size:1.6rem; }
    .video-section-card { padding:1rem; }
    .video-section-title { font-size:1.1rem; }
    .related-video-thumb { width:100px; min-width:100px; height:56px; }
    .related-video-info h4 { font-size:0.88rem; }
}

@media (max-width: 480px) {
    .single-video-container { padding:0.5rem; }
    .video-main-content { padding:1rem; }
    .video-main-content .entry-title { font-size:1.4rem; }
    .video-categories { gap:0.4rem; }
    .video-chip { padding:5px 12px; font-size:0.85rem; }
    .related-video-item { flex-direction:column; }
    .related-video-thumb { width:100%; height:180px; }
}

/* ========================================
   TAXONOMY CATEGORIA VIDEOS - APRIMORADO
======================================== */
.taxonomy-header .header-content { display:flex; align-items:center; gap:16px; }
.taxonomy-header .header-icon { width:56px; height:56px; background:linear-gradient(135deg,#1976d2,#1565c0); border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:28px; box-shadow:0 4px 12px rgba(25,118,210,0.3); }
.taxonomy-description { margin-top:8px; color:#666; line-height:1.6; }

/* Video Navigation (Breadcrumbs e botões) */
.video-navigation { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; padding:16px 20px; background:#fff; border-radius:10px; box-shadow:0 2px 8px rgba(0,0,0,0.06); border-left:4px solid #1976d2; }

.breadcrumbs { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.breadcrumb-item { color:#1976d2; text-decoration:none; font-size:14px; font-weight:500; transition:color 0.2s ease; display:flex; align-items:center; gap:6px; }
.breadcrumb-item:hover { color:#1565c0; }
.breadcrumb-separator { color:#999; font-size:12px; display:flex; align-items:center; }
.breadcrumb-current { color:#666; font-size:14px; font-weight:600; }

.navigation-buttons { display:flex; gap:10px; }
.btn-nav-back, .btn-nav-home { padding:10px 18px; border:none; border-radius:8px; font-size:14px; font-weight:600; cursor:pointer; transition:all 0.3s ease; display:inline-flex; align-items:center; gap:8px; text-decoration:none; }
.btn-nav-back { background:#f5f5f5; color:#333; }
.btn-nav-back:hover { background:#e0e0e0; transform:translateX(-4px); }
.btn-nav-home { background:linear-gradient(135deg,#1976d2,#1565c0); color:#fff; box-shadow:0 2px 8px rgba(25,118,210,0.3); }
.btn-nav-home:hover { background:linear-gradient(135deg,#1565c0,#0d47a1); transform:translateY(-2px); box-shadow:0 4px 12px rgba(25,118,210,0.4); }

/* Video Header Enhanced (Single) */
.video-header-enhanced { border-bottom:2px solid #e9ecef; padding-bottom:1.5rem; }
.video-title-wrapper { display:flex; align-items:center; gap:16px; margin-bottom:1rem; }
.video-icon-badge { width:48px; height:48px; background:linear-gradient(135deg,#1976d2,#1565c0); border-radius:10px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:24px; flex-shrink:0; box-shadow:0 4px 12px rgba(25,118,210,0.3); }
.video-header-enhanced .entry-title { margin:0; font-size:2.2rem; color:#212121; font-weight:700; line-height:1.2; }
.video-header-enhanced .video-categories { margin:1rem 0; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.video-meta-info { display:flex; gap:20px; margin-top:12px; }
.meta-item { display:flex; align-items:center; gap:6px; color:#666; font-size:14px; }
.meta-item i { color:#1976d2; }

/* Video Section Enhanced */
.video-section-card { background:linear-gradient(135deg,#f8f9fa 0%,#fff 100%); border:2px solid #e9ecef; border-radius:12px; padding:1.8rem; transition:all 0.3s ease; position:relative; overflow:hidden; }
.video-section-card::before { content:''; position:absolute; top:0; left:0; width:4px; height:100%; background:linear-gradient(180deg,#1976d2,#42a5f5); }
.video-section-card:hover { border-color:#1976d2; box-shadow:0 4px 16px rgba(25,118,210,0.15); }
.video-section-title { display:flex; align-items:center; gap:12px; font-size:1.4rem; color:#212121; font-weight:600; margin:0 0 1.2rem 0; }
.section-number { width:32px; height:32px; background:linear-gradient(135deg,#1976d2,#1565c0); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; font-weight:700; flex-shrink:0; }
.video-section-title i { color:#1976d2; font-size:24px; }

/* Video Player Enhanced */
.video-player-wrapper { box-shadow:0 4px 16px rgba(0,0,0,0.15); border-radius:10px; overflow:hidden; }

/* Video Empty State */
.video-empty-state { padding:60px 20px; text-align:center; background:#f8f9fa; border-radius:12px; margin:20px 0; }

/* Responsividade Video Pages */
@media (max-width:768px) {
    .video-navigation { flex-direction:column; gap:16px; align-items:flex-start; }
    .navigation-buttons { width:100%; justify-content:space-between; }
    .video-title-wrapper { flex-direction:column; align-items:flex-start; }
    .video-icon-badge { width:40px; height:40px; font-size:20px; }
    .video-header-enhanced .entry-title { font-size:1.8rem; }
    .video-meta-info { flex-direction:column; gap:8px; }
    .taxonomy-header .header-content { flex-direction:column; align-items:flex-start; }
}

/* ========================================
   SIDENAV - NAVEGAÇÃO APRIMORADA
======================================== */
.sidenav-enhanced {
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    width: 280px !important;
}

/* Header do Sidenav */
.sidenav-header {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    padding: 24px 20px;
    margin: 0;
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.sidenav-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.sidenav-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidenav-logo-text h2 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidenav-logo-text span {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 2px;
}

/* User Info (Admin) */
.sidenav-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.user-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 400;
}

/* Divider */
.sidenav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
    margin: 12px 16px;
}

/* Section Title */
.sidenav-section-title {
    padding: 16px 20px 8px;
    margin: 0;
}

.sidenav-section-title span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidenav-section-title i {
    font-size: 14px;
    color: #1976d2;
}

/* Menu Items */
.sidenav-item {
    margin: 0 12px 4px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sidenav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 8px;
}

.sidenav-link i {
    width: 20px;
    text-align: center;
    color: #1976d2;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidenav-link span {
    flex: 1;
}

.sidenav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transition: width 0.3s ease;
    border-radius: 8px 0 0 8px;
}

.sidenav-item:hover .sidenav-link {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%);
    transform: translateX(4px);
    color: #1565c0;
}

.sidenav-item:hover .sidenav-link::before {
    width: 4px;
}

.sidenav-item:hover .sidenav-link i {
    transform: scale(1.1);
    color: #1565c0;
}

/* Active Link */
.sidenav-item .sidenav-link.active,
.sidenav-item .sidenav-link[aria-current="page"] {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.sidenav-item .sidenav-link.active i,
.sidenav-item .sidenav-link[aria-current="page"] i {
    color: #fff;
}

/* Item Destacado (Categorias dos Vídeos) */
.sidenav-item-highlighted {
    margin: 8px 12px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #1976d2;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.sidenav-item-highlighted .sidenav-link {
    color: #1565c0;
    font-weight: 600;
    padding: 14px 16px;
}

.sidenav-item-highlighted .sidenav-link i {
    color: #1976d2;
    font-size: 20px;
}

.sidenav-item-highlighted:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.3);
}

.sidenav-item-highlighted:hover .sidenav-link {
    background: transparent;
    transform: none;
}

/* Badge */
.sidenav-badge {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(255, 152, 0, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 152, 0, 0.6);
    }
}

/* Logout Link */
.sidenav-link-logout {
    color: #e74c3c !important;
}

.sidenav-link-logout i {
    color: #e74c3c !important;
}

.sidenav-item:hover .sidenav-link-logout {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 50%);
    color: #c0392b !important;
}

.sidenav-item:hover .sidenav-link-logout i {
    color: #c0392b !important;
}

/* Responsividade Sidenav */
@media (max-width: 992px) {
    .sidenav-enhanced {
        transform: translateX(-100%);
    }
    
    .sidenav-enhanced.sidenav-open {
        transform: translateX(0);
    }
    
    .control-panel {
        padding-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .sidenav-enhanced {
        width: 260px !important;
    }
    
    .sidenav-logo-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .sidenav-user-info {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   DASHBOARD CENTRAL - KPIs E ATALHOS
======================================== */

/* Seções do Dashboard */
.dashboard-kpis-section,
.dashboard-shortcuts-section {
    margin-top: 32px;
}

/* KPIs Grid */
.dashboard-kpis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

/* KPI Card Base */
.kpi-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 20px;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.kpi-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* KPI Icon */
.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* KPI Content */
.kpi-content {
    flex: 1;
    will-change: auto;
    backface-visibility: hidden;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    color: #212121;
    will-change: auto;
}

.kpi-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
    will-change: auto;
}

/* KPI Variações de Cor */
.kpi-usuarios {
    border-left-color: #1976d2;
}

.kpi-usuarios .kpi-icon {
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

.kpi-videos {
    border-left-color: #f44336;
}

.kpi-videos .kpi-icon {
    background: linear-gradient(135deg, #f44336, #e53935);
}

.kpi-categorias {
    border-left-color: #ff9800;
}

.kpi-categorias .kpi-icon {
    background: linear-gradient(135deg, #ff9800, #fb8c00);
}

.kpi-unidades {
    border-left-color: #4caf50;
}

.kpi-unidades .kpi-icon {
    background: linear-gradient(135deg, #4caf50, #43a047);
}

/* KPI Unidades Lista */
.kpi-unidades .kpi-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    will-change: auto;
}

.kpi-unidades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    will-change: auto;
}

.kpi-unidade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
    will-change: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.unidade-name {
    color: #333;
    font-weight: 500;
}

.unidade-count {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* KPI Loading */
.kpi-loading {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
}

/* KPI Error */
.kpi-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

.kpi-error i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ========================================
   ATALHOS RÁPIDOS
======================================== */

.dashboard-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

/* Shortcut Card */
.shortcut-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    border: 2px solid transparent;
}

.shortcut-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.shortcut-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(25,118,210,0.2);
    border-color: #1976d2;
}

.shortcut-card:hover::before {
    transform: scaleX(1);
}

/* Shortcut Icon */
.shortcut-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.shortcut-card:hover .shortcut-icon {
    transform: scale(1.1);
}

/* Shortcut Icon Variações */
.shortcut-icon.usuarios {
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

.shortcut-icon.videos {
    background: linear-gradient(135deg, #f44336, #e53935);
}

.shortcut-icon.categorias {
    background: linear-gradient(135deg, #ff9800, #fb8c00);
}

.shortcut-icon.visualizar {
    background: linear-gradient(135deg, #9c27b0, #8e24aa);
}

/* Shortcut Content */
.shortcut-content {
    flex: 1;
}

.shortcut-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: #212121;
    font-weight: 600;
    line-height: 1.3;
}

.shortcut-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Shortcut Arrow */
.shortcut-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.shortcut-card:hover .shortcut-arrow {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: #fff;
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVIDADE DASHBOARD CENTRAL
======================================== */

@media (max-width: 768px) {
    .dashboard-kpis-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .kpi-card {
        padding: 20px;
    }
    
    .kpi-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .kpi-value {
        font-size: 2rem;
    }
    
    .shortcut-card {
        padding: 20px;
    }
    
    .shortcut-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .kpi-card {
        flex-direction: column;
        text-align: center;
    }
    
    .kpi-unidades .kpi-content {
        width: 100%;
    }
    
    .shortcut-card {
        gap: 12px;
    }
}

/* ========================================
   ALERTAS DO SISTEMA
======================================== */

.dashboard-alerts-section {
    margin-top: 32px;
}

.dashboard-alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.alert-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.alert-card:hover {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.alert-card i {
    font-size: 32px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    will-change: auto;
    backface-visibility: hidden;
}

.alert-content strong {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    will-change: auto;
}

.alert-content span {
    font-size: 0.9rem;
    color: #666;
    will-change: auto;
}

/* Alert Variants */
.alert-warning {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #fff8e1 0%, #fff 100%);
}

.alert-warning i {
    color: #ff9800;
}

.alert-warning strong {
    color: #e65100;
}

.alert-info {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%);
}

.alert-info i {
    color: #2196f3;
}

.alert-info strong {
    color: #1565c0;
}

.alert-success {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #fff 100%);
}

.alert-success i {
    color: #4caf50;
}

.alert-success strong {
    color: #2e7d32;
}

.alert-error {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fff 100%);
}

.alert-error i {
    color: #f44336;
}

.alert-loading {
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
}

/* Alert Clickable */
.alert-clickable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.alert-clickable:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.alert-clickable:active {
    transform: translateY(-1px) translateZ(0);
}

.alert-arrow {
    font-size: 18px;
    color: #999;
    transition: transform 0.3s ease, color 0.3s ease;
}

.alert-clickable:hover .alert-arrow {
    transform: translateX(4px);
    color: #666;
}

/* ========================================
   MODAL DE DETALHES DE ALERTAS
======================================== */

.alert-details-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
}

.alert-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #1976d2;
    transition: background 0.2s ease;
}

.alert-detail-item:hover {
    background: #e9ecef;
}

.alert-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1976d2, #1565c0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.alert-detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-detail-content strong {
    font-size: 1rem;
    color: #212121;
    font-weight: 600;
    line-height: 1.3;
}

.alert-detail-content span {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Customização SweetAlert para detalhes */
.alert-details-modal .swal2-popup {
    border-radius: 12px;
}

.alert-details-html {
    padding: 0 !important;
}

/* Scrollbar customizada */
.alert-details-list::-webkit-scrollbar {
    width: 8px;
}

.alert-details-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.alert-details-list::-webkit-scrollbar-thumb {
    background: #1976d2;
    border-radius: 10px;
}

.alert-details-list::-webkit-scrollbar-thumb:hover {
    background: #1565c0;
}

/* ========================================
   RESPONSIVIDADE ALERTAS
======================================== */

@media (max-width: 480px) {
    .alert-detail-item {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-detail-icon {
        margin: 0 auto;
    }
}

/* ========================================
   ATIVIDADE RECENTE
======================================== */

.dashboard-activity-section {
    margin-top: 32px;
}

.dashboard-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.activity-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.activity-card-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.activity-icon.usuarios {
    background: linear-gradient(135deg, #1976d2, #1565c0);
}

.activity-icon.videos {
    background: linear-gradient(135deg, #f44336, #e53935);
}

.activity-icon.categorias {
    background: linear-gradient(135deg, #ff9800, #fb8c00);
}

.activity-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #212121;
    font-weight: 600;
}

.activity-list {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

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

.activity-item:hover {
    background: #f8f9fa;
}

.activity-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    flex-shrink: 0;
}

.activity-item-content {
    flex: 1;
    min-width: 0;
}

.activity-item-title {
    font-size: 0.95rem;
    color: #212121;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-tag {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.activity-date {
    font-size: 0.8rem;
    color: #999;
}

.activity-count {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.activity-loading,
.activity-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.activity-loading .spinner {
    margin: 0 auto;
}

.activity-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.activity-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   GRÁFICO DE DISTRIBUIÇÃO
======================================== */

.dashboard-chart-section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 16px;
}

.chart-container {
    min-height: 300px;
}

.chart-loading,
.chart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.chart-loading .spinner {
    margin: 0 auto;
}

.chart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.chart-empty p {
    margin: 0;
    font-size: 1rem;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-bar-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: center;
}

.chart-bar-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-wrapper {
    background: #f5f5f5;
    border-radius: 8px;
    height: 36px;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    min-width: 40px;
    transition: width 1s ease;
    will-change: width;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.chart-bar-value {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ========================================
   RESPONSIVIDADE NOVAS SEÇÕES
======================================== */

@media (max-width: 768px) {
    .dashboard-alerts-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-activity-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-bar-item {
        grid-template-columns: 100px 1fr;
        gap: 12px;
    }
    
    .chart-bar-label {
        font-size: 0.85rem;
    }
    
    .chart-bar-wrapper {
        height: 32px;
    }
}

@media (max-width: 480px) {
    .alert-card {
        flex-direction: column;
        text-align: center;
    }
    
    .chart-bar-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .chart-bar-label {
        text-align: left;
    }
}




