/* ============================================================
   Vale Tech Imports · Store Admin — Gold & Tech Blue design system
   Tokens → Reset → Layout → Components → Screens → Utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- TOKENS ---------- */
:root {
  /* Declara o esquema ao navegador: em claro, "light" desativa o
     escurecimento forçado do Chrome Android; em escuro, "dark" acerta
     scrollbars e controles nativos. */
  color-scheme: light;
  /* marca */
  --coral:        #C9A843;
  --coral-deep:   #A87F22;
  --coral-soft:   #E5CA8A;
  --coral-glow:   #FFF5D6;
  --magenta:      #3D7DD8;
  --magenta-deep: #2458A8;
  --rose:         #D6E8F5;
  --plum:         #0D1B2A;
  --cream:        #F8FAFC;
  --peach:        #EEF3F9;

  /* neutros */
  --ink:       #0D1B2A;
  --ink-soft:  #1E3A50;
  --gray-900:  #162130;
  --gray-700:  #4A6070;
  --gray-600:  #607080;
  --gray-500:  #7A8FA6;
  --gray-300:  #C0CDD8;
  --gray-200:  #DDE6EE;
  --gray-100:  #EEF3F9;
  --white:     #ffffff;

  /* estado */
  --mint:     #d6f5e4;
  --mint-ink: #1b7a42;
  --sun:      #fff4c7;
  --sun-ink:  #8a5d0a;
  --danger:   #d83a3a;
  --danger-bg:#fff0f0;

  /* gradientes */
  --grad-hero: linear-gradient(135deg, #C9A843 0%, #3D7DD8 100%);
  --grad-soft: linear-gradient(135deg, #EEF3F9 0%, #D6E8F5 100%);
  --grad-dark: linear-gradient(135deg, #0D1B2A 0%, #050D14 100%);
  --grad-mesh: radial-gradient(ellipse at 20% 10%, #E5CA8A 0%, transparent 45%),
               radial-gradient(ellipse at 80% 70%, #D6E8F5 0%, transparent 45%),
               #F8FAFC;

  /* tipografia */
  --f-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* raios */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* sombras */
  --sh-sm:    0 1px 2px rgba(26,15,10,.06), 0 1px 3px rgba(26,15,10,.04);
  --sh-md:    0 4px 14px rgba(26,15,10,.08), 0 2px 4px rgba(26,15,10,.04);
  --sh-lg:    0 20px 50px rgba(26,15,10,.12), 0 6px 12px rgba(26,15,10,.06);
  --sh-glow:  0 10px 40px rgba(201,168,67,.32);
  --sh-glow-m:0 10px 40px rgba(61,125,216,.25);

  /* layout */
  --sidebar-w: 268px;
  --topbar-h:  78px;
}

/* ---------- DARK MODE ---------- */
/* Mantém marca coral/magenta. Troca cream → ink, ink → cream, neutros invertidos. */
[data-theme="dark"] {
  color-scheme: dark;
  --ink:        #f5ede3;
  --ink-soft:   #d8ccc2;
  --gray-900:   #ece3d9;
  --gray-700:   #b8aba1;
  --gray-600:   #9a8a82;
  --gray-500:   #83746c;
  --gray-300:   #4a3a32;
  --gray-200:   #3a2820;
  --gray-100:   #2b1d17;
  --white:      #1a0f0a;
  --cream:      #1a0f0a;
  --peach:      #151E2A;
  --coral-glow: #2A3A0A;
  --rose:       #0D2040;
  --mint:       #1d3a28;
  --sun:        #3a2d10;
  --danger-bg:  #3a1818;
  --grad-soft:  linear-gradient(135deg, #151E2A 0%, #0D2040 100%);
  --grad-mesh:  radial-gradient(ellipse at 20% 10%, #2A3A0A 0%, transparent 45%),
                radial-gradient(ellipse at 80% 70%, #0D2A4A 0%, transparent 45%),
                #070F18;
  --sh-sm:    0 1px 2px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.3);
  --sh-md:    0 4px 14px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3);
  --sh-lg:    0 20px 50px rgba(0,0,0,.6), 0 6px 12px rgba(0,0,0,.4);
}

[data-theme="dark"] body { background: var(--cream); color: var(--ink); }
[data-theme="dark"] img[src*="brand/"] { filter: invert(1) hue-rotate(180deg) saturate(0.9) brightness(1.1); }

/* ============================================================
   TEMAS SAZONAIS — apenas acentos e ambientacao.
   Nucleo da marca (coral, magenta, plum) preservado.
   Mexem em: peach, coral-glow, rose, grad-soft, grad-mesh.
   ============================================================ */

/* 🚀 LANÇAMENTO — azul elétrico + dourado, energia de novidade */
html[data-season="lancamento"]:not([data-theme="dark"]) {
  --peach:       #e4eefb;
  --coral-glow:  #d0e2f8;
  --rose:        #bcd6f5;
  --grad-soft:   linear-gradient(135deg, #e4eefb 0%, #bcd6f5 50%, #E5CA8A 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #9bbce0 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #E5CA8A 0%, transparent 45%),
                 #f4f8fd;
  --season-icon: "🚀";
  --season-label: "lançamento";
}

/* 🎮 GAMER — roxo neon + ciano, RGB vibes sobre fundo claro */
html[data-season="gamer"]:not([data-theme="dark"]) {
  --peach:       #ede8fb;
  --coral-glow:  #ddd2f8;
  --rose:        #cfeef5;
  --grad-soft:   linear-gradient(135deg, #ede8fb 0%, #c8b8f0 50%, #a8e6f0 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #b8a0f0 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #7adce8 0%, transparent 45%),
                 #f7f5fd;
  --season-icon: "🎮";
  --season-label: "gamer";
}

/* 🎒 VOLTA ÀS AULAS — verde menta + azul céu, frescor de recomeço */
html[data-season="volta-aulas"]:not([data-theme="dark"]) {
  --peach:       #e2f5ec;
  --coral-glow:  #cfeede;
  --rose:        #c2e8f0;
  --grad-soft:   linear-gradient(135deg, #e2f5ec 0%, #b8e0d0 50%, #a8c8e8 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #a8dcc4 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #a8c8e8 0%, transparent 45%),
                 #f2faf6;
  --season-icon: "🎒";
  --season-label: "volta às aulas";
}

/* 💝 DIA DAS MÃES — rosa suave + dourado (presentes: fones, perfumes) */
html[data-season="dia-maes"]:not([data-theme="dark"]) {
  --peach:       #ffe8f0;
  --coral-glow:  #ffd8e6;
  --rose:        #ffc8dc;
  --grad-soft:   linear-gradient(135deg, #ffe8f0 0%, #ffc8dc 50%, #E5CA8A 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #ffc8dc 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #E5CA8A 0%, transparent 45%),
                 #fff6fa;
  --season-icon: "💝";
  --season-label: "dia das mães";
}

/* 🎧 DIA DOS PAIS — grafite + azul aço + dourado (gadgets, drones) */
html[data-season="dia-pais"]:not([data-theme="dark"]) {
  --peach:       #e8ecf1;
  --coral-glow:  #d8e0e9;
  --rose:        #c8d4e0;
  --grad-soft:   linear-gradient(135deg, #e8ecf1 0%, #b8c8d8 50%, #C9A843 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #8fa8bf 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #C9A843 0%, transparent 45%),
                 #f4f6f9;
  --season-icon: "🎧";
  --season-label: "dia dos pais";
}

/* 🔥 BLACK FRIDAY — dourado + navy profundo como ACENTOS sobre fundo
   claro. Sazonal = skin de acento, não de fundo: quem quer escuro usa
   o toggle. Pico do ano em eletrônicos. */
html[data-season="black-friday"]:not([data-theme="dark"]) {
  --peach:       #f5ecdd;
  --coral-glow:  #ecdcb8;
  --rose:        #e8d2c4;
  --grad-soft:   linear-gradient(135deg, #f5ecdd 0%, #ecd9ae 55%, #c9a865 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #c9a865 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #0D1B2A 0%, transparent 45%),
                 #fbf4e8;
  --season-icon: "🔥";
  --season-label: "black friday";
}

/* 🎄 NATAL — verde pinheiro + dourado (celulares e fones de presente) */
html[data-season="natal"]:not([data-theme="dark"]) {
  --peach:       #eaf3ec;
  --coral-glow:  #f0e0b0;
  --rose:        #d8ecdc;
  --grad-soft:   linear-gradient(135deg, #eaf3ec 0%, #b8d8c0 50%, #C9A843 100%);
  --grad-mesh:   radial-gradient(ellipse at 20% 10%, #C9A843 0%, transparent 45%),
                 radial-gradient(ellipse at 80% 70%, #2d5a3d 0%, transparent 45%),
                 #f3f8f4;
  --season-icon: "🎄";
  --season-label: "natal";
}

/* Chip indicador de tema ativo (painel interno) */
.theme-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--coral-glow); color: var(--plum);
  font-size: 10.5px; font-weight: 600; letter-spacing: .2px;
  user-select: none;
}
.theme-chip::before { content: var(--season-icon, "✦"); font-size: 12px; }

/* ---------- RESET ---------- */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--coral-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-family: var(--f-display); font-weight: 400; letter-spacing: -.015em; margin: 0; }
input, select, textarea { font-family: inherit; font-size: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; border: 2px solid var(--cream); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- APP SHELL ---------- */
.app { display: flex; min-height: 100vh; background: var(--cream); }
.app__overlay { display: none; }
.topbar__menu-btn,
.sidebar__close { display: none !important; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  padding: 22px 18px 18px;
  gap: 4px;
  /* Desktop: superfície contínua da borda superior à inferior da janela. */
  position: fixed;
  inset: 0 auto 0 0;
  min-height: 100vh;
  height: 100dvh;
  z-index: 30;
  overflow: hidden;
  box-shadow: 8px 0 28px rgba(13, 27, 42, .06);
  isolation: isolate;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: var(--gray-200);
  pointer-events: none;
}
.sidebar__brand {
  padding: 6px 10px 20px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 14px;
}
.sidebar__brand-logo { height: 52px; width: auto; display: block; margin-bottom: 4px; }
.sidebar__brand-sub {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 6px;
}
.sidebar__nav { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 4px; overflow-y: auto; overflow-x: hidden; padding: 0 3px 18px 0; scrollbar-gutter: stable; }
.sidebar__item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  min-height: 44px;
  background: transparent;
  color: var(--gray-700);
  border: 0;
  border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 500;
  text-align: left;
  transition: background .18s, color .18s, box-shadow .18s;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.sidebar__item:hover { background: var(--gray-100); color: var(--ink); text-decoration: none; }
.sidebar__item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar__item-label { flex: 1; }
.sidebar__item.is-active {
  background: var(--grad-hero);
  color: var(--white);
  font-weight: 600;
  box-shadow: var(--sh-glow);
}
.sidebar__item.is-active:hover { background: var(--grad-hero); color: var(--white); }
.sidebar__badge {
  font-size: 10.5px; font-weight: 700;
  background: var(--coral-glow); color: var(--coral-deep);
  padding: 2px 7px;
  border-radius: var(--r-pill);
}
.sidebar__item.is-active .sidebar__badge { background: rgba(255,255,255,.25); color: var(--white); }
.sidebar__section {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 14px 12px 6px;
  margin-top: 8px;
}
.sidebar__promo {
  margin-top: 10px;
  flex-shrink: 0;
  padding: 16px 14px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  background: var(--grad-soft);
  position: relative;
  overflow: hidden;
}
.sidebar__promo::before {
  content: '';
  position: absolute; top: -10px; right: -10px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--coral);
  opacity: .2;
}
.sidebar__promo-tag {
  display: inline-block;
  padding: 3px 7px;
  background: var(--white);
  border-radius: var(--r-pill);
  font-size: 9.5px;
  font-family: var(--f-mono);
  letter-spacing: .15em;
  color: var(--magenta);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.sidebar__promo-title {
  font-family: var(--f-display);
  font-size: 19px;
  font-style: italic;
  line-height: 1.1;
  color: var(--plum);
}
.sidebar__promo-sub { font-size: 11px; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }

/* Main + Topbar */
.main {
  flex: 1;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  min-height: 100dvh;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  min-height: var(--topbar-h);
  position: sticky; top: 0; z-index: 20;
}
.topbar__titles { flex: 1; min-width: 0; }
.topbar__sub {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 4px;
}
.topbar__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 32px; font-weight: 400;
  color: var(--ink);
  letter-spacing: -.015em;
  line-height: 1;
}
.topbar__actions { display: flex; align-items: center; gap: 10px; }

/* Busca colapsável (mobile vira ícone). Desktop: wrapper transparente,
   trigger escondido, form sempre visível (mesmo com <details> fechado). */
.topbar-search { display: contents; }
.topbar-search__trigger { display: none; }
.topbar-search summary { list-style: none; cursor: pointer; }
.topbar-search summary::-webkit-details-marker { display: none; }
/* <details> fechado esconde o conteúdo por padrão; no desktop forçamos
   a search-pill a aparecer sempre. */
.topbar-search > .search-pill { display: flex; }

.search-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--gray-100);
  border: 0;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--gray-500);
  width: 260px;
}
.search-pill input {
  border: 0; background: transparent; outline: none; flex: 1;
  color: var(--ink); font-size: 13px;
}
.search-pill input::placeholder { color: var(--gray-500); }
.search-pill svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--gray-500); }
.search-pill__kbd {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: var(--white);
  border-radius: 4px;
  color: var(--gray-700);
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  background: var(--gray-100);
  border: 0;
  color: var(--gray-700);
  display: grid; place-items: center;
  position: relative;
  transition: background .15s;
}
.icon-btn:hover { background: var(--gray-200); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn__dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  border: 1.5px solid var(--gray-100);
}
.icon-btn__dot--count {
  width: auto;
  height: auto;
  min-width: 16px;
  padding: 0 4px;
  top: 4px;
  right: 4px;
  border-radius: 999px;
  background: var(--magenta, var(--coral));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  border: 1.5px solid var(--white);
}

.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 4px 4px 12px;
  background: var(--gray-100);
  border-radius: var(--r-pill);
  border: 0;
  color: inherit;
  text-decoration: none;
}
/* O pill agora é <a> (leva a /account/password) — precisa parecer clicável. */
a.user-pill { cursor: pointer; transition: background .15s ease; }
a.user-pill:hover { background: var(--gray-200, var(--gray-100)); }
a.user-pill:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.user-pill__meta { text-align: right; font-size: 11.5px; line-height: 1.2; }
.user-pill__name { font-weight: 600; color: var(--ink); }
.user-pill__role { font-size: 10px; color: var(--gray-500); }
.user-pill__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grad-hero);
  color: var(--white);
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}

.content { flex: 1; padding: 32px; }

/* Flash messages */
.flash-wrap { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-sm);
}
.flash--success { background: var(--mint); color: var(--mint-ink); }
.flash--error   { background: var(--danger-bg); color: var(--danger); }
.flash--warning { background: var(--sun); color: var(--sun-ink); }
.flash--info    { background: var(--coral-glow); color: var(--coral-deep); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 600;
  font-family: var(--f-body);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad-hero);
  color: var(--white);
  box-shadow: var(--sh-glow);
  transition: transform .15s, box-shadow .15s, background .15s;
  text-decoration: none;
  letter-spacing: .005em;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--white); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn--sm { padding: 7px 12px; font-size: 12px; }
.btn--lg { padding: 14px 24px; font-size: 14.5px; }
.btn--full { width: 100%; }
.btn--dark    { background: var(--ink); color: var(--white); box-shadow: var(--sh-md); }
.btn--dark:hover    { color: var(--white); }
.btn--ghost   { background: transparent; color: var(--ink); border: 1px solid var(--gray-300); box-shadow: none; }
.btn--ghost:hover   { background: var(--gray-100); color: var(--ink); }
.btn--soft    { background: var(--coral-glow); color: var(--coral-deep); box-shadow: none; }
.btn--soft:hover    { background: var(--coral-soft); color: var(--coral-deep); }
.btn--magenta { background: var(--magenta); color: var(--white); box-shadow: var(--sh-glow-m); }
.btn--magenta:hover { color: var(--white); }
.btn--danger  { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.btn--danger:hover  { background: #ffe0e0; color: var(--danger); }
.btn--icon    { padding: 8px; width: 34px; height: 34px; }

/* ---------- CARDS ---------- */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  padding: 22px;
  box-shadow: var(--sh-sm);
}
.card--flush { padding: 0; overflow: hidden; }
.card--glow  { box-shadow: var(--sh-md); }
.card__header {
  padding: 18px 26px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.card__title { font-family: var(--f-display); font-size: 22px; font-style: italic; margin: 0; }
.card__sub   { font-size: 11.5px; color: var(--gray-500); font-family: var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.card__body  { padding: 22px; }

/* ---------- CHIPS ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  font-size: 11.5px; font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: var(--r-pill);
  letter-spacing: .01em;
}
.chip--sm      { padding: 2px 9px; font-size: 10.5px; }
.chip--coral   { background: var(--coral-glow); color: var(--coral-deep); }
.chip--magenta { background: var(--rose); color: var(--magenta-deep); }
.chip--mint    { background: var(--mint); color: var(--mint-ink); }
.chip--sun     { background: var(--sun); color: var(--sun-ink); }
.chip--ink     { background: var(--ink); color: var(--white); }
.chip--plum    { background: var(--plum); color: var(--white); }

/* ---------- KPI ---------- */
.kpi {
  position: relative; overflow: hidden;
}
.kpi__label {
  font-size: 11.5px;
  font-family: var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.kpi__value {
  font-family: var(--f-display);
  font-size: 38px; font-weight: 400;
  color: var(--ink);
  margin-top: 6px;
  letter-spacing: -.02em;
  line-height: 1;
}
.kpi__value--coral   { color: var(--coral); }
.kpi__value--magenta { color: var(--magenta); }
.kpi__value--deep    { color: var(--coral-deep); }
.kpi__value--plum    { color: var(--plum); }
.kpi__meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--gray-500); }
.kpi__spark { margin-top: 14px; }

/* ---------- THUMB (placeholder de produto) ---------- */
.thumb {
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-200);
}
.thumb--h0 { background: linear-gradient(160deg,#E5CA8A,#C9A843); }
.thumb--h1 { background: linear-gradient(160deg,#D6E8F5,#3D7DD8); }
.thumb--h2 { background: linear-gradient(160deg,#eef2f7,#c0cdd8); }
.thumb--h3 { background: linear-gradient(160deg,#0D1B2A,#050D14); }
.thumb--h4 { background: linear-gradient(160deg,#EEF3F9,#9BBCE0); }
.thumb--h5 { background: linear-gradient(160deg,#F8FAFC,#D6E8F5); }
.thumb--h6 { background: linear-gradient(160deg,#4A6070,#162130); }
.thumb--h7 { background: linear-gradient(160deg,#FFF5D6,#C9A843); }
.thumb__tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--white); color: var(--ink);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 10px; font-weight: 700;
  font-family: var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.thumb__silhouette {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .35;
  mix-blend-mode: multiply;
}

/* ---------- AVATAR ---------- */
.avatar {
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 600;
  font-family: var(--f-body);
  letter-spacing: .02em;
  flex-shrink: 0;
  width: 32px; height: 32px;
  font-size: 12px;
  background: var(--grad-hero);
  color: var(--white);
}
.avatar--lg { width: 60px; height: 60px; font-size: 22px; font-family: var(--f-display); font-style: italic; }
.avatar--md { width: 40px; height: 40px; font-size: 14px; }
.avatar--h0 { background: var(--grad-hero); color: var(--white); }
.avatar--h1 { background: var(--coral-soft); color: var(--ink); }
.avatar--h2 { background: var(--rose); color: var(--ink); }
.avatar--h3 { background: var(--plum); color: var(--white); }
.avatar--h4 { background: var(--gray-300); color: var(--ink); }
.avatar--h5 { background: var(--magenta); color: var(--white); }

/* ---------- TABLE ---------- */
.table { width: 100%; }
.table__head {
  padding: 12px 22px;
  display: grid;
  gap: 16px;
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}
.table__row {
  padding: 14px 22px;
  display: grid;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  transition: background .12s;
}
.table__row:last-child { border-bottom: 0; }
.table__row:hover { background: var(--gray-100); }
.table__row--selected { background: var(--coral-glow); }

/* ---------- FILTER BAR ---------- */
.filterbar {
  padding: 16px 22px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  color: var(--gray-700);
  cursor: pointer;
  font-family: inherit;
}
.filter-pill svg { width: 14px; height: 14px; }
.filter-pill:hover { border-color: var(--coral); color: var(--ink); }

/* Tabs */
.tabs {
  display: flex; gap: 0;
  padding: 0 22px;
  border-bottom: 1px solid var(--gray-200);
}
.tab {
  padding: 14px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--gray-700);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex; gap: 8px; align-items: center;
  text-decoration: none;
  background: transparent; border-top: 0; border-left: 0; border-right: 0;
  font-family: inherit;
}
.tab.is-active {
  color: var(--coral-deep);
  border-bottom-color: var(--coral);
  font-weight: 600;
}
.tab__count {
  font-size: 10.5px;
  padding: 1px 6px;
  background: var(--gray-100);
  color: var(--gray-500);
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
}
.tab.is-active .tab__count { background: var(--coral-glow); color: var(--coral-deep); }

/* ---------- FORMS ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-label {
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.form-label--inline {
  display: flex; justify-content: space-between; align-items: baseline;
}
.form-hint { font-size: 11.5px; color: var(--gray-500); }
.form-control {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
  font-size: 14px;
}
.form-control:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255,107,58,.1);
}
.form-control svg { width: 16px; height: 16px; color: var(--gray-500); flex-shrink: 0; }
.form-control input,
.form-control textarea,
.form-control select {
  border: 0; outline: 0;
  background: transparent;
  flex: 1;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
}
.form-control textarea { resize: vertical; min-height: 80px; }
.form-control--plain {
  padding: 0; border: 0; background: transparent;
}
.form-control--plain input,
.form-control--plain select,
.form-control--plain textarea {
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  width: 100%;
}
.form-control--plain input:focus,
.form-control--plain select:focus,
.form-control--plain textarea:focus {
  outline: 0;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255,107,58,.1);
}

/* ── Uniformização de campos crus (painel) ──────────────────────────
   ~95 inputs/selects/textareas espalhados pelo painel (a seção de frete
   inteira em Configurações, criar venda, reposição, etc.) estavam SEM
   wrapper .form-control e renderizavam com o estilo nativo do navegador
   — larguras e aparências diferentes lado a lado com as pílulas.
   Esta regra dá a qualquer campo cru dentro de .form-group o MESMO
   visual da variante --plain, sem precisar tocar 20 templates.
   Escopo .app = só o painel; o catálogo público substitui o shell e
   tem sua própria tipografia de formulário. O seletor de filho direto
   (>) garante que inputs DENTRO de .form-control (transparentes, a
   pílula é o wrapper) não sejam re-estilizados. */
.app .form-group > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.app .form-group > select,
.app .form-group > textarea {
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
  transition: border-color .15s, box-shadow .15s;
}
.app .form-group > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.app .form-group > select:focus,
.app .form-group > textarea:focus {
  outline: 0;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255,107,58,.1);
}
.app .form-group > textarea { resize: vertical; min-height: 80px; }
.app .form-group > input::placeholder,
.app .form-group > textarea::placeholder { color: var(--gray-500); }
/* input de arquivo: sem pílula (o botão nativo manda), só tipografia coerente */
.app .form-group > input[type="file"] { font: inherit; font-size: 13px; color: var(--gray-700); }

/* Grid de 4 campos (caixa-padrão do frete): colapsa em 2 no celular */
.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.checkbox {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--gray-700);
  cursor: pointer;
}
.checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.checkbox__box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  display: grid; place-items: center;
  color: var(--white);
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.checkbox__box svg { width: 12px; height: 12px; }
.checkbox input:checked + .checkbox__box {
  background: var(--grad-hero);
  border-color: transparent;
}

/* ---------- GRIDS ---------- */
.grid { display: grid; gap: 18px; }

/* ── Guarda anti-overflow (itens de grid/flex) ────────────────────────
   Item de grid nasce com min-width:auto → não encolhe abaixo do
   min-content do conteúdo. Como <input> tem largura intrínseca (~180px
   pelo size padrão), um card com 2 campos lado a lado + a grade de juros
   (4 colunas) tinha min-content maior que a coluna de 1fr: o card
   estourava a largura do .content e empurrava a coluna da direita para
   fora da viewport (a grade de juros "saltava" do card).
   Isto já existia no media query mobile; precisa valer em qualquer tela. */
.grid > *,
.card,
.form-group { min-width: 0; }
.form-control > input,
.form-control > select,
.form-control > textarea { min-width: 0; }

.grid--2  { grid-template-columns: repeat(2, 1fr); }
.grid--3  { grid-template-columns: repeat(3, 1fr); }
.grid--4  { grid-template-columns: repeat(4, 1fr); }
.grid--5  { grid-template-columns: repeat(5, 1fr); }
.grid--kpi       { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid--kpi-5     { grid-template-columns: repeat(5, 1fr); }
.grid--2-1       { grid-template-columns: 2fr 1fr; gap: 18px; }
.grid--1-2       { grid-template-columns: 1fr 2fr; gap: 18px; }
.grid--pos       { grid-template-columns: 1.7fr 1fr; gap: 18px; }
.grid--profile   { grid-template-columns: 2fr 1fr; gap: 18px; }

/* ---------- PROGRESS BARS ---------- */
.progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: var(--coral);
  border-radius: var(--r-pill);
  transition: width .3s;
}
.progress__fill--magenta { background: var(--magenta); }
.progress__fill--deep    { background: var(--coral-deep); }
.progress__fill--plum    { background: var(--plum); }
.progress--thin { height: 4px; }

/* ---------- STAT BLOCK (dentro de drawer/profile) ---------- */
.stat-block {
  background: rgba(255,255,255,.15);
  padding: 10px;
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stat-block__label {
  font-size: 10px;
  font-family: var(--f-mono);
  letter-spacing: .12em;
  opacity: .85;
  text-transform: uppercase;
}
.stat-block__value {
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  margin-top: 2px;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex; gap: 6px;
  padding: 16px 22px;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--gray-200);
}
.pagination__btn {
  min-width: 32px; height: 32px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.pagination__btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.pagination__info { font-size: 12px; color: var(--gray-500); margin-right: auto; }

/* ---------- EMPTY STATE ---------- */
.empty {
  padding: 60px 22px;
  text-align: center;
  color: var(--gray-500);
}
.empty__title {
  font-family: var(--f-display);
  font-size: 24px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty__sub { font-size: 13px; margin-bottom: 16px; }

/* ---------- LOGIN ---------- */
.login-split { display: flex; min-height: 100vh; background: var(--cream); }
.login-split__form {
  flex: 0 0 52%;
  padding: 80px 90px;
  display: flex; flex-direction: column;
}
.login-split__form-wrap {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 420px;
}
.login-split__art {
  flex: 1;
  background: var(--grad-hero);
  position: relative; overflow: hidden;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--white);
}
.login-split__art::before {
  content: '';
  position: absolute; top: -40px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: var(--magenta);
  opacity: .7;
  filter: blur(40px);
}
.login-split__art::after {
  content: '';
  position: absolute; top: 100px; left: -40px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--rose);
  opacity: .4;
  filter: blur(30px);
}
.login-heading {
  font-family: var(--f-display);
  font-size: 56px; font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
  margin: 16px 0 14px;
}
.login-heading em { color: var(--coral); font-style: italic; }
.login-quote {
  position: relative;
  max-width: 420px;
}
.login-quote__eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 12px;
}
.login-quote__text {
  font-family: var(--f-display);
  font-size: 40px; font-style: italic;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.login-quote__attr { margin-top: 18px; font-size: 13px; opacity: .9; }

.floating-card {
  position: absolute;
  background: var(--white);
  padding: 14px;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  color: var(--ink);
  z-index: 2;
}

/* ---------- DASHBOARD chart wrap ---------- */
.chart-wrap {
  position: relative;
  height: 220px;
}
.chart-wrap svg { width: 100%; height: 100%; }
.chart-legend {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--gray-500);
  font-family: var(--f-mono);
  margin-top: 8px;
  letter-spacing: .08em;
}

/* ---------- CATALOG (vitrine pública) ---------- */
.catalog-page { background: var(--cream); color: var(--ink); min-height: 100vh; }
.catalog-header {
  padding: 20px 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky; top: 0; z-index: 10;
}
.catalog-nav { display: flex; gap: 28px; font-size: 13.5px; }
.catalog-nav a { color: var(--ink); font-weight: 500; position: relative; }
.catalog-nav a.is-active { color: var(--coral-deep); font-weight: 600; }
.catalog-nav .sale-badge {
  position: absolute; top: -6px; right: -16px;
  font-size: 9px; padding: 1px 5px;
  background: var(--magenta); color: var(--white);
  border-radius: 4px;
  font-family: var(--f-mono);
  letter-spacing: .06em;
}
.catalog-hero {
  padding: 56px 60px;
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 32px; align-items: center;
}
.catalog-hero__eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--coral-deep); margin-bottom: 16px;
}
.catalog-hero__title {
  font-family: var(--f-display);
  font-size: 96px; font-weight: 400;
  line-height: .9;
  letter-spacing: -.03em;
  margin: 0;
}
.catalog-hero__title em { color: var(--coral); font-style: italic; }
.catalog-hero__lead {
  font-size: 16px; color: var(--gray-700);
  margin-top: 22px; max-width: 440px;
  line-height: 1.6;
}

.catalog-chips-row {
  padding: 12px 60px 40px;
  display: flex; gap: 12px; overflow-x: auto;
}
.catalog-chip {
  flex: 1; min-width: 160px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  cursor: pointer;
  text-decoration: none; color: var(--ink);
}
.catalog-chip.is-active {
  background: var(--grad-hero);
  color: var(--white);
  border: 0;
}
.catalog-chip__title { font-family: var(--f-display); font-size: 20px; font-style: italic; }
.catalog-chip__count {
  font-size: 11px; font-family: var(--f-mono);
  letter-spacing: .1em; opacity: .75;
  margin-top: 2px;
}

.catalog-grid {
  padding: 0 60px 80px;
}
.catalog-grid__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 26px;
}
.catalog-grid__title {
  font-family: var(--f-display); font-size: 56px;
  margin: 6px 0 0; letter-spacing: -.02em; font-weight: 400;
}
.catalog-filters { display: flex; gap: 8px; font-size: 12.5px; }
.catalog-filter {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.catalog-filter.is-active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: inherit;
}
.product-card__thumb { position: relative; }
.product-card__thumb .thumb { width: 100%; height: 340px; }
.product-card__fav {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92);
  border: 0; color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
}
.product-card__name { font-family: var(--f-display); font-size: 17px; font-style: italic; line-height: 1.2; }
.product-card__price { display: flex; gap: 8px; margin-top: 4px; align-items: baseline; }
.product-card__price strong { font-weight: 600; font-size: 14px; }
.product-card__price s { font-size: 12px; color: var(--gray-500); }
.product-card__colors { display: flex; gap: 5px; margin-top: 8px; }
.product-card__color {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--gray-200);
}

.catalog-banner {
  margin: 0 60px 80px;
  padding: 60px;
  border-radius: var(--r-xl);
  background: var(--grad-hero);
  color: var(--white);
  position: relative; overflow: hidden;
}
.catalog-banner::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  background: var(--magenta); opacity: .5;
  filter: blur(40px);
}
.catalog-banner__content { position: relative; max-width: 560px; }
.catalog-banner__eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .2em; text-transform: uppercase; opacity: .9;
}
.catalog-banner__title {
  font-family: var(--f-display); font-size: 52px;
  font-style: italic; line-height: 1;
  letter-spacing: -.02em;
  margin-top: 12px;
}
.catalog-banner__lead { opacity: .92; margin-top: 14px; max-width: 420px; line-height: 1.5; }

.catalog-footer {
  border-top: 1px solid var(--gray-200);
  padding: 30px 60px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--gray-500); font-size: 12px;
  background: var(--white);
}

/* ---------- DRAWER (customer profile, etc.) ---------- */
.drawer-hero {
  padding: 22px;
  background: var(--grad-hero);
  color: var(--white);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  position: relative; overflow: hidden;
}
.drawer-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--magenta); opacity: .5; filter: blur(30px);
}
.drawer-hero__row { position: relative; display: flex; gap: 14px; align-items: center; }
.drawer-hero__name { font-family: var(--f-display); font-size: 24px; font-style: italic; line-height: 1; }
.drawer-hero__sub { font-size: 12px; opacity: .9; margin-top: 4px; }
.drawer-hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 20px; position: relative;
}

.info-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--gray-700);
  padding: 6px 0;
}
.info-row svg { width: 16px; height: 16px; color: var(--coral-deep); flex-shrink: 0; }

.section-label {
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 20px; margin-bottom: 8px;
}

/* ---------- POS / carrinho ---------- */
.pos-grid-item {
  cursor: pointer;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s, transform .12s;
  text-decoration: none; color: inherit;
  position: relative;
}
.pos-grid-item:hover { border-color: var(--coral); }
/* Feedback de toque (mobile): ao tocar, card afunda + ring coral.
   Mais importante que o hover desktop, ja que celular nao tem hover. */
.pos-grid-item:active {
  transform: scale(.96);
  border-color: var(--coral-deep);
  box-shadow: 0 0 0 3px rgba(255, 107, 58, .25);
}
.pos-grid-item.is-selected {
  border: 2px solid var(--coral);
  box-shadow: var(--sh-glow);
}
/* Animacao quando o item e adicionado ao carrinho - feedback visual */
@keyframes pos-added-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 107, 58, .6); }
  50%  { box-shadow: 0 0 0 12px rgba(255, 107, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 58, 0); }
}
.pos-grid-item.is-just-added {
  animation: pos-added-pulse .55s ease-out;
}
/* Indicador visual permanente para produtos COM variantes:
   borda esquerda coral + canto com chip "tam·cor" na imagem */
