/* ==========================================================================
   appCon - Tema Futurista / Login
   ========================================================================== */

/* Tela de login ocupa 100% da viewport e usa um background futurista */
.login-body {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.6)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=1920&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

/* Efeito Glassmorphism (Vidro Translúcido Futurista) */
.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.login-card:hover {
    border-color: rgba(13, 110, 253, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Customização de inputs com fundo branco e ícones */
.login-card .form-control {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0;
    color: #1e293b !important;
    border-radius: 8px;
    padding-left: 3rem !important; /* Espaço para o ícone */
    height: 50px;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    background-color: #ffffff !important;
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Posicionamento dos ícones dentro do input */
.login-card .input-group-custom {
    position: relative;
}

.login-card .input-group-custom i {
    position: absolute;
    left: 1rem;
    /* Ajustado para compensar a ausência do form-floating */
    top: calc(50% + 14px); 
    transform: translateY(-50%);
    z-index: 5;
    color: #94a3b8;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.login-card .form-control:focus ~ i {
    color: #3b82f6;
}

.login-card .form-label {
    color: #1e3a8a;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.login-brand {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(45deg, #0dcaf0, #0d6efd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Botão Customizado Azul */
.btn-blue {
    background: linear-gradient(45deg, #0d6efd, #0a58ca);
    border: none;
    color: white !important;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-blue:hover {
    background: linear-gradient(45deg, #0a58ca, #084298);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(13, 110, 253, 0.4);
}

/* Animação de Entrada */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ==========================================================================
   appCon - Estilos de Interface Interna (Clean)
   ========================================================================== */

.card-clean {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    color: #334155;
}

.card-clean .card,
.card-clean .text-dark,
.card-clean .text-primary,
.card-clean .text-secondary,
.card-clean .text-muted {
    color: #334155 !important;
}

/* Interatividade para Menus e Itens clicáveis */
.navbar-nav .nav-link, 
.dropdown-item, 
.btn {
    cursor: pointer;
}

/* Configuração para permitir espaçamento entre linhas (Cards Slim) */
.custom-grid {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    margin-top: -8px;
}

/* Custom Grid - Cabeçalho acinzentado (Grayish) e letras azul escuro */
.custom-grid thead th {
    background-color: #eef2f7; /* Fundo acinzentado suave */
    color: #1e3a8a; /* Azul Escuro */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    border: none;
    padding: 8px 12px;
}

.custom-grid tbody tr {
    background-color: #f8fafc !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Botões de Ação Limpos no Grid */
.btn-action-clean {
    background: #f1f5f9;
    border: 1px solid #dbe4ef;
    border-radius: 6px;
    padding: 5px 8px;
    color: #64748b;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
}

.btn-action-clean .bi-pencil { color: #d97706 !important; }
.btn-action-clean .bi-trash { color: #dc3545 !important; }
.btn-action-clean:has(.bi-pencil) {
    background: #fff7ed;
    border-color: #fed7aa;
}
.btn-action-clean:has(.bi-trash) {
    background: #fef2f2;
    border-color: #fecaca;
}
.btn-action-clean:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
}
.btn-action-clean:hover:has(.bi-pencil) {
    background: #ffedd5;
    border-color: #fdba74;
}
.btn-action-clean:hover:has(.bi-trash) {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* Efeito de destaque e sobressalto ao passar o mouse */
.custom-grid tbody tr:hover {
    background-color: #eef6ff !important; 
    transform: translateY(-5px); /* Movimento para frente (elevação) */
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15); /* Sombra de profundidade */
    position: relative;
    z-index: 5;
}

/* Arredondamento das extremidades da linha para efeito de Card */
.custom-grid tbody td {
    border-top: 1px solid #dbe4ef;
    border-bottom: 1px solid #dbe4ef;
    padding: 13px 12px;
    vertical-align: middle;
    color: #334155;
    font-size: 0.82rem;
}

.custom-grid tbody td:first-child {
    border-left: 1px solid #dbe4ef;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.custom-grid tbody td:last-child {
    border-right: 1px solid #dbe4ef;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Responsividade: Transforma a linha da tabela em um Card Slim no Mobile */
@media (max-width: 768px) {
    .custom-grid thead { display: none; }
    .custom-grid tr {
        display: block;
        border: 1px solid #cbd5e1 !important;
        border-radius: 10px;
        margin-bottom: 10px; /* Espaço mínimo entre cards no mobile */
        background: #fff;
        padding: 15px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transition: transform 0.2s;
    }
    .custom-grid tr:hover {
        transform: scale(1.02);
    }
    .custom-grid td {
        display: flex;
        justify-content: space-between;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        padding: 8px 5px;
    }
    .custom-grid td:last-child { border-bottom: 0; }
    .custom-grid td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #1e3a8a;
        text-align: left;
    }
}

/* --- Ajustes de Layout e Rodapé (Sticky Footer) --- */
body:not(.login-body) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e2e8f0;
}

.content-wrapper {
    flex: 1 0 auto;
}

footer {
    margin-top: 3rem;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
}

/* --- Estilos para Cards Slim Coloridos do Painel --- */
.card-slim {
    border-radius: 12px;
    padding: 16px;
    border: none;
    color: #334155;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-slim:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-slim .icon-box {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-slim .fw-bold[style*="font-size: 1rem"] {
    font-size: 1.08rem !important;
}

.card-slim .fs-4 {
    font-size: 1.5rem !important;
    color: #ffffff !important;
}

.card-slim .small {
    font-size: 0.9rem !important;
    color: #ffffff !important;
}

.card-clean h4 {
    font-size: 1.15rem;
}

.card-clean h5 {
    font-size: 1rem;
}

.bg-blue-gradient { background: linear-gradient(45deg, #3b82f6, #2563eb); }
.bg-cyan-gradient { background: linear-gradient(45deg, #06b6d4, #0891b2); }
.bg-green-gradient { background: linear-gradient(45deg, #10b981, #059669); }
.bg-orange-gradient { background: linear-gradient(45deg, #f59e0b, #d97706); }
.bg-purple-gradient { background: linear-gradient(45deg, #8b5cf6, #7c3aed); }
.bg-red-gradient { background: linear-gradient(45deg, #ef4444, #dc2626); }
.bg-dark-gradient { background: linear-gradient(45deg, #475569, #1e293b); }

/* Ajustes de Densidade appCon (Fontes menores para Labels e Abas) */
.form-label.small, 
.nav-link.small {
    font-size: 0.75rem !important;
    margin-bottom: 0.15rem; /* Mantém o espaçamento compacto */
    color: #1e3a8a !important; /* Azul Escuro para as abas */
}

/* Destaque para a aba selecionada */
.nav-link.small.active {
    background-color: #e0f2fe !important; /* Fundo azul claro */
    color: #0d6efd !important; /* Azul primário mais vibrante */
    border-color: #0d6efd !important; /* Borda azul */
}
/* Padrao appCon para labels de todos os formularios internos */
.card-clean form label.form-label,
.card-clean form .form-check-label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    color: #1e3a8a !important;
    margin-bottom: 0.15rem;
}

/* Destaque para campos prioritários (Identificação) */
.input-destaque {
    background-color: #fffbeb !important; /* Amarelo palha suave */
    border-color: #f59e0b !important;    /* Borda âmbar */
    font-weight: 600 !important;
}
