/* App dos donos do Lady Co — mesma paleta das páginas da Angela (verde-escuro, dourado, marfim). */
:root {
  /* cores do logo oficial (27/09/2026): verde #232E10 e dourado #DAC2A2 */
  --fundo: #F6F2E9; --papel: #FFFDF8; --tinta: #232E10; --suave: #5E6450; --linha: #DDD5C3;
  --ouro: #7E6331; --ouro-forte: #B39675; --ouro-claro: #EFE4C6;
  --ok: #2F6B3A; --ok-fundo: #E4EFE3; --alerta: #8A4A12; --alerta-fundo: #F6E6D6; --erro: #A12C2C; --erro-fundo: #F8E1E1;
  --topo: #232E10; --topo-tinta: #DAC2A2; --botao: #232E10; --botao-tinta: #FFFDF8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Aparência: sem data-tema = segue o aparelho; data-tema="claro" ou "escuro" = escolhido no botão do canto (27/09) */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fundo: #232E10; --papel: #2B3816; --tinta: #F2EEE3; --suave: #C5C9B4; --linha: #405026;
    --ouro: #DAC2A2; --ouro-forte: #DAC2A2; --ouro-claro: #3C3E1E;
    --ok: #9BD3A5; --ok-fundo: #27411F; --alerta: #E7B98A; --alerta-fundo: #46321C; --erro: #F0A0A0; --erro-fundo: #482727;
    --topo: #1A230B; --topo-tinta: #DAC2A2; --botao: #DAC2A2; --botao-tinta: #232E10;
    color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
    --fundo: #232E10; --papel: #2B3816; --tinta: #F2EEE3; --suave: #C5C9B4; --linha: #405026;
    --ouro: #DAC2A2; --ouro-forte: #DAC2A2; --ouro-claro: #3C3E1E;
    --ok: #9BD3A5; --ok-fundo: #27411F; --alerta: #E7B98A; --alerta-fundo: #46321C; --erro: #F0A0A0; --erro-fundo: #482727;
    --topo: #1A230B; --topo-tinta: #DAC2A2; --botao: #DAC2A2; --botao-tinta: #232E10;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--tinta); font: 17px/1.45 var(--sans);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
p { margin: .35rem 0; }
a { color: var(--ouro); }

.topo {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .75rem;
  background: var(--topo); color: var(--topo-tinta); padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem;
  min-height: calc(52px + env(safe-area-inset-top));
}
.topo .marca { font-family: var(--serif); font-weight: 700; letter-spacing: .02em; flex: 1; text-align: center; color: var(--topo-tinta); }
.topo .marca img { height: 26px; width: auto; vertical-align: -6px; margin-right: .4rem; }
.topo .voltar, .topo-dir button {
  background: none; border: 0; color: var(--topo-tinta); font: inherit; padding: .4rem .2rem; cursor: pointer; min-width: 64px; text-align: left;
}
.topo-dir { min-width: 64px; text-align: right; font-size: .85rem; opacity: .85; }

.app { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1rem 1rem 2rem; }
body:not(.com-topo) .app { padding-top: calc(1rem + env(safe-area-inset-top)); }
.carregando { text-align: center; color: var(--suave); padding: 3rem 1rem; }

.card { background: var(--papel); border: 1px solid var(--linha); border-radius: 14px; padding: 1rem 1.1rem; margin: 0 0 1rem; }
.card h2 { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.card h2 small { font: .85rem var(--sans); color: var(--suave); }
.nota { font-size: .88rem; color: var(--suave); }
.nota-caixa { font-size: .88rem; border-radius: 10px; padding: .55rem .75rem; margin-top: .6rem; }
.nota-caixa.ok { background: var(--ok-fundo); color: var(--ok); }
.nota-caixa.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.erro-caixa { background: var(--erro-fundo); color: var(--erro); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }

.ola { margin: .5rem 0 1.25rem; }
.ola p { color: var(--suave); }
.resumo-hoje { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem; }
.mini { background: var(--papel); border: 1px solid var(--linha); border-radius: 12px; padding: .7rem .9rem; }
.mini .rot { font-size: .8rem; color: var(--suave); }
.mini .val { font: 700 1.3rem var(--serif); }

.menu { display: grid; gap: .8rem; }
.ladrilho {
  display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; cursor: pointer;
  background: var(--papel); color: var(--tinta); border: 1px solid var(--linha); border-radius: 16px; padding: 1.1rem 1.1rem; font: inherit;
}
.ladrilho:active { transform: scale(.99); }
.ladrilho .ic { font-size: 1.7rem; width: 2.4rem; text-align: center; }
.ladrilho b { display: block; font: 700 1.15rem var(--serif); }
.ladrilho span.t { color: var(--suave); font-size: .92rem; }
.ladrilho .n { margin-left: auto; background: var(--alerta-fundo); color: var(--alerta); border-radius: 999px; padding: .1rem .6rem; font-weight: 700; }
.rodape-menu { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.25rem; }

.abas { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; margin: 0 0 1rem; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba {
  flex: 0 0 auto; border: 1px solid var(--linha); background: var(--papel); color: var(--tinta);
  border-radius: 999px; padding: .45rem .95rem; font: inherit; font-size: .95rem; cursor: pointer;
}
.aba.ativa { background: var(--botao); color: var(--botao-tinta); border-color: var(--botao); }

.grande { font: 700 2.1rem/1.1 var(--serif); margin: .1rem 0 .2rem; }
.grande-rot { font-size: .9rem; color: var(--suave); }
.linhas { list-style: none; margin: .5rem 0 0; padding: 0; }
.linhas li { display: flex; justify-content: space-between; gap: 1rem; padding: .42rem 0; border-top: 1px solid var(--linha); }
.linhas li:first-child { border-top: 0; }
.linhas li .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.linhas li .d { color: var(--suave); font-size: .88rem; }
.sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--suave); margin: .9rem 0 .1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.chip { border-radius: 999px; padding: .2rem .7rem; font-size: .88rem; background: var(--ouro-claro); color: var(--tinta); }
.chip.ok { background: var(--ok-fundo); color: var(--ok); }
.chip.alerta { background: var(--alerta-fundo); color: var(--alerta); }
.chip.erro { background: var(--erro-fundo); color: var(--erro); }

.tabela-meses { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tabela-meses th, .tabela-meses td { text-align: right; padding: .4rem .35rem; border-top: 1px solid var(--linha); white-space: nowrap; }
.tabela-meses th:first-child, .tabela-meses td:first-child { text-align: left; }
.tabela-meses thead th { border-top: 0; color: var(--suave); font-weight: 600; font-size: .8rem; }
.rolar { overflow-x: auto; }

.botoes { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; }
.btn {
  appearance: none; border: 1px solid var(--botao); background: var(--botao); color: var(--botao-tinta); font: 600 1rem var(--sans);
  border-radius: 12px; padding: .7rem 1.1rem; cursor: pointer; min-height: 46px;
}
.btn.claro { background: transparent; color: var(--tinta); border-color: var(--linha); }
.btn.perigo { background: transparent; color: var(--erro); border-color: var(--erro); }
.btn.pequeno { padding: .4rem .75rem; min-height: 36px; font-size: .9rem; }
.btn.largo { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

form { margin: 0; }
label { display: block; font-weight: 600; margin: .85rem 0 .3rem; }
.campo { position: relative; }
input[type=text], input[type=password], textarea {
  width: 100%; font: 17px var(--sans); color: var(--tinta); background: var(--fundo);
  border: 1px solid var(--linha); border-radius: 12px; padding: .75rem .85rem; outline: none;
}
input:focus, textarea:focus { border-color: var(--ouro-forte); box-shadow: 0 0 0 3px var(--ouro-claro); }
.mostrar { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--suave); font: .85rem var(--sans); padding: .4rem; cursor: pointer; }
.caixa-marcar { display: flex; gap: .6rem; align-items: flex-start; margin: .55rem 0; font-weight: 400; }
.caixa-marcar input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--ouro-forte); }
.caixa-marcar small { display: block; color: var(--suave); }
.entrada { max-width: 420px; margin: 8vh auto 0; }
.entrada .logo { text-align: center; margin-bottom: 1.5rem; }
.entrada .logo img { width: 170px; height: auto; display: block; margin: 0 auto; }
.entrada .logo .nota { margin-top: .6rem; letter-spacing: .04em; }
.link-convite { font: .88rem ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: var(--fundo); border: 1px dashed var(--linha); border-radius: 10px; padding: .6rem .7rem; }

.pessoa { border-top: 1px solid var(--linha); padding: .8rem 0; }
.pessoa:first-of-type { border-top: 0; }
.pessoa .nome { font-weight: 700; }
.pessoa .det { color: var(--suave); font-size: .9rem; }
.hist li { display: block; }
.hist .quando { color: var(--suave); font-size: .82rem; }

.espera { border-top: 1px solid var(--linha); padding: .7rem 0; }
.espera:first-of-type { border-top: 0; }
.espera .quem { font-weight: 700; }
.espera .msg { color: var(--suave); font-size: .95rem; }
.recolher summary { cursor: pointer; font-weight: 600; padding: .2rem 0; }

.conversa { display: flex; flex-direction: column; gap: .5rem; max-height: 55vh; overflow-y: auto; padding: .25rem 0 .5rem; }
.balao { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; }
.balao.eu { align-self: flex-end; background: var(--botao); color: var(--botao-tinta); border-bottom-right-radius: 4px; }
.balao.ia { align-self: flex-start; background: var(--fundo); border: 1px solid var(--linha); border-bottom-left-radius: 4px; }
.balao .hora { display: block; font-size: .72rem; opacity: .65; margin-top: .2rem; }
.escrever { display: flex; gap: .5rem; margin-top: .5rem; }
.escrever textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; }
.sugestoes { display: flex; gap: .4rem; overflow-x: auto; margin: .5rem 0 0; scrollbar-width: none; }
.sugestoes::-webkit-scrollbar { display: none; }
.sugestoes button { flex: 0 0 auto; border: 1px solid var(--linha); background: var(--papel); color: var(--tinta); border-radius: 999px; padding: .35rem .8rem; font: .9rem var(--sans); cursor: pointer; }

