:root { --laranja: #C2410C; --laranja-esc: #9A3412; --verde: #1F7A4D; --verde-esc: #14532D; --texto: #1B1B1A; --cinza: #5F5D57; --linha: #E4E1DA; --fundo: #F4F2EE; --vermelho: #991B1B; --azul: #1E40AF; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.carregando { padding: 40px; text-align: center; color: var(--cinza); }
header.topo { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--linha); }
header.topo h1 { font-size: 17px; margin: 0; }
.net { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #E7F5EC; color: var(--verde-esc); }
.net.off { background: #FFEDD5; color: var(--laranja-esc); }
main { flex: 1; padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
nav.menu { position: fixed; bottom: 0; left: 0; right: 0; height: 64px; background: #fff; border-top: 1px solid var(--linha); display: flex; justify-content: center; z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
nav.menu .itens { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; max-width: 560px; }
nav.menu button { border: 0; background: none; font-size: 12px; color: var(--cinza); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; }
nav.menu button.sel { color: var(--laranja); font-weight: 600; }
nav.menu button.sel::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--laranja); }
.badge { position: absolute; top: 6px; margin-left: 26px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--laranja); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.card { background: #fff; border: 1px solid var(--linha); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.destaque { border: 2px solid var(--laranja); }
.titulo { font-size: 15px; font-weight: 600; margin: 0; }
.sub { font-size: 13px; color: var(--cinza); }
.linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn { min-height: 48px; border-radius: 12px; border: 1px solid #D6D2C9; background: #fff; padding: 0 14px; font-size: 15px; cursor: pointer; }
.btn.prim { background: var(--laranja); border-color: var(--laranja); color: #fff; font-weight: 600; }
.btn.ok { background: var(--verde); border-color: var(--verde); color: #fff; font-weight: 600; }
.btn.preto { background: var(--texto); border-color: var(--texto); color: #fff; font-weight: 600; }
.btn.perigo { color: var(--vermelho); border-color: #FCA5A5; }
.btn.peq { min-height: 38px; font-size: 13px; padding: 0 10px; }
.btn:disabled { opacity: .55; }
.pilulas { display: flex; flex-wrap: wrap; gap: 6px; }
.pilula { min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid #D6D2C9; background: #fff; font-size: 14px; }
.pilula.sel { border: 2px solid var(--laranja); background: #FFF7ED; color: var(--laranja-esc); font-weight: 600; }
label.campo { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; }
input.in, select.in, textarea.in { min-height: 48px; border: 1px solid #D6D2C9; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; width: 100%; }
textarea.in { padding: 10px 12px; min-height: 72px; }
.tag { font-size: 12px; font-weight: 500; padding: 3px 8px; border-radius: 999px; display: inline-block; }
.tag.verm { background: #FEE2E2; color: var(--vermelho); } .tag.verde { background: #DCFCE7; color: var(--verde-esc); } .tag.azul { background: #DBEAFE; color: var(--azul); } .tag.amar { background: #FEF3C7; color: #92400E; } .tag.roxo { background: #EDE9FE; color: #5B21B6; }
.lista > * + * { border-top: 1px solid #F0EDE7; }
.lista .item { padding: 10px 0; }
.alerta { background: #FEF3C7; border: 1px solid #F59E0B; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.vazio { text-align: center; color: var(--cinza); font-size: 14px; padding: 16px; }
.valor { font-size: 22px; font-weight: 600; }
.qtd { display: flex; align-items: center; gap: 10px; }
.qtd button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #D6D2C9; background: #fff; font-size: 20px; }
.qtd span { min-width: 28px; text-align: center; font-size: 20px; font-weight: 600; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #E8E5DE; padding: 4px; border-radius: 12px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--cinza); font-size: 14px; }
.seg button.sel { background: #fff; color: var(--texto); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
#aviso { position: fixed; left: 16px; right: 16px; bottom: 80px; max-width: 528px; margin: 0 auto; background: var(--texto); color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 14px; z-index: 20; }
#aviso.erro { background: var(--vermelho); }
.login { padding: 32px 20px; display: flex; flex-direction: column; gap: 16px; justify-content: center; min-height: 100vh; }
.logo { width: 64px; height: 64px; border-radius: 18px; background: var(--laranja); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto; }
.centro { text-align: center; }
a.mapa { color: var(--azul); font-size: 14px; }
