/* Sistema Financeiro Guarde Mais — identidade: azul #007AAC, laranja #F5821F */
:root { --azul:#007AAC; --azul-esc:#005E85; --azul-cl:#E6F2F8; --laranja:#F5821F; --verde:#1E8449; --vermelho:#C0392B;
        --amarelo:#E67E22; --cinza:#5D6D7E; --fundo:#F3F6F8; --borda:#E1E7EC; --texto:#1B2631; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--texto); background: var(--fundo); font-size: 14px; }
a { color: var(--azul); text-decoration: none; } a:hover { text-decoration: underline; }
code { background: #F2F4F5; padding: 2px 6px; border-radius: 4px; }

/* topo */
.topo { background: #fff; display: flex; align-items: center; gap: 18px; padding: 10px 22px; border-bottom: 4px solid var(--azul); position: relative; }
.topo::after { content: ""; position: absolute; right: 0; bottom: -4px; width: 22%; height: 4px; background: var(--laranja); }
.topo img { height: 40px; }
.topo .tit { border-left: 1px solid var(--borda); padding-left: 16px; }
.topo .tit b { display: block; color: var(--azul-esc); font-size: 17px; }
.topo .tit span { color: var(--cinza); font-size: 12px; }
.topo .usr { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--cinza); }
.topo .usr b { color: var(--azul-esc); display: block; font-size: 13.5px; }
.menu { background: #fff; border-bottom: 1px solid var(--borda); display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; }
.menu a { padding: 12px 14px; color: var(--azul-esc); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.menu a:hover { text-decoration: none; background: var(--azul-cl); }
.menu a.ativo { color: var(--laranja); border-bottom-color: var(--laranja); }
.menu .dir { margin-left: auto; }
main { padding: 18px 22px 40px; max-width: 1400px; margin: 0 auto; }
h1.pag { font-size: 20px; color: var(--azul-esc); margin: 4px 0 14px; display: flex; align-items: center; gap: 10px; }
h1.pag::before { content: ""; width: 6px; height: 20px; background: var(--laranja); border-radius: 2px; }
h2 { font-size: 15px; color: var(--azul-esc); margin: 22px 0 10px; text-transform: uppercase; letter-spacing: .5px; }

/* botões */
.btn { display: inline-block; background: var(--azul); color: #fff; border: 0; border-radius: 7px; padding: 9px 15px; font-weight: 700;
       font-size: 13px; cursor: pointer; font-family: inherit; text-decoration: none !important; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.laranja { background: var(--laranja); } .btn.verde { background: var(--verde); } .btn.vermelho { background: var(--vermelho); }
.btn.cinza { background: var(--cinza); } .btn.escuro { background: var(--azul-esc); } .btn.leve { background: var(--azul-cl); color: var(--azul-esc); }
.btn.peq { padding: 5px 10px; font-size: 12px; }
.barra { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.barra .dir { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* cartões */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { background: #fff; border: 1px solid var(--borda); border-radius: 10px; padding: 13px 16px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--azul)); }
.card .r { font-size: 11px; color: var(--cinza); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.card .v { font-size: 22px; font-weight: 700; color: var(--c, var(--azul)); margin-top: 4px; white-space: nowrap; }
.card .d { font-size: 12px; color: var(--cinza); margin-top: 2px; }
a.card:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.06); }

/* tabelas */
.caixa { background: #fff; border: 1px solid var(--borda); border-radius: 10px; overflow: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 13px; }
.tabela th { background: var(--azul-esc); color: #fff; text-align: left; padding: 8px 10px; font-size: 11.5px; text-transform: uppercase;
             letter-spacing: .4px; position: sticky; top: 0; white-space: nowrap; }
.tabela td { padding: 8px 10px; border-bottom: 1px solid #EEF1F3; vertical-align: middle; }
.tabela tr:nth-child(even) td { background: #FAFBFC; }
.tabela tr:hover td { background: var(--azul-cl); }
.tabela .n { text-align: right; white-space: nowrap; }
.tabela tr.total td { font-weight: 700; background: var(--azul-cl) !important; border-top: 2px solid var(--azul); }
.tabela tr.pend td { background: #FDF2E6 !important; }
.tabela tr.estornado td { color: #AAB7B8; text-decoration: line-through; }
.acoes-linha { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: nowrap; }
.pos { color: var(--verde); font-weight: 600; } .neg { color: var(--vermelho); font-weight: 600; }
.sub { color: var(--cinza); font-size: 12px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pill.verde { background: #D5F5E3; color: #145A32; } .pill.amarelo { background: #FDEBD0; color: #9C5700; }
.pill.vermelho { background: #FADBD8; color: #922B21; } .pill.cinza { background: #EAEDED; color: var(--cinza); }
.pill.azul { background: var(--azul-cl); color: var(--azul-esc); }

/* formulários */
.form { display: grid; gap: 10px; }
.form fieldset { border: 1px solid var(--borda); border-radius: 10px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; background: #fff; }
.form legend { color: var(--azul-esc); font-weight: 700; padding: 0 6px; }
.form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--cinza); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #CBD5DC; border-radius: 7px; background: #fff; color: var(--texto); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--azul-cl); border-color: var(--azul); }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; background: #fff; border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.filtros label { display: grid; gap: 3px; font-size: 11.5px; color: var(--cinza); font-weight: 600; }
.filtros input, .filtros select { padding: 6px 8px; font-size: 13px; min-width: 120px; }
.painel-form { background: #fff; border: 1px solid var(--borda); border-radius: 12px; padding: 18px 20px; max-width: 820px; }

/* avisos */
.aviso { border-radius: 9px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; }
.aviso.ok { background: #EAF6EF; color: #145A32; } .aviso.erro { background: #FADBD8; color: #922B21; }
.aviso.info { background: var(--azul-cl); color: var(--azul-esc); } .aviso.alerta { background: #FDEBD0; color: #9C5700; }

/* login */
.tela-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
              background: linear-gradient(135deg, #E6F2F8 0%, #F3F6F8 60%, #FEF0E3 100%); }
.cartao-login { background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,94,133,.12); padding: 28px 30px; width: 100%; max-width: 400px; }
.cartao-login h1 { font-size: 18px; color: var(--azul-esc); margin: 14px 0 6px; }
.logo-login { width: 230px; max-width: 100%; display: block; }
.cartao-login .btn { width: 100%; padding: 11px; font-size: 14px; }

/* barras horizontais (resumos) */
.bh { display: grid; grid-template-columns: 34% 1fr 28%; gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.bh-t { background: #F2F4F5; height: 10px; border-radius: 5px; overflow: hidden; } .bh-b { height: 100%; border-radius: 5px; }
.bh-v { text-align: right; font-weight: 600; white-space: nowrap; }
.duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }

@media (max-width: 760px) {
  .topo .tit { display: none; } .topo img { height: 32px; } main { padding: 12px; }
  .tabela { font-size: 12px; } .esconde-cel { display: none; }
  .card .v { font-size: 19px; }
}
