/* --- Variáveis CSS para Padronização de Cores e Fontes --- */
:root {
    --primary-color: #1a4d2e; /* Verde escuro do seu custom-navbar e botões */
    --primary-color-hover: #2e6043; /* Tom mais claro do verde para hover */
    --secondary-color: #ffe0b2; /* Amarelo da sua lineage-title */
    --accent-green-light: #c8e6c9; /* Verde claro do header do property-card */
    --accent-blue-light: #d1ecf1; /* Azul claro para o último property-card */
    --accent-blue-header: #a7d9ed; /* Azul claro mais escuro para o header do último property-card */
    --background-color-body: #f8f9fa; /* Fundo principal da página */
    --background-color-card: #ffffff; /* Fundo branco para cards */
    --background-color-property-card: #e0ffe0; /* Fundo verde claro para property-card */
    --text-color-dark: #333; /* Cor principal do texto escuro */
    --text-color-medium: #555; /* Cor do texto para labels fortes */
    --text-color-light: #fff; /* Cor do texto claro (usado em navbars e botões) */
    --border-color-light: #dee2e6; /* Cor da borda padrão */
    --shadow-color-light: rgba(0, 0, 0, 0.05); /* Sombra leve */
    --shadow-color-medium: rgba(0, 0, 0, 0.1); /* Sombra média */
    --shadow-color-card: rgba(0,0,0,.075); /* Sombra específica para cards */
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* --- Estilos Globais --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background-color-body);
    font-family: var(--font-family-sans-serif);
    color: var(--text-color-dark);
    overflow: visible;
}

.body {
            display: flex;
            flex-direction: column;
            min-height: 100vh; /* Garante que o footer fique no final da página */
        }

.main {
            flex: 1; /* Faz com que o conteúdo principal ocupe o espaço restante */
        }

.login-bg {
    background-image: url('images/background.png');
    background-repeat: no-repeat;
    background-position: initial;
    background-size: cover;
    image-rendering: optimizeQuality;
}

.third-party-dashboard {
    margin: 0 auto;
    width: 100%;
}

.dashboard-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid #007bff;
}

.producer-card.selected .card {
    border: 2px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.producer-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.permissions-display .badge {
    font-size: 0.8em;
}

.quick-navigation .btn {
    min-height: 100px;
    transition: all 0.3s ease;
}

.quick-navigation .btn:hover {
    transform: scale(1.05);
}

.no-access-card {
    max-width: 600px;
    margin: 0 auto;
}

.footer-new {
    background-color: #2e6043;
    height: 25px;
    width: 100%;
    display: table;
}

.footer-new-text {
    color: white;
    display: table-cell; 
    vertical-align: middle;
}

/* --- Estilos do Navbar (custom-navbar) --- */
.custom-navbar {
    background-color: var(--primary-color); /* Mantém o verde principal intacto */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Adição: sombra sutil para profundidade, integrando ao fundo verde */
    transition: box-shadow 0.3s ease; /* Adição: transição suave para interações globais */
}

.custom-navbar:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* Adição: elevação sutil no hover do navbar inteiro */
}

.custom-navbar .navbar-brand,
.custom-navbar .nav-link,
.custom-navbar .btn-support,
.custom-navbar .dropdown-toggle {
    color: var(--text-color-light); /* Mantém o branco/claro original */
    transition: all 0.3s ease; /* Adição: transição suave para todas as propriedades de hover/active */
}

.custom-navbar .navbar-brand:hover,
.custom-navbar .nav-link:hover,
.custom-navbar .btn-support:hover,
.custom-navbar .dropdown-toggle:hover {
    color: var(--primary-color); /* Mantém o claro, mas agora com fundo branco para harmonia */
    background-color: var(--text-color-light);
    opacity: 0.9;
    background: #ffffff; /* Adição: fundo branco no hover para "acender" os botões, contrastando com verde */
    border-radius: 8px; /* Adição: bordas arredondadas para visual moderno nos botões */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Adição: sombra no hover para elevação */
    transform: translateY(-2px); /* Adição: leve elevação no hover, tornando mais interativo */
    padding: 0.75rem 1.25rem; /* Adição: padding expandido para área clicável maior, integrando ao original */
    margin: 0 0.25rem; /* Adição: espaçamento horizontal leve entre itens */
    border: 1px solid transparent; /* Adição: borda invisível para animação suave */
}

.custom-navbar .nav-link:hover,
.custom-navbar .btn-support:hover {
    color: #155724 !important; /* Adição: texto em verde escuro no hover (derivado do primary), para beleza e contraste */
    background: #ffffff !important; /* Fundo branco fixo, sobrepondo o original para coesão */
}

