@font-face { font-family: "MontEB"; src: url("fonts/Montserrat-ExtraBold.ttf"); font-display: swap; }
@font-face { font-family: "MontB"; src: url("fonts/Montserrat-Bold.ttf"); font-display: swap; }
@font-face { font-family: "Lufga"; src: url("fonts/Lufga-Regular.otf"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lufga"; src: url("fonts/Lufga-Bold.otf"); font-weight: 700; font-display: swap; }
:root { --fundo: #00002A; --azul: #000060; --amarelo: #FDC500; --texto2: #A9ACE6; --texto3: #6E72BC; --card: rgba(255,255,255,.06);
  --borda: rgba(255,255,255,.09); --topo: env(safe-area-inset-top); --pe: env(safe-area-inset-bottom); }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { background: var(--fundo); color: #fff; font-family: "Lufga", -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; background: radial-gradient(700px 500px at 0% -10%, rgba(30,30,170,.5), transparent 60%), var(--fundo); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }

/* entrada */
.entrar { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 30px; text-align: center; }
.entrar img { width: 88px; height: 88px; border-radius: 24px; }
.entrar h1 { font-family: "MontEB"; font-size: 30px; letter-spacing: -.03em; }
.entrar p { color: var(--texto2); line-height: 1.5; max-width: 320px; }
.bt { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--amarelo); color: #00002A; font-family: "MontB"; font-size: 14px; letter-spacing: .02em; }
.bt.sec { background: rgba(255,255,255,.09); color: #fff; }
.bt.peq { min-height: 38px; padding: 0 16px; font-size: 12px; }
.bt:active { transform: scale(.97); }

/* topo */
.topo { position: sticky; top: 0; z-index: 10; padding: calc(var(--topo) + 14px) 18px 12px; background: rgba(0,0,42,.85); backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--borda); }
.topo h1 { font-family: "MontEB"; font-size: 22px; letter-spacing: -.03em; flex: 1; }
.topo small { display: block; font-family: "Lufga"; font-size: 12px; color: var(--texto2); letter-spacing: 0; font-weight: 400; }
.ib { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; position: relative; }
.ib svg { width: 21px; height: 21px; }
.ib b { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: #FF5A4E; font: 700 11px/18px "Lufga"; padding: 0 4px; }
.av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #FDC500, #FFB000); color: #00002A; font-family: "MontEB"; display: grid; place-items: center; overflow: hidden; }
.av svg { width: 100%; height: 100%; }

/* abas e filtros */
.abas { display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px 4px; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba { flex: none; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--texto2); font-size: 13px; }
.aba.on { background: var(--amarelo); color: #00002A; font-weight: 700; }
.aba b { margin-left: 5px; opacity: .8; }

/* lista */
.lista { padding: 10px 14px calc(var(--pe) + 90px); display: grid; gap: 10px; }
.cartao { text-align: left; width: 100%; padding: 14px 15px; border-radius: 22px 6px 22px 6px; background: var(--card); border: 1px solid var(--borda); display: grid; gap: 6px; }
.cartao:active { background: rgba(255,255,255,.1); }
.cartao h3 { font-family: "MontB"; font-size: 15px; line-height: 1.3; letter-spacing: -.01em; }
.meta { color: var(--texto2); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.1); }
.selo { font-family: "MontB"; font-size: 10px; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.14); }
.selo.nova { background: var(--amarelo); color: #00002A; } .selo.ajuste { background: #FF7A45; } .selo.atraso { background: #FF5A4E; }
.selo.ok { background: rgba(61,220,151,.25); color: #3DDC97; } .selo.rev { background: rgba(253,197,0,.2); color: var(--amarelo); }
.thumbs { display: flex; gap: 6px; margin-top: 2px; }
.thumbs img { width: 58px; height: 74px; object-fit: cover; object-position: top; border-radius: 8px; background: rgba(0,0,0,.3); }
.vazio { text-align: center; color: var(--texto2); padding: 50px 20px; line-height: 1.5; }
.carregando { height: 92px; border-radius: 22px 6px 22px 6px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: brilho 1.2s infinite; }
@keyframes brilho { to { background-position: -200% 0; } }

/* folha (detalhe que sobe de baixo) */
.folha { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,20,.55); display: flex; align-items: flex-end; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.folha-caixa { width: 100%; max-height: 92dvh; overflow-y: auto; background: linear-gradient(180deg, #0D0D66, #06064A); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(var(--pe) + 22px); animation: sobe .28s cubic-bezier(.2,.8,.2,1); -webkit-overflow-scrolling: touch; }
@keyframes sobe { from { transform: translateY(40%); } }
.puxador { width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 0 auto 14px; }
.folha h2 { font-family: "MontEB"; font-size: 21px; letter-spacing: -.03em; line-height: 1.2; }
.secao { margin-top: 18px; }
.secao h4 { font-family: "MontB"; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--texto3); margin-bottom: 8px; }
.desc { white-space: pre-wrap; line-height: 1.5; font-size: 14px; color: #E4E5FA; word-break: break-word; }
.desc a { color: var(--amarelo); }
.previas { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.previas img { height: 300px; border-radius: 12px; scroll-snap-align: start; background: rgba(0,0,0,.3); }
.ajuste { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.06); display: grid; gap: 6px; margin-bottom: 8px; }
.ajuste.ok { opacity: .55; }
.ajuste .lin { display: flex; gap: 10px; align-items: flex-start; }
.ajuste .tc { font-family: "MontB"; font-size: 12px; color: var(--amarelo); flex: none; min-width: 48px; }
.ajuste .tx { flex: 1; font-size: 14px; line-height: 1.4; }
.ajuste .ck { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); color: transparent; font-size: 14px; }
.ajuste .ck.on { background: #3DDC97; border-color: #3DDC97; color: #00002A; }
.resp { font-size: 13px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.06); }
.resp b { color: var(--amarelo); margin-right: 4px; }
.coment { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.05); margin-bottom: 8px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.coment.meu { background: rgba(253,197,0,.08); }
.coment small { display: block; color: var(--texto3); font-size: 11.5px; margin-bottom: 3px; }
.campo { width: 100%; border-radius: 14px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,30,.5); color: #fff; padding: 12px; font-size: 16px; outline: none; resize: vertical; }
.campo:focus { border-color: var(--amarelo); }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acoes .bt { flex: 1; }

/* barra inferior */
.barra-pe { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around; padding: 8px 10px calc(var(--pe) + 8px);
  background: rgba(0,0,42,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--borda); }
.barra-pe button { display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--texto3); padding: 4px 12px; }
.barra-pe button.on { color: var(--amarelo); }
.barra-pe svg { width: 23px; height: 23px; }

/* semana */
.dia { margin-bottom: 14px; }
.dia h5 { font-family: "MontB"; font-size: 13px; display: flex; justify-content: space-between; margin-bottom: 6px; }
.dia h5 span { color: var(--texto3); font-weight: 400; font-family: "Lufga"; }
.carga { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 8px; }
.carga i { display: block; height: 100%; background: #3DDC97; } .carga i.media { background: var(--amarelo); } .carga i.alta { background: #FF5A4E; }

/* avisos */
.aviso { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--card); margin-bottom: 8px; text-align: left; width: 100%; }
.aviso.novo { background: rgba(253,197,0,.08); }
.aviso i { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: rgba(255,255,255,.1); }
.aviso span { display: grid; gap: 2px; font-size: 13.5px; } .aviso small { color: var(--texto2); } .aviso em { font-style: normal; font-size: 11.5px; color: var(--texto3); }

.snack { position: fixed; left: 50%; bottom: calc(var(--pe) + 84px); transform: translate(-50%, 30px); opacity: 0; z-index: 40; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px; background: #FDC500; color: #00002A; font-weight: 700; font-size: 14px; transition: .25s; pointer-events: none; text-align: center; }
.snack.on { opacity: 1; transform: translate(-50%, 0); } .snack.erro { background: #FF5A4E; color: #fff; }

/* tutorial de instalação */
.tuto { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,20,.7); display: flex; align-items: flex-end; animation: fade .25s; }
.tuto-caixa { width: 100%; background: linear-gradient(180deg, #0D0D66, #06064A); border-radius: 26px 26px 0 0; padding: 10px 20px calc(var(--pe) + 70px); animation: sobe .3s cubic-bezier(.2,.8,.2,1); }
.tuto h2 { font-family: "MontEB"; font-size: 22px; letter-spacing: -.03em; }
.tuto p { color: var(--texto2); margin: 6px 0 16px; line-height: 1.45; }
.tuto ol { list-style: none; display: grid; gap: 10px; margin-bottom: 18px; }
.tuto li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); opacity: 0; animation: entra .4s forwards; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tuto .n { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--amarelo); color: #00002A; font: 800 13px/24px "MontEB"; text-align: center; }
.tuto .ic { width: 40px; height: 40px; flex: none; border-radius: 11px; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #4DA3FF; font-size: 20px; overflow: hidden; }
.tuto .ic svg { width: 22px; height: 22px; } .tuto .ic img { width: 100%; height: 100%; }
.tuto .t { display: block; font-weight: 400; font-size: 14.5px; } .tuto .t b { font-weight: 700; }
.tuto small { color: var(--texto2); font-size: 12.5px; }
.tuto-seta { position: fixed; left: 50%; bottom: calc(var(--pe) + 8px); transform: translateX(-50%); color: var(--amarelo); font-size: 34px; font-weight: 800; animation: pula 1s infinite; }
@keyframes pula { 50% { transform: translate(-50%, 8px); } }

/* cara de app: sem zoom por toque duplo, sem seleção acidental, sem "elástico" da página */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior-y: none; }
input, textarea, .desc, .coment, .resp { -webkit-user-select: text; user-select: text; }
a, button { -webkit-touch-callout: none; }
img { -webkit-user-drag: none; }
