/* ------------------------------------------------------------------
   Lavanda Minimal — camada compartilhada de páginas, sites e relatórios
   Fonte canônica dos tokens: ./tokens.css (ver PROVENANCE.md)
   Uso: <link rel="stylesheet" href="assets/lavanda-minimal/lavanda.css">
   Cores literais ficam nas definições de token e de impressão.
   Versão: v1.6 (25/11/2026)
   ------------------------------------------------------------------ */

@import url("./tokens.css");

/* Fontes locais: funcionam offline e em site publicado (copie os .woff2) */
@font-face {
  font-family: "DM Sans";
  src: url("./dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Flex";
  src: url("./roboto-flex.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--lm-canvas);
  color: var(--lm-ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
}

:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--lm-ink);
}

h1 {
  font-size: 28px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
h4 {
  font-size: 14px;
}

p {
  margin: 0 0 12px;
  max-width: 72ch;
}

a {
  color: var(--lm-accent-ink);
  text-decoration-color: var(--lm-border-strong);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--lm-accent);
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
}
code {
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border);
  border-radius: 6px;
  padding: 1px 5px;
}
pre {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow: auto;
  line-height: 1.6;
}
pre code {
  background: none;
  border: 0;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--lm-border);
  margin: 24px 0;
}

/* ---------- Estrutura ---------- */
.lm-page {
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
  padding: 32px 0 64px;
}

.lm-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--lm-border);
}

.lm-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.lm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lm-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.lm-split {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.lm-section {
  margin: 32px 0;
}

/* ---------- Texto utilitário ---------- */
.lm-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lm-muted);
  margin: 0 0 6px;
}
.lm-lead {
  font-size: 16px;
  color: var(--lm-muted);
  max-width: 68ch;
}
.lm-meta {
  font-size: var(--text-meta);
  color: var(--lm-muted);
}
.lm-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
/* faint: só decorativo ou texto >= 18,66px — não carrega informação em 11–12px */
.lm-faint {
  color: var(--lm-faint);
}

/* ---------- Cartões ---------- */
.lm-card {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.lm-card--flat {
  background: transparent;
}
.lm-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.lm-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.lm-card__foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--lm-border);
  font-size: var(--text-meta);
  color: var(--lm-muted);
}

/* ---------- Indicadores ---------- */
.lm-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lm-kpi__label {
  font-size: var(--text-meta);
  color: var(--lm-muted);
}
.lm-kpi__value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.lm-kpi__delta {
  font-size: var(--text-meta);
  color: var(--lm-muted);
}
.lm-kpi__delta--up {
  color: var(--lm-success-ink);
}
.lm-kpi__delta--down {
  color: var(--lm-danger-ink);
}
.lm-kpi__unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--lm-muted);
  margin-left: 2px;
}

/* ---------- Chips e selos ---------- */
.lm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--lm-border);
  background: var(--lm-surface-muted);
  color: var(--lm-muted);
  font-size: var(--text-micro);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.lm-chip--accent {
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
  border-color: transparent;
}
.lm-chip--success {
  background: var(--lm-success-soft);
  color: var(--lm-success-ink);
  border-color: transparent;
}
.lm-chip--warning {
  background: var(--lm-warning-soft);
  color: var(--lm-warning-ink);
  border-color: transparent;
}
.lm-chip--danger {
  background: var(--lm-danger-soft);
  color: var(--lm-danger-ink);
  border-color: transparent;
}
.lm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---------- Botões ---------- */
.lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--lm-border-strong);
  background: var(--lm-surface);
  color: var(--lm-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lm-btn:hover {
  background: var(--lm-surface-muted);
}
.lm-btn--primary {
  background: var(--lm-accent);
  border-color: var(--lm-accent);
  color: var(--lm-on-accent);
}
.lm-btn--primary:hover {
  background: var(--lm-accent-ink);
  border-color: var(--lm-accent-ink);
}
.lm-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--lm-muted);
}
.lm-btn--ghost:hover {
  background: var(--lm-surface-muted);
  color: var(--lm-ink);
}
.lm-btn--sm {
  padding: 4px 10px;
  font-size: var(--text-meta);
}