.pos-grid-item[data-has-variants="1"] {
  border-left: 3px solid var(--coral-deep);
}
.pos-grid-item[data-has-variants="1"]::after {
  content: "tam · cor";
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, .95);
  color: var(--coral-deep);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  pointer-events: none;
  z-index: 2;
}
.pos-grid-item .thumb { width: 100%; height: 140px; border-radius: 0; }
.pos-grid-item__body { padding: 10px; }
.pos-grid-item__name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pos-grid-item__meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.pos-grid-item__price { font-family: var(--f-display); font-size: 17px; font-style: italic; }
.pos-grid-item__stock { font-size: 10px; font-family: var(--f-mono); color: var(--gray-500); }
.pos-grid-item__stock--out { color: var(--magenta); }

.cart-item {
  padding: 12px 22px;
  display: flex; gap: 12px; align-items: center;
  border-bottom: 1px solid var(--gray-200);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-size: 13px; font-weight: 500; }
.cart-item__var { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
.cart-item__qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 6px;
}
.cart-item__qty button {
  padding: 4px 10px;
  background: transparent; border: 0;
  color: var(--gray-700);
  cursor: pointer;
}
.cart-item__qty span { padding: 0 10px; font-size: 12.5px; font-weight: 600; }
.cart-item__total { text-align: right; }
.cart-item__total-v {
  font-family: var(--f-display); font-size: 18px; font-style: italic;
}

