/* ... (O conteúdo do style.css é o mesmo da resposta anterior, sem alterações) ... */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    color: #f0f0f0;
    background-color: #121212;
    overflow: hidden;
}

.background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('background.png');
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.7);
    z-index: -1;
}

.calculator-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    background-color: rgba(40, 44, 52, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 120px;
    margin-bottom: 15px;
}

h1 {
    font-weight: 300;
    font-size: 1.8em;
    border-bottom: 1px solid #4f5b62;
    padding-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #aab8c2;
}

.form-group input {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    background-color: #2c313a;
    border: 1px solid #4f5b62;
    border-radius: 4px;
    color: #f0f0f0;
    font-size: 1em;
}

button {
    cursor: pointer;
}

.btn-calculate {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 700;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-calculate:hover {
    background-color: #0056b3;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #282c34;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

.modal-content h2 {
    margin-top: 0;
    color: #61afef;
}

.checkbox-group {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkbox-group input {
    margin-right: 10px;
}

.modal-actions {
    margin-top: 25px;
    display: flex;
    justify-content: space-around;
}

.modal-actions button {
    padding: 10px 30px;
    border-radius: 4px;
    border: none;
    font-size: 1em;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #28a745;
    color: white;
}

.btn-primary:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #218838;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

#result-text {
    font-size: 1.2em;
    margin: 20px 0;
}

/* --- NOVO LAYOUT --- */
.main-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 250px;
    background-color: #1e2229;
    color: #c8d6e5;
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #4f5b62;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding-top: 15px;
}
.nav-item {
    padding: 15px 20px;
    color: #c8d6e5;
    text-decoration: none;
    transition: background-color 0.2s;
}
.nav-item:hover {
    background-color: #4f5b62;
}
.nav-item.active {
    background-color: #007bff;
    color: white;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 70px;
    background-color: #282c34;
    border-bottom: 1px solid #4f5b62;
}

.topbar-right .user-menu {
    position: relative;
}
.user-menu-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
}
.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background-color: #282c34;
    border: 1px solid #4f5b62;
    border-radius: 4px;
    width: 150px;
    z-index: 100;
}
.user-menu:hover .user-menu-dropdown {
    display: block;
}
.user-menu-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #c8d6e5;
    text-decoration: none;
}
.user-menu-dropdown a:hover {
    background-color: #4f5b62;
}

.content-area {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Estilos do Dashboard */
.dashboard-container {
    padding: 20px;
}

.welcome-message {
    background-color: #282c34;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid #007bff;
}

.welcome-message h1 {
    margin-top: 0;
    font-weight: 300;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background-color: #282c34;
    padding: 20px;
    border-radius: 8px;
}

.dashboard-card h2 {
    margin-top: 0;
    font-weight: 400;
    color: #61afef;
    border-bottom: 1px solid #4f5b62;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.dashboard-card ul {
    list-style: none;
    padding: 0;
}

.dashboard-card ul li {
    margin-bottom: 10px;
}

/* --- APRIMORAMENTOS DO SIDEBAR --- */
.sidebar-header {
    font-size: 1.1em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px; /* Espaço entre o ícone e o texto */
}

.nav-item i {
    font-size: 1.2em; /* Tamanho do ícone */
    width: 20px; /* Alinhamento */
    text-align: center;
}

.nav-item.disabled {
    color: #6a737c;
    cursor: not-allowed;
}

/* --- Estilos Perfil e Configurações --- */
.card {
    background-color: #282c34;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.card h2 {
    margin-top: 0;
    font-weight: 400;
    color: #61afef;
    border-bottom: 1px solid #4f5b62;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.config-container h1, .profile-container h1 {
    font-weight: 300;
    margin-bottom: 30px;
}

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

.integrations-list table {
    width: 100%;
    border-collapse: collapse;
}
.integrations-list th, .integrations-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #4f5b62;
}
.integrations-list th {
    color: #aab8c2;
    font-weight: 500;
}
.integrations-list td {
    color: #f0f0f0;
}
.status-connected {
    color: #28a745;
    font-weight: bold;
}
.status-disconnected {
    color: #dc3545;
}
.btn-icon {
    background: none;
    border: none;
    color: #61afef;
    cursor: pointer;
    font-size: 1.1em;
    padding: 5px;
}
.btn-icon:hover {
    color: #ffffff;
}
.btn-primary { /* Estilo geral para botões primários */
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-secondary { /* Estilo para botões secundários */
     padding: 10px 20px;
     background-color: #6c757d;
     color: white;
     border: none;
     border-radius: 4px;
     cursor: pointer;
     transition: background-color 0.3s;
     margin-right: 10px;
 }
.btn-secondary:hover {
     background-color: #5a6268;
 }

/* Estilos básicos para o modal (já presentes, mas garantindo) */
.modal-overlay { z-index: 1000; }
.modal-content { /* Ajustes podem ser necessários */ }

/* --- NOVOS ESTILOS LAYOUT V2 --- */

/* Logo e Título na Sidebar e Topbar */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo {
    height: 30px; /* Ajuste o tamanho conforme necessário */
    width: auto;
}
.sidebar-title {
    font-size: 1.1em;
    font-weight: bold;
}
.topbar-logo {
    height: 35px; /* Pode ser diferente na topbar */
    width: auto;
}
.topbar-title {
    font-size: 1.2em;
    font-weight: bold;
    color: #f0f0f0;
}

/* Ajustes Sidebar */
.sidebar-header.logo-area {
    padding: 18px 20px; /* Ajuste o padding */
    justify-content: center; /* Centraliza logo e título */
}

/* Grupo de Item de Menu com Submenu */
.nav-item-group {
    display: flex;
    flex-direction: column;
}
.nav-item.has-submenu {
    justify-content: space-between; /* Empurra a seta para a direita */
}
.submenu-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}
.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg); /* Gira a seta quando aberto */
}

