/* ==========================================================================
   1. VARIÁVEIS E RESET UNIVERSAL
   ========================================================================== */
:root {
    --cor-primaria: #1d1d1d;    /* Tom de preto para botões e sidebar */
    --cor-fundo: #f4f7f6;       /* Cinza claro para o fundo do painel */
    --cor-texto: #333333;       /* Cor de texto padrão */
    --branco: #ffffff;          /* Branco puro */
    --erro: #ff4d4d;            /* Vermelho vibrante para alertas no fundo escuro */
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. CONTEXTO DE LOGIN (Apenas para index.php)
   ========================================================================== */

.body-login {
        /* Efeito de Vidro (Glassmorphism) */
    background-color: rgba(29, 29, 29, 0.85); 
    backdrop-filter: blur(10px); /* Desfoca levemente o fundo atrás do box */

    
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--cor-texto); /* Texto base em branco */
}

.login-container {
    
    background-image: url('../img/background.jpg'); 

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 400px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Sombra mais forte para profundidade */
}

.login-box { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
}

.logo-wrapper { 
    width: 100%; 
    margin-bottom: 20px; 
}

.main-logo { 
    width: 100%; 
    height: auto; 
    max-height: 150px; 
    object-fit: contain; 
    display: block;
    /* filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); */
}

/* Forçar cores brancas em todos os textos do login */
.login-container h2 { 
    color: var(--branco); 
    margin-bottom: 30px; 
    font-weight: 300;
    letter-spacing: 1px;
    text-align: center;
}

.field { 
    margin-bottom: 20px; 
    text-align: left;
}

.field label { 
    display: block; 
    margin-bottom: 8px; 
    color: var(--branco); 
    font-size: 0.9rem; 
    font-weight: bold;
}

/* Inputs adaptados ao tema escuro */
.field input { 
    width: 100%; 
    padding: 14px; 
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3); 
    border-radius: 8px; 
    font-size: 1rem; 
    color: var(--branco);
    transition: border 0.3s;
}

.field input:focus {
    border-color: var(--branco);
    outline: none;
    background: rgba(255, 255, 255, 0.15);
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Botão de Login Invertido (Branco com texto preto para destaque) */
.btn-login {
    width: 100%;
    padding: 14px;
    background-color: var(--branco);
    color: var(--cor-primaria);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.error-msg {
    color: var(--erro);
    background: rgba(255, 77, 77, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* ==========================================================================
   3. CONTEXTO CRM (Dashboard e Restantes Páginas)
   ========================================================================== */

.body-crm {
    background-color: var(--cor-fundo);
    display: block;
    color: var(--cor-texto); /* Texto escuro no painel administrativo */
}

.crm-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--cor-primaria);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-logo-container {
    padding: 30px 20px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.sidebar-logo { width: 80%; max-height: 80px; object-fit: contain; }

.sidebar a {
    color: #ccc;
    text-decoration: none;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.sidebar a:hover { 
    background-color: rgba(255, 255, 255, 0.1); 
    color: white; 
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--cor-fundo);
    overflow: hidden;
}

.main-header {
    height: 60px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.main-footer {
    height: 40px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
}

.grid-frotas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--cor-primaria);
}