.cart-totals {
  padding: 22px;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
}
.cart-totals__row {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--gray-700);
  margin-bottom: 6px;
}
.cart-totals__row--discount span:last-child { color: var(--magenta-deep); }
.cart-totals__sep { height: 1px; background: var(--gray-300); margin: 12px 0; }
.cart-totals__total {
  display: flex; justify-content: space-between; align-items: baseline;
}
.cart-totals__total-v {
  font-family: var(--f-display); font-size: 36px; font-style: italic;
  letter-spacing: -.02em;
}

.pay-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 10px;
}
.pay-opt {
  padding: 14px 10px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--ink);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: inherit; font-size: 12px; font-weight: 600;
  transition: background .15s;
}
.pay-opt:hover { background: var(--gray-100); }
.pay-opt svg { width: 20px; height: 20px; }
.pay-opt.is-selected {
  background: var(--grad-hero);
  color: var(--white);
  border: 0;
  box-shadow: var(--sh-glow);
}
.pay-opt__hint {
  font-size: 9.5px;
  font-family: var(--f-mono);
  letter-spacing: .08em;
  opacity: .8;
}

/* ---------- MISC helpers ---------- */
.text-display { font-family: var(--f-display); font-style: italic; }
.text-mono { font-family: var(--f-mono); }
.text-eyebrow {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--coral-deep);
}
.text-muted { color: var(--gray-500); }
.text-price {
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
}
.mt-0 { margin-top: 0; }   .mt-1 { margin-top: 8px; }   .mt-2 { margin-top: 16px; }   .mt-3 { margin-top: 24px; }   .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 12px; } .gap-3 { gap: 16px; } .gap-4 { gap: 24px; }

