/* Importação das Fontes */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Variáveis de Cores */
:root {
    /* Nova paleta de cores - Tons escuros e cinza */
    --dark-bg: #121212;
    --dark-surface: #1e1e1e;
    --dark-surface-lighter: #252525;
    --dark-card: #242424;
    --dark-border: rgba(255, 255, 255, 0.1);
    --dark-surface-hover: #333333;
    
    /* Tons de cinza */
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Cores de texto */
    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-disabled: rgba(255, 255, 255, 0.38);
    
    /* Variáveis de tamanho de fonte */
    --font-size-xs: 12px;       /* Extra small: Para textos muito pequenos */
    --font-size-sm: 13px;       /* Small: Para textos secundários, labels pequenos */
    --font-size-base: 15px;     /* Base: Tamanho padrão para a maioria dos textos */
    --font-size-md: 16px;       /* Medium: Para enfatizar textos importantes */
    --font-size-lg: 18px;       /* Large: Para subtítulos e cabeçalhos menores */
    --font-size-xl: 20px;       /* Extra Large: Para cabeçalhos de seção */
    --font-size-2xl: 24px;      /* 2XL: Para títulos de card e seções principais */
    --font-size-3xl: 28px;      /* 3XL: Para títulos grandes */
    --font-size-4xl: 32px;      /* 4XL: Para valores de destaque e estatísticas */
    --font-size-5xl: 40px;      /* 5XL: Para títulos principais muito grandes */
    
    /* Cores para acentuação */
    --accent-color: #5b5f59; /* Cinza mais vibrante para o item ativo */
    --accent-color-hover: rgba(91, 95, 89, 0.6);
    
    /* Cores de status - mais sóbrias */
    --color-status-pending: #e6b400;
    --color-status-progress: #5e87ff;
    --color-status-completed: #4caf50;
    --color-status-overdue: #d32f2f;
    --color-status-overdue-hover: #d32f2f99;
    --color-status-cancelled: #9e9e9e;
    --color-cancel: #F8B300; /* Cor para botões de cancelar/excluir */
    
    /* Backgrounds de status com opacidade */
    --bg-status-pending: rgba(230, 180, 0, 0.15);
    --bg-status-progress: rgba(94, 135, 255, 0.15);
    --bg-status-completed: rgba(76, 175, 80, 0.15);
    --bg-status-overdue: rgba(211, 47, 47, 0.15);
    --bg-status-cancelled: rgba(158, 158, 158, 0.15);
    
    /* Ajuste de cores para texto em fundos coloridos */
    --color-text-dark: #121212;
    
    /* Cores para os ícones - agora todos usam a mesma cor base */
    --icon-color: rgba(255, 255, 255, 0.7);

    /* Cores para botões e ações */
    --color-pdf: #007bff;
    --color-danger: #8a1c1c;
    --color-edit: #F8B300;
    --color-edit-hover: #F8B3001a;
    --color-delete: rgb(229, 57, 53);
    --color-delete-hover: rgb(183,28,28); 
    --color-save: rgb(67, 160, 71);
    --color-save-hover: rgb(27, 94, 32);
    
    /* Variáveis de input - Padronização de todos os inputs */
    --input-height: 38px;       /* Altura padrão para todos os inputs */
    --input-padding-y: 8px;    /* Padding vertical */
    --input-padding-x: 8px;    /* Padding horizontal */
    --input-border-radius: 8px; /* Borda arredondada */
    --input-font-size: 14px;    /* Tamanho da fonte dentro de inputs */
}

/* Reset e Estilos Gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fundo escuro para todo o site */
html, body {
    background-color: var(--dark-bg);
    min-height: 100vh;
    color: var(--text-primary);
    font-size: var(--font-size-base); /* Usando a variável de tamanho base */
}

body {
    font-family: 'Rubik', sans-serif;
    line-height: 1.5;
}

/* Layout principal */
.container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--dark-surface);
    padding: 1.2rem 0.75rem;
    border-right: 1px solid var(--dark-border);
    overflow-y: auto;
    transition: all 0.3s ease;
    position: fixed;
    width: 260px;
    height: 100vh;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.nav-brand img {
    max-width: 180px;
    height: auto;
}

.notification-bar {
    background-color: var(--dark-surface-lighter);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    margin-bottom: 2rem;
}

/* Menu Styles */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin: 3px 0;
}

.menu-header {
    color: var(--gray-400);
    text-transform: uppercase;
    padding: 16px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.8px;
}

/* Estilo comum para todos os itens de menu */
.menu-item, .menu-group-header {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 0 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: var(--dark-surface-lighter);
    height: 42px;
    box-sizing: border-box;
    line-height: 42px;
    font-size: var(--font-size-base);
}

.menu-item:hover, .menu-group-header:hover {
    background-color: var(--dark-surface-hover);
}

.menu-item.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 500;
}

.menu-group-header {
    cursor: pointer;
    position: relative;
}

.menu-group.active .menu-group-header {
    background-color: var(--dark-surface-hover);
}

/* Grupo de menus - manter espaçamento uniforme */
.menu-group {
    margin: 3px 0;
}

/* Espaçamento e alinhamento do label */
.menu-label {
    flex: 1;
    font-weight: 400;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 2px;
}

/* Ícones do menu */
.menu-icon {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    padding-bottom: 2px;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Ícone ativo com cor mais brilhante */
.menu-item.active .menu-icon {
    color: white;
}

/* Tamanho e posicionamento do toggle */
.menu-toggle {
    font-size: var(--font-size-sm);
    transition: transform 0.3s ease;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(0deg); /* Garantir que comece em 0 graus */
    width: 20px; /* Aumentado */
    height: 20px; /* Aumentado */
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
}

/* Quando o menu está ativo, a seta gira 90 graus */
.menu-group.active .menu-toggle {
    transform: rotate(90deg) !important; /* Usar !important para garantir que essa regra tenha prioridade */
}

/* Estilos para o submenu */
.submenu {
    list-style: none;
    padding-left: 1.35rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin: 0;
}

.menu-group.active .submenu {
    max-height: 500px;
    margin-top: 4px;
}

.submenu li {
    margin: 3px 0;
}

.submenu .menu-item {
    padding: 0 12px;
    font-size: var(--font-size-base);
    background: var(--dark-surface);
    height: 38px;
    line-height: 38px;
}

.submenu .menu-icon svg {
    width: 18px;
    height: 18px;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

.btn-secondary {
    background: var(--color-cancel);
    color: white;
}

.btn-cancel {
    background: var(--color-edit);
    color: white;
}

.btn-cancel:hover {
    background: rgb(248, 179, 0, 0.25);
}

.btn-danger {
    background-color: var(--color-status-overdue);
    color: white;
}

.btn-danger:hover {
    background-color: rgba(211, 47, 47, 0.85);
}

.btn-save {
    background-color: var(--color-save); /* Verde */
    color: white;
}

.btn-save:hover {
    background-color: var(--color-save-hover); /* Verde mais escuro no hover */
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--dark-border);
    background: var(--dark-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

/* Cards */
.card, 
.stats-card, 
.table-card,
.actions-card {
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--dark-border);
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    background-color: var(--dark-surface);
}

.data-table th {
    background-color: rgba(33, 33, 33, 0.9); /* Cabeçalho mais escuro */
    color: #fff;
    font-weight: 500;
    text-align: left;
    padding: 14px 16px; /* Espaçamento aumentado */
    font-size: 14px;
    letter-spacing: 0.3px;
    border-top: 1px solid var(--dark-border);
    border-bottom: 1px solid var(--dark-border);
}

.data-table th:first-child {
    border-top-left-radius: 8px;
    border-left: 1px solid var(--dark-border);
}

.data-table th:last-child {
    border-top-right-radius: 8px;
    border-right: 1px solid var(--dark-border);
}

.data-table td {
    padding: 14px 16px; /* Espaçamento aumentado */
    border-bottom: 1px solid rgba(68, 68, 68, 0.15);
    font-size: 14px;
    transition: background-color 0.15s ease;
    color: #fff;
}

.data-table tr {
    transition: background-color 0.2s;
}

.data-table tr:hover {
    background-color: rgba(68, 68, 68, 0.2);
}

.data-table tr:last-child td {
    border-bottom: 1px solid var(--dark-border);
}

.data-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.data-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Ensure background color extends to full width */
.data-table tr {
    background-color: var(--dark-surface);
}

/* Efeito de textura no background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(
            45deg,
            #1a1b26,
            #232533
        ),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Container Principal */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    background-color: #00000033;
}

/* Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 24px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.nav-brand img {
    width: 200px; /* Ajuste este valor conforme necessário */
    height: auto;
    object-fit: contain;
}

