/* ===== Orçamento Doméstico - estilos =====
 * Paleta Prisma Assessoria e Finanças
 *   navy  #0f2233 | slate #2c5573 | azul #1d6fae | céu #4d9fd4 | névoa #e8f1f8
 */
:root {
  --p-navy: #0f2233;
  --p-navy-2: #1b3550;
  --p-slate: #2c5573;
  --p-blue: #1d6fae;
  --p-sky: #4d9fd4;
  --p-mist: #e8f1f8;
  --od-primary: var(--p-blue);
  --sidebar-w: 264px;
  --bs-primary: #1d6fae;
  --bs-primary-rgb: 29, 111, 174;
  --bs-primary-bg-subtle: #e3eef7;
  --bs-primary-text-emphasis: #1b4f7a;
  --bs-success: #2f9471;
  --bs-success-rgb: 47, 148, 113;
  --bs-success-bg-subtle: #e2f3ec;
  --bs-danger: #cf5f5b;
  --bs-danger-rgb: 207, 95, 91;
  --bs-danger-bg-subtle: #fbe9e8;
  --bs-info: #4d9fd4;
  --bs-info-rgb: 77, 159, 212;
  --bs-info-bg-subtle: #e4f1fa;
  --bs-link-color: #1d6fae;
  --bs-link-color-rgb: 29, 111, 174;
  --bs-link-hover-color-rgb: 27, 79, 122;
  --bs-body-color: #22364a;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-bg: #f3f6f9;
  --bs-border-color: #dde5ed;
}
[data-bs-theme="dark"] {
  --bs-body-bg: #0d1a26; --bs-tertiary-bg: #142536; --bs-body-color: #d7e2ec; --bs-border-color: #25394d;
  --bs-primary: #4d9fd4; --bs-primary-rgb: 77, 159, 212; --bs-link-color-rgb: 120, 182, 225;
  --bs-primary-bg-subtle: #16324a; --bs-success-bg-subtle: #163a30; --bs-danger-bg-subtle: #3d2021; --bs-info-bg-subtle: #16324a;
  --bs-success-rgb: 92, 190, 150; --bs-danger-rgb: 232, 129, 125;
}
.text-navy { color: var(--p-navy); }
.btn-primary { --bs-btn-bg: #1d6fae; --bs-btn-border-color: #1d6fae; --bs-btn-hover-bg: #1b5f95; --bs-btn-hover-border-color: #1b5f95; --bs-btn-active-bg: #174f7c; --bs-btn-active-border-color: #174f7c; --bs-btn-disabled-bg: #1d6fae; }
.btn-outline-danger { --bs-btn-color: #cf5f5b; --bs-btn-border-color: #e5a4a1; --bs-btn-hover-bg: #cf5f5b; --bs-btn-hover-border-color: #cf5f5b; --bs-btn-active-bg: #cf5f5b; --bs-btn-active-border-color: #cf5f5b; }
.btn-outline-success { --bs-btn-color: #2f9471; --bs-btn-border-color: #9fd2bf; --bs-btn-hover-bg: #2f9471; --bs-btn-hover-border-color: #2f9471; --bs-btn-active-bg: #2f9471; --bs-btn-active-border-color: #2f9471; }
.text-bg-success { background-color: #dff2ea !important; color: #23785b !important; }
.text-bg-danger { background-color: #fbe6e5 !important; color: #b54a46 !important; }
.bg-success { background-color: #5bb89a !important; } .bg-danger { background-color: #e8817d !important; } .bg-primary { background-color: #4d9fd4 !important; }
.form-control:focus, .form-select:focus { border-color: #9cc6e6; box-shadow: 0 0 0 .2rem rgba(77,159,212,.18); }

body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
.app { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  color: #fff;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(77,159,212,.22) 0%, transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(29,111,174,.35) 0%, transparent 65%),
    linear-gradient(180deg, #0a1826 0%, #0f2438 30%, #16334f 62%, #1c4467 100%) !important;
  border-right: 1px solid rgba(140,199,238,.12);
  box-shadow: 4px 0 24px rgba(10,24,38,.18);
}
@media (min-width: 992px) {
  .sidebar { width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1030; }
  .content { margin-left: var(--sidebar-w); }
}
@media (max-width: 991.98px) { .sidebar { --bs-offcanvas-width: 280px; display: flex; flex-direction: column; } }
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.4rem 1.25rem 1rem; }
.brand-tile { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.brand-tile img { max-width: 34px; max-height: 36px; }
.brand-title { font-weight: 800; font-size: 1.2rem; line-height: 1.05; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: #9fcbea; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-nav { padding: .5rem .75rem; flex: 1; overflow-y: auto; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .5; padding: .75rem .75rem .4rem; }
.nav-item-link { position: relative; display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; margin-bottom: 4px; color: rgba(214,231,245,.72); text-decoration: none; border-radius: 12px; font-weight: 500; transition: background .2s, color .2s, transform .2s; }
.nav-item-link i { font-size: 1.1rem; width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.05); transition: .2s; }
.nav-item-link:hover { background: rgba(140,199,238,.08); color: #fff; transform: translateX(2px); }
.nav-item-link:hover i { background: rgba(140,199,238,.16); }
/* item ativo: tom sobre tom (azul-céu claro sobre azul) */
.nav-item-link.active {
  color: #fff; font-weight: 600;
  background: linear-gradient(90deg, rgba(77,159,212,.42) 0%, rgba(29,111,174,.28) 100%);
  box-shadow: inset 0 0 0 1px rgba(140,199,238,.35), 0 6px 18px rgba(4,14,24,.35);
}
.nav-item-link.active::before { content: ''; position: absolute; left: -.75rem; top: 18%; bottom: 18%; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, #bfe3fa, #6bb5e6); box-shadow: 0 0 10px rgba(140,199,238,.8); }
.nav-item-link.active i { color: #0f2438; background: linear-gradient(135deg, #d9effc, #8cc7ee); box-shadow: 0 3px 10px rgba(77,159,212,.45); }
.sidebar-footer { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, #4d9fd4, #2c5573); color: #fff; }
.avatar-lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 1.1rem; }

/* ---- Topo e página ---- */
.content { flex: 1; min-width: 0; padding-bottom: 5rem; }
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; padding: .9rem 1.5rem; padding-top: max(.9rem, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bs-body-bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--bs-border-color-translucent); }
.page-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.page { padding: 1.5rem; max-width: 1400px; }
.btn-icon { font-size: 1.5rem; padding: .1rem .4rem; line-height: 1; }
@media (max-width: 575.98px) { .page { padding: 1rem .85rem; } .topbar { padding-inline: .85rem; } }

/* ---- Cartões ---- */
.card-soft { border: 0; border-radius: 16px; box-shadow: 0 1px 2px rgba(15,34,51,.04), 0 6px 20px rgba(29,111,174,.07); background: var(--bs-body-bg); }
[data-bs-theme="light"] .card-soft { background: #fff; }
[data-bs-theme="dark"] .card-soft { background: var(--bs-tertiary-bg); }
.card-soft > .card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color-translucent); font-weight: 600; padding: .9rem 1.1rem; }
.card-soft .list-group-item { background: transparent; }

.hero { border-radius: 20px; color: var(--p-navy); background: radial-gradient(circle at 92% 10%, rgba(77,159,212,.35), transparent 45%), radial-gradient(circle at 0% 100%, rgba(29,111,174,.14), transparent 45%), linear-gradient(120deg, #ffffff 0%, #eef5fb 45%, #dcebf7 100%); box-shadow: 0 10px 30px rgba(29,111,174,.12); border: 1px solid #e1ecf5; overflow: hidden; }
[data-bs-theme="dark"] .hero { color: #e6f0f8; background: radial-gradient(circle at 92% 10%, rgba(77,159,212,.3), transparent 45%), linear-gradient(120deg, #142536, #1b3550 60%, #24557e); border-color: #25394d; }
.hero-body { display: flex; align-items: center; gap: 1.25rem; padding: 1.6rem 1.75rem; flex-wrap: wrap; }
.hero-logo-box { background: #fff; border-radius: 16px; padding: .6rem .9rem; box-shadow: 0 6px 18px rgba(15,34,51,.08); }
.hero-logo { height: 84px; width: auto; display: block; }
.hero-kicker { font-weight: 600; color: var(--p-blue); }
[data-bs-theme="dark"] .hero-kicker { color: #8cc7ee; }
.hero-title { font-size: 1.6rem; font-weight: 800; margin: .15rem 0 .25rem; }
.hero-text { opacity: .75; }
.hero-filter { display: flex; gap: .5rem; }
.hero-filter select[name=mes] { min-width: 140px; }
.hero-filter select[name=ano] { min-width: 96px; }
.hero-filter .form-select { background-color: rgba(255,255,255,.75); border-color: #cfe0ee; }
@media (max-width: 575.98px) { .hero-logo { height: 60px; } .hero-title { font-size: 1.25rem; } .hero-body { padding: 1.25rem; } .hero-filter { width: 100%; } }

.kpi { background: #fff; border-radius: 16px; padding: 1.1rem; height: 100%; box-shadow: 0 1px 2px rgba(15,34,51,.04), 0 6px 20px rgba(29,111,174,.07); }
[data-bs-theme="dark"] .kpi, [data-bs-theme="dark"] .mini-kpi { background: var(--bs-tertiary-bg); }
.kpi-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; margin-bottom: .6rem; }
.kpi-label { font-size: .8rem; color: var(--bs-secondary-color); font-weight: 500; }
.kpi-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.kpi-foot { font-size: .75rem; color: var(--bs-secondary-color); margin-top: .25rem; }
.kpi-progress { height: 5px; margin-top: .5rem; }
@media (max-width: 575.98px) { .kpi-value { font-size: 1.05rem; } .kpi { padding: .9rem; } }

.mini-kpi { background: #fff; border-radius: 14px; padding: .75rem 1rem; box-shadow: 0 1px 2px rgba(15,34,51,.04), 0 6px 20px rgba(29,111,174,.07); display: flex; flex-direction: column; }
.mini-kpi small { color: var(--bs-secondary-color); font-size: .75rem; }
.mini-kpi strong { font-size: 1.1rem; }
@media (max-width: 575.98px) { .mini-kpi strong { font-size: .8rem; white-space: nowrap; } .mini-kpi { padding: .6rem .6rem; } }
@media (max-width: 767.98px) { .filtros:not(.aberto) .filtro-extra { display: none; } .filtros .card-body { padding: .85rem; } }

.chart-box { position: relative; height: 320px; }
.chart-box.chart-lg { height: 380px; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 991.98px) { .chart-scroll .chart-box { min-width: 820px; } .chart-scroll::after { content: '← deslize para ver todos os meses →'; display: block; text-align: center; font-size: .72rem; color: var(--bs-secondary-color); position: sticky; left: 0; } }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.mov-row { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.mov-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center; }
.mov-icon.in { background: #e2f3ec; color: #2f9471; }
.mov-icon.out { background: #fbe9e8; color: #cf5f5b; }
[data-bs-theme="dark"] .mov-icon.in { background: #163a30; color: #5cbe96; }
[data-bs-theme="dark"] .mov-icon.out { background: #3d2021; color: #e8817d; }

.bank-card { position: relative; border-radius: 18px; padding: 1.2rem 1.3rem; color: #fff; background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.22), transparent 45%), linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 70%, #0f2233)); box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 25%, transparent); min-height: 170px; }
.bank-card.inativo { filter: grayscale(.8); opacity: .7; }
.bank-name { font-weight: 700; font-size: 1.1rem; }
.bank-saldo { font-size: 1.7rem; font-weight: 800; margin: .8rem 0; letter-spacing: -.02em; }
.bank-foot { display: flex; justify-content: space-between; align-items: flex-end; font-size: .8rem; gap: .5rem; line-height: 1.35; }
.bank-foot small { opacity: .75; }

.conta-item { display: flex; align-items: center; padding: .45rem .6rem; border-radius: 8px; cursor: pointer; }
.conta-item:hover { background: var(--bs-secondary-bg); }

.table > :not(caption) > * > * { background: transparent; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; }

/* Botão flutuante e barra inferior (celular) */
.fab { position: fixed; right: 1.1rem; bottom: calc(76px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #4d9fd4, #1d6fae); color: #fff; font-size: 1.6rem; box-shadow: 0 10px 24px rgba(29,111,174,.4); z-index: 1025; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: flex; justify-content: space-around; padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--bs-border-color-translucent); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: .68rem; color: var(--bs-secondary-color); text-decoration: none; padding: .25rem 0; font-weight: 500; }
.bottom-nav a i { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--od-primary); }
[data-bs-theme="dark"] .bottom-nav a.active { color: #8cc7ee; }

/* Login */
.login-body { display: grid; place-items: center; padding: 1rem; background: #f3f6f9; }
.login-bg { position: fixed; inset: 0; background: radial-gradient(circle at 12% 12%, rgba(77,159,212,.45), transparent 38%), radial-gradient(circle at 88% 85%, rgba(29,111,174,.5), transparent 42%), linear-gradient(140deg, #0f2233, #1b3a57 55%, #2c5573); }
.login-card { position: relative; width: 100%; max-width: 410px; background: #fff; color: #22364a; border-radius: 24px; padding: 2.25rem 2rem; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.login-logo { width: 220px; max-width: 80%; height: auto; }

/* tons suaves extras */
.progress { background-color: #e6eef5; border-radius: 99px; }
[data-bs-theme="dark"] .progress { background-color: #22384c; }
.table-hover > tbody > tr:hover > * { --bs-table-hover-bg: #f1f7fc; }
.kpi-icon.bg-primary-subtle { color: #1d6fae !important; }
.kpi-icon.bg-info-subtle { color: #3b8cc2 !important; }
.list-group-item { border-color: #edf2f7; }
[data-bs-theme="dark"] .list-group-item { border-color: #22384c; }
.modal-content { border: 0; border-radius: 18px; }
.btn-light { --bs-btn-bg: #eef3f8; --bs-btn-border-color: #eef3f8; --bs-btn-hover-bg: #e2ebf3; --bs-btn-hover-border-color: #e2ebf3; }

/* ===== Tabela Plano de Contas (Início) ===== */
.tabela-plano-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabela-plano { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .8rem; font-variant-numeric: tabular-nums; }
.tabela-plano th, .tabela-plano td { padding: .42rem .55rem; text-align: right; white-space: nowrap; border-bottom: 1px solid #edf2f7; }
.tabela-plano thead th { position: sticky; top: 0; z-index: 2; background: #f5f9fc; color: #5b6b7b; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.tabela-plano .col-conta { position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; min-width: 220px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 #e3ebf2; }
.tabela-plano thead .col-conta { z-index: 3; background: #f5f9fc; }
.tabela-plano .col-total { position: sticky; right: 0; z-index: 1; background: #f3f8fc; font-weight: 700; box-shadow: -1px 0 0 #e3ebf2, -6px 0 10px -6px rgba(15,34,51,.12); }
.tabela-plano thead .col-total { z-index: 3; }
.tabela-plano .mes-atual { background: #eef6fc; }
/* células planejadas */
.tabela-plano td.c-plan { color: #b7832a; font-style: italic; }
.tabela-plano td.c-misto { color: #8a6a2e; }
.tabela-plano td.c-misto::after { content: '•'; color: #e5a93b; margin-left: 2px; font-size: .7em; vertical-align: super; }
.leg-cel { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #22364a; vertical-align: -1px; }
.leg-cel.misto { background: #8a6a2e; } .leg-cel.plan { background: #e5a93b; }
/* hierarquia */
.tabela-plano .seta { display: inline-block; transition: transform .2s; font-size: .72rem; margin-right: .25rem; }
.tabela-plano tr.fechado .seta { transform: rotate(-90deg); }
.tabela-plano .lin-grupo td { font-weight: 800; cursor: pointer; background: #eaf2f9; color: #0f2233; border-top: 1px solid #d6e5f2; font-size: .82rem; }
.tabela-plano .lin-grupo .col-conta { background: #eaf2f9; text-transform: uppercase; letter-spacing: .03em; }
.tabela-plano .lin-grupo.grupo-receitas td { background: #e6f4ee; } .tabela-plano .lin-grupo.grupo-receitas .col-conta { background: #e6f4ee; box-shadow: inset 4px 0 0 #3fa47f, 1px 0 0 #e3ebf2; }
.tabela-plano .lin-grupo.grupo-despesas td { background: #fbeeed; } .tabela-plano .lin-grupo.grupo-despesas .col-conta { background: #fbeeed; box-shadow: inset 4px 0 0 #e07a76, 1px 0 0 #e3ebf2; }
.tabela-plano .lin-grupo.grupo-investimentos td { background: #e8f1f9; } .tabela-plano .lin-grupo.grupo-investimentos .col-conta { background: #e8f1f9; box-shadow: inset 4px 0 0 #1d6fae, 1px 0 0 #e3ebf2; }
.tabela-plano .lin-sub td { font-weight: 700; color: #2c5573; background: #f7fafd; cursor: pointer; }
.tabela-plano .lin-sub .col-conta { padding-left: 1.3rem; background: #f7fafd; }
.tabela-plano .lin-sub .col-conta::before { content: ''; display: inline-block; width: 8px; height: 1px; background: #a9c2d8; margin-right: .35rem; vertical-align: middle; }
.tabela-plano .lin-conta td { color: #22364a; }
.tabela-plano .lin-conta.nivel-2 .col-conta { padding-left: 1.6rem; }
.tabela-plano .lin-conta.nivel-3 .col-conta { padding-left: 2.6rem; }
.tabela-plano .lin-conta .col-conta a { color: inherit; text-decoration: none; }
.tabela-plano .lin-conta .col-conta a::before { content: '·'; color: #9fb3c5; margin-right: .4rem; }
.tabela-plano .lin-conta .col-conta a:hover { color: var(--p-blue); text-decoration: underline; }
.tabela-plano .lin-conta:hover td { background: #f4f9fd; }
.tabela-plano .lin-conta td.col-total, .tabela-plano .lin-sub td.col-total { background: #f3f8fc; }
.tabela-plano tfoot td { font-weight: 800; background: #0f2438; color: #fff; border: 0; }
.tabela-plano tfoot .col-conta { background: #0f2438; }
.tabela-plano tfoot .pos { color: #7fd6b1; } .tabela-plano tfoot .neg { color: #f4a3a0; }
.tabela-plano tfoot td.c-plan, .tabela-plano tfoot td.c-misto { font-style: italic; }
.tabela-plano tfoot td.c-misto::after { color: #f0c97a; }
.tabela-plano tfoot .col-total, .tabela-plano tfoot .mes-atual { background: #16334f; }
[data-bs-theme="dark"] .tabela-plano th, [data-bs-theme="dark"] .tabela-plano td { border-color: #22384c; }
[data-bs-theme="dark"] .tabela-plano thead th, [data-bs-theme="dark"] .tabela-plano .col-conta, [data-bs-theme="dark"] .tabela-plano .col-total, [data-bs-theme="dark"] .tabela-plano .mes-atual, [data-bs-theme="dark"] .tabela-plano .lin-sub td, [data-bs-theme="dark"] .tabela-plano .lin-conta td { background: #142536; color: #d7e2ec; }
[data-bs-theme="dark"] .tabela-plano .lin-grupo td, [data-bs-theme="dark"] .tabela-plano .lin-grupo .col-conta { background: #1b3550 !important; color: #fff; }
[data-bs-theme="dark"] .tabela-plano td.c-plan { color: #f0c97a; }
@media (max-width: 575.98px) { .tabela-plano .col-conta { min-width: 150px; max-width: 160px; } .tabela-plano .lin-conta.nivel-3 .col-conta { padding-left: 1.6rem; } }

/* ===== Realizado x Planejado ===== */
.badge-sit { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 600; padding: .22rem .55rem; border-radius: 99px; white-space: nowrap; }
.badge-sit.real { background: #e3eef7; color: #1b4f7a; }
.badge-sit.plan { background: #fff4e0; color: #9a6a12; border: 1px dashed #e8c27a; }
.lin-planejada td { background: #fffcf5 !important; }
.lin-planejada td:first-child { box-shadow: inset 3px 0 0 #e8c27a; }
.list-group-item.lin-planejada { background: #fffcf5; box-shadow: inset 3px 0 0 #e8c27a; }
.mov-icon.plan { background: #fff4e0; color: #b7832a; }
.txt-plan { color: #b7832a; font-weight: 600; }
.btn-efetivar { --bs-btn-color: #23785b; --bs-btn-bg: #e2f3ec; --bs-btn-border-color: #bfe3d3; --bs-btn-hover-bg: #2f9471; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #2f9471; font-weight: 600; }
.btn-outline-plan { --bs-btn-color: #9a6a12; --bs-btn-border-color: #e8c27a; --bs-btn-hover-bg: #fff4e0; --bs-btn-hover-color: #9a6a12; --bs-btn-hover-border-color: #e8c27a; --bs-btn-active-bg: #e5a93b; --bs-btn-active-color: #fff; --bs-btn-active-border-color: #e5a93b; }
.alert-efetivar { background: #e2f3ec; color: #23785b; border: 0; }
.mini-sub { font-size: .7rem; color: var(--bs-secondary-color); margin-top: .15rem; }
[data-bs-theme="dark"] .lin-planejada td, [data-bs-theme="dark"] .list-group-item.lin-planejada { background: #221d12 !important; }
[data-bs-theme="dark"] .badge-sit.plan { background: #3a2d12; color: #f0c97a; }
[data-bs-theme="dark"] .badge-sit.real { background: #16324a; color: #9fcbea; }

/* ===== Linhas de saldo (Início) ===== */
.tabela-plano tfoot .lin-saldo td { background: #f3f8fc; color: #0f2233; font-weight: 700; border-bottom: 1px solid #dde8f2; }
.tabela-plano tfoot .lin-saldo .col-conta { background: #f3f8fc; text-transform: uppercase; letter-spacing: .03em; font-size: .76rem; }
.tabela-plano tfoot .lin-saldo-ini td { color: #2c5573; font-weight: 600; }
.tabela-plano tfoot .lin-saldo-fim td { background: #e3eef7; border-bottom: 2px solid #1d6fae; font-weight: 800; }
.tabela-plano tfoot .lin-saldo-fim .col-conta { background: #e3eef7; box-shadow: inset 4px 0 0 #1d6fae, 1px 0 0 #e3ebf2; }
.tabela-plano tfoot .lin-saldo td.neg { color: #c25a56; }
.tabela-plano tfoot .lin-saldo td.c-proj { font-style: italic; }
.tabela-plano tfoot .lin-saldo td.col-total { background: #dce9f5; }
.tabela-plano tfoot .lin-saldo td.mes-atual { background: #e6f1fa; }
[data-bs-theme="dark"] .tabela-plano tfoot .lin-saldo td, [data-bs-theme="dark"] .tabela-plano tfoot .lin-saldo .col-conta { background: #142536; color: #d7e2ec; }
[data-bs-theme="dark"] .tabela-plano tfoot .lin-saldo-fim td, [data-bs-theme="dark"] .tabela-plano tfoot .lin-saldo-fim .col-conta { background: #1b3550; color: #fff; }

/* ===== Listas com busca (Tom Select) ===== */
.ts-wrapper.form-select.focus { border-color: #9cc6e6; box-shadow: 0 0 0 .2rem rgba(77,159,212,.18); }
.ts-wrapper.single .ts-control input { min-width: 4rem; }
.ts-dropdown { border-radius: 10px; border-color: #dde5ed; box-shadow: 0 12px 28px rgba(15,34,51,.15); z-index: 1060; }
.ts-dropdown .optgroup-header { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #2c5573; background: #f3f8fc; font-weight: 700; padding: .35rem .75rem; }
.ts-dropdown .option { padding: .45rem .9rem; }
.ts-dropdown .active { background: #e3eef7; color: #0f2233; }
.ts-dropdown .no-results { padding: .6rem .9rem; color: #93a3b2; font-style: italic; }
.ts-dropdown .highlight { background: #fff1c9; border-radius: 3px; }
.ts-dropdown-content { max-height: 320px; }
[data-bs-theme="dark"] .ts-dropdown, [data-bs-theme="dark"] .ts-control { background: #142536; color: #d7e2ec; border-color: #25394d; }
[data-bs-theme="dark"] .ts-dropdown .optgroup-header { background: #1b3550; color: #9fcbea; }

/* ===== Seleção em lote ===== */
.col-sel { width: 34px; }
.tabela-lanc tr.selecionada td { background: #e8f2fb !important; }
.sel-mobile { display: none; flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin: 0; }
body.modo-selecao .sel-mobile { display: block; }
body.modo-selecao #btnModoSel { background: #1d6fae; color: #fff; }
.list-group-item.selecionada { background: #e8f2fb !important; }
.barra-lote { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translate(-50%, 150%); z-index: 1040; display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem .55rem 1.1rem; border-radius: 99px; background: #0f2438; color: #fff; box-shadow: 0 14px 34px rgba(15,34,51,.35); transition: transform .25s; white-space: nowrap; }
.barra-lote.ativa { transform: translate(-50%, 0); }
@media (min-width: 992px) { .barra-lote { left: calc(50% + var(--sidebar-w) / 2); } }
@media (max-width: 991.98px) { .barra-lote { bottom: calc(80px + env(safe-area-inset-bottom)); } .barra-lote.ativa ~ .fab, body.modo-selecao .fab { display: none; } }

/* ===== Importação ===== */
.tabela-modelo th { background: #e6f4ee; color: #23785b; font-size: .72rem; letter-spacing: .04em; }
.drop-arquivo { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 1rem; border: 2px dashed #9cc6e6; border-radius: 16px; background: #f5f9fc; cursor: pointer; text-align: center; transition: .15s; }
.drop-arquivo i { font-size: 2.4rem; color: #1d6fae; }
.drop-arquivo:hover, .drop-arquivo.arrastando { background: #e3eef7; border-color: #1d6fae; }
.resumo-imp { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 99px; font-size: .82rem; background: #eef3f8; }
.resumo-imp.ok { background: #e2f3ec; color: #23785b; } .resumo-imp.dup { background: #fff4e0; color: #9a6a12; } .resumo-imp.err { background: #fbe9e8; color: #b54a46; }
.tabela-preview { max-height: 52vh; border: 1px solid #e3ebf2; border-radius: 10px; }
.tabela-preview thead th { position: sticky; top: 0; background: #f5f9fc; z-index: 1; }
.tabela-preview tr.lin-erro td { background: #fdf3f2; } .tabela-preview tr.lin-dup td { background: #fffaf0; color: #8a7a5a; }
.txt-erro { color: #b54a46; font-size: .72rem; margin-top: .15rem; white-space: normal; min-width: 180px; }
[data-bs-theme="dark"] .drop-arquivo { background: #142536; border-color: #25394d; }
[data-bs-theme="dark"] .tabela-preview thead th { background: #142536; }
@media (max-width: 575.98px) { .barra-lote { max-width: calc(100% - 16px); gap: .35rem; padding: .45rem .45rem .45rem .8rem; font-size: .82rem; } }

/* ===== Saldo corrente (conciliação) ===== */
.tabela-lanc .col-saldo { font-weight: 700; color: #1b4f7a; background: #f5f9fc; border-left: 1px solid #e3ebf2; font-variant-numeric: tabular-nums; }
.tabela-lanc thead .col-saldo { color: #1b4f7a; }
.tabela-lanc .col-saldo.neg { color: #c25a56; }
.tabela-lanc tr.lin-planejada .col-saldo { font-style: italic; color: #8a6a2e; }
.saldo-mob { display: block; font-size: .72rem; color: #1b4f7a; font-weight: 600; }
.saldo-mob.neg { color: #c25a56; }
.kpi-saldo { border: 1px solid #cfe0ee; }
.filtro-botoes .btn-group .btn { white-space: nowrap; }
@media (max-width: 575.98px) { .filtro-botoes .btn-group .btn { padding: .25rem .45rem; font-size: .78rem; } .filtro-botoes .btn i { display: none; } }
[data-bs-theme="dark"] .tabela-lanc .col-saldo { background: #16283a; color: #9fcbea; }
.barra-lote { opacity: 0; visibility: hidden; pointer-events: none; transition: transform .25s, opacity .2s, visibility .2s; }
.barra-lote.ativa { opacity: 1; visibility: visible; pointer-events: auto; }
.saldo-mob { white-space: nowrap; }

/* ===== Transferências entre bancos ===== */
.so-transf { display: none; }
.modo-transf .so-transf { display: block; }
.modo-transf .so-normal { display: none; }
.box-transf { background: #eaf5fb; border: 1px dashed #8cc7ee; border-radius: 12px; padding: .75rem .85rem; }
.badge-transf { background: #e4f1fa; color: #1b5f95; border: 1px solid #b9dcf3; font-weight: 600; }
.txt-transf { color: #1b5f95; font-weight: 600; }
.btn-outline-info { --bs-btn-color: #1b6fa3; --bs-btn-border-color: #8cc7ee; --bs-btn-hover-bg: #4d9fd4; --bs-btn-hover-border-color: #4d9fd4; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #3b8cc2; --bs-btn-active-border-color: #3b8cc2; --bs-btn-active-color: #fff; }
.tabela-plano .lin-grupo.grupo-transferencias td { background: #e9f5fb; }
.tabela-plano .lin-grupo.grupo-transferencias .col-conta { background: #e9f5fb; box-shadow: inset 4px 0 0 #4d9fd4, 1px 0 0 #e3ebf2; }