/* ---------- PUBLIC PAGES (login, catalog, etc. sem sidebar) ---------- */
.public-shell { min-height: 100vh; background: var(--cream); }

/* ---------- MEDIA ---------- */
@media (max-width: 1100px) {
  .grid--kpi { grid-template-columns: repeat(2, 1fr); }
  .grid--kpi-5 { grid-template-columns: repeat(2, 1fr); }
  .grid--2-1, .grid--1-2, .grid--pos, .grid--profile { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-hero { grid-template-columns: 1fr; padding: 40px 32px; }
  .catalog-hero__title { font-size: 64px; }
  .catalog-header, .catalog-chips-row, .catalog-grid, .catalog-banner, .catalog-footer { padding-left: 32px; padding-right: 32px; }
  .catalog-banner { margin-left: 24px; margin-right: 24px; padding: 40px; }
  .catalog-banner__title { font-size: 40px; }
  .catalog-grid__title { font-size: 40px; }
  .login-split__form { padding: 48px 32px; }
  .login-heading { font-size: 44px; }
}
@media (max-width: 780px) {
  body.body--nav-open { overflow: hidden; }
  .app { display: block; }
  .main {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0;
  }
  .sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 80;
    width: min(86vw, 320px);
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    transform: translateX(-105%);
    transition: transform .24s ease, box-shadow .24s ease;
    box-shadow: none;
  }
  .app--nav-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--sh-lg);
  }
  .app__overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(26,15,10,.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }
  .app--nav-open .app__overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .topbar__menu-btn,
  .sidebar__close {
    display: grid !important;
  }
  .sidebar__close {
    position: absolute;
    top: 14px;
    right: 14px;
  }
  .sidebar__brand { padding-right: 50px; }
  .sidebar__nav { padding-bottom: 20px; }
  .sidebar__promo { margin-bottom: 18px; }
  .topbar {
    padding: 10px 14px 12px;
    gap: 8px;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;          /* remove os 78px herdados — altura segue o conteúdo */
  }
  /* Mobile: actions empilham e usam flex-wrap. O botao primario
     (sem .btn--ghost) ocupa linha propria com largura total para
     destaque visual + legibilidade. Botoes ghost sm ficam icon-only. */
  .topbar__actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  /* Hamburguer fica primeiro, alinhado a esquerda */
  .topbar__actions > .topbar__menu-btn {
    order: 0;
    flex: 0 0 auto;
  }
  /* Busca colapsada em ícone no mobile: o <details> vira um botão lupa
     compacto (display:contents é desfeito para podermos posicioná-lo). */
  .topbar-search {
    display: block;
    order: 1;
    flex: 0 0 auto;
  }
  .topbar-search__trigger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--r-pill);
    background: var(--gray-100);
    color: var(--gray-700);
  }
  .topbar-search__trigger svg { width: 18px; height: 18px; }
  /* Form fica oculto até abrir; quando abre, ocupa a linha toda abaixo
     dos ícones, sem empurrar a faixa congelada quando fechado. */
  .topbar-search .search-pill { display: none; }
  .topbar-search[open] {
    flex: 1 1 100%;
    order: 5;
  }
  .topbar-search[open] .topbar-search__trigger { display: none; }
  .topbar-search[open] .search-pill { display: flex; }

  /* Botoes ghost sm ficam compactos, lado a lado, icon-only */
  .topbar__actions > .btn--ghost.btn--sm {
    order: 2;
    flex: 0 0 auto;
  }
  /* Forms (logout etc) seguem o fluxo */
  .topbar__actions > form { order: 3; }
  /* Botão primário do topbar: escondido no mobile — a ação primária vira
     o FAB flutuante (.page-fab), padronizando posição em todas as telas.
     Telas sem page_fab_url não têm botão primário no topbar de qualquer forma. */
  .topbar__actions > .btn:not(.btn--ghost):not(.icon-btn) {
    display: none;
  }
  .topbar__titles {
    width: 100%;
    min-width: 0;
  }
  .topbar__sub {
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar__title {
    font-size: 19px;
    line-height: 1.0;
    white-space: normal;
    word-break: normal;
  }
  .search-pill {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    min-height: 40px;
  }
  .search-pill input { min-width: 0; }
  .search-pill__kbd,
  .user-pill,
  .topbar__actions > .icon-btn[aria-label="Notificações"] {
    display: none;
  }
  .topbar__actions .btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  /* Topbar mobile: botoes ghost sm icon-only com tamanho fixo */
  .topbar__actions .btn--ghost.btn--sm {
    width: 40px;
    height: 40px;
    padding: 0;
    overflow: hidden;
    color: transparent !important;
    position: relative;
    flex: 0 0 40px;
  }
  .topbar__actions .btn--ghost.btn--sm svg {
    color: var(--ink);
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
  }
  /* Botao primario "Novo produto": destaque, gradiente legivel,
     largura cheia em linha propria. Min-height 48px = alvo de toque WCAG. */
  .topbar__actions .btn:not(.btn--ghost):not(.icon-btn) {
    min-height: 48px !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: var(--grad-hero) !important;
    color: var(--white) !important;
    box-shadow: 0 6px 18px rgba(255, 107, 58, .3) !important;
    border-radius: var(--r-pill) !important;
  }
  .topbar__actions .btn:not(.btn--ghost):not(.icon-btn) svg {
    width: 18px !important;
    height: 18px !important;
    color: var(--white) !important;
  }
  .topbar__actions form {
    justify-self: end;
  }
  .content { padding: 16px; }
  .grid--kpi, .grid--3, .grid--4, .grid--5, .grid--2, .grid--2-1, .grid--1-2 {
    grid-template-columns: 1fr;
  }
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kpi__value { font-size: 31px; }
  .kpi__meta { flex-wrap: wrap; gap: 6px; }
  .card, .table__row, .chart-wrap { min-width: 0; }
  .chart-legend { gap: 8px; }
  .chart-legend span { font-size: 10.5px; }
  .login-split { flex-direction: column; }
  .login-split__form { flex: 0 0 auto; }
  .login-split__art { min-height: 320px; }
}