/* ---------- Campo de busca/filtro ---------- */
.lm-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border-strong);
  border-radius: var(--radius-sm);
  color: var(--lm-muted);
  font-size: 13px;
}
.lm-field input,
.lm-field select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--lm-ink);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 0;
}
.lm-field input:focus-visible,
.lm-field select:focus-visible {
  outline: none;
}
.lm-field:focus-within {
  border-color: var(--lm-accent);
  outline: 2px solid var(--lm-accent-soft);
}

/* ---------- Tabela ---------- */
.lm-table-wrap {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-card);
  overflow: auto;
}
.lm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lm-table caption {
  text-align: left;
  padding: 14px 16px 0;
  font-size: var(--text-meta);
  color: var(--lm-muted);
}
.lm-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--lm-surface-muted);
  color: var(--lm-muted);
  font-family: var(--font-ui);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--lm-border);
  white-space: nowrap;
}
.lm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--lm-border);
  vertical-align: top;
}
.lm-table tbody tr:last-child td {
  border-bottom: 0;
}
.lm-table tbody tr:hover {
  background: var(--lm-selected);
}
.lm-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Barra de proporção ---------- */
.lm-bar {
  height: 8px;
  border-radius: var(--radius-xs);
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border);
  overflow: hidden;
}
.lm-bar__fill {
  height: 100%;
  background: var(--lm-accent);
}
.lm-bar__fill--success {
  background: var(--lm-success);
}
.lm-bar__fill--warning {
  background: var(--lm-warning);
}
.lm-bar__fill--danger {
  background: var(--lm-danger);
}

/* ---------- Destaque / aviso ---------- */
.lm-callout {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--lm-border);
  background: var(--lm-surface);
  border-left: 3px solid var(--lm-accent);
}
.lm-callout__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.lm-callout--warning {
  border-left-color: var(--lm-warning);
}
.lm-callout--danger {
  border-left-color: var(--lm-danger);
}
.lm-callout--success {
  border-left-color: var(--lm-success);
}

/* ---------- Kanban ---------- */
.lm-kanban {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  align-items: start;
}
.lm-col {
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.lm-col__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lm-muted);
}
.lm-card--task {
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.lm-card--task:last-child {
  margin-bottom: 0;
}

/* ---------- Carimbo de frescor ---------- */
.lm-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border);
  color: var(--lm-muted);
  font-size: var(--text-micro);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- Rodapé ---------- */
.lm-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--lm-border);
  font-size: var(--text-meta);
  color: var(--lm-muted);
}

/* ---------- Responsivo (390 px) ---------- */
@media (max-width: 900px) {
  .lm-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .lm-page {
    width: min(1240px, 100% - 32px);
    padding: 20px 0 48px;
  }
  h1 {
    font-size: 23px;
  }
  .lm-kpi__value {
    font-size: 24px;
  }
  .lm-card {
    padding: 14px 15px;
  }
  .lm-table th,
  .lm-table td {
    padding: 9px 10px;
  }
}

/* ---------- Índice da página (v1.5) ----------
   Irmão denso de .lm-section-nav: mesma linguagem, alcance menor (seções da
   própria rota). Vive dentro da casca fixa, então não disputa o topo com ela. */
