/* ==========================================================
   LM Print · Kits 3D  (versão refinada)
   Mesmas classes do original: é só trocar o arquivo.
   Ideia: interface calma e legível; o único destaque de
   movimento é o vaso 3D sendo impresso no início.
   Para trocar o azul da empresa, mude --azul e --azul-escuro.
   ========================================================== */
:root {
  --azul: #0b4fd6;
  --azul-escuro: #083a9e;
  --azul-vivo: #2f6df0;
  --azul-claro: #eef3ff;
  --azul-no-preto: #8ab4ff;
  --preto: #0a0e1a;
  --branco: #ffffff;
  --fundo: #f6f8fc;
  --linha: #e4e9f3;
  --linha-forte: #cdd6e8;
  --texto: #0f1629;
  --suave: #667089;
  --perigo: #c9372c;
  --ok: #138a50;

  --f-titulo: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-display: 'Unbounded', 'Manrope', system-ui, sans-serif; /* só no número grande e no login */
  --f-texto: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --lado: 232px;
  --r: 14px;       /* cartões e painéis */
  --r-sm: 10px;    /* campos e botões */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sombra: 0 1px 2px rgba(15, 30, 80, .05);
  --sombra-alta: 0 6px 20px -8px rgba(15, 40, 120, .2);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--texto); background: var(--fundo);
  font: 15px/1.55 var(--f-texto); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(47, 109, 240, .5); outline-offset: 2px; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: var(--lado) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
#view {
  width: 100%; max-width: 1040px; margin: 0 auto; outline: none;
  padding: 28px max(20px, env(safe-area-inset-right, 0px)) 64px max(20px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 20px;
}

/* uma única entrada suave ao trocar de tela */
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sobe { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
#view > * { animation: sobe .55s var(--ease) both; }
#view > :nth-child(2) { animation-delay: .07s; }
#view > :nth-child(3) { animation-delay: .14s; }
#view > :nth-child(4) { animation-delay: .21s; }
#view > :nth-child(5) { animation-delay: .28s; }
#view > :nth-child(n+6) { animation-delay: .35s; }

/* ---------- barra lateral ---------- */
.side {
  background: var(--preto); color: var(--branco);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 24px 14px 20px;
}
.side-logo { display: block; padding: 0 10px 28px; }
.side-logo img { width: 108px; height: auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .bottom a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: rgba(255, 255, 255, .62); text-decoration: none; font-weight: 600; font-size: .94rem;
  transition: background .2s, color .2s;
}
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: var(--branco); }
.side-nav a[aria-current="page"] { background: var(--azul); color: var(--branco); }
.side-nav svg, .bottom svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.who { font-size: .8rem; color: rgba(255, 255, 255, .55); overflow-wrap: anywhere; }
.link { background: none; border: 0; padding: 0; color: var(--azul-no-preto); font-weight: 600; cursor: pointer; text-align: left; width: fit-content; }
.link:hover { text-decoration: underline; }

