/* Versão celular: mesma paleta da versão completa (matiz --h / intensidade --s), sem menus no topo. */
:root{
  --h:165; --s:52%;
  --bg:hsl(var(--h) 22% 96.5%); --surface:hsl(var(--h) 30% 99.5%); --surface-2:hsl(var(--h) 20% 92.5%);
  --line:hsl(var(--h) 14% 86%); --line-2:hsl(var(--h) 16% 91%);
  --fg:hsl(var(--h) 28% 11%); --muted:hsl(var(--h) 9% 38%);
  --accent:hsl(var(--h) var(--s) 31%); --accent-fg:hsl(var(--h) 40% 98%); --accent-soft:hsl(var(--h) var(--s) 91%);
  --hero:hsl(var(--h) 32% 13%); --hero-fg:hsl(var(--h) 14% 86%); --hero-dim:hsl(var(--h) 12% 70%); --hero-line:hsl(var(--h) 22% 24%);
  --pos:hsl(152 58% 29%); --neg:hsl(356 62% 45%); --warn:hsl(34 88% 33%);
  --t-neg:hsl(356 70% 93%); --t-pos:hsl(152 45% 91%); --t-blue:hsl(215 55% 92%); --t-warn:hsl(34 70% 90%); --t-gray:hsl(220 12% 91%);
  --c-blue:hsl(215 55% 36%); --c-gray:hsl(220 15% 32%);
  --f-display:"Bricolage Grotesque","Segoe UI",system-ui,sans-serif;
  --f-body:"IBM Plex Sans","Segoe UI",system-ui,sans-serif;
  --f-num:"IBM Plex Mono",ui-monospace,Consolas,monospace;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:hsl(var(--h) 18% 7.5%); --surface:hsl(var(--h) 16% 11%); --surface-2:hsl(var(--h) 14% 16%);
  --line:hsl(var(--h) 12% 22%); --line-2:hsl(var(--h) 12% 17%); --fg:hsl(var(--h) 15% 92%); --muted:hsl(var(--h) 8% 66%);
  --accent:hsl(var(--h) var(--s) 58%); --accent-fg:hsl(var(--h) 30% 8%); --accent-soft:hsl(var(--h) 30% 18%);
  --hero:hsl(var(--h) 26% 14%); --hero-line:hsl(var(--h) 18% 24%);
  --pos:hsl(150 50% 58%); --neg:hsl(356 78% 70%); --warn:hsl(38 85% 62%);
  --t-neg:hsl(356 35% 20%); --t-pos:hsl(152 30% 18%); --t-blue:hsl(215 30% 20%); --t-warn:hsl(34 35% 19%); --t-gray:hsl(220 10% 20%);
  --c-blue:hsl(215 70% 72%); --c-gray:hsl(220 12% 78%);
  color-scheme:dark;
}}
:root[data-theme="dark"]{
  --bg:hsl(var(--h) 18% 7.5%); --surface:hsl(var(--h) 16% 11%); --surface-2:hsl(var(--h) 14% 16%);
  --line:hsl(var(--h) 12% 22%); --line-2:hsl(var(--h) 12% 17%); --fg:hsl(var(--h) 15% 92%); --muted:hsl(var(--h) 8% 66%);
  --accent:hsl(var(--h) var(--s) 58%); --accent-fg:hsl(var(--h) 30% 8%); --accent-soft:hsl(var(--h) 30% 18%);
  --hero:hsl(var(--h) 26% 14%); --hero-line:hsl(var(--h) 18% 24%);
  --pos:hsl(150 50% 58%); --neg:hsl(356 78% 70%); --warn:hsl(38 85% 62%);
  --t-neg:hsl(356 35% 20%); --t-pos:hsl(152 30% 18%); --t-blue:hsl(215 30% 20%); --t-warn:hsl(34 35% 19%); --t-gray:hsl(220 10% 20%);
  --c-blue:hsl(215 70% 72%); --c-gray:hsl(220 12% 78%);
  color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg)}
