:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #1b2430;
  --muted: #657487;
  --line: #d9e1e8;
  --blue: #2563eb;
  --teal: #0f9f8f;
  --amber: #c37a13;
  --rose: #d14b62;
  --green: #238b45;
  --shadow: 0 18px 48px rgba(31, 45, 61, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

body.login-active {
  overflow: hidden;
}

body.landing-active {
  overflow: hidden;
}

body.landing-active:not(.purchases-active):not(.reports-active):not(.pricing-active):not(.pricing-xml-active):not(.report-products-active):not(.report-stock-active):not(.report-sales-active) {
  overflow-x: hidden;
  overflow-y: auto;
}

body.landing-active.purchases-active,
body.landing-active.purchase-suggestion-active,
body.landing-active.reports-active,
body.landing-active.pricing-active,
body.landing-active.pricing-xml-active,
body.pricing-active,
body.pricing-xml-active,
body.landing-active.report-products-active,
body.landing-active.report-stock-active,
body.landing-active.report-sales-active {
  overflow-x: hidden;
  overflow-y: auto;
}

body::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track {
  background: #e8eef3;
}

body::-webkit-scrollbar-thumb {
  background: #8ea0af;
  border: 3px solid #e8eef3;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #667789;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--app-nav-width, 304px) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.22s ease;
}

body.login-active .app-shell,
body.landing-active .app-shell {
  display: none;
}

.login-screen {
  display: none;
}

body.login-active .login-screen {
  display: grid;
  grid-template-columns: minmax(360px, 1.06fr) minmax(360px, 0.94fr);
  min-height: 100vh;
  background: #ffffff;
}

.login-visual {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #12b5ea 0%, #05a8dd 48%, #0798cf 100%);
}

.login-visual-card {
  display: grid;
  justify-items: center;
  align-content: center;
  width: min(76%, 430px);
  min-height: 265px;
  padding: 26px 24px;
  border: 1px solid rgba(82, 204, 236, 0.58);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 26%, rgba(0, 171, 226, 0.24), transparent 46%),
    linear-gradient(180deg, rgba(13, 69, 91, 0.96), rgba(10, 36, 58, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 22px 44px rgba(0, 67, 92, 0.22);
}

.login-visual-logo {
  position: relative;
  z-index: 2;
  width: min(62%, 210px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(0, 13, 27, 0.22));
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 42px;
  background: #ffffff;
}

.login-form {
  width: min(100%, 320px);
}

.login-logo {
  display: block;
  width: 92px;
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
}

.login-form h1 {
  margin: 0 0 18px;
  color: #26384c;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.login-field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: #657487;
  font-size: 11px;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  border: 1px solid #e6edf3;
  border-radius: 3px;
  background: #eef3f7;
  padding: 10px 11px;
  color: #1b2430;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-field input:focus {
  border-color: #12b5ea;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(18, 181, 234, 0.16);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 12px;
  color: #657487;
  font-size: 11px;
}

.login-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.login-options button,
.login-create button {
  border: 0;
  background: transparent;
  color: #0d99d1;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.login-submit {
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: #12b5ea;
  color: #ffffff;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(18, 181, 234, 0.22);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.login-submit:hover {
  background: #0798cf;
  box-shadow: 0 13px 26px rgba(7, 152, 207, 0.25);
  transform: translateY(-1px);
}

.login-cnpj-button {
  margin-bottom: 12px;
}

.login-cnpj-button.is-valid {
  background: #19a974;
  box-shadow: 0 10px 22px rgba(25, 169, 116, 0.22);
}

.login-credentials[hidden] {
  display: none;
}

.login-message {
  min-height: 16px;
  margin: 7px 0 0;
  color: #d14b62;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.login-create,
.login-social {
  color: #657487;
  font-size: 11px;
  text-align: center;
}

.login-social {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.login-social div {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.login-version {
  margin: 18px 0 0;
  color: #8da0b3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-align: center;
}

.login-social button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #2563eb;
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 760px) {
  body.login-active {
    overflow-y: auto;
  }

  body.login-active .login-screen {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 38vh;
  }

  .login-visual-logo {
    width: min(62%, 180px);
  }

  .login-visual-card {
    width: min(86%, 360px);
    min-height: 210px;
    padding: 22px 20px;
  }

  .login-panel {
    min-height: 62vh;
    padding: 28px 24px 42px;
  }
}

.landing-screen {
  display: none;
}

body.landing-active .landing-screen {
  position: relative;
  display: grid;
  grid-template-columns: var(--landing-nav-width, 332px) minmax(0, 1fr);
  min-height: 100vh;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  background: var(--bg);
  transition: grid-template-columns 0.22s ease;
}

.landing-card {
  width: auto;
  min-height: 100vh;
  margin-left: 0;
  padding: 20px 18px;
  background:
    radial-gradient(circle at 42% 8%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #12a8d1 0%, #0fa2cc 48%, #0b93bc 100%);
  display: flex;
  flex-direction: column;
  transition: padding 0.22s ease;
}

.landing-nav-head {
  position: relative;
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.landing-brand {
  position: static;
  width: 100%;
  margin-bottom: 0;
  padding: 22px 18px 20px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(8, 55, 79, 0.88), rgba(6, 43, 65, 0.74));
  border-color: rgba(231, 250, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 14px 30px rgba(2, 57, 78, 0.22);
}

.landing-brand .brand-logo {
  width: 170px;
  height: 90px;
}

.landing-brand strong {
  font-size: 18px;
  color: #ffffff;
}

.main-nav-toggle {
  position: absolute;
  top: 18px;
  right: -9px;
  z-index: 2;
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(235, 251, 255, 0.54);
  border-radius: 999px;
  background: rgba(5, 75, 104, 0.86);
  color: #dff7ff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.main-nav-toggle span {
  display: block;
  transform: translateY(-1px);
  font-size: 20px;
  line-height: 1;
}

.landing-nav-section {
  display: grid;
  gap: 10px;
}

.landing-nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  color: #e7faff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-nav-group-title::after {
  content: "\203A";
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0;
}

.landing-button {
  position: static;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  margin: 0;
  transform: none;
  border: 1px solid rgba(231, 250, 255, 0.34);
  border-radius: 8px;
  background: rgba(7, 73, 101, 0.66);
  color: #ffffff;
  cursor: pointer;
  justify-content: flex-start;
  gap: 14px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, justify-content 0.22s ease, padding 0.22s ease;
}

.landing-button > span:first-child {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: #dff7ff;
  font-size: 15px;
  line-height: 1;
}

.landing-button-label {
  display: block;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  min-width: 0;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.landing-button + .landing-button {
  margin-top: 0;
}

.landing-button:hover {
  background: rgba(5, 64, 90, 0.82);
  box-shadow: inset 3px 0 0 #ffffff;
}

.landing-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px 10px;
  color: #ffffff;
}

.landing-user-card > span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
}

.landing-user-card strong,
.landing-user-card small {
  display: block;
  line-height: 1.15;
}

.landing-user-card strong {
  font-size: 12px;
}

.landing-user-card small {
  color: #d9f6ff;
  font-size: 10px;
}

.landing-logout-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  border: 1px solid rgba(231, 250, 255, 0.34);
  border-radius: 8px;
  background: rgba(7, 73, 101, 0.64);
  color: #ffffff;
  cursor: pointer;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.landing-logout-button span:first-child {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.landing-logout-button:hover {
  border-color: rgba(255, 255, 255, 0.64);
  background: rgba(5, 64, 90, 0.82);
  color: #ffffff;
}

body.main-nav-compact {
  --landing-nav-width: 78px;
  --app-nav-width: 78px;
}

body.landing-active.main-nav-compact .landing-card {
  padding: 18px 10px;
}

body.landing-active.main-nav-compact .landing-brand {
  min-height: 56px;
  padding: 10px;
}

body.landing-active.main-nav-compact .landing-brand::before,
body.landing-active.main-nav-compact .landing-brand-text,
body.landing-active.main-nav-compact .landing-nav-group-title,
body.landing-active.main-nav-compact .landing-button-label,
body.landing-active.main-nav-compact .landing-user-card div {
  display: none;
}

body.landing-active.main-nav-compact .landing-brand .brand-logo {
  width: 46px;
  height: 42px;
}

body.landing-active.main-nav-compact .main-nav-toggle {
  right: -13px;
}

body.landing-active.main-nav-compact .main-nav-toggle span {
  transform: rotate(180deg) translateY(1px);
}

body.landing-active.main-nav-compact .landing-button {
  justify-content: center;
  min-height: 44px;
  padding: 0;
}

body.landing-active.main-nav-compact .landing-button span:first-child {
  width: 26px;
  height: 26px;
}

body.landing-active.main-nav-compact .landing-user-card {
  justify-content: center;
  padding-inline: 0;
}

body.landing-active.main-nav-compact .landing-logout-button {
  justify-content: center;
  min-height: 42px;
  padding: 0;
}

body.landing-active.main-nav-compact .landing-logout-button span:last-child {
  display: none;
}

body.main-nav-compact:not(.landing-active) .sidebar {
  padding: 18px 10px;
}

body.main-nav-compact:not(.landing-active) .sidebar .brand {
  min-height: 56px;
  padding: 10px;
}

body.main-nav-compact:not(.landing-active) .sidebar .brand::before,
body.main-nav-compact:not(.landing-active) .sidebar .brand div,
body.main-nav-compact:not(.landing-active) .nav-item:not(.home-return) {
  transition: min-height 0.18s ease, padding 0.18s ease;
}

body.main-nav-compact:not(.landing-active) .sidebar .brand::before,
body.main-nav-compact:not(.landing-active) .sidebar .brand div,
body.main-nav-compact:not(.landing-active) .nav-item {
  overflow: hidden;
}

body.main-nav-compact:not(.landing-active) .sidebar .brand div {
  display: none;
}

body.main-nav-compact:not(.landing-active) .sidebar .brand-logo {
  width: 46px;
  height: 42px;
}

body.main-nav-compact:not(.landing-active) .nav-list {
  gap: 12px;
}

body.main-nav-compact:not(.landing-active) .nav-item {
  justify-content: center;
  min-height: 48px;
  padding: 0;
  gap: 0;
  font-size: 0;
}

body.main-nav-compact:not(.landing-active) .nav-item span {
  width: 26px;
  height: 26px;
  margin: 0;
  font-size: 13px;
}

body.main-nav-compact:not(.landing-active) .sidebar-back-button {
  min-width: 0;
}

body.main-nav-compact:not(.landing-active) .workspace,
body.main-nav-compact:not(.landing-active) .tool-screen {
  min-width: 0;
}

.landing-info {
  align-self: start;
  justify-self: start;
  width: min(1180px, calc(100vw - var(--landing-nav-width, 332px) - 56px));
  margin: 18px 0 34px 24px;
  transition: width 0.22s ease;
}

.landing-info small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.company-select-box {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(199, 213, 226, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 252, 0.94)),
    var(--surface);
  box-shadow: 0 12px 32px rgba(31, 45, 61, 0.08);
}

.company-select-label {
  color: #53677d;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  text-transform: uppercase;
}

.company-picker {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.company-picker select {
  min-width: 0;
  min-height: 32px;
  border-color: #cfdbe6;
  background: #ffffff;
  font-size: 11px;
  font-weight: 650;
}

.all-companies-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d6e1eb;
  border-radius: 8px;
  background: #f8fbfd;
  color: #213047;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.all-companies-option:hover {
  border-color: rgba(47, 210, 255, 0.58);
  background: #edf8fc;
}

.all-companies-option input {
  width: 13px;
  height: 13px;
  min-height: 0;
  margin: 0;
  accent-color: #0ea5c6;
}

.company-select-box select {
  width: 100%;
}

.landing-info strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
}

.landing-info small {
  margin-top: 5px;
}

.landing-dashboard {
  margin-top: 16px;
  display: grid;
  gap: 14px;
  color: var(--ink);
}

.landing-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.landing-dashboard-head span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.landing-dashboard-head h1 {
  margin: 2px 0 0;
  color: #0e2237;
  font-size: 22px;
  line-height: 1.1;
}

.landing-dashboard-menu {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #ffffff;
  color: #12324d;
  font-size: 19px;
  cursor: pointer;
}

.landing-period-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.landing-period-controls label {
  display: grid;
  gap: 5px;
  color: #5b6f86;
  font-size: 11px;
  font-weight: 700;
}

.landing-period-controls input {
  width: 138px;
  min-height: 38px;
  border: 1px solid #d5e2ee;
  border-radius: 8px;
  background: #ffffff;
  color: #0e2237;
  font: inherit;
  font-size: 13px;
  padding: 0 10px;
}

.landing-period-controls .icon-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
}

.landing-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.landing-kpi-card,
.landing-chart-card {
  border: 1px solid rgba(204, 216, 228, 0.92);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(31, 45, 61, 0.1);
}

.landing-kpi-card {
  min-height: 116px;
  padding: 16px;
}

.landing-kpi-card.is-primary {
  background:
    radial-gradient(circle at 88% 18%, rgba(47, 210, 255, 0.22), transparent 34%),
    linear-gradient(145deg, #0d2c48, #0b4a67);
  color: #ffffff;
  border-color: rgba(47, 210, 255, 0.42);
}

.landing-kpi-card span,
.landing-kpi-card small {
  display: block;
  color: #65758a;
  font-size: 12px;
  line-height: 1.25;
}

.landing-kpi-card.is-primary span,
.landing-kpi-card.is-primary small {
  color: #dff7ff;
}

.landing-kpi-card strong {
  display: block;
  margin-top: 12px;
  color: #0e2237;
  font-size: 28px;
  line-height: 1.05;
}

.landing-kpi-card.is-primary strong {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.18;
}

.landing-finance-lines {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.landing-finance-lines span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #dff7ff;
  font-size: 11px;
  font-weight: 700;
}

.landing-finance-lines b {
  color: #ffffff;
  font-weight: 900;
}

.landing-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.7fr);
  gap: 14px;
}

.landing-chart-card {
  padding: 16px;
}

.landing-wide-chart {
  min-height: 230px;
}

.landing-chart-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.landing-chart-title h2,
.landing-donut-card h2 {
  margin: 0;
  color: #0e2237;
  font-size: 15px;
}

.landing-chart-title p,
.landing-donut-card p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.landing-chart-title > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf8fc;
  color: #075985;
  font-size: 11px;
  font-weight: 800;
}