.sync { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--suave); flex: none; }
.sync[data-state="live"] i { background: #4ade80; }
.sync[data-state="saving"] i { background: #f5b942; animation: pulse 1.2s ease-in-out infinite; }
.sync[data-state="off"] i { background: var(--perigo); }
.sync[data-state="local"] i { background: rgba(255, 255, 255, .5); }
.side .sync { color: rgba(255, 255, 255, .85); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- topo ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linha);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) 12px max(20px, env(safe-area-inset-left, 0px));
}
.topbar h1 { font-family: var(--f-titulo); font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.top-r { display: flex; align-items: center; gap: 18px; }
.sync-m { display: none; color: var(--suave); }
.price { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; color: var(--suave); }
.money { display: flex; align-items: center; border: 1px solid var(--linha-forte); border-radius: var(--r-sm); background: var(--branco); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.money b { padding: 0 6px 0 12px; font-weight: 600; color: var(--suave); }
.money input { border: 0; width: 6.4rem; padding: 7px 12px 7px 0; text-align: right; font-weight: 700; font-size: 1rem; background: transparent; }
.money:focus-within { border-color: var(--azul-vivo); box-shadow: 0 0 0 3px rgba(47, 109, 240, .15); }
.money input:focus-visible, .money input:focus { outline: none; box-shadow: none; }

/* ---------- botões ---------- */
.btn {
  border: 1px solid var(--linha-forte); background: var(--branco); color: var(--texto);
  border-radius: var(--r-sm); padding: 9px 16px; font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:hover { border-color: var(--azul); color: var(--azul); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--azul); border-color: var(--azul); color: var(--branco); }
.btn.primary:hover { background: var(--azul-escuro); border-color: var(--azul-escuro); color: var(--branco); }
.btn.light { background: var(--branco); border-color: var(--branco); color: var(--azul-escuro); }
.btn.light:hover { background: var(--azul-claro); border-color: var(--azul-claro); color: var(--azul-escuro); }
.btn.outline-light { background: transparent; border-color: rgba(255, 255, 255, .6); color: var(--branco); }
.btn.outline-light:hover { background: var(--branco); border-color: var(--branco); color: var(--azul-escuro); }
.btn.sm { padding: 6px 12px; font-size: .82rem; }
.btn.danger { color: var(--perigo); }
.btn.danger:hover { background: var(--perigo); border-color: var(--perigo); color: var(--branco); }
.btn.danger.armed { background: var(--perigo); border-color: var(--perigo); color: var(--branco); animation: shake .35s; }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
@keyframes shake { 20% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }

/* ---------- campos ---------- */
input, select, textarea {
  background: var(--branco); border: 1px solid var(--linha-forte); border-radius: var(--r-sm); padding: 8px 11px; min-width: 0;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--azul-vivo); box-shadow: 0 0 0 3px rgba(47, 109, 240, .15); outline: none; }
select { max-width: 100%; width: 100%; cursor: pointer; }
textarea { width: 100%; font-size: .8rem; }

/* ---------- início: vaso 3D sendo impresso ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--branco);
  background: linear-gradient(120deg, var(--azul) 0%, var(--azul-escuro) 100%);
  border-radius: 20px; padding: 32px clamp(22px, 4vw, 44px); min-height: 290px;
  display: flex; align-items: center;
}
.hero-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: 30rem; }
.hello { font-weight: 600; opacity: .85; }
.hero-label { font-weight: 600; margin-top: 10px; opacity: .9; }
.hero-cost { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.9rem, 5.5vw, 2.9rem); line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero-sub { opacity: .88; max-width: 28rem; }
.hero-title { font-family: var(--f-titulo); font-weight: 800; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.25; text-wrap: balance; }
.hero .row-btns { margin-top: 14px; }

/* impressora 3D (SVG) imprimindo um vaso: o bico sobe e a peça cresce */
.print { position: absolute; right: clamp(20px, 6vw, 72px); top: 50%; width: 250px; transform: translateY(-50%); z-index: 1; color: var(--branco); }
.print svg { display: block; width: 100%; height: auto; overflow: visible; }
.pr-gantry { animation: pr-sobe 9s linear infinite; }
.pr-head { animation: pr-vai 1s ease-in-out infinite alternate; }
.pr-obj { animation: pr-peca 9s linear infinite; }
@keyframes pr-sobe { 0% { transform: translateY(154px); } 76%, 92% { transform: translateY(68px); } 100% { transform: translateY(154px); } }
@keyframes pr-vai { from { transform: translateX(-28px); } to { transform: translateX(28px); } }
@keyframes pr-peca {
  0% { clip-path: inset(100% 0 0 0); opacity: 1; }
  76%, 92% { clip-path: inset(0 0 0 0); opacity: 1; }
  97%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* ---------- cartões ---------- */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r); box-shadow: var(--sombra); overflow: hidden; }
