/* Escala das Cuidadoras. Visual aprovado (versão 2): sóbrio, colorido e grande. */
:root {
  --bg: #f3f0ea; --ink: #1b2430; --soft: #5b6472; --line: #e2dcd1; --card: #fff;
  --navy: #1d3557; --navy-bg: #e9eef6; --day: #f2a900; --day-ink: #3d2a00; --night: #34388f;
  --ok: #1e7d46; --ok-bg: #e4f3ea; --no: #b3261e; --no-bg: #fdecea; --warn: #8a4a00; --warn-bg: #fff3dc;
  --shadow: 0 1px 3px rgba(27, 36, 48, .18);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 18px; line-height: 1.3;
}
button, input, select { font: inherit; color: inherit; }
svg.i { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.top { background: var(--navy); color: #fff; padding: 18px 16px 16px; }
.top b { display: block; font-size: 25px; letter-spacing: -.01em; }
.top span { font-size: 17px; opacity: .92; }
main { flex: 1; padding: 14px 12px 120px; }
.vazio { color: var(--soft); text-align: center; padding: 40px 12px; }

/* cartões */
.card { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow); }
.band { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.band svg { font-size: 22px; }
.band.dia { background: var(--day); color: var(--day-ink); }
.band.noite { background: var(--night); color: #fff; }
.band .local { margin-left: auto; font-size: 17px; letter-spacing: 0; background: rgba(255,255,255,.85); color: var(--navy); border-radius: 6px; padding: 2px 9px; }
.in { padding: 12px 14px 14px; }
.in + .in { border-top: 2px solid var(--line); }
.metade { font-size: 17px; font-weight: 700; color: var(--soft); margin: 0 0 6px; }
.who { font-size: 30px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.h2 { font-size: 19px; font-weight: 800; margin: 6px 2px 10px; }
.txt { font-size: 17px; color: var(--soft); margin: 0 0 12px; }

/* botões: no mínimo 64px de altura */
.btns { display: flex; gap: 10px; }
.btns + .btns, .btn + .btn, .btns + .btn, .btn + .btns { margin-top: 10px; }
.btns > .btn, .semnav > .btn { margin-top: 0; }
.btn {
  flex: 1; min-height: 64px; border: 0; border-radius: 12px; font-size: 20px; font-weight: 800; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; text-align: center; text-decoration: none;
}
.btn svg { font-size: 24px; stroke-width: 3; }
.btn.ok { background: var(--ok); } .btn.no { background: var(--no); } .btn.navy { background: var(--navy); }
.btn.ghost { background: #fff; color: var(--ink); border: 2.5px solid var(--ink); }
.btn.small { min-height: 56px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: default; }
.full { width: 100%; }
.btn:focus-visible, .choice:focus-visible, .cell:focus-visible, .nav a:focus-visible, .tog:focus-visible { outline: 4px solid #ffbf47; outline-offset: 2px; }

.alert { display: flex; align-items: center; gap: 10px; background: var(--no-bg); color: var(--no); border-left: 7px solid var(--no); border-radius: 8px; padding: 11px 12px; font-size: 21px; font-weight: 800; margin-bottom: 12px; }
.alert svg { font-size: 26px; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-left-color: var(--warn); font-size: 18px; }
.alert.info { background: var(--navy-bg); color: var(--navy); border-left-color: var(--navy); font-size: 18px; }
.alert.small { font-size: 18px; }
.result { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; margin: 0 0 12px; overflow-wrap: anywhere; }
.result svg { font-size: 30px; stroke-width: 3; }
.result.ok { color: var(--ok); } .result.no { color: var(--no); } .result.navy { color: var(--navy); }

/* barra de baixo */
.nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; border-top: 1px solid var(--line); background: #fff; z-index: 5; }
.nav .wrap { display: flex; width: 100%; max-width: 520px; }
.nav a { flex: 1; text-align: center; padding: 10px 2px 11px; font-size: 16.5px; font-weight: 700; color: var(--soft); text-decoration: none; min-height: 64px; }
.nav svg { display: block; margin: 0 auto 3px; font-size: 27px; }
.nav a.on { color: var(--navy); box-shadow: inset 0 5px 0 var(--navy); }

/* desfazer (Semana) */
.desfazer { position: fixed; left: 0; right: 0; bottom: 78px; display: flex; justify-content: center; z-index: 6; padding: 0 12px; }
.desfazer .box { width: 100%; max-width: 496px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.desfazer .box span { flex: 1; font-size: 18px; font-weight: 700; }
.desfazer .btn { flex: none; background: #fff; color: var(--ink); min-width: 150px; }

/* avatares e cores das cuidadoras */
.av { width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.av.outra { background: #495057; } .av.filo { background: var(--navy); } .av.branco { background: #fff; color: var(--no); box-shadow: inset 0 0 0 3px var(--no); }

/* semana */
.semnav { display: flex; gap: 10px; margin-bottom: 14px; }
.drow { background: #fff; border-radius: 12px; padding: 10px 12px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.drow.hoje { box-shadow: inset 0 0 0 3px var(--navy), var(--shadow); }
.dname { font-size: 19px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.tag-hoje { font-size: 16px; background: var(--navy); color: #fff; border-radius: 6px; padding: 1px 7px; }
.cells { display: flex; gap: 8px; }
.cell {
  flex: 1; min-width: 0; min-height: 64px; border: 0; border-radius: 9px; padding: 8px; color: #fff; font-size: 18px; font-weight: 800;
  display: flex; flex-direction: column; justify-content: center; gap: 3px; text-align: left; cursor: pointer;
}
.cell:disabled { cursor: default; }
.cell .l { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cell .l span { overflow-wrap: anywhere; }
.cell svg { font-size: 19px; }
.cell .st { font-size: 16px; font-weight: 700; opacity: .95; display: flex; align-items: center; gap: 4px; }
.cell .st svg { font-size: 16px; stroke-width: 3; }
.cell.blank { background: var(--no-bg); color: var(--no); box-shadow: inset 0 0 0 2.5px var(--no); }
.cell.filo { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2.5px var(--navy); }
.cell.outra { background: #495057; }
.cell.split { padding: 6px 8px; }
.cell.split .l { font-size: 17px; }
.cell .meia { display: inline-block; min-width: 0; padding: 1px 6px; border-radius: 5px; margin: 1px 0; }
.cell .meia.blank { background: var(--no-bg); color: var(--no); box-shadow: inset 0 0 0 2px var(--no); }
.cell .meia.filo { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.cell.misto { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }

/* pagar / receber */
.sum { background: var(--navy); color: #fff; border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.sum small { display: block; font-size: 17px; opacity: .92; }
.sum b { display: block; font-size: 34px; letter-spacing: -.02em; margin: 2px 0 6px; }
.sum span { font-size: 17px; opacity: .92; }
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.head b { font-size: 24px; overflow-wrap: anywhere; }
.line { display: flex; justify-content: space-between; gap: 10px; font-size: 18px; padding: 5px 0; color: var(--soft); }
.line b { color: var(--ink); white-space: nowrap; }
.tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); margin-top: 6px; padding: 9px 0 12px; font-size: 18px; font-weight: 700; }
.tot b { font-size: 28px; letter-spacing: -.02em; }
.tag { display: flex; align-items: center; gap: 8px; border-radius: 9px; padding: 11px 12px; font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.tag svg { font-size: 23px; stroke-width: 3; }
.tag.paid { background: var(--ok-bg); color: var(--ok); }
.tag.join { background: var(--warn-bg); color: var(--warn); }
.tag.info { background: var(--navy-bg); color: var(--navy); }
.lista-pend { margin: -4px 0 14px; }
.lista-pend .lp { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 10px; padding: 6px 6px 6px 12px; margin-bottom: 8px; box-shadow: var(--shadow); font-weight: 700; }
.lista-pend .lp .btn { flex: none; min-width: 120px; }

/* escolhas grandes */
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; border-radius: 12px; border: 2.5px solid var(--line);
  background: #fff; color: var(--ink); font-size: 19px; font-weight: 800; padding: 8px 12px; margin-bottom: 10px; text-align: left; cursor: pointer;
}
.choice .dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--soft); flex: none; }
.choice.sel { border-color: var(--navy); background: var(--navy-bg); }
.choice.sel .dot { border-color: var(--navy); background: radial-gradient(var(--navy) 0 45%, #fff 50%); }
.choice .nm { flex: 1; min-width: 0; }
.choice .nm small { display: block; font-size: 17px; font-weight: 700; color: var(--soft); margin-top: 2px; }
.choice .nm small.bom { color: var(--ok); }
.choice .nm small.ruim { color: var(--warn); }
.choice:disabled { opacity: .55; cursor: default; }

/* camada por cima (escolher, recibo) */
.camada { position: fixed; inset: 0; background: var(--bg); z-index: 10; overflow-y: auto; }
.camada .app { min-height: 100%; }
.camada main { padding-bottom: 24px; }

/* meus dias */
.togs { display: flex; gap: 8px; }
.tog {
  flex: 1; min-height: 64px; border-radius: 10px; border: 2.5px solid var(--line); background: #fff; color: var(--ink); font-size: 18px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 6px;
}
.tog svg { font-size: 22px; }
.tog .t2 { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.tog .t2 small { font-size: 17px; font-weight: 700; }
.tog.sim { background: var(--navy); border-color: var(--navy); color: #fff; }
.tog:disabled { cursor: default; opacity: .75; }
.escalada { margin-top: 8px; font-size: 17px; font-weight: 700; color: var(--ok); display: flex; align-items: center; gap: 6px; }

/* formulários (só Helgga digita) */
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.campo input[type=text], .campo input[type=tel], .campo input[type=url], .campo select {
  width: 100%; min-height: 56px; border: 2px solid #8a93a0; border-radius: 10px; padding: 10px 12px; font-size: 18px; background: #fff;
}
.campo small { display: block; font-size: 16px; color: var(--soft); margin-top: 4px; }
.cores { display: flex; flex-wrap: wrap; gap: 10px; }
.cor { width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; }
.cor.sel { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink); }
.grade { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.grade td, .grade th { padding: 4px; font-size: 17px; text-align: left; }
.grade .tog { min-height: 52px; font-size: 17px; }
.fixo select { min-height: 52px; width: 100%; border: 2px solid #8a93a0; border-radius: 10px; font-size: 17px; background: #fff; padding: 6px; }
.link { word-break: break-all; font-size: 16px; background: var(--navy-bg); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.avisos { list-style: none; padding: 0; margin: 0; }
.avisos li { display: flex; gap: 8px; align-items: flex-start; font-size: 17px; padding: 5px 0; color: var(--warn); font-weight: 700; }
.avisos li svg { font-size: 20px; margin-top: 1px; }
.recibo-img { width: 100%; height: auto; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 14px; background: #fff; }
.muda { font-size: 15px; font-weight: 800; background: var(--warn-bg); color: var(--warn); border-radius: 5px; padding: 0 5px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* adiantamento */
.line.desc b { color: var(--no); }
.txt.nota { font-size: 17px; color: var(--warn); font-weight: 700; margin: 2px 0 8px; }
.metade.adi-tit { font-weight: 800; margin: 14px 0 4px; }
.adi { border-top: 2px solid var(--line); padding-top: 6px; margin-bottom: 10px; }
.valores { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.valores .btn { margin: 0; min-height: 72px; font-size: 26px; }
.visor { background: #fff; border: 3px solid var(--navy); border-radius: 12px; font-size: 40px; font-weight: 800; text-align: right; padding: 10px 16px; margin-bottom: 12px; letter-spacing: -.02em; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.tecla {
  min-height: 68px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink);
  font-size: 30px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px;
}
.tecla.apagar { font-size: 17px; flex-direction: column; gap: 0; }
.tecla svg { font-size: 22px; stroke-width: 3; }
.tecla:focus-visible { outline: 4px solid #ffbf47; outline-offset: 2px; }
.tecla:active { background: var(--navy-bg); }

/* Entrar (nome + senha) e formulários que a cuidadora preenche: letra e campo grandes */
.campo input[type=password], .campo textarea {
  width: 100%; min-height: 56px; border: 2px solid #8a93a0; border-radius: 10px; padding: 10px 12px; font-size: 18px; background: #fff; font-family: inherit;
}
.campo.grande { margin-bottom: 18px; }
.campo.grande > span { font-size: 21px; font-weight: 800; }
.campo.grande input, .campo.grande textarea { min-height: 68px; font-size: 24px; border: 3px solid var(--navy); border-radius: 12px; padding: 12px 14px; }
.campo.grande textarea { min-height: 120px; line-height: 1.3; resize: vertical; }
.campo.grande input:focus, .campo.grande textarea:focus { outline: 4px solid #ffbf47; outline-offset: 2px; }
.campo.grande small { font-size: 17px; }
.entrar { margin-top: 6px; }
.entrar .btn { min-height: 68px; font-size: 24px; margin-bottom: 18px; }
/* Sair discreto (Gestão e cuidadoras) */
.sair-wrap { display: flex; justify-content: center; margin-top: 26px; }
.sair { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; background: none; border: 0; color: var(--muted, #5b6472); font: inherit; font-size: 17px; text-decoration: underline; cursor: pointer; }
.sair svg { width: 20px; height: 20px; }

/* "Salvando…": o botão reage na hora do toque, até o servidor confirmar */
.salvando { opacity: .8; cursor: progress; }
.btn.salvando { pointer-events: none; }
.giro { width: 22px; height: 22px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: giro .8s linear infinite; flex: none; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .giro { animation: none; border-right-color: currentColor; opacity: .6; } }
.salv { display: block; font-size: 17px; font-weight: 700; }

/* Escala da cuidadora: um cartão grande por dia, com a cor do turno */
.h2.grande { font-size: 22px; margin: 18px 0 10px; }
.band.ambos { background: var(--night); color: #fff; box-shadow: inset 14px 0 0 var(--day); padding-left: 26px; }
.turno-grande { font-size: 26px; font-weight: 800; margin: 2px 0 6px; letter-spacing: -.01em; }
.turno-grande.dia { color: #7a5200; }
.turno-grande.noite, .turno-grande.ambos { color: var(--night); }
.card.plantao.passou { opacity: .62; }
.txt.forte { font-size: 20px; font-weight: 800; color: var(--ink); }

/* Extrato plantão por plantão */
.ex-dia { border-top: 2px solid var(--line); padding: 8px 0 4px; }
.ex-dia:first-of-type { border-top: 0; }
.ex-data { font-size: 19px; font-weight: 800; color: var(--navy); margin: 0 0 2px; }
.ex-item { color: var(--ink); }
.ex-transp { font-size: 17px; }

/* Dados pessoais */
.card.destaque { border: 4px solid var(--navy); background: var(--navy-bg); }
.campo small.erro { color: var(--no); font-weight: 700; }
.campo small.erro:empty { display: none; }
.btn.grande { min-height: 68px; font-size: 24px; }
.sair-wrap { flex-wrap: wrap; gap: 4px 18px; }