.lm-toc {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
}
.lm-toc__label {
  flex: none;
  margin: 0;
  color: var(--lm-muted);
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lm-toc__links {
  display: flex;
  gap: 4px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.lm-toc__links::-webkit-scrollbar {
  display: none;
}
.lm-toc__links > li {
  flex: 0 0 auto;
  margin: 0;
}
.lm-toc__links .lm-btn {
  min-block-size: 44px;
  padding-inline: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: none;
}
.lm-toc__links .lm-btn[aria-current] {
  border-color: var(--lm-accent);
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
  box-shadow: inset 0 -3px 0 var(--lm-accent);
}
.lm-toc__links .lm-btn[aria-current]:hover {
  background: var(--lm-accent-soft);
}
/* A casca com índice distribui rota, índice e carimbo na mesma faixa quando
   há largura para isso; abaixo de 900 px o índice ganha a própria faixa. */
@media (min-width: 900px) {
  .lm-section-nav--with-toc .lm-section-nav__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
  }
  .lm-section-nav--with-toc .lm-toc {
    grid-column: 2;
    justify-self: end;
    max-inline-size: 100%;
  }
  }
/* O alvo da âncora não pode parar embaixo da casca fixa. */
.lm-root--toc :is(section, article, div)[id],
.lm-root--toc :is(h2, h3)[id] {
  scroll-margin-block-start: var(--lm-scroll-offset, 120px);
}
@media (max-width: 1199px) {
  .lm-toc__label {
    display: none;
  }
  /* O carimbo sai da casca e vai para o topo do conteúdo: o índice não pode
     empurrar a barra para duas linhas nem comer a altura da tela. */
  .lm-section-nav--with-toc .lm-section-nav__inner > .lm-stamp {
    display: none;
  }
}
@media (max-width: 899px) {
  .lm-section-nav--with-toc .lm-section-nav__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .lm-section-nav--with-toc .lm-toc {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-inline-size: 100%;
    padding-block-start: 2px;
    border-block-start: 1px solid var(--lm-border);
  }
  /* Uma faixa de rotas, sem quebra: a altura fixa não cresce com o índice. */
  .lm-section-nav--with-toc .lm-section-nav__links {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .lm-section-nav--with-toc .lm-section-nav__links::-webkit-scrollbar {
    display: none;
  }
  .lm-section-nav--with-toc .lm-toc__links {
    padding-inline: 4px;
  }
}
@media (max-width: 760px) {
  .lm-section-nav--with-toc .lm-toc__label {
    display: none;
  }
  .lm-section-nav--with-toc .lm-toc {
    padding-block: 0;
  }
  .lm-section-nav--with-toc .lm-toc__links {
    gap: 8px;
    padding-inline: 8px;
    scrollbar-width: none;
  }
  .lm-toc__links .lm-btn:focus-visible {
    outline-offset: -3px;
  }
}

/* ---------- Busca global (v1.5) ----------
   O campo é .lm-field. O resultado é uma linha tipada única que atravessa
   pedido, agente e entrega. */
.lm-search-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}
.lm-search-results {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.lm-search-results > .lm-result {
  margin: 0;
  min-inline-size: 0;
}
.lm-result__link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  min-block-size: 44px;
  padding: 8px 10px;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-sm);
  background: var(--lm-surface);
  color: var(--lm-ink);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.lm-result__link:hover {
  background: var(--lm-surface-muted);
  border-color: var(--lm-border-strong);
}
.lm-result__type {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}
.lm-result__title {
  grid-column: 2;
  grid-row: 1;
  min-inline-size: 0;
  overflow: hidden;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-result__meta {
  grid-column: 2;
  grid-row: 2;
  min-inline-size: 0;
  overflow: hidden;
  font-size: var(--text-meta);
  color: var(--lm-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lm-result__go {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--lm-muted);
  font-size: var(--text-meta);
}
.lm-result--empty > .lm-empty {
  margin: 0;
}
@media (max-width: 760px) {
  .lm-result__link {
    gap: 2px 8px;
    padding: 8px;
  }
  .lm-result__title {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
  }
  /* O destino fica legível em tela estreita: duas linhas em vez de reticências. */
  .lm-result__meta {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.4;
  }
}

/* ---------- Cartão denso de quadro (v1.5) ----------
   Mesma estrutura do cartão confortável; encurta altura, não o alvo de toque. */
@media (min-width: 1024px) {
  .lm-kanban--dense {
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  }
  .lm-kanban--dense .lm-col {
    padding: 10px;
  }
  .lm-kanban--dense .lm-col__head {
    margin-bottom: 8px;
  }
  .lm-kanban--dense .lm-card--task {
    gap: 4px;
    padding: 10px 11px;
    margin-bottom: 6px;
  }
  .lm-kanban--dense .lm-task-media {
    block-size: 40px;
  }
  .lm-kanban--dense .lm-task-excerpt {
    display: none;
  }
  .lm-kanban--dense .lm-task-blocker {
    padding: 3px 7px;
  }
  .lm-kanban--dense .lm-task-actions {
    gap: 6px;
  }
  .lm-kanban--dense .lm-task-actions > .lm-btn {
    padding-inline: 9px;
  }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- Impressão de relatório ---------- */
@media print {
  :root {
    --lm-canvas: #ffffff;
    --lm-surface: #ffffff;
    --lm-ink: #111111;
    --lm-muted: #444444;
    --lm-border: #cccccc;
  }
  body {
    background: #ffffff;
  }
  .lm-page {
    width: 100%;
    padding: 0;
  }
  .lm-btn,
  .lm-field {
    display: none;
  }
  .lm-card,
  .lm-table-wrap,
  .lm-col {
    break-inside: avoid;
  }
  a::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    color: var(--lm-muted);
  }
}

/* ---------- Mídia, preço e filtros ---------- */
:root {
  --lm-brand-mercado-livre: #ffe600;
  --lm-brand-mercado-livre-ink: #2d3277;
  --lm-brand-amazon: #232f3e;
  --lm-brand-amazon-ink: #ffffff;
}

.lm-product-media {
  display: grid;
  position: relative;
  place-items: center;
  aspect-ratio: 4 / 3;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-card);
  background: var(--lm-cover);
  color: var(--lm-muted);
}
.lm-product-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lm-product-media__badge {
  position: absolute;
  inset: 8px auto auto 8px;
  max-inline-size: calc(100% - 16px);
  white-space: normal;
  overflow-wrap: anywhere;
}
.lm-chip--brand-mercado-livre {
  background: var(--lm-brand-mercado-livre);
  color: var(--lm-brand-mercado-livre-ink);
  border-color: transparent;
}
.lm-chip--brand-amazon {
  background: var(--lm-brand-amazon);
  color: var(--lm-brand-amazon-ink);
  border-color: transparent;
}
.lm-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-variant-numeric: tabular-nums;
}
.lm-price__from {
  color: var(--lm-muted);
  font-size: var(--text-meta);
}
.lm-price__current {
  font-family: var(--font-display);
  font-weight: 600;
}
.lm-chip--filter {
  min-block-size: 36px;
  font-family: inherit;
  cursor: pointer;
}
.lm-chip--filter:hover {
  background: var(--lm-selected);
  color: var(--lm-on-accent-soft);
}
.lm-chip--filter[aria-pressed="true"] {
  background: var(--lm-accent-soft);
  border-color: var(--lm-accent);
  color: var(--lm-on-accent-soft);
}
.lm-empty {
  padding: 16px;
  border: 1px dashed var(--lm-border-strong);
  border-radius: var(--radius-card);
  background: var(--lm-surface-muted);
  color: var(--lm-muted);
}

/* ---------- Jornal ---------- */
.lm-card--new {
  border-inline-start: 3px solid var(--lm-success);
}
.lm-card--updated {
  border-inline-start: 3px solid var(--lm-accent);
}
.lm-tag--new {
  background: var(--lm-success-soft);
  color: var(--lm-success-ink);
  border-color: transparent;
}
.lm-tag--updated,
.lm-highlight {
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
}
.lm-tag--updated {
  border-color: transparent;
}
.lm-highlight {
  padding: 14px 16px;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-md);
}
.lm-prose {
  max-inline-size: 68ch;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.lm-timeline--editorial {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--lm-border);
}
.lm-timeline--editorial time {
  display: block;
  color: var(--lm-muted);
  font-size: var(--text-meta);
}