.strip > div { padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-left: 1px solid var(--linha); }
.strip > div:first-child { border-left: 0; }
.strip .l { color: var(--suave); font-size: .82rem; font-weight: 600; }
.strip b { font-size: 1.45rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.strip small { color: var(--suave); font-size: .82rem; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r); min-width: 0; box-shadow: var(--sombra); }
.panel-h { padding: 18px 20px 6px; }
.panel-h h2 { font-size: 1rem; font-weight: 800; }
.panel-h p { color: var(--suave); font-size: .85rem; }
.bars { padding: 8px 20px 18px; display: flex; flex-direction: column; gap: 2px; }
.bar-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center;
  padding: 9px 0; color: inherit; text-decoration: none;
}
.bar-row:hover .bar-name { color: var(--azul); }
.bar-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .2s; }
.bar-row b { font-weight: 800; }
.bar-track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--azul-claro); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--azul-vivo); transition: width .9s var(--ease); }
.bar-fill.dark { background: #2a3350; }
.none { padding: 18px 20px; color: var(--suave); }

/* ---------- cabeçalho de página e painéis vazios ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.page-head .count { font-weight: 800; font-size: 1.05rem; }
.page-head .hint { color: var(--suave); font-size: .85rem; flex: 1 1 100%; order: 3; }
.empty { padding: 40px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.empty h2 { font-family: var(--f-titulo); font-size: 1.1rem; font-weight: 800; text-wrap: balance; }
.empty p { color: var(--suave); max-width: 32rem; margin-bottom: 8px; }

/* ---------- kits ---------- */
.kit { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); }
.kit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; }
.kit-name { flex: 1 1 220px; min-width: 0; font-weight: 800; font-size: 1.15rem; border-color: transparent; background: transparent; padding-left: 6px; }
.kit-name:hover, .kit-name:focus { border-color: var(--linha-forte); background: var(--branco); }

