.message-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4fc3f7;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Sistema de abas principal modificado */
.main-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.main-tab {
    padding: 12px 24px;
    cursor: pointer;
    background-color: #f5f5f5;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    transition: all 0.3s ease;
    color: #666;
    /* Cor cinza escuro quando inativo */
}

.main-tab.active {
    background-color: var(--primary-color);
    color: white;
    /* Permanece branco quando ativo */
    border-bottom: 2px solid var(--primary-color);
}

.main-tab:hover:not(.active) {
    background-color: #e0e0e0;
    color: #333;
    /* Escurece um pouco ao passar o mouse */
}

/*.main-content {
    display: none;
}*/

.main-content.active {
    display: block;
}

/* Estilos para o módulo de consulta CNPJ */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.search-input {
    display: flex;
    gap: 10px;
}

@media (max-width: 600px) {
    .search-input {
        flex-direction: column;
    }
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="search"],
select,
textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.contribui-nao-cadastrado {
    border-left: 3px solid #f39c12;
}

button:hover {
    background-color: var(--secondary-color);
}

button.secondary {
    background-color: #6c757d;
}

button.secondary:hover {
    background-color: #5a6268;
}

button.success {
    background-color: var(--success-color);
}

button.success:hover {
    background-color: #27ae60;
}

/*BOTÃO EXCLUIR COR VERMELHA*/
button.danger {
    background-color: var(--error-color);
}


/*button.danger:hover {
    background-color: #c0392b;
}*/

/*BOTÃO EDITAR COR LARANJA*/
button.warning {
    background-color: var(--warning-color);
}

button.warning:hover {
    background-color: #e67e22;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.result-container {
    display: none;
    margin-top: 20px;
}

.result-header>div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.result-title {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.company-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
}

.status-active {
    background-color: #2ecc71;
}

.status-inactive {
    background-color: #e74c3c;
}

.info-section {
    margin-bottom: 20px;
}

.info-title {
    color: var(--secondary-color);
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.info-item {
    margin-bottom: 15px;
}

.info-label {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    color: #666;
    font-size: 0.9em;
}

.info-value {
    color: var(--text-color);
    word-break: break-word;
}

.activities-list,
.partners-list {
    list-style: none;
    padding-left: 0;
}

.activities-list li,
.partners-list li {
    background-color: #f5f5f5;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.message-container {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.error-message {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.warning-message {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.info-message {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

.success-message {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.message-content {
    line-height: 1.5;
}

.message-actions {
    margin-top: 12px;
}

.message-action-btn {
    background-color: transparent;
    color: currentColor;
    border: 1px solid currentColor;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.btn-copy {
    background-color: #eee;
    color: var(--text-color);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #ddd;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

#btnClear {
    background-color: #f1f1f1;
    color: var(--text-color);
}

#btnClear:hover {
    background-color: #e1e1e1;
}

#btnPrint {
    background-color: var(--accent-color);
}

#btnPrint:hover {
    background-color: #3aa5d2;
}

.api-notes {
    margin-top: 20px;
    padding: 10px;
    background-color: #fff8e1;
    border-left: 3px solid #ffc107;
    font-size: 0.9em;
}

.simples-section,
.simei-section {
    background-color: #f5f7fa;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.simples-section h4,
.simei-section h4 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.simples-grid,
.simei-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.raw-json {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: auto;
    max-height: 300px;
    display: none;
}

#btnShowRawJson {
    background-color: #6c757d;
    margin-right: auto;
}

#btnShowRawJson:hover {
    background-color: #5a6268;
}

.tab-container {
    margin-top: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 15px;
    background-color: #f1f1f1;
    border: none;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    margin-right: 5px;
    margin-bottom: 5px;
    color: black;
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.countdown {
    font-weight: bold;
    color: var(--warning-color);
}

.sesc-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 10px;
    font-size: 0.9em;
}