/* ---------- Formulário ---------- */
.lm-form {
  display: grid;
  gap: 16px;
  max-inline-size: 36rem;
}
.lm-form__field {
  display: grid;
  gap: 4px;
  min-inline-size: 0;
}
.lm-form__field > label {
  font-weight: 600;
}
.lm-form__input {
  inline-size: 100%;
  min-block-size: 42px;
  min-inline-size: 0;
  padding: 8px 12px;
  border: 1px solid var(--lm-muted);
  border-radius: var(--radius-sm);
  background: var(--lm-surface);
  color: var(--lm-ink);
  font: inherit;
}
.lm-form__input[aria-invalid="true"] {
  border-color: var(--lm-danger);
}
.lm-form__help,
.lm-form__error {
  font-size: var(--text-meta);
  overflow-wrap: anywhere;
}
.lm-form__help {
  color: var(--lm-muted);
}
.lm-form__error {
  color: var(--lm-danger-ink);
}
.lm-form__consent {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lm-form__consent input {
  flex: none;
  margin: 0;
  accent-color: var(--lm-accent);
}
.lm-form__success {
  padding: 12px 16px;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-sm);
  background: var(--lm-success-soft);
  color: var(--lm-success-ink);
}

/* LAVANDA_PAINEL_INICIO */
html:where(:has(> body > .lm-root)), body:where(:has(> .lm-root)) { margin: 0; padding: 0; }
body:where(:has(> .lm-root)) { background: var(--lm-canvas); }
.lm-root {
  min-height: 100dvh;
  background: var(--lm-canvas);
  color: var(--lm-ink);
  font: var(--text-body)/1.55 var(--font-ui);
}
.lm-root, .lm-root *, .lm-root *::before, .lm-root *::after { box-sizing: border-box; }
.lm-root [hidden] { display: none !important; }
.lm-root :where(button, input) { font: inherit; color: inherit; }
.lm-root :where(button) { cursor: pointer; }
.lm-root :where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}
.lm-root ::selection { background: var(--lm-accent-soft); color: var(--lm-on-accent-soft); }
:where(.lm-root) .lm-icon {
  display: inline-block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:where(.lm-root) .lm-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 620;
  letter-spacing: -.02em;
  line-height: 1.16;
}
:where(.lm-root) .lm-heading--1 { font-size: clamp(30px, 2.6vw, 34px); }
:where(.lm-root) .lm-heading--3 { font-size: 19px; }
:where(.lm-root) .lm-text { margin: 0; }
:where(.lm-root) .lm-muted { color: var(--lm-muted); }
:where(.lm-root) .lm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