.irow {
  display: grid; align-items: center; gap: 8px 14px; padding: 10px 18px; border-top: 1px solid var(--linha);
  grid-template-columns: minmax(0, 2.4fr) auto repeat(3, minmax(0, 1fr)) 40px;
  transition: opacity .2s, transform .2s, background .2s;
}
.irow:not(.ihead):hover { background: var(--azul-claro); }
.irow.ihead { padding: 9px 18px; color: var(--suave); font-size: .78rem; font-weight: 700; background: var(--fundo); }
.irow.ihead span:nth-child(n+3):nth-child(-n+5) { text-align: right; }
.irow .m { display: flex; flex-direction: column; text-align: right; }
.irow .m small { display: none; color: var(--suave); font-size: .75rem; }
.irow .m b { font-weight: 700; }
.irow .m.cost b { color: var(--azul); }
.leaving { opacity: 0; transform: translateX(24px); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--linha-forte); border-radius: var(--r-sm); overflow: hidden; background: var(--branco); }
.stepper button { width: 34px; border: 0; background: var(--fundo); cursor: pointer; font-weight: 800; color: var(--azul); transition: background .2s, color .2s; }
.stepper button:hover { background: var(--azul); color: var(--branco); }
.stepper input { width: 3.2rem; border: 0; border-radius: 0; text-align: center; font-weight: 800; padding: 7px 0; }
.stepper input:focus { box-shadow: none; background: var(--azul-claro); }
.x { width: 36px; height: 36px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--suave); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.x:hover { background: var(--perigo); color: var(--branco); }
.kit .none { border-top: 1px solid var(--linha); }
.kit-add { padding: 14px 18px; border-top: 1px solid var(--linha); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kit-add p { color: var(--suave); font-size: .88rem; }
.kit-add a { color: var(--azul); font-weight: 700; }
.kit-total {
  color: var(--branco); background: var(--preto);
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 8px 14px; padding: 14px 18px; align-items: center;
}
.kit-total .t { font-weight: 800; }
.kit-total small { display: block; color: rgba(255, 255, 255, .6); font-size: .76rem; }
.kit-total b { font-weight: 800; font-size: 1.05rem; }
.kit-total .hm { color: rgba(255, 255, 255, .6); font-size: .76rem; font-weight: 500; display: block; }
.kit-total .c b { color: var(--azul-no-preto); font-size: 1.2rem; }

/* ---------- produtos ---------- */
.plist { overflow: hidden; }
.prow {
  display: grid; align-items: center; gap: 8px 14px; padding: 10px 18px; border-top: 1px solid var(--linha);
  grid-template-columns: minmax(0, 2.4fr) 9rem 9rem minmax(0, 1fr) auto; transition: opacity .2s, transform .2s, background .2s;
}
.prow:not(.phead):hover { background: var(--azul-claro); }
.prow.phead { padding: 9px 18px; color: var(--suave); font-size: .78rem; font-weight: 700; background: var(--fundo); border-top: 0; }
.p-name { display: flex; flex-direction: column; min-width: 0; }
.p-name input { font-weight: 600; }
.used { color: var(--suave); font-size: .76rem; padding-left: 11px; }
.unit { display: flex; align-items: center; border: 1px solid var(--linha-forte); border-radius: var(--r-sm); background: var(--branco); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.unit:focus-within { border-color: var(--azul-vivo); box-shadow: 0 0 0 3px rgba(47, 109, 240, .15); }
.unit input { border: 0; border-radius: 0; width: 100%; text-align: right; font-weight: 600; }
.unit input:focus { box-shadow: none; }
.unit span { padding-right: 10px; color: var(--suave); font-weight: 600; }
.prow .m { text-align: right; }
.prow .m small { display: none; color: var(--suave); font-size: .75rem; }
.prow .m b { color: var(--azul); font-weight: 700; }

/* ---------- vendas ---------- */
.net { color: var(--ok); }
.net.neg { color: var(--perigo); }
.sales-hint { color: var(--suave); font-size: .85rem; margin: -6px 2px 0; }
.vlist { padding: 4px 20px; overflow: hidden; }
.vrow {
  display: grid; align-items: center; gap: 14px;
  grid-template-columns: minmax(150px, 1.5fr) minmax(130px, 1fr) minmax(120px, .9fr) repeat(3, minmax(90px, .8fr));
  padding: 16px 0; border-bottom: 1px solid var(--linha);
}
.vrow:last-child { border-bottom: 0; }
.v-name { display: grid; gap: 2px; min-width: 0; }
.v-name > b { font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.v-name .used { padding-left: 0; }
.v-field { display: grid; gap: 5px; }
.v-field small, .vrow .m small { font-size: .75rem; color: var(--suave); font-weight: 600; }
.v-field .money input { width: 100%; font-size: 1rem; }
.v-field .stepper { justify-self: start; }
.vrow .m { display: grid; gap: 2px; }
.vrow .m b { font-weight: 800; font-size: 1.02rem; }
.net-cell b { font-size: 1.15rem; }

/* ---------- ajustes ---------- */
.set { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.set h2 { font-size: 1rem; font-weight: 800; }
.set p { color: var(--suave); max-width: 40rem; }
.set .hint { font-size: .85rem; }

/* ---------- janelas e avisos ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--branco); color: var(--texto); box-shadow: 0 30px 70px -20px rgba(2, 16, 60, .5); }
dialog[open] { animation: pop .25s var(--ease); }
dialog::backdrop { background: rgba(6, 12, 34, .5); animation: fade .25s both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dlg-in { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.dlg-in h2 { font-family: var(--f-titulo); font-size: 1.1rem; font-weight: 800; }
.dlg-in p { color: var(--suave); }
.dlg-in label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .85rem; color: var(--suave); }
.dlg-in label input { font-weight: 500; font-size: 1rem; color: var(--texto); padding: 10px 12px; }
.dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.form-err { color: var(--perigo); font-weight: 600; font-size: .88rem; }
.form-err:empty { display: none; }

#toasts { position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--preto); color: var(--branco); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); animation: pop .25s var(--ease); }
.toast.err { background: var(--perigo); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--azul) 0%, var(--azul-escuro) 100%); color: var(--branco); padding: 40px clamp(24px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 100%; }
.auth-art .print { right: 50%; margin-right: -125px; top: 54%; }
.auth-art img { width: 128px; height: auto; position: relative; z-index: 1; }
.auth-art .t { position: relative; z-index: 1; max-width: 26rem; display: flex; flex-direction: column; gap: 12px; }
.auth-art h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.25; text-wrap: balance; }
.auth-art p { opacity: .9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); background: var(--branco); }
.auth-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { font-family: var(--f-titulo); font-size: 1.35rem; font-weight: 800; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--fundo); border-radius: var(--r-sm); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--suave); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--branco); color: var(--azul); box-shadow: 0 1px 4px rgba(15, 30, 80, .12); }
.auth-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .85rem; color: var(--suave); }
.auth-form label input { font-size: 1rem; font-weight: 500; color: var(--texto); padding: 11px 13px; }
.auth-form .btn { padding: 12px 16px; }
.auth-msg { font-weight: 600; font-size: .9rem; }
.auth-msg:empty { display: none; }
.auth-msg.err { color: var(--perigo); }
.auth-msg.ok { color: var(--ok); }
.auth-form .link { color: var(--azul); }
.fatal { max-width: 34rem; margin: 18vh auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.fatal h1 { font-family: var(--f-titulo); font-size: 1.3rem; font-weight: 800; }

/* ---------- menu de baixo no celular ---------- */
.bottom { display: none; }

@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .sync-m { display: inline-flex; }
  .price > span:first-child { display: none; }
  .top-r { gap: 12px; }
  #view { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .bottom {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; z-index: 10; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 14, 26, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-radius: 18px; padding: 6px; box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .5);
  }
  .bottom a { flex-direction: column; gap: 2px; padding: 8px 2px; font-size: .68rem; justify-content: center; border-radius: 13px; }
  .bottom a[aria-current="page"] { color: var(--branco); background: var(--azul); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 340px; }
  .auth-art .print { width: 150px; right: 6%; margin-right: 0; top: 50%; }
}
@media (max-width: 860px) {
  .vrow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .vrow > * { grid-column: span 2; }
  .v-name { grid-column: 1 / -1; }
  .v-field { grid-column: span 3; }
}
@media (max-width: 760px) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--linha); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-bottom: 220px; align-items: flex-start; }
  .hero .print { width: 190px; right: 50%; margin-right: -95px; top: auto; bottom: 14px; transform: none; }

  .irow { grid-template-columns: auto repeat(3, minmax(0, 1fr)); }
  .irow.ihead { display: none; }
  .irow .i-prod { grid-column: 1 / 4; }
  .irow .i-x { grid-column: 4; grid-row: 1; justify-self: end; }
  .irow .m small { display: block; }
  .kit-total { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit-total .t { grid-column: 1 / -1; }

  .prow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prow.phead { display: none; }
  .prow .p-name { grid-column: 1 / -1; }
  .prow .m { text-align: left; }
  .prow .m small { display: block; }
  .prow .p-x { grid-column: 1 / -1; }
  .prow .p-x .btn { width: 100%; }
}