.custom-navbar .nav-link:hover i,
.custom-navbar .btn-support:hover i {
    transform: scale(1.1); /* Adição: ícone cresce levemente no hover, para dinamismo */
    color: #155724; /* Adição: ícone verde no hover */
}

.custom-navbar .nav-link.active {
    font-weight: bold;
    /* Remoção do underline original por glow mais moderno; se quiser manter, descomente: text-decoration: underline; */
    color: #155724 !important; /* Adição: verde escuro no active para destaque bonito, em vez de #d1d1d1 cinza */
    background: #ffffff !important; /* Adição: fundo branco no active, criando "seleção limpa" */
    border-radius: 8px !important; /* Adição: bordas arredondadas no active */
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.5); /* Adição: glow verde sutil no active, mais visual que underline */
    border: 1px solid rgba(40, 167, 69, 0.5); /* Adição: borda verde no active para ênfase */
    padding: 0.75rem 1.25rem !important; /* Adição: padding consistente com hover */
}

.custom-navbar .nav-link.active i {
    color: #155724 !important; /* Adição: ícone verde no active */
}

.custom-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1); /* Mantém original */
    border-radius: 6px; /* Adição: bordas arredondadas para consistência */
    padding: 0.5rem; /* Adição: padding para melhor toque */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Adição: transições no toggler */
}

.custom-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25); /* Adição: foco com glow branco, aprimorando acessibilidade */
    border-color: var(--primary-color); /* Adição: borda verde no foco para tema */
}

.custom-navbar .navbar-toggler:hover {
    border-color: rgba(255, 255, 255, 0.3); /* Adição: borda mais visível no hover */
}

.custom-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3csvg%3e"); /* Mantém original */
    transition: opacity 0.3s ease; /* Adição: transição suave no ícone */
}

.custom-navbar .navbar-toggler:hover .navbar-toggler-icon {
    opacity: 0.8; /* Adição: leve fade no hover para feedback */
}

.logo-placeholder {
    min-width: 150px;
    height: 40px;
    background-color: var(--primary-color); /* Mantém semi-transparente branco sobre verde */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px; /* Mantém original, mas adiciona transição para hover */
    margin-right: 1rem;
    transition: background 0.3s ease, transform 0.3s ease; /* Adição: transições suaves */
    color: var(--text-color-light); /* Adição: cor consistente com navbar */
}

/* Responsividade integrada (adicione se não houver no original; expande as classes para mobile) */
@media (max-width: 991px) {
    .custom-navbar .nav-link {
        margin: 0.25rem 0 !important; /* Adição: stack vertical no mobile, ajustando margin */
        text-align: left;
        border-radius: 6px !important; /* Adição: bordas menores em mobile */
        background: transparent !important; /* Reset para mobile */
        width: 100%; /* Adição: full-width para facilitar toque */
    }
    
    .custom-navbar .nav-link:hover,
    .custom-navbar .nav-link.active {
        background: #f8f9fa !important; /* Adição: cinza claro no mobile para evitar branco puro em lista longa */
        transform: none !important; /* Adição: sem elevação em mobile para estabilidade */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Adição: sombra reduzida em mobile */
    }
    
    .custom-navbar .btn-support,
    .custom-navbar .dropdown-toggle {
        width: 100% !important; /* Adição: botões full-width no mobile */
        margin: 0.25rem 0 !important;
        border-radius: 8px !important; /* Adição: ajuste para retangular em mobile */
    }
    
    .custom-navbar {
        padding-top: 1rem !important; /* Adição: mais padding em mobile para toque */
        padding-bottom: 1rem !important;
    }
}
/* --- Estilos da Seção de Título Comum (section-title) --- */
.section-title {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 15px;
    text-align: center;
    font-size: 1.8rem;
    margin-top: 20px;
    margin-bottom: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 5px;
}

/* --- Estilos da Página de Login (index.php) --- */
.login-container {
    max-width: 400px;
    width: 100%;
    background-color: var(--background-color-card);
    border-radius: 0.75rem;
    /* Padding e shadow já vêm das classes Bootstrap 'p-4 shadow-lg' no HTML */
}
.btn-login {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-color-light);
    font-weight: bold;
}
.btn-login:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    color: var(--text-color-light);
}