.landing-bars {
  display: grid;
  gap: 15px;
}

.landing-bar-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
}

.landing-bar-row span,
.landing-bar-row strong {
  color: #0e2237;
  font-size: 12px;
  font-weight: 800;
}

.landing-bar-row div {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eef5;
}

.landing-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d2c48, #16acd5);
}

.landing-bar-row:nth-child(2) i {
  background: linear-gradient(90deg, #16acd5, #2f68eb);
}

.landing-bar-row:nth-child(3) i {
  background: #d97706;
}

.landing-bar-row:nth-child(4) i {
  background: #0f9f8f;
}

.landing-donut-card {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 230px;
  text-align: center;
}

.landing-donut {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 52%, transparent 53%),
    conic-gradient(#12a8d1 0 72%, #0d2c48 72% 100%);
  box-shadow: inset 0 0 0 1px rgba(13, 44, 72, 0.08);
}

.landing-donut span {
  color: #0e2237;
  font-size: 22px;
  font-weight: 850;
}

.landing-payment-legend {
  display: grid;
  gap: 7px;
  width: 100%;
  margin-top: 12px;
}

.landing-payment-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #52677d;
  font-size: 11px;
}

.landing-payment-legend span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.landing-payment-legend strong,
.landing-payment-legend em {
  overflow: hidden;
  color: #17324d;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-payment-legend em {
  color: #52677d;
  font-weight: 750;
}

.landing-flow-card {
  grid-column: 1 / -1;
  padding: 14px 16px 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

.landing-flow-card .landing-chart-title {
  align-items: center;
  margin-bottom: 10px;
}

.landing-seller-chart {
  display: grid;
  gap: 10px;
  padding: 10px 0 0;
}

.landing-seller-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(0, 1fr) 112px;
  align-items: center;
  gap: 12px;
}

.landing-seller-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.landing-seller-row b {
  overflow: hidden;
  color: #0e2237;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-seller-row small {
  overflow: hidden;
  color: #64748b;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-seller-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eef5;
}

.landing-seller-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.landing-seller-row strong {
  color: #0e2237;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.landing-flow-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  height: 92px;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(216, 227, 237, 0.72);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(237, 246, 250, 0.92)),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(148, 163, 184, 0.12) 23px);
}

.landing-flow-chart::before,
.landing-flow-chart::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  clip-path: polygon(0 72%, 12% 48%, 24% 54%, 36% 28%, 50% 60%, 64% 38%, 78% 46%, 100% 24%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(18, 168, 209, 0.5), rgba(18, 168, 209, 0.06));
}

.landing-flow-chart::after {
  height: 74px;
  clip-path: polygon(0 48%, 13% 60%, 28% 34%, 42% 40%, 56% 20%, 70% 50%, 84% 36%, 100% 42%, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(13, 44, 72, 0.42), rgba(13, 44, 72, 0.04));
  mix-blend-mode: multiply;
}

.landing-flow-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
  color: #64748b;
  font-size: 12px;
}

.landing-flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing-flow-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #12a8d1;
}

.landing-flow-legend span:nth-child(2) i {
  background: #0d2c48;
}

body.purchases-active .landing-info,
body.purchase-suggestion-active .landing-info,
body.reports-active .landing-info,
body.pricing-active .landing-info,
body.pricing-xml-active .landing-info,
body.report-products-active .landing-info,
body.report-stock-active .landing-info,
body.report-sales-active .landing-info {
  display: none;
}

.tool-screen {
  display: none;
}

body.purchases-active #purchasesScreen,
body.purchase-suggestion-active #purchaseSuggestionScreen,
body.reports-active #reportsScreen,
body.pricing-active #pricingScreen,
body.pricing-xml-active #pricingXmlScreen,
body.report-products-active #productsReportScreen,
body.report-stock-active #stockReportScreen,
body.report-sales-active #salesReportScreen {
  display: block;
  padding: 32px;
}

body.pricing-active .topbar,
body.pricing-active .view,
body.pricing-xml-active .topbar,
body.pricing-xml-active .view {
  display: none;
}

body.pricing-active #pricingScreen {
  padding: 18px 18px 14px;
  min-height: 100vh;
  overflow: visible;
}

body.pricing-active .tool-screen-head {
  align-items: center;
  margin-bottom: 12px;
}

body.pricing-active .tool-screen-head h1 {
  font-size: 21px;
}

body.pricing-active .tool-screen-head p {
  margin-top: 2px;
  font-size: 12px;
}

body.pricing-xml-active .tool-screen-head > .routine-badge {
  display: none;
}

body.pricing-xml-active #pricingXmlScreen {
  padding: 18px 18px 14px;
  min-height: 100vh;
  overflow: visible;
}

body.pricing-xml-active .app-shell,
body.pricing-xml-active main {
  min-height: 100vh;
  overflow: visible;
}

body.pricing-xml-active .tool-screen-head {
  align-items: center;
  margin-bottom: 12px;
}

body.pricing-xml-active .tool-screen-head h1 {
  font-size: 21px;
}

body.pricing-xml-active .tool-screen-head p {
  margin-top: 2px;
  font-size: 12px;
}

.tool-screen-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.tool-screen-head > .routine-badge {
  margin-left: auto;
  order: 2;
}

.tool-screen-head > .icon-button {
  order: 3;
}

.sales-fullscreen-button {
  min-width: 132px;
  padding-inline: 12px;
  white-space: nowrap;
}

.sales-fullscreen-button span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  font-size: 0;
  line-height: 1;
}

.sales-fullscreen-button span::before {
  content: "\26f6";
  font-size: 14px;
  line-height: 1;
}

.sales-fullscreen-button[aria-pressed="true"] span::before {
  content: "\2199";
}

body.sales-report-expanded,
body.products-report-expanded {
  overflow: hidden;
}

