@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #0061ff; --sidebar-bg: #0f172a; --bg-light: #f4f7fa; --text-main: #1e293b; --text-muted: #64748b;
    --gradient-blue: linear-gradient(135deg, #0061ff 0%, #60efff 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-red: linear-gradient(135deg, #e30613 0%, #ff5e62 100%);
    --gradient-teal: linear-gradient(135deg, #004a99 0%, #00d2ff 100%);
    --gradient-purple: linear-gradient(135deg, #6b46c1 0%, #b794f4 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: var(--text-main); line-height: 1.5; overflow-x: hidden; }

.app-container { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: 280px; background: var(--sidebar-bg); color: white; padding: 30px 20px; position: fixed; height: 100vh; display: flex; flex-direction: column; z-index: 1000; }
.logo { font-size: 22px; font-weight: 900; margin-bottom: 40px; color: var(--primary); text-align: center; }
.nav-list { list-style: none; }
.nav-item { padding: 14px 18px; border-radius: 12px; cursor: pointer; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; font-weight: 500; color: #94a3b8; transition: 0.3s; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active { background: var(--primary); box-shadow: 0 4px 15px rgba(0, 97, 255, 0.4); }

/* CONTENT */
.content { margin-left: 280px; padding: 40px; width: calc(100% - 280px); }
.view-section { display: none; animation: slideUp 0.3s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* UPLOAD CARDS MÍNIMOS */
.main-upload-card { max-width: 800px; margin: 0 auto; }
.upload-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 30px 0; }

.file-card { 
    background: #ffffff; border: 2px solid #e2e8f0; padding: 25px; border-radius: 20px; 
    text-align: center; position: relative; transition: 0.3s; 
}
.file-card:hover { border-color: var(--primary); background: #f8faff; }
.file-card.has-file { border-color: #10b981; background: #f0fff4; }

.file-icon { font-size: 30px; margin-bottom: 10px; }
.file-card label { display: block; font-weight: 700; color: var(--text-main); font-size: 15px; cursor: pointer; }
.file-card input[type="file"] { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; cursor: pointer; }

/* KPI CARDS SENSACIONAIS */
.card { background: white; padding: 30px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); margin-bottom: 30px; border: 1px solid #e2e8f0; }
.destaque-azul { background: var(--gradient-blue); color: white; padding: 60px 40px; border-radius: 32px; text-align: center; margin-bottom: 40px; box-shadow: 0 20px 40px rgba(0, 97, 255, 0.2); }
.kpi-main p { font-size: 5.5rem; font-weight: 900; margin: 10px 0; letter-spacing: -4px; text-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* TABELAS */
.table-wrapper { overflow-x: auto; border-radius: 16px; border: 1px solid #e2e8f0; background: white; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; padding: 18px; text-align: left; font-size: 11px; text-transform: uppercase; color: #64748b; font-weight: 700; }
td { padding: 16px 18px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.val-faturamento-destaque { font-weight: 800; color: #059669; background: #ecfdf5; padding: 8px 14px; border-radius: 10px; }
.badge { background: #fef3c7; color: #92400e; padding: 6px 12px; border-radius: 20px; font-weight: 800; font-size: 12px; }

/* BOTÕES */
.btn-processar { background: var(--primary); color: white; border: none; width: 100%; padding: 22px; border-radius: 16px; font-weight: 800; cursor: pointer; font-size: 16px; }
.btn-exportar { background: #1e293b; color: #fbbf24; border: 1px solid #fbbf24; padding: 10px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.btn-save { background: #10b981; color: white; border: none; padding: 10px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; margin-right: 5px; }

.unidade-info { margin-top: auto; background: rgba(255,255,255,0.05); padding: 15px; border-radius: 12px; font-size: 13px; }