/* Notificação */
.notification-bar {
    background: var(--color-primary);
    color: white;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    margin: 16px 0;
    backdrop-filter: blur(12px);
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* Menu Principal */
.menu {
    list-style: none;
}

/* Tema Claro/Escuro Toggle */
.theme-toggle {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.5rem;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Ícones específicos */
.home-icon {
    color: #4361ee;
}

.data-icon {
    color: #64748b;
}

.project-icon {
    color: #64748b;
}

.collect-icon {
    color: #64748b;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 4.5rem 2rem 2rem; /* Aumentar o padding superior para acomodar a barra fixa */
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s;
    background-color: var(--dark-surface);
    position: relative;
    z-index: 1;
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 16px;
}

/* Textos */
p {
    color: #9ca3af;
}

/* Botões e Controles */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

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

.btn-secondary {
    background: var(--color-cancel);
    color: white;
}


.action-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
}

.btn-secondary:hover {
    background: #dc2626;
}

/* Profile specific buttons */
.btn-icon.profile {
    padding: 2px;
    background: transparent;
    width: 36px !important;
    height: 36px !important;
    position: relative;
    z-index: 1001;
}

.btn-icon.profile:hover {
    transform: scale(1.1);
    background: transparent;
}

/* Quick actions buttons */
.quick-actions .action-button {
    width: 100%;
    height: auto;
    padding: 16px;
    border-radius: 12px;
    flex-direction: column;
    gap: 8px;
}

/* Tabelas */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    background-color: inherit;
    color: var(--text-primary);
    border-bottom: 1px solid var(--dark-border);
    font-size: var(--font-size-sm);
    padding: 16px;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

.data-table th {
    text-align: left;
    font-weight: 600;
}

/* Formulários */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: var(--input-font-size);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    height: var(--input-height);
    padding: var(--input-padding-y) var(--input-padding-x);
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--input-border-radius);
    color: var(--text-primary);
    font-size: var(--input-font-size);
    line-height: 1.5;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-status-progress);
    box-shadow: 0 0 0 3px rgba(94, 135, 255, 0.2);
}

/* Status e Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--bg-status-completed);
    color: var(--color-status-completed);
}

.badge-warning {
    background: var(--bg-status-pending);
    color: var(--color-status-pending);
}

.badge-waiting {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.badge-overdue {
    background-color: var(--bg-status-overdue);
    color: var(--color-status-overdue);
}

.badge-cancelled {
    background-color: var(--bg-status-cancelled);
    color: var(--color-status-cancelled);
}

.badge-blue {
    background: var(--bg-status-progress);
    color: var(--color-status-progress);
}

.badge-yellow {
    background-color: var(--color-status-pending);
    color: var(--color-text-dark);
}

.badge-green {
    background-color: var(--color-status-completed);
    color: white;
}

/* Adicionar ou atualizar estilos dos badges nos stats cards */
.badge-yellow, span.badge-yellow {
    color: var(--color-status-pending);
}

.badge-blue, span.badge-blue {
    color: var(--color-status-progress);
}

.badge-green, span.badge-green {
    color: var(--color-status-completed);
}

/* Atualizar cores de fundo para os badges na tabela */
.badge.badge-yellow {
    background: var(--bg-status-pending);
    color: var(--color-status-pending);
}

.badge.badge-blue {
    background: var(--bg-status-progress);
    color: var(--color-status-progress);
}

.badge.badge-green {
    background: var(--bg-status-completed);
    color: var(--color-status-completed);
}

/* Stats e Gráficos */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--dark-surface);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--dark-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%; /* Garantir largura total */
    position: relative;
    border-top: 3px solid var(--text-primary); /* Borda padrão */
    transition: all 0.3s ease;
}

/* Bordas coloridas para os stats-cards, similar aos board-headers */
.stat-card:nth-child(1) {
    border-top-color: var(--color-status-completed); /* Aprovado */
}

.stat-card:nth-child(2) {
    border-top-color: var(--color-status-pending); /* Pendente */
}

.stat-card:nth-child(3) {
    border-top-color: var(--color-status-progress); /* Aguardar */
}

.stat-card:nth-child(4) {
    border-top-color: var(--color-status-overdue); /* Recusado */
}

.stat-card.total-card {
    border-top-color: var(--accent-color); /* Total */
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-top: 8px;
}

.trend-up {
    color: #10b981;
}

.trend-down {
    color: #ef4444;
}

/* Status e Indicadores */
.status-positive {
    color: #10b981;
}

.status-negative {
    color: #ef4444;
}

/* Charts */
.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.chart-actions {
    display: flex;
    gap: 12px;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--light);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        width: 260px;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        padding: 1rem 0.75rem;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
        
    .form-row {
        flex-direction: column;
    }
    
    .form-row > .form-group {
        width: 100%;
    }
    
    /* Ajustes para o menu em dispositivos móveis */
    .menu-item, .menu-group-header {
        height: 42px;
        padding: 0 12px;
        line-height: 42px;
    }
    
    .menu-toggle {
        width: 20px;
        height: 20px;
        font-size: 0.85rem;
    }
        
    .menu-icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    .menu-icon svg {
        width: 18px;
        height: 18px;
    }
    
}

/* Títulos usando Rubik */
h1, h2, h3, h4, h5, h6, .nav-brand {
    font-family: 'Rubik', sans-serif;
}

/* Percentuais de atividade com as novas cores */
.activity-percentage.blue {
    background: rgba(91, 107, 249, 0.2);
    color: var(--color-primary);
}

