/* =========================================
   1. RESET E VARIÁVEIS GLOBAIS
   ========================================= */
:root {
    --c-orange: #f58634;
    --c-orange-dark: #d94e00;
    --c-bg-body: #f4f7fa; /* Cinza azulado muito leve (Moderno) */
    --c-text-dark: #2d3748;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--c-bg-body);
    overflow: hidden; /* O layout gerencia o scroll */
}

/* =========================================
   2. LAYOUT GRID (ESTRUTURA PRINCIPAL)
   ========================================= */
.layout-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- A SIDEBAR (Laranja Degradê) --- */
.layout-sidebar {
    width: 260px;
    /* O segredo: Um gradiente rico que vai do laranja vivo a um tom mais escuro */
    background: linear-gradient(160deg, var(--c-orange) 0%, var(--c-orange-dark) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 4px 0 20px rgba(245, 134, 52, 0.25); /* Sombra laranja suave */
    z-index: 20; /* Fica acima do conteúdo */
    position: relative;
}

/* --- A ÁREA PRINCIPAL (Direita) --- */
.layout-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--c-bg-body);
    position: relative;
}

/* --- O HEADER (BRANCO - O Respiro Visual) --- */
.layout-header {
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Avatarzinho simples do Header */
.avatar {
    width: 35px;
    height: 35px;
    background-color: var(--c-bg-body);
    color: var(--c-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid var(--c-orange);
}

/* --- O CORPO DA PÁGINA --- */
.layout-body {
    flex-grow: 1;
    overflow-y: auto; /* Scroll acontece aqui dentro */
    padding: 2rem;
}

.content-wrapper {
    max-width: 1400px; /* Limita largura em telas gigantes */
    margin: 0 auto;
}

/* =========================================
   3. ESTILO DO MENU (Dentro da Sidebar)
   ========================================= */
.sidebar-header {
    height: 70px; /* Alinha com a altura do Header Branco */
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu-container {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1; /* Ocupa altura disponível */
}

/* LINKS DO MENU */
.nav-item-custom a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85); /* Branco suave */
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
}

    .nav-item-custom a i {
        margin-right: 12px;
        font-size: 1.1rem;
        opacity: 0.8;
    }

    /* HOVER (Passar o mouse) */
    .nav-item-custom a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        color: white;
    }

    /* ATIVO (Item Selecionado - Pílula Branca) */
    .nav-item-custom a.active {
        background-color: white; /* Fundo Branco Puro */
        color: var(--c-orange-dark) !important; /* Texto Laranja Escuro */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        font-weight: 700;
    }

        .nav-item-custom a.active i {
            color: var(--c-orange); /* Ícone Laranja */
            opacity: 1;
        }

/* ===============================================
   4. ESTILO DO LOGIN (CARD CENTRALIZADO)
   =============================================== */

/* O container que centraliza tudo na tela */
.login-wrapper-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    width: 100%;
}

/* O Cartão Branco */
.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.login-title {
    color: var(--c-text-dark);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-logo-area {
    margin-bottom: 2rem;
    color: var(--c-orange);
}

/* Inputs de Login (Forçando Branco e Limpo) */
.form-floating > .form-control {
    border: 1px solid #ced4da;
    background-color: #ffffff !important; /* Fundo Branco Obrigatório */
    border-radius: 8px;
    color: #333;
}

    .form-floating > .form-control:focus {
        background-color: #fff;
        border-color: var(--c-orange);
        box-shadow: 0 0 0 3px rgba(245, 134, 52, 0.15);
    }

.form-floating > label {
    color: #a0aec0;
}

/* ===============================================
   5. BOTÕES (A CORREÇÃO DO BRANCO SOBRE BRANCO)
   =============================================== */

.btn-celmi {
    /* Gradiente Laranja FORÇADO */
    background: linear-gradient(90deg, var(--c-orange) 0%, var(--c-orange-dark) 100%) !important;
    color: #ffffff !important; /* Texto Branco */
    border: none !important;
    /* Estilo */
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
}

    .btn-celmi:hover {
        /* Inverte gradiente e sobe */
        background: linear-gradient(90deg, var(--c-orange-dark) 0%, var(--c-orange) 100%) !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(245, 134, 52, 0.4);
    }
