/* ═══════════════════════════════════════════════════════════
   FLUXO DE CAIXA — style.css
   Sistema independente, baseado na planilha EletricaM
═══════════════════════════════════════════════════════════ */

/* ── Variáveis ───────────────────────────────────────────── */
:root {
  --fc-primary:   #0d6efd;
  --fc-success:   #198754;
  --fc-danger:    #dc3545;
  --fc-warning:   #ffc107;
  --fc-info:      #0dcaf0;
  --fc-dark:      #212529;
  --fc-navbar-bg: #1a2035;
  --fc-footer-bg: #f8f9fa;
  --fc-receita:   #d1e7dd;
  --fc-cv:        #fff3cd;
  --fc-cfpj:      #f8d7da;
  --fc-cfpf:      #e2d9f3;
  --fc-saldo:     #cfe2ff;
  --fc-ind:       #f0f0f0;
}

/* ── Reset / Base ────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f4f6fb;
  color: #212529;
  font-size: 0.9rem;
}

/* ── Navbar ──────────────────────────────────────────────── */
.fc-navbar {
  background-color: var(--fc-navbar-bg) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  padding: 0.5rem 1rem;
}
.fc-navbar .navbar-brand {
  font-size: 1.1rem;
  letter-spacing: .3px;
}
.fc-navbar .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem !important;
  border-radius: 6px;
  transition: all .15s ease;
}
.fc-navbar .nav-link:hover,
.fc-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.12);
}

/* ── Footer ──────────────────────────────────────────────── */
.fc-footer {
  background: var(--fc-footer-bg);
  border-top: 1px solid #dee2e6;
}

/* ── Login ───────────────────────────────────────────────── */
.fc-login-bg {
  background: linear-gradient(135deg, #1a2035 0%, #0d6efd 100%);
  min-height: 100vh;
}
.fc-login-card {
  width: 100%;
  max-width: 400px;
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.fc-login-icon {
  font-size: 3rem;
  line-height: 1;
}

/* ── Cards de resumo ─────────────────────────────────────── */
.fc-card-resumo {
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fc-card-resumo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.fc-card-success { border-left: 4px solid var(--fc-success) !important; }
.fc-card-danger  { border-left: 4px solid var(--fc-danger)  !important; }
.fc-card-primary { border-left: 4px solid var(--fc-primary) !important; }
.fc-card-warning { border-left: 4px solid var(--fc-warning) !important; }
.fc-card-info    { border-left: 4px solid var(--fc-info)    !important; }

/* ── Tabela Principal ────────────────────────────────────── */
.fc-table-scroll {
  overflow-x: auto;
  max-height: 78vh;
  overflow-y: auto;
}
.fc-tabela {
  font-size: 0.78rem;
  white-space: nowrap;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1200px;
}
.fc-tabela thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #212529;
  padding: 6px 8px !important;
  font-size: 0.75rem;
  letter-spacing: .3px;
}
.fc-tabela td {
  padding: 3px 7px !important;
  vertical-align: middle;
}
.fc-tabela tbody tr:hover {
  background: rgba(13,110,253,.04) !important;
}

/* Larguras das colunas fixas */
.fc-col-desc  { min-width: 260px; max-width: 300px; }
.fc-col-taxa  { width: 50px; text-align: center; }
.fc-col-tot   { min-width: 100px; }

/* ── Seções da tabela ────────────────────────────────────── */
.fc-secao td {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 8px !important;
  letter-spacing: .2px;
}
.fc-s-receita td { background: var(--fc-receita); color: #0a3622; }
.fc-s-cv td      { background: var(--fc-cv);      color: #664d03; }
.fc-s-cfpj td    { background: var(--fc-cfpj);    color: #58151c; }
.fc-s-cfpf td    { background: var(--fc-cfpf);    color: #3d0a91; }
.fc-s-saldo td   { background: var(--fc-saldo);   color: #052c65; }
.fc-s-ind td     { background: var(--fc-ind);     color: #495057; }

/* Linhas de total */
.fc-total td, .fc-row-si td {
  background: rgba(0,0,0,.03);
}
.fc-t-receita td { background: rgba(25,135,84,.12);  }
.fc-t-cv td      { background: rgba(255,193,7,.15);   }
.fc-t-cfpj td    { background: rgba(220,53,69,.12);   }
.fc-t-cfpf td    { background: rgba(111,66,193,.12);  }

/* ── Diagnóstico ─────────────────────────────────────────── */
.fc-diag-row:nth-child(even) { background: #f8f9fa; }
.fc-diag-row:last-child      { border-bottom: none !important; }
.fc-diag-row:hover           { background: rgba(13,110,253,.04) !important; }

/* Círculo de pontuação */
.fc-score-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

/* ── Seletor de ano ──────────────────────────────────────── */
.fc-sel-ano {
  min-width: 90px;
}

/* ── Máscara de valor nos inputs ─────────────────────────── */
.fc-money { text-align: right; font-family: monospace; }

/* ── Animações ───────────────────────────────────────────── */
.card {
  animation: fc-fadeIn .25s ease;
}
@keyframes fc-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .fc-tabela { font-size: 0.7rem; }
  .fc-tabela td { padding: 2px 4px !important; }
  .fc-col-desc { min-width: 180px; }
}

/* ── Impressão ───────────────────────────────────────────── */
@media print {
  .fc-navbar, .fc-footer, .btn,
  form[method="get"], #btnEnviar { display: none !important; }

  body    { background: #fff; font-size: 8pt; }
  .card   { box-shadow: none !important; border: 1px solid #ccc !important; }
  .fc-tabela { font-size: 7pt; min-width: unset; }
  .fc-table-scroll { max-height: unset; overflow: visible; }
}

/* ── Scrollbar personalizada ─────────────────────────────── */
.fc-table-scroll::-webkit-scrollbar { height: 6px; width: 6px; }
.fc-table-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.fc-table-scroll::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
/* ── Linha de data separadora ────────────────────────────── */
.fc-row-dia td {
  background: #f0f4ff;
  border-top: 2px solid #dee2e6 !important;
  font-size: 0.75rem;
}

/* ── Linha de movimentação ───────────────────────────────── */
.fc-mov-row:hover { background: rgba(13,110,253,.04) !important; }
.fc-table-scroll::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }