/**
 * Painel Administrativo Responsivo - Accura LMS
 * Arquivo CSS principal
 */

/* IMPORTANTE: Evitar conflitos com WooCommerce */
/* Aplicar estilos apenas dentro do contexto do painel admin */
.accura-admin-panel {
    /* Isolar estilos para não afetar WooCommerce */
    all: initial;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Reset e Base - Escopo limitado */
.accura-admin-panel * {
    box-sizing: border-box;
}

.accura-admin-panel {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    background-color: #f8fafc;
    line-height: 1.6;
}

/* Mobile Toggle Button */
.accura-mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.accura-mobile-toggle:hover {
    background: #f9fafb;
    border-color: #18a84d;
}

.accura-mobile-toggle.active {
    background: #18a84d;
    border-color: #18a84d;
}

.accura-mobile-toggle.active .hamburger-line {
    background: #ffffff;
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #4a5573;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.accura-mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.accura-mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.accura-mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Overlay para Mobile */
.accura-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.accura-overlay.active {
    opacity: 1;
}

/* Sidebar */
.accura-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
   
}

/* Header do Sidebar */
.accura-sidebar-header {
    padding: 24px 20px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accura-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accura-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.accura-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.accura-close-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    color: #6b7280;
}

.accura-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Navegação */
.accura-sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.accura-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 16px;
}

.accura-nav-item {
    margin-bottom: 4px;
}

.accura-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #4a5573;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
}

.accura-nav-link:hover {
    background: linear-gradient(135deg, #18a84d, #21c25c);
    color: #ffffff;
    text-decoration: none;
}

.accura-nav-link.active {
    background: linear-gradient(135deg, #18a84d, #21c25c);
    color: #ffffff;
}

.accura-nav-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.accura-nav-text {
    font-weight: 600;
}

/* Footer do Sidebar */
.accura-sidebar-footer {
    padding: 16px;
    border-top: 2px solid #e5e7eb;
}

.accura-logout-link {
    color: #dc2626 !important;
}

.accura-logout-link:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* Conteúdo Principal */
.accura-main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background: #f8fafc;
    width: calc(100vw - 280px);
    overflow-x: hidden;
}

.accura-content-wrapper {
    padding: 20px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.accura-page-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    min-height: calc(100vh - 120px);
    max-width: 100% !important;
    width: 100%;
    box-sizing: border-box;
}

/* Loading */
.accura-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #6b7280;
}

.accura-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #18a84d;
    border-radius: 50%;
    animation: accura-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes accura-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estados de Error */
.accura-admin-panel-error {
    max-width: 600px;
    margin: 40px auto;
    padding: 32px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    text-align: center;
}

.accura-admin-panel-error p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 16px;
}

/* Botões */
.accura-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.accura-btn-primary {
    background: linear-gradient(135deg, #18a84d, #21c25c);
    color: #ffffff;
}

.accura-btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 168, 77, 0.3);
}

/* Responsividade */
@media (max-width: 768px) {
    .accura-mobile-toggle {
        display: block;
    }
    
    .accura-close-btn {
        display: block;
    }
    
    .accura-sidebar {
        transform: translateX(-100%);
    }
    
    .accura-sidebar.active {
        transform: translateX(0);
    }
    
    .accura-main-content {
        margin-left: 0;
        padding-top: 80px;
        width: 100vw;
    }
    
    .accura-content-wrapper {
        padding: 16px 12px;
    }
    
    .accura-page-content {
        min-height: calc(100vh - 120px);
    }
    
    .accura-overlay.active {
        display: block;
    }
    
    .accura-nav-list {
    list-style: none;
    margin: 0;
    padding: 10px 4px 40px 4px;

}

.accura-nav-item {
    margin-bottom: 2px;
}

}

@media (max-width: 480px) {
    .accura-sidebar {
        width: 100%;
    }
    
    .accura-content-wrapper {
        padding: 16px 12px;
    }
    
    .accura-loading {
        padding: 60px 20px;
    }
}

/* Animations */
.accura-fade-in {
    animation: accura-fadeIn 0.3s ease-out;
}

@keyframes accura-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Customization */
.accura-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.accura-sidebar-nav::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.accura-sidebar-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.accura-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Accessibility */
.accura-nav-link:focus,
.accura-btn:focus {
    outline: 2px solid #18a84d;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .accura-sidebar,
    .accura-mobile-toggle {
        display: none;
    }
    
    .accura-main-content {
        margin-left: 0;
    }
}
