/* Estilos Globais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    margin: 0;
    padding: 0;
}

.body {
    display: flex;
    min-height: 100vh;
}

.modal-footer {
    border-top: none !important;
}

.advision-table .table thead th {
    border-bottom: 2px solid #dee2e6 !important; /* Linha inferior suave */
}

/* Sidebar */
.sidebar {
    background-color: #ffffff;
    width: 60px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: width 0.3s ease-in-out;
    border-right: 1px solid #e1e5eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsible {
    background-color: #ffffff;
    height: 100vh;
}

.sidebar.expanded {
    width: 250px;
}

.sidebar:hover {
    width: 250px;
}

.sidebar-header {
    padding: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

.sidebar-header-fixed {
    background-color: #ffffff;
    border-bottom: 1px solid #e1e5eb;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.sidebar-title {
    color: #3498db;
    margin: 0;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar:hover .sidebar-title {
    opacity: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    position: relative;
    padding: 15px;
    margin: 5px 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    cursor: pointer;
    transition: background-color 0.3s;
    min-height: 50px;
    height: auto;
    box-sizing: border-box;
}

/* Wrapper para o conteúdo principal do item (ícone, texto, seta) */
.sidebar-item-content {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 20px;
    width: 100%;
}

.sidebar-item:hover {
    background-color: #f0f5f9;
}

.sidebar-item.active {
    background-color: #f8fafc;
    color: #2563eb;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #2563eb;
}

.sidebar-item-consistent {
    min-height: 50px;
    height: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.sidebar-item-logout {
    min-height: 50px;
    height: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    position: relative;
}

.sidebar-icon {
    font-size: 20px;
    width: 30px;
    text-align: center;
    color: #555;
}

.sidebar-icon-primary {
    color: #2563eb;
}

.sidebar-icon-dark {
    color: #000000;
}

.sidebar-icon-large {
    color: #000000;
    font-size: 1.1rem;
}

.sidebar-icon-danger {
    color: #dc2626;
}

.sidebar-item-label {
    margin-left: 15px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    color: #555;
}

.sidebar-item-label-dark {
    color: #000000;
}

.sidebar:hover .sidebar-item-label {
    opacity: 1;
}

/* Dropdown Icon */
.dropdown-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.dropdown-icon-primary {
    color: #2563eb;
}

.sidebar:hover .dropdown-icon {
    opacity: 1;
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding-left: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    width: 100%;
    order: 10;
}

.sidebar-item.expanded .sidebar-submenu {
    max-height: 300px;
    margin-top: 5px;
}

.sidebar-subitem {
    padding: 10px 10px 10px 45px;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-subitem:hover {
    background-color: #e6f7ff;
}

.sidebar-subitem-label {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.sidebar-subitem-label-dark {
    color: #000000;
}

.sidebar-subitem-icon {
    color: #6b7280;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

.sidebar:hover .sidebar-subitem-label {
    opacity: 1;
}

/* Sidebar Content Area */
.sidebar-content {
    overflow: hidden;
    flex: 1;
    padding: 1rem 0;
}

/* Rolagem vertical apenas quando sidebar expandida */
.sidebar:hover .sidebar-content,
.sidebar.expanded .sidebar-content {
    overflow-y: auto;
    overflow-x: hidden;
}

/* Estilização da barra de rolagem personalizada */
.sidebar:hover .sidebar-content::-webkit-scrollbar,
.sidebar.expanded .sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar:hover .sidebar-content::-webkit-scrollbar-track,
.sidebar.expanded .sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar:hover .sidebar-content::-webkit-scrollbar-thumb,
.sidebar.expanded .sidebar-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar:hover .sidebar-content::-webkit-scrollbar-thumb:hover,
.sidebar.expanded .sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Sidebar Separator */
.sidebar-separator {
    color: #e1e5eb;
    margin: 0.25rem 0;
}

/* Sidebar minilogo */
.sidebar-header {
    /* Transforma o container em um flex container */
    display: flex;

    /* Centraliza o item filho (o logo) horizontalmente */
    justify-content: center;

    /* Centraliza o item filho (o logo) verticalmente */
    align-items: center;

    /* Garante que o container tenha altura para a centralização vertical */
    height: 60px; /* Ajuste a altura conforme o design do seu header */
    padding: 5px 0; /* Adiciona um respiro vertical */
}

/* Garante que a transição da largura do logo seja suave */
#sidebar-logo {
    transition: width 0.3s ease-in-out;
}

/* Container Principal */
.home-container {
    flex-grow: 1;
    padding: 0;
    margin-left: 60px;
    width: calc(100% - 60px);
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.body.sidebar-expanded .home-container {
    margin-left: 250px;
    width: calc(100% - 250px);
}

.pages-container {
    padding: 20px;
    width: 100%;
}

/* Cabeçalho */
.header-pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Cards */
.indicator-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: none;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.indicator-card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #555;
}

.card-text {
    font-size: 2rem;
    font-weight: 300;
    color: #3498db;
}

/* Gráficos */
.chart-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Tabelas */
.table-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Página de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.login-header {
    padding: 30px;
    text-align: center;
    background-color: #ffffff;
}

.login-logo {
    width: 80px;
    margin-bottom: 20px;
}

.login-form {
    padding: 30px;
}

.login-input {
    background-color: #f8f9fa;
    border: 1px solid #e1e5eb;
    color: #495057;
}

.login-input:focus {
    background-color: #ffffff;
    color: #495057;
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.login-button {
    width: 100%;
    background-color: #3498db;
    border-color: #3498db;
    color: white;
    font-weight: bold;
    margin-top: 20px;
}

.login-button:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    color: white;
}

/* MFA */
.mfa-code-input {
    background-color: #f8f9fa;
    border: 1px solid #e1e5eb;
    color: #495057;
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
}

.qr-code-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Dashboard */
.dashboard-row {
    margin-bottom: 20px;
}

/* Responsivo */
@media (max-width: 768px) {
    .body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }
    
    .sidebar:hover {
        width: 100%;
    }
    
    .sidebar-item-label {
        opacity: 1;
    }
    
    .home-container {
        width: 100%;
    }
}

/* Úteis */
.text-muted {
    color: #95a5a6 !important;
}

.text-success {
    color: #2ecc71 !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-warning {
    color: #f39c12 !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

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

/* Muda a cor do ícone "X" no header do modal */
.modal-header .btn-close {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
}

/* Opcional: Melhora a visibilidade do "X" ao passar o mouse */
.modal-header .btn-close:hover {
    opacity: 0.75;
}

/* Seleciona os links DENTRO das células de boleto, invoice e bill */
td[data-dash-column="boleto"] a,
td[data-dash-column="invoice"] a,
td[data-dash-column="bill"] a {
    /* Propriedades para parecer um botão */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center;     /* Centraliza verticalmente */
    display: inline-block;
    padding: 6px 16px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 13px;
    
    /* Aparência */
    text-decoration: none;
    color: white;
    background-color: #0d6efd; /* NOVA COR AZUL PADRÃO */
    border: none;              /* Garante que não haja bordas inesperadas */
    cursor: pointer;           /* Muda o cursor para a "mãozinha" */
    
    /* Efeito suave ao passar o mouse */
    transition: all 0.2s ease-in-out;
}

/* Efeito ao passar o mouse */
td[data-dash-column="boleto"] a:hover,
td[data-dash-column="invoice"] a:hover,
td[data-dash-column="bill"] a:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Container para tabelas com scroll horizontal condicional */
.table-scroll-container {
    overflow-x: auto;
    max-width: 100%;
    border-radius: 4px;
    border: 1px solid #ffffff;
}

/* Estilos para indicadores do carrossel */
.carousel-indicator {
    height: 10px;
    width: 10px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background-color: #3498db; /* Cor do indicador ativo */
}

/* Estilos para Cards KPI */
.kpi-card {
  border: 1px solid #e9ecef; /* Borda padrão muito sutil */
  border-left-width: 4px; /* Prepara para a borda colorida */
  background-color: #ffffff;
  transition: all 0.2s ease-in-out;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
  border-color: #dee2e6;
}


/* Estilo do título dentro do card */
.kpi-card-title {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Estilo do valor principal */
.kpi-card-value {
  font-size: 2.1rem;
  font-weight: 700;
  color: #212529; /* Cor principal do texto (preto forte) */
  text-align: right; /* Alinhamento à direita cria um visual profissional */
  margin-top: 8px; /* Espaçamento */
}

/* Estilos para Dropdowns Customizados */
.custom-dropdown .Select-control {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  color: #333333 !important;
}

.custom-dropdown .Select-placeholder {
  color: #6c757d !important;
}

.custom-dropdown .Select-input > input {
  color: #333333 !important;
}

.custom-dropdown .Select-value-label {
  color: #333333 !important;
}

.custom-dropdown .Select-menu-outer {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.custom-dropdown .Select-option {
  color: #333333 !important;
  background-color: #ffffff !important;
  padding: 8px 12px !important;
}

.custom-dropdown .Select-option:hover {
  background-color: #f8f9fa !important;
  color: #333333 !important;
}

.custom-dropdown .Select-option.is-focused {
  background-color: #e9ecef !important;
  color: #333333 !important;
}

.custom-dropdown .Select-option.is-selected {
  background-color: #3498db !important;
  color: #ffffff !important;
}

/* Estilos para dcc.Dropdown mais modernos */
.dash-dropdown .Select-control {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  border-radius: 6px !important;
  min-height: 38px !important;
  font-size: 14px !important;
  min-width: 300px !important;
}

.dash-dropdown .Select-placeholder,
.dash-dropdown .Select-input input {
  color: #6c757d !important;
  font-size: 14px !important;
}

.dash-dropdown .Select-value-label {
  color: #333333 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  line-height: 1.3 !important;
}

.dash-dropdown .Select-arrow {
  border-top-color: #6c757d !important;
}

.dash-dropdown .Select-menu {
  background-color: #ffffff !important;
  border: 1px solid #ced4da !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  z-index: 9999 !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  min-width: 400px !important;
  padding: 4px !important;
}

.dash-dropdown .Select-option {
  color: #333333 !important;
  background-color: transparent !important;
  font-size: 14px !important;
  padding: 10px 12px !important;
  cursor: pointer !important;
  min-height: 40px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  height: auto !important;
  line-height: 1.5 !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: 2px !important;
  border-radius: 4px !important;
}

.dash-dropdown .Select-option:hover {
  background-color: #f8f9fa !important;
  color: #333333 !important;
}

.dash-dropdown .Select-option.is-focused {
  background-color: #e3f2fd !important;
  color: #1976d2 !important;
}

.dash-dropdown .Select-option.is-selected {
  background-color: #3498db !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.platform-dropdown .Select-menu {
    width: 300px !important; 
    min-width: 300px !important; /* Essencial para sobrescrever o min-width: 400px */
}

/* Efeitos hover para ícones nos cards clicáveis da Performance Detalhada */
.kpi-card:hover .fa-chart-line {
    color: #1976d2 !important;
}

.kpi-card:hover .fa-cogs {
    color: #388e3c !important;
}

/* Hover específico para cards com wrappers (modais) */
#card-analise-detalhada:hover .kpi-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
    border-color: #dee2e6;
}

#card-acoes-detalhada:hover .kpi-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
    border-color: #dee2e6;
}

#card-analise-detalhada:hover .fa-chart-line {
    color: #1976d2 !important;
}

#card-acoes-detalhada:hover .fa-cogs {
    color: #388e3c !important;
}