:root {
  --hx-nav: #141821;
  --hx-nav-text: #f4f1ea;
  --hx-accent: #c4a35a;
  --hx-teal: #1f6f78;
  --hx-bg: #f3f1ec;
  --hx-sheet: #fff;
  --hx-border: #e4e0d6;
  --hx-text: #1c1f26;
  --hx-muted: #6b675e;
  --hx-danger: #b42318;
  --hx-ok: #067647;
  --hx-shadow: 0 10px 30px rgba(20, 24, 33, 0.08);
  --hx-radius: 14px;
  --hx-control-h: 2.5rem;
  --hx-control-px: .85rem;
  --hx-control-radius: 10px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Outfit", "Source Sans 3", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--hx-text);
  background: var(--hx-bg);
}
a { color: var(--hx-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 .35rem; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }

.hx-icon { width: 1.1rem; height: 1.1rem; display: inline-block; vertical-align: -0.15em; }
.hx-muted { color: var(--hx-muted); }
.hx-kicker {
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--hx-accent);
  margin-bottom: .5rem;
}

.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 1px solid var(--hx-border);
  background: #fff;
  color: var(--hx-text);
  height: var(--hx-control-h);
  min-height: var(--hx-control-h);
  padding: 0 1rem;
  border-radius: var(--hx-control-radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}
