/* Anota AI · Meu painel — celular primeiro; no PC centraliza em 560px.
   Cores da marca (logo modelo 5): azul #4f8cff, amarelo #ffd026, fundo #10224d → #07132e. Verde = entrou, vermelho = saiu. */
:root {
  --bg: #f2f5fb; --card: #ffffff; --card2: #f6f8fd; --fg: #0e1a36; --sub: #5d6987; --linha: #e3e8f3;
  --azul: #2f6fea; --azul-claro: #e7efff; --amarelo: #f5b800; --topo1: #10224d; --topo2: #07132e;
  --ent: #11a36b; --sai: #e0474c; --aviso: #b86e00; --aviso-bg: #fff4dd; --ok-bg: #e3f7ee;
  --sombra: 0 1px 2px rgba(16, 34, 77, .06), 0 6px 20px rgba(16, 34, 77, .06);
  --f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --raio: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #07132e; --card: #0f1f45; --card2: #142859; --fg: #e9effd; --sub: #9eabca; --linha: #1e3264;
  --azul: #4f8cff; --azul-claro: #17306a; --amarelo: #ffd026; --ent: #34d399; --sai: #ff7b7b; --aviso: #ffc35a; --aviso-bg: #3a2b0c; --ok-bg: #0f3a2b;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #07132e; --card: #0f1f45; --card2: #142859; --fg: #e9effd; --sub: #9eabca; --linha: #1e3264;
  --azul: #4f8cff; --azul-claro: #17306a; --amarelo: #ffd026; --ent: #34d399; --sai: #ff7b7b; --aviso: #ffc35a; --aviso-bg: #3a2b0c; --ok-bg: #0f3a2b;
  --sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); color-scheme: dark; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 6px; }
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.ent { color: var(--ent); } .sai { color: var(--sai); }