body.sales-report-expanded #salesReportScreen,
body.products-report-expanded #productsReportScreen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  overflow: auto;
  padding: 22px 24px;
  background: var(--bg);
}

body.sales-report-expanded #salesReportScreen .tool-screen-head,
body.products-report-expanded #productsReportScreen .tool-screen-head {
  position: sticky;
  top: 0;
  z-index: 3;
  align-items: center;
  padding: 12px 0 16px;
  background: var(--bg);
  border-bottom: 1px solid rgba(203, 216, 228, 0.7);
}

body.sales-report-expanded #salesReportScreen .tool-panel,
body.products-report-expanded #productsReportScreen .tool-panel {
  width: 100%;
  max-width: none;
}

body.sales-report-expanded #salesReportScreen .sales-table-shell {
  max-height: calc(100vh - 260px);
}

body.products-report-expanded #productsReportScreen .products-table-shell {
  max-height: calc(100vh - 430px);
}

.tool-screen-head h1 {
  color: var(--ink);
  font-size: 24px;
}

.tool-screen-head p {
  color: var(--muted);
  margin-top: 4px;
}

.screen-company {
  margin-top: 10px;
}

.screen-company-name,
.screen-company-cnpj {
  display: block;
}

.screen-company-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.screen-company-cnpj {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.tool-panel {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.tool-panel h2 {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 8px;
}

.tool-panel p {
  color: var(--muted);
}

.report-detail-screen .tool-panel {
  width: min(1280px, 100%);
}

body.main-nav-compact.report-products-active #productsReportScreen {
  padding-right: 24px;
}

body.main-nav-compact.report-products-active #productsReportScreen .tool-panel {
  width: 100%;
  max-width: none;
}

body.main-nav-compact.report-products-active #productsReportScreen .report-grid-head {
  grid-template-columns: minmax(280px, 0.75fr) minmax(720px, 1.25fr);
}

body.main-nav-compact.report-products-active #productsReportScreen .report-grid-tools .search-box {
  width: auto;
  flex: 1 1 520px;
}

body.main-nav-compact.report-sales-active #salesReportScreen {
  padding-right: 24px;
}

body.main-nav-compact.report-sales-active #salesReportScreen .tool-panel {
  width: 100%;
  max-width: none;
}

body.main-nav-compact.report-sales-active #salesReportScreen .sales-grid-tools {
  grid-template-columns: minmax(136px, 0.55fr) minmax(136px, 0.55fr) minmax(220px, 0.9fr) minmax(360px, 1.6fr) auto auto;
}

body.main-nav-compact.report-sales-active #salesReportScreen .sales-table-shell {
  max-height: calc(100vh - 340px);
}

body.main-nav-compact.report-stock-active #stockReportScreen {
  padding-right: 24px;
}

body.main-nav-compact.report-stock-active #stockReportScreen .tool-panel {
  width: 100%;
  max-width: none;
}

body.main-nav-compact.report-stock-active #stockReportScreen .stock-filter-grid {
  grid-template-columns: minmax(320px, 1.6fr) minmax(220px, 0.9fr) minmax(240px, 0.9fr);
}

body.main-nav-compact.report-stock-active #stockReportScreen .stock-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stock-report-panel {
  display: grid;
  gap: 16px;
}

.stock-report-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.stock-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(200px, 0.8fr);
  gap: 12px;
  align-items: end;
}

.stock-filter-grid .search-box {
  min-width: 0;
}

.stock-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stock-summary-card {
  display: grid;
  gap: 8px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 14px;
}

.stock-summary-card span {
  color: var(--muted);
  font-size: 11px;
}

.stock-summary-card strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
}

.stock-result-panel {
  display: grid;
  gap: 12px;
}

.stock-result-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.stock-result-panel p {
  margin: 4px 0 0;
}

.report-grid-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-grid-tools {
  display: flex;
  align-items: end;
  gap: 10px;
}

.report-grid-tools .export-actions {
  align-items: end;
}

.report-grid-tools .export-actions .icon-button {
  min-height: 46px;
}

.report-grid-tools .search-box {
  width: min(420px, 44vw);
}

#productsReportScreen .report-grid-head {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(500px, max-content);
  align-items: end;
  column-gap: 18px;
  row-gap: 12px;
}

#productsReportScreen .products-option-row {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.products-grid-summary {
  min-width: 0;
}

#productsReportScreen .report-grid-tools {
  min-width: 0;
  justify-content: flex-end;
}

#productsReportScreen .report-grid-tools .search-box {
  width: clamp(280px, 34vw, 520px);
}

.idle-products-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.products-option-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 12px;
  width: max-content;
  max-width: 100%;
}

.idle-products-check-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.idle-products-days {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 0;
  color: var(--muted);
}

.idle-products-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.idle-products-days input {
  width: 76px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

#salesReportScreen .report-grid-head {
  align-items: stretch;
  flex-direction: column;
}

.products-table-shell,
.sales-table-shell {
  box-shadow: none;
  max-height: calc(100vh - 310px);
  min-height: 280px;
  overflow: auto;
  overscroll-behavior: contain;
}

.products-table-shell table {
  min-width: 1420px;
}

.products-table-shell {
  /* Aproximadamente 25 linhas de produtos antes da rolagem interna. */
  max-height: 930px;
}

.sales-table-shell table {
  table-layout: fixed;
  min-width: 1930px;
}

.sales-table-shell {
  /* Aproximadamente 20 linhas de resultado antes da rolagem interna. */
  max-height: 590px;
}

.pricing-panel {
  display: grid;
  gap: 14px;
  width: min(1760px, 100%);
}

body.pricing-active .pricing-panel {
  grid-template-rows: auto auto auto;
  width: 100%;
  min-height: calc(100vh - 104px);
  height: auto;
  max-width: none;
  min-width: 0;
  padding: 14px;
}

body.main-nav-compact.pricing-active #pricingScreen {
  padding-right: 24px;
}

body.main-nav-compact.pricing-active #pricingScreen .pricing-panel {
  width: 100%;
  max-width: none;
}

.pricing-xml-panel {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: calc(100vh - 104px);
  height: auto;
  padding: 14px;
}

.pricing-xml-meta {
  display: grid;
  grid-template-columns: 160px minmax(260px, 1fr) 220px;
  gap: 10px;
}

.pricing-xml-meta div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #f8fbfd;
}

.pricing-xml-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.pricing-xml-meta strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-xml-content {
  max-height: 360px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #0f2233;
  color: #e8f3fb;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre;
  scrollbar-color: #8fa4b8 #10283b;
  scrollbar-width: thin;
}

.pricing-xml-content.is-empty {
  display: grid;
  place-items: center;
  background: #f8fbfd;
  color: var(--muted);
  font: 700 13px/1.4 var(--font);
  white-space: normal;
}

.nfe-viewer {
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding-right: 2px;
  scrollbar-color: #8fa4b8 #eef3f7;
  scrollbar-width: thin;
}

.nfe-document {
  display: grid;
  gap: 10px;
}

.nfe-section {
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.nfe-section h3 {
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid #d7e2ec;
  background: #f4f8fb;
  color: #52677d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.nfe-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-color: #b7d7ec;
  background: linear-gradient(135deg, #f7fbfe 0%, #eaf5fb 100%);
}

.nfe-hero h2 {
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.nfe-hero p {
  margin: 0;
  color: #52677d;
  font-size: 11px;
  word-break: break-all;
}

.nfe-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0b2a44;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.nfe-stamp {
  display: grid;
  min-width: 112px;
  padding: 9px 12px;
  border: 1px solid #b7d7ec;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.nfe-stamp span {
  color: #52677d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.nfe-stamp strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.nfe-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.nfe-fields.single {
  grid-template-columns: 1fr;
}

.nfe-field {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #dce7ef;
  border-radius: 7px;
  background: #fbfdff;
}

.nfe-field span {
  display: block;
  margin-bottom: 3px;
  color: #60748a;
  font-size: 10px;
  font-weight: 750;
}

.nfe-field strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
}

.nfe-field.total {
  border-color: #9ed0ea;
  background: #eef8fd;
}

.nfe-field.total strong {
  font-size: 15px;
}

.nfe-party-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nfe-products-shell {
  overflow: auto;
}

.nfe-products-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 11px;
}

.nfe-products-table th,
.nfe-products-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #dce7ef;
  color: var(--ink);
  vertical-align: top;
}

.nfe-products-table th {
  background: #f8fbfd;
  color: #52677d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.nfe-products-table td > strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.nfe-products-table td > span {
  color: #60748a;
  font-size: 10px;
}

.nfe-tax-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.nfe-tax-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid #cfe0ee;
  border-radius: 999px;
  background: #f6fbff;
  color: #52677d;
  font-size: 10px;
}

.nfe-tax-badge strong {
  color: #0b2a44;
  font-weight: 900;
}

.nfe-total-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.nfe-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed #cfe0ee;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.nfe-xml-raw {
  min-height: 0;
}

.nfe-xml-raw summary {
  cursor: pointer;
  padding: 9px 11px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.nfe-xml-raw[open] summary {
  margin-bottom: 8px;
}

.pricing-header {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
}

body.pricing-active .pricing-header {
  min-width: 0;
  margin-bottom: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(203, 216, 228, 0.78);
}

.pricing-margin-rule-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 5px;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #f8fbfd;
}

.pricing-margin-rule-label {
  padding: 0 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.pricing-margin-limit-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  min-width: 164px;
  padding: 0 10px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #ffffff;
  color: #52677d;
  font-size: 11px;
  font-weight: 750;
}

.pricing-margin-limit-field input {
  width: 74px;
  min-width: 74px;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  text-align: right;
}

.pricing-margin-rule-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-left: 8px;
  border-left: 1px solid #d7e2ec;
}

.pricing-margin-rule-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.pricing-margin-rule-list span:first-child {
  color: #14532d;
}

.pricing-margin-rule-list span:nth-child(2) {
  color: #075985;
}

.pricing-margin-rule-list span:last-child {
  color: #92400e;
}

.pricing-tools {
  display: grid;
  grid-template-columns: 126px 126px minmax(220px, 1fr) 132px 132px 120px 92px;
  align-items: end;
  gap: 8px;
  width: 100%;
}