/* ---------- tela de boas-vindas (depois do login) ---------- */
.bv {
  position: fixed; inset: 0; z-index: 100; overflow: hidden; color: var(--branco);
  background: linear-gradient(120deg, var(--azul) 0%, var(--azul-escuro) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; text-align: center;
  clip-path: circle(150vmax at var(--bx, 50%) var(--by, 60%));
  animation: bv-abre .8s cubic-bezier(.65, 0, .2, 1) backwards;
  transition: clip-path .85s cubic-bezier(.7, 0, .2, 1);
}
@keyframes bv-abre { from { clip-path: circle(0 at 50% 60%); } to { clip-path: circle(150vmax at 50% 60%); } }
.bv.saindo { clip-path: circle(0 at var(--bx, 50%) var(--by, 60%)); pointer-events: none; }
.bv.saindo > * { opacity: 0; transition: opacity .25s; }
.bv > * { animation: fade-in .6s var(--ease) both; }
.bv .print { position: relative; right: auto; top: auto; transform: none; width: min(260px, 62vw); margin-bottom: 12px; animation-delay: .35s; }
.bv-oi { font-weight: 600; opacity: .85; animation-delay: .65s !important; }
.bv-nome { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 6vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; max-width: 22ch; animation-delay: .78s !important; }
.bv-sub { opacity: .88; max-width: 26rem; animation-delay: .9s !important; }
.bv .btn { margin-top: 16px; padding: 12px 32px; font-size: 1rem; animation-delay: 1.05s !important; }



/* ==========================================================
   TRANSIÇÕES
   1) abertura do site (#splash)   2) tela de login
   3) login -> boas-vindas -> app  4) troca de abas
   ========================================================== */
@keyframes revela { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes entra-esq { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes desce { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes cresce { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes carrega { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 1) abertura: logo + impressora + barrinha; depois a cortina sobe */
body.splash-on { overflow: hidden; }
body.splash-on #root *, body.splash-on #root *::before, body.splash-on #root *::after { animation-play-state: paused !important; }
#splash {
  position: fixed; inset: 0; z-index: 200; color: var(--branco);
  background: linear-gradient(120deg, var(--azul) 0%, var(--azul-escuro) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  border-radius: 0 0 50% 50% / 0 0 90px 90px;
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
#splash.some { transform: translateY(-108%); }
#splash img { width: 118px; height: auto; animation: cresce .7s var(--ease) both; }
#splash .print { position: relative; right: auto; top: auto; transform: none; width: min(220px, 56vw); animation: cresce .7s var(--ease) .15s both; }
#splash .pr-gantry, #splash .pr-obj { animation-duration: 2.4s; }
#splash .carrega { width: 140px; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; }
#splash .carrega::after { content: ""; display: block; height: 100%; background: var(--branco); transform-origin: left; animation: carrega 1.8s cubic-bezier(.4, 0, .2, 1) both; }

/* 2) login: painel azul se abre da esquerda, campos entram um a um */
.auth-art { animation: revela .9s cubic-bezier(.65, 0, .2, 1) both; }
.auth-art img { animation: sobe .7s var(--ease) .45s both; }
.auth-art .t { animation: sobe .7s var(--ease) .6s both; }
.auth-form form > * { animation: sobe .55s var(--ease) both; }
.auth-form form > :nth-child(1) { animation-delay: .3s; }
.auth-form form > :nth-child(2) { animation-delay: .38s; }
.auth-form form > :nth-child(3) { animation-delay: .46s; }
.auth-form form > :nth-child(4) { animation-delay: .54s; }
.auth-form form > :nth-child(5) { animation-delay: .62s; }
.auth-form form > :nth-child(n+6) { animation-delay: .7s; }
body.auth-visto .auth-art, body.auth-visto .auth-art > img, body.auth-visto .auth-art > .t { animation: none; }

/* 3) depois das boas-vindas: o app se monta (menu abre, topo desce, abas entram) */
.side { animation: revela .8s cubic-bezier(.65, 0, .2, 1) both; }
.side-nav a { animation: entra-esq .5s var(--ease) both; }
.side-nav a:nth-child(1) { animation-delay: .25s; }
.side-nav a:nth-child(2) { animation-delay: .32s; }
.side-nav a:nth-child(3) { animation-delay: .39s; }
.side-nav a:nth-child(4) { animation-delay: .46s; }
.side-nav a:nth-child(5) { animation-delay: .53s; }
.topbar { animation: desce .6s var(--ease) .1s both; }
.bottom { animation: sobe .6s var(--ease) .3s both; }