:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0a58ca;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
    
    /* Variáveis do sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-transition: all 0.3s;
    --sidebar-link-active-bg: rgba(13, 110, 253, 0.2);
    --sidebar-link-active-color: var(--primary-color);
    --sidebar-link-hover-bg: rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 14px;
}

/* Estilos para o layout com sidebar */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Estilos para a sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    transition: var(--sidebar-transition);
    overflow-y: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-content {
    width: 100%;
    height: 100%;
}

.sidebar-header {
    height: 60px;
}

.sidebar-user {
    background-color: rgba(0, 0, 0, 0.01);
}

.sidebar .user-logo-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-nav {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    color: var(--dark-text);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.15rem;
    transition: all 0.2s ease;
    font-size: 14px;
}

.sidebar-link:hover {
    background-color: var(--sidebar-link-hover-bg);
    color: var(--primary-color);
}

.sidebar-link.active {
    background-color: var(--sidebar-link-active-bg);
    color: var(--sidebar-link-active-color);
    font-weight: 500;
    border-left: 3px solid var(--primary-color);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

/* Conteúdo principal ao lado da sidebar */
.main-content-wrapper {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--sidebar-transition);
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.03);
    overflow-x: hidden;
    padding: 1.25rem 0;
}

/* Estilos para responsividade da sidebar */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content-wrapper {
        width: 100%;
        margin-left: 0;
    }
}

/* Estilos do card */
.card {
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.card-shadow {
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card-shadow:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    font-size: 15px;
}

/* Estilos para imagem do perfil/logo */
.profile-img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #f8f9fa;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Estilos para tabelas */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.table th {
    background-color: var(--light-bg);
    color: var(--dark-text);
    font-weight: 600;
    padding: 0.65rem 0.8rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 13px;
}

.table td {
    padding: 0.65rem 0.8rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
    font-size: 14px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Estilos para tabela de usuários */
.table-usuarios th, 
.table-usuarios td {
    vertical-align: middle;
}

.user-logo-small {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* Estilos para notificações */
.sidebar-dropdown {
    position: absolute;
    left: calc(var(--sidebar-width) - 10px);
    top: 0;
    z-index: 1031;
    max-height: 400px;
    overflow-y: auto;
}

/* Menu de notificações melhorado */
.notifications-dropdown {
    min-width: 320px;
    max-width: 380px;
    max-height: 450px;
    overflow-y: auto;
}

.dropdown-item:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Evita truncamento de mensagens longas nas notificações */
.dropdown-menu .text-muted {
    white-space: normal;
    word-wrap: break-word;
}

/* Optimização dos submenus da sidebar */
.sidebar .dropdown-menu {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    min-width: 220px;
}

.sidebar .dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin: 0.1rem 0.25rem;
}

.sidebar .dropdown-item:hover {
    background-color: #e9ecef;
    color: #212529;
}

.sidebar .dropdown-item i {
    width: 16px;
    font-size: 12px;
    text-align: center;
}

.sidebar .dropdown-header {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

/* Menu de administração - cor diferenciada */
#adminDropdown + .dropdown-menu {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

#adminDropdown + .dropdown-menu .dropdown-item:hover {
    background-color: #fff3cd;
    color: #856404;
}

/* Menu de notificações - cor diferenciada */
#notificacoesDropdown + .dropdown-menu {
    background-color: #ffffff;
    border-color: #e9ecef;
}

#notificacoesDropdown + .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #212529;
}

/* Estilos específicos para o dropdown de notificações */
.notifications-dropdown .dropdown-item {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid #f1f3f4;
    white-space: normal !important;
    word-wrap: break-word !important;
}

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

.notifications-dropdown .dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem 1rem 0.5rem;
    margin-bottom: 0;
    font-size: 13px;
}

.notifications-dropdown .dropdown-divider {
    margin: 0;
}