:where(.lm-root) .lm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-sm);
  background: var(--lm-surface);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
:where(.lm-root) .lm-button:hover { background: var(--lm-surface-muted); border-color: var(--lm-border-strong); }
:where(.lm-root) .lm-button--primary, :where(.lm-root) .lm-button--primary:hover {
  background: var(--lm-accent);
  color: var(--lm-on-accent);
  border-color: var(--lm-accent);
}
:where(.lm-root) .lm-button--primary:hover { text-decoration: underline; text-underline-offset: 3px; }
:where(.lm-root) .lm-button--ghost { background: transparent; }
:where(.lm-root) .lm-button--sm { min-height: 32px; padding: 4px 10px; font-size: var(--text-meta); }
:where(.lm-root) .lm-icon-button { width: 40px; min-height: 40px; padding: 0; }
:where(.lm-root) .lm-link { color: var(--lm-accent-ink); }

:where(.lm-root) .lm-tone--neutral {
  --tone-ink: var(--lm-muted);
  --tone-soft: var(--lm-surface-muted);
  --tone-mark: var(--lm-muted);
}
:where(.lm-root) .lm-tone--accent {
  --tone-ink: var(--lm-on-accent-soft);
  --tone-soft: var(--lm-accent-soft);
  --tone-mark: var(--lm-accent);
}
:where(.lm-root) .lm-tone--success {
  --tone-ink: var(--lm-success-ink);
  --tone-soft: var(--lm-success-soft);
  --tone-mark: var(--lm-success);
}
:where(.lm-root) .lm-tone--warning {
  --tone-ink: var(--lm-warning-ink);
  --tone-soft: var(--lm-warning-soft);
  --tone-mark: var(--lm-warning);
}
:where(.lm-root) .lm-tone--danger {
  --tone-ink: var(--lm-danger-ink);
  --tone-soft: var(--lm-danger-soft);
  --tone-mark: var(--lm-danger);
}
:where(.lm-root) .lm-badge, :where(.lm-root) .lm-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: var(--radius-xs);
  background: var(--tone-soft, var(--lm-surface-muted));
  color: var(--tone-ink, var(--lm-muted));
  padding: 3px 7px;
  font-size: var(--text-micro);
  font-weight: 600;
  line-height: 1.25;
}
:where(.lm-root) .lm-status-dot, :where(.lm-root) .lm-timeline-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone-mark, var(--lm-muted));
}
:where(.lm-root) .lm-avatar {
  display: inline-grid;
  flex: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--avatar-fg);
  font-size: var(--text-meta);
  font-weight: 600;
}
:where(.lm-root) .lm-avatar--sm { width: 25px; height: 25px; font-size: var(--text-meta); }

