@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2330;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-rgb: 59, 130, 246;
  --nav-accent: #3b82f6;
  --nav-accent-rgb: 59, 130, 246;
  --danger: #991b1b;
  --danger-soft: rgba(153, 27, 27, 0.35);
  --success: #238636;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, sans-serif;
  --topbar: #010409;
}

/* Tema claro global (definido pelo administrador em Aparência do sistema) */
html.theme-light {
  --bg: #e8edf5;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #64748b;
  --topbar: #eef2f7;
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.12);
  --success: #15803d;
}
html.theme-light .app-topstrip strong {
  color: #15803d;
}
html.theme-light .app-nav-exit:hover {
  color: #b91c1c !important;
}
html.theme-light .card-badge {
  color: #991b1b;
}
html.theme-light .card-badge.ok {
  color: #166534;
}
html.theme-light .card-badge.warn {
  color: #a16207;
}
html.theme-light .badge-warn {
  color: #b91c1c;
}
html.theme-light .flash-ok {
  background: rgba(22, 101, 52, 0.12);
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.35);
}
html.theme-light .flash-err {
  color: #991b1b;
  border: 1px solid rgba(185, 28, 28, 0.4);
}
html.theme-light #pos-pay-status.ok {
  color: #15803d;
}
html.theme-light #pos-msg.warn,
html.theme-light #pos-pay-status.warn {
  color: #a16207;
}
html.theme-light #pos-pay-status.bad {
  color: #b91c1c;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--nav-accent-rgb), 0.55) transparent;
}
html.theme-light {
  color-scheme: light;
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--nav-accent-rgb), 0.55) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(var(--nav-accent-rgb), 0.45);
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--nav-accent-rgb), 0.85);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
select,
select::picker(select) {
  appearance: base-select;
}
select::picker(select) {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--nav-accent-rgb), 0.55) transparent;
}
select::picker(select)::-webkit-scrollbar {
  width: 8px;
}
select::picker(select)::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
select::picker(select)::-webkit-scrollbar-thumb {
  background: rgba(var(--nav-accent-rgb), 0.45);
  border-radius: 99px;
}
select option {
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}
select option:hover,
select option:focus,
select option:checked {
  background: rgba(var(--nav-accent-rgb), 0.18);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Top strip */
.app-topstrip {
  background: var(--topbar);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.35rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.app-topstrip strong {
  color: #3fb950;
  font-weight: 600;
}
.app-topstrip-store {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.app-topstrip-store label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-topstrip-store select {
  appearance: base-select;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.12rem 0.45rem;
  max-width: 16rem;
}

/* Header */
.app-header {
  background: linear-gradient(
    180deg,
    rgba(var(--nav-accent-rgb), 0.14) 0%,
    var(--surface) 72%
  );
  border-bottom: 1px solid rgba(var(--nav-accent-rgb), 0.22);
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.app-brand:hover {
  text-decoration: none;
  color: var(--text);
}
.app-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  margin-left: auto;
  max-width: 100%;
}
.app-nav > a {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.app-nav > a:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
}
.app-nav > a.is-active {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
}
.app-nav > a.app-nav-pdv {
  font-weight: 600;
  color: var(--nav-accent);
}
.app-nav > a.app-nav-pdv:hover {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
}
.app-nav-exit {
  color: var(--muted) !important;
  margin-left: 0.25rem;
  padding-left: 0.85rem !important;
  border-left: 1px solid var(--border);
}
.app-nav-exit:hover {
  color: #fca5a5 !important;
  background: var(--danger-soft) !important;
}

.app-nav-dropdown {
  position: relative;
}
/* Ponte invisível no vão de 2mm entre o botão e o painel (mantém :hover ao descer o mouse) */
.app-nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  min-width: 220px;
  height: 2mm;
  z-index: 199;
}
.app-nav-dropdown--end::before {
  left: auto;
  right: 0;
}
.app-nav-dropdown-toggle {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.app-nav-dropdown-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}
.app-nav-dropdown-toggle:hover,
.app-nav-dropdown:hover .app-nav-dropdown-toggle {
  color: var(--text);
  background: var(--surface-hover);
}
.app-nav-dropdown.is-active .app-nav-dropdown-toggle {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
}
.app-nav-dropdown-panel--scroll {
  max-height: min(65vh, 360px);
  overflow-y: auto;
}

.app-nav-dropdown-panel {
  display: block;
  position: absolute;
  /* Distância visual de ~2 mm entre o botão e a lista (ponte ::before cobre o vão para o hover) */
  top: calc(100% + 2mm);
  left: 0;
  min-width: 220px;
  max-width: min(300px, calc(100vw - 1.5rem));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease-out 0.28s,
    visibility 0s linear 0.48s;
}
.app-nav-dropdown--end .app-nav-dropdown-panel {
  left: auto;
  right: 0;
}
.app-nav-dropdown-panel a {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
}
.app-nav-dropdown-panel a:hover {
  color: var(--text);
  background: var(--surface-hover);
  text-decoration: none;
}
.app-nav-dropdown-panel a.is-active {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
}
.app-nav-dropdown-sep {
  display: block;
  height: 1px;
  margin: 0.35rem 0.4rem;
  background: var(--border);
}
.app-nav-dropdown:hover .app-nav-dropdown-panel,
.app-nav-dropdown:focus-within .app-nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.12s ease-out 0s,
    visibility 0s linear 0s;
}

@media (max-width: 960px) {
  .app-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.5rem 1rem;
    align-items: center;
  }
  .app-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  .app-user-bar {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    font-size: 0.78rem;
    max-width: min(18rem, 92vw);
    flex-direction: column;
    align-items: flex-end;
  }
  .app-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-left: 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
  }
}

.app-user-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.75rem;
}
.app-user-bar .app-user-theme-picker,
.app-header .app-user-theme-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
.app-user-bar .app-user-theme-picker select.input,
.app-header .app-user-theme-picker select.input {
  width: auto;
  min-width: 7rem;
  max-width: 10rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
}
.app-user-theme-picker .sub {
  color: var(--muted);
}
.app-user {
  font-size: 0.8rem;
  color: var(--muted);
}
.app-user strong {
  color: var(--text);
}
.app-user span {
  display: block;
  margin-top: 0.1rem;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}
