/* style.css - SisConnect Global Styles */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* --- CORES GERAIS --- */
    --orange: #FA991C;
    --teal: #1C768F;
    --navy: #032539;
    --dark-navy: #021a29; /* Fundo Padrão Escuro */
    --off-white: #FBF3F2; /* Texto Padrão Claro */
    --cyan-neon: #00d2d3;

    /* --- VARIÁVEIS DE VIDRO (DARK MODE DEFAULT) --- */
    --glass-bg: rgba(3, 37, 57, 0.75);
    --glass-panel: rgba(2, 26, 41, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 15px;
    
    /* --- CONFIG GRADE (DARK MODE) --- */
    --grid-color: rgba(255, 255, 255, 0.03); /* Linhas brancas sutis */

    /* --- DIMENSÕES --- */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;

    /* --- CORES DE STATUS (KPIS) --- */
    --c-orange: #faad14;
    --c-green: #52c41a;
    --c-blue: #1890ff;
    --c-red: #f5222d;
}

/* --- LIGHT MODE (SOBESCREVE AS CORES) --- */
body.light-mode {
    --dark-navy: #eef2f6; /* Fundo Cinza Claro Profissional */
    --off-white: #111827; /* Texto Quase Preto (Mais Contraste) */
    
    /* Vidro no Claro: Mais branco e opaco para ler bem */
    --glass-bg: rgba(255, 255, 255, 0.65); 
    --glass-panel: #ffffff;
    --glass-border: rgba(0, 0, 0, 0.1); /* Borda cinza suave */
    
    --navy: #e0e7ff;
    
    /* Grade no Claro: Linhas cinzas para aparecer no fundo branco */
    --grid-color: rgba(0, 0, 0, 0.05); 
}

/* Ajustes Específicos do Light Mode */
body.light-mode .nav-item { color: #4b5563; font-weight: 500; }
body.light-mode .nav-item:hover { background: rgba(0,0,0,0.05); }
body.light-mode .welcome-text h1 { color: #111827; text-shadow: none; }
body.light-mode .welcome-text p { color: #374151; font-weight: 500; }
body.light-mode .toggle-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #333; }

/* Destaques Específicos por Módulo no Light Mode */
body.light-mode.theme-admin .nav-item.active, body.light-mode.theme-admin .nav-item:hover { color: var(--teal); background: rgba(28, 118, 143, 0.1); }
body.light-mode.theme-admin .toggle-btn:hover { background: var(--teal); color: #fff; }

body.light-mode.theme-operacional .nav-item.active, body.light-mode.theme-operacional .nav-item:hover { color: #008c8d; background: rgba(0, 210, 211, 0.1); }
body.light-mode.theme-operacional .toggle-btn:hover { background: #008c8d; color: #fff; }

body.light-mode.theme-comercial .nav-item.active, body.light-mode.theme-comercial .nav-item:hover { color: var(--orange); background: rgba(250, 153, 28, 0.1); }
body.light-mode.theme-comercial .toggle-btn:hover { background: var(--orange); color: #fff; }

body.light-mode.theme-financeiro .nav-item.active, body.light-mode.theme-financeiro .nav-item:hover { color: var(--c-green); background: rgba(82, 196, 26, 0.1); }
body.light-mode.theme-financeiro .toggle-btn:hover { background: var(--c-green); color: #fff; }


/* --- RESET GERAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-navy);
    color: var(--off-white);
    height: 100vh;
    display: flex;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* --- FUNDO ANIMADO --- */
.ambient-light { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.grid-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px), linear-gradient(90deg, var(--grid-color) 1px, transparent 1px); 
    background-size: 40px 40px; 
    opacity: 0.8; /* Aumentei para a grade aparecer mais */
}
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.4; animation: float 15s infinite ease-in-out alternate; }
.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: var(--teal); }
.blob-2 { bottom: -10%; right: -10%; width: 700px; height: 700px; background: var(--orange); animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(40px, 40px); } }

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width); height: 100vh; background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border); display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; z-index: 100; transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden; box-shadow: 5px 0 30px rgba(0,0,0,0.15);
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.brand-area {
    height: var(--header-height); display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; border-bottom: 1px solid var(--glass-border); white-space: nowrap;
}
.logo-area { display: flex; align-items: center; gap: 10px; transition: 0.3s; opacity: 1; text-decoration: none; }
.logo-img { max-width: 120px; filter: drop-shadow(0 0 5px rgba(0,0,0,0.2)); transition: transform 0.3s; }
.sidebar.collapsed .logo-area { opacity: 0; pointer-events: none; width: 0; display: none; }
.sidebar.collapsed .brand-area { justify-content: center; padding: 0; }

/* Toggle Button */
.toggle-btn {
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    color: var(--off-white); width: 32px; height: 32px; border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s;
}
/* No mobile/fechado ele vai pro rodapé via JS/CSS logic se precisar, mas aqui mantemos o padrão */
.sidebar.collapsed .toggle-btn { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); }

/* Menu */
.nav-menu { flex: 1; overflow-y: auto; padding-top: 20px; }
.nav-menu::-webkit-scrollbar { width: 4px; }
.nav-menu::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }

.nav-item {
    display: flex; align-items: center; gap: 15px; padding: 12px 25px;
    color: rgba(255,255,255,0.6); text-decoration: none; transition: 0.3s;
    font-size: 0.9rem; border-left: 3px solid transparent; white-space: nowrap;
}
.nav-item i { width: 20px; text-align: center; font-size: 1.1rem; transition: 0.3s; }
.nav-item span { transition: opacity 0.3s; opacity: 1; }

.sidebar.collapsed .nav-item { justify-content: center; padding: 15px 0; gap: 0; }
.sidebar.collapsed .nav-item span { opacity: 0; display: none; }
.sidebar.collapsed .nav-item i { font-size: 1.3rem; margin: 0; }

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; overflow: hidden;
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); height: 100vh;
}
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed-width); }

.top-header {
    height: var(--header-height); background: var(--glass-bg); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px;
}
.breadcrumb { font-family: 'Rajdhani'; font-size: 1.1rem; letter-spacing: 1px; font-weight: 600; }
.header-actions { display: flex; gap: 20px; align-items: center; }
.btn-icon { background: none; border: none; color: var(--off-white); font-size: 1.2rem; cursor: pointer; transition: 0.3s; opacity: 0.7; }
.btn-icon:hover { opacity: 1; transform: scale(1.1); }

.dashboard-scroll { flex: 1; overflow-y: auto; padding: 30px; }

/* --- COMPONENTES UI (FILTROS, CARDS) --- */
.page-title h2 { font-family: 'Rajdhani'; font-size: 2rem; margin-bottom: 5px; font-weight: 700; color: var(--off-white); }
.page-title p { opacity: 0.7; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; background: var(--glass-bg); padding: 20px; border-radius: 12px; border: 1px solid var(--glass-border); margin-bottom: 30px; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 0.75rem; text-transform: uppercase; color: var(--off-white); opacity: 0.7; font-family: 'Rajdhani'; }

.input-tech { 
    background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); 
    color: var(--off-white); padding: 10px 15px; border-radius: 6px; min-width: 150px; 
}
body.light-mode .input-tech { background: #fff; border: 1px solid #ccc; color: #333; }

.btn-search { background: transparent; border: 1px solid var(--teal); color: var(--teal); padding: 10px 25px; border-radius: 6px; cursor: pointer; transition: 0.3s; font-family: 'Rajdhani'; font-weight: 700; text-transform: uppercase; }
.btn-search:hover { background: var(--teal); color: #fff; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 30px; }
.kpi-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 25px; display: flex; align-items: center; justify-content: space-between; transition: 0.3s; }
.kpi-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.kpi-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: rgba(255,255,255,0.1); }
body.light-mode .kpi-icon { background: rgba(0,0,0,0.05); }

.kpi-content { text-align: right; }
.kpi-label { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; display: block; color: var(--off-white); opacity: 0.8; }
.kpi-value { font-family: 'Rajdhani'; font-size: 2rem; font-weight: 700; color: var(--off-white); }

/* Variações de Cores KPIs */
.c-orange { border-left: 4px solid var(--c-orange); } .c-orange .kpi-label, .c-orange .kpi-icon { color: var(--c-orange); }
.c-green { border-left: 4px solid var(--c-green); } .c-green .kpi-label, .c-green .kpi-icon { color: var(--c-green); }
.c-blue { border-left: 4px solid var(--c-blue); } .c-blue .kpi-label, .c-blue .kpi-icon { color: var(--c-blue); }
.c-red { border-left: 4px solid var(--c-red); } .c-red .kpi-label, .c-red .kpi-icon { color: var(--c-red); }

/* Panels */
.content-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-box { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; }
.tech-list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--glass-border); font-size: 0.9rem; color: var(--off-white); }
.tech-list-item:hover { background: rgba(255,255,255,0.05); body.light-mode & { background: rgba(0,0,0,0.05); } }

/* Animações */
.fade-up { animation: fadeInUp 0.6s forwards; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.d-1 { animation-delay: 0.1s; } .d-2 { animation-delay: 0.2s; } .d-3 { animation-delay: 0.3s; }