/* Estilos personalizados para o Sistema de Controle de Demandas */

/* Login fullscreen */
.login-fullscreen {
    min-height: 100vh;
}

.login-form-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
}

.cadastro-form-container {
    max-width: 800px;
    width: 100%;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto; /* Adiciona scroll vertical */
    overflow-x: hidden; /* Remove scroll horizontal */
    max-height: 100vh; /* Limita altura à viewport */
    width: 280px; /* Define largura fixa */
    background-color: #124070 !important; /* Chathams Blue */
}

/* Melhora o estilo da scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Container do conteúdo da sidebar */
.sidebar-content {
    padding-bottom: 2rem; /* Espaço no final */
}

/* Títulos de seção da sidebar */
.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Destaque especial para o menu de permissões */
.permissions-highlight {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 0.375rem;
    padding: 0.5rem;
    margin: 0.25rem 0.5rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
    }
}

.sidebar .nav-link {
    font-weight: 500;
    color: #ffffff !important; /* Texto branco para contraste com Chathams Blue */
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.125rem 0.5rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Cards do dashboard */
.card {
    border: none;
    border-radius: 0.75rem;
}

.card-header {
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .login-form-container,
    .cadastro-form-container {
        padding: 1rem;
    }
    
    .col-md-6:last-child,
    .col-md-4:last-child {
        display: none;
    }
}

/* Formulários */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    opacity: .65;
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Alertas */
.alert {
    border-radius: 0.75rem;
}

/* Botões */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Tabelas */
.table {
    border-radius: 0.75rem;
    overflow: hidden;
}

.table th {
    border-top: none;
    font-weight: 600;
}

.table:not(.table-dark) th {
    background-color: #f8f9fa;
}

/* Força visualização do table-dark - CSS mais específico */
.table.table-hover thead.table-dark th {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #32383e !important;
    font-weight: 600 !important;
}

.table-dark th {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #32383e !important;
}

.table-dark td {
    background-color: #212529;
    color: #ffffff;
    border-color: #32383e;
}

/* Especificidade extra para cabeçalhos */
thead.table-dark th {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Cores customizadas */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Hover effects */
.list-group-item-action:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

/* Icons */
.bi {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2d3748;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Estilos para sidebar com submenus colapsados */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Botões de expansão dos submenus */
.sidebar .btn-link {
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.sidebar .btn-link:focus {
    box-shadow: none !important;
}

/* Submenus colapsados */
.sidebar .collapse .nav-link {
    padding: 0.5rem 1rem 0.5rem 2rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar .collapse .nav-link:hover {
    color: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Ícones dos submenus */
.sidebar .collapse .nav-link i {
    margin-right: 0.5rem;
    width: 1rem;
    text-align: center;
}

/* Animação para as setas de expansão */
.sidebar [data-bs-toggle="collapse"] i {
    transition: transform 0.2s ease;
}

.sidebar [data-bs-toggle="collapse"][aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Background da tela de login com imagem do ônibus */
.login-background {
    background-image: url('../images/foto-onibus.jpg?v=20250928');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Card de login com transparência */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

/* Melhorar contraste do texto no card de login */
.login-card .card-header {
    background: #124070 !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(18, 64, 112, 0.3);
}

/* Logo da UFMG no card de login */
.ufmg-logo {
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.ufmg-logo:hover {
    transform: scale(1.05);
    background: transparent !important;
}

/* Logo da UFMG no sidebar */
.ufmg-sidebar-logo {
    width: 180px !important;
    height: auto !important;
    filter: brightness(1.3) contrast(1.2);
    transition: all 0.3s ease;
    background: transparent !important;
    padding: 22px !important;
    border-radius: 10px;
    max-width: 200px !important;
    display: block !important;
    margin: 0 auto 20px auto !important;
}

.ufmg-sidebar-logo:hover {
    transform: scale(1.15) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    filter: brightness(1.6) contrast(1.5);
}

/* Linha separadora do sidebar */
.sidebar-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 1rem 1.5rem;
}

/* Personalização dos botões primários com Chathams Blue */
.btn-primary {
    background-color: #124070 !important;
    border-color: #124070 !important;
}

.btn-primary:hover {
    background-color: #0e325a !important;
    border-color: #0e325a !important;
}

.btn-primary:focus, .btn-primary.focus {
    background-color: #0e325a !important;
    border-color: #0e325a !important;
    box-shadow: 0 0 0 0.25rem rgba(18, 64, 112, 0.25) !important;
}

/* Personalização dos cabeçalhos das listagens com Chathams Blue */
.table-header {
    background-color: #124070 !important;
    color: white !important;
}

.card-header {
    background-color: #124070 !important;
    color: white !important;
    border-color: #124070 !important;
}

.card-header.bg-info {
    background-color: #124070 !important;
}

.card-header.bg-primary {
    background-color: #124070 !important;
}

/* Cabeçalhos de tabelas */
.table thead th {
    background-color: #124070 !important;
    color: white !important;
    border-color: #124070 !important;
}

.table-light thead th {
    background-color: #124070 !important;
    color: white !important;
}

.table-dark thead th {
    background-color: #124070 !important;
    color: white !important;
}

/* Força a cor para thead com table-dark específico */
.table.table-hover thead.table-dark th {
    background-color: #124070 !important;
    color: white !important;
    border-color: #124070 !important;
}

thead.table-dark th {
    background-color: #124070 !important;
    color: white !important;
    border-color: #124070 !important;
}

/* Badges e elementos primários */
.bg-primary {
    background-color: #124070 !important;
}

.badge.bg-primary {
    background-color: #124070 !important;
}

/* Progress bars */
.progress-bar.bg-primary {
    background-color: #124070 !important;
}

/* Elementos de informação e destaque */
.bg-info {
    background-color: #124070 !important;
}

.text-primary {
    color: #124070 !important;
}

.border-primary {
    border-color: #124070 !important;
}

/* Links primários */
.link-primary {
    color: #124070 !important;
}

.link-primary:hover,
.link-primary:focus {
    color: #0e325a !important;
}

/* Alertas info com cor personalizada */
.alert-info {
    background-color: rgba(18, 64, 112, 0.1) !important;
    border-color: #124070 !important;
    color: #124070 !important;
}

/* Força aplicação da cor Chathams Blue em todas as classes table-dark */
.table-dark,
.table-dark th,
.table-dark td,
.table-dark thead th,
.table-dark tbody td {
    background-color: #124070 !important;
    color: white !important;
    border-color: rgba(18, 64, 112, 0.5) !important;
}

/* Especificamente para Bootstrap table-dark override */
.table-dark thead th {
    background-color: #124070 !important;
    border-color: rgba(18, 64, 112, 0.5) !important;
}

/* Container principal para não autenticados sem fundo */
.container-fluid.h-100 {
    background-color: #f8f9fa;
    position: relative;
}