.activity-percentage.cyan {
    background: rgba(76, 201, 240, 0.2);
    color: var(--color-secondary);
}

.activity-percentage.purple {
    background: var(--bg-status-progress);
    color: var(--color-status-progress);
}

.activity-percentage.orange {
    background: rgba(255, 159, 28, 0.2);
    color: var(--color-accent-2);
}

.activity-percentage.teal {
    background: rgba(46, 196, 182, 0.2);
    color: var(--color-accent-3);
}

.activity-percentage {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.activity-percentage.warning {
    background: var(--bg-status-pending);
    color: var(--color-status-pending);
}

.activity-percentage.success {
    background: var(--bg-status-completed);
    color: var(--color-status-completed);
}

/* Outros elementos que usam as cores */
.chart-line-primary {
    stroke: var(--color-primary);
}

.chart-line-secondary {
    stroke: var(--color-secondary);
}

.chart-line-accent1 {
    stroke: var(--color-accent-1);
}

.chart-line-accent2 {
    stroke: var(--color-accent-2);
}

.chart-line-accent3 {
    stroke: var(--color-accent-3);
}

/* Estilos compartilhados para todas as páginas */
.page-container {
    height: 100%;
    padding: 16px;
    overflow-x: hidden;
}

/* Grid de Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
    border: none;
}

/* Stats Card */
.stats-card {
    background: var(--dark-surface);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--dark-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%; /* Garantir largura total */
    position: relative;
    border-top: 3px solid var(--text-primary); /* Borda padrão */
    transition: all 0.3s ease;
}

/* Bordas coloridas para os stats-cards, similar aos board-headers */
.stats-card:nth-child(1) {
    border-top-color: var(--color-status-completed); /* Aprovado */
}

.stats-card:nth-child(2) {
    border-top-color: var(--color-status-pending); /* Pendente */
}

.stats-card:nth-child(3) {
    border-top-color: var(--color-status-progress); /* Aguardar */
}

.stats-card:nth-child(4) {
    border-top-color: var(--color-status-overdue); /* Recusado */
}

.stats-card.total-card {
    border-top-color: var(--accent-color); /* Total */
}

.stats-card h2 {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
}

.stats-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
    display: block;
    text-align: left;
    width: 100%; /* Garantir largura total */
    white-space: nowrap; /* Evitar quebra de linha */
    overflow: visible; /* Permitir que o valor seja totalmente visível */
}

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stat-chart {
    margin-top: 16px;
}



/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.quick-actions .action-button {
    width: 100%;
    height: auto;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.action-icon {
    font-size: 24px;
    opacity: 0.8;
}

/* Status Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}
/* Dashboard Layout */
.dashboard {
    padding: 20px;
}

/* Transfer Card */
.transfer-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.transfer-card h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transfer-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.transfer-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.transfer-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Activities Card */
.activities-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.activities-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.activity-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.activity-percentage {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050 !important; /* Valor mais moderado, ainda superior ao header normal */
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--dark-card);
    border-radius: 16px;
    width: 90%;
    max-width: 40vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1051 !important; /* Um a mais do que o modal */
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header .subtitle {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
    display: block;
}

.modal-title h2 {
    margin-bottom: 5px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer .btn-cancel {
    background-color: var(--color-status-overdue);
    color: white;
}

.modal-footer .btn-cancel:hover {
    background-color: var(--color-status-overdue-hover);
}

.modal-footer .btn-primary {
    background-color: var(--color-status-completed);
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: rgba(76, 175, 80, 0.6);
    
}

.close-button {
    background: none;
    border: none;
    font-size: 24px !important;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-button:hover {
    color: var(--text-primary);
}

/* Ajuste nos botões de ação */
.quick-actions .action-button {
    cursor: pointer;
}

/* Ajustes de Tipografia e Espaçamento */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.4;
    margin-bottom: 16px;
}

.card h2 {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: var(--font-size-4xl);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.menu-item {
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* Tabelas */
.data-table th {
    background-color: #313131 !important;
    font-weight: 600;
}

.data-table td {
    background-color: inherit;
    color: var(--text-primary);
    border-bottom: 1px solid var(--dark-border);
    font-size: var(--font-size-sm);
    padding: 16px;
    line-height: 1.4;
    letter-spacing: 0.3px;
}

/* Formulários */
.form-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-control {
    font-size: var(--font-size-sm);
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* Botões */
.btn, 
.action-button {
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

/* Badges */
.badge {
    letter-spacing: 0.5px;
    font-weight: 600;
    font-size: var(--font-size-xs);
}

/* Modal */
.modal-header h2 {
    font-size: var(--font-size-2xl) !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Quick Actions */
.quick-actions .action-button span {
    font-size: 14px;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

/* Notificações */
.notification-bar {
    font-size: 14px;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* Menu Header */
.menu-header {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* Dropdown de Ações */
.actions-dropdown {
    position: relative;
    display: inline-block;
    background-color: inherit;
}

td.actions-dropdown {
    position: relative;
    background-color: inherit;
}

.actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 160px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid var(--dark-border);
    opacity: 1;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.actions-menu.show {
    display: block;
    background-color: var(--dark-surface);
    opacity: 1;
    transform: translateY(0);
}

.action-item {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
    color: var(--text-primary);
}


.btn-icon {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-icon:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

/* Adicione estas regras */
.chart-card {
    min-height: 800px;
    background: var(--dark-surface);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--dark-border);
    backdrop-filter: blur(12px);
}

#servicesChart {
    height: 800px !important;
}

#overviewChart {
    height: 800px !important;
}

.profile-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    min-width: 150px;
    padding: 8px 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    padding: 12px 16px;
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
    width: 100%;
}

.dropdown-menu a:hover {
    background: var(--dark-surface-hover);
    width: 100%;
}

.profile-image {
    width: 32px !important;  /* Força o tamanho fixo */
    height: 32px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    max-width: 32px;  /* Previne crescimento */
    min-width: 32px;  /* Previne encolhimento */
    display: block;  /* Previne distorções de layout */
}

.profile-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    max-width: 100px;
    min-width: 100px;
    display: block;
    margin: 0 auto 1rem auto;
}

/* Estilos para upload de imagem de perfil */
.profile-image-upload {
    text-align: center;
    margin-bottom: 2rem;
}

.upload-label {
    cursor: pointer;
    color: var(--color-primary);
    display: inline-block;
}

.upload-label input[type="file"] {
    display: none;
}

/* Ajustes do dropdown do perfil */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;  /* Garante que o menu comece fechado */
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;  /* Previne interação quando fechado */
    z-index: 1000;
}

.dropdown-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(1);
    pointer-events: auto;  /* Permite interação quando aberto */
}

.btn-icon.profile {
    position: relative;
    z-index: 1001;  /* Garante que o botão fique acima do dropdown */
}

/* Fix para a barra superior de ações */
.top-actions {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 16px 24px !important;
    gap: 12px !important;
    z-index: 1050 !important; /* Valor alto para garantir que fique acima de outros elementos, igual ao z-index padrão dos modais */
    background-color: var(--dark-surface) !important; /* Adicionar cor de fundo para evitar transparência */
    width: calc(100% - 260px) !important; /* Largura igual ao conteúdo principal menos a sidebar */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important; /* Sombra para destacar visualmente */
    /* Nota: quando um modal está aberto (body.modal-open), o z-index é reduzido para 1 em budget.css */
}

/* Ajuste no padding do main-content para acomodar a barra fixa superior */
.main-content {
    padding-top: 4.5rem !important; /* Aumentar o padding superior para acomodar a barra fixa */
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .top-actions {
        width: 100% !important;
    }
} 


.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.welcome {
    flex: 1;
}

/* Estilização específica para selects em modais */
.modal .form-control,
.modal select.form-control {
    background-color: var(--dark-surface-hover);
    color: #ffffff;
    border: 1px solid var(--dark-border);
}

.modal select.form-control option {
    background-color: #2a2a2a; /* Cor de fundo mais escura para as opções */
    color: #ffffff;
}

/* Hover state para as opções */
.modal select.form-control option:hover,
.modal select.form-control option:focus {
    background-color: #3a3a3a;
}

/* Status text colors for stats cards */
.status-text {
    font-weight: 500;
}

.status-text.status-pending {
    color: var(--color-status-pending);
}

.status-text.status-progress {
    color: var(--color-status-progress);
}

.status-text.status-completed {
    color: var(--color-status-completed);
}

/* Estilos para o modal de confirmação */
.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: rgb(138, 28, 28, 0.4);
}

#confirmMessage {
    margin: 20px 0;
    text-align: center;
    color: var(--text-primary);
    font-size: 15px;
}

/* Estilos para a tabela responsiva */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

/* Estilos globais para menus de ações */
.actions-dropdown {
    position: relative;
    display: inline-block;
}


.action-item:hover {
    background-color:var(--color-edit-hover);
    color:var(--color-edit);
}

.action-item.delete:hover {
    background-color:var(--color-delete-hover);
    color: var(--color-delete);
}

/* Estilos para tabelas de dados */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgb(45, 46, 59);
    background-color: inherit;
}

.data-table th {
    background-color: #282934;
    font-weight: 600;
}

/* Estilos específicos para Receivables */
.form-row {
    display: flex;
    margin-right: -10px;
    margin-left: -10px;
}

.form-row > .form-group {
    padding-right: 10px;
    padding-left: 10px;
    flex: 1;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Estilos para campos somente leitura */
input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Estilos para botões de ação */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

/* Estilos para o cabeçalho da página */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background-color: var(--dark-card);
    border-radius: 16px;
    border: 1px solid var(--dark-border);
}

.content-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 500;
    margin: 0;
    color: var(--text-primary);
}

