.app {
  --floresta: #052f26;
  --verde: #07513f;
  --dourado: #e8c991;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.app .topo {
  background: var(--fundo);
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, calc((100% - 1200px) / 2)) .85rem;
}
.app .marca { display: inline-flex; align-items: center; gap: .65rem; letter-spacing: -.035em; }
.app .marca img { border-radius: .65rem; }
.app .largura { width: min(1200px, calc(100% - 2rem)); }
.app .painel { padding-block: clamp(1.15rem, 3vw, 2.4rem) 3rem; }
.app button, .app .botao, .app input, .app select { min-height: 44px; border-radius: .8rem; }
.app input, .app select { font-size: 1rem; }
.app input[type="checkbox"] { min-height: 0; inline-size: 1.1rem; block-size: 1.1rem; flex: none; accent-color: var(--marca); }
.app h2 { font-size: 1.1rem; letter-spacing: -.025em; }
.app .destaque { font-size: 1.75rem; letter-spacing: -.04em; }
.app .grade article, .app .caixa, .app details { border-radius: 1.1rem; }
.app .caixa, .app .grade article { padding: clamp(1rem, 2.2vw, 1.5rem); }
.app .caixa > :last-child { margin-bottom: 0; }
.app summary { padding-block: .45rem; }
.app :is(input, select, button, summary):focus-visible { outline-color: var(--marca); }
.app .cabeçalho { margin-bottom: 1.15rem; }
.app .cabeçalho h1 { margin-bottom: 0; font-size: clamp(2rem, 5vw, 3.1rem); }
.app .cabeçalho label { min-width: 11rem; }
.app #saudacao { margin: 0 0 .3rem; font-size: .92rem; font-weight: 650; }
.app #aviso {
  position: fixed;
  z-index: 3;
  top: calc(env(safe-area-inset-top) + .5rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(32rem, calc(100% - 2rem));
  box-shadow: 0 6px 20px #192a2226;
}
.app .acesso {
  margin: clamp(1rem, 6vh, 5rem) auto;
  padding: clamp(1.25rem, 4vw, 2.1rem);
  border: 1px solid var(--borda);
  border-radius: 1.55rem;
  background: var(--painel);
}
.app .acesso button { width: 100%; }
.app .acesso details { background: var(--fundo); }