:where(.lm-root) .lm-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 22px;
  padding: 18px 16px;
  background: var(--lm-surface);
  border-right: 1px solid var(--lm-border);
  overflow-y: auto;
}
:where(.lm-root) .lm-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--lm-ink);
  text-decoration: none;
}
:where(.lm-root) .lm-wordmark-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--avatar-bg);
  color: var(--avatar-fg);
}
:where(.lm-root) .lm-wordmark strong {
  display: block;
  font: 620 17px/1.15 var(--font-display);
  letter-spacing: -.02em;
}
:where(.lm-root) .lm-wordmark small { display: block; margin-top: 2px; color: var(--lm-muted); font-size: var(--text-micro); }
:where(.lm-root) .lm-rail-list { display: grid; gap: 18px; }
:where(.lm-root) .lm-rail-section { display: grid; gap: 3px; }
:where(.lm-root) .lm-rail-section-label { padding: 0 10px 3px; color: var(--lm-muted); font-size: var(--text-micro); }
:where(.lm-root) .lm-rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--lm-muted);
  text-align: left;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
:where(.lm-root) .lm-rail-item:hover { background: var(--lm-surface-muted); color: var(--lm-ink); }
:where(.lm-root) .lm-rail-item[aria-current="page"] {
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
  font-weight: 600;
}
:where(.lm-root) .lm-rail-item[aria-current="page"] .lm-icon { color: var(--lm-accent); }
:where(.lm-root) .lm-rail-badge {
  margin-left: auto;
  padding: 0 5px;
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-xs);
  font-size: var(--text-micro);
  font-variant-numeric: tabular-nums;
}

:where(.lm-root) .lm-topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 8px clamp(18px, 2vw, 28px);
  background: var(--lm-surface);
  border-bottom: 1px solid var(--lm-border);
}
:where(.lm-root) .lm-topbar-actions { display: flex; align-items: center; gap: 10px; }
:where(.lm-root) .lm-search {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  color: var(--lm-muted);
  background: var(--lm-surface-muted);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-sm);
}
:where(.lm-root) .lm-search:focus-within {
  background: var(--lm-surface);
  outline: 2px solid var(--lm-accent);
  outline-offset: 1px;
}
:where(.lm-root) .lm-search .lm-input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0;
  outline: none;
  border: 0;
  background: transparent;
  color: var(--lm-ink);
  font-size: 13px;
}
:where(.lm-root) .lm-input::placeholder { color: var(--lm-muted); opacity: 1; }

:where(.lm-root) .lm-card, :where(.lm-root) .lm-alert {
  min-width: 0;
  padding: 18px;
  background: var(--lm-surface);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-card);
}
:where(.lm-root) .lm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
:where(.lm-root) .lm-card-top > :first-child { min-width: 0; }
:where(.lm-root) .lm-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--tone-soft);
  color: var(--tone-ink);
}
:where(.lm-root) .lm-alert .lm-link { color: inherit; }
:where(.lm-root) .lm-block-list { padding-inline-start: 18px; margin-block: 8px 0; }
:where(.lm-root) .lm-queue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  text-align: left;
}
:where(.lm-root) .lm-queue-row:hover { background: var(--lm-selected); }
:where(.lm-root) .lm-queue-row-main { display: grid; gap: 1px; min-width: 0; }
:where(.lm-root) .lm-queue-row-title { font-weight: 600; }
:where(.lm-root) .lm-queue-row-subtitle { color: var(--lm-muted); font-size: var(--text-meta); }

:where(.lm-root) .lm-timeline { list-style: none; display: grid; gap: 0; margin: 0; padding: 0; }
:where(.lm-root) .lm-timeline li { display: flex; gap: 11px; padding: 8px 0; align-items: flex-start; }
:where(.lm-root) .lm-timeline li + li { border-top: 1px solid var(--lm-border); }
:where(.lm-root) .lm-timeline-dot { margin-top: 8px; }
:where(.lm-root) .lm-timeline strong { font-weight: 600; }
:where(.lm-root) .lm-timeline p, :where(.lm-root) .lm-timeline time { font-size: var(--text-meta); color: var(--lm-muted); }