/* --- Estilos do Dashboard (Layout) --- */
.main-content-area {
    /* Esta classe foi criada para um 'main' que ocupa toda a largura do container */
    /* No dashboard.php atual, o 'main' tem class="container-fluid py-4"
       e o conteúdo é dividido em colunas. Portanto, esta classe pode ser menos usada diretamente no 'main'.
       Se usada em um card ou div dentro do 'col-lg-8', mantenha os estilos. */
    background-color: var(--background-color-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px var(--shadow-color-medium);
    margin-top: 30px; /* Será aplicado se o elemento tiver margem superior */
    margin-bottom: 30px; /* Será aplicado se o elemento tiver margem inferior */
    flex: 1;
}

/* Estilos do Widget Card */
.widget-card {
    border: 1px solid var(--border-color-light);
    border-radius: 0.75rem;
    box-shadow: 0 0.125rem 0.25rem var(--shadow-color-card);
    background-color: var(--background-color-card);
    height: 100%; /* Isso faz com que o card preencha a altura da coluna, importante para alinhamento */
    display: flex; /* Transforma o card em um container flexível */
    flex-direction: column; /* Para organizar o conteúdo do card verticalmente */
}
.widget-card .card-title {
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Estilos do Footer --- */
.footer {
    border-top: 1px solid #e9ecef;
    background-color: var(--background-color-body);
    color: #6c757d;
}

/* --- Estilos específicos de producer_documents.php --- */
.search-container {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.matriculas-section, .old-matriculas-section {
    margin-top: 40px;
}
.matricula-card {
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: var(--background-color-card);
    box-shadow: 0 2px 5px var(--shadow-color-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.card-header-custom {
    margin-bottom: 15px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #0056b3; /* Cor azul mantida por ser específica deste header */
}
.card-body p {
    margin-bottom: 5px;
    font-size: 0.95rem;
}
.card-buttons {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.card-buttons .btn {
    white-space: nowrap;
}
.no-document {
    color: #6c757d;
    font-style: italic;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: .25rem;
    background-color: var(--background-color-body);
    font-size: 0.85rem;
    display: inline-block;
}
.table-responsive {
    margin-top: 20px;
}
.table thead th {
    background-color: #e9ecef;
    color: #495057;
    border-bottom: 2px solid var(--border-color-light);
}
.table tbody tr:hover {
    background-color: #f2f2f2;
}
.search-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color-dark);
}

/* --- Estilos específicos de producer_dominial.php --- */
.lineage-section {
    margin-bottom: 4rem;
    background-color: var(--background-color-card);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem var(--shadow-color-light);
}
.lineage-title {
    background-color: var(--secondary-color); /* Amarelo */
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color-dark);
}
.timeline-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd transparent;
    justify-content: flex-start;
    gap: 1rem;
}
.timeline-container::-webkit-scrollbar {
    height: 8px;
}
.timeline-container::-webkit-scrollbar-track {
    background: transparent;
}
.timeline-container::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 10px;
    border: 2px solid #f8f9fa;
}
.timeline-item {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.property-card {
    width: 280px;
    flex-shrink: 0;
    border: 1px solid var(--border-color-light);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem var(--shadow-color-card);
    transition: all 0.2s ease-in-out;
    background-color: var(--background-color-property-card); /* Fundo verde claro para os cards de histórico */
    color: var(--text-color-dark);
}
.property-card.last-item {
    background-color: var(--accent-blue-light); /* Azul claro para o último item */
    border-color: #bee5eb;
}
.property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.25rem 0.5rem var(--shadow-color-medium);
}
.property-card .card-header {
    background-color: var(--accent-green-light); /* Verde um pouco mais escuro */
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #a6d8a8;
    padding: 0.75rem;
    font-size: 0.95rem;
}
.property-card.last-item .card-header {
     background-color: var(--accent-blue-header);
     border-color: #92d1e9;
}
.property-card .list-group-item {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border-color: var(--border-color-light);
}
.property-card .list-group-item strong {
    color: var(--text-color-medium);
    display: inline-block;
}
.timeline-arrow {
    position: static;
    font-size: 2rem;
    color: #6c757d;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.timeline-item:last-child .timeline-arrow {
    display: none;
}

.producer-dashboard-container {
        padding: 20px;
        background-color: #f9f9f9;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .producer-dashboard-container h2, .producer-dashboard-container h3 {
        color: #333;
        margin-bottom: 15px;
    }
    .producer-dashboard-container h2 {
        font-size: 2em;
        border-bottom: 2px solid #eee;
        padding-bottom: 10px;
    }
    .dashboard-stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }
    .stat-card {
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        text-align: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        transition: transform 0.2s ease-in-out;
    }
    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .stat-card h4 {
        color: #555;
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    .stat-card p {
        font-size: 2.2em;
        font-weight: bold;
        color: #28a745; /* Um verde mais vibrante */
        margin: 0;
        line-height: 1.2;
    }
    .recent-activities {
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

/* --- Responsividade para Telas Menores --- */
@media (max-width: 768px) {
    .lineage-section {
        padding: 1.5rem;
    }
    .lineage-title {
        font-size: 1.5rem;
        padding: 0.6rem 1rem;
    }
    .timeline-container {
        flex-direction: column;
        overflow-x: visible;
        gap: 2rem;
        align-items: center;
        padding-bottom: 0;
    }
    .timeline-item {
        width: 90%;
        max-width: 350px;
        margin: 0 auto;
        flex-direction: column;
        gap: 1rem;
    }
    .property-card {
        width: 100%;
    }
    .timeline-arrow {
        transform: rotate(90deg);
        width: auto;
        height: auto;
    }
    .timeline-item:last-child .timeline-arrow {
        display: none;
    }
   .investing-iframe {
    height: 300px; /* Alterado de min-height para height fixo. Ajuste este valor (ex: 300px) conforme o que parecer bom visualmente */
    width: 100%; /* Garante que o iframe ocupe a largura total do seu contêiner */
    display: block;
    /* flex-grow: 1; pode ser removido, já que height é fixo agora. */
}

.read-status-text {
    font-style: italic;
    color: var(--text-color-medium); /* Cor mais suave */
    margin-left: 0.3rem; /* Pequeno espaçamento */
}
    /* O layout de duas colunas do dashboard se empilhará automaticamente */
    /* .col-lg-8 e .col-lg-4 se tornarão .col-12 em telas menores */
}

/* SUPORTE */

/* --- Estilos específicos de producer_support.php --- */

/* Seção do Formulário de Suporte */
.support-form-section {
    margin-bottom: 50px;
}

.support-form-card {
    background-color: var(--background-color-card);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 5px var(--shadow-color-light);
}

.support-form-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.support-form-buttons .btn {
    min-width: 180px;
}

/* Seção do Histórico de Suporte */
.support-history-section {
    margin-top: 40px;
}

.support-tickets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-ticket-card {
    background-color: var(--background-color-card);
    border: 1px solid var(--border-color-light);
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color-light);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.support-ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow-color-medium);
}