/* ============================================================
   PDV MOBILE — create_sale.html
   Estrategia: carrinho em cima, catalogo embaixo, CTA fixa
   no rodape. Sobrescreve estilos inline com !important onde
   necessario (nao e elegante, mas o HTML tem inline styles).
   ============================================================ */
@media (max-width: 780px) {
  /* 1. Empilha colunas (carrinho primeiro via order) */
  .grid--pos { gap: 12px !important; }

  /* 2. Catalogo: sem altura minima fixa, sem scroll aninhado */
  .grid--pos > .pos-catalog {
    min-height: auto !important;
    order: 2; /* catalogo depois do carrinho */
    position: static !important;
  }
  .pos-catalog > div[style*="overflow:auto"],
  .pos-catalog > div[style*="overflow: auto"] {
    overflow: visible !important;
    flex: none !important;
    padding: 14px 14px 12px !important;
  }
  .pos-catalog .filterbar { padding: 14px !important; }

  /* 3. Carrinho aparece primeiro e nao fica sticky no mobile */
  .grid--pos > .cart-card {
    order: 1;
    position: static !important;
    top: auto !important;
  }
  .cart-card .card__header,
  .cart-card > div[style*="padding:14px 22px"],
  .cart-card > div[style*="padding: 14px 22px"] {
    padding: 12px 14px !important;
  }
  .cart-totals { padding: 14px !important; }

  /* 4. Forca grid de produtos para 2 colunas mesmo com inline style.
        Especificidade tripla + !important vence o style="..." */
  body .product-grid#pos-grid,
  .grid--pos .product-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 10px !important;
  }
  /* Cards menores, alvo de toque mantido (>=44px no botao) */
  .pos-grid-item img,
  .pos-grid-item .thumb {
    height: 110px !important;
  }
  .pos-grid-item__body { padding: 8px !important; }
  .pos-grid-item__name {
    font-size: 12.5px !important;
    line-height: 1.3 !important;
  }
  .pos-grid-item__price { font-size: 15px !important; }
  .pos-grid-item__stock { font-size: 9.5px !important; }

  /* 5. Filterbar empilha pesquisa e botao Scanner */
  .filterbar {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .filterbar > .search-pill { width: 100% !important; }
  .filterbar > .btn { width: 100%; min-height: 40px; }

  /* 6. Pills de categoria: scroll horizontal em vez de wrap caotico */
  .grid--pos .filter-pill { white-space: nowrap; flex-shrink: 0; }
  .pos-catalog > div:has(> .filter-pill) {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px !important;
  }
  .pos-catalog > div:has(> .filter-pill)::-webkit-scrollbar { display: none; }

  /* 7. Pagamento: 3 colunas iguais com alvo de toque maior */
  .pay-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .pay-opt {
    min-height: 64px !important;
    padding: 10px 6px !important;
    font-size: 12px !important;
  }
  .pay-opt svg { width: 22px !important; height: 22px !important; }

  /* 8. Despacho: campos curtos (CEP/UF/Numero) empilham */
  .cart-totals .grid--2 {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* 9. Cart items mais densos */
  .cart-item {
    padding: 10px 14px !important;
    gap: 10px !important;
  }
  .cart-item .thumb {
    width: 40px !important;
    height: 50px !important;
    flex-shrink: 0;
  }
  .cart-item__name { font-size: 12.5px !important; }
  .cart-item__qty button {
    min-width: 28px !important;
    min-height: 28px !important;
  }

  /* 10. CTA STICKY: botao Finalizar fixo no rodape com total visivel.
         Acionado quando o submit-btn estiver dentro de .grid--pos. */
  .grid--pos #submit-btn {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    margin: 14px -14px -14px !important;
    width: calc(100% + 28px);
    border-radius: 0 !important;
    min-height: 56px !important;
    font-size: 15px !important;
    box-shadow: 0 -8px 24px rgba(61,15,36,.12);
  }
  .grid--pos #submit-btn[disabled] {
    opacity: .5;
    box-shadow: none;
  }

  /* 11. iOS safe area no botao sticky */
  @supports (padding: env(safe-area-inset-bottom)) {
    .grid--pos #submit-btn {
      padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
      padding-top: 14px !important;
    }
  }

  /* 12. Scanner video nao estoura largura */
  #scanner-video { max-height: 60vh; object-fit: cover; }
}

/* ---------- CATALOG CLEAN REFRESH ---------- */
.catalog-page--clean {
  background: #fbf8f4;
}
.catalog-clean-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(220px, 520px) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 32px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(70,44,58,.08);
}
.catalog-clean-brand img {
  height: 26px;
  display: block;
  mix-blend-mode: multiply;
}
.catalog-clean-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(70,44,58,.10);
  border-radius: 999px;
}
.catalog-clean-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}
.catalog-clean-search svg {
  width: 18px;
  height: 18px;
  color: var(--gray-500);
}
.catalog-clean-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.catalog-clean-contact {
  min-height: 44px;
  border-color: rgba(70,44,58,.12);
  background: #fff;
}
.catalog-clean-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 32px 28px;
  text-align: center;
}
.catalog-clean-kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--coral-deep);
}
.catalog-clean-hero h1 {
  margin: 12px 0 0;
  font-family: var(--f-display);
  font-size: clamp(40px, 7vw, 72px);
  line-height: .96;
  letter-spacing: -.03em;
  font-weight: 400;
}
.catalog-clean-hero p {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-700);
}
.catalog-clean-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.catalog-clean-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(70,44,58,.08);
  font-size: 12px;
  color: var(--gray-700);
}
.catalog-clean-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 32px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.catalog-clean-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(70,44,58,.10);
  color: var(--gray-700);
  text-decoration: none;
  font-size: 13px;
}
.catalog-clean-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.catalog-clean-toolbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.catalog-clean-count {
  font-family: var(--f-display);
  font-size: 28px;
  letter-spacing: -.02em;
}
.catalog-grid--clean {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 72px;
}
.product-grid--clean {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.product-card--clean {
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(70,44,58,.08);
  border-radius: 26px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card--clean:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(42,33,39,.08);
  border-color: rgba(70,44,58,.14);
}
.product-card__thumb--clean {
  padding: 12px 12px 0;
}
.product-card__thumb--clean .thumb {
  border-radius: 20px;
  overflow: hidden;
}
.product-card__body--clean {
  padding: 14px 16px 18px;
}
.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.product-card__meta span {
  font-size: 11px;
  color: var(--gray-600);
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(70,44,58,.05);
}
.product-card__price--clean strong {
  font-size: 15px;
}
.catalog-clean-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(214, 164, 121, .18), rgba(74, 44, 61, .10));
  color: var(--plum);
  font-family: var(--f-display);
  font-size: 56px;
}
.empty--clean {
  padding: 56px 24px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(70,44,58,.08);
  border-radius: 28px;
}
.catalog-footer--clean {
  padding: 24px 32px 36px;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

@media (max-width: 980px) {
  .catalog-clean-header {
    grid-template-columns: 1fr;
  }
  .catalog-clean-actions {
    justify-content: space-between;
  }
  .catalog-clean-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .product-grid--clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .catalog-clean-header,
  .catalog-clean-hero,
  .catalog-clean-cats,
  .catalog-clean-toolbar,
  .catalog-grid--clean,
  .catalog-footer--clean {
    padding-left: 18px;
    padding-right: 18px;
  }
  .catalog-clean-hero {
    padding-top: 34px;
    text-align: left;
  }
  .catalog-clean-meta,
  .catalog-clean-cats {
    justify-content: flex-start;
  }
  .product-grid--clean {
    grid-template-columns: 1fr;
  }
  .catalog-clean-search {
    min-width: 0;
  }
}

/* ---------- CATALOG MINIMAL / PREMIUM PASS ---------- */
.catalog-page--minimal {
  background:
    radial-gradient(circle at 50% 0, rgba(214,164,121,.10), transparent 26%),
    linear-gradient(180deg, #fbf8f3 0%, #f4ede4 100%);
}
.catalog-clean-header--minimal {
  max-width: 1360px;
  margin: 0 auto;
  grid-template-columns: auto minmax(220px, 420px) auto;
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(250,247,242,.88);
  border-bottom: 1px solid rgba(70,44,58,.06);
}
.catalog-clean-search--minimal {
  background: rgba(255,255,255,.7);
  border-color: rgba(70,44,58,.08);
}
.catalog-clean-search--minimal input {
  font-size: 13px;
}
.catalog-clean-hero--minimal {
  max-width: 860px;
  padding-top: 64px;
  padding-bottom: 24px;
}
.catalog-clean-hero--minimal h1 {
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -.055em;
  line-height: .92;
}
.catalog-clean-hero--minimal p {
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-600);
}
.catalog-clean-summary {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--gray-600);
  font-size: 12px;
  letter-spacing: .02em;
}
.catalog-clean-summary span + span::before {
  content: "•";
  margin-right: 12px;
  color: rgba(70,44,58,.30);
}
.catalog-clean-controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 24px;
}
.catalog-clean-rail-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.catalog-clean-rail-nav::-webkit-scrollbar {
  display: none;
}
.catalog-clean-cats--minimal {
  justify-content: flex-start;
  padding: 0;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}