:where(.lm-root) .lm-table-scroll { max-width: 100%; overflow-x: auto; }
:where(.lm-root) .lm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
:where(.lm-root) .lm-table :is(td, th) { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--lm-border); }
:where(.lm-root) .lm-table th { color: var(--lm-muted); font-weight: 600; background: var(--lm-surface-muted); }
:where(.lm-root) .lm-table tbody tr:hover { background: var(--lm-selected); }
:where(.lm-root) .lm-table tbody tr:last-child td { border-bottom: 0; }

:where(.lm-root) .lm-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(480px, 100%);
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--lm-border);
  background: var(--lm-surface);
  color: var(--lm-ink);
  box-shadow: var(--shadow-panel);
}
:where(.lm-root) .lm-dialog[open] { display: flex; flex-direction: column; }
:where(.lm-root) .lm-dialog::backdrop { background: var(--lm-scrim); }
:where(.lm-root) .lm-dialog :is(header, footer) { padding: 16px 20px; }
:where(.lm-root) .lm-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--lm-border);
}
:where(.lm-root) .lm-dialog footer { border-top: 1px solid var(--lm-border); }
:where(.lm-root) .lm-dialog header > div { min-width: 0; overflow-wrap: anywhere; }
:where(.lm-root) .lm-dialog-title { margin: 0; font: 620 22px/1.2 var(--font-display); letter-spacing: -.02em; }
:where(.lm-root) .lm-dialog-body { flex: 1 1 auto; overflow: auto; padding: 18px 20px; }
:where(.lm-root) .lm-skip {
  position: fixed;
  z-index: 3;
  inset: 8px auto auto 12px;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--lm-ink);
  color: var(--lm-surface);
  transform: translateY(-150%);
}
:where(.lm-root) .lm-skip:focus { transform: none; }
/* LAVANDA_PAINEL_FIM */

/* ---------- Galeria de entregas ---------- */
.lm-gallery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.lm-gallery-card {
  min-width: 0;
  overflow-wrap: anywhere;
}
.lm-gallery-trigger {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.lm-gallery-trigger:hover .lm-card__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lm-product-media--cover > img {
  object-fit: cover;
}
.lm-product-media--cover > [hidden] {
  display: none;
}
.lm-product-media--cover .lm-product-media__fallback {
  max-inline-size: calc(100% - 16px);
  white-space: normal;
  text-align: center;
}
:where(.lm-root) .lm-dialog.lm-dialog--media {
  inset: 0;
  margin: auto;
  width: min(900px, calc(100% - 24px));
  height: fit-content;
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--lm-border);
  border-radius: var(--radius-lg);
}
.lm-dialog-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58dvh, 560px);
  object-fit: contain;
  border-radius: var(--radius-card);
  background: var(--lm-cover);
}

/* ---------- Navegação entre seções ---------- */
.lm-section-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 10;
  background: var(--lm-surface);
  border-block-end: 1px solid var(--lm-border);
}
.lm-section-nav__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
  padding-block: 4px 8px;
}
.lm-section-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  padding: 4px;
}
.lm-section-nav__links > .lm-btn {
  min-block-size: 44px;
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
  transition: none;
}
.lm-section-nav__links > .lm-btn[aria-current] {
  border-color: var(--lm-accent);
  background: var(--lm-accent-soft);
  color: var(--lm-on-accent-soft);
}
.lm-section-nav__inner > .lm-stamp {
  justify-self: start;
  max-width: 100%;
}
.lm-breadcrumb {
  grid-column: 1 / -1;
  min-width: 0;
  font-size: var(--text-meta);
}
.lm-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--lm-muted);
  overflow-wrap: anywhere;
}
.lm-breadcrumb li {
  min-width: 0;
}
.lm-breadcrumb [aria-hidden="true"] {
  margin-inline-end: 8px;
}
.lm-breadcrumb [aria-current="page"] {
  color: var(--lm-ink);
  font-weight: 600;
}
@media (max-width: 760px) {
  .lm-section-nav__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .lm-section-nav__links {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-padding-inline: 4px;
  }
}

