/* Painel Noely — mobile primeiro. Claro por padrao, escuro quando o celular pede. */

:root {
  --bg:      #FBF7F4;
  --surface: #FFFFFF;
  --sunk:    #F4EDE7;
  --ink:     #241E1B;
  --muted:   #8A7D74;
  --line:    #EDE4DC;

  --rose:  #B0526B;   /* Noely */
  --sage:  #5F8570;   /* Obra & Aconchego — videos */
  --terra: #B57A55;   /* Obra & Aconchego — stories */
  --done:  #3F8F5B;

  --rose-fraco:  #FBEEF1;
  --sage-fraco:  #EBF2ED;
  --terra-fraco: #FAF0E9;
  --done-fraco:  #E7F4EB;

  --sombra: 0 1px 2px rgba(60,40,30,.05), 0 6px 18px rgba(60,40,30,.05);
  --raio: 18px;
  --nav: 66px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #191512;
    --surface: #241F1B;
    --sunk:    #2E2823;
    --ink:     #F2EBE5;
    --muted:   #A2958B;
    --line:    #362F29;

    --rose:  #E58AA2;
    --sage:  #8FC0A1;
    --terra: #E0A57C;
    --done:  #6FCB8C;

    --rose-fraco:  #3A2229;
    --sage-fraco:  #1F2E25;
    --terra-fraco: #372620;
    --done-fraco:  #1E3527;

    --sombra: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0 0 calc(var(--nav) + env(safe-area-inset-bottom) + 14px);
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  overscroll-behavior-y: none;
}

.env { padding: 0 18px; max-width: 620px; margin: 0 auto; }

/* ------------------------------------------------------------- cabecalho */

.topo {
  padding: calc(env(safe-area-inset-top) + 26px) 0 20px;
  display: flex; align-items: center; gap: 18px;
}
.topo h1 { margin: 0; font-size: 26px; font-weight: 640; letter-spacing: -.5px; }
.topo .data { margin: 3px 0 0; color: var(--muted); font-size: 14px; }
.topo .streak {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 9px;
  background: var(--terra-fraco); color: var(--terra);
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 620;
}

/* anel de progresso */
.anel { position: relative; flex: none; width: 74px; height: 74px; }
.anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.anel .trilho { stroke: var(--line); }
.anel .barra  { stroke: var(--rose); transition: stroke-dashoffset .55s cubic-bezier(.2,.8,.3,1); }
.anel .txt {
  position: absolute; inset: 0; display: grid; place-content: center;
  text-align: center; line-height: 1.05;
}
.anel .txt b { font-size: 19px; font-weight: 660; letter-spacing: -.5px; }
.anel .txt span { font-size: 10px; color: var(--muted); }

/* ------------------------------------------------------------- semana */