/* Top Actions */
.top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 24px;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    gap: 12px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--bg-status-completed);
    color: var(--color-status-completed);
}

.badge-warning {
    background: var(--bg-status-pending);
    color: var(--color-status-pending);
}

.badge-waiting {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

.badge-overdue {
    background-color: var(--bg-status-overdue);
    color: var(--color-status-overdue);
}

.badge-cancelled {
    background-color: var(--bg-status-cancelled);
    color: var(--color-status-cancelled);
}

.badge-blue {
    background: var(--bg-status-progress);
    color: var(--color-status-progress);
}

.stats-card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.stat-chart {
    margin-top: 16px;
}

/* Activity Percentages */
.activity-percentage {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    background: var(--dark-surface-lighter);
    color: var(--text-secondary);
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.activity-percentage.warning {
    background: var(--bg-status-pending);
    color: var(--color-status-pending);
}

.activity-percentage.success {
    background: var(--bg-status-completed);
    color: var(--color-status-completed);
}

.activity-percentage.overdue {
    background: var(--bg-status-overdue);
    color: var(--color-status-overdue);
}

.activity-percentage.teal {
    background: var(--bg-status-progress);
    color: var(--color-status-progress);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050 !important; /* Valor mais moderado, ainda superior ao header normal */
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--dark-card);
    border-radius: 16px;
    width: 90%;
    max-width: 40vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 1051 !important; /* Um a mais do que o modal */
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--dark-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: var(--input-font-size);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    height: var(--input-height);
    padding: var(--input-padding-y) var(--input-padding-x);
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--input-border-radius);
    color: var(--text-primary);
    font-size: var(--input-font-size);
    line-height: 1.5;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-status-progress);
    box-shadow: 0 0 0 3px rgba(94, 135, 255, 0.2);
}

/* Form Rows */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.form-row > .form-group {
    padding-right: 10px;
    padding-left: 10px;
    flex: 1;
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    min-width: 150px;
    padding: 8px 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    padding: 12px 16px;
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s ease;
    width: 100%;
}

.dropdown-menu a:hover {
    background: var(--dark-surface-hover);
    width: 100%;
}

/* Estilo para página em construção */
.construction-container {
    text-align: center;
    padding: 40px 20px;
}

.construction-emoji {
    font-size: 72px;
    margin-bottom: 24px;
}

.construction-title {
    font-size: 28px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.construction-message {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Media Queries para responsividade */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -260px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row > .form-group {
        width: 100%;
    }
}

/* Ajustes para consistência de cores nos elementos de UI */
.action-button {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    color: var(--text-primary);
}

.action-button:hover {
    background: var(--dark-surface-lighter);
}

/* Ajuste para menus ativos */
.menu-item.active {
    background-color: var(--accent-color);
    color: white;
}

.menu-item.active .menu-icon {
    color: white;
    filter: grayscale(0);
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to bottom, white, white);
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 1;
}

/* Melhoria no contraste para os badges */
.badge {
    font-weight: 500;
}

/* Scrollbar personalizada para tema escuro */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Estilizando o texto selecionado */
::selection {
    background: var(--accent-color);
    color: white;
}


/* Produtos Page Styles */
.tabs-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--dark-border);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
}

.tab-btn.active {
    color: var(--color-status-progress);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-status-progress);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0) !important;
    border-radius: 0;
    padding: 5px 10px;
    border: 1px solid var(--dark-border);
    width: 100%;
    max-width: none;
    margin-left: 0;
    height: 48px;
}

