:root {
  --bg: #F2F2F7; --card: #FFFFFF; --ink: #1C1C1E; --sub: #8E8E93; --line: #E5E5EA;
  --brand: #2A6FB3; --green: #16A34A; --red: #DC2626; --track: #ECECF1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1C1C1E; --ink: #FFFFFF; --sub: #8E8E93; --line: #2C2C2E;
    --brand: #54A0DE; --green: #30D158; --red: #FF453A; --track: #2C2C2E;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg); background-image: url('/icons/bg-mamute.svg'); background-size: 200px auto;
  color: var(--ink); -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.spacer { flex: 1; }

/* ----- Login / criar PIN ----- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth-title { font-size: 24px; font-weight: 500; margin: 0 0 6px; }
.auth-sub { font-size: 14px; color: var(--sub); margin: 0 0 22px; max-width: 280px; line-height: 1.5; }
.pin-input { width: 210px; text-align: center; font-size: 26px; letter-spacing: 10px; padding: 12px; border-radius: 14px; border: .5px solid var(--line); background: var(--card); color: var(--ink); outline: none; }
.pin-input:focus { border-color: var(--brand); }
.btn-primary { margin-top: 18px; width: 210px; height: 50px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 500; }
.btn-primary:active { opacity: .85; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ----- Marca ----- */
.monogram { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex: none; }
.monogram.big { width: 64px; height: 64px; border-radius: 18px; font-size: 24px; }
.brandname { font-size: 15px; font-weight: 500; letter-spacing: .3px; }
.brandname.big { font-size: 18px; }
.logo { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--brand); }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo .logo-fb { display: none; color: #fff; font-size: 13px; font-weight: 500; }
.logo.nologo img { display: none; }
.logo.nologo .logo-fb { display: inline; }
.logo.big { width: 92px; height: 92px; }
.logo.big .logo-fb { font-size: 30px; }

/* ----- Shell ----- */
.screen { min-height: 100dvh; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.hd { padding: calc(env(safe-area-inset-top) + 14px) 18px 4px; }
.brandrow { display: flex; align-items: center; gap: 10px; }
.hd-ic { font-size: 21px; color: var(--sub); }
.lg-title { font-size: 24px; font-weight: 500; margin-top: 14px; }
.sub { font-size: 13px; color: var(--sub); margin-top: 1px; }
.scroll { padding: 14px 18px 0; display: flex; flex-direction: column; gap: 13px; }

.hero { background: var(--brand); border-radius: 18px; padding: 16px 18px; color: #fff; }
.hero-label { font-size: 13px; color: rgba(255,255,255,.72); }
.hero-value { font-size: 31px; font-weight: 500; margin-top: 3px; letter-spacing: .3px; }
.hero-meta { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.72); }

.metrics { display: flex; gap: 10px; }
.metric { flex: 1; background: var(--card); border: .5px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.metric-label { font-size: 12px; color: var(--sub); }
.metric-value { font-size: 19px; font-weight: 500; margin-top: 2px; }
.metric-value.pos { color: var(--green); }

.qa { display: flex; gap: 10px; }
.qa-btn { flex: 1; height: 50px; border-radius: 14px; background: var(--card); border: .5px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 15px; font-weight: 500; color: var(--green); }
.qa-btn i { font-size: 19px; }
.qa-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.qa-btn:active { opacity: .85; }

.section-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 500; margin-top: 2px; }
.section-head .link { font-size: 13px; font-weight: 400; color: var(--sub); }
.card { background: var(--card); border: .5px solid var(--line); border-radius: 14px; padding: 2px 14px; }
.prow { padding: 9px 0; }
.prow.div { border-bottom: .5px solid var(--line); }
.prow-top { display: flex; justify-content: space-between; font-size: 14px; }
.prow-top .b { font-weight: 500; }
.bar { height: 5px; background: var(--track); border-radius: 3px; margin-top: 6px; }
.bar-fill { height: 5px; background: var(--brand); border-radius: 3px; }
.lrow { display: flex; align-items: center; gap: 11px; padding: 10px 0; }
.lrow.div { border-bottom: .5px solid var(--line); }
.ava { width: 30px; height: 30px; border-radius: 50%; background: var(--track); color: var(--sub); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; flex: none; text-transform: uppercase; }
.lrow-name { flex: 1; font-size: 15px; }
.lrow-val { font-size: 15px; font-weight: 500; color: var(--red); }
.empty { padding: 18px; text-align: center; color: var(--sub); font-size: 14px; }

/* ----- Tab bar ----- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: .5px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 50; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 7px; color: var(--sub); }
.tab i { font-size: 23px; }
.tab span { font-size: 10px; }
.tab.active { color: var(--brand); }
.tab.active span { font-weight: 500; }

.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--sub); padding: 56px 24px; gap: 12px; }
.ph i { font-size: 46px; opacity: .5; }
.loading { padding: 40px; text-align: center; color: var(--sub); }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(10px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; z-index: 100; max-width: 80%; text-align: center; }
.toast.show { opacity: .95; transform: translateX(-50%) translateY(0); }

/* ----- Clientes: lista + detalhe ----- */
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--card); border: .5px solid var(--line); color: var(--brand); font-size: 20px; }
.icon-btn:active { opacity: .7; }
.search { margin-top: 12px; width: 100%; height: 38px; border-radius: 12px; border: .5px solid var(--line); background: var(--card); color: var(--ink); padding: 0 14px; font-size: 15px; outline: none; }
.search:focus { border-color: var(--brand); }
.lrow.tap { cursor: pointer; }
.lrow.tap:active { opacity: .55; }
.lrow-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lrow-sub { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-ok { font-size: 13px; color: var(--sub); }
.lrow-val.pos { color: var(--green); }
.lrow-val.off { color: var(--sub); text-decoration: line-through; }
.chev { color: var(--sub); font-size: 18px; margin-left: 4px; flex: none; }
.r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.lrow-date { font-size: 11px; color: var(--sub); }
.ava i { font-size: 16px; }
.ava.ok { background: rgba(22,163,74,.14); color: var(--green); }

.back { display: inline-flex; align-items: center; gap: 1px; color: var(--brand); font-size: 15px; padding: 0; }
.back i { font-size: 20px; }
.hero.small { padding: 14px 18px; }
.hero.small .hero-value { font-size: 26px; }
.hero.ok { background: var(--green); }
.qa-btn.ghost { color: var(--brand); }

.pill { font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 999px; flex: none; }
.pill-green { background: rgba(22,163,74,.16); color: var(--green); }
.pill-amber { background: rgba(245,158,11,.18); color: #9A6700; }
.pill-red { background: rgba(220,38,38,.14); color: var(--red); }
.pill-gray { background: var(--track); color: var(--sub); }

/* ----- Bottom sheet / modal ----- */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; z-index: 200; }
.sheet { width: 100%; max-width: 520px; background: var(--card); border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: sheetup .22s ease; }
@keyframes sheetup { from { transform: translateY(28px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.sheet-h { font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.sheet-sub { font-size: 14px; color: var(--sub); line-height: 1.5; margin: 0 0 14px; }
.field { width: 100%; height: 46px; border-radius: 12px; border: .5px solid var(--line); background: var(--bg); color: var(--ink); padding: 0 14px; font-size: 16px; outline: none; }
.field:focus { border-color: var(--brand); }
.sheet-err { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 2px; }
.fld-label { font-size: 13px; color: var(--sub); margin: 12px 2px 6px; }
select.field { appearance: auto; -webkit-appearance: menulist; line-height: normal; }
.row2 { display: flex; gap: 10px; }
.total-line { display: flex; align-items: center; justify-content: space-between; margin: 14px 2px 0; font-size: 15px; color: var(--sub); }
.total-line b { font-size: 18px; font-weight: 500; color: var(--ink); }
.seg { display: flex; gap: 3px; background: var(--track); border-radius: 12px; padding: 3px; margin-top: 14px; }
.seg-b { flex: 1; height: 34px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--sub); }
.seg-b.active { background: var(--card); color: var(--ink); }
.hint { font-size: 12px; color: var(--sub); margin: 7px 2px 0; }
.metrics3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metrics3 .metric { padding: 10px 12px; }
.metrics3 .metric-value { font-size: 16px; }
.section-head .link { padding: 0; background: none; }
.mini-x { width: 26px; height: 26px; border-radius: 50%; background: var(--track); color: var(--sub); display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.mini-x:active { opacity: .6; }
.btn-ghost { height: 48px; border-radius: 14px; color: var(--brand); font-size: 16px; font-weight: 500; }
.btn-ghost.full { width: 100%; margin-top: 8px; }
.ava.danger { background: rgba(220,38,38,.12); color: var(--red); }
.lrow-name.danger { color: var(--red); }
.cfg-foot { text-align: center; color: var(--sub); font-size: 12px; margin-top: 22px; }

/* ===================== Redesign "banco digital" (v2) ===================== */
:root {
  --bg: #F4F6FA; --card: #FFFFFF; --ink: #0F1B2D; --sub: #7A8699; --line: #EAEDF2;
  --brand: #2F7DC4; --brand2: #1C5790; --green: #1FA971; --red: #E5484D; --track: #EAF2FB;
  --shadow: 0 4px 16px rgba(15,27,45,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1118; --card: #141C26; --ink: #EAF0F7; --sub: #8A97A8; --line: #222C38;
    --brand: #4A9BE0; --brand2: #2C6FB3; --green: #2FD08A; --red: #FF5B60; --track: #1B2A3A;
    --shadow: 0 4px 16px rgba(0,0,0,.35);
  }
}

.card { border: none; box-shadow: var(--shadow); border-radius: 18px; }
.hero { background: linear-gradient(135deg, var(--brand), var(--brand2)); border: none; border-radius: 22px; box-shadow: 0 12px 26px rgba(28,87,144,.28); }
.hero.ok { background: linear-gradient(135deg, #1FA971, #138A5B); box-shadow: 0 12px 26px rgba(20,120,80,.26); }
.hero-value { font-weight: 700; }
.metric { border: none; box-shadow: var(--shadow); border-radius: 16px; }
.metric-value { font-weight: 600; }
.icon-btn { border: none; background: var(--card); box-shadow: var(--shadow); color: var(--brand); border-radius: 12px; }
.search { border: none; box-shadow: var(--shadow); border-radius: 14px; }
.qa-btn { border: none; box-shadow: var(--shadow); border-radius: 16px; }
.qa-btn.primary { box-shadow: 0 8px 20px rgba(28,87,144,.26); }
.tabbar { border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15,27,45,.04); }
.tab.active span { font-weight: 600; }
.lg-title, .section-head, .sheet-h, .auth-title { font-weight: 600; }
.ava { border-radius: 12px; }
.ava.b { background: var(--track); color: var(--brand); }
.lrow-val, .prow-top .b { font-weight: 600; }
.bar-fill { background: var(--brand); }

/* Cabeçalho com saudação */
.topbar { display: flex; align-items: center; gap: 11px; padding: calc(env(safe-area-inset-top) + 12px) 20px 6px; }
.greet-logo { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, var(--brand), var(--brand2)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; overflow: hidden; flex: none; }
.greet-logo img { width: 100%; height: 100%; object-fit: cover; }
.greet-t { flex: 1; }
.greet-hi { font-size: 12px; color: var(--sub); }
.greet-nm { font-size: 15px; font-weight: 600; color: var(--ink); }

/* Atalhos (chips) */
.chips { display: flex; justify-content: space-between; padding: 2px 2px 0; }
.chip { display: flex; flex-direction: column; align-items: center; gap: 7px; background: none; border: none; cursor: pointer; }
.chip:active { opacity: .6; }
.chip-ic { width: 54px; height: 54px; border-radius: 17px; background: var(--track); display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 25px; }
.chip-tx { font-size: 11px; color: var(--sub); font-weight: 500; }

/* KPI com ícone */
.kpi-ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 9px; }
.kpi-ic.g { background: rgba(31,169,113,.14); color: var(--green); }
.kpi-ic.b { background: var(--track); color: var(--brand); }

/* Movimentações (extrato) */
.mov { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mov:first-child { border-top: none; }
.amt { font-size: 14px; font-weight: 600; color: var(--ink); flex: none; }
.amt.pos { color: var(--green); }

/* ===================== v3 — Champagne & Bronze (luxo claro, negrito) ===================== */
:root {
  --bg: #F4EFE4; --card: #FFFFFF; --ink: #211F1A; --ink2: #4A453B; --sub: #7A7260;
  --line: rgba(154,123,46,.28); --brand: #9A7B2E; --bronze: #9A7B2E; --gold: #B8902F; --gold-lite: #D8B85E;
  --green: #5C6B3A; --red: #B0492F; --track: #ECE4D2; --ivory: #FBF8F1; --champ: #F4EFE4; --champ2: #ECE4D2;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Manrope', system-ui, sans-serif;
  --shadow: 0 12px 26px -20px rgba(60,48,18,.5);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #F4EFE4; --card: #FFFFFF; --ink: #211F1A; --ink2: #4A453B; --sub: #7A7260;
    --line: rgba(154,123,46,.28); --brand: #9A7B2E; --bronze: #9A7B2E; --gold: #B8902F; --gold-lite: #D8B85E;
    --green: #5C6B3A; --red: #B0492F; --track: #ECE4D2; --ivory: #FBF8F1; --champ: #F4EFE4; --champ2: #ECE4D2;
  }
}
body { font-family: var(--sans); color: var(--ink); font-weight: 500;
  background: radial-gradient(120% 70% at 50% 0%, var(--ivory) 0%, var(--champ) 55%, var(--champ2) 140%); }

/* NEGRITO geral (pedido do dono) */
.lrow-name, .metric-value, .amt, .hero-value, .lg-title, .greet-nm, .chip-tx, .tab span,
.section-head, .lrow-val, .prow-top .b, .auth-title, .sheet-h, .brandname { font-weight: 700; }
.lrow-sub, .sub, .metric-label, .hero-label, .chip-tx, .fld-label { font-weight: 600; }
.lg-title { font-family: var(--serif); letter-spacing: .01em; }

/* Cartões */
.card { background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 12px 26px -20px rgba(60,48,18,.5); border-radius: 18px; }
.section-head .link, .sub { color: var(--brand); }

/* Hero — grafite premium com mamute marca d'água */
.hero { background: linear-gradient(160deg, #211F1A 0%, #2c281f 60%, #211d16 100%); border: 1px solid rgba(184,144,47,.3);
  border-radius: 24px; box-shadow: 0 24px 50px -28px rgba(33,31,26,.85); color: var(--ivory); position: relative; overflow: hidden; }
.hero.ok { background: linear-gradient(160deg, #26331f, #1c2814); }
.hero-label { color: var(--gold-lite); letter-spacing: .3em; text-transform: uppercase; font-size: 10px; }
.hero-value { color: var(--ivory); letter-spacing: -.02em; }
.hero-value .cur { font-size: .5em; color: var(--gold-lite); font-weight: 600; vertical-align: .5em; margin-right: 5px; }
.hero-meta { color: rgba(251,248,241,.62); }
.hero .wm { position: absolute; right: -26px; bottom: -30px; width: 170px; height: 170px; color: var(--gold-lite); opacity: .14; pointer-events: none; }
.hero .wm svg { width: 100%; height: 100%; display: block; }
.hero .gleam { position: absolute; top: 0; left: -60%; width: 60%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(216,184,94,.16), transparent); animation: gleam 7s ease-in-out 1.5s infinite; }
@keyframes gleam { 0% { left: -60%; } 55%, 100% { left: 130%; } }

/* KPIs com barra de ouro */
.metric { background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line);
  box-shadow: 0 12px 26px -20px rgba(60,48,18,.5); border-radius: 18px; position: relative; }
.metric::before { content: ""; position: absolute; top: 14px; left: 0; width: 3px; height: 22px;
  border-radius: 0 3px 3px 0; background: linear-gradient(var(--gold), var(--bronze)); }
.metric-value { color: var(--ink); }
.metric-value.pos { color: var(--green); }
.kpi-ic.g { background: rgba(92,107,58,.14); color: var(--green); }
.kpi-ic.b { background: var(--track); color: var(--brand); }

/* Atalhos */
.chip-ic { background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line); color: var(--brand);
  box-shadow: 0 8px 18px -14px rgba(60,48,18,.5); }
.chip-tx { color: var(--ink2); }

/* Avatares / ícones de linha */
.ava { background: var(--track); color: var(--brand); border: .5px solid var(--line); border-radius: 11px; }
.ava.ok { background: rgba(92,107,58,.14); color: var(--green); }
.ava.b { background: var(--track); color: var(--brand); }
.amt.pos, .lrow-val.pos { color: var(--green); }
.pill.pill-green { background: rgba(92,107,58,.16); color: var(--green); }

/* Abas */
.tabbar { background: var(--ivory); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(60,48,18,.4); }
.tab { color: var(--sub); }
.tab.active { color: var(--brand); }

/* Botões / inputs */
.qa-btn { background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line); color: var(--brand);
  box-shadow: 0 12px 26px -20px rgba(60,48,18,.5); font-weight: 700; }
.qa-btn.primary, .btn-primary { background: linear-gradient(180deg, #B8902F, #9A7B2E); color: #fff; border: none; font-weight: 700;
  box-shadow: 0 14px 30px -16px rgba(154,123,46,.7); }
.icon-btn { background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line); color: var(--brand); }
.search, .field, .pin-input { background: #fff; border: .5px solid var(--line); color: var(--ink); }
.sheet { background: var(--ivory); }
.overlay { background: rgba(33,28,16,.45); }
.code { color: var(--brand); background: var(--ivory); border-color: var(--line); }

/* Saudação no topo (crest de mamute) */
.greet-logo { width: 42px; height: 42px; border-radius: 50%; background: transparent; border: 1px solid var(--line);
  color: var(--brand); box-shadow: 0 0 0 4px rgba(251,248,241,.7); overflow: visible; }
.greet-logo svg { width: 26px; height: 26px; }
.greet-logo svg path { fill: currentColor; }
.greet-nm { font-family: var(--serif); font-weight: 700; font-size: 21px; }
.greet-hi { color: var(--brand); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; font-weight: 700; }

/* ===== Login cinematográfico ===== */
.authlux { position: relative; min-height: 100dvh; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 8%, var(--ivory) 0%, var(--champ) 52%, var(--champ2) 100%); }
.authlux::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6;
  background: radial-gradient(75% 60% at 50% 38%, transparent 55%, rgba(110,86,30,.16) 100%); }
.mammoths { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.mam { position: absolute; will-change: transform; color: var(--bronze); animation: bob 5.5s ease-in-out infinite; }
.mam svg { display: block; width: 100%; height: 100%; }
.mam svg path { fill: currentColor; }
.mam .walk { position: absolute; inset: 0; will-change: transform; }
.m1 { top: 8%; width: 230px; height: 230px; opacity: .11; }
.m2 { top: 32%; width: 300px; height: 300px; opacity: .11; animation-duration: 6.8s; }
.m3 { bottom: 9%; width: 180px; height: 180px; opacity: .085; animation-duration: 4.9s; animation-delay: -1.2s; }
.m4 { top: 52%; width: 120px; height: 120px; opacity: .06; animation-duration: 5.6s; animation-delay: -2s; }
.m5 { top: 15%; width: 90px; height: 90px; opacity: .075; animation-duration: 4.2s; animation-delay: -.6s; }
.m1 .walk { animation: march 34s linear infinite; }
.m2 .walk { animation: march 46s linear infinite; animation-delay: -12s; }
.m3 .walk { animation: march 28s linear infinite; animation-delay: -6s; }
.m4 .walk { animation: marchRev 24s linear infinite; animation-delay: -16s; }
.m5 .walk { animation: march 20s linear infinite; animation-delay: -3s; }
@keyframes march { 0% { transform: translateX(-130%); } 100% { transform: translateX(150%); } }
@keyframes marchRev { 0% { transform: translateX(150%) scaleX(-1); } 100% { transform: translateX(-130%) scaleX(-1); } }
@keyframes bob { 0%, 100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-9px,0); } }
.login-inner { position: relative; z-index: 5; min-height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 60px) 32px calc(env(safe-area-inset-bottom) + 26px); }
.crest { width: 62px; height: 62px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--bronze); box-shadow: 0 0 0 5px rgba(251,248,241,.6), 0 8px 20px -10px rgba(154,123,46,.5); opacity: 0; animation: fadeUp 1.2s ease .4s forwards; }
.crest svg { width: 40px; height: 40px; } .crest svg path { fill: currentColor; }
.eyebrow { margin-top: 22px; font-weight: 700; font-size: 10px; letter-spacing: .42em; text-transform: uppercase; color: var(--bronze); opacity: 0; animation: fadeUp 1.2s ease .6s forwards; }
.brand { position: relative; margin-top: 10px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 38px; line-height: 1.05; letter-spacing: .01em; color: var(--ink); opacity: 0; animation: fadeUp 1.3s ease .8s forwards; }
.brand b { font-weight: 700; }
.brand .shimmer { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 44%, rgba(216,184,94,.9) 50%, transparent 56%); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 220% 100%; animation: shine 6.5s ease-in-out 2s infinite; }
@keyframes shine { 0%, 72% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.rule { margin-top: 16px; width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; animation: fadeUp 1.2s ease 1s forwards; }
.tag { margin-top: 13px; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--sub); font-weight: 700; opacity: 0; animation: fadeUp 1.2s ease 1.1s forwards; }
.pin-label { margin-top: auto; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink2); opacity: 0; animation: fadeUp 1.2s ease 1.2s forwards; }
.dots { display: flex; gap: 14px; margin-top: 16px; opacity: 0; animation: fadeUp 1.2s ease 1.3s forwards; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--bronze); background: transparent; transition: .4s; }
.dot.on { background: var(--gold); box-shadow: 0 0 8px rgba(184,144,47,.7), 0 0 0 3px rgba(184,144,47,.12); }
.autherr { color: var(--red); font-size: 12px; min-height: 16px; margin-top: 10px; font-weight: 700; }
.pad { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 300px; opacity: 0; animation: fadeUp 1.3s ease 1.45s forwards; }
.key { height: 52px; border-radius: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink); background: linear-gradient(180deg, #fff, var(--champ)); border: .5px solid var(--line); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 12px -8px rgba(60,48,18,.5); transition: transform .15s, box-shadow .25s; user-select: none; }
.key:active { transform: scale(.94); }
.key.ghost { background: transparent; border: none; box-shadow: none; color: var(--bronze); }
.key.ghost svg { width: 24px; height: 24px; }
.key.ghost:active { transform: none; }
.btn-lux { margin-top: 16px; width: 100%; max-width: 300px; height: 52px; border-radius: 16px; border: none; background: linear-gradient(180deg, #B8902F, #9A7B2E); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .02em; cursor: pointer; box-shadow: 0 14px 30px -14px rgba(154,123,46,.7); opacity: 0; animation: fadeUp 1.3s ease 1.6s forwards; }
.btn-lux:active { transform: scale(.99); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .mam, .mam .walk { animation: none !important; } }

/* ===== Guia "instalar na tela de início" ===== */
.guideov { align-items: center; }
.guide { width: 100%; max-width: 360px; background: var(--ivory); border-radius: 22px; padding: 26px 22px 18px; text-align: center; border: 1px solid var(--line); box-shadow: 0 30px 70px -18px rgba(0,0,0,.55); animation: sheetup .25s ease; }
.guide-crest { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--line); color: var(--bronze); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 0 0 5px rgba(251,248,241,.6); }
.guide-crest svg { width: 36px; height: 36px; } .guide-crest svg path { fill: currentColor; }
.guide-h { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.guide-p { font-size: 14px; color: var(--ink2); line-height: 1.5; margin-bottom: 18px; }
.gstep { display: flex; align-items: center; gap: 12px; text-align: left; font-size: 14px; color: var(--ink); padding: 11px 0; border-top: 1px solid var(--line); }
.gstep:first-of-type { border-top: none; }
.gstep b { font-weight: 700; }
.gstep .gn { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, #B8902F, #9A7B2E); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.gstep .sh { width: 17px; height: 17px; vertical-align: -3px; color: var(--brand); display: inline-block; }
.guide .btn-lux { animation: none; opacity: 1; margin-top: 18px; max-width: none; }
.guide-skip { margin-top: 8px; background: none; border: none; color: var(--sub); font-size: 13px; font-weight: 600; cursor: pointer; }
.guide-arrow { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--gold-lite); font-weight: 700; font-size: 12px; text-shadow: 0 1px 8px rgba(0,0,0,.5); animation: bounceDown 1.4s ease-in-out infinite; pointer-events: none; z-index: 210; }
.guide-arrow i { font-size: 28px; }
@keyframes bounceDown { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(7px); } }
.btn-primary.full { width: 100%; margin-top: 6px; }
.code { font-size: 34px; font-weight: 500; letter-spacing: 8px; text-align: center; background: var(--bg); border: .5px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; color: var(--brand); }
