/* public/css/style.css - Versão Refinada e Compacta */
:root {
    --brand-dark: #002B49;
    --brand-primary: #00AEEF;
    --brand-accent: #F37021;
    --bg-body: #F4F7F9;
    --bg-card: #FFFFFF;
    --text-main: #333333;
    --text-muted: #7F8C8D;
    --radius: 8px; /* Reduzido de 10px para 8px para visual mais técnico */
    --shadow: 0 2px 8px rgba(0,0,0,0.04);
    --sidebar-width: 250px; /* Levemente mais estreita */
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 14px; /* Reduzido de 15px para 14px (padrão SaaS) */
    line-height: 1.5;
}

/* --- LOGIN SCREEN --- */
.login-container {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); padding: 20px;
}
.login-card {
    background: white; padding: 40px 30px; border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); max-width: 400px; width: 100%;
    text-align: center; border-top: 4px solid var(--brand-primary);
}
.logo-area img { max-width: 140px; height: auto; margin-bottom: 20px; }
.login-title { margin: 0 0 10px 0; color: var(--brand-dark); font-size: 1.5rem; }
.login-subtitle { margin: 0 0 25px 0; color: var(--text-muted); font-size: 0.9rem; }

/* --- ESTRUTURA GERAL --- */

/* Sidebar Fixa Desktop */
.sidebar {
    width: var(--sidebar-width);
    background: var(--brand-dark);
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.1);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.sidebar-brand-img { max-width: 100px; height: auto; display: block; margin: 0 auto; }

/* Menu Links Compacto */
.nav-links { list-style: none; padding: 10px 0; margin: 0; overflow-y: auto; flex: 1; }
.nav-links li a {
    display: flex; align-items: center;
    padding: 12px 20px; /* Reduzido padding vertical */
    color: #aebcd1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.nav-links li a:hover, .nav-links li a.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--brand-accent);
}
.nav-links li a i {
    width: 25px;
    font-size: 1rem;
    text-align: center;
    margin-right: 10px;
    opacity: 0.8;
}
.nav-links li a:hover i, .nav-links li a.active i { opacity: 1; }

/* Conteúdo Principal */
.main-content {
    flex: 1; margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width));
    display: flex; flex-direction: column; transition: margin-left 0.3s;
}

/* Topbar */
.topbar {
    background: white; height: 60px; /* Reduzido de 70px */
    padding: 0 25px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.03); position: sticky; top: 0; z-index: 900;
}
.toggle-btn { 
    font-size: 1.5rem; 
    cursor: pointer; 
    color: var(--brand-dark); 
    display: none; 
    margin-right: 15px; 
    padding: 5px; /* Aumenta área de clique */
}
.user-info { display: flex; align-items: center; gap: 15px; } /* Flex gap para espaçamento uniforme */

/* Container de Conteúdo */
.dash-container { padding: 25px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* Cards e Paineis */
.card {
    background: var(--bg-card);
    padding: 20px; /* Reduzido de 25px */
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid #eee; /* Borda sutil */
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Formulários */
.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--brand-dark); font-size: 0.85rem; }
input, select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.95rem; color: var(--text-main); transition: border-color 0.2s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-primary); }

/* Botões */
.btn-primary {
    background-color: var(--brand-accent); color: white; border: none;
    padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer;
    transition: filter 0.2s; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    font-size: 0.95rem;
}
.btn-primary:hover { filter: brightness(90%); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-outline-primary {
    background: transparent; border: 1px solid var(--brand-primary); color: var(--brand-primary);
    padding: 8px 16px; border-radius: 6px; cursor: pointer; transition: 0.2s;
}
.btn-outline-primary:hover { background: var(--brand-primary); color: white; }

/* ABAS (Tabs) */
.tabs { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 20px; overflow-x: auto; gap: 2px; }
.tab-btn {
    background: #f9f9f9; border: 1px solid #ddd; border-bottom: none;
    padding: 10px 20px; font-size: 0.9rem; cursor: pointer; color: var(--text-muted);
    border-radius: 6px 6px 0 0; transition: 0.2s; white-space: nowrap;
}
.tab-btn:hover { background: #fff; color: var(--brand-primary); }
.tab-btn.active { background: white; color: var(--brand-dark); border-top: 3px solid var(--brand-primary); font-weight: 600; margin-bottom: -1px; border-bottom: 1px solid white; }
.tab-content { display: none; animation: fadeIn 0.3s; }
.tab-content.active { display: block; }

/* Modais (Overlays) */
.overlay { 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.5); z-index: 2000; 
    opacity: 0; visibility: hidden; transition: 0.3s; 
    backdrop-filter: blur(2px);
    display: none; /* Garante ocultação inicial */
    align-items: center; justify-content: center;
}
.overlay.active { 
    opacity: 1; visibility: visible; 
    display: flex; /* JS deve setar isso também, mas CSS reforça */
}

/* --- MOBILE RESPONSIVO --- */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: 260px; }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; width: 100%; }
    .toggle-btn { display: block; }
    /* .overlay movido para global */
    .dash-container { padding: 15px; }
    .hide-mobile { display: none; } /* Oculta nome do usuário no mobile */
    .topbar { padding: 0 15px; }
}

/* Utilitários e Animações */
.fade-in { animation: fadeIn 0.4s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none; }

/* Feedback */
.alert-box { padding: 12px 15px; border-radius: 6px; margin-bottom: 20px; font-weight: 500; font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Dicionário Específicos */
.point-card { transition: transform 0.2s, box-shadow 0.2s; }
.point-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important; }