.search-input {
    border: none;
    background: none;
    padding: 8px;
    width: 100%;
    color: var(--text-primary);
    background-color: transparent;
    font-size: 1rem;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.dropdown-btn, .filter-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.table-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-header {
    background-color: #f0f0f0;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background-color: #f8f8f8;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}


.product-image {
    width: 40px;
    height: 40px;
    border-radius: 6px; /* Bordas arredondadas */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dark-surface-lighter);
    border: 1px solid var(--dark-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.action-menu {
    position: relative !important;
    z-index: 9999 !important;
    display: inline-block !important;
}

.action-btn {
    cursor: pointer;
    padding: 6px 8px;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-dropdown.show {
    display: block !important;
}

.action-dropdown button {
    display: block;
    min-width: 160px;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 14px;
    transition: background-color 0.2s;
}

.action-dropdown button:hover {
    background-color: var(--dark-surface-hover);
    color: var(--color-edit);
    width: 100%;
}

.action-dropdown button i,
.action-dropdown button svg {
    margin-right: 8px;
}

/* Dark mode adjustments */
.dark-mode .table-header {
    background-color: var(--dark-surface);
}

.dark-mode .product-image {
    background-color: var(--gray-800);
}

.dark-mode .action-dropdown button:hover {
    background-color: var(--dark-surface-hover);
}

.dark-mode .search-container,
.dark-mode .search-input {
    background-color: #5a5a1c;
    color: #fff;
}

.dark-mode .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Botão circular de adicionar */
.btn-circle {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background-color: var(--dark-card);
    color: white;
    border-right: none;
    border: 1px solid var(--dark-border);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
    margin-right: 0;
}

.btn-circle:hover {
    background-color: var(--dark-surface-hover);
}

/* Budget Modal Styles */
.modal-lg {
    width: 90%;
    max-width: 1200px;
}

.budget-products-section {
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--card-bg);
}

.budget-products-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.product-search-field {
    flex: 1;
    position: relative;
}

.product-search-field input {
    width: 100%;
    padding-right: 30px;
}

.product-quantity,
.product-price,
.product-total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.product-quantity label,
.product-price label,
.product-total label {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.product-quantity input,
.product-price input {
    width: 100px;
}

.product-total {
    min-width: 100px;
}

.btn-add-product {
    height: 38px;
    width: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    margin-bottom: 2px;
}

.selected-products-container {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.budget-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-weight: 500;
    color: var(--text-color);
}

.summary-value {
    font-weight: 600;
    color: var(--text-color);
}

.summary-item.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.summary-item.total .summary-label,
.summary-item.total .summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.discount-inputs {
    display: flex;
    gap: 5px;
}

.discount-inputs input {
    width: 80px;
}

.discount-inputs select {
    width: 60px;
}

.discount-history {
    width: 100% !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px dashed var(--border-color) !important;
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    display: block !important;
    position: relative !important;
    clear: both !important;
}

.product-suggestions {
    position: absolute;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.product-suggestion {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.product-suggestion:last-child {
    border-bottom: none;
}

.product-suggestion:hover {
    background-color: var(--hover-bg);
}

.suggestion-code {
    width: 80px;
    font-weight: 500;
    color: var(--text-muted);
}

.suggestion-name {
    flex: 1;
    padding: 0 10px;
}

.suggestion-price {
    width: 100px;
    text-align: right;
    font-weight: 500;
    color: var(--accent-color);
}

.btn-remove-product {
    color: var(--danger-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
}

.btn-remove-product:hover {
    opacity: 0.8;
}

/* Dark mode adjustments */
.dark-mode .budget-products-section {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
}

.dark-mode .product-suggestions {
    background-color: var(--dark-card-bg);
    border-color: var(--dark-border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .product-suggestion:hover {
    background-color: var(--dark-hover-bg);
}

.dark-mode .selected-products-container {
    border-color: var(--dark-border-color);
}

.dark-mode .budget-summary {
    border-color: var(--dark-border-color);
}

.dark-mode .summary-item.total {
    border-color: var(--dark-border-color);
}


.action-dropdown button:hover {
    background-color: var(--dark-surface-hover);
    width: 100%;
}

.action-dropdown button i,
.action-dropdown button svg {
    margin-right: 8px;
}

.table-container, 
.data-table, 
.table-responsive {
    overflow: visible !important;
}

.table-responsive {
    display: block;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

.action-dropdown {
    position: absolute;
    top: 100%;
    padding: 8px 0;
    right: 0;
    min-width: 120px;
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 10000;
    overflow: visible;
}

.table-container, 
.data-table, 
.table-responsive {
    overflow: visible !important;
}

.main-content {
    z-index: 1 !important;
}

.action-dropdown button.edit {
    color: var(--text-primary);
}

.action-dropdown button.edit:hover {
    color: var(--color-edit);
    background-color: var(--color-edit-hover);
}

.action-dropdown button.delete {
    color: var(--text-primary);
}

.action-dropdown button.delete:hover {
    color: var(--color-delete);
    background-color: var(--color-delete-hover);
}

.product-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
}

.product-price {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
}

.product-code, .product-stock, .product-details {
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
}

/* Estilos para o formulário de produtos */
.checkbox-container {
    display: flex;
    align-items: center;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.checkbox-label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.image-upload-container {
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-image-preview {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--gray-100);
    cursor: pointer;
}

.image-placeholder {
    text-align: center;
}

.image-placeholder i {
    font-size: 40px;
    color: var(--gray-500);
}

.observation-link a {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--gray-200);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.3s;
}

.observation-link a:hover {
    background-color: var(--gray-300);
}

/* Ajustes para o modal de produtos */
#productForm .form-row {
    margin-bottom: 10px;
}

#productForm .form-control {
    width: 100%;
}

#productForm select.form-control {
    appearance: none;
}

/* Estilos para o formulário com labels à esquerda */
.form-field {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-field label {
    min-width: 140px;
    text-align: right;
    padding-right: 15px;
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 500;
}

.form-field .form-control {
    width: 198px;
    height: 45px;
    flex: none; /* Remove o flex para manter tamanho fixo */
    max-width: none; /* Remove max-width anterior */
}

.form-field select.form-control {
    width: 198px;
    min-width: 0; /* Remove o min-width anterior */
}

/* Ajustes para o formulário de produtos */
#productForm .form-field {
    margin-bottom: 15px;
}

/* Ajustes adicionais para o formulário com labels à esquerda */
.form-field .checkbox-container {
    display: flex;
    align-items: center;
}

/* Estilo para o toggle de controle de estoque */
#controlStock {
    margin-right: 5px;
}

/* Ajuste para os campos de markup e preço */
.form-field .form-control#productMarkup,
.form-field .form-control#productCurrentStock {
    width: 198px;
    flex: none;
}

/* Ajuste para o campo de código com checkbox */
.form-field .checkbox-container label {
    min-width: auto;
    padding-right: 0;
    text-align: left;
}

/* Ajuste para o campo EAN/GTIN e outros */
.form-field input#productEan {
    max-width: 200px;
}

.form-field input#productExtraCode {
    max-width: 300px;
    width: 300px;
}

/* Ajustes para toggle switchers em formulários */
.form-field .toggle-switch {
    margin-left: 140px; /* Alinha com os outros campos */
    padding-left: 15px;
}

/* Ajustes para área de imagem do produto */
.image-upload-container {
    margin-top: 15px;
    margin-left: 50px;
}

/* Centraliza o conteúdo de observação abaixo da área de imagem */
#observationContainer, .observation-link {
    margin-left: 50px;
}

/* Ajustes adicionais para posicionamento dos labels */
@media (max-width: 768px) {
    .form-field {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-field label {
        min-width: 100%;
        text-align: left;
        margin-bottom: 5px;
        padding-right: 0;
    }
    
    .form-field .form-control,
    .form-field input#productName {
        width: 100%;
    }
}

/* Campo nome com tamanho específico */
.form-field input#productName {
    width: 500px;
    height: 45px;
}

