/* Systhema ERP - Custom Styles */

/* Scrollbar customizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-sidebar);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Efeito de hover nos cards */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Badge customizado */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Botões com loading */
.btn.loading {
    pointer-events: none;
    opacity: 0.65;
}

.btn.loading::after {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Tabelas responsivas */
.table-responsive {
    border-radius: 8px;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: rgba(55, 136, 216, 0.1);
    color: var(--primary-color);
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Modal customizado */
.modal-content {
    background-color: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Inputs com ícones */
.input-group-text {
    background-color: var(--dark-bg);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 29, 41, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(55, 136, 216, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Tooltip customizado */
.tooltip-inner {
    background-color: var(--dark-sidebar);
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: var(--dark-sidebar);
}

/* Pagination */
.pagination .page-link {
    background-color: var(--dark-card);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Responsive - Ajustado para alinhar com layout principal */
@media (max-width: 991.98px) {
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1rem;
    }

    .topbar {
        padding: 0.75rem 1rem;
    }
}

/* Print styles */
@media print {

    .sidebar,
    .topbar,
    .btn,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .card {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}