.estrutura { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: clamp(1.1rem, 3vw, 2.5rem); }
.área { min-width: 0; }
.abas {
  position: sticky;
  top: 1.25rem;
  align-self: start;
  display: grid;
  gap: .3rem;
  margin: 0;
  padding: .5rem;
  border: 1px solid var(--borda);
  border-radius: 1.1rem;
  background: var(--painel);
}
.abas button {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--leve);
  border: 0;
  background: transparent;
}
.abas button[aria-current] { background: var(--suave); color: var(--marca); }
@media (min-width: 821px) {
  .abas { background: var(--floresta); border-color: #304a3a; }
  .abas button { color: #d9e2d5; }
  .abas button[aria-current] { background: #304a3a; color: #f7fce9; }
  .abas button[aria-current] .ícone, .abas button:focus-visible { color: var(--dourado); outline-color: var(--dourado); }
}
.ícone { display: inline-block; flex: none; position: relative; width: 1.18rem; height: 1.18rem; }
.ícone::before, .ícone::after { position: absolute; content: ""; box-sizing: border-box; }
.casa::before { width: 13px; height: 13px; left: 3px; top: 1px; border: solid currentColor; border-width: 2px 0 0 2px; transform: rotate(45deg); border-radius: 2px; }
.casa::after { inset: 8px 3px 1px; border: solid currentColor; border-width: 0 2px 2px; border-radius: 0 0 3px 3px; }
.extrato::before { inset: 1px 3px; border: 2px solid currentColor; border-radius: 3px; }
.extrato::after { left: 7px; top: 6px; width: 5px; height: 2px; background: currentColor; box-shadow: 0 4px currentColor; }
.planos::before { inset: 2px 1px 1px; border: solid currentColor; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.planos::after { left: 6px; bottom: 4px; width: 2px; height: 5px; background: currentColor; box-shadow: 4px -3px currentColor, 8px -6px currentColor; }
.família::before { left: 2px; top: 2px; width: 7px; height: 7px; border: 2px solid currentColor; border-radius: 50%; box-shadow: 8px 0 0 -1px currentColor; }
.família::after { left: 1px; bottom: 2px; width: 10px; height: 6px; border: 2px solid currentColor; border-radius: 7px 7px 3px 3px; box-shadow: 7px 0 0 -1px currentColor; }
.ajustes::before { inset: 4px 1px 5px; height: 2px; background: currentColor; box-shadow: 0 7px currentColor; border-radius: 2px; }
.ajustes::after { inset: 2px auto auto 5px; width: 3px; height: 6px; background: currentColor; box-shadow: 6px 7px currentColor; border-radius: 2px; }
.mais::before { inset: 8px 2px auto; height: 2px; background: currentColor; border-radius: 1px; }
.mais::after { inset: 2px auto 2px 8px; width: 2px; background: currentColor; border-radius: 1px; }
.conversa-ícone::before { inset: 2px 1px 4px; border: 2px solid currentColor; border-radius: 5px; }
.conversa-ícone::after { width: 5px; height: 5px; left: 5px; bottom: 2px; border: solid currentColor; border-width: 0 0 2px 2px; transform: skewY(-35deg); }

.balanço {
  border-radius: 1.45rem;
  color: #fffefa;
  background: radial-gradient(ellipse at 94% 0%, #37644e 0%, transparent 58%), linear-gradient(135deg,var(--floresta),var(--verde));
  padding: clamp(1.2rem, 4vw, 2rem);
  min-width: 0;
}
.balanço-principal { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.balanço h2 { color: var(--dourado); margin: 0; font-weight: 620; }
.balanço p { margin: .35rem 0 0; }
.balanço p:not(.balanço-valor) { color: #f0f4e8; font-size: .9rem; }
.balanço-valor { font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.08; letter-spacing: -.045em; font-weight: 760; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.balanço-dados { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; border-top: 1px solid #ffffff40; margin: 1.1rem 0 0; padding-top: .85rem; }
.balanço-dados dt { color: #dae8cc; font-size: .8rem; }
.balanço-dados dd { margin: .24rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.saldo-ação { border-color: #ffffff80; background: #ffffff1a; color: #fff; }
.atalhos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: .8rem 0 1.1rem; }
.atalhos button { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.15rem; text-align: left; }
.atalhos button + button { background: var(--painel); color: var(--marca); border-color: var(--borda); }
.panorama article { min-width: 0; }
.panorama .destaque { margin: .3rem 0 .7rem; }
.categorias, .agenda, .extrato-lista { margin: 0; padding: 0; list-style: none; }
.categorias li { margin: .65rem 0 0; }
.categorias li > div, .agenda li { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; }
.categorias strong, .agenda li > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.categorias meter { appearance: none; display: block; width: 100%; height: .37rem; border: 0; border-radius: 1rem; background: var(--suave); margin-top: .32rem; }
.categorias meter::-webkit-meter-bar { height: .37rem; background: var(--suave); border: 0; }
.categorias meter::-webkit-meter-optimum-value { background: var(--marca); border-radius: 1rem; }
.categorias meter::-moz-meter-bar { background: var(--marca); border-radius: 1rem; }
.agenda li, .extrato-lista li { padding: .75rem 0; border-bottom: 1px solid var(--borda); overflow-wrap: anywhere; }
.agenda li:last-child, .extrato-lista li:last-child { border-bottom: 0; padding-bottom: 0; }
.agenda li span, .extrato-item small { display: block; font-size: .82rem; }
.extrato-item { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(0,auto); align-items: center; gap: .65rem; }
.extrato-item small, .extrato-origem { color: var(--leve); margin-top: .2rem; }
.movimento-símbolo { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .7rem; color: var(--marca); background: var(--suave); font-size: 1.1rem; font-weight: 700; }
.movimento-símbolo.entrada { color: #07513f; background: #d7e5a7; }
.extrato-valor { text-align: right; font-variant-numeric: tabular-nums; }
.extrato-origem, .extrato-ações { margin: .4rem 0 0 2.8rem; }
.extrato-ações { display: flex; gap: .5rem; flex-wrap: wrap; }
.extrato-ações button { font-size: .85rem; min-height: 44px; padding: .4rem .65rem; }
#assistente { scroll-margin-top: 1.25rem; }
.atalhos-planejamento { display: flex; flex-wrap: wrap; gap: .45rem; }
.atalhos-planejamento a { display: inline-flex; align-items: center; min-height: 44px; padding: .35rem .75rem; background: var(--painel); border: 1px solid var(--borda); border-radius: .8rem; text-decoration: none; font-size: .88rem; font-weight: 650; }
.app section[id] { scroll-margin-top: 1.25rem; }
#resposta-conversa:empty { display: none; }
#resposta-conversa { white-space: pre-line; }
.segredo, .códigos-reserva code { overflow-wrap: anywhere; user-select: all; }
.segredo { display: block; padding: .7rem; background: var(--suave); border-radius: .6rem; }

@media (max-width: 820px) {
  .estrutura { display: block; }
  .abas {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: .2rem;
    border: 0;
    border-top: 1px solid var(--borda);
    border-radius: 0;
    padding: .32rem max(.35rem,env(safe-area-inset-right)) calc(.32rem + env(safe-area-inset-bottom)) max(.35rem,env(safe-area-inset-left));
    box-shadow: 0 -5px 20px #192a2212;
  }
  .abas button {
    padding: .3rem .1rem;
    flex-direction: column;
    justify-content: center;
    gap: .26rem;
    font-size: clamp(.69rem, 2.6vw, .8rem);
  }
  .app .painel:has(.estrutura:not([hidden])) { padding-bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .app .cabeçalho { align-items: stretch; gap: .75rem; }
  .atalhos button { padding: .55rem .6rem; font-size: .85rem; }
  .app .tabela th, .app .tabela td { padding-inline: .5rem; }
  .app .linha > label { min-width: min(8.4rem, 100%); }
  .app fieldset { min-width: 0; }
}
