:root {
  --navy: #163a63;
  --navy-2: #1e4d7b;
  --sky: #7ec8e3;
  --sky-soft: #e8f6fb;
  --cloud: #f7fbfe;
  --white: #ffffff;
  --ink: #16324a;
  --muted: #5b7388;
  --line: #d7ebf3;
  --ok: #1f7a4d;
  --ok-bg: #def4e8;
  --warn: #b0761a;
  --warn-bg: #fff3d8;
  --bad: #c23b3b;
  --bad-bg: #fde3e3;
  --shadow: 0 10px 30px rgba(22, 58, 99, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: hidden; }
body {
  font-family: Outfit, system-ui, sans-serif;
  background:
    radial-gradient(1200px 400px at 10% -10%, #d9f1fa 0%, transparent 55%),
    radial-gradient(900px 380px at 100% 0%, #cfe8f6 0%, transparent 50%),
    var(--cloud);
  color: var(--ink);
  display: grid;
  grid-template-columns: 280px 1fr;
}
body.login-body {
  display: block;
  grid-template-columns: none;
}

.sidebar {
  background: linear-gradient(180deg, #f4fbff 0%, #ffffff 40%);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  min-height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--navy);
  margin-bottom: 28px;
}
.brand-logo {
  width: 200px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(30, 77, 123, .12));
}
.product-brand {
  display: flex;
  gap: 16px;
  align-items: center;
}
.product-logo {
  width: 96px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}
.product-logo.is-product-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}
.product-photo-preview {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f6f8;
  border: 1px solid var(--line);
  margin-top: 8px;
}
.product-photo-preview[hidden] { display: none; }
.photo-error { display: block; color: #b91c1c; margin-top: 6px; }
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.catalog-form { margin-top: 20px; max-width: 760px; }
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #f3f6f8;
}
.product-card > img.is-logo {
  object-fit: contain;
  padding: 16px;
}
.product-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
  flex: 1;
}
.product-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}
.product-meta { margin: 0; color: var(--muted); font-size: 13px; }
.product-offers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.product-offers li {
  display: grid;
  gap: 2px;
}
.product-offers span { color: var(--muted); font-size: 13px; }
.product-offers strong { font-size: 20px; color: var(--navy); }
.product-offers small { color: var(--muted); font-size: 12px; }
.product-card .btn { width: 100%; margin-top: auto; }
.product-card-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.product-card-links a,
.product-card-links button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  width: auto;
  min-height: 0;
}
.product-card.is-inactive { opacity: .72; }
.shop-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x mandatory;
}
.shop-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e6eef3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(22, 58, 99, .06);
  display: flex;
  flex-direction: column;
}
.shop-card.is-inactive { opacity: .72; }
.shop-card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.shop-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #eef3f6;
}
.shop-card img.is-logo { object-fit: contain; padding: 16px; }
.shop-card-body { padding: 12px 14px 8px; }
.shop-kicker {
  margin: 0 0 6px;
  color: #8aa0b2;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.shop-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
}
.shop-description {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.shop-admin {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}
.shop-admin a,
.shop-admin button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}
.shop-admin button.is-danger { color: var(--bad); }
.promo-flag {
  display: block;
  margin: 6px 0 0;
  color: var(--bad);
  font-size: 12px;
  font-weight: 700;
}
.shop-tile a.shop-tile-link .promo-flag {
  padding: 0 10px 12px;
  margin: 0;
}
.price-was {
  color: #5c6b7a;
  font-size: 13px;
  font-weight: 500;
  margin-right: 6px;
}
.rank-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.rank-list { display: grid; gap: 12px; }
@media (max-width: 860px) {
  .rank-split { grid-template-columns: 1fr; }
}
.rank-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr auto;
  gap: 10px;
  align-items: center;
}
.rank-row a { color: var(--navy); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.rank-bar { height: 10px; background: #e7eef3; border-radius: 999px; overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--navy-2); min-width: 0; }
.rank-bar.is-low span { background: #8aa0b3; }
.rank-row strong { font-size: 13px; white-space: nowrap; }
@media (max-width: 720px) {
  .rank-row { grid-template-columns: 1fr auto; }
  .rank-bar { grid-column: 1 / -1; }
}
.cart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cart-bar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cart-bar .btn { width: auto; }
.buy {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 420px);
  gap: 24px;
  align-items: start;
}
.buy-photo {
  width: 100%;
  height: min(520px, 62vh);
  object-fit: cover;
  border-radius: 16px;
  background: #e7eef3;
}
.buy-photo.is-logo { object-fit: contain; padding: 32px; }
.buy-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.buy-panel h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; }
.buy-lead { margin: 0 0 18px; color: var(--muted); }
.buy-label, .buy-from {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.buy-price { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.buy-measure { margin: 8px 0 0; color: var(--muted); min-height: 1.2em; }
.size-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.size-pick { position: relative; }
.size-pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
}
.size-pick span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #d5dde5;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
}
.size-pick input:checked + span,
.size-pick input:focus-visible + span {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.qty-field { display: grid; gap: 6px; max-width: 140px; margin-top: 8px; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.buy-actions .btn { width: auto; }
.buy-cart {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.buy-cart ul { margin: 8px 0; padding-left: 18px; color: var(--muted); }
.buy-cart a { font-weight: 700; }
.muted { color: var(--muted); }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.sidebar nav { display: grid; gap: 8px; flex: 1; }
.sidebar a:not(.brand) {
  color: var(--navy-2);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 500;
}
.sidebar a.active,
.sidebar a:not(.brand):hover {
  background: var(--sky-soft);
  color: var(--navy);
}

.shell { min-width: 0; }
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 251, 254, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  align-items: center;
  gap: 10px;
}
.brand-mobile { margin: 0; flex: 1; flex-direction: row; align-items: center; }
.brand-mobile .brand-logo { width: 118px; height: auto; }
.menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  gap: 5px;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.nav-overlay { display: none; }

.content {
  padding: 32px 36px 56px;
  max-width: 1280px;
  width: 100%;
  min-width: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
h1 { margin: 6px 0 0; font-size: clamp(24px, 4vw, 34px); font-weight: 700; }
h2 { margin: 0; font-size: 18px; }

.kpis, .kpis-report, .kpis-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.low-stock { color: var(--bad); font-weight: 600; }
.check-set {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0;
  display: grid;
  gap: 4px;
}
.check-set legend {
  font-weight: 600;
  color: var(--navy);
  padding: 0 6px;
}
.custom-sizes { display: grid; gap: 8px; margin: 8px 0; }
.custom-size-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.9fr));
  gap: 8px;
}
@media (max-width: 640px) {
  .custom-size-row { grid-template-columns: 1fr; }
}
.order-items-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--sky-soft);
}
.order-items { display: grid; gap: 12px; }
.order-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.order-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.order-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  gap: 12px;
}
.order-item-grid label { display: grid; gap: 6px; }
.item-size-field { grid-column: span 2; }
.item-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--sky-soft);
}
.item-summary span, .item-stock { color: var(--muted); font-size: 12px; }
.item-stock { grid-column: 1 / -1; }
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.kpi span { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi strong { display: block; margin-top: 8px; font-size: clamp(16px, 2vw, 22px); }
.kpi-ok { background: linear-gradient(180deg, #f3fbf6, #fff); }
.kpi-warn { background: linear-gradient(180deg, #fffaf0, #fff); }
.kpi-bad { background: linear-gradient(180deg, #fff6f6, #fff); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; word-break: break-word; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.orders-table { min-width: 1080px; }
.orders-table th,
.orders-table td[data-label="Qtd"],
.orders-table td[data-label="Pedido"],
.orders-table td[data-label="Entrega"],
.orders-table td[data-label="Status"] { white-space: nowrap; word-break: normal; }
.orders-table .status-select {
  width: 148px;
  min-width: 148px;
  min-height: 36px;
  padding: 6px 8px;
}
.stock-qty {
  width: 110px;
  min-width: 110px;
  min-height: 36px;
  padding: 6px 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  min-height: 42px;
}
.btn-primary { background: var(--navy-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-sm { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}
.badge-pago { background: var(--ok-bg); color: var(--ok); }
.badge-em_prazo { background: var(--warn-bg); color: var(--warn); }
.badge-atrasado { background: var(--bad-bg); color: var(--bad); }
.badge-vencido { background: var(--bad-bg); color: var(--bad); }
.badge-pendente { background: var(--sky-soft); color: var(--navy-2); }
.badge-negociacao { background: #ffedd5; color: #c2410c; }
.badge-aberto { background: var(--sky-soft); color: var(--navy-2); }
.badge-dda { background: #dceaf8; color: var(--navy); }
.badge-cartorio_pendente, .badge-cartorio { background: #f6d8d5; color: var(--bad); }
.badge-antecipado { background: #e4ddf8; color: #4c3d8a; }
.badge-carro { background: #dceaf8; color: var(--navy); }
.badge-carro_grande { background: #c9dcf0; color: var(--navy); }
.badge-moto { background: var(--sky-soft); color: var(--navy-2); }
.block { display: block; color: var(--muted); font-weight: 500; }
.check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.check input { width: auto; min-height: auto; }
.perm-grid { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0; }
.perm-check { min-height: 28px; font-size: 13px; }
.antecipa { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.antecipa input, .antecipa select { min-height: 36px; width: 110px; padding: 6px 8px; }
.wrap-actions { flex-wrap: wrap; }

.filters, .date-filter, .form-grid, .split { display: grid; gap: 12px; }
.filters { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 240px)); margin-bottom: 16px; }
.date-filter label, .filters label, .form-grid label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
input, select, textarea {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  min-height: 44px;
}
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; }
.split { grid-template-columns: minmax(260px, 360px) 1fr; align-items: start; }
.ficha-form { display: grid; gap: 20px; position: relative; }
.btn-default-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.cadastro-nova {
  border-top: 1px solid var(--line);
  padding: 16px 16px 18px;
  display: grid;
  gap: 12px;
}
.cadastro-nova h3 { margin: 0; font-size: 15px; }
.measure-actions { white-space: nowrap; }
.measure-actions .btn { width: auto; }
.measure-table th,
.measure-table td { white-space: nowrap; word-break: normal; }
.measure-table td:first-child { white-space: normal; min-width: 120px; }
.measure-table input { min-width: 96px; }
.measure-table input[readonly] { background: #f6f6f6; color: #1a1a1a; }
.profit-apply { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 16px; max-width: 480px; }
.profit-apply label { flex: 1; min-width: 180px; }
.measure-cell { display: block; min-width: 0; }
.measure-line-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}
.measure-line-edit label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.measure-line-edit input {
  width: 72px;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
}
.empty { color: var(--muted); padding: 16px 0; }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.flash-ok { background: var(--ok-bg); }
.flash-warn { background: var(--warn-bg); }
.flash-error { background: var(--bad-bg); }
.inline { margin: 0; }
.period { margin: 8px 0 0; color: var(--muted); font-weight: 500; overflow-wrap: anywhere; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint, .lead { color: var(--muted); margin: 0 0 12px; }
input.input-ok { border-color: #7dcca0; background: #f4fff8; }
input.input-bad { border-color: #e08a8a; background: #fff6f6; }
label small, [data-doc-status] { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
[data-doc-status].doc-ok { color: var(--ok); }
[data-doc-status].doc-bad { color: var(--bad); }
.credit-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--sky-soft);
}
.credit-box .credit-title { margin: 0 0 4px; font-weight: 600; }
.credit-box p { margin: 0; }
.credit-bom { background: var(--ok-bg); border-color: #b7e4c7; }
.credit-regular { background: var(--warn-bg); border-color: #f0d59a; }
.credit-ruim, .credit-restrito { background: var(--bad-bg); border-color: #f0b4b4; }
.login-card { max-width: 560px; width: 100%; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-wrap {
  width: min(100%, 440px);
  text-align: center;
}
.login-wrap .brand-logo { width: min(280px, 82vw); height: auto; margin: 0 auto 8px; }
.catalog-page { width: min(1100px, 100%); margin: 0 auto; padding: 28px 16px 64px; }
.catalog-page .catalog-form { max-width: none; }
.catalog-head { text-align: center; margin-bottom: 20px; }
.catalog-top { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.catalog-head .brand-logo { width: min(240px, 78vw); height: auto; }
.catalog-sale { display: grid; gap: 12px; margin-bottom: 20px; }
.catalog-sale h2 { margin: 0; }
.catalog-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.catalog-lines li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.catalog-lines form { margin: 0; }
.catalog-finish { display: grid; gap: 12px; }
.catalog-pay-options { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.catalog-pay-options legend { font-weight: 700; font-size: 14px; }
.catalog-pay-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.catalog-pay-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  border: 2px solid #8aa0b3;
  border-radius: 50%;
  background: #fff;
}
.catalog-pay-option input[type="radio"]:checked {
  border-color: #1e4d7b;
  background: radial-gradient(circle, #1e4d7b 0 4px, #fff 5px);
}
.catalog-pay-option span { font-weight: 700; font-size: 14px; line-height: 1.25; }
.catalog-pay-option small { display: block; margin-top: 1px; font-size: 12px; font-weight: 500; line-height: 1.3; }
.catalog-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.catalog-choices form { margin: 0; }
.catalog-choices .btn { width: 100%; min-height: 64px; flex-direction: column; gap: 2px; }
.catalog-choices small { font-weight: 500; opacity: .9; }
.btn-app { background: #1f7a4d; color: #fff; }
.btn-consultor { background: #c2410c; color: #fff; }
.catalog-freight { background: #f7faf8; border-radius: 12px; padding: 12px; }
.catalog-cep { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.catalog-totals { display: grid; gap: 6px; }
.catalog-totals p { margin: 0; }
.catalog-total-row { display: flex; justify-content: space-between; gap: 16px; }
.catalog-address { margin: 0; font-weight: 700; }
@media (max-width: 640px) { .catalog-choices { grid-template-columns: 1fr; } }
.catalog-add { display: grid; gap: 8px; margin-top: 10px; }
.catalog-add .btn { width: 100%; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.catalog-photo {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #eef3f6;
  cursor: zoom-in;
  font: inherit;
}
.catalog-photo img { display: block; pointer-events: none; }
body.catalog-viewer-open { overflow: hidden; }
.catalog-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 56px 16px 24px;
  background: rgba(15, 23, 32, .92);
}
.catalog-viewer[hidden] { display: none; }
.catalog-viewer-close { position: absolute; top: 14px; right: 14px; }
.catalog-viewer-figure { margin: 0; width: min(960px, 100%); }
.catalog-viewer-stage {
  height: min(78vh, 820px);
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: zoom-in;
  background: #fff;
  border-radius: 12px;
}
.catalog-viewer-stage.is-zoomed { cursor: zoom-out; }
.catalog-viewer-stage img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
}
.catalog-viewer figcaption {
  margin-top: 10px;
  color: #fff;
  text-align: center;
  font-weight: 700;
}
.catalog-viewer-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
  justify-content: center;
}
.catalog-viewer-thumbs[hidden] { display: none !important; }
.catalog-viewer-thumbs button {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.catalog-viewer-thumbs button.is-on { border-color: #f3d19a; }
.catalog-viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pix-card { margin-top: 20px; display: grid; gap: 12px; }
.pix-card h2, .pix-card h3 { margin: 0; }
.pix-bank { margin-top: 8px; }
.pix-view { display: grid; justify-items: center; gap: 12px; text-align: center; }
.pix-view[hidden] { display: none !important; }
.pix-view img { width: min(280px, 70vw); height: auto; background: #fff; }
.pix-code { width: 100%; max-width: 100%; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: #fafafa; padding: 12px; border-radius: 8px; text-align: left; }
.pix-status { margin: 0; font-size: 18px; font-weight: 800; color: var(--navy); }
.pix-status.is-paid { color: var(--ok); }
.whatsapp-card { margin-top: 20px; display: grid; gap: 12px; }
.whatsapp-card h2 { margin: 0; }
#whatsapp-qr { width: min(260px, 100%); height: auto; aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.login-wrap h1 { margin-bottom: 8px; }
.login-wrap .login-card { text-align: left; margin: 16px auto 0; }
.logout { margin-top: 18px; }
.logout .btn { width: 100%; }
.login-rules { max-width: 640px; margin-bottom: 16px; }
.rule-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink); }
.rule-list li { margin: 6px 0; }
.split-list {
  margin: 6px 0 0;
  padding-left: 16px;
  color: var(--muted);
  font-size: 13px;
}
.split-list li { margin: 2px 0; }
.kpi small { display: block; margin-top: 6px; color: var(--muted); font-weight: 500; }
.meta-card { margin-bottom: 16px; }
.meta-track {
  height: 14px;
  background: var(--sky-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 10px;
}
.meta-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--navy-2));
  border-radius: inherit;
  min-width: 0;
}
.meta-copy { margin: 0 0 12px; font-weight: 600; }
.formula-card { margin-bottom: 16px; }
.order-freight { border: 1px solid #eee; border-radius: 8px; padding: 16px; }
.order-freight h2 { font-size: 16px; margin-bottom: 4px; }
.order-freight .form-actions { align-self: end; }
.formula {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
code { background: var(--sky-soft); padding: 2px 6px; border-radius: 6px; }
.tabs { display: flex; gap: 8px; margin: 0 0 16px; flex-wrap: wrap; }
.tab {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
}
.tab.active { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.snap {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
}
.barcode-box {
  margin: 16px 0 8px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}
.barcode-box svg { width: min(100%, 420px); height: auto; display: block; }
.etiqueta { max-width: 640px; }
@media print {
  .sidebar, .topbar, .nav-overlay, .no-print, .flash { display: none !important; }
  body { display: block; background: #fff; }
  .shell, .content { padding: 0; }
  .etiqueta { box-shadow: none; border: 1px solid #ccc; page-break-after: always; break-after: page; }
  .etiqueta:last-of-type { page-break-after: auto; break-after: auto; }
}

@media (max-width: 1100px) {
  .kpis, .kpis-report, .kpis-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .order-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  body { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 40;
    box-shadow: var(--shadow);
    min-height: 100%;
  }
  .nav-toggle:checked ~ .sidebar { transform: translateX(0); }
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(22, 58, 99, .35);
    z-index: 30;
  }
  .nav-toggle:checked ~ .nav-overlay { display: block; }
  .topbar { display: flex; }
  .topbar .btn { width: auto; flex-shrink: 0; }
  .content { padding: 18px 14px 88px; overflow-x: hidden; }
  .hide-sm { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .order-item-grid { grid-template-columns: 1fr; }
  .item-size-field { grid-column: auto; }
  .kpis, .kpis-report, .kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { align-items: stretch; width: 100%; }
  .product-brand { flex-direction: column; align-items: flex-start; }
  .buy { grid-template-columns: 1fr; }
  .buy-photo { height: 240px; }
  .cart-bar { flex-direction: column; align-items: stretch; }
  .cart-bar .btn { width: 100%; }
  .page-head > div { min-width: 0; }
  .page-head > .btn { width: 100%; }
  .head-actions { width: 100%; }
  .head-actions .btn,
  .head-actions form { flex: 1 1 140px; }
  .head-actions .btn { width: 100%; }
  .date-filter { width: 100%; }
  .date-filter input { width: 100%; }
  .filters { grid-template-columns: 1fr; }
  .filters select,
  .filters input,
  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .meta-form input,
  .login-card input,
  .login-card select { width: 100%; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .formula { font-size: 16px; overflow-wrap: anywhere; }
  .antecipa { width: 100%; }
  .antecipa input,
  .antecipa select { width: 100%; min-width: 0; }

  .stack-table thead { display: none; }
  .stack-table,
  .stack-table tbody { display: block; width: 100%; }
  .stack-table tr {
    display: grid;
    gap: 8px;
    background: var(--sky-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
  }
  .stack-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 4px 0;
    align-items: center;
    min-width: 0;
  }
  .stack-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex: 0 0 38%;
    max-width: 42%;
  }
  .stack-table td.actions,
  .stack-table td.wrap-actions,
  .stack-table td[data-label="Ações"],
  .stack-table td[data-label="Ação"] {
    flex-direction: column;
    align-items: stretch;
  }
  .stack-table td.actions::before,
  .stack-table td.wrap-actions::before,
  .stack-table td[data-label="Ações"]::before,
  .stack-table td[data-label="Ação"]::before {
    max-width: none;
    flex: none;
  }
  .stack-table td > .measure-cell {
    flex: 1;
    min-width: 0;
    text-align: right;
  }
  .stack-table td.measure-edit {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .stack-table td.measure-edit::before {
    flex: none;
    max-width: none;
  }
  .stack-table td.measure-edit > input {
    width: 100%;
  }
  .stack-table .measure-line-edit {
    display: grid;
    gap: 8px;
    margin-top: 0;
  }
  .stack-table .measure-line-edit > span { display: none; }
  .stack-table .measure-line-edit label {
    display: grid;
    grid-template-columns: minmax(7.2rem, 1fr) 5.5rem auto;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  .stack-table .measure-line-edit input {
    width: 100%;
    min-height: 44px;
  }
  .stack-table .btn,
  .stack-table select,
  .stack-table form { width: 100%; }
  .orders-table { min-width: 0; }
  .orders-table .status-select,
  .stock-qty { width: 100%; min-width: 0; }
  .measure-table th,
  .measure-table td { white-space: normal; }
  .measure-table input { min-width: 0; width: 100%; }
}

@media (max-width: 420px) {
  .kpis, .kpis-report, .kpis-4 { grid-template-columns: 1fr; }
  .brand-logo { width: 168px; height: auto; }
}

.finance-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.meter { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 4px; }
.meter span { display: block; height: 100%; background: var(--navy-2); }
.meter.is-high span { background: var(--bad); }
.money-in { color: var(--ok); font-weight: 700; }
.money-out { color: var(--bad); font-weight: 700; }
.badge-conectado { background: var(--ok-bg); color: var(--ok); }
.badge-importado { background: #dceaf8; color: var(--navy); }
.badge-erro { background: var(--bad-bg); color: var(--bad); }
.badge-demo { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 860px) {
  .finance-pair { grid-template-columns: 1fr; }
}

.shop-body { background: #f3f5f7; }
.shop-page {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 env(safe-area-inset-right) calc(32px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}
.shop-narrow { width: min(560px, 100%); }
.shop-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 44px;
  align-items: center;
  min-height: 56px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: #fff;
  position: sticky;
  top: 0;
}
.shop-bar strong {
  text-align: center;
  font-size: 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-back, .shop-cart {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #1c2b3a;
  text-decoration: none;
  font-size: 28px;
  position: relative;
}
.shop-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: auto;
  padding-right: 8px;
  font-size: 15px;
  font-weight: 700;
}
.shop-back-arrow { font-size: 28px; line-height: 1; }
.stack { display: grid; gap: 16px; margin-top: 16px; }
.chat-dock {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  justify-items: end;
  gap: 8px;
}
.chat-panel[hidden],
.chat-open[hidden] { display: none !important; }
.chat-open, .chat-panel button, .chat-panel form button {
  font: inherit;
  cursor: pointer;
}
.chat-open {
  border: 0;
  border-radius: 999px;
  background: #1e4d7b;
  color: #fff;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 700;
}
.chat-panel {
  width: min(340px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid #d5dde5;
  border-radius: 16px;
  display: grid;
  grid-template-rows: auto minmax(160px, 280px) auto;
  overflow: hidden;
}
.chat-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e7eef3;
}
.chat-panel header button {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
}
.chat-log { display: grid; align-content: start; gap: 8px; padding: 12px; overflow: auto; }
.chat-bot, .chat-user, .chat-consultant {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.chat-bot { background: #f3f6f8; color: #1c2b3a; }
.chat-user { background: #1e4d7b; color: #fff; justify-self: end; }
.chat-consultant {
  display: inline-block;
  width: fit-content;
  background: #1f7a4d;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.chat-options { display: grid; gap: 8px; }
.chat-option {
  font: inherit;
  text-align: left;
  border: 1px solid #1e4d7b;
  background: #fff;
  color: #1e4d7b;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}
.chat-option:disabled { opacity: .55; cursor: default; }
.chat-panel form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e7eef3; }
.chat-panel form input { flex: 1; min-width: 0; min-height: 40px; border: 1px solid #d5dde5; border-radius: 10px; padding: 0 10px; font: inherit; }
.chat-panel form button { border: 0; border-radius: 10px; background: #9a7433; color: #fff; padding: 0 12px; font-weight: 700; }
.shop-cart span {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  background: #9a7433;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}
.shop-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 8px 16px 0; }
.shop-steps li { flex: 1; height: 4px; border-radius: 99px; background: #e4e8ec; }
.shop-steps li.is-on { background: #9a7433; }
.shop-hero, .shop-sheet, .shop-done { padding: 16px; display: grid; gap: 12px; }
.shop-hero { text-align: center; }
.shop-hero img { width: min(220px, 70%); height: auto; margin: 0 auto; }
.shop-hero h1, .shop-sheet h1, .shop-done h1 { margin: 0; font-size: 26px; }
.shop-hero p, .shop-sheet p { margin: 0; color: #5c6b7a; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 16px 16px; }
.shop-tile {
  display: grid;
  gap: 6px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border: 1px solid #e6ebf0;
}
.shop-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef2f5; }
.shop-tile span, .shop-line strong { font-weight: 700; }
.shop-tile a { padding: 0 10px 10px; font-size: 13px; color: inherit; text-decoration: none; font-weight: 700; }
.shop-tile a.shop-tile-link { display: grid; gap: 6px; padding: 0; cursor: pointer; }
.shop-tile a.shop-tile-link span { padding: 0 10px 10px; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.shop-zoom { aspect-ratio: 1; overflow: hidden; border-radius: 16px; }
.shop-zoom img { width: 100%; height: 100%; object-fit: cover; transform-origin: center center; }
.shop-gallery { display: grid; gap: 8px; }
.shop-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.shop-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid #e6ebf0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}
.shop-thumb.is-on { border-color: #9a7433; }
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.shop-zoom-hint { margin: 8px 0 0; color: #5c6b7a; font-size: 13px; text-align: center; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.photo-strip-item { display: grid; gap: 6px; width: 96px; }
.photo-strip-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: #eef2f5; }
.photo-strip-item .btn { width: 100%; }
.shop-line-photo { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 10px; overflow: hidden; }
.shop-line-photo img { width: 72px; height: 72px; object-fit: cover; }
.shop-product { display: block; }
.shop-hero, .shop-actions { width: min(720px, 100%); margin-left: auto; margin-right: auto; }
.shop-product > :first-child { padding: 0 16px; min-width: 0; }
@media (min-width: 640px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 800px) {
  .shop-product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr); gap: 24px; align-items: start; padding: 16px; }
  .shop-product > :first-child { padding: 0; }
  .shop-product .shop-sheet { padding-top: 0; }
}
@media (min-width: 960px) {
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 420px) {
  .shop-choice { align-items: flex-start; }
  .shop-line { align-items: flex-start; }
}
.shop-pay-note {
  margin: 12px 0 0;
  color: #1c2b3a;
  font-size: 14px;
  font-weight: 600;
}
.shop-choice .shop-prices {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
  text-align: right;
}
.shop-prices strong small { font-weight: 600; color: #5c6b7a; }
.shop-prices .card-price { color: #1c2b3a; font-weight: 600; }
.shop-btn, .shop-path, .shop-btn-ghost, .shop-btn-whats {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.shop-btn { background: #9a7433; color: #fff; }
.shop-btn-ghost { background: #fff; color: #1c2b3a; border: 1px solid #d5dde5; }
.shop-btn-whats { background: #1f7a4d; color: #fff; }
.shop-link { display: block; text-align: center; color: #1e4d7b; }
.shop-actions { display: grid; gap: 12px; padding: 0 16px 24px; }
.shop-choice, .shop-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d7ebf3;
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}
.shop-sheet > label:not(.shop-choice) { display: grid; gap: 6px; min-width: 0; }
.shop-sheet form { display: grid; gap: 12px; }
.shop-sheet form > label { display: grid; gap: 6px; min-width: 0; }
.shop-choice input[type="radio"],
.shop-pix-modes input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 0;
  padding: 0;
  flex: 0 0 18px;
  border: 2px solid #8aa0b3;
  border-radius: 50%;
  background: #fff;
}
.shop-choice input[type="radio"]:checked,
.shop-pix-modes input[type="radio"]:checked {
  border-color: #1e4d7b;
  background: radial-gradient(circle, #1e4d7b 0 4px, #fff 5px);
}
.shop-choice span, .shop-line span { display: grid; flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; }
.shop-choice strong, .shop-line > strong { flex-shrink: 0; }
.shop-line { flex-wrap: wrap; }
.shop-subtotal span, .catalog-total-row span { min-width: 0; overflow-wrap: anywhere; }
.shop-choice small, .shop-line small { color: #5c6b7a; font-weight: 500; }
.shop-line img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: #eef2f5; }
.shop-line .shop-qty {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.shop-qty form { margin: 0; display: flex; }
.shop-qty b { min-width: 12px; text-align: center; font-size: 15px; }
.shop-qty button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #8aa0b3;
  background: #fff;
  color: #16324a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  -webkit-appearance: none;
  appearance: none;
}
.shop-qty svg { display: block; }
.shop-subtotal, .shop-summary { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.shop-summary { list-style: none; padding: 0; display: grid; gap: 8px; }
.shop-summary li { display: flex; justify-content: space-between; gap: 12px; }
.shop-path {
  width: 100%;
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 14px;
  background: #fff;
  color: #1c2b3a;
  border: 1px solid #d7ebf3;
  text-align: left;
}
.shop-path small { font-weight: 500; color: #5c6b7a; }
.shop-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-switch label {
  display: flex;
  justify-content: center;
  min-height: 40px;
  align-items: center;
  border: 1px solid #d5dde5;
  border-radius: 10px;
  background: #fff;
  font-weight: 700;
}
.shop-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; }
.shop-switch label:has(input:checked) { background: #1e4d7b; color: #fff; border-color: #1e4d7b; }
.shop-pix-modes { display: grid; gap: 6px; padding-left: 28px; }
.shop-pix-modes label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.shop-pix-modes small { display: block; font-weight: 500; color: #5c6b7a; }
.shop-done { text-align: center; }
.shop-check {
  width: 72px;
  height: 72px;
  margin: 12px auto 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1f7a4d;
  color: #fff;
  font-size: 36px;
}
.shop-points { text-align: left; margin: 16px auto 0; max-width: 320px; color: #1c2b3a; }

.home-body { background: #f6f1e8; }
.home-page { width: min(1180px, 100%); }
.home-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
}
.home-brand { justify-self: center; }
.home-brand img { width: min(220px, 46vw); height: auto; display: block; }
.home-tools { display: flex; align-items: center; gap: 4px; }
.home-menu, .home-search { position: relative; }
.home-menu summary, .home-search summary {
  list-style: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 22px;
  color: #163a63;
}
.home-menu summary {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 800;
}
.home-menu summary span { font-size: 22px; line-height: 1; }
.home-menu summary::-webkit-details-marker,
.home-search summary::-webkit-details-marker { display: none; }
.home-menu nav, .home-search form {
  position: absolute;
  top: 44px;
  z-index: 5;
  background: #fff;
  border: 1px solid #e4d8c8;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(22, 58, 99, .12);
}
.home-menu nav {
  left: 0;
  display: grid;
  gap: 8px;
  min-width: min(280px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 10px;
}
.home-menu a {
  display: flex;
  justify-content: center;
  text-align: center;
  background: #163a63;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 14px 18px;
  line-height: 1.2;
}
.home-menu a:hover { background: #1e4d7b; }
.home-search form { right: 0; padding: 8px; }
.home-search input { width: min(240px, 70vw); min-height: 40px; }
.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 8px 16px 20px;
  align-items: center;
}
.home-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-transform: none;
  color: #16324a;
}
.home-copy p { margin: 0 0 10px; color: #3d4d5c; font-size: 15px; }
.home-copy p.home-tagline { font-style: italic; color: #c9a227; font-weight: 600; font-size: 16px; }
.home-copy p.home-slogan { font-weight: 700; color: #1f2d3a; margin-top: 14px; }
.home-sign { color: #163a63 !important; font-weight: 800; }
.home-sign span { display: block; font-weight: 500; color: #3d4d5c; }
.home-note {
  margin-top: 12px !important;
  background: #163a63;
  color: #fff !important;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
}
.home-hero-photo {
  width: min(100%, 280px);
  min-height: 0;
  max-height: 160px;
  aspect-ratio: 16/9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #f6f1e8;
}
.home-hero-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.home-feature { display: grid; gap: 8px; }
.home-feature-name { text-align: center; font-weight: 800; color: #163a63; text-decoration: none; }
.home-catalog { padding: 4px 0 8px; }
.home-catalog h2 { margin: 0 16px 12px; color: #163a63; font-size: clamp(22px, 5vw, 28px); }
.home-benefits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 16px 20px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
}
.home-benefits article { display: grid; justify-items: center; text-align: center; gap: 6px; color: #163a63; }
.home-benefits strong { font-size: 14px; }
.home-benefits small { display: block; font-weight: 500; color: #5c6b7a; }
.home-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #163a63;
  color: #fff;
}
.home-icon svg { width: 26px; height: 26px; }
.home-reviews { padding: 8px 16px 28px; text-align: center; }
.home-reviews h2 { margin: 0; font-size: clamp(20px, 3vw, 26px); color: #163a63; }
.home-reviews h2 span { color: #1f7a4d; }
.home-reviews > p { margin: 4px 0 12px; color: #5c6b7a; font-size: 14px; }
.home-mosaic { display: grid; grid-template-columns: 1fr; gap: 8px; text-align: left; }
.home-quote {
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 8px;
  align-items: center;
}
.home-quote-copy { display: grid; gap: 4px; min-width: 0; }
.home-quote-copy > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.home-quote b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #163a63;
  color: #fff;
  font-size: 12px;
}
.home-quote strong { font-size: 13px; }
.home-quote small { margin-left: auto; color: #c9a227; letter-spacing: .08em; font-size: 11px; }
.home-quote p {
  margin: 0;
  color: #3d4d5c;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-shot {
  width: 108px;
  height: 80px;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f1e8;
}
.home-shot img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 8px 16px 28px;
}
.home-actions .home-cta { margin-top: 0; }
.home-cta {
  display: inline-flex;
  margin-top: 18px;
  background: #163a63;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 14px 22px;
}
@media (min-width: 640px) {
  .home-mosaic { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .home-benefits { grid-template-columns: 1fr; }
  .shop-switch { grid-template-columns: 1fr; }
}
@media (min-width: 800px) {
  .home-hero { grid-template-columns: 1.05fr .95fr; gap: 28px; padding: 12px 20px 28px; }
  .home-benefits { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-mosaic { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .custom-size-row { grid-template-columns: 1fr; }
  .content {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
}
@media (max-width: 420px) {
  .stack-table .measure-line-edit label {
    grid-template-columns: 1fr;
    white-space: normal;
  }
}
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.rep-product img { width: 100%; height: 160px; object-fit: contain; background: #f6f1e8; border-radius: 8px; }
.rep-product h2 { font-size: 18px; margin: 10px 0 4px; }
.rep-sizes { margin: 8px 0 12px; padding-left: 18px; color: #3d4d5c; font-size: 14px; }
.rep-line { border: 1px solid #eee; border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.login-screen {
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.home-cta { max-width: 100%; }
.card, .shop-page, .home-page { max-width: 100%; }