/* Ajustes para o layout de código + código extra */
.codigo-extra-container {
    display: flex;
    align-items: center;
}

.codigo-extra-container label {
    min-width: 100px;
    text-align: right;
    padding-right: 15px;
    margin-bottom: 0;
    white-space: nowrap;
}

/* Ajuste responsivo para o layout de código + código extra */
@media (max-width: 1200px) {
    .form-field .codigo-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .codigo-extra-container {
        margin-top: 10px;
        margin-left: 140px; /* Alinha com os outros campos */
    }
}

@media (max-width: 768px) {
    .codigo-extra-container {
        margin-left: 0;
    }
    
    .form-field .codigo-container {
        width: 100%;
    }
}

/* Definição de fonte para o formulário de produtos */

#productForm .form-field label,
#productForm .checkbox-label,
#productForm .form-control,
#productForm select,
#productForm option,
#productForm button {
    font-size: 15px;
}

/* Ajustes para os tamanhos específicos de imagem do produto */
.product-image-preview {
    width: 250px !important;
    height: 250px !important;
    margin: 0 auto;
}

/* Ajustes para a área de observação */
.observation-link {
    text-align: center;
    margin-top: 15px;
    width: 250px;
    margin: 15px auto 0;
}

/* Ajustes para o container de observação */
#observationContainer {
    width: 250px;
    margin: 15px auto 0;
}

/* Definições específicas de tamanho de fonte */
html body h1, .page-container h1, .content-header h1, .modal-header h1, h1.page-title, .dashboard h1 {
    font-size: var(--font-size-3xl) !important;
}

html body h2, .page-container h2, .card h2,.stats-card h2, h2.section-title, .dashboard h2 {
    font-size: var(--font-size-xl) !important;
}

html body .stats-card .stat-value, .card .stat-value, .dashboard .stat-value {
    font-size: var(--font-size-4xl) !important;
}

/* Garantir que outros elementos usem o tamanho padrão de 15px */
html body p, html body span:not(.fas):not(.far):not(.fa), html body div:not(.stat-value), 
html body button, html body input, html body select, html body textarea, 
html body label, html body a, html body li, html body td, html body th,
.menu-label, .form-control, .btn, .table-header, .action-btn, .search-input,
.product-name, .product-code, .product-details, .product-price, .product-stock {
    font-size: var(--font-size-base) !important;
}

/* Estilos para checkboxes modernos */
.modern-checkbox {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 22px;
}

.modern-checkbox input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.modern-checkbox label {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 22px;
    background-color: #2c2c2c;
    border: 1px solid var(--dark-border);
    border-radius: 34px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.modern-checkbox label::before {
    content: "OFF";
    font-size: 8px;
    color: white;
    position: absolute;
    right: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-checkbox label::after {
    content: "";
    position: absolute;
    top: inherit;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: block;
}

.modern-checkbox input[type="checkbox"]:checked + label {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.modern-checkbox input[type="checkbox"]:checked + label::before {
    content: "ON";
    color: white;
    left: 9px;
    right: auto;
}

.modern-checkbox input[type="checkbox"]:checked + label::after {
    left: calc(100% - 19px);
    transform: translateX(0);
}

.modern-checkbox input[type="checkbox"]:focus + label {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3);
}

.modern-checkbox:hover label {
    border-color: #4CAF50;
}

.checkbox-text {
    color: var(--text-primary);
    font-family: 'Rubik', sans-serif;
    cursor: pointer;
}

/* Tamanhos de fonte responsivos */
@media (max-width: 768px) {
    html, body {
        font-size: var(--font-size-sm);
    }
    
    html body h1, .page-container h1, .content-header h1, .modal-header h1, h1.page-title, .dashboard h1 {
        font-size: var(--font-size-2xl) !important;
    }
    
    html body h2, .page-container h2, .card h2, .stats-card h2, h2.section-title, .dashboard h2 {
        font-size: var(--font-size-lg) !important;
    }
    
    html body .stats-card .stat-value, .card .stat-value, .dashboard .stat-value {
        font-size: var(--font-size-3xl) !important;
    }
}

/* Estilos específicos para produtos */
.product-name, .product-code, .product-price, .product-stock, .product-details {
    font-size: var(--font-size-base) !important;
}

.table-header {
    font-size: var(--font-size-base) !important;
}

.action-btn {
    font-size: var(--font-size-base) !important;
}

.action-dropdown button {
    font-size: var(--font-size-base) !important;
}

/* Estilos específicos para o modal de produtos */
#formModal .modal-content {
    width: 40%;
    max-height: 95vh;   /* Modal quase em tela cheia para melhor visualização */
    display: flex;
    flex-direction: column;
    overflow: hidden;   /* Esconde overflow para evitar dupla barra de rolagem */
}

#formModal .modal-body {
    overflow-y: auto;   /* Adiciona scroll apenas no corpo do modal */
    padding: 25px;      /* Padding maior para melhor espaçamento */
}

#formModal .modal-header {
    background-color: var(--dark-card);  /* Fundo diferenciado para o cabeçalho */
    padding: 20px 25px; /* Padding horizontal maior */
}

#formModal .modal-footer {
    padding: 20px 25px; /* Padding horizontal maior */
    margin-top: auto;   /* Força o footer a ficar no final */
    width: 100%;
}

#formModal #productForm {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;    /* Margem negativa para compensar o padding nas colunas */
}

#formModal #productForm .form-group {
    padding: 0 15px;    /* Padding horizontal para criar espaço entre colunas */
}

/* Botão de salvar do modal de produtos */
#formModal .btn-save {
    padding: 10px 30px;  /* Botão mais amplo */
    font-weight: 600;    /* Fonte mais grossa */
    background-color: var(--color-save);
    color: white;
}

#formModal .btn-save:hover {
    background-color: var(--color-save-hover) !important;
}

