/* Estilos Customizados - WR Contabilidade */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Botões */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
}

/* Tabelas */
.table {
    background-color: white;
    table-layout: auto;
    width: 100%;
}

.table thead {
    background-color: #f8f9fa;
}

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

/* Tabelas responsivas - ajustar para notebooks */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Para tabelas com muitas colunas - ajustar larguras mínimas */
.table th:first-child,
.table td:first-child {
    min-width: 150px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 120px;
}

/* Coluna de ações - largura fixa */
.table th:last-child,
.table td:last-child {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

/* Formulários */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alertas */
.alert {
    border-radius: 6px;
    border: none;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.dashboard-card-primary {
    border-left-color: #0d6efd;
}

.dashboard-card-success {
    border-left-color: #28a745;
}

.dashboard-card-warning {
    border-left-color: #ffc107;
}

.dashboard-card-danger {
    border-left-color: #dc3545;
}

.dashboard-card-info {
    border-left-color: #17a2b8;
}

.dashboard-card-secondary {
    border-left-color: #6c757d;
}

.dashboard-card .card-body {
    padding: 1rem;
    min-height: 90px;
    display: flex;
    align-items: center;
}

.dashboard-card .card-body > .d-flex {
    width: 100%;
}

.dashboard-card .card-body h3 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #212529;
    margin: 0;
    line-height: 1.2;
}

.dashboard-card .card-body h6 {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

.dashboard-card .card-body .small {
    font-size: 0.75rem;
}

.dashboard-card .card-body i.fa-lg {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: auto;
}

/* Responsividade para cards do dashboard */
@media (max-width: 575.98px) {
    .dashboard-card .card-body {
        padding: 0.75rem;
        min-height: 80px;
    }
    
    .dashboard-card .card-body h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-card .card-body h6 {
        font-size: 0.8rem;
    }
    
    .dashboard-card .card-body i.fa-lg {
        font-size: 1.25rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .dashboard-card .card-body h3 {
        font-size: 1.6rem;
    }
    
    .dashboard-card .card-body i.fa-lg {
        font-size: 1.35rem;
    }
}

/* Melhorias gerais de responsividade */
@media (max-width: 767.98px) {
    /* Tabelas responsivas em mobile */
    .table-responsive {
        border: none;
    }
    
    /* Botões em mobile */
    .btn {
        white-space: nowrap;
    }
    
    /* Cards em mobile */
    .card-body {
        padding: 0.75rem;
    }
    
    /* Formulários em mobile */
    .form-control, .form-select {
        font-size: 16px; /* Evita zoom no iOS */
    }
}

/* Responsive */
/* Notebooks e telas médias (768px - 1600px) */
@media (min-width: 768px) and (max-width: 1600px) {
    /* Cards do dashboard - ajustar para caber melhor */
    .dashboard-card .card-body {
        padding: 0.75rem 0.5rem;
        min-height: 85px;
    }
    
    .dashboard-card .card-body h3 {
        font-size: 1.4rem;
    }
    
    .dashboard-card .card-body h6 {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .dashboard-card .card-body i.fa-lg {
        font-size: 1.2rem;
    }
    
    /* Tabelas em notebooks - ajustar fontes e espaçamentos */
    .table-sm {
        font-size: 0.85rem;
    }
    
    .table-sm th,
    .table-sm td {
        padding: 0.4rem 0.3rem;
    }
    
    .table-sm th {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Ajustar espaçamento entre cards */
    .row.g-2 > * {
        padding-right: calc(var(--bs-gutter-x) * 0.5);
        padding-left: calc(var(--bs-gutter-x) * 0.5);
    }
}

/* Notebooks pequenos (1366px - 1440px) - ajustes mais agressivos */
@media (min-width: 1366px) and (max-width: 1440px) {
    .dashboard-card .card-body h3 {
        font-size: 1.3rem;
    }
    
    .dashboard-card .card-body h6 {
        font-size: 0.7rem;
    }
    
    .dashboard-card .card-body i.fa-lg {
        font-size: 1.1rem;
    }
}

/* Telas pequenas (mobile) */
@media (max-width: 767.98px) {
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .dashboard-card .card-body {
        padding: 0.75rem;
    }
    
    .dashboard-card .card-body h3 {
        font-size: 1.25rem;
    }
    
    .dashboard-card .card-body h6 {
        font-size: 0.75rem;
    }
    
    .dashboard-card .card-body i.fa-lg {
        font-size: 1.1rem;
    }
    
    /* Ajustes para botões em mobile - relatórios */
    .card-header {
        padding: 1rem !important;
    }
    
    .card-header .d-flex.flex-column {
        gap: 1rem;
    }
    
    .card-header .d-flex.flex-wrap {
        width: 100%;
        gap: 0.5rem;
    }
    
    .card-header .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        max-width: 100%;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Em telas muito pequenas, fazer botões ocuparem 100% */
    @media (max-width: 400px) {
        .card-header .btn {
            flex: 1 1 100%;
            min-width: 100%;
        }
    }
    
    /* Ajustar tamanho dos ícones em botões pequenos */
    .btn-sm i {
        font-size: 0.9rem;
        margin-right: 0.25rem;
    }
    
    /* Garantir que textos não quebrem em botões */
    .btn-sm {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Login Page */
.justify-content-center {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Upload Area */
#divSenha,
#divEmpresa,
#divSocio {
    transition: all 0.3s ease;
}

/* Status Colors */
.status-ativo {
    color: var(--success-color);
}

.status-expirado {
    color: var(--danger-color);
}

.status-a-vencer {
    color: var(--warning-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%); /* Cor padrão - será sobrescrita pelo inline style se configurada */
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.15s ease, min-width 0.15s ease, max-width 0.15s ease, transform 0.15s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    border-radius: 0 15px 15px 0; /* Bordas arredondadas no canto superior direito e inferior direito */
}

.sidebar-header {
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 100px;
}

.sidebar-header .sidebar-brand {
    flex: 1;
    margin-right: 2.5rem;
}

.sidebar-header .sidebar-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    width: 100%;
}

.sidebar-brand i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.sidebar-brand-text {
    white-space: nowrap;
}

.sidebar-logo-img {
    max-height: 100px !important;
    height: 100px !important;
    max-width: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
}

.sidebar-toggle {
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    border: none;
    background: transparent;
}

.sidebar-toggle:hover {
    color: rgba(255,255,255,0.8);
}

/* Botão de colapsar sidebar no topbar */
.sidebar-collapse-btn {
    color: #495057;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    transition: all 0.15s ease;
    vertical-align: middle;
}

.sidebar-collapse-btn:hover {
    color: #0d6efd;
    transform: scale(1.1);
}

.sidebar-collapse-btn:focus {
    box-shadow: none;
    outline: none;
}

/* Estado collapsed da sidebar */
#sidebar.sidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    overflow: visible;
    transition: width 0.15s ease, min-width 0.15s ease, max-width 0.15s ease !important;
}

.sidebar.collapsed {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    overflow: visible;
    transition: width 0.15s ease, min-width 0.15s ease, max-width 0.15s ease !important;
}

/* Proteção adicional: forçar largura quando colapsada (prevenir expansão acidental) */
body.sidebar-collapsed #sidebar.sidebar,
body.sidebar-collapsed .sidebar {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-nav .nav-link span,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user i:last-child {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Quando colapsada, ocultar o item pai do submenu mas mostrar os subitens */
.sidebar.collapsed .sidebar-nav .nav-item.has-submenu > .nav-link {
    display: none !important;
}

/* Quando colapsada, mostrar os subitens como itens principais */
.sidebar.collapsed .sidebar-nav .nav-item.has-submenu .submenu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
}

.sidebar.collapsed .sidebar-nav .submenu li {
    margin: 0.25rem 0 !important;
    display: block !important;
}

.sidebar.collapsed .sidebar-nav .submenu .nav-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.75rem 0.5rem !important;
    padding-left: 0.5rem !important;
    font-size: 1rem !important;
    color: rgba(255,255,255,0.9) !important;
}

.sidebar.collapsed .sidebar-nav .submenu .nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
}

.sidebar.collapsed .sidebar-nav .submenu .nav-link i {
    display: inline-block !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    font-size: 1.5rem !important;
    width: auto !important;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    margin-right: 0;
}

.sidebar.collapsed .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-nav .nav-link i {
    margin-right: 0;
    font-size: 1.5rem;
}

.sidebar.collapsed .sidebar-nav .submenu-toggle .submenu-icon {
    display: none;
}

.sidebar.collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .sidebar-user-avatar {
    margin-right: 0;
}

.sidebar.collapsed .sidebar-logo-img {
    max-height: 60px !important;
    height: 60px !important;
}

.sidebar.collapsed .sidebar-header {
    padding: 1rem 0.5rem;
    min-height: auto;
}

/* Ajustar main-content quando sidebar está collapsed */
.main-content.with-sidebar {
    margin-left: 250px;
    transition: margin-left 0.15s ease;
}

body.sidebar-collapsed .main-content.with-sidebar,
.sidebar.collapsed ~ .main-content.with-sidebar {
    margin-left: 70px;
}

body.sidebar-collapsed .topbar {
    left: 70px;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

/* Scrollbar customizado para sidebar */
.sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.sidebar-nav {
    padding: 0;
}

.sidebar-nav .nav-item {
    margin: 0.15rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: rgba(255,255,255,0.5);
}

.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

/* Submenu */
.sidebar-nav .has-submenu {
    position: relative;
}

.sidebar-nav .submenu-toggle {
    cursor: pointer;
    justify-content: space-between;
}

.sidebar-nav .submenu-toggle .submenu-icon {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    margin-left: auto;
    margin-right: 0;
    width: auto !important;
}

.sidebar-nav .has-submenu.submenu-open .submenu-toggle .submenu-icon {
    transform: rotate(180deg);
}

.sidebar-nav .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.15s ease, opacity 0.15s ease;
    background: rgba(0,0,0,0.2);
    opacity: 0;
}

.sidebar-nav .has-submenu.submenu-open .submenu {
    max-height: 500px;
    opacity: 1;
}

.sidebar-nav .submenu li {
    margin: 0;
}

.sidebar-nav .submenu .nav-link {
    padding-left: 3rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
}

.sidebar-nav .submenu .nav-link i {
    font-size: 0.9rem;
    width: 18px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.3s ease;
    width: 100%;
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-user-avatar {
    font-size: 2rem;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
}

.sidebar-user-avatar img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-user-info {
    flex: 1;
    text-align: left;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.125rem;
}

.sidebar-user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Remover ícone duplicado do Bootstrap dropdown-toggle */
.sidebar-user.dropdown-toggle::after {
    display: none !important;
}

/* Estilizar ícone de seta customizado */
.sidebar-user-arrow {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: inline-block;
}

/* Animação: rotacionar seta quando dropdown está aberto */
.dropdown.show .sidebar-user .sidebar-user-arrow,
.sidebar-user[aria-expanded="true"] .sidebar-user-arrow {
    transform: rotate(180deg);
}

/* Garantir que a animação funcione mesmo sem aria-expanded */
#userDropdown[aria-expanded="true"] .sidebar-user-arrow {
    transform: rotate(180deg);
}

/* Centralizar itens do dropdown do perfil na sidebar */
.sidebar-footer .dropdown {
    position: relative;
}

.sidebar-footer .dropdown-menu {
    text-align: center;
    min-width: 100%;
    width: 100%;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    top: auto !important;
    bottom: 100% !important;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.sidebar-footer .dropdown-menu.show {
    transform: translateX(-50%) !important;
}

.sidebar-footer .dropdown-menu .dropdown-item {
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-footer .dropdown-menu .dropdown-item i {
    margin-right: 0;
}

/* Overlay para mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

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

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    height: 60px;
    background: white;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: left 0.15s ease;
}

.sidebar-toggle-mobile {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    color: #495057;
    padding: 0.5rem;
    margin-right: 1rem;
}

.sidebar-toggle-mobile:hover {
    color: #0d6efd;
}

.topbar-title {
    flex: 1;
}

.topbar-title h4 {
    color: #212529;
    font-size: 1.25rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.topbar-user {
    display: flex;
    align-items: center;
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.topbar-user:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

.topbar-user i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.topbar-user img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    margin-right: 0.5rem;
}

/* Estilos da Página de Perfil */
.profile-header {
    animation: fadeInDown 0.5s ease-out;
}

.profile-header .card {
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

.profile-header .card-body {
    background: transparent;
    border-radius: 0;
    margin: 0;
}

.profile-header h2 {
    color: #212529 !important;
}

.profile-header .text-muted {
    color: #6c757d !important;
}

.profile-avatar-large {
    position: relative;
}

.profile-avatar-large::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    opacity: 0.3;
    animation: pulse 2s infinite;
}

.profile-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.profile-card .card-header {
    border-bottom: none;
    font-weight: 600;
    border-radius: 0;
}

.profile-card .card-header.bg-primary {
    background: #6c757d !important;
    color: white;
}

.profile-card .card-header.bg-info {
    background: #6c757d !important;
    color: white;
}

.profile-card .card-header.bg-warning {
    background: #6c757d !important;
    color: white;
}

.profile-card .form-label {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.profile-card .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    padding: 0.6rem 0.75rem;
}

.profile-card .form-control:focus {
    border-color: #6c757d;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.15);
    transform: translateY(-1px);
}

.profile-card .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
}

.profile-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.profile-card .btn-primary {
    background: #6c757d;
    border: none;
    color: white;
}

.profile-card .btn-primary:hover {
    background: #5a6268;
    color: white;
}

.profile-card .btn-warning {
    background: #6c757d;
    border: none;
    color: white;
}

.profile-card .btn-warning:hover {
    background: #5a6268;
    color: white;
}

.profile-card .btn-outline-danger:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.profile-card .input-group-text {
    border-radius: 8px 0 0 8px;
}

.profile-card .input-group .form-control {
    border-radius: 0 8px 8px 0;
}

.badge {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Main Content */
.main-content {
    margin-left: 0;
    min-height: 100vh;
    transition: margin-left 0.15s ease;
    background-color: #f5f5f5;
}

.main-content.with-sidebar {
    margin-left: 250px;
    padding-top: 60px;
}

/* Ajustar espaçamento do conteúdo quando não tem sidebar */
body:not(:has(.sidebar)) .main-content {
    padding-top: 0;
}

/* Sistema de Notificações */
.topbar-notification {
    position: relative;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.topbar-notification:hover {
    color: #0d6efd;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.65rem;
    padding: 0.2em 0.4em;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    min-width: 350px;
    max-width: 400px;
}

.notification-item {
    color: #212529;
    transition: background-color 0.2s;
    border-radius: 4px;
    margin: 2px 0;
}

.notification-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.notification-item-empty {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 1rem;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    .notification-dropdown {
        min-width: 300px;
        max-width: 90vw;
    }
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        border-radius: 0 15px 15px 0; /* Bordas arredondadas na lateral direita quando em mobile */
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .topbar {
        left: 0;
    }
    
    .main-content.with-sidebar {
        margin-left: 0;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle,
    .sidebar-toggle-mobile,
    .sidebar-overlay {
        display: none !important;
    }
}