/* Estilo do Submenu */
.submenu {
    display: none; /* Escondido por padrão */
    padding-left: 30px; /* Indentação */
    background-color: rgba(0,0,0,0.1); /* Fundo sutil */
}
.submenu-item {
    display: block;
    padding: 12px 20px;
    color: #aab8c2;
    text-decoration: none;
    font-size: 0.9em;
}
.submenu-item:hover {
    color: #ffffff;
    background-color: rgba(79, 91, 98, 0.5); /* #4f5b62 com transparência */
}
.submenu-item.active {
    color: #ffffff;
    font-weight: bold;
}

/* Título de Seção na Sidebar */
.sidebar-section-title {
    padding: 15px 20px 5px;
    font-size: 0.8em;
    color: #6a737c;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 10px;
}

/* --- ESTILO USER MENU (ON CLICK) --- */
.user-menu {
    position: relative;
}

.user-menu-button { /* Mantém o estilo do botão */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
}

.user-menu-dropdown {
    display: none; /* Escondido por padrão */
    position: absolute;
    right: 0;
    top: 100%; 
    margin-top: 5px; 
    background-color: #282c34;
    border: 1px solid #4f5b62;
    border-radius: 4px;
    width: 150px;
    z-index: 1100; /* Aumentado para garantir que fica por cima */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* A MÁGICA: Mostra o dropdown quando a classe 'visible' é adicionada pelo JS */
.user-menu-dropdown.visible {
    display: block;
}

/* Estilos dos links dentro do dropdown (mantém o que já tínhamos) */
.user-menu-dropdown a {
    display: block;
    padding: 10px 15px;
    color: #c8d6e5;
    text-decoration: none;
    white-space: nowrap; /* Evita quebra de linha */
}
.user-menu-dropdown a:hover {
    background-color: #4f5b62;
    color: #ffffff;
}

/* Ajuste no Content Area para compensar a Topbar */
.main-content {
    /* ... outras propriedades ... */
    height: 100vh; /* Ocupa a altura total */
}
.content-area {
   /* ... outras propriedades ... */
   height: calc(100vh - 70px); /* Altura total menos a altura da topbar */
   overflow-y: auto; /* Adiciona scroll se o conteúdo for maior */
}

/* Remove header interno da calculadora que não é mais necessário */
.calculator-header-inner {
    display: none; 
}
.calculator-container {
    margin-top: 0; /* Remove margem que pode ter ficado */
}

/* --- ESTILOS PAINEL DE CONFIGURAÇÕES --- */
.config-container {
    max-width: 900px; /* Ou a largura que preferir */
    margin: 0 auto;
}

.config-container h1 {
    font-weight: 300;
    margin-bottom: 30px;
    color: #f0f0f0; /* Garante cor clara */
}

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

.integrations-list.card {
    background-color: #282c34;
    padding: 0; /* Remove padding do card para a tabela ocupar tudo */
    border-radius: 8px;
    overflow: hidden; /* Garante que cantos arredondados funcionem na tabela */
}
.integrations-list h2 { /* Título dentro do card */
     padding: 20px 25px 15px;
     margin: 0;
     font-weight: 400;
     color: #61afef;
     border-bottom: 1px solid #4f5b62;
 }

.integrations-list table {
    width: 100%;
    border-collapse: collapse;
}
.integrations-list th, 
.integrations-list td {
    padding: 15px 25px; /* Aumenta o padding */
    text-align: left;
    border-bottom: 1px solid #4f5b62;
    color: #f0f0f0; /* COR DO TEXTO - IMPORTANTE */
}
/* Remove a borda da última linha */
.integrations-list tr:last-child td {
    border-bottom: none;
}

.integrations-list th {
    color: #aab8c2;
    font-weight: 500;
    font-size: 0.9em;
    text-transform: uppercase;
}

.status-connected {
    color: #28a745;
    font-weight: bold;
    background-color: rgba(40, 167, 69, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}
.status-disconnected {
    color: #ffc107; /* Amarelo para 'Não Configurado' */
    font-weight: bold;
    background-color: rgba(255, 193, 7, 0.15);
     padding: 3px 8px;
    border-radius: 4px;
     font-size: 0.85em;
}

/* Garante que botões primários e secundários existam */
.btn-primary { /* ...definição... */ }
.btn-secondary { /* ...definição... */ }
.btn-icon { /* ...definição... */ }

/* Estilos do Modal (garantir que existem) */
#edit-token-modal .modal-content { /* ...definição... */ }
#edit-token-modal .form-group { /* ...definição... */ }
#edit-token-modal .modal-actions { /* ...definição... */ }
#edit-token-modal small { color: #aab8c2; font-size: 0.85em; margin-top: 5px; display: inline-block;}
#edit-token-modal input:disabled { background-color: #3a3f4a; cursor: not-allowed; opacity: 0.7;}

/* Garante cor de texto padrão clara para a área de conteúdo */
.content-area {
    color: #f0f0f0; 
}

/* Tabela dentro do card */
.integrations-list.card {
     background-color: #282c34;
     padding: 0; 
     border-radius: 8px;
     overflow: hidden; 
     color: #f0f0f0; /* Cor padrão do texto dentro do card */
 }
.integrations-list h2 {
     padding: 20px 25px 15px;
     margin: 0;
     font-weight: 400;
     color: #61afef;
     border-bottom: 1px solid #4f5b62;
 }
.integrations-list table {
    width: 100%;
    border-collapse: collapse;
}
.integrations-list th, 
.integrations-list td {
    padding: 15px 25px;
    text-align: left;
    border-bottom: 1px solid #4f5b62;
    color: inherit; /* Herda a cor do .card */
}
.integrations-list tr:last-child td { border-bottom: none; }
.integrations-list th { /* ... */ }
.status-connected { /* ... */ }
.status-disconnected { /* ... */ }
.empty-table { /* Estilo para a mensagem de tabela vazia */
    text-align: center;
    padding: 30px;
    color: #aab8c2;
}

/* Mensagens de status/erro */
.status-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}
.status-message.success {
    background-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
    border: 1px solid #28a745;
}
.status-message.error {
    background-color: rgba(220, 53, 69, 0.3);
    color: #dc3545;
    border: 1px solid #dc3545;
}

/* --- ESTILOS DE STATUS COM FUNDO COLORIDO --- */
.status-connected,
.status-warning,
.status-disconnected,
.status-untested,
.status-testing {
    display: inline-block; /* Permite padding */
    padding: 4px 10px;     /* Espaçamento interno */
    border-radius: 12px;   /* Cantos arredondados (pílula) */
    font-size: 0.8em;      /* Tamanho da fonte */
    font-weight: bold;     /* Negrito */
    text-transform: uppercase; /* Maiúsculas */
    cursor: default;       /* Cursor padrão para o title aparecer */
    text-align: center;
    min-width: 100px; /* Largura mínima para alinhamento */
}

.status-connected {
    color: #e0f2f7; /* Texto claro */
    background-color: #28a745; /* Verde */
}
.status-warning { /* Para Falha Auth */
    color: #fff; /* Texto branco */
    background-color: #ff9800; /* Laranja */
}
.status-disconnected { /* Para Falha URL, Erro ou Não Configurado (agora vermelho) */
    color: #fff; /* Texto branco */
    background-color: #dc3545; /* Vermelho */
}
.status-untested { /* Para Não Testado */
    color: #e0f2f7; /* Texto claro */
    background-color: #6c757d; /* Cinza */
}
.status-testing { /* Para Testando... */
    color: #fff; /* Texto branco */
    background-color: #007bff; /* Azul */
    font-style: italic;
}

/* Animação de giro para o ícone (se Font Awesome estiver carregado) */
.fa-spin {
    animation: fa-spin 1s infinite linear;
}
@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