.ticket-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid var(--border-color-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.ticket-info h5.ticket-subject {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.ticket-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.ticket-id {
    font-weight: bold;
    color: var(--primary-color);
}

.ticket-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ticket-body {
    padding: 20px;
}

.ticket-message {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-color-dark);
}

/* Badges de Status */
.status-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.status-aberto {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-finalizado {
    background-color: #d1edff;
    color: #0c5460;
    border: 1px solid #b8daff;
}

/* Badges de Prioridade */
.priority-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.priority-baixa {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.priority-normal {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.priority-alta {
    background-color: #ffeaa7;
    color: #856404;
    border: 1px solid #ffdf7e;
}

.priority-urgente {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Badge de Categoria */
.category-badge {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* Resposta do Admin */
.admin-response {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin-top: 20px;
    border-radius: 0 5px 5px 0;
}

.admin-response h6 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.admin-response p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .support-form-card {
        padding: 20px;
    }
    
    .support-form-buttons {
        justify-content: stretch;
    }
    
    .support-form-buttons .btn {
        min-width: auto;
        flex: 1;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ticket-badges {
        justify-content: flex-start;
    }
    
    .ticket-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-ticket-card {
    animation: fadeInUp 0.3s ease-out;
}

/* Estados de foco melhorados */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 77, 46, 0.25);
}

/* Melhorias nos alertas */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px var(--shadow-color-light);
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* upload */

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#uploadPreview {
    border-left: 4px solid #0dcaf0;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* ========================================
   PDF VIEWER - MOBILE OPTIMIZATIONS
   ======================================== */

/* Container Principal */
.pdf-viewer-container {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Toolbar Responsiva */
.pdf-toolbar {
    background-color: #343a40;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    flex-wrap: nowrap;
}

/* Informações do Documento */
.pdf-info {
    display: flex;
    flex-direction: column
}

/* ========================================
   WIDGET DE CÂMBIO SIMPLIFICADO
   ======================================== */

/* Grid de moedas */
.currency-simple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* Card individual - minimalista */
.currency-simple-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    text-align: center;
}

.currency-simple-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

/* Cabeçalho */
.currency-simple-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.currency-simple-flag {
    font-size: 24px;
    line-height: 1;
}

.currency-simple-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Valor principal - destaque */
.currency-simple-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.currency-simple-amount {
    font-size: 16px;
    font-weight: 700;
    color: #495057;
}

.currency-simple-equal {
    font-size: 18px;
    font-weight: 600;
    color: #6c757d;
}

.currency-simple-brl {
    font-size: 20px;
    font-weight: 800;
    color: #2c3e50;
}

/* Variação */
.currency-simple-variation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.currency-simple-variation.positive {
    background-color: #d4edda;
    color: #155724;
}

.currency-simple-variation.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.currency-simple-variation i {
    font-size: 12px;
}

/* Footer */
.currency-simple-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.currency-simple-update {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.currency-simple-update i {
    color: #4CAF50;
}

/* Botão de atualizar - compacto */
.btn-refresh-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.btn-refresh-simple:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Loading e Erro */
.currency-loading,
.currency-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 20px;
    font-size: 14px;
    color: #6c757d;
}

.currency-error {
    color: #dc3545;
}

/* Responsividade */
@media (max-width: 768px) {
    .currency-simple-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .currency-simple-footer {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .currency-simple-grid {
        grid-template-columns: 1fr;
    }

    .currency-simple-value {
        flex-direction: column;
        gap: 4px;
    }

    .currency-simple-brl {
        font-size: 18px;
    }
}

/* ========================================
   WIDGET DE COMMODITIES AGRÍCOLAS
   ======================================== */

.commodities-simple-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.commodity-simple-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

.commodity-simple-card:hover {
    border-color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
    transform: translateY(-2px);
}

.commodity-simple-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.commodity-simple-icon {
    font-size: 24px;
    line-height: 1;
}

.commodity-simple-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.commodity-simple-name {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

.commodity-simple-unit {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.commodity-simple-value {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    padding: 10px 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.commodity-simple-price {
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
}

.commodity-simple-date-card {
    font-size: 10px;
    color: #6c757d;
    margin-bottom: 8px;
}

.commodity-simple-variation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.commodity-simple-variation.positive {
    background-color: #d4edda;
    color: #155724;
}

.commodity-simple-variation.negative {
    background-color: #f8d7da;
    color: #721c24;
}

.commodity-simple-variation i {
    font-size: 12px;
}

.commodity-simple-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.commodity-simple-date {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.commodity-simple-date i {
    color: #FF6B35;
}

.btn-refresh-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FF6B35 0%, #F44D2B 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.btn-refresh-simple:hover {
    background: linear-gradient(135deg, #F44D2B 0%, #DD3A18 100%);
    transform: rotate(180deg);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.commodity-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 20px;
    font-size: 14px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .commodities-simple-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .commodity-simple-footer {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .commodities-simple-grid {
        grid-template-columns: 1fr;
    }

    .commodity-simple-name {
        font-size: 12px;
    }

    .commodity-simple-price {
        font-size: 16px;
    }
}

/* ========================================
   ESTILOS ESPECÍFICOS DA TABELA DE ÁREAS
   ======================================== */

/* Tabela com header escuro (admin style) */
.table-dark {
    background-color: #343a40;
    color: white;
}

.table-dark th {
    background-color: #343a40;
    color: white;
    border-color: #454d55;
    font-weight: 600;
}

/* Hover effect nas linhas */
.table tbody tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.2s ease;
}

/* Grupo de botões */
.btn-group {
    display: flex;
    gap: 4px;
}

.btn-group .btn {
    border-radius: 4px;
}

/* Botões de ação */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
}

/* Badges de status */
.badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 600;
}

.bg-success {
    background-color: #28a745 !important;
    color: white !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #333 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
    color: white !important;
}

.text-dark {
    color: #333 !important;
}

/* Container de pesquisa */
.search-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.search-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color-dark);
    margin-bottom: 10px;
    display: block;
}

#searchInput {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 77, 46, 0.25);
}

/* Linhas da tabela com ID */
.area-row {
    transition: background-color 0.2s ease;
}

.area-row:hover {
    background-color: #f0f0f0;
}

/* Alinhamento de números */
.text-end {
    text-align: right;
}

/* Responsividade */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 4px;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .search-container {
        padding: 10px;
    }
}

/* Responsividade para tabelas com muitas colunas */
@media (max-width: 1200px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 0.6rem 0.4rem;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 900px;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }
}

.dropdown-item.active {
background-color: #1a4d2e;
}