/* Menu de ações (dropdown) */
.actions-menu {
    position: absolute;
    background-color: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    padding: 8px 0;
    min-width: 150px;
    z-index: 1000; /* Valor alto para ficar acima de outros elementos */
    right: 10px;
    top: 100%;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.actions-menu.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.actions-menu a {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s ease;
}

.actions-menu a:hover {
    color: var(--color-pdf);
    transform: translateX(3px);
}

.actions-menu a i {
    margin-right: 8px;
    font-size: 14px;
}

.actions-menu a.delete {
    color: var(--danger);
}
.actions-menu a.delete:hover {
    color: var(--color-delete-hover);
}

/* Botão de ações dentro da célula */
.actions-button {
    position: relative; /* Para que o menu seja posicionado em relação a este botão */
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.actions-button:hover {
    background-color: var(--dark-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.actions-button.active {
    background-color: var(--dark-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Estilo para a célula de ações na tabela de produtos */
.actions-cell {
    position: relative;
    text-align: center;
    min-width: 60px;
}

/* Garantir que o menu de ações fique absolutamente posicionado */
.actions-cell .actions-menu {
    position: absolute;
    z-index: 1000;
    right: 0;
    top: 100%;
}

/* Estilos para os textos nas células */
.product-name, 
.product-code, 
.product-price, 
.product-stock, 
.product-details {
    font-weight: 400;
    display: block;
    color: #fff;
}

.product-name {
    font-weight: 500;
}

.product-price {
    color: var(--color-save); /* Verde para preço */
}

/* Container da tabela */
.table-container {
    background-color: var(--dark-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--dark-border);
    margin-bottom: 20px;
    position: relative;
}

/* Tabela com bordas arredondadas consistentes */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0; /* Remover margem da tabela para que não extrapole o container */
    background-color: var(--dark-surface);
}

/* Células de cabeçalho com cantos superiores arredondados */
.data-table th:first-child {
    border-top-left-radius: 8px;
    border-left: 1px solid var(--dark-border);
}

.data-table th:last-child {
    border-top-right-radius: 8px;
    border-right: 1px solid var(--dark-border);
}

/* Células da última linha com cantos inferiores arredondados */
.data-table tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}

.data-table tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Bordas consistentes para todos os elementos da tabela */
.data-table th, .data-table td {
    border-bottom: 1px solid rgba(68, 68, 68, 0.15);
}

/* Estilo padronizado para o título e containers */
.content-header {
    background-color: var(--dark-surface);
    border-radius: 8px;
    overflow: hidden;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--dark-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-header h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

/* Barra de ações padronizada */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--dark-surface);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--dark-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Padronização da caixa de pesquisa */
.search-container {
    display: flex;
    align-items: center;
    background-color: var(--dark-surface-lighter);
    border-radius: 6px;
    padding: 5px 15px;
    border: 1px solid var(--dark-border);
    width: 100%;
    max-width: none;
    margin-left: 10px;
    height: 42px;
    transition: all 0.2s ease;
}

.search-container:focus-within {
    box-shadow: 0 0 0 2px rgba(77, 144, 254, 0.3);
    border-color: var(--accent-color);
}

.search-input {
    border: none;
    background: none;
    padding: 8px 8px 8px 0;
    width: 100%;
    color: #fff;
    background-color: transparent;
    font-size: 15px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Botões dentro da barra de ações */
.btn-circle {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background-color: var(--dark-surface-lighter);
    color: white;
    border: 1px solid var(--dark-border);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
    margin-right: 0;
}

.btn-circle:hover {
    background-color: var(--dark-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Estilos adicionais para elementos dentro da tabela */
.product-name, 
.product-code, 
.product-price, 
.product-stock, 
.product-details {
    font-size: 15px;
    line-height: 1.4;
}

/* Ajustes de espaçamento para consistência */
.page-container {
    padding: 20px;
}

/* Estilo consistente para o container principal */
#mainContent {
    padding: 0;
}

/* Estilo para botões e interações */
.btn-retry {
    background-color: var(--dark-surface-lighter);
    border: 1px solid var(--dark-border);
    color: #fff;
}

/* Estilos para o cabeçalho de conteúdo */
.content-header {
    background-color: var(--dark-surface-lighter);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    border: 1px solid var(--dark-border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Barra de ações com estilo consistente */
.actions-bar {
    background-color: var(--dark-surface-lighter);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--dark-border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-container:hover,
.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    padding: 6px;
    font-size: 14px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-right: 8px;
}

/* Estilos adicionais para elementos dentro da tabela */
.product-name, 
.product-code, 
.product-price, 
.product-stock, 
.product-details {
    font-size: 15px;
    line-height: 1.4;
}

/* Estilização para o novo botão NOVO */
.btn-novo {
    background-color: var(--dark-surface-lighter);
    color: white;
    border: 1px solid var(--dark-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
    min-width: 120px;
    text-transform: uppercase;
}

.btn-novo i, 
.btn-novo .icon {
    margin-right: 8px;
    font-size: 18px;
}

.btn-novo:hover {
    background-color: var(--dark-hover);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Redefinindo a barra de ações para o novo layout */
.actions-bar {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
    border: none;
    box-shadow: none;
    gap: 10px;
    width: 100%;
}

/* Campo de pesquisa redesenhado */
.search-container {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: var(--dark-surface-lighter);
    border: 1px solid var(--dark-border);
    border-radius: 4px;
    padding: 8px 15px;
    height: 42px;
    transition: all 0.2s ease;
    margin-left: 0;
}

.search-input {
    border: none;
    background: none;
    padding: 0;
    width: 100%;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.search-container:focus-within {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-color: var(--dark-border);
}

/* Remover o botão circular antigo */
.btn-circle {
    display: none;
}

/* Espaçamento interno para o conteúdo principal */
#mainContent {
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Espaçamento adequado para as células da tabela */
.data-table td, .data-table th {
    padding: 5px 10px;
}

/* Margem para o cabeçalho de conteúdo */
.content-header {
    margin-bottom: 20px;
    padding: 16px 20px;
}

/* Ajuste da barra de ações */
.actions-bar {
    margin-bottom: 20px;
    padding: 5px 0;
}

/* Responsividade para diferentes tamanhos de tela */
@media (max-width: 1200px) {
    .page-container {
        padding: 20px 60px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 15px 30px;
    }
    
    .data-table td, .data-table th {
        padding: 8px 10px;
    }
}

/* Estilo para produtos com estoque baixo */
.low-stock {
    background-color: rgba(255, 220, 220, 0.3);
}

.low-stock-text {
    color: #e74c3c;
    font-weight: bold;
}

/* Aba de estoque com alerta */
.stock-alert {
    position: relative;
}

.stock-alert::after {
    content: '';
    position: absolute;
    top: 0;
    right: 5px;
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
}

/* Ajustes para o toggle de controle de estoque */

/* Estilos para o formulário moderno */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modern-form .form-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--dark-border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.modern-form .form-section:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.modern-form .section-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-status-progress);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.modern-form .form-group {
    flex: 1;
    min-width: 0; /* Permite que o flex encolha abaixo do conteúdo mínimo */
}

.modern-form .form-group.full-width {
    flex-basis: 100%;
}

.modern-form .form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.modern-form .form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modern-form .form-control:focus {
    border-color: var(--color-status-progress);
    box-shadow: 0 0 0 3px rgba(94, 135, 255, 0.2);
    outline: none;
}

.modern-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.modern-form .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.modern-form .btn-save {
    background-color: var(--color-status-progress);
    color: white;
}

.modern-form .btn-save:hover {
    background-color: rgba(94, 135, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modern-form .btn-cancel {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--dark-border);
}

.modern-form .btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsividade para o formulário moderno */
@media (max-width: 768px) {
    .modern-form .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .modern-form .form-group {
        width: 100%;
    }
}

/* Padronização de Formulários - Nova Seção */
/* Aplica as configurações do modal de orçamentos para todos os inputs do sistema */

/* Estilos para labels */
.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: var(--input-font-size);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Estilos para inputs, selects e textareas */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="search"],
input[type="url"],
select,
textarea {
    width: 100%;
    height: var(--input-height);
    padding: var(--input-padding-y) var(--input-padding-x);
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--input-border-radius);
    color: var(--text-primary);
    font-size: var(--input-font-size);
    line-height: 1.5;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

/* Exceção para textarea */
textarea.form-control {
    height: auto;
    min-height: calc(var(--input-height) * 2);
}

/* Estilo para focus em todos os inputs */
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-status-progress);
    box-shadow: 0 0 0 3px rgba(94, 135, 255, 0.2);
}

/* Estilos para selects */
select.form-control,
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Estilos para inputs readonly ou disabled */
.form-control:disabled,
.form-control[readonly],
input:disabled,
input[readonly],
select:disabled,
select[readonly],
textarea:disabled,
textarea[readonly] {
    background-color: var(--dark-bg);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Ajustes para inputs dentro de .form-row */
.form-row .form-group .form-control,
.form-row .form-group input,
.form-row .form-group select,
.form-row .form-group textarea {
    width: 100%;
}

/* Media queries para telas menores */
@media (max-width: 768px) {
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    input[type="url"],
    select,
    textarea {
        height: calc(var(--input-height) - 5px);
        padding: calc(var(--input-padding-y) - 2px) var(--input-padding-x);
        font-size: calc(var(--input-font-size) - 1px);
    }
    
}

/* Estilos específicos para inputs dentro de modais */
.modal .form-control,
.modal input,
.modal select,
.modal textarea {
    height: var(--input-height);
    padding: var(--input-padding-y) var(--input-padding-x);
    background-color: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--input-border-radius);
}

.modal select.form-control option {
    background-color: var(--dark-surface);
    color: var(--text-primary);
    padding: 10px;
}

.modal select.form-control option:hover,
.modal select.form-control option:focus {
    background-color: var(--dark-surface-hover);
}

/* Estilos para o modal de configurações */
.config-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    color: white;
    background-color: #f5f5f500;
    border: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    cursor: pointer;
    outline: none;
    font-weight: 500;
}

.tab-button.active {
    background-color: var(--dark-border);
    color: white;
}

.tab-content {
    display: none;
    padding: 15px 0;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: var(--dark-text);
}

/* Estilos para o upload e preview da logo */
.logo-uploader {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-preview {
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
    width: 100%;
    max-width: 300px;
    text-align: center;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

/* Estilos para caixas de seleção */
.checkbox-container {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 10px;
}


@keyframes toast-in {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos para o loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para modais sem Bootstrap */
.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    overflow: hidden;
    outline: 0;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: var(--dark-surface);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #000;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 1;
}

/* Versão escura para modais */
body.dark-mode .modal-content {
    background-color: #343a40;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-close {
    color: #fff;
}

/* Fim dos estilos para modais */

/* Estilos do Modal de Salvamento PDF */
.pdf-save-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pdf-save-container {
    background-color: var(--dark-surface);
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
}

.pdf-save-content {
    padding: 15px;
    text-align: center;
}

.pdf-save-title {
    margin: 0;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.pdf-save-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pdf-save-button {
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    min-width: 180px;
    transition: all 0.3s ease;
}

.pdf-save-button.btn-primary {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: white;
}

.pdf-save-button.btn-primary:hover {
    background: var(--accent-color-hover);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.pdf-save-button.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.pdf-save-button.btn-outline-primary:hover {
    background: var(--accent-color-hover);
    color: white;
    transform: translateY(-1px);
}

.working-hours-grid {
    display: grid;
    gap: 10px;
}

.day-row {
    display: grid;
    grid-template-columns: 120px 100px 30px 100px;
    align-items: center;
    gap: 10px;
}

.time-input {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 100%;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.monitoring-container .checkbox-container {
    font-weight: 500;
}

/* Estilo para o texto "às" */
.day-row span {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--gray-200);
    opacity: 0.7;
}

.working-hours-grid {
    display: grid;
    gap: 10px;
}

.day-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input {
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    width: 100px;
    background-color: var(--gray-100);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 100px;
}

.day-row span {
    color: var(--gray-500);
}

/* Modo escuro */
body.dark-mode .working-hours-container,
body.dark-mode .monitoring-container {
    color: var(--text-primary);
    background-color: var(--dark-surface);
    border-color: var(--dark-border);
}

body.dark-mode .time-input {
    background-color: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--gray-300);
}

body.dark-mode .checkbox-label,
body.dark-mode .day-row span {
    color: var(--gray-300);
}

/* Ajuste da cor do ícone do relógio no input time */
body.dark-mode input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

body.dark-mode input[type="time"]::-webkit-inner-spin-button,
body.dark-mode input[type="time"]::-webkit-outer-spin-button {
    filter: invert(1);
}

body.dark-mode input[type="time"]::-webkit-clear-button {
    filter: invert(1);
}

/* Configuração específica para a tabela de fornecedores */
#mainContent .suppliers-table {
    width: 100%;
    table-layout: fixed; /* Força o navegador a respeitar as larguras definidas */
}

/* Alinha o texto à esquerda nas células da tabela de fornecedores */
#mainContent .suppliers-table th,
#mainContent .suppliers-table td {
    text-align: left !important; /* Alinha o texto à esquerda */
    vertical-align: middle; /* Mantém o alinhamento vertical ao centro */
}

/* Larguras específicas para colunas da tabela de fornecedores */
#mainContent .suppliers-table th:nth-child(1),
#mainContent .suppliers-table td:nth-child(1) {
    width: 21%; /* Empresa */
}

#mainContent .suppliers-table th:nth-child(2),
#mainContent .suppliers-table td:nth-child(2) {
    width: 13%; /* CNPJ */
}

#mainContent .suppliers-table th:nth-child(3),
#mainContent .suppliers-table td:nth-child(3) {
    width: 11%; /* Telefone - Largura aumentada conforme solicitado */
}

#mainContent .suppliers-table th:nth-child(4),
#mainContent .suppliers-table td:nth-child(4) {
    width: 17%; /* Email */
}

#mainContent .suppliers-table th:nth-child(5),
#mainContent .suppliers-table td:nth-child(5) {
    width: 24%; /* Endereço */
}

#mainContent .suppliers-table th:nth-child(6),
#mainContent .suppliers-table td:nth-child(6) {
    width: 9%; /* Vendedor */
}

#mainContent .suppliers-table th:nth-child(7),
#mainContent .suppliers-table td:nth-child(7) {
    width: 5%; /* Ações */
    min-width: 60px; /* Garantir espaço mínimo para o botão de ações */
}

/* Estilos para o componente de busca na página de fornecedores */
.search-actions {
    display: flex;
    align-items: center;
}

.search-container {
    position: relative;
    width: 300px;
    border-radius: 4px;
    border: none;
    transition: all 0.3s ease;
}

.search-container:hover,
.search-container:focus-within {
    background-color: rgba(42, 42, 42, 0.1);
}

.search-input {
    width: 100%;
    height: 36px;
    padding: 0 30px 0 10px;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    color: #fff;
    font-size: 14px;
}

.search-input::placeholder {
    color: #888;
}

.search-input:focus {
    outline: none;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 14px;
    pointer-events: none;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .search-container {
        width: 100%;
    }
}