body.pricing-active .pricing-tools {
  grid-template-columns: 126px 126px minmax(260px, 1fr) 132px 132px 120px 92px;
  gap: 8px;
  min-width: 0;
}

.pricing-tools .compact-date {
  width: 126px;
}

.pricing-tools .search-box:not(.compact-date) {
  min-width: 0;
  width: 100%;
}

body.pricing-active .pricing-tools .search-box {
  min-width: 0;
}

.pricing-reviewed-filter {
  width: 132px;
}

.pricing-reviewed-filter select,
.pricing-applied-filter select {
  width: 100%;
}

.pricing-applied-filter {
  width: 132px;
}

body.pricing-active .pricing-tools .search-box span {
  font-size: 12px;
}

body.pricing-active .pricing-tools .search-box input,
body.pricing-active .pricing-tools .search-box select {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
}

body.pricing-active #refreshPricingButton {
  width: auto;
  min-width: 120px;
  min-height: 40px;
  padding: 8px 12px;
}

body.pricing-active .pricing-tools .export-actions {
  flex-wrap: nowrap;
  min-width: 92px;
  gap: 8px;
}

body.pricing-active .pricing-tools .export-actions .icon-button {
  min-width: 42px;
  min-height: 40px;
  padding: 8px;
}

.pricing-table-shell {
  max-height: none;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: none;
  scrollbar-gutter: stable both-edges;
  scrollbar-color: #8fa4b8 #eef3f7;
  scrollbar-width: thin;
}

.pricing-table-shell::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.pricing-table-shell::-webkit-scrollbar-track {
  background: #eef3f7;
  border-left: 1px solid #d9e3ec;
}

.pricing-table-shell::-webkit-scrollbar-thumb {
  border: 4px solid #eef3f7;
  border-radius: 999px;
  background: #8fa4b8;
}

.pricing-table-shell::-webkit-scrollbar-thumb:hover {
  background: #71889d;
}

body.pricing-active .pricing-table-shell {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
}

body.pricing-active.pricing-results-loaded .pricing-table-shell {
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
}

body.pricing-active:not(.pricing-results-loaded) .pricing-table-shell {
  max-height: 180px;
}

body.pricing-active .pricing-table-shell thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.pricing-table-shell table {
  table-layout: fixed;
  min-width: 1180px;
}

.pricing-data-row {
  outline: none;
}

.pricing-data-row:hover td {
  background: #d9ecff;
  box-shadow: inset 0 1px 0 #b7d7f0, inset 0 -1px 0 #b7d7f0;
}

.pricing-data-row.is-reviewed td {
  background: #f0fdf4;
}

.pricing-data-row.is-reviewed td:first-child {
  box-shadow: inset 4px 0 0 #16a34a;
}

.pricing-reviewed-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 8px;
  padding: 0 7px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  font-family: inherit;
  white-space: nowrap;
}

.pricing-reviewed-badge:hover {
  border-color: #22c55e;
  background: #bbf7d0;
}

.pricing-reviewed-badge:disabled {
  cursor: wait;
  opacity: 0.72;
}

.pricing-applied-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 8px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.pricing-applied-badge.is-applied {
  border: 1px solid #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.pricing-applied-badge.is-pending {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.pricing-data-row:hover td:first-child {
  box-shadow: inset 4px 0 0 #0ea5e9, inset 0 1px 0 #b7d7f0, inset 0 -1px 0 #b7d7f0;
}

.pricing-data-row:focus,
.pricing-data-row:focus-within {
  box-shadow: inset 4px 0 0 #22d3ee;
}

.pricing-data-row:focus td,
.pricing-data-row:focus-within td {
  background: #cfe9ff;
  box-shadow: inset 0 1px 0 #8fc5ea, inset 0 -1px 0 #8fc5ea;
}

.pricing-data-row:focus td:first-child,
.pricing-data-row:focus-within td:first-child {
  box-shadow: inset 4px 0 0 #0284c7, inset 0 1px 0 #8fc5ea, inset 0 -1px 0 #8fc5ea;
}

.pricing-margin-chart-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(420px, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #ffffff;
}

.pricing-margin-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pricing-margin-chart-head h3 {
  color: var(--ink);
  font-size: 12px;
  margin: 0 0 1px;
}

.pricing-margin-chart-head p {
  color: var(--muted);
  font-size: 9px;
  margin: 0;
}

.pricing-margin-chart-head > span {
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #cfe0ee;
  border-radius: 999px;
  background: #f5f9fd;
  color: #17324d;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.pricing-margin-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pricing-margin-chart-row {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

.pricing-margin-chart-row strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.pricing-margin-chart-row span {
  color: var(--muted);
  font-size: 10px;
}

.pricing-margin-chart-row em {
  color: #17324d;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.pricing-margin-chart-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff5;
}

.pricing-margin-chart-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.pricing-margin-chart-great .pricing-margin-chart-bar i {
  background: #16a34a;
}

.pricing-margin-chart-good .pricing-margin-chart-bar i {
  background: #0284c7;
}

.pricing-margin-chart-average .pricing-margin-chart-bar i {
  background: #d97706;
}

.pricing-col-date {
  width: 86px;
}

.pricing-col-nf {
  width: 72px;
}

.pricing-col-supplier {
  width: 240px;
}

.pricing-col-product {
  width: 420px;
}

.pricing-col-qty {
  width: 64px;
}

.pricing-col-unit {
  width: 88px;
}

.pricing-col-net {
  width: 104px;
}

.pricing-col-cfop {
  width: 70px;
}

.pricing-col-cst {
  width: 64px;
}

.pricing-col-tax {
  width: 112px;
}

.pricing-col-action {
  width: 94px;
}

.pricing-table-shell .icon-button {
  min-height: 28px;
  padding-inline: 8px;
  font-size: 11px;
}

.pricing-table-shell .pricing-apply-button {
  min-width: 72px;
  border-color: #0ea5e9;
  background: #eff8ff;
  color: #075985;
  font-weight: 850;
}

.pricing-tax-info-row td {
  padding: 9px 12px 11px;
  background: #f7fafc;
  border-bottom-color: #dbe6ef;
}

.pricing-tax-calculation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding-left: clamp(80px, 8vw, 140px);
  color: #52677d;
  font-size: 11px;
}

.pricing-tax-calculation .pricing-line-content span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #d8e4ee;
  border-radius: 999px;
  background: #ffffff;
  white-space: nowrap;
}

.pricing-tax-calculation strong {
  color: #17324d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.pricing-tax-base {
  background: #f1f6fb !important;
}

.pricing-tax-total {
  border-color: #b9d3e8 !important;
  background: #eaf4fb !important;
  color: #17324d;
  font-weight: 800;
}

.pricing-tax-net {
  border-color: #b9dfc9 !important;
  background: #eefaf2 !important;
  color: #14532d;
  font-weight: 850;
}

.pricing-section-caption {
  margin: 2px 0 2px clamp(74px, calc(2vw + 74px), 94px);
  color: #53677d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pricing-info-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding-left: clamp(12px, 2vw, 32px);
}

.pricing-line-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #c7ddeb;
  border-radius: 999px;
  background: #f2f8fc;
  color: #17324d;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: none;
}

.pricing-line-content {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pricing-price-row {
  align-items: center;
}

.pricing-new-price-tax-row {
  color: #52677d;
  font-size: 11px;
}

.pricing-new-price-tax-row .pricing-line-content span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #d8e4ee;
  border-radius: 999px;
  background: #ffffff;
  white-space: nowrap;
}

.pricing-new-price-tax-row strong {
  color: #17324d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.pricing-new-price-tax-row em {
  color: #17324d;
  font-style: normal;
  font-weight: 750;
}

.pricing-new-price-tax-row .pricing-tax-result {
  border-color: #b9dfc9;
  background: #eefaf2;
}

