/* Partes novas do app (login, barra de abas, saldo com olho, aviso sem conexão). O resto vem de estilos.css. */
[hidden] { display: none !important; }
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.login .marca { width: 64px; height: 64px; border-radius: 20px; background: var(--azul); color: #fff;
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.login h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 4px; }
.login p.sub { color: var(--sub); margin: 0 0 22px; font-size: 15px; line-height: 1.4; }
.login form { display: flex; flex-direction: column; gap: 0; }
.login .card { margin: 0 0 14px; }
.login .linha > label { width: 70px; }
.login .linha input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--txt);
  font-size: 16px; font-weight: 600; padding: 14px 0; outline: none; }
.login .btn.largo { width: 100%; margin: 0; }
.login .erro { color: var(--vermelho); font-size: 14px; font-weight: 600; min-height: 20px; margin: 10px 4px 0; }
.login .rodape { color: var(--sub); font-size: 12px; text-align: center; margin-top: 26px; }

/* ---------- topo com seletor de projeto ---------- */
.topo .projeto { border: 0; background: transparent; color: var(--txt); padding: 0; display: flex; align-items: center;
  gap: 6px; font: inherit; text-align: left; }
.topo .projeto h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; margin: 0; }
.topo .projeto svg { color: var(--sub); margin-top: 4px; }

/* ---------- saldo disponível ---------- */
.saldo { width: calc(100% - 36px); margin: 8px 18px 0; border-radius: 22px; background: var(--card); box-shadow: var(--sombra);
  padding: 14px 16px; }
.saldo-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.saldo-topo span { font-size: 13px; font-weight: 700; color: var(--sub); }
.saldo-olho { border: 0; background: var(--campo); color: var(--txt); width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; }
.saldo-total { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.saldo-contas { margin-top: 8px; border-top: 1px solid var(--linha); }
.saldo-contas div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px;
  border-bottom: 1px solid var(--linha); }
.saldo-contas div:last-child { border-bottom: 0; }
.saldo-contas span { color: var(--sub); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saldo-contas b { font-variant-numeric: tabular-nums; }
.neg { color: var(--vermelho); }
.oculto { letter-spacing: 2px; color: var(--sub); }

/* ---------- barra de abas (iPhone) ---------- */
.abas-rodape { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: flex; background: var(--card);
  border-top: 1px solid var(--linha); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.abas-rodape button { flex: 1; border: 0; background: transparent; color: var(--sub); display: flex; flex-direction: column;
  align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; padding: 6px 0; border-radius: 12px; }
.abas-rodape button.on { color: var(--azul); }

/* ---------- sem conexão: tela cheia ---------- */
.offline { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background: var(--bg); color: var(--txt); text-align: center; padding: 24px; }
.offline svg { color: var(--sub); margin-bottom: 6px; }
.offline b { font-size: 20px; font-weight: 800; }
.offline span { color: var(--sub); font-size: 15px; }

/* ---------- configurações ---------- */
.cfg-item { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--linha); }
.cfg-item:last-child { border-bottom: 0; }
.cfg-item > span:not(.ico-q) { flex: 1; min-width: 0; font-weight: 600; }
.cfg-item small { display: block; color: var(--sub); font-weight: 500; font-size: 13px; }
.cfg-item .ico-q { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.etiqueta { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--campo); color: var(--sub); margin-left: 6px; vertical-align: 2px; }
.campo-form { display: flex; flex-direction: column; gap: 10px; margin: 6px 16px; }
.campo-form input { border: 0; border-radius: 14px; background: var(--card); color: var(--txt); font-size: 16px;
  padding: 14px; outline: none; box-shadow: var(--sombra); }

/* ---------- computador: tela larga, tudo visível ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 40px; }
  .abas-rodape { display: none; }
  #app { max-width: 1100px; margin: 0 auto; }
  .grade { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .saldo-contas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
  .saldo-contas div:last-child { border-bottom: 1px solid var(--linha); }
}
.chev { display: flex; color: var(--sub); transform: rotate(180deg); }
.linha input[type=email], .linha input[type=password] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--txt);
  font-size: 16px; font-weight: 600; padding: 12px 0; outline: none; }

/* aviso (toast) acima da barra de abas no iPhone */
.toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .toast { bottom: calc(40px + env(safe-area-inset-bottom)); } }
.anexos { display: none !important; }   /* comprovantes: voltam na Parte 4 */
.saldo { cursor: pointer; }