.app-sidebar {
  width: 232px;
  flex: 0 0 232px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1rem 0.35rem 1rem 0.75rem;
  box-sizing: border-box;
  z-index: 40;
}
.app-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--nav-accent-rgb), 0.55) transparent;
}
.app-sidebar-scroll::-webkit-scrollbar,
.app-nav-dropdown-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.app-sidebar-scroll::-webkit-scrollbar-button,
.app-nav-dropdown-panel::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.app-sidebar-scroll::-webkit-scrollbar-track,
.app-nav-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}
.app-sidebar-scroll::-webkit-scrollbar-thumb,
.app-nav-dropdown-panel::-webkit-scrollbar-thumb {
  background: rgba(var(--nav-accent-rgb), 0.45);
  border-radius: 99px;
}
.app-sidebar-scroll::-webkit-scrollbar-thumb:hover,
.app-nav-dropdown-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--nav-accent-rgb), 0.8);
}
.app-nav-dropdown-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--nav-accent-rgb), 0.55) transparent;
}
.app-content {
  flex: 1;
  min-width: 0;
}
.app-sidebar-top {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0.15rem 0.15rem 0;
}
.app-sidebar-top .app-brand {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0.35rem;
}
.app-side-hide,
.app-side-show {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.app-side-hide:hover,
.app-side-show:hover {
  border-color: var(--nav-accent, var(--accent));
  color: var(--nav-accent, var(--accent));
}
@media (min-width: 901px) {
  .app-side-hide { display: inline-flex; }
  .app-sidebar {
    transition: width 0.18s ease, flex-basis 0.18s ease, padding 0.18s ease, border-color 0.18s ease;
  }
  html.app-side-collapsed .app-sidebar {
    width: 0;
    flex-basis: 0;
    min-width: 0;
    padding: 0;
    border-right-width: 0;
    overflow: hidden;
  }
  html.app-side-collapsed .app-side-show {
    display: inline-flex;
    position: fixed;
    left: 0.45rem;
    top: 0.7rem;
    z-index: 60;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }
}
.app-sidebar .app-brand {
  padding: 0 0.35rem;
}
.app-sidebar .app-brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-store {
  margin: 0.15rem 0.35rem 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}
.app-nav-search {
  position: relative;
  margin: 0 0.35rem 0.65rem;
}
.app-nav-search-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}
.app-nav-search-field:focus-within {
  border-color: var(--nav-accent, var(--accent));
  color: var(--text);
}
.app-nav-search-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}
.app-nav-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  padding: 0.48rem 0;
  outline: none;
}
.app-nav-search-field input::placeholder {
  color: var(--muted);
}
.app-nav-search-list {
  margin-top: 0.35rem;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.app-nav-search-list[hidden] {
  display: none !important;
}
.app-nav-search-hit {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.app-nav-search-hit:last-child {
  border-bottom: 0;
}
.app-nav-search-hit strong {
  font-size: 0.82rem;
  font-weight: 600;
}
.app-nav-search-group {
  font-size: 0.68rem;
  color: var(--muted);
}
.app-nav-search-hit:hover,
.app-nav-search-hit.is-on {
  background: color-mix(in srgb, var(--nav-accent, var(--accent)) 14%, transparent);
}
.app-nav-search-empty {
  margin: 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.app-nav-order-hint {
  margin: 0 0.35rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}
.app-nav-section {
  display: block;
  margin: 0.7rem 0.45rem 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-sidebar .app-nav > a,
.app-sidebar .app-nav-dropdown-toggle,
.app-sidebar .app-nav-dropdown-panel a {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}
.nav-move-pop {
  position: fixed;
  z-index: 80;
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.nav-move-pop[hidden] {
  display: none !important;
}
.nav-move-pop button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.nav-move-pop button:disabled {
  opacity: 0.4;
  cursor: default;
}
.app-sidebar .is-nav-moving,
.app-sidebar .app-nav-dropdown-toggle.is-nav-moving,
.app-sidebar .app-nav-dropdown-panel a.is-nav-moving {
  outline: 2px solid var(--nav-accent);
  outline-offset: 1px;
}
.app-sidebar .app-nav-dropdown-toggle,
.app-sidebar .app-nav > a[data-nav-key],
.app-sidebar .app-nav-dropdown-panel a[data-nav-item] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.app-sidebar .app-nav {
  margin: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
}
.app-sidebar .app-nav > a,
.app-sidebar .app-nav-dropdown-toggle {
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}
.app-sidebar .app-nav-dropdown {
  width: 100%;
}
.app-sidebar .app-nav-dropdown::before {
  display: none;
}
.app-sidebar .app-nav-dropdown-toggle::after {
  margin-left: auto;
  transform: rotate(-90deg);
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-toggle::after {
  transform: none;
}
.app-sidebar .app-nav-dropdown .app-nav-dropdown-panel,
.app-sidebar .app-nav-dropdown:hover .app-nav-dropdown-panel,
.app-sidebar .app-nav-dropdown:focus-within .app-nav-dropdown-panel {
  position: static;
  display: none;
  min-width: 0;
  max-width: none;
  max-height: none;
  margin: 0.15rem 0 0.25rem;
  padding: 0.1rem 0 0.15rem 0.35rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-panel {
  display: block;
  visibility: visible;
  pointer-events: auto;
  margin: 0.2rem 0 0.35rem 0.15rem;
  padding: 0.35rem 0.3rem 0.4rem 0.45rem;
  border-radius: 10px;
  border-left: 3px solid rgba(var(--nav-accent-rgb), 0.4);
  background: rgba(var(--nav-accent-rgb), 0.08);
}
.app-sidebar .app-nav-dropdown.is-open > .app-nav-dropdown-toggle {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
  font-weight: 600;
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-panel a {
  color: var(--text);
  background: rgba(var(--nav-accent-rgb), 0.06);
  margin-bottom: 0.12rem;
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-panel a:hover {
  background: rgba(var(--nav-accent-rgb), 0.14);
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-panel a.is-active {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.22);
  font-weight: 600;
}
.app-sidebar-foot {
  margin-top: auto;
  padding: 0.65rem 0.35rem 0.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.45rem;
  border-top: 1px solid var(--border);
}
.app-sidebar-foot .app-user-theme-picker,
.app-sidebar-foot .app-theme-picker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.12rem;
  min-width: 0;
  margin: 0;
  grid-column: 1 / -1;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
}
.theme-toggle:hover {
  border-color: var(--nav-accent, var(--accent));
  color: var(--nav-accent, var(--accent));
}
.app-sidebar-foot .theme-toggle {
  width: 100%;
}
.manual-lead,
.manual-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.manual-lead { margin: 0 0 1rem; }
.manual-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin: 0 0 1rem;
}
.manual-tools form { margin: 0; }
.manual-note { margin: 0; font-size: 0.82rem; }
.manual-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}
.manual-toc a {
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text);
}
.manual-toc a:hover { border-color: var(--accent); color: var(--accent); }
.manual-sec { margin-bottom: 0.85rem; }
.manual-sec h2 { margin: 0 0 0.45rem; font-size: 1.05rem; }
.manual-sec p { margin: 0 0 0.55rem; line-height: 1.5; color: var(--text); }
.manual-sec p:last-child { margin-bottom: 0; }
.app-sidebar-foot .app-user-theme-picker .sub,
.app-sidebar-foot .app-theme-picker .sub {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.app-sidebar-foot .input,
.app-sidebar-foot select.input {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.32rem 0.4rem;
  font-size: 0.78rem;
}
.app-sidebar-foot .app-user {
  min-width: 0;
  align-self: center;
  font-size: 0.78rem;
}
.app-sidebar-foot .app-user strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-foot .app-user span {
  font-size: 0.7rem;
}
.app-sidebar-foot .app-nav-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  align-self: center;
  margin: 0;
  padding: 0.32rem 0.7rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}
.app-sidebar-foot .app-nav-exit:hover {
  color: #fca5a5;
  background: var(--danger-soft);
  text-decoration: none;
}
.app-nav-tools {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
#pos-sidebar-tools {
  display: none;
}
.app-sidebar-tools {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.app-sidebar-tools details {
  margin: 0;
  background: transparent;
  border: 0;
  padding: 0;
}
.app-sidebar-tools summary {
  display: block;
  cursor: pointer;
  list-style: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.app-sidebar-tools summary::-webkit-details-marker { display: none; }
.app-sidebar-tools summary:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.app-sidebar-tools details[open] > summary {
  color: var(--nav-accent);
  background: rgba(var(--nav-accent-rgb), 0.14);
  font-weight: 600;
}
body.pos-side-open .page-title,
body.pos-side-open #pos-drawer-watch,
body.pos-side-open .pos-panel-products {
  display: none;
}
.pos-tool-stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.25rem;
  min-height: calc(100vh - 120px);
  max-height: calc(100vh - 96px);
  overflow: auto;
  box-sizing: border-box;
}
.pos-tool-stage .pos-tool-title {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
}
.pos-tool-stage .pos-side-body > .sub {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}
.pos-tool-stage .pos-side-scroll,
.pos-tool-stage .pos-recent-sales-scroll {
  overflow: auto;
  margin-bottom: 0.75rem;
}
.pos-tool-stage .pos-side-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.75rem;
}
.pos-tool-stage .pos-side-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin: 0.85rem 0 0.35rem;
}
.pos-tool-stage .pos-side-form .form-group {
  margin: 0;
  flex: 1 1 180px;
}
.pos-tool-stage .pos-side-form .input {
  width: 100%;
  box-sizing: border-box;
}
.pos-tool-stage .pos-side-form label.sub {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}
.pos-tool-stage .pos-side-form .pos-receipt {
  flex: 1 1 100%;
  min-width: 0;
  max-width: 100%;
}
.pos-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
  max-width: 100%;
}
.pos-receipt-actions .btn {
  flex: 1 1 8rem;
  min-height: 40px;
  margin: 0;
  text-align: center;
  cursor: pointer;
}
.pos-receipt input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.pos-receipt-preview {
  display: block;
  width: 7.5rem;
  max-width: 100%;
  height: auto;
  margin-top: 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
@media (max-width: 720px) {
  .pos-tool-stage .pos-side-form .btn {
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }
  .pos-receipt-actions { flex-direction: column; }
  .pos-receipt-actions .btn {
    flex: 1 1 auto;
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }
}
.pos-tool-stage #pos-expenses-msg,
.pos-tool-stage #pos-sangrias-msg {
  margin: 0;
  min-height: 1.2rem;
  font-size: 0.82rem;
}
.app-menu-bar,
.app-menu-toggle,
.app-menu-close,
.app-nav-backdrop {
  display: none;
}
@media (max-width: 1180px) {
  .app-sidebar {
    width: 208px;
    flex-basis: 208px;
  }
  .app-main {
    padding: 1.15rem 1rem 2.25rem;
  }
  .pos-panel-cart {
    flex-basis: 300px;
    width: 300px;
  }
}
@media (max-width: 900px) {
  .app-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }
  .app-menu-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 45;
    padding: 0.45rem 0.75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(320px, 92vw);
    flex-basis: auto;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
    z-index: 70;
  }
  body.app-nav-open .app-sidebar {
    transform: none;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.35);
  }
  .app-sidebar .app-brand {
    padding-right: 4.2rem;
  }
  .app-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0.55rem;
    right: 0.45rem;
    margin: 0;
    min-width: 40px;
    min-height: 40px;
    padding: 0.28rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
  }
  .app-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.45);
  }
  .app-nav-backdrop[hidden] {
    display: none;
  }
  .app-main {
    padding: 0.9rem 0.75rem 2rem;
  }
  .page-title {
    font-size: 1.25rem;
  }
  .grid-dashboard,
  .admin-hub-grid,
  .goal-grid,
  .goal-forms {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-group {
    min-width: 0;
    width: 100%;
  }
  .card {
    padding: 1rem;
  }
  table.data th,
  table.data td {
    padding: 0.5rem 0.6rem;
  }
  .pos-layout {
    flex-direction: column;
  }
  .pos-panel-cart {
    flex: 1 1 auto;
    width: 100%;
  }
  .pos-tool-stage {
    min-height: 0;
    max-height: none;
  }
  .product-grid {
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
  }
  .input,
  select.input,
  textarea.input,
  .app-nav-search input {
    font-size: 16px;
  }
  .app-menu-toggle,
  .app-sidebar .app-nav > a,
  .app-sidebar .app-nav-dropdown-toggle,
  .app-sidebar .app-nav-dropdown-panel a,
  .app-sidebar-foot .app-nav-exit {
    min-height: 40px;
  }
  .app-nav-order-hint { display: none; }
}
@media (min-width: 901px) and (max-width: 1024px) {
  .app-sidebar .app-nav > a,
  .app-sidebar .app-nav-dropdown-toggle,
  .app-sidebar .app-nav-dropdown-panel a,
  .app-sidebar-foot .app-nav-exit {
    min-height: 40px;
  }
  .app-nav-order-hint { display: none; }
}
@media (max-width: 640px) {
  .app-topstrip {
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
  }
  .pos-search {
    flex-direction: column;
  }
  .btn {
    min-height: 40px;
  }
}

.rank-row { margin: 0 0 0.75rem; }
.rank-row-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  margin-bottom: 0.28rem;
}
.rank-row-label span { color: var(--muted); }
.rank-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
.rank-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}

