/* ── Financeiro Pro — custom.css ── */

/* ── VARIÁVEIS ── */
:root {
  --sidebar-w: 240px;
  --bg-sidebar: #0f172a;
  --bg-main: #f1f5f9;
  --accent: #4f46e5;
  --accent-light: #6366f1;
  --text-muted-sidebar: #94a3b8;
}
body { background: var(--bg-main); font-family: 'Segoe UI', sans-serif; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  z-index: 200;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 22px 20px 16px;
  font-size: 1rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.01em;
}
.sidebar-brand .brand-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
}
.nav-group-label {
  padding: 14px 18px 4px;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,0.25);
}
.sidebar .nav-link {
  color: var(--text-muted-sidebar);
  padding: 9px 18px;
  margin: 1px 8px;
  border-radius: 8px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem;
  transition: background .15s, color .15s;
}
.sidebar .nav-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar .nav-link.active { background: var(--accent); color: #fff; }
.sidebar-footer {
  margin-top: auto; padding: 12px 18px;
  font-size: 0.7rem; color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.sidebar-user {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.sidebar-user-name {
  font-size: 0.8rem; font-weight: 600;
  color: rgba(255,255,255,0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 140px;
}
.sidebar-logout {
  color: rgba(255,255,255,0.35); font-size: 0.75rem;
  text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.sidebar-logout:hover { color: #f87171; }

/* ── MAIN ── */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 28px 28px;
  min-height: 100vh;
}

/* ── CARDS ── */
.card {
  border: none; border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04);
}
.stat-card {
  border-radius: 14px; padding: 20px 22px; color: #fff;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -20px; right: -20px;
}
.stat-card.pagar    { background: linear-gradient(135deg, #e11d48, #be185d); }
.stat-card.receber  { background: linear-gradient(135deg, #059669, #047857); }
.stat-card.saldo    { background: linear-gradient(135deg, #4f46e5, #4338ca); }
.stat-card.resultado { background: linear-gradient(135deg, #d97706, #b45309); }
.stat-label { font-size: 0.75rem; opacity: 0.82; font-weight: 500; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin-top: 6px; }
.stat-sub   { font-size: 0.72rem; margin-top: 6px; opacity: 0.75; }

/* ── TABLE ── */
.table th {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: #64748b; background: #f8fafc;
  padding: 10px 14px;
}
.table td { padding: 10px 14px; vertical-align: middle; font-size: 0.875rem; }

/* ── STATUS BADGES ── */
.badge-pago, .badge-recebido {
  background: #dcfce7; color: #166534;
  padding: 4px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600;
}
.badge-pendente {
  background: #fef9c3; color: #854d0e;
  padding: 4px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600;
}
.badge-atrasado {
  background: #fee2e2; color: #991b1b;
  padding: 4px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600;
}

/* ── PAGE HEADER ── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.page-header h1 {
  font-size: 1.35rem; font-weight: 700; color: #0f172a; margin: 0;
}
.page-header h1 i { color: var(--accent); }

/* ── MISC ── */
.btn-primary { background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.text-valor-negativo { color: #e11d48; font-weight: 600; }
.text-valor-positivo { color: #059669; font-weight: 600; }
.progress { height: 6px; border-radius: 99px; }

@media (max-width: 768px) {
  .sidebar { width: 100%; position: relative; }
  .main-content { margin-left: 0; padding: 16px; }
}

/* ── PÁGINAS DE AUTENTICAÇÃO ── */
.auth-body {
  background: #f1f5f9;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Segoe UI', sans-serif;
}
.login-wrap { width: 100%; max-width: 420px; padding: 16px; }
.brand-icon {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  margin: 0 auto 14px;
}
.auth-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 32px rgba(0,0,0,0.06);
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }

/* ── PÁGINA 403 ── */
.card-403 {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.icon-403 {
  width: 72px; height: 72px;
  background: #fee2e2;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem; color: #dc2626;
}
.card-403 h1 { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.card-403 p  { color: #64748b; font-size: 0.9rem; margin-bottom: 28px; }