.pricing-new-price-tax-row .pricing-tax-result strong,
.pricing-new-price-tax-row .pricing-tax-result em {
  color: #14532d;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-great {
  border-color: #86efac;
  background: #ecfdf3;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-great strong,
.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-great em {
  color: #166534;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-good {
  border-color: #7dd3fc;
  background: #eff8ff;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-good strong,
.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-good em {
  color: #075985;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-average {
  border-color: #fdba74;
  background: #fff7ed;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-average strong,
.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-average em {
  color: #9a3412;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-low {
  border-color: #fecaca;
  background: #fff1f2;
}

.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-low strong,
.pricing-new-price-tax-row .pricing-tax-margin.pricing-margin-low em {
  color: #b91c1c;
}

.pricing-price-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  background: #ffffff;
}

.pricing-tax-edit-field {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 7px 0 9px;
  border: 1px solid #b9d3e8;
  border-radius: 999px;
  background: #f7fbff;
  color: #52677d;
}

.pricing-tax-edit-field strong {
  color: #17324d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.pricing-tax-edit-field input {
  width: 72px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #17324d;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.pricing-price-field strong {
  color: #17324d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-price-field input {
  width: 96px;
  min-height: 26px;
  border: 1px solid #d7e2ec;
  border-radius: 7px;
  background: #f7fafc;
  color: #17324d;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.pricing-price-field.editable {
  border-color: #b9d3e8;
  background: #f7fbff;
}

.pricing-price-field.editable input {
  background: #ffffff;
}

.pricing-label-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #b9d3e8;
  border-radius: 8px;
  background: #f7fbff;
  color: #17324d;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.pricing-label-check input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  accent-color: #12a8d1;
}

.pricing-save-price-button {
  min-height: 34px;
  padding-inline: 14px;
  border-color: #86efac;
  background: #ecfdf3;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
}

.pricing-save-price-button.is-saved {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.pricing-table-shell table.pricing-group-date .pricing-col-date {
  width: 28px;
}

.pricing-table-shell table.pricing-group-nf .pricing-col-nf {
  width: 28px;
}

.pricing-table-shell table.pricing-group-supplier .pricing-col-supplier {
  width: 32px;
}

.pricing-table-shell table.pricing-group-product .pricing-col-product {
  width: 34px;
}

.pricing-table-shell table.pricing-group-cfop .pricing-col-cfop {
  width: 32px;
}

.pricing-table-shell table.pricing-group-cst .pricing-col-cst {
  width: 30px;
}

.pricing-table-shell table.pricing-group-date.pricing-group-nf.pricing-group-supplier .pricing-col-product {
  width: 520px;
}

.pricing-table-shell table.pricing-group-date.pricing-group-nf.pricing-group-supplier {
  min-width: 1010px;
}

.pricing-table-shell th:nth-child(5),
.pricing-table-shell td:nth-child(5),
.pricing-table-shell th:nth-child(6),
.pricing-table-shell td:nth-child(6),
.pricing-table-shell th:nth-child(7),
.pricing-table-shell td:nth-child(7),
.pricing-table-shell th:nth-child(n + 10):nth-child(-n + 12),
.pricing-table-shell td:nth-child(n + 10):nth-child(-n + 12) {
  white-space: nowrap;
}

.pricing-table-shell th:nth-child(n + 10):nth-child(-n + 12),
.pricing-table-shell td:nth-child(n + 10):nth-child(-n + 12),
.pricing-table-shell tfoot td:nth-child(n + 10):nth-child(-n + 12) {
  padding-inline: 8px;
  text-align: right;
}

.pricing-table-shell th:nth-child(5),
.pricing-table-shell td:nth-child(5),
.pricing-table-shell th:nth-child(6),
.pricing-table-shell td:nth-child(6),
.pricing-table-shell th:nth-child(7),
.pricing-table-shell td:nth-child(7) {
  padding-inline: 8px;
  text-align: right;
}

.pricing-table-shell th:nth-child(8),
.pricing-table-shell td:nth-child(8),
.pricing-table-shell th:nth-child(9),
.pricing-table-shell td:nth-child(9) {
  text-align: center;
}

.pricing-table-shell td:nth-child(3),
.pricing-table-shell td:nth-child(4) {
  overflow-wrap: anywhere;
}

.pricing-table-shell table.pricing-group-date td:nth-child(1),
.pricing-table-shell table.pricing-group-nf td:nth-child(2),
.pricing-table-shell table.pricing-group-supplier td:nth-child(3),
.pricing-table-shell table.pricing-group-product td:nth-child(4),
.pricing-table-shell table.pricing-group-cfop td:nth-child(8),
.pricing-table-shell table.pricing-group-cst td:nth-child(9) {
  padding-inline: 2px;
}

.pricing-table-shell table.pricing-group-date th:nth-child(1),
.pricing-table-shell table.pricing-group-nf th:nth-child(2),
.pricing-table-shell table.pricing-group-supplier th:nth-child(3),
.pricing-table-shell table.pricing-group-product th:nth-child(4),
.pricing-table-shell table.pricing-group-cfop th:nth-child(8),
.pricing-table-shell table.pricing-group-cst th:nth-child(9) {
  padding-inline: 4px;
  text-align: center;
}

.pricing-table-shell table.pricing-group-date th:nth-child(1) .pricing-column-group,
.pricing-table-shell table.pricing-group-nf th:nth-child(2) .pricing-column-group,
.pricing-table-shell table.pricing-group-supplier th:nth-child(3) .pricing-column-group,
.pricing-table-shell table.pricing-group-product th:nth-child(4) .pricing-column-group,
.pricing-table-shell table.pricing-group-cfop th:nth-child(8) .pricing-column-group,
.pricing-table-shell table.pricing-group-cst th:nth-child(9) .pricing-column-group {
  justify-content: center;
  gap: 0;
  width: 100%;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.pricing-table-shell table.pricing-group-date th:nth-child(1) .pricing-column-group input,
.pricing-table-shell table.pricing-group-nf th:nth-child(2) .pricing-column-group input,
.pricing-table-shell table.pricing-group-supplier th:nth-child(3) .pricing-column-group input,
.pricing-table-shell table.pricing-group-product th:nth-child(4) .pricing-column-group input,
.pricing-table-shell table.pricing-group-cfop th:nth-child(8) .pricing-column-group input,
.pricing-table-shell table.pricing-group-cst th:nth-child(9) .pricing-column-group input {
  flex: 0 0 auto;
}

.pricing-table-shell tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

@media (max-width: 1280px) {
  body.pricing-active .pricing-tools {
    grid-template-columns: 126px 126px minmax(220px, 1fr) 132px 132px 120px 92px;
  }
}

@media (max-width: 980px) {
  body.pricing-active .pricing-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.pricing-active .pricing-tools .search-box:nth-child(3) {
    grid-column: 1 / -1;
  }

  body.pricing-active .pricing-tools .export-actions {
    justify-content: flex-start;
  }
}

.products-table-shell td:nth-child(3) {
  min-width: 260px;
}

.product-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.product-cst-chart-card {
  margin-top: 0;
}

.product-cst-chart {
  min-height: 180px;
}

.sales-table-shell td:nth-child(5) {
  min-width: 360px;
}

.sales-table-shell th:nth-child(1),
.sales-table-shell td:nth-child(1) {
  width: 28px;
}

.sales-table-shell th:nth-child(2),
.sales-table-shell td:nth-child(2) {
  width: 72px;
}

.sales-table-shell th:nth-child(3),
.sales-table-shell td:nth-child(3) {
  width: 116px;
}

.sales-table-shell th:nth-child(4),
.sales-table-shell td:nth-child(4) {
  width: 110px;
}

.sales-table-shell th:nth-child(5),
.sales-table-shell td:nth-child(5) {
  width: 360px;
}

.sales-table-shell th:nth-child(6),
.sales-table-shell td:nth-child(6) {
  width: 58px;
}

.sales-table-shell th:nth-child(n + 7):nth-child(-n + 18),
.sales-table-shell td:nth-child(n + 7):nth-child(-n + 18) {
  width: 76px;
}

.sales-table-shell th:nth-child(11),
.sales-table-shell td:nth-child(11) {
  width: 48px;
  text-align: center;
}

.sales-table-shell th:nth-child(n + 19),
.sales-table-shell td:nth-child(n + 19) {
  width: 104px;
}

.sales-grid-tools .compact-date {
  width: 138px;
}

.sales-grid-tools .search-box:not(.compact-date) {
  min-width: 260px;
  width: 100%;
}

.sales-grid-tools {
  display: grid;
  grid-template-columns: 138px 138px 210px minmax(260px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  width: 100%;
}

.sales-model-field {
  align-self: flex-start;
  display: grid;
  gap: 4px;
  margin-top: -2px;
}

.sales-model-field > span {
  color: var(--muted);
  font-size: 11px;
}

.sales-model-tabs {
  grid-template-columns: repeat(3, 1fr);
  min-height: 30px;
  min-width: 210px;
  width: 210px;
}

.sales-model-tabs .segment {
  font-size: 11px;
  min-height: 30px;
  padding: 0 8px;
  white-space: nowrap;
}

.search-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -4px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-action-button {
  min-width: 124px;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.sales-chart-toolbar {
  display: flex;
  justify-content: flex-end;
  max-width: 100%;
  margin-top: 14px;
}

.chart-limit-field {
  display: grid;
  gap: 5px;
  width: 112px;
  max-width: 100%;
}

.chart-limit-field span {
  color: var(--muted);
  font-size: 11px;
}

.chart-limit-field input {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfdbe6;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px;
}

.sales-profit-chart-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.sales-profit-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.sales-profit-chart-head h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 14px;
}

.sales-profit-chart-head p,
.sales-profit-chart-head span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.sales-profit-chart-head span {
  padding: 5px 9px;
  border: 1px solid #c7d8e8;
  border-radius: 999px;
  background: #eef6fb;
  color: #315a78;
  font-weight: 700;
  white-space: nowrap;
}

.sales-profit-chart {
  display: grid;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.sales-profit-chart::-webkit-scrollbar {
  width: 10px;
}

.sales-profit-chart::-webkit-scrollbar-track {
  background: #edf3f7;
  border-radius: 999px;
}

.sales-profit-chart::-webkit-scrollbar-thumb {
  background: #8ea0af;
  border: 2px solid #edf3f7;
  border-radius: 999px;
}

.sales-profit-chart::-webkit-scrollbar-thumb:hover {
  background: #667789;
}

.sales-profit-bar-row {
  display: grid;
  grid-template-columns: 28px minmax(220px, 1.1fr) minmax(180px, 1.6fr) 74px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.chart-rank {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #10263a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.chart-product {
  min-width: 0;
}

.chart-product strong,
.chart-product small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-product strong {
  color: var(--ink);
  font-size: 12px;
}

.chart-product small {
  color: var(--muted);
  font-size: 10px;
}

.chart-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebf2;
}

.chart-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f9f8f, #2563eb);
}

.chart-percent {
  color: #10263a;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.chart-empty {
  padding: 14px;
  border: 1px dashed #c7d8e8;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.column-filter {
  display: grid;
  gap: 5px;
}

.column-filter span,
.sortable-column,
.sales-sortable-column {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.sortable-column,
.sales-sortable-column {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  gap: 4px;
  padding: 0;
  text-align: left;
}

.sortable-column::after,
.sales-sortable-column::after {
  color: #8ca0b3;
  content: "↕";
  font-size: 10px;
}

.sortable-column.active,
.sales-sortable-column.active {
  color: #0b1f35;
}

.sortable-column.active[data-direction="asc"]::after,
.sales-sortable-column.active[data-direction="asc"]::after {
  content: "↑";
}

.sortable-column.active[data-direction="desc"]::after,
.sales-sortable-column.active[data-direction="desc"]::after {
  content: "↓";
}

.product-column-filter,
.sales-column-filter {
  width: 100%;
  min-height: 26px;
  border: 1px solid #cfdbe6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 6px;
  text-transform: none;
}

.product-column-filter:focus,
.sales-column-filter:focus {
  border-color: rgba(47, 210, 255, 0.78);
  outline: 2px solid rgba(47, 210, 255, 0.18);
}

.submenu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.submenu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(47, 210, 255, 0.28);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
  cursor: pointer;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.submenu-button span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: #102c45;
  color: #2fd2ff;
  font-size: 0;
  font-weight: 900;
}

.submenu-button span::before {
  font-size: 10px;
}

.submenu-button:nth-child(1) span::before {
  content: "P";
}

.submenu-button:nth-child(2) span::before {
  content: "E";
}

.submenu-button:nth-child(3) span::before {
  content: "V";
}

.submenu-button:hover {
  border-color: rgba(47, 210, 255, 0.62);
  background: #edf8fc;
  box-shadow: inset 3px 0 0 #2fd2ff;
}

.purchase-suggestion-screen {
  min-height: 100vh;
}

.purchase-suggestion-panel {
  display: grid;
  gap: 10px;
}

.purchase-suggestion-toolbar h2 {
  font-size: 15px;
}

.purchase-suggestion-toolbar p {
  font-size: 12px;
}

.purchase-suggestion-toolbar {
  display: grid;
  grid-template-columns: 118px minmax(700px, 1fr);
  align-items: start;
  gap: 10px;
}

.purchase-suggestion-filters {
  display: grid;
  grid-template-columns: 136px 136px minmax(190px, 0.85fr) 160px 112px 112px 104px 46px;
  align-items: flex-end;
  gap: 8px;
}

.purchase-suggestion-filters .search-box {
  min-width: 0;
}

.purchase-suggestion-filters .purchase-product-search {
  min-width: 0;
}

.purchase-suggestion-filters .purchase-brand-search {
  min-width: 0;
}

.purchase-suggestion-filters .compact-number {
  min-width: 0;
}

.purchase-suggestion-filters .compact-date {
  min-width: 0;
}

.purchase-suggestion-filters .purchase-filter-option:nth-of-type(6) {
  grid-column: 6 / 7;
  grid-row: 1;
}

.purchase-suggestion-filters .purchase-filter-option:nth-of-type(5) {
  grid-column: 5 / 6;
  grid-row: 1;
}

.purchase-suggestion-filters #refreshPurchaseSuggestionButton {
  grid-column: 7 / 8;
  grid-row: 1;
}

.purchase-suggestion-filters #exportPurchaseSuggestionExcelButton {
  grid-column: 8 / 9;
  grid-row: 1;
}

.purchase-suggestion-filters .purchase-filter-option span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.purchase-suggestion-filters .purchase-filter-option small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #50657c;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.purchase-suggestion-filters .purchase-filter-option small input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.purchase-suggestion-filters input {
  height: 40px;
  font-size: 13px;
}

.purchase-suggestion-filters .icon-button {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
}

.purchase-suggestion-filters #exportPurchaseSuggestionExcelButton {
  width: 46px;
  padding: 0;
}

.purchase-suggestion-filters #exportPurchaseSuggestionExcelButton .file-icon {
  position: relative;
  display: inline-grid;
  width: 22px;
  height: 26px;
  place-items: end center;
  border-radius: 5px;
  background: #17803d;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  padding-bottom: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.purchase-suggestion-filters #exportPurchaseSuggestionExcelButton .file-icon::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent rgba(255, 255, 255, 0.72) transparent transparent;
}

.purchase-suggestion-grid-wrap {
  max-height: calc(100vh - 230px);
  min-height: 380px;
  overflow: auto;
  border: 1px solid #cfdde9;
  border-radius: 8px;
  background: #ffffff;
}

.purchase-suggestion-grid {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 12px;
}

.purchase-suggestion-grid thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 8px;
  background: #15a8c3;
  color: #ffffff;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.purchase-sort-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.purchase-sort-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.purchase-suggestion-grid th:nth-child(n+4),
.purchase-suggestion-grid td:nth-child(n+4) {
  text-align: right;
}

.purchase-suggestion-grid th:nth-child(2),
.purchase-suggestion-grid td:nth-child(2) {
  width: 360px;
  max-width: 360px;
}

.purchase-description-cell {
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-suggestion-grid tbody td {
  padding: 7px 8px;
  border-bottom: 1px solid #d8e5ee;
  color: #0e2237;
  white-space: nowrap;
}

.purchase-suggestion-grid tbody tr:nth-child(even) td {
  background: #f4fbf8;
}

.purchase-suggestion-grid tbody tr.is-selected td {
  background: #0987cf;
  color: #ffffff;
}

.purchase-suggestion-grid tbody tr:hover td {
  background: #dff3fb;
  color: #0e2237;
}

.purchase-last-buys-row td {
  padding: 6px 8px 8px;
  background: #f8fbfd;
}

.purchase-last-buys {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: start;
  gap: 6px 10px;
  color: #50657c;
  font-size: 11px;
}

.purchase-last-buys-title {
  flex: 0 0 auto;
  color: #0e2237;
  font-weight: 900;
  grid-row: 1 / span 3;
  padding-top: 4px;
}

.purchase-last-buy {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 82px 88px 70px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 620px;
  padding: 3px 8px;
  border: 1px solid #cfe2f3;
  border-radius: 6px;
  background: #ffffff;
}

.purchase-last-buy b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0e2237;
  font-weight: 400;
}

.purchase-last-buy em {
  flex: 0 0 auto;
  color: #5f7187;
  font-style: normal;
}

.purchase-last-buy strong {
  flex: 0 0 auto;
  color: #0b6f9e;
  font-weight: 900;
}

.purchase-last-buy.is-empty {
  max-width: none;
  color: #6b7d91;
  display: inline-flex;
  width: fit-content;
}

.purchase-stock-cost-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfdde9;
  border-radius: 8px;
  background: #ffffff;
}

.purchase-stock-cost-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.purchase-stock-cost-head h3 {
  margin: 0;
  color: #102234;
  font-size: 15px;
  font-weight: 900;
}

.purchase-stock-cost-head p {
  margin: 3px 0 0;
  color: #60748a;
  font-size: 12px;
}

.purchase-stock-cost-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.purchase-stock-cost-controls label {
  display: grid;
  gap: 4px;
  color: #60748a;
  font-size: 10px;
  font-weight: 850;
}

.purchase-stock-cost-controls input {
  width: 74px;
  height: 30px;
  border: 1px solid #cfdde9;
  border-radius: 8px;
  background: #ffffff;
  color: #102234;
  font-size: 12px;
  font-weight: 850;
  padding: 0 8px;
}

.purchase-stock-cost-controls strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #b9d2e8;
  border-radius: 999px;
  background: #eef8fd;
  color: #0b4268;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-stock-cost-chart {
  display: grid;
  gap: 8px;
}

.purchase-stock-cost-row {
  display: grid;
  grid-template-columns: 30px minmax(230px, 1.1fr) minmax(220px, 1fr) 108px;
  align-items: center;
  gap: 10px;
}

.purchase-stock-cost-product {
  min-width: 0;
}

.purchase-stock-cost-product strong {
  display: block;
  overflow: hidden;
  color: #102234;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-stock-cost-product small {
  display: block;
  margin-top: 2px;
  color: #60748a;
  font-size: 11px;
}

.purchase-stock-cost-row .chart-track span {
  background: linear-gradient(90deg, #15a8c3, #2563eb);
}

.purchase-stock-cost-value {
  color: #102234;
  font-size: 12px;
  text-align: right;
}

.purchase-cart-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #b9d2e8;
  border-radius: 7px;
  background: #ffffff;
  color: #0e2237;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.purchase-cart-button:hover {
  border-color: #15a8c3;
  color: #0b6f9e;
  box-shadow: 0 6px 14px rgba(21, 168, 195, 0.16);
}

.purchase-cart-button.is-added {
  border-color: #8fd7b2;
  background: #eafbf2;
  color: #087243;
}

.purchase-cart-button.is-added:hover {
  border-color: #4fbd85;
  background: #dff7eb;
  color: #075f39;
}

#purchaseCartDialog {
  width: min(1280px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow: hidden;
}

.purchase-cart-dialog {
  width: 100%;
  box-sizing: border-box;
  max-height: none;
  overflow: hidden;
}

.purchase-cart-dialog .dialog-head {
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e3edf5;
}

.purchase-cart-dialog .dialog-head > div {
  min-width: 0;
  flex: 1;
}

.purchase-cart-dialog .dialog-head h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.15;
}

.purchase-cart-dialog .dialog-head p {
  max-width: 820px;
  overflow: hidden;
  color: #667891;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-cart-routine {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b9d2e8;
  border-radius: 9px;
  background: #f5fbff;
  color: #5f7187;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.purchase-cart-routine strong {
  color: #0e2237;
  font-size: 13px;
}

.purchase-cart-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px 12px;
  max-height: none;
  overflow: hidden;
  padding: 16px 2px 4px;
}

.purchase-cart-item-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
}

.purchase-cart-item-info span {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
  color: #0e2237;
  font-size: 12px;
  font-weight: 800;
}

.purchase-cart-item-info b {
  display: block;
  margin-bottom: 4px;
  color: #5f7187;
  font-size: 10px;
  text-transform: uppercase;
}

.purchase-cart-quantity {
  max-width: none;
}

.purchase-cart-dialog .purchase-cart-quantity input {
  min-height: 42px;
  font-weight: 850;
}

.purchase-cart-dialog .message-box {
  margin: 0;
}

.purchase-cart-dialog .message-box textarea {
  min-height: 74px;
  resize: vertical;
}

.purchase-cart-list-title {
  grid-column: 1 / -1;
  color: #102234;
  font-size: 13px;
  font-weight: 900;
}

.purchase-cart-list {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.purchase-cart-empty {
  padding: 10px;
  border: 1px dashed #cfe2f3;
  border-radius: 8px;
  color: #6b7d91;
  font-size: 12px;
}

.purchase-cart-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px 32px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  background: #ffffff;
}

.purchase-cart-list-item span {
  min-width: 0;
  overflow: hidden;
  color: #0e2237;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-cart-list-item span b {
  margin-right: 6px;
}

.purchase-cart-list-item small {
  display: block;
  color: #6b7d91;
}

.purchase-cart-list-item strong {
  color: #0e2237;
  font-size: 12px;
  text-align: right;
}

.purchase-cart-list-item button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: #edf6fb;
  color: #0e2237;
  cursor: pointer;
}

.purchase-cart-list-item button:hover {
  background: #dff3fb;
}