/* Layout */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.page-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-desc {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
body:not(.help-on) .page-desc,
body:not(.help-on) .section-desc-admin,
body:not(.help-on) .pos-hint,
body:not(.help-on) .help-tip,
body:not(.help-on) .admin-hub-lead,
body:not(.help-on) .admin-hub-card-desc {
  display: none;
}

/* Cards & grid */
.grid-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 17.5rem));
  justify-content: start;
  gap: 0.75rem;
}
.dash-charts {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  margin-bottom: 1.5rem;
}
.dash-links { margin-bottom: 1.5rem; }
.dash-head { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.dash-editor { margin: 0 0 1.25rem; padding: 0.9rem 1rem; }
.dash-order-list { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.7rem 0; min-width: 0; max-width: 100%; }
.dash-order-row {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  cursor: grab;
}
.dash-order-row.is-dragging { opacity: 0.55; }
.dash-drag { color: var(--muted); cursor: grab; user-select: none; letter-spacing: -0.12em; padding: 0 0.15rem; font-weight: 700; }
.dash-order-row label {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  font-size: 0.9rem;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}
.dash-order-row label span { min-width: 0; overflow-wrap: anywhere; }
.dash-theme-colors { display: flex; flex-direction: column; gap: 0.35rem; margin: 0 0 0.85rem; max-width: 36rem; }
.dash-chart-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); gap: 0.65rem 0.85rem; margin: 0 0 0.75rem; max-width: 100%; }
.dash-theme-color-row { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.dash-theme-color-row > span { width: 5.5rem; font-size: 0.78rem; font-weight: 650; }
.dash-theme-color-row input[type="color"] { width: 2rem; height: 1.7rem; padding: 0; border: 1px solid var(--border); border-radius: 0.35rem; background: transparent; cursor: pointer; }
.dash-goal-row { display: grid; grid-template-columns: repeat(var(--dash-cols, 4), minmax(0, 1fr)); justify-content: stretch; gap: 0.65rem; width: 100%; }
.dash-goal-row .goal-card .dash-donut { width: 64px; height: 64px; }
.dash-board {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  background:
    radial-gradient(1100px 380px at -8% -30%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 58%),
    radial-gradient(820px 340px at 108% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 52%),
    radial-gradient(640px 280px at 50% 120%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 88%, var(--bg));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
  --dash-c1: var(--accent);
  --dash-c2: color-mix(in srgb, var(--accent) 68%, #ffffff);
  --dash-c3: var(--accent-hover);
  --dash-c4: var(--accent-deep);
  --dash-c5: color-mix(in srgb, var(--accent) 42%, var(--text));
  --dash-c6: color-mix(in srgb, var(--accent-deep) 55%, var(--muted));
}
.dash-board.is-bg-cor { background: var(--dash-bg, var(--surface)); }
html.theme-light .dash-board.is-bg-cor { background: var(--dash-bg-light, var(--dash-bg, var(--surface))); }
.dash-bg-cores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; min-width: 0; max-width: 100%; }
.dash-board.is-bg-imagem {
  background-color: var(--bg);
  background-image: var(--dash-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.dash-bg-pick { display: grid; gap: 0.55rem; margin: 0.35rem 0 0.85rem; min-width: 0; max-width: 100%; }
.dash-bg-pick > label { display: flex; align-items: center; gap: 0.45rem; min-height: 40px; min-width: 0; margin: 0; }
.dash-bg-pick input[type="radio"] { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.dash-bg-pick input[type="color"] {
  width: 5.5rem;
  height: 40px;
  min-height: 40px;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.dash-bg-pick .form-group { min-width: 0; max-width: 100%; }
@media (max-width: 720px) {
  .dash-bg-cores { grid-template-columns: minmax(0, 1fr); }
  .dash-bg-pick input[type="color"],
  .dash-bg-pick input[type="file"],
  .dash-bg-pick .btn { width: 100%; min-height: 40px; font-size: 16px; }
}
html.theme-light .dash-board {
  --dash-c1: var(--accent-deep);
  --dash-c2: var(--accent);
  --dash-c3: var(--accent-hover);
  --dash-c4: color-mix(in srgb, var(--accent) 72%, #ffffff);
  --dash-c5: color-mix(in srgb, var(--accent-deep) 70%, #0f172a);
  --dash-c6: color-mix(in srgb, var(--accent) 38%, #334155);
}
.dash-history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; margin-bottom: 0.35rem; }
.dash-history-head strong { color: var(--dash-c1, var(--text)); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.dash-area { width: 100%; height: auto; display: block; color: var(--muted); }
.dash-area text { font-size: 11px; fill: currentColor; }
.dash-history-cols { height: 160px; }
.dash-lines { list-style: none; margin: 0; padding: 0; }
.dash-lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; padding: 0.32rem 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.dash-lines li:last-child { border-bottom: 0; }
.dash-lines span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-lines b { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.dash-board > .dash-block { order: 0; min-width: 0; width: 100%; max-width: 100%; }
.dash-board > .dash-block:not(.card) {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.75rem;
}
.dash-goal-row > .dash-grip,
.dash-kpis > .dash-grip { grid-column: 1 / -1; justify-self: start; }
.dash-grip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 0.5rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: grab;
}
.dash-board.is-sorting > [data-dash-key] {
  outline: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--border));
  outline-offset: 4px;
}
.dash-board > [data-dash-key].is-dragging { opacity: 0.55; }
.dash-board > .dash-wide,
.dash-board > .dash-goal-row {
  grid-column: 1 / -1;
  max-width: 100%;
  min-width: 0;
}
.dash-board > .card,
.dash-board .goal-card { overflow: hidden; padding: 0.75rem 0.8rem; }
.dash-board .dash-kpi strong,
.dash-board .card .big { overflow-wrap: anywhere; }
.dash-board > .card .dash-donut,
.dash-board .goal-card .dash-donut { width: 64px; height: 64px; }
.dash-board > .card .dash-chart { gap: 0.55rem; min-width: 0; }
.dash-board > .card .dash-legend { min-width: 0; }
.dash-board > .card .dash-legend li { min-width: 0; gap: 0.35rem; }
.dash-board > .card .dash-legend li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-board .goal-card-head { align-items: flex-start; min-width: 0; }
.dash-board .goal-card-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-board .goal-card-head span { flex: 0 1 46%; max-width: 46%; font-size: 0.72rem; line-height: 1.25; }
.dash-board .goal-card-sub,
.dash-board .section-title-admin { overflow-wrap: anywhere; }
.dash-board .goal-card-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dash-board .grid-dashboard,
.dash-board .admin-hub-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 17.5rem));
  justify-content: start;
}
.dash-board #dash-seller-boards.goal-grid,
.goal-grid.goal-seller-boards {
  grid-template-columns: repeat(var(--dash-cols, 4), minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}
#dash-seller-boards .goal-card,
.goal-seller-boards .goal-card { padding: 0.45rem 0.5rem; }
#dash-seller-boards .goal-card-head strong,
.goal-seller-boards .goal-card-head strong { font-size: 0.84rem; }
#dash-seller-boards .goal-card-head span,
.goal-seller-boards .goal-card-head span { font-size: 0.65rem; }
.dash-board #dash-seller-boards > * { min-width: 0; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 14rem)); justify-content: start; gap: 0.55rem; margin-bottom: 0; }
.dash-board .card .big { font-size: 1.28rem; margin: 0.2rem 0 0; }
.dash-kpi { border-radius: 14px; padding: 0.7rem 0.8rem 0.65rem; color: #fff; min-height: 72px; display: flex; flex-direction: column; justify-content: flex-end; }
.dash-kpi span { font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.dash-kpi strong { font-size: 1.12rem; line-height: 1.15; margin-top: 0.2rem; }
.dash-kpi-a { background: linear-gradient(145deg, #2563eb, #1d4ed8); }
.dash-kpi-b { background: linear-gradient(145deg, #0f766e, #14b8a6); }
.dash-kpi-c { background: linear-gradient(145deg, #c2410c, #f59e0b); }
.dash-chart { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.dash-donut { width: 148px; height: 148px; flex: 0 0 auto; }
.dash-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 160px; }
.dash-legend li { display: flex; gap: 0.45rem; align-items: baseline; justify-content: space-between; font-size: 0.84rem; margin: 0 0 0.35rem; }
.dash-legend i { width: 0.7rem; height: 0.7rem; border-radius: 99px; display: inline-block; flex: 0 0 auto; margin-top: 0.28rem; }
.dash-cols { display: flex; align-items: flex-end; gap: 0.28rem; height: 108px; overflow-x: auto; padding-top: 0.25rem; }
.dash-col { flex: 1 0 18px; min-width: 18px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.25rem; }
.dash-col-bar { display: block; width: 100%; max-width: 22px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #38bdf8, #2563eb); min-height: 4px; }
.dash-col-lab { font-size: 0.65rem; color: var(--muted); }
.dash-rank { display: flex; gap: 0.55rem; align-items: center; margin: 0 0 0.55rem; }
.dash-rank b { width: 1.6rem; height: 1.6rem; border-radius: 99px; display: grid; place-items: center; background: #dbeafe; color: #1d4ed8; font-size: 0.78rem; flex: 0 0 auto; }
html:not(.theme-light) .dash-rank b { background: rgba(37, 99, 235, 0.25); color: #bfdbfe; }
.goal-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 0.55rem; margin: 0.75rem 0; }
.goal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0 0 0.75rem; }
.goal-toolbar label { font-size: 0.85rem; color: var(--muted); }
.goal-toolbar .input { width: auto; min-width: 11rem; }
.goal-grid.goal-admin-list { grid-template-columns: 1fr; gap: 0.4rem; }
.goal-admin-list .goal-card { padding: 0.45rem 0.6rem; }
.goal-admin-list .goal-card-sub { margin: 0.05rem 0 0.25rem; }
.goal-create { padding: 0.35rem 0.7rem 0.55rem; }
.goal-create > summary,
.goal-fold > summary {
  cursor: pointer;
  min-height: 40px;
  display: flex;
  align-items: center;
  font-weight: 700;
  list-style: none;
}
.goal-create > summary::-webkit-details-marker,
.goal-fold > summary::-webkit-details-marker { display: none; }
.goal-create > summary::before,
.goal-fold > summary::before { content: "▸"; margin-right: 0.4rem; color: var(--muted); }
.goal-create[open] > summary::before,
.goal-fold[open] > summary::before { content: "▾"; }
.goal-fold { margin-top: 0.15rem; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 17.5rem)); justify-content: start; gap: 0.65rem; }
.goal-card { border: 1px solid var(--border); border-radius: 14px; padding: 0.75rem 0.8rem 0.7rem; background: var(--surface); min-width: 0; }
.goal-card.is-hit { border-color: #22c55e; }
.goal-card.is-off { opacity: 0.62; }
.goal-card-head { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.goal-card-head span, .goal-card-sub, .goal-card-foot { color: var(--muted); font-size: 0.82rem; }
.goal-card-sub { margin: 0.15rem 0 0.55rem; }
.goal-card .dash-donut { width: 72px; height: 72px; }
.goal-meter-top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; margin-bottom: 0.35rem; }
.goal-meter-track { height: 10px; border-radius: 99px; background: var(--border); overflow: hidden; }
.goal-meter-track > span { display: block; height: 100%; border-radius: 99px; background: #dc2626; }
.goal-card.is-hit .goal-meter-track > span { background: #16a34a; }
.goal-card-foot { margin: 0.4rem 0 0; }
.goal-card .dash-chart { min-width: 0; }
.goal-meter-top span { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.goal-tier-list { list-style: none; margin: 0.65rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.goal-tier-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.55rem; align-items: baseline; padding: 0.4rem 0.55rem; border-radius: 8px; background: rgba(148, 163, 184, 0.12); }
.goal-tier-line.is-hit { background: rgba(22, 163, 74, 0.12); }
.goal-tier-line b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-tier-line > span, .goal-tier-line small { white-space: nowrap; }
.goal-tier-line small { color: var(--muted); font-size: 0.75rem; }
.goal-tier-row { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.45rem; min-width: 0; flex: 1 1 100%; }
.goal-tier-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.35rem; align-items: center; }
.goal-tier-fields.is-percent { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(4.2rem, 0.55fr) auto; }
.goal-tier-rows { flex: 1 1 100%; min-width: 0; }
.goal-people-wrap { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; margin: 0.35rem 0 0.75rem; }
.goal-people-wrap > span { font-size: 0.78rem; color: var(--muted); }
.goal-people { display: flex; flex-direction: column; gap: 0.1rem; max-height: 16rem; overflow: auto; padding: 0.2rem 0; }
.goal-people-store { margin: 0.45rem 0 0; font-size: 0.78rem; color: var(--muted); }
.goal-people label { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; min-height: 40px; min-width: 0; font-size: 0.92rem; color: var(--text); }
.goal-people input { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.goal-people span { min-width: 0; }
.goal-edit { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: flex-end; margin-top: 0.75rem; }
.goal-edit label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; color: var(--muted); min-width: 7rem; flex: 1; }
.goal-edit .goal-people label { flex-direction: row; align-items: center; gap: 0.5rem; min-width: 0; min-height: 40px; font-size: 0.92rem; color: var(--text); flex: 0 0 auto; }
.goal-hit-mode { flex: 1 1 100%; display: flex; flex-direction: column; gap: 0.25rem; margin: 0.15rem 0 0.35rem; }
.goal-hit-mode[hidden] { display: none !important; }
.goal-hit-mode > span { font-size: 0.85rem; }
.goal-hit-mode label { display: flex; flex-direction: row; align-items: flex-start; gap: 0.55rem; min-height: 40px; min-width: 0; font-size: 0.92rem; color: var(--text); }
.goal-hit-mode label input { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin-top: 0.15rem; }
.goal-hit-mode label span { min-width: 0; }
.goal-edit .goal-hit-mode label { flex-direction: row; align-items: flex-start; gap: 0.55rem; min-height: 40px; min-width: 0; font-size: 0.92rem; color: var(--text); flex: 1 1 100%; }
@media (max-width: 720px) {
  .goal-hit-mode label,
  .goal-people label { font-size: 16px; min-height: 40px; }
  .goal-toolbar .input,
  .goal-edit .input,
  .goal-create .input { font-size: 16px; }
  .goal-create > summary,
  .goal-fold > summary,
  .goal-actions .btn,
  .goal-edit .btn { min-height: 40px; }
  .goal-actions { flex-wrap: wrap; }
  .goal-actions .btn { flex: 1 1 auto; }
}
.goal-actions { display: flex; gap: 0.4rem; margin-top: 0.45rem; }
.goal-people { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.45rem; }
.goal-person-top { display: flex; justify-content: space-between; gap: 0.45rem; font-size: 0.8rem; margin-bottom: 0.2rem; }
.goal-person.is-hit .goal-meter-track > span { background: #16a34a; }
.goal-search { position: relative; }
.goal-search-list { position: absolute; z-index: 8; left: 0; right: 0; top: calc(100% - 0.2rem); max-height: 220px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.goal-search-list button { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); padding: 0.45rem 0.7rem; cursor: pointer; color: inherit; font: inherit; }
.goal-search-list button:hover { background: rgba(37, 99, 235, 0.08); }
.goal-pick { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--muted); }
.goal-seller-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 12rem)); justify-content: start; gap: 0.55rem; }
[data-seller-store][hidden] { display: none !important; }
.goal-seller { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 0.7rem 0.65rem; text-align: center; }
.goal-seller.is-hit { border-color: #22c55e; }
.goal-seller .dash-donut { width: 78px; height: 78px; margin: 0 auto; }
.goal-seller strong { display: block; margin-top: 0.35rem; font-size: 0.9rem; }
.goal-seller-store, .goal-seller p { margin: 0.15rem 0 0; font-size: 0.78rem; color: var(--muted); }
.goal-seller .goal-meter-track { margin-top: 0.4rem; }
.goal-parts { margin-top: 0.45rem; text-align: left; font-size: 0.75rem; }
.goal-parts div { display: flex; justify-content: space-between; gap: 0.4rem; margin-top: 0.15rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.card-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--danger-soft);
  color: #fca5a5;
  margin-bottom: 0.75rem;
}
.card-badge.ok {
  background: rgba(35, 134, 54, 0.25);
  color: #56d364;
}
.card-badge.warn {
  background: rgba(234, 179, 8, 0.2);
  color: #fbbf24;
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}
.card .big {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.5rem 0 0;
}
.card .sub {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Forms */
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
}
.form-group[hidden] {
  display: none !important;
}
.form-group label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}
.input,
select.input,
textarea.input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th,
table.data td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data th a.sort-col {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
table.data th a.sort-col:hover,
table.data th a.sort-col.is-on {
  color: var(--text);
}
table.data tr:last-child td {
  border-bottom: none;
}
table.data tr:hover td {
  background: var(--surface-hover);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}
.badge-warn {
  background: var(--danger-soft);
  color: #fca5a5;
}
.badge-ok {
  background: rgba(var(--accent-rgb), 0.22);
  color: color-mix(in srgb, var(--accent) 82%, #ffffff);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.flash-ok {
  background: rgba(35, 134, 54, 0.2);
  color: #56d364;
  border: 1px solid rgba(35, 134, 54, 0.35);
}
.flash-err {
  background: var(--danger-soft);
  color: #fecaca;
  border: 1px solid rgba(153, 27, 27, 0.5);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
  color: var(--text);
}
.login-deco {
  display: none;
}
.login-center {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.login-card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}
.login-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}
.login-card .lead {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}
.login-card .login-credits {
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  justify-content: stretch;
  width: 100%;
  font-family: inherit;
}
.login-card .login-credits-inner {
  width: 100%;
  padding: 1rem 1.1rem 1.05rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-card .login-credits-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent);
  line-height: 1.35;
}
.login-card .login-credits-accent {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    var(--accent-hover),
    transparent
  );
  opacity: 0.85;
}

/* Login — modelos 2 a 5 (1 = padrão :root) */
body.login-page.login-tpl-2 {
  --bg: #e4eaf4;
  --surface: #ffffff;
  --surface-hover: #f3f6fb;
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-deep: #1e40af;
  --accent-rgb: 37, 99, 235;
}
body.login-page.login-tpl-2 .login-card {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}
body.login-page.login-tpl-2 .login-card .login-credits-inner {
  background: #f1f5f9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.login-page.login-tpl-3 {
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  gap: 0;
  --bg: #0b1220;
}
body.login-page.login-tpl-3 .login-deco {
  display: block;
  flex: 1 1 44%;
  min-height: 100vh;
  min-width: 0;
  background: linear-gradient(155deg, #1e3a5f 0%, #0d9488 52%, #0b1220 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}
body.login-page.login-tpl-3 .login-center {
  flex: 1 1 56%;
  max-width: none;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(
      ellipse 85% 55% at 50% 0%,
      rgba(59, 130, 246, 0.14),
      transparent 58%
    ),
    var(--bg);
}
body.login-page.login-tpl-3 .login-card {
  margin: 0;
}

body.login-page.login-tpl-4 {
  --bg: #0a0f0c;
  --surface: #101916;
  --border: rgba(34, 197, 94, 0.12);
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --accent-deep: #15803d;
  --accent-rgb: 34, 197, 94;
  background: radial-gradient(
      ellipse 120% 85% at 15% -5%,
      rgba(34, 197, 94, 0.2),
      transparent 52%
    ),
    var(--bg);
}
body.login-page.login-tpl-4 .login-card {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(34, 197, 94, 0.08);
}

body.login-page.login-tpl-5 {
  --bg: #0c0a12;
  --surface: #161222;
  --border: rgba(167, 139, 250, 0.14);
  --accent: #a78bfa;
  --accent-hover: #8b5cf6;
  --accent-deep: #7c3aed;
  --accent-rgb: 167, 139, 250;
  background: radial-gradient(
      ellipse 100% 75% at 82% 8%,
      rgba(124, 58, 237, 0.28),
      transparent 48%
    ),
    var(--bg);
}
body.login-page.login-tpl-5 .login-card {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(167, 139, 250, 0.1);
}

@media (max-width: 720px) {
  body.login-page.login-tpl-3 {
    flex-direction: column;
  }
  body.login-page.login-tpl-3 .login-deco {
    flex: 0 0 auto;
    width: 100%;
    min-height: 120px;
    max-height: 160px;
  }
  body.login-page.login-tpl-3 .login-center {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem 2rem;
  }
}

/* POS */
.pos-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.pos-main-column {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pos-panel-cart {
  flex: 0 0 380px;
  width: 380px;
  max-width: 100%;
  box-sizing: border-box;
}
.pos-recent-below-products {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pos-recent-below-products .pos-sales-details,
.pos-recent-below-products .pos-expenses-details,
.pos-recent-below-products .pos-sangria-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-sizing: border-box;
  margin: 0;
}
@media (max-width: 960px) {
  .pos-layout {
    flex-direction: column;
  }
  .pos-panel-cart {
    flex: 1 1 auto;
    width: 100%;
  }
}
.pos-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.pos-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.pos-search .input {
  flex: 1;
}
.pos-stock-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.pos-stock-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.pos-hint {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}
.pos-recent-below-products details > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  list-style: none;
}
.pos-recent-below-products details > summary::-webkit-details-marker { display: none; }
.pos-day-summary-body {
  margin-top: 0.65rem;
}
.product-tile { position: relative; }
.tile-flag {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #f85149;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding-right: 0.25rem;
}
.product-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s;
}
.product-tile:hover {
  border-color: var(--accent);
}
.product-tile .name {
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  line-height: 1.3;
}
.product-tile .tile-sku {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.product-tile .price {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.product-tile .stock {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.variant-color-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.color-picked {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.color-swatch-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  width: min(24rem, 86vw);
  max-height: 22rem;
  overflow: auto;
  padding: 0.55rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.55rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.color-swatch-pop[hidden] {
  display: none !important;
}
.color-swatch.is-used {
  display: none;
}
.color-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 38rem;
}
.color-swatch {
  width: 4.55rem;
  min-height: 2.9rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  padding: 0.28rem 0.12rem 0.2rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  background: #e5e7eb;
  color: inherit;
}
.color-swatch span {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  border-radius: 999px;
  padding: 0.04rem 0.28rem;
  max-width: 100%;
}
.color-swatch.is-on {
  outline: 2px solid var(--accent, #2563eb);
  outline-offset: 2px;
}
.color-swatch.is-clear,
.pos-color-chip.is-clear {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d4d4d8 25%, transparent 25%),
    linear-gradient(-45deg, #d4d4d8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d4d4d8 75%),
    linear-gradient(-45deg, transparent 75%, #d4d4d8 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}
.color-swatch--other {
  background: repeating-linear-gradient(135deg, #e5e7eb, #e5e7eb 6px, #f8fafc 6px, #f8fafc 12px);
}
.variant-color-select--uihide {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.pos-color-chip {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.28rem;
  border: 1px solid rgba(0, 0, 0, 0.28);
  vertical-align: -0.12rem;
  margin-right: 0.32rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  flex: 0 0 auto;
}
.pos-color-name {
  font-weight: 800;
}
.pos-color-name.is-clear-name {
  color: #64748b;
}
.stock-color-line {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0.12rem 0.55rem 0.12rem 0;
  white-space: nowrap;
}
.stock-color-line .pos-color-chip {
  margin-right: 0.15rem;
}
.product-tile:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.product-tile--in-stock {
  border-color: var(--border);
}
.product-tile--zero {
  opacity: 0.55;
  background: rgba(128, 128, 128, 0.12);
  border-color: rgba(128, 128, 128, 0.35);
  color: var(--muted);
}
.product-tile--zero .price {
  color: var(--muted);
}
.product-tile--zero:not(:disabled):hover {
  border-color: var(--muted);
}
.product-tile--negative {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.55);
}
.product-tile--negative .name,
.product-tile--negative .stock {
  color: #f85149;
}
.product-tile--negative .price {
  color: #f85149;
}
.product-tile--negative .badge-warn {
  background: rgba(248, 81, 73, 0.25);
  color: #ffb4b0;
}
.cart-list li.cart-line--negative span:first-child {
  color: #f85149;
  font-weight: 600;
}
.cart-list li.cart-line--negative .cart-line-warn {
  display: block;
  font-size: 0.72rem;
  color: #f85149;
  margin-top: 0.15rem;
}
.pos-stock-legend {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin: 0 0.2rem 0 0.5rem;
  vertical-align: middle;
}
.pos-stock-legend--ok {
  background: var(--accent);
}
.pos-stock-legend--zero {
  background: #888;
}
.pos-stock-legend--neg {
  background: #f85149;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}
.cart-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.cart-list .qty-btns {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0;
  color: var(--accent);
}
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
  margin-right: 6px;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.pos-pay-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pos-pay-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.pos-pay-row .pos-pay-method {
  flex: 1;
  min-width: 130px;
}
.pos-pay-row .pos-pay-amt {
  width: 110px;
}
.pos-pay-row .pos-pay-install-wrap {
  flex: 0 0 auto;
}
.pos-pay-row .pos-pay-installments {
  width: 76px;
  min-width: 76px;
}
#pos-pay-status.ok {
  color: #56d364;
}
#pos-pay-status.warn,
#pos-msg.warn {
  color: #e3b341;
  font-weight: 600;
}
#pos-pay-status.bad {
  color: #fca5a5;
}

.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 2rem 1rem;
  text-align: center;
}

code.key {
  font-size: 0.75rem;
  background: var(--bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
}

.vendas-board {
  width: max-content;
  min-width: 100%;
}
.vendas-board th,
.vendas-board td {
  white-space: nowrap;
  vertical-align: middle;
  padding: 0.42rem 0.6rem;
}
.vendas-board .c-note { min-width: 11rem; }
.vendas-money,
.vendas-adj { display: block; line-height: 1.25; }
.vendas-adj { color: var(--muted); font-size: 0.75rem; }
.vendas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.vendas-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.vendas-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.vendas-note-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.vendas-note-text strong {
  font-size: 0.8rem;
  font-weight: 650;
}
.vendas-chave {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.68rem;
  color: var(--muted);
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vendas-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.vendas-pill--ok { color: #1a7f37; }
.vendas-pill--off { color: #b42318; }
.pos-stage { display: block; flex: 0 0 auto; }

.training-content {
  line-height: 1.65;
}
.training-content p {
  margin: 0 0 0.75rem;
}

.training-challenge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 360px;
  width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  padding: 0;
}
.training-challenge-inner {
  padding: 1.1rem;
}

/* Admin — painel e dicas de gestão */
.app-topstrip-hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 36rem;
}
.app-topstrip-hint strong {
  color: var(--text);
  font-weight: 600;
}

.admin-hub {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-hub-title {
  font-size: 1.08rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.admin-hub-lead {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 1.1rem;
  max-width: 48rem;
}
.admin-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 15rem));
  justify-content: start;
  gap: 0.65rem;
}
a.admin-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 1.6rem 0.7rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  border-left: 3px solid var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
a.admin-hub-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: var(--surface-hover);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
a.admin-hub-card .admin-hub-n {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.9;
}
a.admin-hub-card strong {
  font-size: 0.94rem;
  font-weight: 600;
}
a.admin-hub-card .admin-hub-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.section-title-admin {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.section-desc-admin {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.sys-notify-stack {
  position: fixed;
  z-index: 1800;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.sys-notify-pos-top-right { top: 0.75rem; right: 0.75rem; }
.sys-notify-pos-top-left { top: 0.75rem; left: 0.75rem; }
.sys-notify-pos-bottom-right { bottom: 0.75rem; right: 0.75rem; flex-direction: column-reverse; }
.sys-notify-pos-bottom-left { bottom: 0.75rem; left: 0.75rem; flex-direction: column-reverse; }
.sys-notify-pos-top-center { top: 0.75rem; left: 50%; transform: translateX(-50%); }
.sys-notify-pos-bottom-center { bottom: 0.75rem; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; }
.sys-notify {
  position: relative;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  background: var(--sn-bg, #132033);
  color: var(--sn-text, #eef6f8);
  border: 1px solid var(--sn-accent, #00c4b4);
  border-radius: 12px;
  padding: 0.8rem 2.1rem 0.9rem 0.9rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.sys-notify.is-dragging { cursor: grabbing; user-select: none; }
.sys-notify[hidden] { display: none; }
.sys-notify-go,
.sys-notify-x,
.sys-notify a { cursor: pointer; touch-action: auto; }
.sys-notify-x {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sn-text, #eef6f8);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.sys-notify-x:hover { background: rgba(255, 255, 255, 0.08); }
.sys-notify-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sn-accent, #00c4b4);
}
.sys-notify-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.25;
}
.sys-notify-body {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}
.sys-notify-list {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  font-size: 0.8rem;
}
.sys-notify-go {
  margin-top: 0.7rem;
  background: var(--sn-accent, #00c4b4);
  color: #081018;
  border: 0;
  border-radius: 8px;
  padding: 0.42rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.app-main,
.app-shell,
.pos-layout,
.pos-main-column,
.card,
.form-group,
.table-wrap {
  min-width: 0;
}
img,
video {
  max-width: 100%;
  height: auto;
}
.table-wrap {
  -webkit-overflow-scrolling: touch;
}
.dash-board .card {
  padding: 0.75rem 0.8rem;
}

@media (max-width: 720px) {
  .dash-board {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .dash-goal-row,
  .goal-grid,
  .goal-forms,
  .dash-kpis,
  .grid-dashboard,
  .admin-hub-grid,
  .goal-seller-grid,
  .dash-board #dash-seller-boards.goal-grid,
  .dash-board .grid-dashboard,
  .dash-board .admin-hub-grid {
    grid-template-columns: 1fr;
  }
  .goal-tier-fields,
  .goal-tier-fields.is-percent {
    grid-template-columns: 1fr;
  }
  .card .big,
  .dash-board .card .big {
    font-size: 1.35rem;
  }
  .app-main {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .dash-head,
  .goal-actions,
  .goal-edit {
    align-items: stretch;
  }
  .app-main form.card {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .app-main form.card .btn,
  .goal-actions .btn {
    width: 100%;
  }
  .dash-editor,
  .dash-head,
  .dash-chart-picks,
  .dash-order-list {
    min-width: 0;
    max-width: 100%;
  }
  .dash-chart-picks { grid-template-columns: minmax(0, 1fr); }
  .dash-order-row .btn,
  .dash-head .btn,
  .dash-editor > .btn {
    min-height: 40px;
  }
  .dash-editor .input,
  .dash-editor select.input,
  .dash-head .input {
    width: 100%;
    max-width: 100% !important;
    font-size: 16px;
    min-height: 40px;
  }
  .app-main .form-group,
  .app-main .form-row,
  .app-main fieldset,
  .app-main .input,
  .app-main select.input,
  .app-main textarea.input {
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .app-main .form-group,
  .app-main input.input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .app-main select.input,
  .app-main textarea.input {
    width: 100%;
  }
  .app-main fieldset {
    min-inline-size: 0;
    width: 100%;
  }
  .app-main h1,
  .app-main h2,
  .app-main h3,
  .app-main p,
  .app-main label,
  .app-main li,
  .app-main td,
  .app-main th {
    overflow-wrap: anywhere;
  }
  .app-main .card:has(table),
  .app-main .table-wrap {
    overflow-x: auto;
    max-width: 100%;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .form-row,
  .dash-chart-picks,
  .apv-filters,
  .hist-filters,
  .fin-cash-filters,
  .bonus-filters,
  .usr-find {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .form-group,
  .apv-filters .form-group,
  .hist-filters .form-group,
  .fin-cash-filters > label,
  .bonus-filters .form-group,
  .usr-find .form-group {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
}

.gbar-list { display: flex; flex-direction: column; gap: 0.08rem; margin-top: 0.28rem; }
.gbar-list > .gbar-name { margin: 0; line-height: 1.15; }
.gbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name prize" "bar prize";
  gap: 0.2rem 0.7rem;
  align-items: center;
  padding: 0.28rem 0;
}
.gbar-name { grid-area: name; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; font-weight: 650; }
.gbar-name small { font-weight: 600; color: var(--muted); margin-left: 0.25rem; }
.gbar-track { grid-area: bar; min-width: 0; }
.gbar-prize { grid-area: prize; align-self: center; font-size: 0.78rem; font-weight: 700; white-space: nowrap; color: var(--accent); }
.gbar.is-hit .gbar-prize { color: #16a34a; }
.gbar-track { display: block; }
.gbar-setas, .gbar-blocos { display: flex; align-items: center; gap: 3px; height: 14px; }
.gbar-setas i, .gbar-blocos i { flex: 1 1 0; height: 12px; background: var(--border); }
.gbar-setas i {
  clip-path: polygon(0 0, 72% 0, 100% 50%, 72% 100%, 0 100%, 28% 50%);
}
.gbar-blocos i { border-radius: 2px; height: 10px; }
.gbar-setas i.is-on, .gbar-blocos i.is-on { background: var(--gbar-color, var(--accent)); }
.gbar-pilula, .gbar-divisor, .gbar-fino, .gbar-marcador { position: relative; height: 14px; }
.gbar-pilula { border-radius: 999px; background: var(--border); overflow: hidden; }
.gbar-pilula .gbar-fill {
  display: block;
  height: 100%;
  width: calc(var(--gbar-pct, 0) * 1%);
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, var(--gbar-color, #2563eb));
}
.gbar-divisor {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gbar-color, #ec4899) calc(var(--gbar-pct, 0) * 1%), transparent calc(var(--gbar-pct, 0) * 1%));
}
.gbar-divisor::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: calc(100% - var(--gbar-pct, 0) * 1% - 6px);
  border-radius: 999px;
  background: #5eead4;
}
.gbar-fino { height: 10px; }
.gbar-fino .gbar-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 2px;
  background: var(--border);
}
.gbar-fino .gbar-fill::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  height: 8px;
  width: calc(var(--gbar-pct, 0) * 1%);
  background: var(--gbar-color, #ef4444);
}
.gbar-marcador .gbar-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--gbar-color, #64748b) calc(var(--gbar-pct, 0) * 1%), var(--border) calc(var(--gbar-pct, 0) * 1%));
}
.dash-board #rev-cards.grid-dashboard {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.dash-board #rev-cards .card {
  padding: 0.4rem 0.45rem;
}
.dash-board #rev-cards .card-badge {
  margin-bottom: 0.2rem;
  padding: 0.1rem 0.32rem;
  font-size: 0.55rem;
}
.dash-board #rev-cards .card h3 {
  font-size: 0.78rem;
  margin: 0;
}
.dash-board #rev-cards .card .big {
  font-size: 0.95rem;
  margin: 0.05rem 0 0;
}
.dash-board #rev-cards .card .sub {
  font-size: 0.62rem;
  margin-top: 0.08rem;
}
.dash-board #rev-cards .dash-loja-caixa {
  margin-top: 0.28rem !important;
  padding-top: 0.22rem !important;
  font-size: 0.62rem !important;
  line-height: 1.25 !important;
}
.dash-board #rev-cards .dash-loja-caixa-dl {
  row-gap: 0.08rem !important;
  column-gap: 0.28rem !important;
}
.dash-board #rev-cards .dash-loja-caixa-dl + .dash-loja-caixa-dl {
  margin-top: 0.22rem !important;
  padding-top: 0.18rem !important;
}
@media (max-width: 1100px) and (min-width: 721px) {
  .dash-board #rev-cards.grid-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dash-board #rev-cards.grid-dashboard { grid-template-columns: 1fr; }
}
.goal-card-head.seller-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}
.seller-id { min-width: 0; display: flex; flex-direction: column; gap: 0.08rem; }
.seller-id strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seller-stores { display: block; max-width: 100%; color: var(--muted); }
.seller-face { display: flex; flex-direction: column; align-items: center; gap: 0.08rem; flex: 0 0 auto; }
.seller-face > span { font-size: 0.6rem; font-weight: 700; color: var(--dash-c1, #14b8a6); line-height: 1; white-space: nowrap; }
.gbar > .gbar-name { display: flex; align-items: baseline; gap: 0.35rem; }
.gbar > .gbar-name b { min-width: 0; flex: 1 1 auto; font-weight: inherit; }
.gbar > .gbar-name small { flex: 0 0 auto; }
.gsteps li { overflow: visible; padding: 0 0.12rem; }
.gsteps-awards { display: none; }
.gsteps-awards p { display: flex; justify-content: space-between; align-items: baseline; gap: 0.45rem; margin: 0; min-width: 0; }
.gsteps-awards span { min-width: 0; line-height: 1.25; }
.gsteps-awards b { flex: 0 0 auto; white-space: nowrap; font-weight: 650; color: var(--dash-c1, var(--accent)); }
.seller-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--dash-c1, #14b8a6) calc(var(--orb, 0) * 1%), var(--border) 0);
  position: relative;
}
.seller-orb::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
}
.seller-orb svg { position: relative; z-index: 1; width: 26px; height: 26px; fill: var(--dash-c2, #22d3ee); }
.dash-board[data-theme] .dash-kpi-a { background: linear-gradient(145deg, var(--dash-c1), var(--dash-c2)); }
.dash-board[data-theme] .dash-kpi-b { background: linear-gradient(145deg, var(--dash-c2), var(--dash-c3)); }
.dash-board[data-theme] .dash-kpi-c { background: linear-gradient(145deg, var(--dash-c3), var(--dash-c1)); }
.dash-board[data-theme] .gbar-fill,
.dash-board[data-theme] .gbar-setas i.is-on,
.dash-board[data-theme] .gbar-blocos i.is-on,
.dash-board[data-theme] .gbar-colunas i.is-on,
.dash-board[data-theme] .gsteps-line i,
.dash-board[data-theme] .gsteps li.is-done b,
.dash-board[data-theme] .dash-col-bar {
  background: linear-gradient(90deg, var(--dash-c1), var(--dash-c2));
  border-color: var(--dash-c1);
}
.dash-board[data-theme] .gsteps li.is-now b { border-color: var(--gsteps-color, var(--dash-c1)); color: var(--gsteps-color, var(--dash-c1)); background: var(--surface); }
.dash-board[data-theme] .gsteps-line i,
.gsteps-line i {
  background: var(--gsteps-color, #dc2626);
}
.dash-board[data-theme] .gsteps li.is-done b,
.gsteps li.is-done b {
  background: var(--gsteps-color, #dc2626);
  border-color: var(--gsteps-color, #dc2626);
}
.dash-board[data-theme] .gbar-inside .gbar-fill,
.dash-board[data-theme] .gbar-inside .gbar-setas i.is-on,
.dash-board[data-theme] .gbar-inside .gbar-blocos i.is-on,
.dash-board[data-theme] .gbar-inside .gbar-colunas i.is-on,
.gbar-inside .gbar-fill,
.gbar-inside .gbar-setas i.is-on,
.gbar-inside .gbar-blocos i.is-on,
.gbar-inside .gbar-colunas i.is-on {
  background: var(--gbar-color, #dc2626);
  border-color: var(--gbar-color, #dc2626);
}
.dash-board[data-theme] .gbar-inside .gbar-marcador .gbar-fill,
.gbar-inside .gbar-marcador .gbar-fill {
  background: linear-gradient(90deg, var(--gbar-color, #dc2626) calc(var(--gbar-pct, 0) * 1%), var(--border) calc(var(--gbar-pct, 0) * 1%));
}
#dash-seller-boards .gbar-inside .gbar-marcador,
.goal-seller-boards .gbar-inside .gbar-marcador,
.gbar-inside .gbar-marcador {
  height: 14px;
  min-height: 14px;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}
.dash-board[data-theme] .card .big,
.dash-board[data-theme] .gbar-prize,
.dash-board[data-theme] .gsteps em,
.dash-board[data-theme] .gsteps-progress,
.dash-board[data-theme] .gsteps-awards b { color: var(--dash-c1); }
.gbar-marcador .gbar-knob {
  position: absolute;
  top: 1px;
  left: calc(var(--gbar-pct, 0) * 1%);
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gbar-color, #64748b);
  border: 2px solid var(--surface);
}
.gbar-barras, .gbar-indicador { display: block; border-radius: 99px; background: var(--border); overflow: hidden; }
.gbar-barras { height: 10px; }
.gbar-indicador { height: 4px; }
.gbar-barras .gbar-fill, .gbar-indicador .gbar-fill {
  display: block;
  height: 100%;
  width: calc(var(--gbar-pct, 0) * 1%);
  background: var(--gbar-color, #7c3aed);
  border-radius: 99px;
}
.gbar-colunas { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.gbar-colunas i { flex: 1 1 0; height: 30%; border-radius: 2px 2px 0 0; background: var(--border); }
.gbar-colunas i.is-on { height: 100%; background: var(--gbar-color, #7c3aed); }
.gsteps { position: relative; margin-top: 0.12rem; padding-top: 0.95rem; }
.gsteps-progress {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  color: var(--dash-c1, var(--accent));
}
.gsteps.is-full { padding-top: 0; }
.gsteps.is-full .gsteps-target {
  margin: 0 0 0.06rem;
  text-align: center;
  white-space: nowrap;
  line-height: 1.1;
}
.gsteps.is-full .gsteps-line { top: 1.32rem; }
.gsteps.is-full small,
.gsteps.is-full em {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}
.gsteps.is-full .gsteps-target {
  margin-top: 0;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}
.dash-board .goal-store {
  padding: 0.95rem 0.9rem 0.85rem;
}
.goal-store .goal-card-head {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.08rem;
}
.dash-board .goal-store .goal-card-head span,
.goal-store .goal-card-head span {
  max-width: none;
  flex: none;
  text-align: center;
}
.goal-store .goal-card-sub,
.goal-store .goal-card-foot {
  text-align: center;
}
.gsteps-line { position: absolute; left: 8%; right: 8%; top: calc(0.95rem + 0.58rem); height: 3px; background: var(--border); border-radius: 99px; }
.gsteps-line i { display: block; height: 100%; width: calc(var(--gsteps-pct, 0) * 1%); max-width: 100%; background: var(--gsteps-color, #dc2626); border-radius: 99px; }
.gsteps ol { list-style: none; display: flex; margin: 0; padding: 0; position: relative; }
.gsteps li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.12rem; text-align: center; }
.gsteps b { min-width: 2rem; height: 1.2rem; padding: 0 0.22rem; border-radius: 99px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border); font-size: 0.62rem; font-weight: 700; line-height: 1; z-index: 1; }
.gsteps li.is-done b { background: #2563eb; border-color: #2563eb; color: #fff; }
.gsteps li.is-now b { border-color: #2563eb; color: #2563eb; }
.gsteps small, .gsteps em { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.62rem; font-style: normal; color: var(--muted); }
.gsteps em { color: var(--accent); font-weight: 700; }
#dash-seller-boards .gsteps b, .goal-seller-boards .gsteps b { min-width: 1.75rem; height: 1.05rem; font-size: 0.6rem; }
#dash-seller-boards .gsteps-line, .goal-seller-boards .gsteps-line { top: calc(0.95rem + 0.52rem); }
#dash-seller-boards .gsteps.is-full .gsteps-line, .goal-seller-boards .gsteps.is-full .gsteps-line { top: 1.28rem; }
#dash-seller-boards .gbar, .goal-seller-boards .gbar { padding: 0.12rem 0; gap: 0.1rem 0.35rem; }
#dash-seller-boards .gbar-name, .goal-seller-boards .gbar-name { font-size: 0.72rem; }
#dash-seller-boards .gbar-prize, .goal-seller-boards .gbar-prize { font-size: 0.68rem; }
.dash-hbars { display: flex; flex-direction: column; gap: 0.4rem; }
.dash-hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.12rem 0.4rem; align-items: center; font-size: 0.78rem; }
.dash-hbar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-hbar b { font-size: 0.74rem; }
.dash-hbar i { grid-column: 1 / -1; display: block; height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.dash-hbar em { display: block; height: 100%; border-radius: 99px; }
.dash-cols-named { height: 132px; }
.dash-cols-named .dash-col { min-width: 34px; flex-basis: 34px; }
.dash-cols-named .dash-col-bar { max-width: 26px; }
.dash-cols-named .dash-col-lab { max-width: 46px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) and (min-width: 641px) {
  .dash-board > .dash-goal-row,
  .dash-board #dash-seller-boards.goal-grid,
  .goal-grid.goal-seller-boards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-board > .dash-goal-row,
  .dash-board #dash-seller-boards.goal-grid,
  .goal-grid.goal-seller-boards { grid-template-columns: 1fr; }
}
.dash-board,
.goal-seller-boards {
  font-variant-numeric: tabular-nums;
}
.dash-board .section-title-admin {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
}
.dash-board .card h3,
.dash-board .goal-card-head strong,
.dash-board #rev-cards .card h3,
#dash-seller-boards .goal-card-head strong,
.goal-seller-boards .goal-card-head strong {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.dash-board .card .big,
.dash-board #rev-cards .card .big,
.dash-board .dash-kpi strong {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0;
}
.dash-board .dash-kpi {
  min-height: 0;
  padding: 0.65rem 0.75rem;
  justify-content: flex-start;
}
.dash-board .card .sub,
.dash-board .goal-card-sub,
.dash-board .goal-card-foot,
.dash-board .goal-card-head span,
.dash-board .dash-kpi span,
.dash-board .gbar-name,
.dash-board .gbar-name small,
.dash-board .dash-legend li,
.dash-board .dash-hbar,
.dash-board .dash-col-lab,
.dash-board .gsteps small,
.dash-board .gbar-caption b,
.dash-board .gsteps-awards span,
.dash-board .seller-face > span,
.goal-seller-boards .goal-card-head span,
.goal-seller-boards .gbar-name,
.goal-seller-boards .gbar-caption b,
.goal-seller-boards .gsteps-awards span,
.goal-seller-boards .seller-face > span {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}
.dash-board .gbar-prize,
.dash-board .dash-legend b,
.dash-board .dash-hbar b,
.dash-board .gsteps em,
.dash-board .gsteps-progress,
.dash-board .gbar-caption em,
.dash-board .gsteps-awards b,
.dash-board #rev-cards .dash-loja-caixa dd,
.goal-seller-boards .gbar-prize,
.goal-seller-boards .gsteps-progress,
.goal-seller-boards .gbar-caption em,
.goal-seller-boards .gsteps-awards b {
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.dash-board #rev-cards .dash-loja-caixa,
.dash-board #rev-cards .card .sub {
  font-size: 0.72rem !important;
  line-height: 1.3 !important;
}
.dash-board .goal-meter-top,
.dash-board .goal-meter-top b,
.dash-board .goal-meter-top span {
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.dash-board .seller-card-head .seller-stores,
.goal-seller-boards .seller-card-head .seller-stores {
  max-width: 100%;
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.gbar-inside {
  align-items: center;
}
.gbar-inside > .gbar-name {
  justify-content: center;
  text-align: center;
  white-space: normal;
  overflow: visible;
}
.gbar-inside > .gbar-name b {
  flex: 0 1 auto;
  text-align: center;
  white-space: normal;
}
.gbar-inside .gbar-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 1.45rem;
  min-height: 1.45rem;
  padding: 0 0.35rem;
}
.gbar-inside .gbar-paint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.gbar-inside .gbar-caption {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: calc(100% - 0.4rem);
  padding: 0 0.35rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  text-align: center;
  pointer-events: none;
}
.gbar-inside .gbar-caption b,
.gbar-inside .gbar-caption em {
  font-style: normal;
  font-weight: 650;
  line-height: 1.25;
}
.gbar-inside .gbar-caption b {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  text-align: center;
  color: var(--text);
}
.gbar-inside .gbar-caption em {
  flex: 0 0 auto;
  color: var(--dash-c1, var(--accent));
}
#dash-seller-boards .gbar,
.goal-seller-boards .gbar {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "name" "bar";
}
#dash-seller-boards .gbar-track,
.goal-seller-boards .gbar-track {
  height: 1.5rem;
  min-height: 1.5rem;
}
#dash-seller-boards .gbar-inside .gbar-track,
.goal-seller-boards .gbar-inside .gbar-track {
  height: 1.45rem;
  min-height: 1.45rem;
}
#dash-seller-boards .gbar-inside .gbar-marcador,
.goal-seller-boards .gbar-inside .gbar-marcador {
  height: 14px;
  min-height: 14px;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}
#dash-seller-boards .gbar-inside > .gbar-name,
.goal-seller-boards .gbar-inside > .gbar-name {
  justify-content: center;
  text-align: center;
}
#dash-seller-boards .gbar > .gbar-name,
.goal-seller-boards .gbar > .gbar-name {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
#dash-seller-boards .gbar-list > .gbar-name,
.goal-seller-boards .gbar-list > .gbar-name {
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#dash-seller-boards .gbar > .gbar-name b,
.goal-seller-boards .gbar > .gbar-name b {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
#dash-seller-boards .gbar-prize,
.goal-seller-boards .gbar-prize {
  grid-area: bar;
  justify-self: end;
  align-self: center;
  z-index: 1;
  margin-right: 0.4rem;
  padding: 0 0.28rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  white-space: nowrap;
}
.dash-board .seller-face > span,
.goal-seller-boards .seller-face > span {
  max-width: none;
}
.dash-board .card:not(.dash-kpi),
.dash-board .goal-card,
.goal-seller-boards .goal-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: none;
}
.dash-board .goal-store .goal-card-head strong,
.goal-store .goal-card-head strong,
.gsteps.is-full .gsteps-target,
.gbar-inside > .gbar-name b,
.gbar-inside .gbar-caption em {
  color: var(--dash-c1, var(--accent));
}
.gbar-name b.store-name {
  color: var(--store-name, inherit);
}
.gsteps ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  width: 100%;
  align-items: start;
}
.gsteps li { width: 100%; }
.gsteps b {
  box-shadow: 0 0 0 3px var(--surface);
}
.dash-board[data-theme] .gsteps b,
.gsteps b {
  border-color: color-mix(in srgb, var(--dash-c1, var(--border)) 50%, var(--border));
  color: var(--dash-c1, var(--text));
}
#dash-seller-boards .gbar-list,
.goal-seller-boards .gbar-list {
  gap: 0.65rem;
  margin-top: 0.55rem;
}
#dash-seller-boards .gsteps.is-compact,
.goal-seller-boards .gsteps.is-compact {
  margin: 0;
  padding-bottom: 0.2rem;
}
#dash-seller-boards .gbar-inside,
.goal-seller-boards .gbar-inside {
  margin-top: 0.15rem;
  row-gap: 0.28rem;
}
#dash-seller-boards .gbar-inside > .gbar-name,
.goal-seller-boards .gbar-inside > .gbar-name {
  line-height: 1.25;
  padding: 0 0.15rem;
}
.gbar-inside .gbar-track {
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dash-c1, var(--border)) 25%, transparent);
}
@media (max-width: 1100px) {
  .dash-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dash-board { grid-template-columns: 1fr; }
}

.app-main {
  width: 100%;
  max-width: 100%;
}
.store-name {
  font-weight: 700;
  vertical-align: middle;
}
.store-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}
.store-color-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}
.store-color-item input[type="color"] {
  width: 2.4rem;
  height: 2rem;
  padding: 0.15rem;
}
.exp-launch-card,
.exp-launch,
.exp-launch .form-group {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
}
.exp-launch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.85rem;
  align-items: end;
}
.exp-launch .form-group { margin: 0; width: 100%; }
.exp-launch .input,
.exp-launch select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.exp-launch .exp-span-2 { grid-column: span 2; }
.exp-launch .exp-span-all { grid-column: 1 / -1; }
.exp-launch label,
.exp-launch .sub {
  overflow-wrap: anywhere;
}
.exp-lojas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  min-width: 0;
  max-width: 100%;
}
.exp-lojas label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  min-height: 40px;
  min-width: 0;
}
.exp-lojas input {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}
.exp-launch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.exp-launch-actions .btn { min-height: 40px; }
.exp-launch-actions .btn[value="paga"] {
  background: #15803d;
  border-color: #15803d;
}
#exp-boletos-parcelas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
#exp-boletos-parcelas[hidden] { display: none; }
#exp-boletos-parcelas .form-group { flex: 1 1 14rem; min-width: 0; margin: 0; }
@media (max-width: 980px) {
  .exp-launch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .exp-launch { grid-template-columns: minmax(0, 1fr); }
  .exp-launch .exp-span-2,
  .exp-launch .exp-span-all { grid-column: auto; }
  .exp-launch .input,
  .exp-launch select,
  .exp-launch-actions .btn {
    width: 100%;
    font-size: 16px;
    min-height: 40px;
  }
  .exp-launch-actions { flex-direction: column; }
  .exp-lojas { display: grid; grid-template-columns: minmax(0, 1fr); }
}
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}
.exp-card.is-focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}
.exp-card.is-deleted {
  opacity: 0.72;
}
.exp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.exp-card-main {
  min-width: 0;
  flex: 1 1 16rem;
}
.exp-card-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.82rem;
}
.exp-due {
  color: #b45309;
  font-weight: 700;
}
.exp-card-title {
  margin-top: 0.15rem;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
}
.exp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.exp-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.35rem;
  border-radius: 99px;
  vertical-align: middle;
}
.exp-card-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.55rem;
}
.exp-store-move {
  margin: 0;
  min-width: min(100%, 12rem);
}
.exp-card-side {
  flex: 0 0 auto;
  text-align: right;
}
.exp-amount {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.1;
}
.exp-status {
  margin-top: 0.25rem;
  font-size: 0.86rem;
}
.exp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.exp-actions form {
  margin: 0;
}
.exp-focus-note {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.12);
  font-weight: 700;
}
.exp-card details {
  margin-top: 0.7rem;
}
.exp-report-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.exp-report-layout .table-wrap {
  flex: 1 1 22rem;
}
.exp-report-layout aside {
  flex: 1 1 14rem;
}
.exp-open-cell {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.exp-open-btn {
  margin: 0;
  padding: 0.15rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.exp-open-btn:hover,
.exp-open-btn:focus {
  color: var(--text);
  border-color: var(--border);
  background: transparent;
}
.exp-open-dialog {
  width: min(28rem, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 1.1rem 1.15rem;
}
.exp-open-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
@media (max-width: 1100px) {
  .exp-report-layout {
    flex-direction: column;
  }
  .exp-report-layout .table-wrap,
  .exp-report-layout aside {
    width: 100%;
    flex-basis: auto;
  }
}
@media (max-width: 720px) {
  .exp-card-head {
    flex-direction: column;
  }
  .exp-card-side,
  .exp-actions {
    text-align: left;
    justify-content: flex-start;
    width: 100%;
  }
  .exp-card,
  .card {
    padding: 0.85rem;
  }
}
.apv-block-title {
  margin: 1.35rem 0 0.7rem;
  font-size: 1.05rem;
}
.apv-reason {
  margin: 0.85rem 0 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.22);
  line-height: 1.45;
}
.apv-reason strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}
.apv-detail {
  margin-top: 0.35rem;
}
.apv-detail .data {
  margin-top: 0.65rem;
}
.apv-status-ok { color: #15803d; font-weight: 700; }
.apv-status-no { color: #b91c1c; font-weight: 700; }
.apv-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin: 0 0 0.75rem;
}
.apv-filters .form-group { min-width: 0; flex: 1 1 9rem; }
.apv-sum { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.86rem; }
.apv-table td { vertical-align: middle; }
.apv-table tr.is-open td { background: rgba(37, 99, 235, 0.06); }
.apv-detail-row td { background: transparent; }
.apv-pages { display: flex; gap: 0.6rem; align-items: center; margin: 0.8rem 0 0; }
@media (max-width: 720px) {
  .apv-filters .form-group { flex-basis: 100%; }
  .apv-filters .btn { width: 100%; }
}
.trf-pick {
  max-height: 28rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.trf-pick tr.is-hidden { display: none; }
.usr-find {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}
@media (min-width: 901px) {
  .usr-find {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--bg);
  }
}
.usr-find .form-group {
  flex: 1 1 12rem;
  min-width: 0;
}
.usr-card.is-hidden { display: none; }
.usr-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}
.usr-card-body > form:first-child {
  flex: 1 1 16rem;
  min-width: 0;
  width: 100%;
}
.usr-delete { align-self: flex-end; }
.bal-repo-scroll { max-height: 28rem; overflow: auto; }
.bal-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 0.6rem;
}
.bal-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
}
.bal-opt input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.bal-opt > span { display: block; min-width: 0; }
.bal-opt strong { display: block; font-size: 0.92rem; }
.bal-opt small { display: block; margin-top: 0.15rem; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.bal-opt.is-on {
  border-color: var(--accent, #2563eb);
  background: rgba(var(--nav-accent-rgb), 0.08);
}
.bal-panel[hidden] { display: none !important; }
.app-nav-dropdown-label {
  display: block;
  padding: 0.4rem 0.65rem 0.12rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.app-sidebar .app-nav-dropdown.is-open .app-nav-dropdown-label {
  margin-top: 0.35rem;
  padding-left: 0.45rem;
}
.est-atual-cats { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; }
.est-atual-cats label { display: flex; gap: 0.35rem; align-items: center; margin: 0; }
.est-atual-picks {
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  margin-top: 0.45rem;
}
.est-atual-picks label { display: flex; gap: 0.4rem; align-items: baseline; margin: 0.2rem 0; }
.est-atual-picks label.is-hidden { display: none; }
.est-cat { margin-top: 0.8rem; }
.dash-birth {
  margin: 0 0 1rem;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, #f59e0b 30%, transparent), transparent 42%),
    radial-gradient(circle at 0 100%, color-mix(in srgb, #fb7185 24%, transparent), transparent 46%),
    var(--surface, #fff);
}
.dash-birth-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; min-width: 0; }
.dash-birth-head h3 { margin: 0; overflow-wrap: anywhere; }
.dash-birth-head p { margin: 0.15rem 0 0; color: var(--muted); }
.dash-birth-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.65rem;
}
.dash-birth-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding: 0.65rem;
  border: 1px solid color-mix(in srgb, #fb7185 28%, var(--border));
  border-radius: 16px;
  min-width: 0;
  background: color-mix(in srgb, var(--surface, #fff) 86%, #fff7ed);
}
.dash-birth-avatar {
  width: 4.5rem;
  height: 4.5rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 1.05rem;
  display: grid;
  place-items: center;
  position: relative;
  color: #9f1239;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.75), transparent 36%),
    linear-gradient(145deg, #fecdd3, #fdba74 58%, #ddd6fe);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.45);
}
.dash-birth-avatar svg { width: 3.1rem; height: 3.1rem; display: block; }
.dash-birth-avatar b {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #9f1239;
}
.dash-birth-avatar.is-head { width: 3.25rem; height: 3.25rem; border-radius: 0.9rem; }
.dash-birth-avatar.is-head svg { width: 2.35rem; height: 2.35rem; }
.dash-birth-list li.tone-2 .dash-birth-avatar { background: radial-gradient(circle at 18% 18%, rgba(255,255,255,.75), transparent 36%), linear-gradient(145deg, #bfdbfe, #a5f3fc 60%, #ddd6fe); color: #1d4ed8; }
.dash-birth-list li.tone-2 .dash-birth-avatar b { color: #1d4ed8; }
.dash-birth-list li.tone-3 .dash-birth-avatar { background: radial-gradient(circle at 18% 18%, rgba(255,255,255,.75), transparent 36%), linear-gradient(145deg, #fde68a, #fdba74 55%, #fecdd3); color: #9a3412; }
.dash-birth-list li.tone-3 .dash-birth-avatar b { color: #9a3412; }
.dash-birth-list li.tone-4 .dash-birth-avatar { background: radial-gradient(circle at 18% 18%, rgba(255,255,255,.75), transparent 36%), linear-gradient(145deg, #ddd6fe, #fbcfe8 58%, #bfdbfe); color: #6d28d9; }
.dash-birth-list li.tone-4 .dash-birth-avatar b { color: #6d28d9; }
.dash-birth-list li.is-today {
  border-color: #fb7185;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface, #fff) 70%, #fff7ed), color-mix(in srgb, var(--surface, #fff) 78%, #ffe4e6));
  box-shadow: 0 8px 22px color-mix(in srgb, #fb7185 22%, transparent);
}
.dash-birth-copy { min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.dash-birth-copy strong { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #be123c; }
.dash-birth-name { overflow-wrap: anywhere; font-weight: 650; }
.dash-birth-list .sub { color: var(--muted); overflow-wrap: anywhere; }
.dash-hits { min-width: 0; max-width: 100%; }
.dash-hits-marquee { overflow: hidden; min-width: 0; max-width: 100%; }
.dash-hits-track { display: flex; gap: .75rem; width: max-content; }
.dash-hits-track.is-run { animation: dash-hits-run var(--dash-hits-time, 28s) linear infinite; }
.dash-hits-marquee:hover .dash-hits-track { animation-play-state: paused; }
.dash-hit {
  width: 11.25rem;
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .2rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 16px;
  background: var(--surface);
  min-width: 0;
  overflow: hidden;
}
.dash-hit-mark {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .7rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: color-mix(in srgb, currentColor 16%, var(--surface));
}
.dash-hit strong, .dash-hit span, .dash-hit small { overflow-wrap: anywhere; }
.dash-hit span, .dash-hit small { color: var(--muted); font-size: .78rem; }
.dash-hit b { font-size: 1.25rem; letter-spacing: -.03em; color: var(--success); }
@keyframes dash-hits-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 720px) {
  .dash-hit { width: 10.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-hits-track.is-run { animation: none; }
  .dash-hits-marquee { overflow-x: auto; }
}
@media (max-width: 720px) {
  .usr-find .form-group,
  .usr-card .form-group { flex-basis: 100%; min-width: 0 !important; max-width: none !important; width: 100%; }
  .dash-birth-list { grid-template-columns: minmax(0, 1fr); }
  .usr-delete { align-self: stretch; }
  .usr-delete .btn { width: 100%; }
}
.trf-pick .data { margin: 0; }
.prod-recent-card h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.prod-recent-list { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.75rem; }
.prod-recent-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.08);
  min-width: 0;
}
.prod-recent-info { min-width: 0; flex: 1 1 12rem; }
.prod-recent-info strong, .prod-recent-info .sub { display: block; }
.prod-stock-note { display: block; margin-top: 0.15rem; font-size: 0.82rem; line-height: 1.3; color: var(--muted); white-space: nowrap; }
.prod-stock-cores { display: flex; flex-wrap: wrap; gap: 0.15rem 0.75rem; margin-top: 0.12rem; font-size: 0.8rem; line-height: 1.3; color: var(--muted); }
.prod-stock-cor { display: inline-flex; align-items: center; gap: 0.22rem; white-space: nowrap; }
.prod-stock-cor .pos-color-chip { width: 0.72rem; height: 0.72rem; margin-right: 0; }
.perm-user-list { display: flex; flex-direction: column; gap: 0.15rem; }
.perm-user-list label { display: flex; align-items: flex-start; gap: 0.55rem; min-height: 40px; margin: 0; cursor: pointer; }
.hist-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 0.85rem; }
.hist-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  font-size: 0.88rem;
}
.hist-chip.is-on { background: rgba(37, 99, 235, 0.12); border-color: transparent; font-weight: 650; }
.hist-people { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1rem; }
.hist-person {
  flex: 1 1 13rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: color-mix(in srgb, var(--surface, #fff) 88%, transparent);
}
.hist-person.is-on { border-color: #3b82f6; box-shadow: inset 0 0 0 1px #3b82f6; }
.hist-person strong { font-size: 0.92rem; line-height: 1.3; }
.hist-person span { color: var(--muted); font-size: 0.78rem; line-height: 1.3; overflow-wrap: anywhere; }
.hist-focus { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center; margin-bottom: 1rem; padding: 0.9rem 1rem; }
.hist-focus dl { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0; }
.hist-focus dt { font-size: 0.75rem; color: var(--muted); }
.hist-focus dd { margin: 0.1rem 0 0; font-weight: 650; }
.hist-day { margin: 0.85rem 0 0.1rem 3.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); }
.hist-timeline { position: relative; display: flex; flex-direction: column; gap: 0.45rem; }
.hist-timeline::before {
  content: "";
  position: absolute;
  left: 2.2rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: var(--border);
  pointer-events: none;
}
.hist-filters { display: flex; flex-wrap: wrap; gap: 0.65rem 0.85rem; align-items: flex-end; margin-bottom: 1rem; padding: 1rem; }
.hist-filters .form-group { margin: 0; min-width: 9.5rem; flex: 1 1 9.5rem; }
.hist-filters .hist-search { flex: 2 1 14rem; }
.hist-filters .input { width: 100%; }
.hist-count { margin: 0 0 0.75rem; }
.hist-list { display: flex; flex-direction: column; gap: 0.45rem; }
.hist-item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  gap: 0.7rem 1rem;
  align-items: center;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface, #fff) 88%, transparent);
  min-width: 0;
}
.hist-ico {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  color: #3b82f6;
}
.hist-ico svg { width: 1.15rem; height: 1.15rem; display: block; }
.hist-ico-venda { background: rgba(16, 185, 129, 0.14); color: #10b981; }
.hist-ico-produto, .hist-ico-estoque { background: rgba(59, 130, 246, 0.14); color: #3b82f6; }
.hist-ico-financeiro, .hist-ico-caixa { background: rgba(245, 158, 11, 0.16); color: #d97706; }
.hist-ico-auth, .hist-ico-usuario, .hist-ico-vendedor { background: rgba(99, 102, 241, 0.14); color: #6366f1; }
.hist-ico-tema { background: rgba(168, 85, 247, 0.14); color: #a855f7; }
.hist-ico-loja, .hist-ico-transferencia { background: rgba(14, 165, 233, 0.14); color: #0ea5e9; }
.hist-ico-metas, .hist-ico-fiscal { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.hist-main { min-width: 0; }
.hist-main strong { display: block; font-size: 0.95rem; line-height: 1.3; }
.hist-main p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.35; overflow-wrap: anywhere; }
.hist-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.12rem; color: var(--muted); font-size: 0.8rem; text-align: right; white-space: nowrap; }
.hist-meta .who { color: var(--text, inherit); font-weight: 600; }
@media (max-width: 720px) {
  .perm-groups { grid-template-columns: 1fr !important; }
  .perm-user-list label { font-size: 16px; }
  .hist-filters .form-group,
  .hist-filters .btn { flex: 1 1 100%; width: 100%; min-width: 0; }
  .hist-filters .input { font-size: 16px; }
  .hist-filters .btn { min-height: 40px; }
  .hist-item { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .hist-meta { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; white-space: normal; gap: 0.25rem 0.7rem; }
  .hist-pager .btn { min-height: 40px; width: 100%; }
  .hist-people { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }
  .hist-person { flex: 0 0 13.5rem; }
  .hist-focus dl { width: 100%; }
  .hist-focus dl > div { flex: 1 1 45%; min-width: 0; }
  .hist-day { margin-left: 0; }
  .hist-chip { flex: 1 1 30%; }
}
td.prod-name-cell { white-space: normal; max-width: 28rem; }
td.prod-name-cell .btn { min-height: 40px; }
.prod-recent-item .btn { min-height: 40px; }
tr.is-recent td { background: rgba(37, 99, 235, 0.08); }
@media (max-width: 720px) {
  .prod-recent-item { align-items: stretch; }
  .prod-recent-item .btn,
  td.prod-name-cell .btn { width: 100%; }
}
.fin-cash-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.fin-cash-filters > label { flex: 1 1 10rem; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.fin-cash-filters input,
.fin-cash-filters select { width: 100%; min-width: 0; }
.fin-cash-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; }
.fin-cash-receipt { display: inline-block; margin-top: 0.35rem; min-height: 40px; line-height: 40px; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .fin-cash-filters > label,
  .fin-cash-actions .btn { flex: 1 1 100%; }
  .fin-cash-filters input,
  .fin-cash-filters select { font-size: 16px; min-height: 40px; }
  .fin-cash-actions .btn { width: 100%; }
}
.bonus-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; min-width: 12rem; }
.bonus-actions .input { flex: 1 1 8rem; min-width: 0; }
.bonus-status { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 99px; font-size: 0.75rem; font-weight: 650; }
.bonus-status.is-a_pagar { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.bonus-status.is-pago { background: rgba(20, 184, 166, 0.2); color: #5eead4; }
.bonus-status.is-recusado { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
@media (max-width: 720px) {
  .bonus-filters .form-group,
  .bonus-filters .btn { flex: 1 1 100%; width: 100%; min-width: 0; }
  .bonus-filters .input { font-size: 16px; min-height: 40px; }
  .bonus-filters .btn { min-height: 40px; }
  .bonus-actions { width: 100%; }
  .bonus-actions .input { font-size: 16px; min-height: 40px; flex-basis: 100%; }
  .bonus-actions .btn { min-height: 40px; flex: 1 1 100%; }
}

