/* Controle Financeiro da sua Casa — estilos do app, extraídos de mockup/index.html. */
:root { --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --good:#008300; --bad:#c9302c; --grid:#e4e3df; }
[data-bs-theme="dark"] { --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --good:#3fb950; --bad:#e66767; --grid:#33332f; }
body { background: var(--bs-tertiary-bg); font-variant-numeric: tabular-nums; }
.sidebar { width: 235px; min-height: 100vh; background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color); flex-shrink: 0; }
.sidebar .nav-link { color: var(--bs-body-color); border-radius: .5rem; }
.sidebar .nav-link.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.card { border: 1px solid var(--bs-border-color); }
.tile .label { font-size: .8rem; color: var(--bs-secondary-color); }
.tile .value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.pos, .table td.pos { color: var(--good) !important; } .neg, .table td.neg { color: var(--bad) !important; }
.money { text-align: right; white-space: nowrap; }
table td, table th { vertical-align: middle; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:6px; }
.legend i.line { height:2px; width:16px; background: var(--bs-body-color); vertical-align: middle; border-radius:0; }
.chart-tip { position: fixed; pointer-events: none; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  border-radius: .5rem; padding: .4rem .6rem; font-size: .8rem; box-shadow: 0 4px 12px rgba(0,0,0,.12); display: none; z-index: 2000; }
.hbar { height: 14px; border-radius: 0 4px 4px 0; background: var(--series-1); }
.clickable { cursor: pointer; }
.insight { border-left: 3px solid var(--bs-border-color); padding: .1rem 0 .1rem .75rem; margin-bottom: .75rem; }
.insight b { display: block; }
.tela-login { position: fixed; inset: 0; z-index: 3000; background: var(--bs-tertiary-bg); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: auto; }
/* cores */
.sidebar { background: linear-gradient(175deg,#1b2559 0%,#2b3a8c 60%,#3d52c4 100%) !important; border-right: 0 !important; color: #fff; }
.sidebar .nav-link { color: rgba(255,255,255,.82) !important; padding: .4rem .75rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.10); color: #fff !important; }
.sidebar .nav-link.active { background: #fff !important; color: #23307a !important; }
.sidebar hr { border-color: rgba(255,255,255,.35); }
.sidebar .text-secondary, .sidebar .grp-title { color: rgba(255,255,255,.65) !important; }
.sidebar .grp-title { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; margin: .75rem 0 .1rem .75rem; }
.sidebar .text-primary { color: #ffd166 !important; }
.sidebar .btn-outline-secondary { color: #fff; border-color: rgba(255,255,255,.45); }
.sidebar .btn-outline-secondary:hover { background: rgba(255,255,255,.15); }
.tela-login { background: linear-gradient(135deg,#1b2559,#3d52c4 55%,#1baf7a) !important; }
main h1 { color: var(--bs-primary-text-emphasis); }
.card h2.h6 { border-left: 4px solid var(--series-1); padding-left: .5rem; }
.tile { border-top: 4px solid var(--t, var(--series-1)) !important; background: color-mix(in srgb, var(--t, var(--series-1)) 7%, var(--bs-body-bg)); }
.row > div:nth-child(1) > .tile { --t: #2a78d6; } .row > div:nth-child(2) > .tile { --t: #1baf7a; }
.row > div:nth-child(3) > .tile { --t: #eb6834; } .row > div:nth-child(4) > .tile { --t: #7a5fd0; }
thead th { background: var(--bs-primary-bg-subtle) !important; color: var(--bs-primary-text-emphasis) !important; font-weight: 600; font-size: .85rem; }
.cat { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .5rem; border-radius: 1rem; font-size: .75rem; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.cat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.insight:nth-child(1) { border-color: #eb6834; } .insight:nth-child(2) { border-color: #e34948; } .insight:nth-child(3) { border-color: #eda100; }
.insight:nth-child(4) { border-color: #e87ba4; } .insight:nth-child(5) { border-color: #1baf7a; }
.libera { background: color-mix(in srgb, #1baf7a 16%, var(--bs-body-bg)); border: 2px solid #1baf7a; border-radius: .6rem; padding: .6rem .8rem; margin-bottom: .75rem; }
.libera .v { font-size: 1.5rem; font-weight: 700; color: var(--good); line-height: 1.1; }
.sug-step { display: flex; gap: .75rem; margin-bottom: .75rem; } .sug-step:last-child { margin-bottom: 0; }
.sug-step .num { width: 26px; height: 26px; border-radius: 50%; background: var(--series-1); color: #fff; font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hoje-blk { border-radius: .6rem; padding: .7rem .85rem; height: 100%; cursor: pointer; border: 1px solid var(--bs-border-color); border-left-width: 4px; }
.hoje-blk:hover { background: var(--bs-tertiary-bg); }
.hoje-blk .v { font-size: 1.25rem; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.cal .dow { font-size: .75rem; color: var(--bs-secondary-color); text-align: center; padding: .2rem 0; font-weight: 600; }
.cal .dia { min-height: 86px; border-radius: .5rem; padding: .35rem .45rem; font-size: .75rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); position: relative; }
.cal .dia.fora { opacity: .35; }
.cal .dia.tem { cursor: pointer; } .cal .dia.tem:hover { outline: 2px solid var(--bs-body-color); }
.cal .dia.hoje { outline: 3px solid #eb6834; outline-offset: -1px; }
.cal .dia .n { font-weight: 700; font-size: .85rem; } .cal .dia .t { font-weight: 600; margin-top: .25rem; } .cal .dia .ok { position: absolute; top: .3rem; right: .4rem; }
.cal .dia.esc { color: #fff; } .cal .dia.esc .text-secondary { color: rgba(255,255,255,.8) !important; }
.heat-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 2px; margin-right: 2px; vertical-align: middle; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; flex-shrink: 0; }
.periodo, .periodo-cal { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .6rem .75rem; border-radius: .6rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); }
.plabel { min-width: 170px; text-align: center; font-weight: 600; color: var(--bs-primary-text-emphasis); }
tr.ign td { opacity: .55; } tr.ign td:nth-child(3) { text-decoration: line-through; }
@media print { .sidebar, .btn, .form-control, .form-select, .chart-tip { display: none !important; } body { background: #fff; } .table-responsive { max-height: none !important; } }
@media (max-width: 768px) { .sidebar { width: 100%; min-height: auto; border-right: 0; border-bottom: 1px solid var(--bs-border-color); } .layout { flex-direction: column; } }

/* Telas de entrada (login, cadastro, convite): o mockup usa um overlay fixo, aqui é página própria. */
.tela-login { position: static; min-height: 100vh; }
.tela-login .card { width: 100%; max-width: 420px; }
.tela-login .nav-pills .nav-link { cursor: pointer; }

/* Rodapé do app com os documentos (LGPD: link no rodapé). */
.rodape-app { font-size: .8rem; color: var(--bs-secondary-color); border-top: 1px solid var(--bs-border-color); margin-top: 2rem; padding-top: 1rem; }
.rodape-app a { color: inherit; }
.sidebar .familia-atual { font-size: .8rem; color: rgba(255,255,255,.75); }
.sidebar .familia-atual a { color: #ffd166; }
