:root {
  --color-primary: #53658B;
  --color-secondary: #FAC80F;
  --color-accent: #3b82f6;
  --color-accent-weak: rgba(59,130,246,.15);
  --color-bg: #0b1220;
  --color-surface: #101826;
  --color-text: #e6edf3;
  --color-muted: #94a3b8;
}

/* static/css/custom.css */

/* Estilos aplicados a todas as páginas */
body {
  background-color: #f8f9fa; /* Fundo cinza claro para o sistema */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Classe específica com a imagem de fundo para o login */
.login-background {
  background-image: url('../img/Background_Login.jpg'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Regra para centralizar o conteúdo APENAS na página de login */
.login-background main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
}

/* --- ESTILO DA NAVBAR --- */
.navbar-custom {
    background-color: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Links da navbar */
.navbar-custom .nav-link,
.navbar-custom .navbar-text {
    color: #FFFFFF;
    font-weight: bold;
    transition: color 0.3s ease;
}

/* Link ativo */
.navbar-custom .nav-link.active {
    color: #e6a742;
    background-color: rgba(230, 167, 66, 0.1);
    border-radius: 0.375rem;
}

/* Hover effect para links da navbar */
.navbar-custom .nav-link:hover {
    color: #e6a742;
}

/* Navbar brand/logo */
.navbar-logo {
    color: #e6a742 !important;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-logo:hover {
    color: #f1b85e !important;
}

/* Dropdown */
.navbar-custom .dropdown-toggle {
    color: #ffffff;
}

.navbar-custom .dropdown-menu {
    background-color: #1a1a1a;
    border: 1px solid #e6a742;
}

.navbar-custom .dropdown-item {
    color: #ffffff;
    transition: all 0.3s ease;
}

.navbar-custom .dropdown-item:hover {
    background-color: #e6a742;
    color: #000;
}

/* Badge do perfil de usuário */
.badge-perfil {
    background-color: #e6a742;
    color: #000;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
    border: 1px solid #d19530;
    cursor: help;
}

/* Cores específicas por perfil */
.badge-perfil[title*="Super Administrador"] {
    background-color: #dc3545;
    color: white;
    border-color: #b02a37;
}

.badge-perfil[title*="Financeiro"] {
    background-color: #28a745;
    color: white;
    border-color: #1e7e34;
}

.badge-perfil[title*="Operacional"] {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.navbar-custom .dropdown-toggle:hover {
    color: #f1b85e;
}


/* NOVO: Estilo para o botão de logout vermelho */
.btn-logout {
    background-color: #dc3545; /* Vermelho do Bootstrap */
    border-color: #dc3545;
    color: white;
    font-weight: bold;
}

.btn-logout:hover {
    background-color: #c82333; /* Vermelho mais escuro */
    border-color: #bd2130;
    color: white;
}


/* --- ESTILOS PARA TÍTULOS DE PÁGINA --- */
.title-header-yellow {
    background-color: #F6AE2D;
    color: #000;
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Estilos para headers de tabelas/cards */
.table-header-yellow thead th {
    background-color: #F6AE2D;
    color: #000;
    font-weight: bold;
}

/* --- ESTILOS DA PÁGINA HOME --- */
.dashboard-container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.table th, .table td {
    text-align: center;
    vertical-align: middle;
}


/* Estilo para a logo do login */
.login-logo {
  width: auto;
  height: 60px;
}

/* ... (resto do seu CSS para o login-card, etc.) ... */
.login-card {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.login-card h2 {
  color: #4a4a4a;
  margin-bottom: 1.5rem;
  font-weight: 300;
  font-size: 1.5rem;
}

.form-label {
  color: #5a5a5a;
  font-weight: 500;
}

.btn-custom-green {
  background-color: #2c6b45;
  border-color: #2c6b45;
  color: white;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease;
}

.btn-custom-green:hover {
  background-color: #245738;
  border-color: #1d452c;
  transform: translateY(-2px);
}

/* --- CONTROLE DE BOTÕES POR PERFIL --- */

/* Botões que são ocultados baseado no perfil */
.btn-restricted {
  display: none !important;
}

/* Botões de edição - apenas para SUPERADMIN */
.btn-edit-restricted:not(.profile-superadmin .btn-edit-restricted) {
  display: none !important;
}

/* Indica botões desabilitados por perfil */
.btn-readonly {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.btn-readonly:hover {
  opacity: 0.6;
}

.btn-readonly::after {
  content: "🔒";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
}

/* Alert para usuários sem permissão de edição */
.permission-alert {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  display: none;
}

.permission-alert.show {
  display: block;
}

.permission-alert i {
  color: #e17055;
  margin-right: 0.5rem;
}

/* Estilos para indicar modo somente leitura - REMOVIDO */

/* Oculta elementos baseado no perfil via CSS */
body:not(.profile-superadmin) .superadmin-only {
  display: none !important;
}

body:not(.profile-financeiro):not(.profile-superadmin) .financeiro-access {
  display: none !important;
}

body:not(.profile-operacional):not(.profile-superadmin) .operacional-access {
  display: none !important;
}

body.profile-financeiro .no-financeiro {
  display: none !important;
}

/* Estilos para diferentes perfis no body */
body.profile-superadmin {
  /* Super admin tem acesso total */
}

body.profile-financeiro {
  /* Financeiro tem acesso limitado */
}

body.profile-operacional {
  /* Operacional tem acesso básico */
}

/* --- ESTILOS PERSONALIZADOS PARA BOTÕES --- */
/* Botões primários com cor personalizada */
.btn-primary {
    background-color: #0D6EFD !important;
    border-color: #0D6EFD !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #0B5ED7 !important;
    border-color: #0A53BE !important;
    color: white !important;
}

.chart-loading-overlay, .chart-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}
.card-body {
    position: relative;
}

/* Ensure proper striped table styling even with additional classes */
.table-striped > tbody > tr:not(.table-secondary):nth-of-type(odd),
.table-striped > tbody > tr.table-secondary:nth-of-type(odd) {
    --bs-table-bg: rgba(0, 0, 0, 0.05);
}

.table-striped > tbody > tr:not(.table-secondary):nth-of-type(even),
.table-striped > tbody > tr.table-secondary:nth-of-type(even) {
    --bs-table-bg: rgba(0, 0, 0, 0);
}


