/* PWA: banner de instalação + ajustes do app instalado (não altera o layout existente). */
html{-webkit-tap-highlight-color:transparent}
html.standalone,html.standalone body{overscroll-behavior-y:none}
.pwa-banner{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 12px;background:#FFFFFF;color:var(--ink,#111827);border:1px solid var(--line-2,#E5D9D9);border-radius:18px;box-shadow:0 10px 30px rgba(26,18,18,.16);max-width:460px;margin:0 auto;animation:pwa-in .28s ease-out}
.pwa-banner[hidden]{display:none!important}
@keyframes pwa-in{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}
.pwa-banner img{width:46px;height:46px;border-radius:12px;flex:none;border:1px solid var(--line,#EFE6E6)}
.pwa-banner .pwa-txt{flex:1;min-width:0;line-height:1.3}
.pwa-banner .pwa-txt b{display:block;font-size:14px;font-weight:600}
.pwa-banner .pwa-txt span{display:block;font-size:12.5px;color:var(--muted,#7D6E6E);margin-top:2px}
.pwa-banner .pwa-share{display:inline-block;width:15px;height:15px;vertical-align:-2px;margin:0 2px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:#007AFF}
.pwa-banner .pwa-install{flex:none;height:38px;padding:0 16px;border-radius:11px;background:var(--primary,#111827);color:var(--on-primary,#fff);font-weight:600;font-size:13.5px;box-shadow:0 4px 12px rgba(26,18,18,.18)}
.pwa-banner .pwa-close{flex:none;width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--muted,#7D6E6E)}
.pwa-banner .pwa-close svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
@media (max-width:860px){body.pwa-has-tabbar .pwa-banner{bottom:calc(78px + env(safe-area-inset-bottom))}}
@media (min-width:861px){.pwa-banner{left:auto;right:24px;bottom:24px;width:400px}}
/* Configurações */
.set-wrap{max-width:640px}
.set-profile{display:flex;align-items:center;gap:14px;padding:18px}
.set-profile strong{display:block;font-size:17px;font-weight:650;letter-spacing:-.01em}
.set-profile span{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.set-h{margin:22px 4px 8px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.set-list{padding:2px 0;overflow:hidden}
.set-row{display:flex;align-items:center;gap:12px;width:100%;min-height:52px;padding:10px 16px;text-align:left;border-top:1px solid var(--line)}
.set-list>.set-row:first-child{border-top:0}
button.set-row:active{background:var(--blush-2)}
.set-ico{width:32px;height:32px;border-radius:10px;background:var(--blush);display:flex;align-items:center;justify-content:center;flex:none;color:var(--ink)}
.set-ico svg.i{width:17px;height:17px}
.set-label{flex:1;font-weight:500;font-size:14.5px}
.set-val{color:var(--muted);font-size:14px;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%}
.set-row.muted .set-label{color:var(--muted)}
.set-chev svg{width:18px;height:18px;stroke:var(--muted);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;display:block}
.set-logout{margin-top:26px;background:#fff;color:var(--rose-ink);border:1px solid var(--line-2);box-shadow:var(--shadow)}
.set-logout:active{background:var(--rose-bg)}
.set-foot{text-align:center;color:var(--muted);font-size:12px;margin:14px 0 8px}
/* diálogo de confirmação */
.cfm-back{position:fixed;inset:0;z-index:80;background:rgba(26,18,18,.38);display:flex;align-items:center;justify-content:center;padding:24px;animation:cfm-fade .18s ease-out}
.cfm{width:100%;max-width:340px;background:#fff;border-radius:22px;padding:24px 20px 18px;text-align:center;box-shadow:var(--shadow-lg);animation:pwa-in .22s ease-out}
.cfm-ico{width:52px;height:52px;margin:0 auto 12px;border-radius:50%;background:var(--rose-bg);color:var(--rose-ink);display:flex;align-items:center;justify-content:center}
.cfm-ico svg.i{width:24px;height:24px}
.cfm h2{margin:0 0 6px;font-size:19px;font-weight:700;letter-spacing:-.01em}
.cfm p{margin:0 0 18px;color:var(--muted);font-size:14px;line-height:1.45}
.cfm-actions{display:flex;gap:10px}.cfm-actions .btn{flex:1;height:46px;font-size:15px}
.cfm-actions .btn-ghost{background:var(--blush-2);color:var(--ink)}
.btn-danger{background:var(--rose-ink);color:#fff;box-shadow:0 6px 16px rgba(185,70,60,.25)}
@keyframes cfm-fade{from{opacity:0}to{opacity:1}}
@media (max-width:860px){.tabbar button span{font-size:10.5px}}
/* Tutorial de instalação no iPhone */
.it-back{position:fixed;inset:0;z-index:90;background:rgba(26,18,18,.42);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);display:flex;flex-direction:column;align-items:center;padding:calc(14px + env(safe-area-inset-top)) 14px 0;animation:cfm-fade .2s ease-out}
.it-back[hidden]{display:none!important}
.it-card{width:100%;max-width:420px;max-height:calc(100dvh - 118px - env(safe-area-inset-top));overflow:auto;-webkit-overflow-scrolling:touch;background:#FFFFFF;border-radius:24px;padding:18px 16px 14px;box-shadow:0 18px 40px rgba(26,18,18,.22);animation:pwa-in .26s ease-out}
.it-head{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.it-head img{width:52px;height:52px;border-radius:13px;border:1px solid var(--line,#EFE6E6);flex:none}
.it-head h2{margin:0;font-size:18px;font-weight:700;letter-spacing:-.01em}
.it-head p{margin:3px 0 0;font-size:13px;color:var(--muted,#7D6E6E);line-height:1.4}
.it-ic{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.it-warn{background:var(--amber-bg,#FFF2D9);color:var(--amber-ink,#8A5B00);border-radius:14px;padding:12px;margin-bottom:12px;font-size:13px;line-height:1.4}
.it-warn b{display:flex;align-items:center;gap:6px;font-size:14px;margin-bottom:2px}
.it-warn span{display:block}
.it-copy{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:40px;border-radius:11px;background:#fff;color:var(--ink,#111827);font-weight:600;font-size:14px;border:1px solid rgba(138,91,0,.25)}
.it-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.it-step{display:grid;grid-template-columns:28px 1fr;grid-template-rows:auto auto;column-gap:10px;row-gap:8px;padding:12px;border-radius:16px;background:var(--bg,#F6F7F9);border:1px solid var(--line,#EFE6E6)}
.it-num{grid-row:1;width:26px;height:26px;border-radius:50%;background:var(--ink,#111827);color:#fff;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center}
.it-tx{grid-row:1;line-height:1.35}
.it-t{display:block;font-weight:500;font-size:14.5px}.it-t b{font-weight:700}
.it-tx small{display:block;color:var(--muted,#7D6E6E);font-size:12.5px;margin-top:2px}
.it-ill{grid-column:1/-1;border-radius:12px;background:#fff;border:1px solid var(--line-2,#E5D9D9);padding:10px;display:flex;justify-content:center}
.it-hot{color:#007AFF;position:relative}
.it-bar{display:flex;align-items:center;justify-content:space-around;width:100%;max-width:300px;color:#8E8E93}
.it-bar .it-ic{width:22px;height:22px}
.it-bar .it-hot{display:flex;padding:6px;border-radius:10px;background:rgba(0,122,255,.1);box-shadow:0 0 0 2px rgba(0,122,255,.35);animation:it-pulse 1.6s ease-in-out infinite}
.it-ill-sheet{flex-direction:column;gap:6px;align-items:stretch}
.it-row{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border-radius:10px;background:#F2F2F7;font-size:13.5px}
.it-row.it-dim{color:#8E8E93}
.it-row.it-hot{color:#111827;font-weight:600;background:#fff;box-shadow:0 0 0 2px rgba(0,122,255,.45);animation:it-pulse 1.6s ease-in-out infinite}
.it-ill-add{flex-direction:column;gap:10px}
.it-top{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#8E8E93}
.it-top i{font-style:normal;color:#007AFF}.it-top em{font-style:normal;font-weight:600;color:#111827}
.it-top b{padding:3px 8px;border-radius:8px;background:rgba(0,122,255,.1);box-shadow:0 0 0 2px rgba(0,122,255,.35);animation:it-pulse 1.6s ease-in-out infinite}
.it-prev{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500}
.it-prev img{width:40px;height:40px;border-radius:10px}
.it-ill-home{background:linear-gradient(160deg,#E9D8D8,#CDB7C2)}
.it-grid{display:grid;grid-template-columns:repeat(4,44px);gap:10px 14px;padding:4px}
.it-grid i{width:44px;height:44px;border-radius:11px;background:rgba(255,255,255,.45)}
.it-app{display:flex;flex-direction:column;align-items:center;gap:3px}
.it-app img{width:44px;height:44px;border-radius:11px;box-shadow:0 0 0 2px #fff,0 4px 12px rgba(26,18,18,.25);animation:it-pulse 1.6s ease-in-out infinite}
.it-app small{font-size:10px;color:#111827;font-weight:600}
.it-acts{display:flex;flex-direction:column;gap:6px;margin-top:14px}
.it-ok{height:48px;border-radius:12px;background:var(--primary,#111827);color:#fff;font-weight:600;font-size:15px}
.it-never{height:40px;color:var(--muted,#7D6E6E);font-weight:600;font-size:13.5px}
.it-arrow{position:fixed;left:50%;bottom:calc(6px + env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;color:#fff;pointer-events:none;animation:it-bounce 1.1s ease-in-out infinite}
.it-arrow[hidden]{display:none!important}
.it-arrow span{background:#007AFF;color:#fff;font-size:12.5px;font-weight:600;padding:5px 10px;border-radius:999px;box-shadow:0 4px 12px rgba(0,0,0,.25);white-space:nowrap}
.it-arrow-svg{width:30px;height:44px;stroke:#fff;fill:none;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 4px rgba(0,0,0,.35))}
@keyframes it-bounce{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,8px)}}
@keyframes it-pulse{0%,100%{box-shadow:0 0 0 2px rgba(0,122,255,.35)}50%{box-shadow:0 0 0 5px rgba(0,122,255,.18)}}
@media (min-width:861px){.it-back{justify-content:center;padding-bottom:20px}.it-arrow{display:none}}
@media (prefers-reduced-motion:reduce){.it-arrow,.it-hot,.it-row.it-hot,.it-app img{animation:none}}
