body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

footer a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

.sidebar {
    min-height: 100vh;
    background-color: #1e293b;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

[data-bs-theme="dark"] .sidebar {
    background-color: #0f172a;
    border-right: 1px solid var(--bs-border-color);
}

.sidebar a {
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    border-radius: 8px;
    margin: 4px 10px;
    transition: all 0.3s ease;
}

.sidebar a:hover,
.sidebar a.active {
    color: #ffffff;
    background-color: #334155;
    transform: translateX(5px);
}

.content {
    padding: 20px;
}

.card {
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    border: none;
    background-color: var(--bs-body-bg);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.widget-card .card:hover,
.col-xl-3 .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

[data-bs-theme="dark"] .widget-card .card:hover,
[data-bs-theme="dark"] .col-xl-3 .card:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(13, 110, 253, 0.3) !important;
}

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: nowrap !important;
    }

    .navbar-brand {
        font-size: 1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 45%;
    }

    .mobile-nav-group {
        gap: 0.25rem !important;
    }

    .mobile-nav-group .btn {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .dropdown-menu {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        transform: translateX(0) !important;
        min-width: 160px !important;
    }

    .modal-body {
        -webkit-overflow-scrolling: touch;
    }

    /* MÁGICA DOS CARTÕES NO CELULAR DE VOLTA! */
    .table-responsive table {
        white-space: normal !important;
        min-width: 100% !important;
    }

    .table-responsive table thead {
        display: none !important;
    }

    .table-responsive table tbody tr {
        display: block !important;
        background-color: var(--bs-body-bg) !important;
        border: 1px solid var(--bs-border-color) !important;
        border-radius: 0.75rem !important;
        margin-bottom: 1.25rem !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
        padding: 0.5rem !important;
    }

    .table-responsive table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 1px solid var(--bs-border-color) !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.9rem;
        gap: 10px;
    }

    .table-responsive table tbody td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
        padding-top: 1rem;
        padding-bottom: 0.5rem;
    }

    .table-responsive table tbody td::before {
        content: attr(data-label) !important;
        font-weight: 700 !important;
        color: #6c757d !important;
        text-transform: uppercase !important;
        font-size: 0.75rem !important;
        text-align: left !important;
        flex-shrink: 0;
    }

    .table-responsive table tbody td>* {
        text-align: right;
        margin: 0;
    }

    .table-striped>tbody>tr:nth-of-type(odd)>* {
        background-color: transparent;
        box-shadow: none;
    }

    .form-control,
    .form-select {
        transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    }

    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15) !important;
        border-color: #0d6efd !important;
    }
}

.bg-login-image {
    background-color: #0f172a; 
}

.theme-btn {
    position: fixed;
    top: 20px;       
    right: 20px;     
    z-index: 1050;   
    border-radius: 50%; 
    width: 45px;     
    height: 45px;    
    display: flex;
    align-items: center;
    justify-content: center;
}