.catalog-clean-divider {
  display: none;
}
.catalog-clean-chip {
  background: rgba(255,255,255,.62);
  white-space: nowrap;
  flex: 0 0 auto;
}
.catalog-clean-sort--minimal {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 0;
  flex: 0 0 auto;
}
.catalog-clean-rail-nav .catalog-filter:first-of-type {
  margin-left: 12px;
}
.catalog-filter {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(70,44,58,.10);
  border-radius: 999px;
  text-decoration: none;
  color: var(--gray-700);
  background: rgba(255,255,255,.45);
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.catalog-filter.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}
.product-grid--minimal {
  gap: 34px 22px;
}
.product-card--minimal {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.product-card--minimal:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}
.product-card__thumb--minimal {
  padding: 0;
}
.product-card__thumb--minimal .thumb {
  border-radius: 22px;
  background: rgba(255,255,255,.78);
}
.product-card__thumb--minimal .thumb img {
  transition: transform .35s ease;
}
.product-card--minimal:hover .thumb img {
  transform: scale(1.02);
}
.product-card__body--minimal {
  padding: 14px 2px 6px;
}
.product-card__meta--minimal {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-600);
}
.product-card__foot {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.product-card__cta {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.product-card__price-note {
  font-size: 12px;
}
.thumb__tag--minimal {
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.empty--minimal {
  background: rgba(255,255,255,.55);
}
.catalog-footer--minimal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(70,44,58,.08);
  color: var(--gray-600);
}
.catalog-footer--minimal a {
  color: inherit;
  text-decoration: none;
}
.product-card__name {
  font-size: 20px;
}
.product-card__price--clean strong {
  font-size: 16px;
}

@media (max-width: 980px) {
  .catalog-clean-controls {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 640px) {
  .catalog-clean-header--minimal {
    gap: 12px;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .catalog-clean-actions {
    justify-content: flex-start;
  }
  .catalog-clean-contact {
    width: 100%;
    justify-content: center;
  }
  .catalog-clean-controls {
    padding-left: 18px;
    padding-right: 18px;
  }
  .catalog-clean-hero--minimal {
    text-align: left;
  }
  .catalog-clean-summary {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .catalog-clean-summary span + span::before {
    display: none;
  }
  .product-card__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .catalog-footer--minimal {
    flex-direction: column;
    align-items: flex-start;
  }
}

.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(154,138,130,.45); border-radius: 999px; border: 0; }

/* ---------- KEBAB MENU ---------- */
.kebab { position: relative; display: inline-block; }
.kebab__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.kebab__btn:hover,
.kebab__btn:focus-visible {
  background: var(--gray-100);
  color: var(--ink);
  border-color: var(--gray-200);
  outline: none;
}
.kebab__btn svg { width: 18px; height: 18px; }
.kebab.is-open .kebab__btn {
  background: var(--gray-100);
  color: var(--ink);
  border-color: var(--gray-300);
}
.kebab__panel {
  position: fixed;            /* fixed escapa de overflow:hidden ancestral */
  top: 0; left: 0;             /* posicao real e calculada via JS */
  min-width: 210px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  z-index: 1000;               /* acima de qualquer card/row */
  display: none;
  flex-direction: column;
  gap: 2px;
}
.kebab.is-open .kebab__panel { display: flex; }
/* legacy modifiers ainda existem mas nao sao mais necessarios para
   posicionamento - mantidos por compatibilidade. */
.kebab__panel--left { /* noop, JS posiciona */ }
.kebab__panel--up   { /* noop, JS posiciona */ }
.kebab.kebab--up .kebab__panel { /* noop, JS posiciona */ }
.kebab__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.kebab__item svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--gray-700); }
.kebab__item:hover,
.kebab__item:focus-visible {
  background: var(--gray-100);
  color: var(--ink);
  text-decoration: none;
  outline: none;
}
.kebab__item:hover svg,
.kebab__item:focus-visible svg { color: var(--ink); }
.kebab__item--danger { color: var(--danger); }
.kebab__item--danger svg { color: var(--danger); }
.kebab__item--danger:hover,
.kebab__item--danger:focus-visible {
  background: var(--danger-bg);
  color: var(--danger);
}
.kebab__item--danger:hover svg,
.kebab__item--danger:focus-visible svg { color: var(--danger); }
.kebab__sep {
  height: 1px;
  background: var(--gray-200);
  margin: 4px 2px;
}

/* ============================================================
   CATALOG EDITORIAL (cx-*) — variante B: hero full-bleed
   + broken grid com 1 peça em destaque a cada 6.
   Coexiste com o .catalog-clean antigo — a página pública usa esta.
   ============================================================ */

.cx {
  background: #fbf8f4;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--f-body);
}

/* ---------- NAV ---------- */
.cx-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 18px 40px;
  background: rgba(251,248,244,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26,15,10,.06);
}
.cx-nav__brand img { height: 20px; display: block; mix-blend-mode: multiply; }
.cx-nav__links { display: flex; justify-content: center; gap: 28px; }
.cx-nav__link {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-700);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.cx-nav__link:hover { color: var(--ink); text-decoration: none; }
.cx-nav__link.is-active { color: var(--ink); }
.cx-nav__link.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--ink);
}
.cx-nav__admin {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--gray-600);
  transition: background .15s, color .15s;
}
.cx-nav__admin:hover { background: rgba(26,15,10,.06); color: var(--ink); text-decoration: none; }
.cx-nav__admin svg { width: 15px; height: 15px; }
.cx-nav__pad { width: 34px; }

/* ---------- HERO FULL-BLEED ---------- */
.cx-hero {
  position: relative;
  width: 100%;
  min-height: 78vh;
  overflow: hidden;
  background: var(--peach);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.cx-hero--photo { background: var(--plum); }
.cx-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 110%;  /* extra para o parallax */
  object-fit: cover;
  object-position: center 30%;
  will-change: transform;
  z-index: 0;
}
.cx-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(26,15,10,.18) 0%, rgba(26,15,10,0) 25%, rgba(26,15,10,.15) 55%, rgba(26,15,10,.62) 100%),
    linear-gradient(to right,  rgba(26,15,10,.45) 0%, rgba(26,15,10,0) 55%);
}
.cx-hero__content {
  position: relative;
  z-index: 2;
  padding: 48px 44px 64px;
  max-width: 640px;
  color: var(--white);
}
.cx-hero:not(.cx-hero--photo) .cx-hero__content { color: var(--ink); }
.cx-hero__kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .92;
  margin-bottom: 18px;
}
.cx-hero:not(.cx-hero--photo) .cx-hero__kicker { color: var(--coral-deep); opacity: 1; }
.cx-hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(54px, 9vw, 112px);
  line-height: .92;
  letter-spacing: -.03em;
  margin: 0;
}
.cx-hero__title em {
  font-style: italic;
  color: var(--coral-soft);
}
.cx-hero:not(.cx-hero--photo) .cx-hero__title em { color: var(--coral-deep); }
.cx-hero__lede {
  max-width: 440px;
  font-size: 15px;
  line-height: 1.6;
  margin: 22px 0 0;
  opacity: .92;
}
.cx-hero__feature {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  margin-top: 38px;
  padding-top: 18px;
  position: relative;
  transition: transform .2s ease;
}
.cx-hero__feature:hover { text-decoration: none; color: inherit; transform: translateY(-2px); }
.cx-hero__feature-rule {
  position: absolute;
  left: 0; top: 0;
  width: 42px; height: 1px;
  background: currentColor;
  opacity: .6;
}
.cx-hero__feature-meta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 4px;
}
.cx-hero__feature-name {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.1;
}
.cx-hero__feature-more {
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .85;
}

/* ---------- TOPLINE: busca + contador ---------- */
.cx-topline {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 40px 18px;
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 28px;
  align-items: end;
}
.cx-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(26,15,10,.22);
  transition: border-color .2s ease;
}
.cx-search:focus-within { border-bottom-color: var(--ink); }
.cx-search svg { width: 15px; height: 15px; color: var(--gray-600); flex-shrink: 0; }
.cx-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--f-body);
  min-width: 0;
}
.cx-search input::placeholder { color: var(--gray-500); }
.cx-search__clear {
  color: var(--gray-500);
  font-size: 14px;
  text-decoration: none;
  padding: 0 4px;
}
.cx-search__clear:hover { color: var(--ink); text-decoration: none; }
.cx-topline__count {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--gray-700);
  text-transform: uppercase;
  text-align: right;
  padding-bottom: 10px;
}

/* ---------- FILTROS tipográficos ---------- */
.cx-filters {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 40px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(26,15,10,.08);
}
.cx-filters__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  row-gap: 6px;
}
.cx-filter {
  position: relative;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--gray-700);
  text-decoration: none;
  padding: 4px 0 10px;
  transition: color .15s ease;
}
.cx-filter:hover { color: var(--ink); text-decoration: none; }
.cx-filter.is-active { color: var(--ink); }
.cx-filter.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--ink);
}
.cx-filters__sort {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}
.cx-sort {
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--gray-700);
  text-decoration: none;
}
.cx-sort:hover { color: var(--ink); text-decoration: none; }
.cx-sort.is-active { color: var(--ink); font-weight: 500; }
.cx-sort__sep { color: var(--gray-300); user-select: none; }

/* ---------- BROKEN GRID ---------- */
.cx-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 40px 90px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: 48px 28px;
}
.cx-item {
  display: block;
  text-decoration: none;
  color: inherit;
  grid-column: span 1;
}
.cx-item:hover { text-decoration: none; color: inherit; }
.cx-item--wide { grid-column: span 2; }