.purchase-cart-dialog .dialog-actions {
  padding-top: 14px;
  border-top: 1px solid #e3edf5;
}

.purchase-cart-clear-button {
  margin-right: auto;
  border-color: #f0c9c9;
  background: #fff7f7;
  color: #8a1f1f;
}

.purchase-cart-clear-button:hover {
  border-color: #e89b9b;
  background: #fff0f0;
}

.purchase-cart-whatsapp-button {
  border-color: #18a957;
  background: #18a957;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 169, 87, 0.18);
}

.purchase-cart-whatsapp-button:hover {
  border-color: #128746;
  background: #128746;
}

@media (max-width: 720px) {
  .purchase-cart-body,
  .purchase-cart-item-info {
    grid-template-columns: 1fr;
  }

  .purchase-cart-dialog .dialog-head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .purchase-cart-routine {
    order: 2;
  }
}

@media (max-height: 760px) {
  .purchase-cart-dialog {
    max-height: calc(100vh - 32px);
    overflow: hidden;
  }

  .purchase-cart-body {
    max-height: calc(100vh - 225px);
    overflow: auto;
  }

  .purchase-cart-list {
    max-height: 170px;
  }
}

@media (max-width: 980px) {
  #stockReportScreen .tool-screen-head,
  .stock-report-head {
    align-items: stretch;
    flex-direction: column;
  }

  .purchase-stock-cost-row {
    grid-template-columns: 28px minmax(0, 1fr) 92px;
  }

  .purchase-stock-cost-row .chart-track {
    grid-column: 2 / -1;
  }

  .purchase-stock-cost-head,
  .purchase-stock-cost-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .stock-filter-grid,
  .stock-summary-grid {
    grid-template-columns: 1fr;
  }

  .stock-report-head .icon-button {
    width: fit-content;
  }
}

@media (max-width: 680px) {
  body.landing-active .landing-screen {
    grid-template-columns: 1fr;
  }

  .landing-brand {
    width: 100%;
  }

  .landing-button {
    width: 100%;
  }

  .landing-info {
    width: auto;
    margin: 18px;
  }

  .company-select-box {
    width: 100%;
  }

  .company-picker {
    grid-template-columns: 1fr;
  }

  .company-picker select {
    min-width: 0;
    width: 100%;
  }

  .landing-kpi-grid,
  .landing-chart-grid {
    grid-template-columns: 1fr;
  }

  .landing-flow-card {
    grid-column: auto;
  }

  .landing-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .submenu-grid {
    grid-template-columns: 1fr;
  }

  body.report-stock-active #stockReportScreen {
    padding: 18px;
  }

  #stockReportScreen .back-button,
  .stock-report-head .icon-button {
    width: 100%;
  }

  .report-grid-head,
  .report-grid-tools {
    align-items: stretch;
    flex-direction: column;
  }

  #productsReportScreen .report-grid-head {
    grid-template-columns: 1fr;
  }

  #productsReportScreen .report-grid-tools {
    justify-content: stretch;
  }

  .report-grid-tools .search-box {
    width: 100%;
  }

  .products-option-row {
    flex-wrap: wrap;
    width: 100%;
  }

  .idle-products-check {
    min-width: 0;
    width: 100%;
  }

  .sales-grid-tools {
    grid-template-columns: 1fr;
  }

  .sales-grid-tools .compact-date,
  .sales-model-tabs {
    width: 100%;
  }

  .products-table-shell,
  .sales-table-shell {
    max-height: calc(100vh - 360px);
  }

  .product-chart-grid {
    grid-template-columns: 1fr;
  }

  .abc-summary-grid {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(11, 30, 49, 0.96), rgba(18, 35, 53, 1)),
    #182333;
  color: #f8fafc;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 22px 18px 20px;
  border: 1px solid rgba(87, 198, 232, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 24%, rgba(0, 163, 218, 0.26), transparent 48%),
    linear-gradient(180deg, rgba(19, 58, 78, 0.88), rgba(15, 32, 50, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 30px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.brand::before {
  content: "";
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: #2fd2ff;
  box-shadow: 0 0 16px rgba(47, 210, 255, 0.58);
}

.brand-logo {
  width: 170px;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.32));
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand span {
  color: #c6d6e5;
  font-size: 12px;
  margin-top: 3px;
}

.nav-list {
  display: grid;
  gap: 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d6e3ef;
  cursor: pointer;
  padding: 0 16px;
  font-size: 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(48, 68, 91, 0.86);
  color: #ffffff;
  box-shadow: inset 3px 0 0 #2fd2ff;
}

.home-return {
  margin-bottom: 6px;
  border: 1px solid rgba(47, 210, 255, 0.32);
  background: rgba(16, 44, 69, 0.62);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar,
.section-head,
.panel-title,
.toolbar,
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.routine-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  flex: 0 0 auto;
  white-space: nowrap;
}

.routine-badge strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.landing-screen > .routine-badge {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 4;
  border-color: rgba(47, 210, 255, 0.32);
  background: rgba(13, 35, 54, 0.86);
  color: #9fc3d8;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.landing-screen > .routine-badge strong {
  color: #ffffff;
}

body.purchases-active .landing-screen > .routine-badge,
body.purchase-suggestion-active .landing-screen > .routine-badge,
body.reports-active .landing-screen > .routine-badge,
body.pricing-active .landing-screen > .routine-badge,
body.pricing-xml-active .landing-screen > .routine-badge,
body.report-products-active .landing-screen > .routine-badge,
body.report-stock-active .landing-screen > .routine-badge,
body.report-sales-active .landing-screen > .routine-badge {
  display: none;
}

h3 {
  font-size: 14px;
}

.topbar p,
.panel-title span,
label span,
.metric span,
.item-note {
  color: var(--muted);
  font-size: 12px;
}

.hidden-status {
  display: none;
}

.company-cnpj {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.toolbar {
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar > .routine-badge {
  margin-left: 2px;
  margin-bottom: 1px;
}

.toolbar label {
  gap: 6px;
}

.toolbar label span {
  line-height: 16px;
}

.toolbar select {
  min-height: 42px;
}

.toolbar #monthFilter {
  width: 148px;
}

.toolbar #yearFilter {
  width: 96px;
}

.toolbar .icon-button {
  min-height: 42px;
  padding: 0 14px;
}

label {
  display: grid;
  gap: 5px;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

textarea {
  resize: vertical;
}

.icon-button,
.icon-only,
.segment {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  font-size: 12px;
  text-decoration: none;
}

.icon-button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.back-button {
  min-width: 196px;
  min-height: 38px;
  gap: 8px;
  justify-content: flex-start;
  border-color: #51d8ff;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1f35;
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
  box-shadow: inset 3px 0 0 #2fd2ff, 0 6px 14px rgba(15, 32, 50, 0.04);
}

.back-button span {
  display: inline-grid;
  width: 27px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: #edf7fe;
  color: #0c6f9b;
  font-size: 0;
  font-weight: 900;
  line-height: 1;
}

.back-button span::before {
  content: "\2190";
  font-size: 13px;
  line-height: 1;
}

.back-button:hover {
  border-color: #2fd2ff;
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #2fd2ff, 0 8px 16px rgba(15, 32, 50, 0.08);
}

.sidebar-back-button {
  min-height: 38px;
  gap: 8px;
  border: 1px solid #51d8ff;
  border-radius: 8px;
  background: #ffffff;
  color: #0b1f35;
  font-size: 12px;
  font-weight: 850;
  padding: 0 12px;
  box-shadow: inset 3px 0 0 #2fd2ff, 0 6px 14px rgba(15, 32, 50, 0.04);
}

.sidebar-back-button span {
  display: inline-grid;
  width: 27px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: #edf7fe;
  color: #0c6f9b;
  font-size: 0;
  font-weight: 900;
}

.sidebar-back-button span::before {
  content: "\2190";
  font-size: 13px;
  line-height: 1;
}

.sidebar-back-button:hover,
.sidebar-back-button.active {
  border-color: #2fd2ff;
  background: #fbfdff;
  color: #0b1f35;
  box-shadow: inset 3px 0 0 #2fd2ff, 0 8px 16px rgba(15, 32, 50, 0.08);
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.icon-only {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.segment {
  border: 0;
  border-radius: 0;
  min-height: 36px;
}

.segment.active {
  background: #223047;
  color: #ffffff;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric,
.panel,
.table-shell,
.inventory-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.metric small {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
}

.metric em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.metric-devedor {
  border-color: #f1b8b8;
  background: #fff7f7;
}

.metric-devedor strong,
.metric-devedor small {
  color: #c02626;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart {
  min-height: 260px;
}

.bar-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 122px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
  font-size: 13px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e7edf3;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-value {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.stack-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 12px;
  font-size: 13px;
  border-radius: 8px;
  background: var(--surface-2);
}

.search-box input {
  width: 100%;
}

.credits-header {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(720px, 1.38fr);
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.credits-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.export-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.export-actions .icon-button {
  min-height: 42px;
  width: 52px;
  padding: 0;
  white-space: nowrap;
}

.export-actions .icon-button span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.export-actions .file-icon {
  position: relative;
  display: inline-grid;
  width: 24px;
  height: 28px;
  place-items: end center;
  border-radius: 4px;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  padding-bottom: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.export-actions .file-icon::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 8px 8px 0;
  border-color: transparent rgba(255, 255, 255, 0.72) transparent transparent;
}

.export-actions .pdf-icon {
  background: #d92d20;
}

.export-actions .excel-icon {
  background: #17803d;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

tbody tr:nth-child(even) {
  background: #f3f7fa;
}

tbody tr:nth-child(odd) {
  background: #ffffff;
}

tbody tr:hover {
  background: #eaf2ff;
}

.sales-grid-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  flex-wrap: wrap;
}

.legend-swatch {
  display: inline-block;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.24);
}

.legend-swatch.low-profit {
  background: #ffe4e6;
  border-left: 4px solid #dc2626;
}

.sales-alert-column,
.sales-alert-cell {
  width: 28px;
  min-width: 28px;
  padding-left: 10px;
  padding-right: 4px;
  text-align: center;
}

.sales-low-profit-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ffe4e6;
  border: 2px solid #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
  vertical-align: middle;
}

.abc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.abc-A {
  background: #dcfce7;
  color: #166534;
}

.abc-B {
  background: #fef3c7;
  color: #92400e;
}

.abc-C {
  background: #e0f2fe;
  color: #075985;
}

.abc-empty {
  background: #edf2f7;
  color: var(--muted);
}

.low-profit-limit-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #cbd8e4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.low-profit-limit-field input {
  width: 58px;
  min-height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  outline: 0;
  text-align: right;
  -moz-appearance: textfield;
}

.low-profit-limit-field input::-webkit-outer-spin-button,
.low-profit-limit-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.low-profit-limit-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.abc-limit-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px;
  border: 1px solid #d7e2ec;
  border-radius: 10px;
  background: #f8fbfd;
}

.abc-limit-label {
  padding: 0 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.abc-limit-field {
  min-width: 98px;
  gap: 8px;
  padding: 0 9px;
}

.abc-limit-field input {
  width: 48px;
  text-align: right;
}

.abc-limit-field > span:first-child {
  width: 13px;
  overflow: hidden;
  font-size: 0;
}

.abc-limit-field > span:first-child::before {
  font-size: 11px;
}

.abc-limit-field:first-of-type > span:first-child::before {
  content: "A";
}

.abc-limit-field:last-of-type > span:first-child::before {
  content: "B";
}

.abc-rule-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid #d7e2ec;
}

.abc-rule-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: #ffffff;
  color: #52677d;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.abc-rule-list span:first-child {
  color: #14532d;
}

.abc-rule-list span:nth-child(2) {
  color: #92400e;
}

.abc-rule-list span:last-child {
  color: #9f1239;
}

.abc-summary-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.abc-summary-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.abc-summary-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.abc-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.abc-summary-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.abc-summary-letter {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 850;
}

.abc-summary-A .abc-summary-letter {
  background: var(--green);
}

.abc-summary-B .abc-summary-letter {
  background: var(--amber);
}

.abc-summary-C .abc-summary-letter {
  background: var(--rose);
}

.abc-summary-item strong,
.abc-summary-item small {
  display: block;
}

.abc-summary-item small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.abc-summary-item dl {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  margin: 0;
}

.abc-summary-item dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.abc-summary-item dt,
.abc-summary-item dd {
  margin: 0;
  font-size: 11px;
}

.abc-summary-item dt {
  color: var(--muted);
}

.abc-summary-item dd {
  color: var(--ink);
  font-weight: 750;
  text-align: right;
}

.abc-summary-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

tbody tr.group-row {
  background: #dceaf5;
}

tbody tr.group-row:hover {
  background: #dceaf5;
}

tbody tr.group-row td {
  border-top: 2px solid #c3d5e5;
  color: #17324d;
  font-weight: 750;
}

tbody tr.group-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

.pricing-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 120px);
  border: 0;
  background: transparent;
  color: #06233f;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 0;
  text-align: left;
}