.sesc-contribuinte {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.sesc-nao-contribuinte {
    background-color: #fff2f0;
    color: #d9534f;
    border: 1px solid #ffccc7;
}

.contribui-sesc {
    margin-top: 10px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

.contribui-sesc-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contribui-lista {
    margin-top: 10px;
}

.contribui-item {
    margin-bottom: 5px;
    padding: 8px;
    border-radius: 4px;
    background-color: #fff;
    border: 1px solid #e9ecef;
}

.contribui-sim {
    border-left: 3px solid #2ecc71;
}

.contribui-nao {
    border-left: 3px solid #e74c3c;
}

.contribui-cnae {
    font-weight: bold;
    margin-right: 10px;
}

.contribui-fpas {
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 10px;
}

.analise-sesc {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.resultado-analise {
    font-weight: bold;
    margin-left: 10px;
}

.resultado-sim {
    color: #2ecc71;
}

.resultado-nao {
    color: #e74c3c;
}

.db-info {
    background-color: #e8f4fd;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.db-status {
    font-weight: bold;
}

/*COLORIR O NOME CONECTADO*/
.db-status.online {
    color: var(--success-color);
}

.db-status.offline {
    color: var(--error-color);
}

.db-last-updated {
    color: #666;
    font-style: italic;
}

.db-record-count {
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/* Estilos específicos para o gerenciador CNAE */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.crud-search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
}

.crud-search-container input {
    flex: 1;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

tbody tr:hover {
    background-color: rgba(74, 111, 165, 0.05);
}

.actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.actions button {
    padding: .4rem .5rem;
    font-size: 12px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: var(--error-color);
}

.modal-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.checkbox-label {
    font-weight: normal;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
}

.pagination button.active {
    background-color: var(--secondary-color);
    font-weight: bold;
}

.no-records {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
}

.stat-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 200px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.badge-yes {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.badge-no {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.filter-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: bold;
    margin-right: 5px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.highlight {
    background-color: rgba(255, 239, 213, 0.5);
}

/* Estilo para quebra de texto */
.text-wrap {
    white-space: normal;
    word-break: break-word;
    max-width: 250px;
}

/* Estilo para o contador de caracteres */
.contador-caracteres {
    font-size: 0.8em;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

@media (max-width: 600px) {
    .toolbar {
        flex-direction: column;
    }

    .crud-search-container {
        max-width: 100%;
    }

    .stat-cards {
        flex-direction: column;
    }

    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group {
        width: 100%;
    }
}














/* Barra superior */
.top-bar {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: calc(100% - 270px);
    margin-left: 250px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 0 0 8px 8px;
}

.top-bar h1 {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: 600;
}

.top-bar .actions {
    display: flex;
    gap: 10px;
}

.top-bar button {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.top-bar button:hover {
    background: linear-gradient(90deg, #e9ecef, #dee2e6);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50, #34495e);
    color: white;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu a {
    display: block;
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 25px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    padding-top: 80px;
    width: calc(100% - 270px);
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Alinhamento à esquerda para conteúdo da aba CNPJ */
.content-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* Cabeçalho de usuário */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1em;
}

.user-role {
    font-size: 0.9em;
    color: #6c757d;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions a {
    text-decoration: none;
    color: #2c3e50;
    padding: 8px 15px;
    border-radius: 6px;
    background: #f1f1f1;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.user-actions a:hover {
    background: #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-actions .logout-btn {
    color: #dc3545;
}

/* Títulos */
h1,
h2,
h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.8em;
    font-weight: 700;
}

h2 {
    font-size: 1.5em;
    font-weight: 600;
}

h3 {
    font-size: 1.2em;
    font-weight: 500;
}

/* Botão de menu móvel */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 101;
    padding: 12px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #34495e, #2c3e50);
}

/* Abas primárias (alinhadas à esquerda) */
.main-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
    justify-content: flex-start;
    width: 100%;
}

.main-tab {
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-size: 1em;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.main-tab:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.main-tab.active {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    border-bottom: 2px solid #007bff;
}

.main-content[id="consulta-cnpj"],
.main-content[id="gerenciador-cnae"] {
    display: none;
}

.main-content.active {
    display: block;
}

.db-info {
    background-color: #e8f4fd;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

/* Status do banco de dados 
.db-info {
    background: #d4edda;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 0.9em;
    color: #155724;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
}*/

/* Container de busca */
.search-container {
    margin-bottom: 25px;
    width: 100%;
}

.search-container label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}

.search-input {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
}

.search-input input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

.search-input button {
    padding: 12px 25px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-input button:hover {
    background: linear-gradient(90deg, #0056b3, #003d80);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.api-notes {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
    font-style: italic;
    width: 100%;
}

/* Barra de ferramentas */
.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    width: 100%;
}

.toolbar button {
    padding: 12px 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.toolbar button.success {
    background: linear-gradient(90deg, #28a745, #218838);
    color: white;
    border-color: #28a745;
}

.toolbar button.success:hover {
    background: linear-gradient(90deg, #218838, #1e7e34);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* Status da empresa */
.company-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    margin-top: 10px;
}

.status-active {
    background: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.sesc-status {
    color: #dc3545;
    font-weight: 600;
}

/* Resultado */
.result-container {
    width: 100%;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Carregamento */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    width: 100%;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    margin-top: 10px;
    color: #6c757d;
}

/* Abas secundárias (alinhadas à esquerda) */
.tab-container {
    margin-top: 25px;
    width: 100%;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: flex-start;
}

.tab-button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.tab-button.active {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}

.tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Seção de informações */
.info-section {
    margin-bottom: 25px;
    width: 100%;
}

.info-title {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    color: #666;
    font-size: 0.9em;
}

/*.info-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
    margin-bottom: 5px;
}*/

.info-value {
    color: var(--text-color);
    word-break: break-word;
}

/*.info-value {
    color: #6c757d;
    font-size: 0.9em;
}*/

/* Tabela */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
    font-size: 0.9em;
}

th {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e9ecef;
}

/* Botões de ação na tabela (Editar e Excluir) */
.action-edit,
.action-delete {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-right: 5px;
}

.action-edit {
    background: linear-gradient(90deg, #ff9500, #e68a00);
    color: white;
}

.action-edit:hover {
    background: linear-gradient(90deg, #e68a00, #cc7a00);
    box-shadow: 0 4px 10px rgba(255, 149, 0, 0.3);
}

.action-delete {
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
}

.action-delete:hover {
    background: linear-gradient(90deg, #c82333, #bd2130);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* Botões de ação */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    width: 100%;
}

.action-buttons button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.action-buttons button:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#btnShowRawJson {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
}

#btnClear {
    background: linear-gradient(90deg, #6c757d, #5a6268);
    color: white;
}

#btnPrint {
    background: linear-gradient(90deg, #28a745, #218838);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
}

.modal-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #dc3545;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.modal-footer button {
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.modal-footer button.secondary {
    background: linear-gradient(90deg, #6c757d, #5a6268);
    color: white;
}

.modal-footer button.secondary:hover {
    background: linear-gradient(90deg, #5a6268, #4e555b);
}

.modal-footer button.success {
    background: linear-gradient(90deg, #28a745, #218838);
    color: white;
}

.modal-footer button.success:hover {
    background: linear-gradient(90deg, #218838, #1e7e34);
}

.modal-footer button.danger {
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
}

.modal-footer button.danger:hover {
    background: linear-gradient(90deg, #c82333, #bd2130);
}

/* Grupo de entrada */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.9em;
    font-weight: 600;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label {
    font-size: 0.9em;
    color: #333;
}

.contador-caracteres {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 5px;
}

/* Sem registros */
.no-records {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-size: 1em;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.pagination button {
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: #e9ecef;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination button.active {
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
}

/* Media Queries */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transition: all 0.3s ease;
    }

    .sidebar.active {
        width: 250px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 70px;
        transition: all 0.3s ease;
    }

    .main-content.pushed {
        margin-left: 250px;
        width: calc(100% - 250px);
    }

    .top-bar {
        width: 100%;
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-tabs,
    .tab-buttons {
        flex-wrap: wrap;
    }

    .search-input,
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-input input,
    .toolbar button {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}



.message-action-btn {
    background-color: transparent;
    color: currentColor;
    border: 1px solid currentColor;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.success-message {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.message-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.message-container.left-aligned {
    margin-left: 0;
    padding-left: 0;
    left: 0;
}

/*************MODELADO PARA PESQUISA CNPJ E CNAE**************************/
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* Main content container */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Stat cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.crud-search-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 300px;
}

input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input[type="search"]:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* Buttons */
button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.success {
    background: #34c759;
    color: white;
}

button.success:hover {
    background: #2eb54d;
}

button.secondary {
    background: #f1f3f5;
    color: #333;
}

button.secondary:hover {
    background: #e4e7eb;
}

#btnCrudSearch {
    background: #1a73e8;
    color: white;
}

#btnCrudSearch:hover {
    background: #1557b0;
}

/* Filter controls */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    min-width: 120px;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .crud-search-container {
        flex-direction: column;
        min-width: auto;
    }

    .crud-search-container button {
        width: 100%;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-select {
        width: 100%;
    }
}

.db-last-updated {
    color: #666;
    font-style: italic;
}

.db-record-count {
    background-color: var(--primary-color);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

/*Sistema CNPJ e CNAE x FPAS x SESC*/
/* Centralização do título e subtítulo */

.title-container {
    text-align: center;
    width: 100%;
    margin-bottom: 25px;
}

/*Alterar a cor do Titulo*/
.title-container h1 {
    font-size: 2.2em;
    /*Aumenta a fonte do h1*/
    color: #28679a;
    /*Azul escuro*/
    font-weight: 700;
}


.message-container {
    font-family: 'Arial', sans-serif;
    /* Altere para a fonte desejada */
    /* Outras propriedades do container */
}

.error-message {
    background-color: #ffebee;
    /* Vermelho claro */
    border-left: 5px solid #f44336;
    /* Vermelho */
    color: #b71c1c;
    /* Vermelho escuro para texto */
    font-family: 'Roboto', sans-serif;
    /* Fonte específica para erros */
}

.warning-message {
    background-color: #fff8e1;
    /* Amarelo claro */
    border-left: 5px solid #ffc107;
    /* Amarelo */
    color: #ff6f00;
    /* Laranja escuro para texto */
    font-family: 'Segoe UI', sans-serif;
    /* Fonte específica para avisos */
}

.success-message {
    background-color: #e8f5e9;
    /* Verde claro */
    border-left: 5px solid #4caf50;
    /* Verde */
    color: #2e7d32;
    /* Verde escuro para texto */
    font-family: 'Open Sans', sans-serif;
    /* Fonte específica para sucesso */
}

.info-message {
    background-color: #e3f2fd;
    /* Azul claro */
    border-left: 5px solid #2196f3;
    /* Azul */
    color: #0d47a1;
    /* Azul escuro para texto */
    font-family: 'Helvetica', sans-serif;
    /* Fonte específica para informações */
}

.message-container {
    margin: 0;
    /* Remove todas as margens */
    padding: 15px;
    /* Ajuste o padding interno conforme necessário */
    text-align: left;
    /* Alinha o texto à esquerda */
    width: 100%;
    /* Ocupa toda a largura disponível */
    box-sizing: border-box;
    /* Garante que padding não adicione largura */
    position: relative;
    /* Para posicionamento absoluto de elementos filhos */
    left: 0;
    /* Alinha o container no ponto 0 */
}

.success-message {
    /* Mantenha suas cores e estilos atuais */
    margin-left: 0;
    /* Remove margem esquerda */
    padding-left: 15px;
    /* Ajuste o recuo interno se necessário */
}

.message-container.left-aligned {
    margin-left: 0;
    padding-left: 0;
    left: 0;
}