.cx-item__thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--gray-100);
  overflow: hidden;
}
.cx-item--wide .cx-item__thumb { aspect-ratio: 3 / 2.2; }
.cx-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.cx-item:hover .cx-item__thumb img { transform: scale(1.04); }
.cx-item__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #D6E8F5 0%, #ffe4d6 100%);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 88px;
  color: var(--plum);
  line-height: 1;
}
.cx-item__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--magenta-deep);
  background: rgba(255,255,255,.94);
  padding: 5px 9px;
}
.cx-item__feature-label {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ink);
  padding: 5px 10px;
}
.cx-item__body { padding: 18px 2px 0; }
.cx-item--wide .cx-item__body {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 36px;
  align-items: end;
  padding-top: 22px;
}
.cx-item__head { min-width: 0; }
.cx-item__name {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -.005em;
  color: var(--ink);
}
.cx-item--wide .cx-item__name {
  font-size: 34px;
  line-height: 1.02;
}
.cx-item__meta {
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-top: 6px;
}
.cx-item--wide .cx-item__meta { margin-top: 10px; }
.cx-item__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
}
.cx-item--wide .cx-item__foot {
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  margin-top: 0;
  text-align: right;
  gap: 8px;
}
.cx-item__price {
  font-size: 14px;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}
.cx-item--wide .cx-item__price { font-size: 17px; }
.cx-item__price--muted {
  font-style: italic;
  color: var(--gray-600);
}
.cx-item__cta {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--coral-deep);
  transition: color .15s ease, letter-spacing .2s ease;
}
.cx-item:hover .cx-item__cta { color: var(--magenta-deep); letter-spacing: .22em; }

/* ---------- EMPTY ---------- */
.cx-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
}
.cx-empty__title {
  font-family: var(--f-display);
  font-size: 32px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -.01em;
}
.cx-empty p {
  color: var(--gray-700);
  max-width: 420px;
  margin: 0 auto 26px;
  line-height: 1.6;
  font-size: 14px;
}
.cx-empty__cta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
}
.cx-empty__cta:hover { color: var(--coral-deep); border-bottom-color: var(--coral-deep); text-decoration: none; }

/* ---------- FOOTER ---------- */
.cx-foot {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 44px 40px 54px;
  border-top: 1px solid rgba(26,15,10,.08);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.cx-foot__brand img { height: 16px; mix-blend-mode: multiply; display: block; }
.cx-foot__links { display: flex; gap: 24px; justify-content: center; }
.cx-foot__links a {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-700);
  text-decoration: none;
}
.cx-foot__links a:hover { color: var(--ink); text-decoration: none; }
.cx-foot__rights {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--gray-600);
  letter-spacing: .04em;
  text-align: right;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .cx-nav { padding: 14px 22px; gap: 16px; }
  .cx-nav__links { gap: 18px; }
  .cx-nav__link { font-size: 10px; }

  .cx-hero { min-height: 64vh; }
  .cx-hero__content { padding: 32px 22px 44px; }
  .cx-hero__title { font-size: clamp(42px, 11vw, 72px); }
  .cx-hero__lede { font-size: 14px; }

  .cx-topline { grid-template-columns: 1fr; padding: 30px 22px 14px; gap: 14px; }
  .cx-topline__count { text-align: left; padding-bottom: 0; }
  .cx-filters { padding: 14px 22px 24px; align-items: flex-start; }
  .cx-filters__cats { gap: 0 20px; }

  .cx-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 30px 22px 64px;
    gap: 32px 16px;
  }
  .cx-item--wide { grid-column: span 2; }
  .cx-item--wide .cx-item__thumb { aspect-ratio: 3 / 4; }
  .cx-item--wide .cx-item__body {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 18px;
  }
  .cx-item--wide .cx-item__name { font-size: 24px; }
  .cx-item--wide .cx-item__foot {
    flex-direction: row;
    align-items: baseline;
    text-align: left;
    margin-top: 14px;
  }
  .cx-item--wide .cx-item__price { font-size: 14px; }

  .cx-foot {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 32px 22px 44px;
    text-align: center;
  }
  .cx-foot__rights { text-align: center; }
  .cx-foot__brand { display: flex; justify-content: center; }
  .cx-foot__links { justify-content: center; }
}

@media (max-width: 540px) {
  .cx-grid { grid-template-columns: 1fr; gap: 36px; }
  .cx-item--wide { grid-column: span 1; }
  .cx-hero__title { font-size: clamp(40px, 14vw, 58px); }
  .cx-filters { flex-direction: column; align-items: stretch; }
  .cx-filters__sort {
    justify-content: flex-start;
    border-top: 1px solid rgba(26,15,10,.06);
    padding-top: 14px;
  }
}

/* ============================================================
   PRODUCTS TABLE — responsive layout
   Desktop: columnar grid; Mobile: stacked card per row.
   ============================================================ */
.products-table__head {
  grid-template-columns: 3fr 1fr 1fr 1.1fr 1fr 110px 56px;
}
.products-table__row {
  grid-template-columns: 3fr 1fr 1fr 1.1fr 1fr 110px 56px;
  align-items: center;
}
.products-row__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.products-row__actions {
  display: flex;
  justify-content: flex-end;
}
.products-row__label {
  display: none;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-right: 8px;
}

/* Mobile: stacked card per product */
@media (max-width: 780px) {
  .products-table__head {
    display: none;  /* labels move inline in each row */
  }
  .products-table__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name    actions"
      "sku     sku"
      "price   price"
      "stock   stock"
      "cost    cost"
      "margin  margin";
    gap: 8px 12px;
    padding: 16px 18px;
  }
  .products-table__row > .products-row__name    { grid-area: name; }
  .products-table__row > .products-row__actions { grid-area: actions; }
  .products-table__row > .products-row__sku     { grid-area: sku; }
  .products-table__row > .products-row__price   { grid-area: price; }
  .products-table__row > .products-row__stock   { grid-area: stock; display: flex; align-items: center; }
  .products-table__row > .products-row__cost    { grid-area: cost; }
  .products-table__row > .products-row__margin  { grid-area: margin; display: flex; align-items: center; }
  .products-row__label { display: inline-block; }

  /* Kebab menu: posicionamento controlado por JS via position:fixed.
     Em mobile mantemos largura minima legivel. */
  .products-row__actions .kebab__panel {
    min-width: 220px;
  }
}

/* ============================================================
   LABELS PICKER — product_labels_batch.html
   ============================================================ */
.labels-picker {
  display: flex;
  flex-direction: column;
}
.labels-picker__row {
  display: grid;
  grid-template-columns: 32px 44px 1fr 140px;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
  transition: background .12s ease;
}
.labels-picker__row:hover { background: var(--gray-100); }
.labels-picker__select { display: flex; justify-content: center; }
.labels-picker__thumb img,
.labels-picker__thumb .thumb {
  width: 44px;
  height: 54px;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}
.labels-picker__info { min-width: 0; }
.labels-picker__name {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.labels-picker__meta {
  font-size: 11.5px;
  color: var(--gray-600);
  margin-top: 3px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.labels-picker__qty { text-align: right; }
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--gray-300);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--white);
}
.qty-stepper__btn {
  width: 32px;
  border: 0;
  background: transparent;
  font-size: 16px;
  color: var(--gray-700);
  cursor: pointer;
  transition: background .12s;
}
.qty-stepper__btn:hover { background: var(--gray-100); color: var(--ink); }
.qty-stepper input {
  width: 44px;
  border: 0;
  border-left: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  outline: 0;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.labels-picker__foot {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  margin-top: 16px;
  background: var(--peach-glow, #fff6ec);
  border: 1px solid var(--coral-glow, #ffe8d8);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .labels-picker__row {
    grid-template-columns: 28px 44px 1fr;
    grid-template-areas:
      "select thumb info"
      ".      .     qty";
    gap: 10px 12px;
    padding: 14px 16px;
  }
  .labels-picker__row > .labels-picker__select { grid-area: select; }
  .labels-picker__row > .labels-picker__thumb  { grid-area: thumb; }
  .labels-picker__row > .labels-picker__info   { grid-area: info; }
  .labels-picker__row > .labels-picker__qty    {
    grid-area: qty;
    text-align: left;
    margin-top: 6px;
  }
  .labels-picker__qty .form-label { display: inline-block; margin-right: 10px; }
  .labels-picker__foot { padding: 14px 16px; }
}

/* ============================================================
   SETTINGS TABS — settings.html
   ============================================================ */
.settings-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--gray-100);
  border-radius: var(--r-md);
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.settings-tab {
  flex: 1;
  min-width: 110px;
  padding: 11px 18px;
  border: 0;
  background: transparent;
  color: var(--gray-700);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.settings-tab:hover {
  color: var(--ink);
  background: rgba(255,255,255,.55);
}
.settings-tab:focus-visible {
  outline: 2px solid var(--coral-deep);
  outline-offset: -2px;
}
.settings-tab.is-active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26,15,10,.08);
}
.settings-panel {
  animation: settings-fade-in .18s ease-out;
}
@keyframes settings-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section dividers inside a single big card (e.g. Fiscal) */
.settings-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--gray-200);
}
.settings-section--first {
  padding-top: 16px;
  margin-top: 10px;
  border-top: 0;
}
.settings-section__title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 12px;
}

/* Sticky save bar at bottom of form */
.settings-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
  padding: 16px 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-md);
  position: sticky;
  bottom: 16px;
  box-shadow: 0 4px 14px rgba(26,15,10,.06);
  z-index: 5;
}

@media (max-width: 780px) {
  .settings-tabs { padding: 4px; gap: 2px; }
  .settings-tab { min-width: 90px; padding: 10px 12px; font-size: 12.5px; }
  .settings-foot { position: static; margin-top: 18px; padding: 14px 16px; }
}

/* ============================================================
   MOBILE: tabelas genéricas .table__head / .table__row
   ------------------------------------------------------------
   25 templates usam grid-template-columns inline com larguras
   fixas (ex: "50px 2fr 2fr 110px..."). Em <=780px isso força
   scroll horizontal ou quebra layout. Esta regra neutraliza o
   grid e empilha cada coluna como bloco vertical.
   ============================================================ */
@media (max-width: 780px) {
  .table__head { display: none !important; }

  .table__row {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr !important;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
  }
  .table__row > * {
    width: 100% !important;
    min-width: 0;
    text-align: left !important;
  }
  /* Avatares e thumbs — manter tamanho natural, alinhados à esquerda */
  .table__row > .avatar,
  .table__row > .thumb {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0;
  }
  /* Chips em mobile: inline-flex compacto */
  .table__row > .chip {
    display: inline-flex !important;
    width: auto !important;
    align-self: flex-start;
  }
  /* Forms (botões de ação) ocupam 100% e têm altura confortável p/ toque */
  .table__row > form {
    margin-top: 4px;
  }
  .table__row > form .btn {
    width: 100% !important;
    min-height: 40px;
  }
}

/* ============================================================
   CATÁLOGO PÚBLICO — chips de variantes (tamanhos e cores)
   ============================================================ */