.aviso {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--tinta); color: var(--papel); padding: .7rem 1rem; border-radius: 12px; max-width: 92vw; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.dica { background: var(--ouro-claro); border-radius: 12px; padding: .7rem .9rem; font-size: .92rem; margin-bottom: 1rem; }
.dica button { margin-left: .4rem; }
.so-impressao { display: none; }

@media (min-width: 640px) { .menu { grid-template-columns: 1fr 1fr; } .resumo-hoje { grid-template-columns: repeat(4, 1fr); } }

@media print {
  :root, :root[data-tema], :root:not([data-tema="claro"]) { --fundo: #fff; --papel: #fff; --tinta: #111; --suave: #444; --linha: #ccc; color-scheme: light; }
  body { font-size: 12px; padding: 0; }
  .topo, .abas, .botoes, .nao-imprimir, .aviso, .tema { display: none !important; }
  .so-impressao { display: block; margin-bottom: 8px; }
  .app { max-width: none; padding: 0; }
  .card { break-inside: avoid; border-color: #bbb; }
}

a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Botão de aparência no canto superior direito (27/09): por cima do topo, ou sozinho nas telas de entrada */
.tema { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + 8px); right: calc(env(safe-area-inset-right) + 12px); }
.tema-botao {
  width: 36px; height: 36px; border-radius: 999px; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  background: var(--papel); color: var(--tinta); border: 1px solid var(--linha);
}
body.com-topo .tema-botao { background: transparent; color: var(--topo-tinta); border-color: rgba(218, 194, 162, .45); }
.tema-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: .3rem;
  background: var(--papel); color: var(--tinta); border: 1px solid var(--linha); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
.tema-menu button {
  display: flex; align-items: center; gap: .65rem; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.tema-menu button:hover { background: var(--fundo); }
.tema-menu button[aria-checked="true"] { background: var(--ouro-claro); font-weight: 600; }
.tema-menu small { display: block; color: var(--suave); font-size: .8rem; font-weight: 400; }
.tema-menu .marca-ok { margin-left: auto; opacity: 0; }
.tema-menu button[aria-checked="true"] .marca-ok { opacity: 1; }

/* Rodapé (pedido do Hermes, 27/09): assinatura em todas as telas e no PDF */
.rodape { text-align: center; font-size: .78rem; letter-spacing: .06em; color: var(--suave); padding: .75rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); }
.rodape b { color: var(--ouro); letter-spacing: .14em; font-weight: 700; }