/* abertura */
.abertura { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 22px; background: linear-gradient(160deg, var(--topo1), var(--topo2)); color: #fff; }
.girando { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #ffd026; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* logo */
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo i { width: 28px; height: 28px; border-radius: 8px; background: #4f8cff; color: #fff; display: grid; place-items: center; font-style: normal; font-size: 16px; position: relative; box-shadow: 0 4px 12px rgba(79, 140, 255, .45); }
.logo i::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 4px; height: 2px; background: #ffd026; border-radius: 2px; }
.logo b { color: #4f8cff; }
.logo.grande { font-size: 30px; gap: 12px; } .logo.grande i { width: 46px; height: 46px; border-radius: 13px; font-size: 26px; }
.logo.grande i::after { left: 11px; right: 11px; bottom: 7px; height: 3px; }

/* topo */
header.topo { position: relative; z-index: 20; background: linear-gradient(160deg, var(--topo1), var(--topo2)); color: #fff;
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  box-shadow: 0 8px 24px rgba(7, 19, 46, .25); }
.linha-topo { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.titulo-pg { font-weight: 650; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.btn-ic { width: 38px; height: 38px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s, background .15s; }
.btn-ic:active { transform: scale(.88); background: rgba(255, 255, 255, .22); }
.btn-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.avatar { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #ffd026; color: #10224d; font-weight: 700; display: grid; place-items: center; transition: transform .15s; }
.avatar:active { transform: scale(.88); }
.escopos { display: flex; gap: 6px; margin-top: 10px; }
.escopos button { border: 1px solid rgba(255, 255, 255, .25); background: none; color: #fff; border-radius: 999px; padding: 5px 14px; font-size: 13px; transition: all .2s; }
.escopos button.on { background: #fff; color: #10224d; border-color: #fff; font-weight: 650; }
.modos { display: flex; background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 3px; gap: 3px; margin-top: 10px; position: relative; }
.modos button { flex: 1; border: 0; background: none; color: #fff; padding: 7px 4px; border-radius: 9px; font-size: 13px; opacity: .85; position: relative; z-index: 1; transition: color .2s, opacity .2s; }
.modos button.on { color: #10224d; font-weight: 650; opacity: 1; }
.modos .pilula { position: absolute; top: 3px; bottom: 3px; border-radius: 9px; background: #fff; transition: left .25s cubic-bezier(.3, .7, .2, 1), width .25s; }
.nav-per { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.nav-per b { flex: 1; text-align: center; font-size: 16px; font-weight: 650; }
.nav-per button { width: 42px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .22); background: none; color: #fff; font-size: 20px; line-height: 1; transition: transform .15s; }
.nav-per button:active:not(:disabled) { transform: scale(.88); }
.nav-per button:disabled { opacity: .25; cursor: default; }
.dias { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: none; scroll-behavior: smooth; }
.dias::-webkit-scrollbar { display: none; }
.dias button { flex: none; width: 42px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .18); background: none; color: #fff; padding: 4px 0; line-height: 1.15; transition: transform .15s; }
.dias button small { display: block; font-size: 10px; opacity: .7; }
.dias button.on { background: #ffd026; color: #10224d; border-color: #ffd026; font-weight: 700; }
.dias button:active { transform: scale(.9); }

/* conteúdo */
main { padding: 14px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
.trilha { font-size: 12px; color: var(--sub); margin: -4px 2px 0; }
.trilha a { color: var(--azul); text-decoration: none; }
.bloco { background: var(--card); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); }
.bloco h2 { font-size: 16px; font-weight: 650; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.bloco h2 .ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul); flex: none; }
.bloco h2 .ic svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.como-ler { color: var(--sub); font-size: 13px; margin: 6px 0 12px; padding-left: 20px; position: relative; text-wrap: pretty; }
.como-ler::before { content: "💡"; font-size: 12px; position: absolute; left: 0; top: 1px; }

/* números do topo */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--card); border-radius: var(--raio); padding: 14px; box-shadow: var(--sombra); min-width: 0; }
.kpi small { color: var(--sub); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.kpi small i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kpi .v { font-size: 21px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.grande { grid-column: 1 / -1; background: linear-gradient(135deg, var(--card), var(--card2)); }
.kpi.grande .v { font-size: 32px; }
.kpi .rodape-kpi { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--sub); }
.pill { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.bom { background: color-mix(in srgb, var(--ent) 15%, transparent); color: var(--ent); }
.pill.ruim { background: color-mix(in srgb, var(--sai) 15%, transparent); color: var(--sai); }
.pill.neutro { background: var(--azul-claro); color: var(--azul); }
.barra-sobra { height: 8px; border-radius: 6px; background: color-mix(in srgb, var(--sai) 22%, transparent); overflow: hidden; margin-top: 10px; }
.barra-sobra i { display: block; height: 100%; background: var(--ent); border-radius: 6px; transition: width .8s cubic-bezier(.3, .7, .2, 1); }

/* o que mudou */
.insights { display: flex; flex-direction: column; gap: 8px; }
.ins { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 11px 12px; border-radius: 13px; background: var(--azul-claro); border: 0; text-align: left; width: 100%; transition: transform .15s; }
.ins:active:not(:disabled) { transform: scale(.98); }
.ins:disabled { cursor: default; }
.ins.alerta { background: var(--aviso-bg); }
.ins.bom { background: var(--ok-bg); }
.ins .ic { font-size: 17px; line-height: 1.25; }
.ins .seta { margin-left: auto; color: var(--sub); }

/* gráficos */
.graf { position: relative; width: 100%; }
.graf svg { display: block; width: 100%; height: auto; overflow: visible; }
.graf text { fill: var(--sub); font-size: 11px; font-family: var(--f); }
.graf .grade { stroke: var(--linha); stroke-width: 1; }
.graf .alvo { cursor: pointer; }
.graf .alvo:hover rect, .graf .alvo:focus rect { opacity: .85; }
.dica-graf { position: absolute; pointer-events: none; background: var(--fg); color: var(--bg); font-size: 12px; padding: 7px 9px; border-radius: 9px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; z-index: 3; line-height: 1.35; box-shadow: var(--sombra); }
.dica-graf.on { opacity: 1; }
.legenda-mini { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--sub); margin-top: 8px; }
.legenda-mini span { display: inline-flex; align-items: center; gap: 6px; }
.legenda-mini i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rosca-wrap { display: grid; grid-template-columns: 1fr; gap: 8px; }
.rosca { max-width: 230px; margin: 0 auto; width: 100%; }
.rosca path { cursor: pointer; transition: transform .2s; transform-origin: 100px 100px; }
.rosca path:hover, .rosca path:focus { transform: scale(1.04); }
.rosca .centro-v { fill: var(--fg); font-size: 20px; font-weight: 700; }
.rosca .centro-r { fill: var(--sub); font-size: 11px; }
.legenda { display: flex; flex-direction: column; gap: 2px; }
.leg { display: grid; grid-template-columns: 12px 1fr auto auto 14px; gap: 10px; align-items: center; padding: 9px 6px; border-radius: 11px; border: 0; background: none; text-align: left; width: 100%; transition: background .15s, transform .15s; }
.leg:hover { background: var(--card2); }
.leg:active { transform: scale(.98); }
.leg .bolinha { width: 12px; height: 12px; border-radius: 4px; }
.leg .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.leg .pc { color: var(--sub); font-size: 12px; }
.leg .vl { font-weight: 650; font-size: 14px; text-align: right; }
.leg .seta { color: var(--sub); font-size: 16px; }
.leg.sem-link { cursor: default; }
@media (min-width: 520px) { .rosca-wrap { grid-template-columns: 210px 1fr; align-items: center; } }

/* pessoas */
.pessoas { display: flex; flex-direction: column; gap: 8px; }
.pessoa { display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 12px; border: 1px solid var(--linha); border-radius: 14px; background: none; text-align: left; width: 100%; transition: border-color .15s, transform .15s; }
.pessoa:hover { border-color: var(--azul); }
.pessoa:active { transform: scale(.98); }
.pessoa .ini { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; grid-row: span 2; }
.pessoa .nm { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa .ult { color: var(--sub); font-size: 12px; }
.pessoa .ult.atr { color: var(--aviso); font-weight: 650; }
.pessoa .vals { text-align: right; font-size: 13px; grid-row: span 2; line-height: 1.35; }
.pessoa .barras2 { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.b2 { height: 6px; border-radius: 4px; background: var(--linha); overflow: hidden; }
.b2 i { display: block; height: 100%; border-radius: 4px; transition: width .8s cubic-bezier(.3, .7, .2, 1); }

/* metas e cofrinhos */
.metas { display: flex; flex-direction: column; gap: 12px; }
.meta .lin { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.meta .lin span:last-child { color: var(--sub); white-space: nowrap; }
.meta .trilho { height: 10px; border-radius: 6px; background: var(--linha); overflow: hidden; margin-top: 6px; }
.meta .trilho i { display: block; height: 100%; border-radius: 6px; transition: width .9s cubic-bezier(.3, .7, .2, 1); }
.meta small { color: var(--sub); font-size: 12px; }

/* lista */
.seg { display: flex; background: var(--card2); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 8px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 9px; font-size: 13px; color: var(--sub); transition: all .2s; }
.seg button.on { background: var(--card); color: var(--fg); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.busca { width: 100%; padding: 10px 12px 10px 36px; border-radius: 12px; border: 1px solid var(--linha); background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a96b3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 16px; margin-bottom: 8px; font-size: 15px; }
.lista { display: flex; flex-direction: column; }
.lan { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--linha); }
.lan:first-child { border-top: 0; }
.lan .dia { font-size: 11px; color: var(--sub); text-align: center; line-height: 1.1; }
.lan .dia b { display: block; font-size: 17px; color: var(--fg); }
.lan .ds { min-width: 0; }
.lan .ds div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lan .ds small { color: var(--sub); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lan .vl { font-weight: 650; white-space: nowrap; }
.mais { border: 0; background: none; color: var(--azul); font-weight: 650; padding: 12px; font-size: 14px; width: 100%; }
.vazio { color: var(--sub); font-size: 14px; text-align: center; padding: 18px 8px; }
.aviso-escopo { font-size: 12px; color: var(--sub); background: var(--card2); border-radius: 10px; padding: 8px 10px; }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(28px + env(safe-area-inset-top, 0px)) max(22px, env(safe-area-inset-right, 0px)) 28px max(22px, env(safe-area-inset-left, 0px)); max-width: 440px; margin: 0 auto; }
.login-fundo { background: radial-gradient(1200px 500px at 50% -200px, color-mix(in srgb, var(--azul) 28%, transparent), transparent 70%), var(--bg); min-height: 100vh; }
.login h1 { font-size: 26px; margin: 4px 0 0; letter-spacing: -.02em; line-height: 1.2; }
.login p { color: var(--sub); margin: 0; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-size: 13px; font-weight: 650; }
.campo .caixa-in { position: relative; }
.campo input { width: 100%; font-size: 17px; padding: 14px 14px; border-radius: 14px; border: 1.5px solid var(--linha); background: var(--card); transition: border-color .15s, box-shadow .15s; }
.campo input:focus { outline: 0; border-color: var(--azul); box-shadow: 0 0 0 4px color-mix(in srgb, var(--azul) 18%, transparent); }
.campo .olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--sub); padding: 8px; font-size: 13px; }
.campo small { color: var(--sub); font-size: 12px; }
.btn { background: var(--azul); color: #fff; border: 0; border-radius: 14px; padding: 15px; font-size: 16px; font-weight: 650; width: 100%; transition: transform .12s, box-shadow .2s, opacity .2s; box-shadow: 0 8px 22px color-mix(in srgb, var(--azul) 35%, transparent); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; }
.btn.zap { background: #1fa855; box-shadow: 0 8px 22px rgba(31, 168, 85, .35); }
.btn.claro { background: var(--card); color: var(--fg); box-shadow: none; border: 1.5px solid var(--linha); }
.link { background: none; border: 0; color: var(--azul); font-weight: 600; padding: 6px; font-size: 14px; }
.links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.erro { background: color-mix(in srgb, var(--sai) 12%, transparent); color: var(--sai); border-radius: 12px; padding: 10px 12px; font-size: 14px; animation: treme .35s; }
@keyframes treme { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.codigo { font-size: 38px; font-weight: 800; letter-spacing: .14em; text-align: center; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sombra); font-variant-numeric: tabular-nums; }
.codigo small { display: block; font-size: 12px; letter-spacing: 0; font-weight: 600; color: var(--sub); }
.passos { margin: 0; padding-left: 20px; color: var(--sub); display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.esperando { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 14px; justify-content: center; }
.esperando .girando { width: 18px; height: 18px; border-width: 2px; border-color: var(--linha); border-top-color: var(--azul); }
.rodape { color: var(--sub); font-size: 12px; text-align: center; padding: 14px 16px 4px; }
.sucesso { text-align: center; font-size: 56px; animation: pula .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pula { from { transform: scale(.3); opacity: 0; } }

/* conta */
.ficha { display: flex; flex-direction: column; }
.ficha .item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); font-size: 14px; }
.ficha .item:first-child { border-top: 0; }
.ficha .item span:first-child { color: var(--sub); }
.aparelho { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linha); font-size: 14px; }
.aparelho:first-child { border-top: 0; }
.aparelho small { color: var(--sub); display: block; font-size: 12px; }

/* esqueleto e entrada animada */
.esq { border-radius: var(--raio); background: linear-gradient(90deg, var(--card) 0%, var(--card2) 50%, var(--card) 100%); background-size: 200% 100%; animation: brilho 1.2s infinite; }
@keyframes brilho { to { background-position: -200% 0; } }
.surge > * { animation: sobe .45s cubic-bezier(.2, .8, .2, 1) both; }
.surge > *:nth-child(2) { animation-delay: .04s; } .surge > *:nth-child(3) { animation-delay: .08s; } .surge > *:nth-child(4) { animation-delay: .12s; }
.surge > *:nth-child(5) { animation-delay: .16s; } .surge > *:nth-child(6) { animation-delay: .2s; } .surge > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }
.vai-esq { animation: entraEsq .3s cubic-bezier(.2, .8, .2, 1); } .vai-dir { animation: entraDir .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes entraEsq { from { opacity: .3; transform: translateX(24px); } }
@keyframes entraDir { from { opacity: .3; transform: translateX(-24px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* login com PIN */
.passo { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sombra); }
.passo small { color: var(--sub); font-size: 12px; }
.rot-passo { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.n-passo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 12px; font-weight: 700; }
.campo.passo label { display: flex; align-items: center; gap: 8px; }
.campo input.pin { font-size: 28px; letter-spacing: .3em; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.pc-zap { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--sub); }
.pc-zap img { background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.pc-zap.sem-qr img { display: none; }
.ok-mini { color: var(--ent, #1f8a4c); font-weight: 650; }