.pricing-group-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-left: 0;
  border: 1px solid #9fbdd8;
  border-radius: 999px;
  background: #ffffff;
  color: #17324d;
  font-size: 13px;
  font-weight: 900;
}

.pricing-group-toggle:hover {
  color: #0b5d92;
}

tbody tr.group-total-row {
  background: #edf4fa;
}

tbody tr.group-total-row td {
  border-bottom: 2px solid #c3d5e5;
  color: var(--ink);
  font-weight: 800;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.2;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.column-group,
.pricing-column-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
}

.column-group input,
.pricing-column-group input {
  width: 12px;
  height: 12px;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.column-group:has(input:checked),
.pricing-column-group:has(input:checked) {
  color: #0b1f35;
}

tfoot td {
  background: #e7eef5;
  border-top: 2px solid #c7d5e2;
  color: var(--ink);
  font-weight: 800;
}

.sales-table-shell tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: #e7eef5;
  font-size: 11px;
}

.sales-total-row td {
  box-shadow: 0 -1px 0 #c7d5e2;
  color: #0f2238;
  font-weight: 850;
  white-space: nowrap;
}

.sales-total-row td:nth-child(2),
.sales-total-row td:nth-child(3) {
  color: #52677d;
  text-transform: uppercase;
}

tfoot .cfop-cst-total-title td {
  background: #f4f8fb;
  border-top: 1px solid #c7d5e2;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

tfoot .cfop-cst-total-header td {
  background: #eef4f9;
  border-top: 1px solid #d5e0ea;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

tfoot .cfop-cst-total-row td {
  background: #ffffff;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
}

.table-shell td {
  font-size: 12px;
}

.sales-table-shell tbody td {
  overflow: hidden;
  padding-top: 6px;
  padding-right: 6px;
  padding-bottom: 6px;
  padding-left: 6px;
  font-size: 11px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-description-cell {
  cursor: help;
}

.sales-description-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: min(680px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(47, 210, 255, 0.34);
  border-radius: 8px;
  background: #0f2032;
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(5, 18, 31, 0.28);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  pointer-events: none;
  white-space: normal;
}

.app-feedback {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(10, 25, 40, 0.34);
  backdrop-filter: blur(2px);
}

.app-feedback.active {
  display: grid;
}

.app-feedback-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid #cfe0ee;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(14, 33, 52, 0.26);
}

.app-feedback-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #e6f8ee;
  color: #137a3f;
  font-size: 19px;
  font-weight: 900;
}

.app-feedback.is-error .app-feedback-icon {
  background: #ffecee;
  color: #b42336;
}

.app-feedback.is-warning .app-feedback-icon {
  background: #fff5dd;
  color: #9a5b00;
}

.app-feedback.is-confirm .app-feedback-icon {
  background: #e8f4ff;
  color: #0b5d92;
}

.pricing-pdf-card {
  width: min(500px, calc(100vw - 32px));
}

.pricing-pdf-card .app-feedback-icon {
  background: #ffecee;
  color: #d92d20;
  font-size: 11px;
}

.pricing-pdf-model-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.pricing-pdf-model-list button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: #0f2238;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.pricing-pdf-model-list button:hover {
  border-color: #2fd2ff;
  box-shadow: inset 3px 0 0 #2fd2ff, 0 12px 26px rgba(15, 34, 56, 0.12);
  transform: translateY(-1px);
}

.pricing-pdf-model-list strong {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: #e8f4ff;
  color: #075985;
  font-size: 13px;
  font-weight: 900;
}

.pricing-pdf-model-list span {
  font-size: 14px;
  font-weight: 850;
}

.app-feedback h2 {
  margin: 0;
  color: #102234;
  font-size: 16px;
  font-weight: 850;
}

.app-feedback p {
  margin: 6px 0 0;
  color: #52677d;
  font-size: 13px;
  line-height: 1.42;
}

.app-feedback-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.app-feedback-ok {
  border-color: #1ba9d2;
  background: #12a8d1;
  color: #ffffff;
}

.app-feedback-cancel {
  display: none;
}

.app-feedback.is-confirm .app-feedback-cancel {
  display: inline-flex;
}

.sales-description-tooltip.visible {
  display: block;
}

.table-shell .icon-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

td.money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.inventory-card {
  padding: 16px;
}

.inventory-card strong {
  display: block;
  font-size: 22px;
  margin: 12px 0 6px;
}

.xml-reader-panel {
  display: grid;
  gap: 16px;
}

.xml-reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.xml-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.xml-reader-head p,
.xml-status {
  color: var(--muted);
  font-size: 12px;
}

.xml-folder-button {
  min-width: 156px;
  position: relative;
  overflow: hidden;
}

.xml-export-button {
  min-width: 92px;
  background: #f8fbfd;
}

.xml-folder-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.xml-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.xml-summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.xml-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.xml-summary-card strong {
  color: var(--ink);
  font-size: 18px;
}

.xml-table-shell {
  box-shadow: none;
}

.xml-table-shell table {
  min-width: 1120px;
}

.xml-total-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
  padding: 0;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.detail-dialog {
  padding: 16px;
}

.dialog-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dialog-head h2 {
  font-size: 16px;
  line-height: 1.2;
}

.dialog-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.detail-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
}

.detail-field span,
.message-box span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.1;
  margin-bottom: 0;
}

.detail-field strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.message-box {
  margin-bottom: 14px;
}

.dialog-actions {
  justify-content: flex-end;
  gap: 10px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  background: rgba(15, 32, 50, 0.18);
  pointer-events: none;
}

.loading-overlay.active {
  display: grid;
}

.loading-overlay div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(47, 210, 255, 0.34);
  border-radius: 8px;
  background: #102c45;
  color: #ffffff;
  padding: 14px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.loading-overlay strong {
  font-size: 12px;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #2fd2ff;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dialog-actions .icon-button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
}

.dialog-close-button {
  background: #f8fafc;
  color: #334155;
}

.dialog-close-button:hover {
  background: #eef3f7;
}

.whatsapp-button {
  background: #18a957;
  border-color: #18a957;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 169, 87, 0.22);
}

.whatsapp-button:hover {
  background: #128746;
  border-color: #128746;
}

.whatsapp-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #18a957;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
  }

  .brand {
    margin: 0;
  }

  .nav-list {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .nav-item {
    white-space: nowrap;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .credits-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .credits-tools {
    width: 100%;
    grid-template-columns: minmax(190px, 230px) minmax(280px, 1fr);
  }

  .export-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .kpi-grid,
  .dashboard-grid,
  .inventory-grid,
  .xml-summary-grid {
    grid-template-columns: 1fr;
  }

  .xml-reader-head {
    align-items: stretch;
    flex-direction: column;
  }

  .xml-actions {
    justify-content: flex-start;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .workspace {
    padding: 16px;
  }

  .brand span {
    display: none;
  }

  .toolbar label,
  .toolbar .icon-button,
  .group-box,
  .search-box,
  .export-actions,
  .export-actions .icon-button,
  .search-box input {
    width: 100%;
  }

  .credits-tools {
    grid-template-columns: 1fr;
  }

  .export-actions {
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .bar-value {
    grid-column: 2;
    text-align: left;
  }
}