.notifications-dropdown small {
    display: block;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Responsividade para o menu de notificações */
@media (max-width: 768px) {
    .notifications-dropdown {
        min-width: 280px;
        max-width: 90vw;
    }
}

/* Menu de configurações - cor diferenciada */
#configuracaoDropdown + .dropdown-menu {
    background-color: #f0f8e8;
    border-color: #c3e6cb;
}

#configuracaoDropdown + .dropdown-menu .dropdown-item:hover {
    background-color: #d4edda;
    color: #155724;
}

#configuracaoDropdown + .dropdown-menu .dropdown-item.active {
    background-color: #28a745;
    color: #ffffff;
    font-weight: 500;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* Estilos para formulários */
.form-section {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.required-field::after {
    content: "*";
    color: var(--danger-color);
    margin-left: 0.25rem;
}

.form-control {
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.form-select {
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    border: 1px solid #dee2e6;
    background-position: right 0.8rem center;
    font-size: 14px;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-text {
    color: var(--secondary-color);
}

/* Estilos para o dashboard */
.stat-card {
    border-radius: 8px;
    padding: 0.75rem;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
    border-left: 4px solid;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.stat-card .stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0;
    font-size: 13px;
}

.stat-card.primary {
    border-left-color: var(--primary-color);
}

.stat-card.primary .stat-icon {
    color: var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.success .stat-icon {
    color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.warning .stat-icon {
    color: var(--warning-color);
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card.danger .stat-icon {
    color: var(--danger-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

.stat-card.info .stat-icon {
    color: var(--info-color);
}

.stat-card.secondary {
    border-left-color: var(--secondary-color);
}

.stat-card.secondary .stat-icon {
    color: var(--secondary-color);
}

.dashboard-section {
    margin-bottom: 1.5rem;
}

/* Dashboard specific improvements for harmony */
.dashboard .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.dashboard .btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.dashboard .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

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

.dashboard-section-title {
    font-weight: 700;
    margin-bottom: 0.8rem;
    position: relative;
    display: inline-block;
    font-size: 1.1rem;
}

.dashboard-section-title:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Estilos para a navbar */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 0.6rem 0.8rem;
    background-color: white;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark-text);
}

.navbar-brand i {
    color: var(--primary-color);
}

.navbar-brand img {
    max-height: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-text);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--primary-color);
}

.nav-item.active .nav-link {
    color: var(--primary-color);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

/* Estilos para página inicial */
.hero-section {
    background-color: #343a40;
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #007bff;
}

/* Estilos para o footer */
.footer {
    background-color: #343a40;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 2rem;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #fff;
}

/* Estilização para sidebar-open */
body.sidebar-open {
    overflow: hidden;
}

/* Otimizações para tamanhos mais harmoniosos */
.btn {
    font-size: 14px;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    font-size: 13px;
    padding: 0.4rem 0.7rem;
}

.btn-lg {
    font-size: 15px;
    padding: 0.65rem 1.1rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

h5 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.container, .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.card-body {
    padding: 1rem;
}

.mb-4 {
    margin-bottom: 1.25rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.p-4 {
    padding: 1.25rem !important;
}

.p-3 {
    padding: 1rem !important;
}

/* Estilos específicos para página de assinatura - Cards de planos mais compactos */
.subscription-plan-card {
    font-size: 14px;
}

.subscription-plan-card .card-header {
    padding: 0.75rem 1rem;
}

.subscription-plan-card .card-header h5 {
    font-size: 16px;
    margin-bottom: 0.25rem;
}

.subscription-plan-card .card-body {
    padding: 1rem 0.85rem;
}

.subscription-plan-card .display-6 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

.subscription-plan-card .text-muted {
    font-size: 13px;
    margin-bottom: 0.75rem !important;
}

.subscription-plan-card .list-unstyled li {
    margin-bottom: 0.5rem !important;
    font-size: 13px;
}

.subscription-plan-card .btn {
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.subscription-plan-card .badge {
    font-size: 11px;
    padding: 0.25rem 0.5rem;
}

/* Cards de status do plano atual */
.subscription-status-card .card-header h5 {
    font-size: 16px;
}

.subscription-status-card .fs-5 {
    font-size: 15px !important;
}

.subscription-status-card .badge {
    font-size: 12px;
    padding: 0.4rem 0.6rem;
}

.subscription-status-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.subscription-status-card h6 {
    font-size: 14px;
    margin-bottom: 0.5rem;
}

.subscription-status-card .bg-light {
    padding: 0.75rem !important;
}

.subscription-status-card .btn-sm {
    font-size: 13px;
    padding: 0.4rem 0.7rem;
}

/* Otimizações para alertas informativos */
.subscription-info-alert .alert-heading {
    font-size: 16px;
    margin-bottom: 0.5rem !important;
}

.subscription-info-alert p {
    font-size: 14px;
}

.subscription-info-alert .fa-2x {
    font-size: 1.5em !important;
}

/* FAQ accordion mais compacto */
.subscription-faq .accordion-button {
    font-size: 14px;
    padding: 0.75rem 1rem;
}

.subscription-faq .accordion-body {
    font-size: 14px;
    padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
    .sidebar.show {
        display: block !important;
        z-index: 1040;
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
}

/* Estilos responsivos para tabelas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Estilos para botões */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Estilos para botões responsivos em cards */
.action-buttons .btn {
    margin-bottom: 0.5rem;
}

/* Estilos para cards responsivos */
.card-responsive {
    height: 100%;
    margin-bottom: 1rem;
}

/* Estilos para menus responsivos */
.dropdown-menu-responsive {
    width: 100%;
}

/* Estilos para gráficos responsivos */
.chart-container {
    position: relative;
    width: 100%;
}

/* Media Queries */
@media (max-width: 991px) {
    /* Estilos para telas médias (tablets) */
    .navbar .nav-item .dropdown-menu {
        width: 100%;
    }
    
    .stat-card .stat-value {
        font-size: 1.6rem;
    }
    
    .profile-img {
        max-width: 120px;
        max-height: 120px;
    }
}

@media (max-width: 768px) {
    /* Estilos para telas pequenas (smartphones) */
    .main-content {
        padding: 1rem 0;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .btn-responsive {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .profile-img {
        max-width: 100px;
        max-height: 100px;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    /* Estilos para telas muito pequenas (smartphones pequenos) */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    h1, .h1 {
        font-size: 1.8rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group > .btn {
        border-radius: 0.25rem !important;
        margin-bottom: 0.25rem;
    }
}

/* Estilo especial para o botão Criar Orçamento em destaque */
.sidebar-link.criar-orcamento-destaque {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca) !important;
    color: white !important;
    font-weight: 600 !important;
    margin: 0.5rem 0.75rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3) !important;
    border: 2px solid transparent !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.sidebar-link.criar-orcamento-destaque:hover {
    background: linear-gradient(135deg, #0a58ca, var(--primary-color)) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4) !important;
}

.sidebar-link.criar-orcamento-destaque:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3) !important;
}

.sidebar-link.criar-orcamento-destaque i {
    color: white !important;
    font-size: 16px;
}

.sidebar-link.criar-orcamento-destaque span {
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Efeito de brilho sutil */
.sidebar-link.criar-orcamento-destaque::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.sidebar-link.criar-orcamento-destaque:hover::before {
    left: 100%;
}

/* Estado ativo do botão Criar Orçamento */
.sidebar-link.criar-orcamento-destaque.active {
    background: linear-gradient(135deg, #0a58ca, #084298) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4) !important;
}

.sidebar-link.criar-orcamento-destaque.active i {
    color: white !important;
}

/* Ajuste no espaçamento para dar mais destaque */
.sidebar-nav .nav-item:first-child {
    margin-bottom: 0.75rem;
}