/* ============================================================================
   FIBER · Layout — app shell, header, catálogo, carrinho, telas.
   ========================================================================== */

/* ---------- App shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Header ---------- */
.appbar {
  position: sticky; top: 0; z-index: 50; background: var(--appbar-bg);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line);
}
.appbar__inner { height: var(--header-h); display: flex; align-items: center; gap: var(--sp-3); }
.brand { display: flex; align-items: center; gap: 10px; padding-block: 5px; }
.brand__logo { height: 34px; width: auto; }
.brand__sub { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.appbar__spacer { flex: 1; }
.appbar__client { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.appbar__client .who { font-weight: 700; font-size: 13px; }
.appbar__client .rep { font-size: 12px; color: var(--ink-soft); }
.rep-troca { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; margin-left: 4px; border-radius: var(--r-pill); background: var(--fiber-red-soft); color: var(--red-text); font-weight: 700; }

/* ---------- Category tab bar (sticky) ---------- */
.catbar { position: sticky; top: var(--header-h); z-index: 40; background: var(--bg); padding: var(--sp-3) 0 var(--sp-2); }
.catbar .chips { min-width: 0; mask-image: linear-gradient(90deg, #000 93%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 93%, transparent); }

/* Alternância de visão: Catálogo / Tabela */
/* Seletor de visão: pill de liquid glass na appbar, junto do logo e do rep */
.view-toggle {
  position: relative; flex: 0 0 auto; display: flex; gap: 4px; padding: 4px;
  background: var(--glass-bg); border: 1px solid var(--glass-line); border-radius: var(--r-pill);
  backdrop-filter: blur(18px) saturate(1.8); -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: var(--glass-shadow);
}
.view-toggle::before {
  content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(140% 90% at 50% -20%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%);
}
.vt-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 700; font-size: 12.5px; color: var(--ink-soft); transition: all var(--dur) var(--ease); min-height: 34px; -webkit-tap-highlight-color: transparent; }
.vt-btn > * { pointer-events: none; }
.vt-btn.is-active { background: var(--sel-bg); color: var(--sel-fg); box-shadow: var(--sh-sm); }
@media (max-width: 560px) { .vt-btn span { display: none; } .vt-btn { padding: 6px 14px; min-width: 44px; justify-content: center; } .brand__sub { display: none; } }

/* ---------- Hero (cadastro / intro) ---------- */
.hero {
  position: relative; background: radial-gradient(1200px 500px at 80% -10%, #2a2d33 0%, #17181a 55%, #0e0f11 100%);
  color: #fff; padding: var(--sp-8) 0 var(--sp-9); overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -80px; top: -60px; width: 320px; height: 320px; border-radius: 50%; background: var(--fiber-red); filter: blur(10px); opacity: 0.22; pointer-events: none; }
.hero__logo { height: 52px; width: auto; margin-bottom: var(--sp-5); }
.hero h1 { color: #fff; font-size: clamp(26px, 7vw, 40px); min-height: 1.12em; }
.hero h1 .accent { color: var(--fiber-red); }
.hero p { color: rgba(255,255,255,0.72); max-width: 42ch; margin-top: var(--sp-3); font-size: 15px; }
.hero__meta { display: flex; gap: var(--sp-4); margin-top: var(--sp-5); flex-wrap: wrap; }
.hero__meta .m { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; color: rgba(255,255,255,0.8); }
.hero__meta .m .k { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.1); display: grid; place-items: center; }

/* Alternância Cliente / Representante (cadastro) */
.cad-switch { position: absolute; top: 0; right: 0; display: flex; gap: 6px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.16); padding: 5px; border-radius: var(--r-pill); backdrop-filter: blur(6px); z-index: 3; }
.cad-switch__btn { padding: 9px 15px; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 700; font-size: 12.5px; line-height: 1.25; min-height: 22px; color: rgba(255,255,255,0.78); transition: all var(--dur) var(--ease); white-space: nowrap; }
.cad-switch__btn.is-active { background: #fff; color: #17181a; box-shadow: var(--sh-sm); }
.cad-switch__btn:not(.is-active):hover { color: #fff; }
@media (max-width: 560px) {
  .container > .cad-switch { position: relative; z-index: 4; margin-bottom: 20px; width: 100%; justify-content: center; }
  .cad-switch__btn { flex: 1; text-align: center; padding: 12px 10px; min-height: 44px; }
}

/* ---------- Page section ---------- */
.section { padding: var(--sp-5) 0 calc(var(--sp-8) + 84px); }
.section__head { margin-bottom: var(--sp-4); }
.section__head h1, .section__head h2 { font-size: 22px; }
.section__head p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

/* ---------- Grid de produtos ---------- */
.grid-prod { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 560px) { .grid-prod { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-prod { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Card de produto ---------- */
/* sem content-visibility aqui: o placeholder de altura fazia a página pular
   durante a rolagem e cliques caíam fora do card (produto "não abria") */
.pcard { display: flex; flex-direction: column; animation: fadeUp var(--dur) var(--ease) both; }
/* Foto full-bleed: sem moldura, até a borda do card; proporções extremas
   ficam contain (produto inteiro) sobre o fundo limpo */
.pcard__media {
  position: relative; aspect-ratio: 1 / 1; background: var(--media-bg);
  display: grid; place-items: center; overflow: hidden;
}
.pcard__img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s var(--ease); }
.pcard__img.is-cover { object-fit: cover; }
.pcard:hover .pcard__img { transform: scale(1.05); }
.pcard__ph { position: relative; z-index: 2; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pcard__ph svg { width: 46px; height: 46px; opacity: 0.5; }
.pcard__tag { position: absolute; top: 10px; left: 10px; }
.pcard__fav { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.9); box-shadow: var(--sh-xs); display: grid; place-items: center; }
.pcard__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard__name { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.18; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__desc { font-size: 13px; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.pcard__price .pfrom { font-size: 11px; color: var(--muted); display: block; line-height: 1; margin-bottom: 2px; }
.pcard__price .pval { font-size: 20px; }
.pcard__price .pval .cents { font-size: 13px; }
.pcard__count { font-size: 12px; color: var(--red-text); font-weight: 700; }
.line-count { font-size: 12px; color: var(--ink-soft); }

/* Infos rápidas no card (abaixo da foto) */
.pcard__specs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.pcard__specs i { font-style: normal; color: var(--line-2); }

/* ---------- Visão TABELA (recompra rápida) ---------- */
.tview { display: flex; flex-direction: column; gap: 10px; padding-bottom: 130px; }
.trow { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.trow__media { flex: 0 0 auto; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--media-bg); display: grid; place-items: center; overflow: hidden; padding: 0; }
.trow__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.trow__ph { color: var(--muted); } .trow__ph svg { width: 26px; height: 26px; opacity: .5; }
.trow__main { flex: 1; min-width: 0; }
.trow__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.trow__name { font-family: var(--font-display); font-weight: 800; font-size: 14.5px; text-align: left; padding: 8px 0; min-height: 40px; color: var(--ink); line-height: 1.2; }
.trow__price { font-size: 14px; flex: 0 0 auto; }
.trow__price small { font-size: 11px; color: var(--muted); font-weight: 600; }
.trow__cor { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 3px 0 8px; }
.trow__cor .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: 0 0 auto; }
.trow__sum { margin-left: auto; color: var(--red-text); font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.trow__sizes { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; mask-image: linear-gradient(90deg, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); }
.tsz { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: text; }
.tsz__cap { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.tsz__inp { width: 46px; height: 40px; text-align: center; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--field-bg); font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--ink); transition: border-color var(--dur), background var(--dur), box-shadow var(--dur); }
.tsz__inp:focus { outline: none; border-color: var(--fiber-red); box-shadow: 0 0 0 3px var(--fiber-red-soft); }
.tsz.has-qty .tsz__inp { border-color: var(--fiber-red); background: var(--fiber-red-soft); color: var(--red-text); }
.tsz.has-qty .tsz__cap { color: var(--red-text); }

/* ---------- Detalhe do produto (dentro do sheet) ---------- */
.pdetail__meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.grade__row { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 11px; display: flex; flex-direction: column; gap: 8px; transition: border-color var(--dur), background var(--dur); }
.grade__row.has-qty { border-color: var(--fiber-red); background: var(--fiber-red-soft); }
.grade__row .gsize { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.grade__row .gprice { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* ---------- Carrinho: FAB + resumo ---------- */
.cart-fab {
  position: fixed; right: 16px; bottom: calc(18px + var(--safe-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px;
  background: var(--fiber-red); color: #fff; border-radius: var(--r-pill); box-shadow: var(--sh-red);
  transform: translateY(120px); transition: transform var(--dur) var(--ease);
  font-family: var(--font-display); font-weight: 800;
}
.cart-fab.is-visible { transform: translateY(0); }
.cart-fab__ico { position: relative; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.16); display: grid; place-items: center; }
.cart-fab__count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--fiber-red); font-size: 11px; display: grid; place-items: center; box-shadow: var(--sh-sm); }
.cart-fab__total { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.cart-fab__total .lbl { font-size: 10px; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.08em; }
.cart-fab__total .val { font-size: 17px; }

/* Itens do carrinho */
.cart-item { display: flex; gap: 12px; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.cart-item__img { width: 62px; height: 62px; border-radius: var(--r-sm); background: var(--bg-2); object-fit: contain; flex: 0 0 auto; padding: 4px; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.cart-item__meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.cart-item__price { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
.cart-item__rm { font-size: 12px; color: var(--muted); font-weight: 600; }
.cart-totals .lin { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--ink-2); }
.cart-totals .lin.grand { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }

/* ---------- Resumo / finalização ---------- */
.summary-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.summary-line .k { color: var(--ink-soft); }
.summary-line .v { font-weight: 600; text-align: right; }
.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.data-grid .di .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.data-grid .di .v { font-weight: 600; font-size: 14px; margin-top: 2px; word-break: break-word; }
@media (max-width: 460px) { .data-grid { grid-template-columns: 1fr; } }

.order-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.order-row img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--bg-2); padding: 3px; }
.order-row .oinfo { flex: 1; min-width: 0; }
.order-row .oname { font-weight: 700; font-size: 14px; }
.order-row .ometa { font-size: 12px; color: var(--ink-soft); }
.order-row .oval { text-align: right; font-family: var(--font-display); font-weight: 800; }
.order-row .oval small { display: block; font-family: var(--font-ui); font-weight: 500; color: var(--muted); font-size: 11px; }

/* ---------- Sucesso ---------- */
.success { text-align: center; padding: var(--sp-9) var(--sp-4); }
.success__check { width: 92px; height: 92px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto var(--sp-5); animation: pop 0.5s var(--ease) both; }
.success__check svg { width: 46px; height: 46px; }
.success h1 { font-size: 26px; }
.success p { color: var(--ink-soft); max-width: 40ch; margin: var(--sp-3) auto 0; }
.success__order { display: inline-flex; margin-top: var(--sp-4); }

/* ---------- Footer ---------- */
.appfoot { margin-top: auto; padding: var(--sp-6) 0 calc(var(--sp-8) + var(--safe-bottom)); text-align: center; color: var(--ink-soft); font-size: 12px; }
.appfoot a { color: var(--ink-soft); font-weight: 600; }

/* ============================================================================
   ADMIN
   ========================================================================== */
.admin-shell { display: flex; min-height: 100dvh; background: var(--bg); }
.admin-side {
  width: 236px; flex: 0 0 auto; background: #17181a; color: #fff; padding: var(--sp-5) var(--sp-4);
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px;
}
.admin-side__brand { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-6); }
.admin-side__brand img { height: 30px; width: auto; }
.admin-side__brand span { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.05em; }
.admin-nav { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--r-sm); color: rgba(255,255,255,0.66); font-weight: 600; font-size: 14px; transition: all var(--dur); }
.admin-nav:hover { background: rgba(255,255,255,0.07); color: #fff; }
.admin-nav.is-active { background: var(--fiber-red); color: #fff; box-shadow: var(--sh-red); }
.admin-nav .ico { width: 20px; text-align: center; }
.admin-nav--logout { margin-top: auto; }
.admin-side__foot { font-size: 12px; color: rgba(255,255,255,0.4); padding-top: 10px; }
.admin-main { flex: 1; min-width: 0; padding: var(--sp-6); }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); gap: var(--sp-3); flex-wrap: wrap; }
.admin-topbar h1 { font-size: 24px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-4); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); box-shadow: var(--sh-xs); }
.kpi .kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; margin-bottom: 12px; background: var(--fiber-red-soft); }
.kpi .kpi-val { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.kpi .kpi-lbl { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-5); box-shadow: var(--sh-xs); }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.panel__head h3 { font-size: 17px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-top: var(--sp-4); }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } }

/* Charts (SVG) */
.chart { width: 100%; }
.chart-bar-track { fill: var(--bg-2); }
.bar-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-soft); }
.bar-legend .li { display: flex; align-items: center; gap: 6px; }
.bar-legend .sw { width: 10px; height: 10px; border-radius: 3px; }

/* Tabela admin */
.atable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.atable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.atable td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable tr { cursor: pointer; transition: background var(--dur); }
.atable tbody tr:hover { background: var(--card-tint); }
.atable .cust { font-weight: 700; }
.atable-wrap { overflow-x: auto; }

/* Status pills */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st--novo { background: var(--info-soft); color: var(--info-700); }
.st--visualizado { background: var(--warn-soft); color: var(--warn-700); }
.st--aprovado { background: var(--ok-soft); color: var(--ok-700); }
.st--cancelado { background: var(--danger-soft); color: var(--danger-700); }
/* variantes genéricas (painel de pedidos do representante) */
.st--ok { background: var(--ok-soft); color: var(--ok-700); }
.st--info { background: var(--info-soft); color: var(--info-700); }
.st--warn { background: var(--warn-soft); color: var(--warn-700); }
.st--danger { background: var(--danger-soft); color: var(--danger-700); }
.st--muted { background: var(--bg-2); color: var(--ink-soft); }

/* ---- Meus pedidos (área do representante) ---- */
.rp-lista { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.rp-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg); padding: 12px 14px; font: inherit; color: inherit;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.rp-item:hover, .rp-item.is-open { border-color: var(--ink-2); box-shadow: var(--shadow-sm); }
.rp-item__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rp-item__mid { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-item__bot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.rp-item__rast { margin-top: 6px; font-size: 12.5px; color: var(--info-700); }
.rp-item__com { margin-top: 6px; font-size: 12.5px; color: var(--ok-700); }
.rp-item__det { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; cursor: default; }
.rp-det__linha { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 3px 0; }
.rp-det__linha a { color: var(--info-700); }
.rp-det__total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.rp-det__obs { margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); background: var(--bg-2); border-radius: var(--r-sm); padding: 8px 10px; }
.rp-comissao { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; background: var(--bg-2); }
.rp-comissao__linha { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rp-comissao__linha strong { color: var(--ok-700); }
.rp-comissao__hint { margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.st--concluido { background: var(--bg-2); color: var(--ink-2); }

/* Login admin */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(900px 500px at 50% -10%, #2a2d33, #17181a 60%, #0e0f11); padding: var(--sp-4); }
.login-card { width: min(400px, 94vw); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: var(--sp-7) var(--sp-6); animation: fadeUp var(--dur) var(--ease) both; }
.login-card img { height: 44px; width: auto; margin: 0 auto var(--sp-5); }

/* Admin responsivo: sidebar vira topo */
@media (max-width: 720px) {
  .admin-shell { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: sticky; top: 0; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; padding: 10px var(--sp-3); z-index: 50; }
  .admin-side__brand { margin: 0 12px 0 4px; flex: 0 0 auto; }
  .admin-nav { flex: 0 0 auto; padding: 11px 12px; min-height: 44px; }
  .admin-nav span.txt { display: none; }
  .admin-nav .ico { font-size: 18px; }
  .admin-side__foot { display: none; }
  .admin-main { padding: var(--sp-4); }
}

/* ============================================================================
   TOQUE — alvos confortáveis em touch e telas estreitas (≥40-44px).
   No fim do último CSS carregado para vencer a cascata das definições base.
   ========================================================================== */
@media (pointer: coarse), (max-width: 480px) {
  .stepper--sm button { width: 40px; height: 40px; }
  .stepper--sm input.qty { height: 44px; font-size: 16px; }
  .swatch { min-height: 44px; padding: 9px 14px 9px 10px; }
  .vt-btn { min-height: 44px; }
  .sheet__close { width: 44px; height: 44px; }
  .pdh__close { width: 44px; height: 44px; }
  .pdh__nav { width: 46px; height: 46px; margin-top: -23px; }
  .pdh__thumb { width: 44px; height: 44px; }
  .stepper--sm button { width: 44px; height: 44px; }
  .tsz__inp { width: 48px; height: 44px; font-size: 16px; }
  .stepper--sm input.qty { width: 44px; }
  .trow__name { min-height: 44px; }
}

/* ============================================================================
   TEMA — botão flutuante claro/escuro (theme.js)
   ========================================================================== */
.theme-btn {
  position: fixed; left: 16px; bottom: calc(18px + var(--safe-bottom)); z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--sh-md); display: grid; place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur), color var(--dur);
}
.theme-btn--bar {
  position: static; width: 44px; height: 44px; box-shadow: none;
  background: transparent; border: 1px solid var(--line-2); flex: 0 0 auto;
}
.theme-btn:hover { transform: translateY(-2px); }
.theme-btn:active { transform: scale(0.94); }

/* ============================================================================
   VISÃO TABELA — barra de total da categoria (estilo planilha)
   ========================================================================== */
.tview__total {
  /* acima do FAB do carrinho pra soma nunca ficar encoberta */
  position: sticky; bottom: calc(84px + var(--safe-bottom)); z-index: 30;
  opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity var(--dur), transform var(--dur);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-md); padding: 12px 16px; margin-top: 2px;
}
.tview__total.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.tview__total .cap { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.tview__total .val { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.tview__total .val small { font-family: var(--font-ui); font-weight: 600; font-size: 12px; color: var(--ink-soft); margin-right: 8px; }