.semana { display: flex; gap: 6px; margin: 4px 0 26px; }
.semana a {
  flex: 1; text-decoration: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 9px 0 8px; border-radius: 14px; border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.semana a .sig { font-size: 10.5px; font-weight: 600; letter-spacing: .4px; }
.semana a .num { font-size: 15px; font-weight: 620; color: var(--ink); }
.semana a .bola {
  width: 5px; height: 5px; border-radius: 50%; background: var(--line);
}
.semana a .bola.parcial { background: var(--terra); }
.semana a .bola.cheia   { background: var(--done); }
.semana a.hoje .num { color: var(--rose); }
.semana a.atual {
  background: var(--surface); border-color: var(--line); box-shadow: var(--sombra);
}

/* ------------------------------------------------------------- secoes */

.secao { margin-bottom: 26px; }
.secao > header {
  display: flex; align-items: center; gap: 9px; margin: 0 2px 11px;
}
.secao > header .ponto { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.secao > header h2 {
  margin: 0; font-size: 12px; font-weight: 660;
  letter-spacing: .9px; text-transform: uppercase;
}
.secao > header .conta { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.s-rose  .ponto { background: var(--rose); }  .s-rose  h2 { color: var(--rose); }
.s-sage  .ponto { background: var(--sage); }  .s-sage  h2 { color: var(--sage); }
.s-terra .ponto { background: var(--terra); } .s-terra h2 { color: var(--terra); }

/* ------------------------------------------------------------- cartao */

.cartao {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 15px 16px; margin-bottom: 11px;
  transition: opacity .25s;
}
.cartao.feito { opacity: .62; }
.cartao .rotulo {
  font-size: 11px; font-weight: 640; letter-spacing: .6px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
  display: flex; align-items: center; gap: 8px;
}
.cartao .rotulo .ok {
  margin-left: auto; color: var(--done); display: none;
  font-size: 11px; font-weight: 660; letter-spacing: .3px;
}
.cartao.feito .rotulo .ok { display: inline; }

/* campos de texto que parecem texto, nao formulario */
.campo {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font: inherit; padding: 3px 0; resize: none; outline: none;
}
.campo::placeholder { color: var(--muted); opacity: .75; }
.campo.titulo { font-size: 16px; font-weight: 500; line-height: 1.4; }
.campo.menor { font-size: 13.5px; }
.campo:focus { border-bottom: 1.5px solid var(--rose); }

.linha-campo {
  display: flex; align-items: center; gap: 9px;
  border-top: 1px solid var(--line); padding-top: 9px; margin-top: 9px;
}
.linha-campo svg { width: 15px; height: 15px; flex: none; stroke: var(--muted); fill: none; stroke-width: 1.8; }

/* chips de categoria */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 2px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 5px 12px; border-radius: 999px; font: inherit; font-size: 12.5px;
  font-weight: 560; cursor: pointer; transition: all .15s;
}
.chip.on { background: var(--rose-fraco); border-color: transparent; color: var(--rose); }

/* ------------------------------------------------------------- canais */

.canais {
  display: flex; gap: 7px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 7px 13px; border-radius: 999px;
  font: inherit; font-size: 12.5px; font-weight: 580;
  cursor: pointer; user-select: none;
  transition: transform .1s, background .18s, color .18s, border-color .18s;
}
.pill:active { transform: scale(.94); }
.pill .tick { width: 13px; height: 13px; flex: none; stroke-width: 2.6; stroke: currentColor; fill: none;
  opacity: 0; transition: opacity .18s; }
.pill.on { background: var(--done-fraco); border-color: transparent; color: var(--done); }
.pill.on .tick { opacity: 1; }
.pill.etapa.on { background: var(--sunk); color: var(--ink); }

/* ------------------------------------------------------------- stories */

.stories { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--raio); box-shadow: var(--sombra); padding: 15px 16px; }

.pontos { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.ponto-story {
  aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--line);
  background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 620; cursor: pointer;
  display: grid; place-content: center;
  transition: transform .1s, background .2s, color .2s, border-color .2s;
}
.ponto-story:active { transform: scale(.88); }
.ponto-story.on { background: var(--terra); border-color: var(--terra); color: #fff; }
.ponto-story.atual { border-color: var(--terra); border-width: 2px; color: var(--terra); }

.detalhe-story { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.detalhe-story .cab {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-size: 11px; font-weight: 640; letter-spacing: .6px;
  text-transform: uppercase; color: var(--terra);
}
.detalhe-story .cab .nav-story { margin-left: auto; display: flex; gap: 4px; }
.detalhe-story .cab button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  display: grid; place-content: center; font-size: 13px;
}

.copiar {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  padding: 5px 10px; border-radius: 9px; font: inherit; font-size: 11.5px;
  font-weight: 580; cursor: pointer; flex: none;
}
.copiar:active { background: var(--sunk); }

/* ------------------------------------------------------------- ideias */

.nova-ideia {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--raio); box-shadow: var(--sombra); padding: 14px 15px;
  margin-bottom: 20px;
}
.ideia {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 11px;
}
.ideia.usada { opacity: .5; }
.ideia p { margin: 0; font-size: 14.5px; line-height: 1.45; flex: 1; }
.ideia .meta { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.ideia .lixo {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 2px; flex: none; font-size: 15px; line-height: 1;
}

.botao {
  width: 100%; border: 0; border-radius: 13px; padding: 13px;
  background: var(--rose); color: #fff; font: inherit; font-size: 15px;
  font-weight: 620; cursor: pointer; transition: transform .1s, opacity .2s;
}
.botao:active { transform: scale(.98); }
.botao:disabled { opacity: .45; }
.botao.fantasma { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* ------------------------------------------------------------- progresso */

.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.bloco {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--raio); box-shadow: var(--sombra); padding: 15px 16px;
}
.bloco b { display: block; font-size: 27px; font-weight: 660; letter-spacing: -1px; }
.bloco span { font-size: 12px; color: var(--muted); }

.barra-linha { margin-bottom: 15px; }
.barra-linha .cab {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13.5px; margin-bottom: 6px;
}
.barra-linha .cab em { font-style: normal; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.barra-linha .trilha { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.barra-linha .preenche { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.3,1); }

/* ------------------------------------------------------------- navegacao */

.setas { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.setas a, .setas button {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  width: 34px; height: 34px; border-radius: 11px; cursor: pointer;
  display: grid; place-content: center; text-decoration: none; flex: none;
}
.setas .voltar-hoje {
  width: auto; padding: 0 13px; font: inherit; font-size: 12.5px; font-weight: 580;
  color: var(--rose);
}

.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.aba {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 9px; text-decoration: none; color: var(--muted); font-size: 10.5px;
  font-weight: 560; transition: color .18s;
}
.aba svg { width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aba.on { color: var(--rose); }

/* ------------------------------------------------------------- entrar */

.tela-pin {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 30px 24px;
}
.tela-pin .marca { font-size: 30px; font-weight: 620; letter-spacing: -.8px; margin: 0 0 4px; }
.tela-pin .sub { color: var(--muted); font-size: 14px; margin: 0 0 34px; }
.bolinhas { display: flex; gap: 15px; margin-bottom: 34px; }
.bolinhas i {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--muted); transition: all .18s;
}
.bolinhas i.on { background: var(--rose); border-color: var(--rose); transform: scale(1.12); }
.teclado { display: grid; grid-template-columns: repeat(3, 74px); gap: 15px; }
.teclado button {
  height: 74px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 25px; font-weight: 480; cursor: pointer;
  transition: transform .09s, background .15s;
}
.teclado button:active { transform: scale(.9); background: var(--sunk); }
.teclado button.vazio { border: 0; background: transparent; cursor: default; }
.erro-pin { color: var(--rose); font-size: 13.5px; height: 20px; margin-bottom: 10px; }
.treme { animation: treme .4s; }
@keyframes treme {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(9px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}

/* ------------------------------------------------------------- diversos */

.aviso {
  position: fixed; left: 50%; bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 16px);
  transform: translate(-50%, 18px); z-index: 60;
  background: var(--ink); color: var(--bg);
  padding: 9px 17px; border-radius: 999px; font-size: 13px; font-weight: 540;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

.festa {
  text-align: center; padding: 22px 18px; margin-bottom: 22px;
  background: var(--done-fraco); border-radius: var(--raio);
}
.festa b { display: block; font-size: 17px; color: var(--done); margin-bottom: 3px; }
.festa span { font-size: 13.5px; color: var(--muted); }

.vazio-msg { text-align: center; color: var(--muted); font-size: 13.5px; padding: 26px 10px; }

.linha-ajuste {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 15px; margin-bottom: 9px;
}
.linha-ajuste div { flex: 1; }
.linha-ajuste b { display: block; font-size: 14.5px; font-weight: 580; }
.linha-ajuste small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; margin-top: 2px; }
.switch { width: 48px; height: 29px; border-radius: 999px; border: 0; flex: none;
  background: var(--line); cursor: pointer; position: relative; transition: background .22s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px;
  width: 23px; height: 23px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .22s; }
.switch.on { background: var(--done); }
.switch.on::after { transform: translateX(19px); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================================================== agenda */

.banner-push {
  display: flex; align-items: center; gap: 13px;
  background: var(--rose-fraco); border-radius: var(--raio);
  padding: 14px 15px; margin-bottom: 20px;
}
.banner-push b { display: block; font-size: 14.5px; font-weight: 600; color: var(--rose); }
.banner-push small { color: var(--muted); font-size: 12.5px; line-height: 1.45;
  display: block; margin-top: 2px; }
.banner-push div { flex: 1; }

.dia-agenda { margin-bottom: 22px; }
.dia-agenda h3 {
  margin: 0 2px 9px; font-size: 12px; font-weight: 660;
  letter-spacing: .9px; text-transform: uppercase; color: var(--muted);
}
.dia-agenda h3.hoje { color: var(--rose); }

.evento {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--rose);
  border-radius: 14px; padding: 13px 15px; margin-bottom: 8px;
  cursor: pointer; transition: transform .1s;
}
.evento:active { transform: scale(.99); }
.evento.c-sage  { border-left-color: var(--sage); }
.evento.c-terra { border-left-color: var(--terra); }

.evento .hora {
  font-size: 13.5px; font-weight: 640; color: var(--ink);
  font-variant-numeric: tabular-nums; min-width: 44px; padding-top: 1px;
}
.evento .corpo { flex: 1; min-width: 0; }
.evento .corpo b { display: block; font-size: 15px; font-weight: 560; line-height: 1.35; }
.evento .local, .evento .notas, .evento .avisos {
  display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px;
}
.evento .avisos { font-size: 11.5px; margin-top: 5px; }

/* botao flutuante */
.fab {
  position: fixed; right: 18px; z-index: 45;
  bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 18px);
  width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--rose); color: #fff; font-size: 30px; font-weight: 300;
  line-height: 1; cursor: pointer;
  box-shadow: 0 5px 18px rgba(176,82,107,.38);
  transition: transform .12s;
}
.fab:active { transform: scale(.9); }

/* folha que sobe de baixo */
.folha { position: fixed; inset: 0; z-index: 70; }
.folha-fundo {
  position: absolute; inset: 0; background: rgba(30,20,16,.42);
  opacity: 0; transition: opacity .25s;
}
.folha.on .folha-fundo { opacity: 1; }
.folha-corpo {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom) + 26px);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.85,.3,1);
}
.folha.on .folha-corpo { transform: translateY(0); }
.puxador {
  width: 38px; height: 4px; border-radius: 999px; background: var(--line);
  margin: 0 auto 14px;
}
.folha-corpo h2 { margin: 0 0 16px; font-size: 19px; font-weight: 620; letter-spacing: -.3px; }
.folha-corpo .campo.titulo { border-bottom: 1px solid var(--line); padding-bottom: 9px; }

.dupla { display: flex; gap: 11px; margin-top: 14px; }
.dupla label {
  flex: 1; font-size: 11px; font-weight: 620; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted);
  display: flex; flex-direction: column; gap: 5px;
}
.dupla input {
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
  text-transform: none; letter-spacing: 0; font-weight: 400;
}

.chip.cor-rose.on  { background: var(--rose-fraco);  color: var(--rose);  }
.chip.cor-sage.on  { background: var(--sage-fraco);  color: var(--sage);  }
.chip.cor-terra.on { background: var(--terra-fraco); color: var(--terra); }

/* com 5 abas o rotulo precisa de um pouco menos de corpo */
.aba { font-size: 9.5px; }
.aba svg { width: 20px; height: 20px; }

/* compromissos que aparecem dentro da tela do dia */
.evento.compacto { padding: 11px 14px; }
.evento.compacto .corpo b { font-size: 14px; }