/* ---------- Cartão de tarefa com conteúdo ---------- */
.lm-task-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow-wrap: anywhere;
}
.lm-task-card :is(a, button):not(.lm-task-open) {
  position: relative;
  z-index: 1;
}
.lm-task-open::after {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  content: "";
}
.lm-task-open:focus-visible::after {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
}
.lm-task-title,
.lm-task-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0;
}
.lm-task-title {
  line-height: 1.25;
  min-block-size: 2.5em;
}
.lm-task-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  block-size: 56px;
}
.lm-task-media > .lm-product-media {
  aspect-ratio: auto;
}
.lm-task-blocker {
  margin: 0;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  background: var(--lm-warning-soft);
  color: var(--lm-warning-ink);
}
.lm-task-actions {
  margin-block-start: auto;
}
.lm-task-actions > .lm-btn {
  min-block-size: 44px;
}
:where(.lm-root) .lm-dialog.lm-dialog--task {
  width: min(420px, 100%);
}

/* ---------- Caminho de arquivo com cópia ---------- */
.lm-file-path {
  display: flex;
  align-items: center;
  gap: 8px;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.lm-file-path__value {
  display: flex;
  flex: 1 1 0;
  min-inline-size: 0;
  white-space: nowrap;
  overflow: hidden;
}
.lm-file-path__start,
.lm-file-path__end {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lm-file-path__end {
  flex: 0 0 auto;
  max-inline-size: 85%;
}
.lm-file-path > .lm-btn {
  flex: none;
}

/* ---------- Leitura e toque em telas estreitas ---------- */
@media (max-width: 760px) {
  .lm-chip {
    min-inline-size: 0;
    max-inline-size: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .lm-meta {
    overflow-wrap: anywhere;
  }
  .lm-card--task,
  .lm-task-excerpt {
    font-size: var(--text-body);
    line-height: 1.5;
  }
  .lm-kpi__value,
  .lm-num {
    white-space: nowrap;
  }
  :is(.lm-btn, .lm-button, .lm-chip--filter, .lm-queue-row, .lm-rail-item, .lm-gallery-trigger),
  button,
  a.lm-chip {
    min-block-size: 44px;
  }
  .lm-icon-button {
    min-inline-size: 44px;
  }
  .lm-chip--filter {
    justify-content: center;
    text-align: center;
  }
  .lm-field {
    min-inline-size: 0;
    padding-block: 0;
  }
  .lm-field :is(input, select),
  .lm-search .lm-input,
  .lm-form__input {
    min-block-size: 44px;
    font-size: var(--text-body);
  }
  .lm-task-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .lm-gallery-grid {
    grid-auto-rows: 1fr;
    gap: 8px;
  }
  .lm-gallery-grid > .lm-gallery-card {
    gap: 8px;
    padding: 8px;
  }
  .lm-gallery-grid .lm-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  :where(.lm-root) .lm-dialog.lm-dialog--media {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .lm-section-nav__inner {
    width: 100%;
    gap: 0;
    padding-block: 0;
  }
  .lm-section-nav__links {
    gap: 8px;
    padding: 0 8px;
    scrollbar-width: none;
  }
  .lm-section-nav__links::-webkit-scrollbar {
    display: none;
  }
  .lm-section-nav__links > .lm-btn:focus-visible {
    outline-offset: -3px;
  }
  .lm-section-nav__inner > .lm-stamp {
    display: block;
    justify-self: stretch;
    overflow: hidden;
    padding: 0 10px 2px;
    border: 0;
    background: transparent;
    font-size: var(--text-meta);
    line-height: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .lm-section-nav__inner > :is(.lm-breadcrumb, .lm-meta) {
    display: none;
  }
  .lm-breadcrumb ol {
    align-items: center;
  }
  .lm-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
  }
}
@media (min-width: 360px) and (max-width: 599px) {
  .lm-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 600px) and (max-width: 900px) {
  .lm-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
  }
}