body{font:15px/1.45 var(--f-body);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit;color:inherit}
.num{font-family:var(--f-num);font-variant-numeric:tabular-nums;white-space:nowrap}
.pos{color:var(--pos)}.neg{color:var(--neg)}.warn{color:var(--warn)}
.m-app{min-height:100%;display:flex;flex-direction:column;max-width:560px;margin:0 auto}
.m-main{flex:1 1 auto;display:flex;flex-direction:column;gap:20px;padding:calc(env(safe-area-inset-top) + 24px) 20px 24px}
.m-head{display:flex;flex-direction:column;gap:2px}
.m-eyebrow{font-size:13px;font-weight:500;color:var(--muted)}
.m-head h1,.m-auth h1,.m-ok h1{margin:0;font:700 28px/1.15 var(--f-display);letter-spacing:-.01em}
h2{margin:0;font:700 18px/1.2 var(--f-display)}
.m-toast{padding:12px 14px;border-radius:12px;background:var(--accent-soft);color:var(--fg);font-weight:500}
.m-toast.err{background:var(--t-neg);color:var(--neg)}
/* resumo */
.m-hero{display:flex;flex-direction:column;gap:14px;padding:20px;border-radius:20px;background:var(--hero);color:var(--hero-fg)}
.m-hero-l{font-size:12.5px;color:var(--hero-dim)}
.m-hero-v{font-size:31px;font-weight:500;color:#f4fbf9}
.m-hero .num{color:#f4fbf9}.m-hero .neg-l{color:hsl(356 90% 78%)}
.m-hero-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:14px;border-top:1px solid var(--hero-line)}
/* atalhos */
.m-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.m-tile{display:flex;flex-direction:column;gap:10px;min-height:112px;padding:16px;border-radius:16px;border:1px solid var(--line);background:var(--surface)}
.m-tile:active{background:var(--surface-2)}
.m-tile b{display:block;font-size:15.5px;font-weight:600;line-height:1.25}
.m-tile small{display:block;font-size:13px;color:var(--muted)}
.m-ico{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px}
.t-neg{background:var(--t-neg);color:var(--neg)}.t-pos{background:var(--t-pos);color:var(--pos)}
.t-blue{background:var(--t-blue);color:var(--c-blue)}.t-warn{background:var(--t-warn);color:var(--warn)}
.t-gray{background:var(--t-gray);color:var(--c-gray)}.t-acc{background:var(--accent-soft);color:var(--accent)}
/* listas */
.m-sec{display:flex;flex-direction:column;gap:10px}
.m-list{display:flex;flex-direction:column;border-radius:16px;border:1px solid var(--line);background:var(--surface);overflow:hidden}
.m-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line-2);min-height:56px}
.m-row:last-child{border-bottom:0}
.m-row-t{display:flex;flex-direction:column;min-width:0}
.m-row-t b{font-weight:500;overflow-wrap:anywhere}
.m-row-t small{font-size:13px;color:var(--muted)}
.m-row-r{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.m-total{background:var(--surface-2)}
.m-card{display:flex;flex-direction:column;gap:8px;padding:16px;border-radius:16px;border:1px solid var(--line);background:var(--surface)}
.m-card small{color:var(--muted);font-size:13px}
.m-kv>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.m-kv span{color:var(--muted)}
.m-vazio{color:var(--muted)}
.m-nota{margin:0;font-size:13.5px;color:var(--muted)}
.m-links{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
.m-links a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:22px;border:1px solid var(--line);background:var(--surface);font-size:14px;font-weight:500;color:var(--muted)}
/* faturas */
.m-fat{gap:10px}
.m-fat-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.m-fat-top b{display:block;font-size:16px;font-weight:600}
.m-fat-top .big{font-size:17px;font-weight:500}
.m-fat-pend{font-size:13.5px;color:var(--warn);padding-top:8px;border-top:1px solid var(--line-2)}
.m-fat-pend.neg{color:var(--neg)}
.m-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px;color:var(--muted)}
.m-seg{display:flex;padding:3px;border-radius:12px;background:var(--surface-2)}
.m-seg a{min-height:38px;display:flex;align-items:center;padding:0 14px;border-radius:10px;font-weight:500;font-size:14px;color:var(--muted)}
.m-seg a.on{background:var(--surface);color:var(--fg);box-shadow:0 1px 2px hsl(0 0% 0%/.08)}
.m-busca{display:flex;align-items:center;gap:8px;color:var(--muted)}
/* formulário */
.m-form{display:flex;flex-direction:column;gap:20px}
.m-fs{display:flex;flex-direction:column;gap:8px;border:0;margin:0;padding:0;min-width:0}
.m-lbl{font-size:13px;font-weight:500;color:var(--muted);padding:0}
.m-valor{display:flex;flex-direction:column;gap:4px;padding:18px 20px;border-radius:18px;border:1px solid var(--line);background:var(--surface)}
.m-valor input{width:100%;border:0;background:transparent;font-size:40px;font-weight:500;outline:none;padding:0}
.m-valor input::placeholder{color:var(--line)}
.m-valor:focus-within{border-color:var(--accent)}
.m-chips{display:flex;flex-wrap:wrap;gap:8px}
.m-chip{position:relative}
.m-chip input{position:absolute;opacity:0;inset:0;margin:0}
.m-chip span{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:22px;border:1px solid var(--line);background:var(--surface);font-weight:500;font-size:14px;white-space:nowrap}
.m-chip input:checked+span{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}
.m-chip input:focus-visible+span{outline:2px solid var(--accent);outline-offset:2px}
.m-field{width:100%;min-height:48px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface);font-size:16px}
.m-field:focus{outline:2px solid var(--accent);outline-offset:1px}
.m-parc,.m-switch,.m-push{flex-direction:row;align-items:center;justify-content:space-between;gap:12px}
.m-parc>div:first-child,.m-switch>span:first-child,.m-push>div:first-child{display:flex;flex-direction:column;min-width:0}
.m-step{display:flex;align-items:center;gap:8px}
.m-step input{width:52px;text-align:center;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:17px;-moz-appearance:textfield}
.m-step input::-webkit-outer-spin-button,.m-step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.m-chipbtn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;border-radius:22px;border:1px solid var(--line);background:var(--surface);font-size:20px;cursor:pointer}
.m-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;border-radius:14px;background:var(--accent-soft);font-size:14px}
.m-info select{flex:1 1 140px;min-height:40px;border:0;border-radius:10px;padding:0 10px;background:var(--surface);font-weight:500}
.m-switch input{appearance:none;-webkit-appearance:none;flex:0 0 auto;width:52px;height:32px;border-radius:16px;background:var(--line);position:relative;cursor:pointer;margin:0;transition:background .15s}
.m-switch input::after{content:"";position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:13px;background:#fff;box-shadow:0 1px 3px hsl(0 0% 0%/.25);transition:transform .15s}
.m-switch input:checked{background:var(--accent)}
.m-switch input:checked::after{transform:translateX(20px)}
.m-switch input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
/* barra inferior */
.m-bar{position:sticky;bottom:0;display:flex;gap:10px;padding:12px 20px calc(env(safe-area-inset-bottom) + 14px);background:var(--bg);border-top:1px solid var(--line)}
.m-btn{flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 18px;border-radius:14px;border:0;font-weight:600;font-size:16px;cursor:pointer}
.m-btn.pri{flex-grow:2;background:var(--accent);color:var(--accent-fg)}
.m-btn.sec{background:var(--surface-2);color:var(--fg)}
.m-btn-s{flex:0 0 auto;min-height:44px;font-size:15px}
.m-mini{min-height:36px;padding:0 12px;border-radius:10px;border:1px solid var(--accent);background:transparent;color:var(--accent);font-weight:600;font-size:13px;cursor:pointer}
.m-acoes{display:flex;flex-direction:column;gap:10px}
.m-acoes form{display:flex}
/* confirmação e login */
.m-ok,.m-auth{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center;padding:40px 8px}
.m-ok p,.m-auth p{margin:0;max-width:320px;color:var(--muted)}
.m-ok-ico{display:inline-flex;align-items:center;justify-content:center;width:72px;height:72px;border-radius:36px;background:var(--t-pos);color:var(--pos)}
.m-auth .m-btn{flex:0 0 auto;width:100%;max-width:320px}
.m-auth img{border-radius:18px}
.m-h2{margin-top:6px}
.m-acoes-lin{flex-direction:row}
.m-acoes-lin form{flex:1 1 0}
.m-acoes form .m-btn{flex:1 1 auto}
details.m-card summary{cursor:pointer;min-height:28px;display:flex;align-items:center}
.m-mt{margin-top:12px;gap:12px}
input[type=file].m-field{padding:10px 12px}