.hx-btn:hover { background: #f7f5f0; text-decoration: none; }
.hx-btn:focus-visible, .hx-nav__apps-btn:focus-visible, .hx-user__btn:focus-visible,
.hx-form input:focus-visible, .hx-form select:focus-visible, .hx-form textarea:focus-visible,
.hx-analise-filtros input:focus-visible, .hx-analise-filtros select:focus-visible,
.hx-saft input:focus-visible, .hx-search input:focus-visible, a:focus-visible {
  outline: 2px solid var(--hx-teal);
  outline-offset: 2px;
}
.hx-btn--primary {
  background: var(--hx-teal);
  border-color: var(--hx-teal);
  color: #fff;
}
.hx-btn--primary:hover { background: #18575e; }
.hx-btn--danger {
  color: var(--hx-danger);
  border-color: #f0c4c0;
  background: #fff;
}
.hx-btn--danger:hover { background: #fde8e6; }
.hx-btn--block { width: 100%; justify-content: center; }

.hx-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--hx-teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.hx-avatar--sm { width: 1.7rem; height: 1.7rem; }
.hx-avatar--lg { width: 4.2rem; height: 4.2rem; font-size: 1.2rem; }

.hx-chip {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #eeeae1;
  color: #4b463c;
}
.hx-chip--blue { background: #dbeafe; color: #1e40af; }
.hx-chip--amber { background: #fef3c7; color: #92400e; }
.hx-chip--green { background: #dcfce7; color: #166534; }
.hx-chip--lead { background: #eeeae1; color: #4b463c; }
.hx-chip--estado-rascunho { background: #eeeae1; color: #4b463c; }
.hx-chip--estado-enviado { background: #dbeafe; color: #1e40af; }
.hx-chip--estado-encomenda { background: #dcfce7; color: #166534; }
.hx-chip--estado-cancelado { background: #fee2e2; color: #991b1b; }
.hx-chip--tipo-produto { background: #ede9fe; color: #5b21b6; }
.hx-chip--tipo-servico { background: #e0f2fe; color: #075985; }
.hx-chip--mov-entrada { background: #dcfce7; color: #166534; }
.hx-chip--mov-saida { background: #fee2e2; color: #991b1b; }
.hx-chip--mov-ajuste { background: #fef3c7; color: #92400e; }
.hx-stock-low { color: #b42318; font-weight: 650; }
.hx-chip--demo { background: #fef3c7; color: #92400e; }
.hx-chip--pag-pago { background: #dcfce7; color: #166534; }
.hx-chip--pag-parcial { background: #fef3c7; color: #92400e; }
.hx-chip--pag-aberto { background: #fee2e2; color: #991b1b; }
.hx-banner { border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1rem; font-size: .95rem; }
.hx-banner--demo { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; }
.hx-banner--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* Auth */
.hx-auth { background: #0f1218; }
.hx-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.hx-auth-brand {
  padding: 3rem;
  color: #f4f1ea;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(196, 163, 90, .18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(31, 111, 120, .28), transparent 42%),
    #141821;
}
.hx-auth-brand h1 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 12ch; }
.hx-auth-brand em { color: var(--hx-accent); font-style: normal; }
.hx-auth-brand__mark { color: var(--hx-accent); margin-bottom: 1.5rem; }
.hx-auth-panel {
  background: var(--hx-sheet);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 5vw, 4.5rem);
}
.hx-auth-panel h2 { font-size: 1.8rem; }
.hx-hint { margin-top: 1.25rem; color: var(--hx-muted); font-size: .9rem; }
.hx-hint code { background: #f3f1ec; padding: .1rem .35rem; border-radius: 6px; }

/* Nav */
.hx-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--hx-nav);
  color: var(--hx-nav-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 48px;
}
.hx-nav__left, .hx-nav__right { display: flex; align-items: center; gap: .6rem; }
.hx-nav__apps-btn, .hx-user__btn {
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  padding: .35rem;
  border-radius: 8px;
}
.hx-nav__apps-btn:hover, .hx-user__btn:hover { background: rgba(255,255,255,.08); }
.hx-nav__home {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .45rem .25rem .25rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 650;
}
.hx-nav__home:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.hx-nav__home-label { font-size: .95rem; }
.hx-nav__brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-weight: 650;
  text-decoration: none;
}
.hx-nav__brand:hover { text-decoration: none; }
.hx-app-icon--home { background: #2a303c; }
.hx-nav__titles { display: flex; flex-direction: column; line-height: 1.15; }
.hx-nav__app { font-size: .95rem; }
.hx-nav__company { font-size: .68rem; font-weight: 500; opacity: .65; font-family: var(--font); }
.hx-nav__logo { color: var(--hx-accent); display: flex; }
.hx-user__name { font-size: .9rem; }
.hx-user { position: relative; }
.hx-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  background: #fff;
  color: var(--hx-text);
  min-width: 180px;
  border-radius: 10px;
  box-shadow: var(--hx-shadow);
  overflow: hidden;
  z-index: 30;
}
.hx-menu a { display: block; padding: .7rem 1rem; color: inherit; }
.hx-menu a:hover { background: #f3f1ec; text-decoration: none; }
.hx-menu__meta {
  margin: 0;
  padding: .65rem 1rem .35rem;
  font-size: .75rem;
  color: var(--hx-muted);
  font-weight: 600;
}
.hx-apps-panel {
  position: absolute;
  left: .75rem;
  top: 52px;
  background: #fff;
  color: var(--hx-text);
  border-radius: 14px;
  box-shadow: var(--hx-shadow);
  padding: 1rem;
  z-index: 25;
  min-width: 320px;
  max-width: calc(100vw - 1.5rem);
}
.hx-apps-panel__search {
  display: flex;
  align-items: center;
  gap: .4rem;
  border: 1px solid var(--hx-border);
  border-radius: 10px;
  padding: .4rem .65rem;
  margin-bottom: .85rem;
}
.hx-apps-panel__search input {
  border: 0;
  outline: 0;
  font: inherit;
  width: 100%;
  background: transparent;
}
.hx-apps-panel__empty { margin: .4rem 0 0; text-align: center; color: var(--hx-muted); font-size: .9rem; }
.hx-apps-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, 86px);
  gap: .6rem;
}
.hx-apps-panel__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: inherit;
  padding: .4rem;
  border-radius: 10px;
  text-align: center;
}
.hx-apps-panel__item:hover, .hx-apps-panel__item.is-active { background: #f3f1ec; text-decoration: none; }

.hx-app-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--app-color, var(--hx-teal));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hx-app-icon--lg { width: 3.2rem; height: 3.2rem; border-radius: 14px; }
.hx-app-icon .hx-icon { width: 1.25rem; height: 1.25rem; color: #fff; }
.hx-app-icon--lg .hx-icon { width: 1.55rem; height: 1.55rem; }

.hx-main { padding: 1.25rem 1.5rem 3rem; max-width: 1180px; margin: 0 auto; }
.hx-wide .hx-main, .hx-wide .hx-flash-wrap { max-width: none; }
.hx-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: .7rem 1.5rem 0;
  font-size: .92rem;
}
.hx-wide .hx-path { max-width: none; }
.hx-path__sep { color: var(--hx-muted); display: inline-flex; }
.hx-path__sep .hx-icon { width: .9rem; height: .9rem; }
.hx-path__item {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .45rem;
  border-radius: 8px;
  font-weight: 650;
}
.hx-path a.hx-path__item { color: var(--hx-teal); }
.hx-path a.hx-path__item:hover { background: #e8efe8; text-decoration: none; }
.hx-path [aria-current="page"] { color: var(--hx-text); }
.hx-path__home .hx-icon { width: 1rem; height: 1rem; }
.hx-flash-wrap { max-width: 1180px; margin: .75rem auto 0; padding: 0 1.5rem; }
.hx-flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.hx-flash--error { background: #fde8e6; color: var(--hx-danger); }
.hx-flash--success { background: #e7f6ee; color: var(--hx-ok); }
.hx-flash__close {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: .15rem;
  display: inline-flex;
  opacity: .7;
}
.hx-flash__close:hover { opacity: 1; }

.hx-control {
  display: flex;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
}
.hx-control h1 { margin-bottom: .2rem; }
.hx-control .hx-muted { margin: 0; }
.hx-control__actions { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.hx-crumb { font-size: .85rem; color: var(--hx-muted); display: inline-block; margin-bottom: .2rem; }
.hx-search {
  display: flex;
  align-items: center;
  gap: .45rem;
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-control-radius);
  height: var(--hx-control-h);
  padding: 0 .8rem;
  box-sizing: border-box;
}
.hx-search input { border: 0; outline: 0; font: inherit; min-width: 220px; background: transparent; height: 100%; }
.hx-search button {
  border: 0;
  background: transparent;
  color: var(--hx-muted);
  padding: 0;
  display: inline-flex;
  cursor: pointer;
}
.hx-filters {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.hx-filter-field select {
  height: var(--hx-control-h);
  min-width: 13.5rem;
  padding: 0 .85rem;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-control-radius);
  background: #fff;
  font: inherit;
  font-weight: 500;
}
.hx-colab-switch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}
.hx-colab-switch select {
  height: var(--hx-control-h);
  min-height: var(--hx-control-h);
  min-width: 12.5rem;
  padding: 0 .85rem;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-control-radius);
  background: #fff;
  font: inherit;
  font-weight: 500;
  box-sizing: border-box;
}
.hx-form--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .7rem;
  margin-top: 1rem;
}
.hx-form--inline label { min-width: 14rem; }
.hx-table-wrap { overflow-x: auto; }

.hx-sheet {
  background: var(--hx-sheet);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow);
  padding: 1.35rem 1.4rem;
}
.hx-table { width: 100%; border-collapse: collapse; }
.hx-table th, .hx-table td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--hx-border); vertical-align: middle; }
.hx-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--hx-muted); }
.hx-table tr:last-child td { border-bottom: 0; }
.hx-table tbody tr[data-href] { cursor: pointer; }
.hx-table tbody tr[data-href]:hover { background: #f7f5f0; }
.hx-table tbody tr[data-href]:focus-visible { outline: 2px solid var(--hx-teal); outline-offset: -2px; }
.hx-table .hx-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-saldo.is-due { color: #9a3412; font-weight: 700; }
.hx-saldo.is-credit { color: #166534; font-weight: 600; }
.hx-saldo.is-ok { color: var(--hx-muted); font-weight: 600; }
.hx-conta-filtro { margin: -.4rem 0 1rem; }
.hx-conta-lado { margin-bottom: 1rem; }
.hx-conta-lado__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .4rem 1.2rem;
  margin-bottom: 1rem;
}
.hx-conta-lado__head h2 { margin: 0; font-size: 1.15rem; }
.hx-conta-lado__head .hx-muted { margin: 0; }
.hx-conta-lado__saldo { margin-left: auto; margin-top: 0; font-size: .95rem; }
.hx-conta-lado__saldo strong { margin-left: .35rem; font-size: 1.15rem; }
.hx-conta-form { margin-bottom: 1.4rem; }
.hx-extracto__act { width: 1%; white-space: nowrap; }
.hx-link-row { display: flex; align-items: center; gap: .7rem; color: inherit; }
.hx-link-row small { display: block; color: var(--hx-muted); font-weight: 400; }
.hx-link-row:hover { text-decoration: none; }
.hx-empty { text-align: center; padding: 2.5rem 1rem; display: grid; gap: .5rem; justify-items: center; color: var(--hx-muted); }
.hx-empty strong { color: var(--hx-text); }

.hx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hx-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hx-border);
}
.hx-pager__info { margin: 0; color: var(--hx-muted); font-size: .9rem; }
.hx-pager__pages { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.hx-pager__btn,
.hx-pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .45rem;
  border-radius: 8px;
  border: 1px solid var(--hx-border);
  background: #fff;
  color: inherit;
  text-decoration: none;
  font: inherit;
  font-size: .88rem;
}
.hx-pager__btn .hx-icon { width: 16px; height: 16px; }
.hx-pager__btn:hover,
.hx-pager__num:hover { background: #f7f5f0; text-decoration: none; }
.hx-pager__num.is-current {
  background: var(--hx-teal);
  border-color: var(--hx-teal);
  color: #fff;
  font-weight: 600;
}
.hx-pager__btn.is-disabled { opacity: .35; pointer-events: none; }
.hx-pager__gap { color: var(--hx-muted); padding: 0 .2rem; }
.hx-pager__size select {
  font: inherit;
  font-size: .88rem;
  height: 2rem;
  padding: 0 1.85rem 0 .55rem;
  border: 1px solid var(--hx-border);
  border-radius: 8px;
  background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b675e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .45rem center;
  background-size: .85rem;
  cursor: pointer;
}

.hx-launcher__head { margin: 1rem 0 1.5rem; }
.hx-launcher__head h1 { font-size: 2rem; }
.hx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; margin-bottom: 1.5rem; }
.hx-stats article, .hx-stats a {
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: inherit;
  display: block;
}
.hx-stats a:hover { text-decoration: none; border-color: #cfc8b8; box-shadow: var(--hx-shadow); }
.hx-stats strong { display: block; font-size: 1.6rem; font-family: var(--display); }
.hx-stats span { color: var(--hx-muted); font-size: .9rem; }
.hx-stats small { display: block; margin-top: .15rem; color: var(--hx-muted); }
.hx-stats--warn strong { color: var(--hx-danger); }
.hx-launcher__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.hx-tile {
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: 16px;
  padding: 1.2rem;
  display: grid;
  gap: .45rem;
  color: inherit;
  box-shadow: var(--hx-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hx-tile:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 14px 28px rgba(20, 24, 33, 0.1); }
.hx-tile .hx-app-icon,
.hx-tile .hx-app-icon .hx-icon { color: #fff; }
.hx-tile__desc { color: var(--hx-muted); font-size: .9rem; }

.hx-form { display: grid; gap: 1.15rem; }
.hx-form label { display: grid; gap: .4rem; font-weight: 600; font-size: .92rem; min-width: 0; }
.hx-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.hx-form select,
.hx-form textarea,
.hx-analise-filtros input,
.hx-analise-filtros select,
.hx-saft input,
.hx-saft select,
.hx-line-form input,
.hx-line-form select {
  font: inherit;
  font-size: 1rem;
  color: inherit;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-control-radius);
  background-color: #fff;
  box-sizing: border-box;
}
.hx-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.hx-form select,
.hx-analise-filtros input,
.hx-analise-filtros select,
.hx-saft input,
.hx-saft select,
.hx-line-form input,
.hx-line-form select {
  height: var(--hx-control-h);
  min-height: var(--hx-control-h);
  padding: 0 var(--hx-control-px);
  line-height: 1.25;
}
.hx-form textarea {
  min-height: 6.5rem;
  height: auto;
  padding: .7rem var(--hx-control-px);
  line-height: 1.45;
  resize: vertical;
}
.hx-form select,
.hx-analise-filtros select,
.hx-saft select,
.hx-line-form select,
.hx-import-cols__map select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b675e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}
.hx-form input[type="date"],
.hx-analise-filtros input[type="date"],
.hx-saft input[type="date"] {
  appearance: none;
  display: block;
  color-scheme: light;
}
.hx-form input[type="date"]::-webkit-datetime-edit,
.hx-analise-filtros input[type="date"]::-webkit-datetime-edit,
.hx-saft input[type="date"]::-webkit-datetime-edit {
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
}
.hx-form input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.hx-analise-filtros input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.hx-saft input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
.hx-form input[type="date"]::-webkit-calendar-picker-indicator,
.hx-analise-filtros input[type="date"]::-webkit-calendar-picker-indicator,
.hx-saft input[type="date"]::-webkit-calendar-picker-indicator {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
  opacity: .55;
}
.hx-form--grid .hx-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 1.15rem;
}
.hx-form__row--full { grid-column: 1 / -1; }
.hx-form__actions { display: flex; justify-content: flex-end; gap: .6rem; }
.hx-checks { display: flex; gap: 1rem; }
.hx-form fieldset.hx-checks {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.hx-check { font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.hx-radios {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.1rem;
  padding-top: .15rem;
}
.hx-radios .hx-check { font-weight: 550; }

.hx-tabs { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--hx-border); }
.hx-tabs a { padding: .7rem 1rem; color: var(--hx-muted); font-weight: 600; }
.hx-tabs a.is-active { color: var(--hx-teal); box-shadow: inset 0 -2px 0 var(--hx-teal); text-decoration: none; }
.hx-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: .35rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: #ece8df;
  color: var(--hx-muted);
  font-size: .75rem;
  font-weight: 700;
}
.hx-tabs a.is-active .hx-tab-count {
  background: #d7e8ea;
  color: var(--hx-teal);
}

.hx-table .hx-zona-row th {
  background: #f3f1ec;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hx-muted);
  padding: .7rem 1rem .45rem;
}
.hx-checks--inline {
  display: grid;
  gap: .45rem;
  align-content: end;
}
.hx-checks--inline > span {
  font-weight: 600;
  font-size: .92rem;
}

.hx-split {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 1.15rem;
  align-items: start;
  margin-bottom: 1.15rem;
}
.hx-split--eq { grid-template-columns: 1fr 1fr; }
.hx-analise-filtros {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.15rem;
  align-items: end;
  margin-bottom: 1.25rem;
}
.hx-analise-filtros label {
  display: grid;
  gap: .4rem;
  font-weight: 600;
  font-size: .92rem;
  min-width: 0;
}
.hx-analise-filtros__bar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem 1rem;
  flex-wrap: wrap;
}
.hx-analise-filtros__go {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-left: auto;
}
.hx-analise-presets {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin: 0;
}
.hx-analise-presets a {
  display: inline-flex;
  align-items: center;
  height: 1.85rem;
  padding: 0 .75rem;
  border: 1px solid var(--hx-border);
  border-radius: 999px;
  background: #f7f5f0;
  color: var(--hx-text);
  font-size: .88rem;
  font-weight: 600;
}
.hx-analise-presets a:hover { background: #ece8df; text-decoration: none; }
.hx-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.hx-kpis article {
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--hx-shadow);
}
.hx-kpis span {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--hx-muted);
  font-weight: 700;
}
.hx-kpis strong {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  margin: .25rem 0 .15rem;
}
.hx-kpis small { color: var(--hx-muted); }
.hx-delta { display: block; font-weight: 600; margin: .1rem 0; }
.hx-delta.is-up { color: var(--hx-ok); }
.hx-delta.is-down { color: var(--hx-danger); }
.hx-insights {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: 12px;
  display: grid;
  gap: .5rem;
}
.hx-insights li { padding-left: 1rem; position: relative; }
.hx-insights li::before {
  content: '';
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--hx-teal);
  position: absolute;
  left: 0;
  top: .45rem;
}
.hx-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}
.hx-chart-grid .hx-sheet { padding: 1.2rem 1.3rem 1.3rem; }
.hx-chart-grid .hx-section-title { margin: 0 0 .9rem; }
.hx-chart-grid canvas { display: block; width: 100%; max-height: 260px; }
.hx-partner__head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }
.hx-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.hx-dl { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.hx-dl dt { font-size: .75rem; color: var(--hx-muted); text-transform: uppercase; letter-spacing: .04em; }
.hx-dl dd { margin: .15rem 0 0; }
.hx-dl--full { grid-column: 1 / -1; }
.hx-chatter h3 { margin-bottom: .8rem; }
.hx-chatter__form { display: grid; gap: .6rem; margin-bottom: 1rem; }
.hx-chatter__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.hx-chatter__list time { display: block; font-size: .78rem; color: var(--hx-muted); }
.hx-apps-admin { display: grid; gap: .8rem; }
.hx-app-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.hx-app-card__action { display: flex; align-items: center; gap: .6rem; }
.hx-section-title { margin: 1.5rem 0 .75rem; font-size: 1.05rem; }
.hx-sheet > .hx-section-title:first-child { margin-top: 0; }
.hx-section-title a { font-size: .82rem; font-weight: 600; margin-left: .35rem; }
.hx-mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.hx-mini-list li { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }

.hx-kanban {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: .4rem;
}
.hx-kanban__col {
  flex: 0 0 250px;
  background: #ece8df;
  border-radius: 14px;
  padding: .7rem;
  min-height: 380px;
  transition: box-shadow .15s ease;
}
.hx-kanban__col.is-drop { box-shadow: inset 0 0 0 2px var(--hx-teal); }
.hx-kanban__head { display: flex; align-items: center; gap: .4rem; margin-bottom: .2rem; }
.hx-kanban__dot { width: .65rem; height: .65rem; border-radius: 50%; }
.hx-kanban__sum { font-size: .82rem; color: var(--hx-muted); margin: 0 0 .7rem; }
.hx-kanban__card {
  background: #fff;
  border-radius: 10px;
  padding: .75rem .8rem;
  margin-bottom: .55rem;
  box-shadow: 0 1px 3px rgba(20,24,33,.08);
  cursor: grab;
}
.hx-kanban__card.is-dragging { opacity: .45; }
.hx-kanban__card a { color: inherit; display: grid; gap: .2rem; }
.hx-kanban__card a:hover { text-decoration: none; }
.hx-kanban__card:hover { box-shadow: 0 4px 12px rgba(20,24,33,.1); }
.hx-kanban__card span { color: var(--hx-muted); font-size: .88rem; }
.hx-kanban__meta { font-size: .8rem !important; }
.hx-kanban__card.is-overdue { box-shadow: inset 3px 0 0 #dc2626, 0 1px 3px rgba(20,24,33,.08); }
.hx-accao-line { font-size: .78rem !important; }
.hx-accao-line.is-overdue { color: #991b1b !important; font-weight: 700; }
.hx-form label .hx-help,
.hx-help {
  font-weight: 500;
  font-size: .8rem;
  color: var(--hx-muted);
}

.hx-crm-next {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  background: #eef6f5;
  border-radius: 10px;
  color: #1f4f52;
  font-weight: 600;
}
.hx-crm-stage-hint { margin: -.4rem 0 1.1rem; }
.hx-crm-agenda {
  background: #fff;
  border: 1px solid var(--hx-border);
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
}
.hx-crm-agenda header h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.hx-crm-agenda header .hx-muted { margin: 0 0 .9rem; }
.hx-crm-agenda__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
.hx-crm-agenda__col {
  background: #f7f4ee;
  border-radius: 10px;
  padding: .75rem .85rem;
}
.hx-crm-agenda__col.is-overdue { background: #fef2f2; }
.hx-crm-agenda__col h3 {
  margin: 0 0 .55rem;
  font-size: .92rem;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}
.hx-crm-agenda__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.hx-crm-agenda__col li { display: grid; gap: .1rem; }
.hx-crm-agenda__col li span { font-size: .82rem; color: var(--hx-muted); }
.hx-kanban__hint {
  font-size: .75rem;
  color: var(--hx-muted);
  margin: 0 0 .7rem;
  line-height: 1.35;
  min-height: 2.4em;
}
.hx-accao-line--empty { font-style: italic; }

@media (max-width: 900px) {
  .hx-crm-agenda__cols { grid-template-columns: 1fr; }
}

.hx-accao {
  background: #f7f4ee;
  border-radius: 12px;
  padding: 1rem 1.1rem 1.1rem;
  margin-bottom: 1.2rem;
}
.hx-accao.is-overdue {
  background: #fef2f2;
  box-shadow: inset 3px 0 0 #dc2626;
}
.hx-accao h3 { margin: 0 0 .35rem; font-size: 1rem; }
.hx-accao > .hx-muted { margin: 0 0 .85rem; }
.hx-accao .hx-form { gap: .9rem; }
.hx-accao .hx-form__actions { margin-top: .2rem; }

.hx-statusbar {
  display: flex;
  gap: .25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.hx-statusbar form, .hx-statusbar > .hx-statusbar__item { flex: 1 1 110px; }
.hx-statusbar__item {
  width: 100%;
  border: 0;
  background: #e7e3d8;
  color: var(--hx-text);
  padding: .65rem .4rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  border-radius: 8px;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
}
span.hx-statusbar__item { cursor: default; }
.hx-statusbar__item.is-past { background: #c8ddd8; }
.hx-statusbar__item.is-current { background: var(--hx-teal); color: #fff; }
.hx-statusbar__item.is-won { background: #067647; color: #fff; }
.hx-statusbar__item.is-lost { background: var(--hx-danger); color: #fff; }
.hx-statusbar__item:disabled { cursor: default; }
.hx-chip--validade-caducado { background: #FEE2E2; color: #991B1B; }
.hx-chip--validade-90 { background: #FEF3C7; color: #92400E; }
.hx-chip--validade-180 { background: #E0F2FE; color: #075985; }
.hx-line-form {
  display: grid;
  grid-template-columns: 2fr .6fr .8fr .6fr auto;
  gap: .55rem;
  margin-top: 1rem;
  align-items: end;
}
.hx-line-form--produto { grid-template-columns: 1.3fr 1.4fr .5fr .7fr .45fr minmax(5.5rem, auto) auto; }
.hx-line-form--ajuste { grid-template-columns: .9fr 1.6fr auto; }
.hx-line-form--tabela { grid-template-columns: 1fr auto; }
.hx-preco-origem {
  font-size: .78rem;
  color: var(--hx-muted);
  align-self: center;
  white-space: nowrap;
}
.hx-line-seed { border: 1px dashed var(--hx-border); border-radius: 12px; padding: .8rem 1rem 1rem; }
.hx-line-seed legend { font-weight: 650; padding: 0 .4rem; }
.hx-totals { display: grid; gap: .35rem; justify-items: end; margin-top: 1.2rem; }
.hx-totals div { display: grid; grid-template-columns: auto 8rem; gap: 1rem; }
.hx-totals dt { color: var(--hx-muted); }
.hx-totals dd { margin: 0; text-align: right; }
.hx-totals__grand { font-size: 1.15rem; font-weight: 700; }

.hx-dialog {
  border: 1px solid var(--hx-border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--hx-shadow);
  max-width: 26rem;
  width: calc(100% - 2rem);
}
.hx-dialog::backdrop { background: rgba(20, 24, 33, .4); }
.hx-dialog p { margin: 0 0 1.1rem; font-size: 1.02rem; }
.hx-dialog__actions { display: flex; justify-content: flex-end; gap: .6rem; }

.hx-pdf {
  display: block;
  width: 100%;
  min-height: 72vh;
  margin-top: 1rem;
  border: 1px solid var(--hx-border);
  border-radius: 12px;
  background: #fff;
}
.hx-saft-card {
  margin-bottom: 1.15rem;
  display: grid;
  gap: 1rem;
}
.hx-saft-card .hx-section-title { margin-top: 0; }
.hx-saft {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.15rem;
  align-items: end;
}
.hx-saft label {
  display: grid;
  gap: .4rem;
  font-weight: 600;
  font-size: .92rem;
  min-width: 11rem;
}
.hx-saft .hx-btn { flex-shrink: 0; }
.hx-banner--info { background: #eef7f8; border: 1px solid #b7d5d8; color: #18575e; }
.hx-import-destinos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.hx-import-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  padding: .9rem 1rem;
  border: 1px solid var(--hx-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 400;
}
.hx-import-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hx-import-card__text { display: grid; gap: .25rem; min-width: 0; }
.hx-import-card strong { font-size: 1rem; }
.hx-import-card__text span { color: var(--hx-muted); font-size: .88rem; font-weight: 400; }
.hx-import-card:has(input:checked) {
  border-color: var(--hx-teal);
  background: #eef7f8;
  box-shadow: 0 0 0 1px var(--hx-teal);
}
.hx-import-file {
  display: grid;
  gap: .4rem;
  font-weight: 600;
  font-size: .92rem;
}
.hx-import-file input[type="file"] {
  font: inherit;
  width: 100%;
  min-height: var(--hx-control-h);
  padding: .55rem .75rem;
  border: 1px dashed var(--hx-border);
  border-radius: var(--hx-control-radius);
  background: #faf9f6;
  box-sizing: border-box;
}
.hx-import-modelos { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }
.hx-import-map {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem 1rem;
}
.hx-import-cols th,
.hx-import-cols td {
  min-width: 9.5rem;
  vertical-align: top;
}
.hx-import-cols__map select {
  display: block;
  width: 100%;
  min-width: 10rem;
  height: 2.15rem;
  min-height: 2.15rem;
  font: inherit;
  font-weight: 500;
  padding: 0 2rem 0 .55rem;
  border: 1px solid var(--hx-border);
  border-radius: 8px;
  background-color: #fff;
}
.hx-table-wrap { overflow-x: auto; }
.hx-table--compact th, .hx-table--compact td { padding: .45rem .4rem; font-size: .88rem; white-space: nowrap; }

@media (max-width: 960px) {
  .hx-analise-filtros {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 840px) {
  .hx-auth-shell { grid-template-columns: 1fr; }
  .hx-auth-brand { display: none; }
  .hx-split, .hx-form--grid .hx-form__row, .hx-dl, .hx-app-card, .hx-line-form, .hx-chart-grid, .hx-split--eq { grid-template-columns: 1fr; }
  .hx-line-form--tabela { grid-template-columns: 1fr auto; }
  .hx-import-destinos, .hx-import-map { grid-template-columns: 1fr; }
  .hx-control { flex-direction: column; align-items: stretch; }
  .hx-user__name { display: none; }
  .hx-main { padding: 1rem; }
  .hx-path { padding: .55rem 1rem 0; }
  .hx-apps-panel { left: .5rem; right: .5rem; min-width: 0; }
  .hx-nav__company { display: none; }
}
@media (max-width: 560px) {
  .hx-stats { grid-template-columns: 1fr; }
  .hx-analise-filtros { grid-template-columns: 1fr; }
}