.cx-item__variants {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.cx-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.cx-chips__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  font-weight: 600;
  margin-right: 2px;
}
.cx-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}
.cx-chip--size {
  font-weight: 600;
  letter-spacing: .02em;
  min-width: 28px;
  justify-content: center;
}
.cx-chip__swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  flex-shrink: 0;
}
.cx-item__price-old {
  text-decoration: line-through;
  color: var(--gray-500);
  font-size: .85em;
  font-weight: 500;
  margin-right: 6px;
}
.cx-item__price-new {
  color: var(--magenta);
}
.cx-item__price-prefix {
  font-size: .7em;
  text-transform: lowercase;
  letter-spacing: .04em;
  color: var(--gray-500);
  font-weight: 500;
  margin-right: 4px;
}

/* ============================================================
   Onda 3 · Modal de detalhes da peça (catálogo público)
   ============================================================ */
.px-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.px-modal.is-open { display: flex; animation: pxFade .18s ease-out; }
@keyframes pxFade { from { opacity: 0; } to { opacity: 1; } }

.px-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 14, 10, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}
.px-modal__panel {
  position: relative;
  background: var(--bg, #fff);
  color: var(--ink, #1a1410);
  border-radius: 14px;
  max-width: 860px; width: 100%;
  max-height: 92vh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
  animation: pxRise .28s cubic-bezier(.2,.7,.3,1);
}
@keyframes pxRise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 760px) {
  .px-modal { padding: 0; align-items: stretch; }
  .px-modal__panel { grid-template-columns: 1fr; max-height: 100vh; border-radius: 0; }
  .px-modal__media { max-height: 42vh; }
}

.px-modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 36px; height: 36px;
  border: none; background: rgba(255,255,255,.92);
  color: #1a1410; font-size: 22px; line-height: 1;
  border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.3);
  transition: transform .15s ease;
}
.px-modal__close:hover { transform: scale(1.08); }

.px-modal__media {
  background: var(--gray-100, #f3efe9);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.px-modal__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.px-modal__body {
  padding: 32px 32px 24px;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
@media (max-width: 760px) {
  .px-modal__body { padding: 22px 20px 20px; }
}

.px-modal__eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--gray-500, #888178); margin-bottom: 6px;
}
.px-modal__title {
  font-size: 26px; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.15;
  margin: 0 0 6px;
}
.px-modal__price {
  font-size: 18px; color: var(--coral-deep, #e8501a);
  font-weight: 600; margin-bottom: 22px;
}

/* Tabs */
.px-modal__tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--gray-200, #e9e3d9);
  margin-bottom: 18px;
}
.px-tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 16px 12px; font-size: 13.5px;
  color: var(--gray-700, #666058); font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.px-tab:hover { color: var(--ink, #1a1410); }
.px-tab.is-active {
  color: var(--ink, #1a1410);
  border-bottom-color: var(--coral, #C9A843);
}

/* Panes */
.px-modal__panes { flex: 1; min-height: 140px; }
.px-pane { display: none; }
.px-pane.is-active { display: block; animation: pxPaneIn .2s ease-out; }
@keyframes pxPaneIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.px-pane__text {
  font-size: 14px; line-height: 1.55;
  color: var(--ink-soft, #3a3530);
  white-space: pre-wrap; margin-bottom: 14px;
}
.px-pane__text:empty { display: none; }

/* Meta list (Sobre) */
.px-meta { margin: 0; }
.px-meta__row {
  display: flex; gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--gray-100, #f3efe9);
  font-size: 13px;
}
.px-meta__row dt {
  flex: 0 0 130px;
  color: var(--gray-700, #666058);
  font-weight: 500;
}
.px-meta__row dd { margin: 0; color: var(--ink, #1a1410); text-transform: capitalize; }

/* Blocos (Composição/Cuidados) */
.px-block {
  padding: 12px 14px; margin-bottom: 8px;
  background: var(--gray-100, #f3efe9);
  border-radius: 8px; font-size: 13.5px;
  color: var(--ink, #1a1410);
}
.px-block--lg { font-size: 16px; font-weight: 500; padding: 16px 18px; }
.px-block__lbl {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-700, #666058); font-weight: 500; margin-right: 6px;
}
.px-care-tip {
  margin-top: 12px; font-size: 12px;
  color: var(--gray-700, #666058); font-style: italic;
}
.px-empty-pane {
  padding: 20px; text-align: center;
  color: var(--gray-500, #888178); font-size: 13px; font-style: italic;
}

/* CTA */
.px-modal__cta-row { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--gray-200, #e9e3d9); }
.px-modal__cta {
  width: 100%; padding: 14px 20px;
  background: var(--ink, #1a1410); color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
  cursor: pointer; transition: background .15s;
}
.px-modal__cta:hover { background: var(--coral-deep, #e8501a); }

/* ============================================================
   Polimento v3 · barra de composição + ícones lavagem ISO 3758
   ============================================================ */

/* Barra horizontal proporcional (Composição) */
.px-comp-bar {
  display: flex; width: 100%; height: 14px;
  border-radius: 999px; overflow: hidden;
  background: var(--gray-100, #f3efe9);
  margin-bottom: 16px;
}
.px-comp-bar__seg {
  height: 100%; transition: width .4s cubic-bezier(.2,.7,.3,1);
}

/* Legenda da composição */
.px-comp-legend {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.px-comp-legend li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; line-height: 1;
}
.px-comp-legend__dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.px-comp-legend__pct {
  font-weight: 600; min-width: 38px;
  font-variant-numeric: tabular-nums;
  color: var(--ink, #1a1410);
}
.px-comp-legend__name {
  color: var(--gray-700, #666058);
  text-transform: capitalize;
}

/* Extras de composição (tecido, gramatura) */
.px-extras { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--gray-100, #f3efe9); }

/* Ícone de lavagem ISO 3758 */
.px-wash {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 28px 20px;
  background: var(--gray-100, #f3efe9);
  border-radius: 10px;
}
.px-wash__icon {
  width: 88px; height: 88px;
  color: var(--ink, #1a1410);
}
.px-wash__label {
  font-size: 14.5px; font-weight: 500;
  color: var(--ink, #1a1410); text-align: center;
}

/* ============================================================
   DASHBOARD MOBILE — reordenacao por prioridade
   No mobile a coluna unica do dashboard precisa priorizar
   acoes urgentes (alertas) antes de analises (graficos).
   Ordem: KPIs -> Alertas -> Vendas/Top -> Analytics
   ============================================================ */
@media (max-width: 780px) {
  .dashboard-page {
    display: flex;
    flex-direction: column;
  }
  .dashboard-page .dash-block--kpis        { order: 1; }
  .dashboard-page .dash-block--alerts      { order: 2; margin-top: 0 !important; }
  .dashboard-page .dash-block--operational { order: 3; }
  .dashboard-page .dash-block--analytics   { order: 4; }
}

/* ============================================================
   LOGOUT — reposicionamento no mobile
   Desktop: botao na topbar (padrao), oculto na sidebar
   Mobile : oculto na topbar, visivel como item na sidebar
   ============================================================ */
.sidebar__logout-form { margin: 0; padding: 0; display: none; }
.sidebar__item--logout {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}
.sidebar__item--logout:hover { background: var(--gray-100); }

@media (max-width: 780px) {
  .topbar__actions .logout-action { display: none !important; }
  .sidebar__logout-form { display: block; }
}

/* ============================================================
   v9 — Badge de pendentes na sidebar
   Aparece ao lado do item "A receber" quando ha pagamentos
   aguardando confirmacao.
   ============================================================ */
.sidebar__badge {
  margin-left: auto;
  background: var(--coral-deep, #d44a1f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.sidebar__item:hover .sidebar__badge { background: var(--magenta-deep, #b02a5c); }
.sidebar__item.is-active .sidebar__badge { background: rgba(255,255,255,.25); color: #fff; }

/* ============================================================
   v10 — Swatches de cor interativos no catalogo publico
   Quando ha foto associada a uma cor, o chip vira clicavel
   e troca a foto principal do card.
   ============================================================ */
.cx-chip--has-img {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cx-chip--has-img:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.cx-chip--has-img.is-active {
  outline: 2px solid var(--coral, #C9A843);
  outline-offset: 1px;
}

/* ============================================================
   v10.10 — Tamanhos esgotados na cor selecionada
   Quando cliente clica num swatch de cor, tamanhos sem estoque
   naquela cor ficam esmaecidos com tooltip "esgotado".
   ============================================================ */
.cx-chip--out {
  opacity: .35;
  text-decoration: line-through;
  cursor: not-allowed;
  position: relative;
}
.cx-chip--out:hover {
  opacity: .55;
}


/* ═══ Grade de juros do parcelamento (Configurações) ═══
   Célula própria: o padding 12/14 do .form-control--plain input deixava
   ~13px úteis e decepava o valor ("1.99" → "1", ou nada, parecendo uma
   pílula vazia). Aqui o input é compacto, mono e centralizado. */
.rate-grid {
  display: grid;
  /* auto-fit + minmax(0,...): a grade se adapta à largura real do card em
     vez de exigir 4 colunas fixas. minmax com mínimo 0 impede que a célula
     force largura maior que a coluna disponível. */
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}
.rate-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  cursor: text;
}
.rate-cell:focus-within {
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(201,168,67,.12);
}
.rate-cell__n {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--gray-600);
  flex: none;
  width: 28px;
}
.rate-cell__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 13.5px;
  text-align: right;
  padding: 2px 0;
}
.rate-cell__pct {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--gray-500);
  flex: none;
}

/* Prévia em R$ da parcela (preenchida por JS na tela de Configurações).
   Vira uma segunda linha dentro da célula — por isso o .rate-cell passa a
   ser flex-wrap. Fica vazia se não houver valor de simulação. */
.rate-cell { flex-wrap: wrap; }
.rate-cell__preview {
  flex: 1 0 100%;
  min-width: 0;
  margin-top: 2px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--gray-500);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rate-cell__preview:not(:empty)::before {
  content: "R$ ";
  color: var(--gray-400, var(--gray-500));
}

.rate-sim {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--gray-100);
  border-radius: var(--r-md);
}
.rate-sim__label {
  font-size: 12px;
  color: var(--gray-700);
}
.rate-sim__field {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-sm, 6px);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--gray-600);
}
.rate-sim__field input {
  width: 72px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink);
}
.rate-sim__hint {
  font-size: 11.5px;
  color: var(--gray-500);
  font-style: italic;
}
