:root {
  --bg: #f3f6fb;
  --bg-alt: #eef2f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f5f7fb;
  --border: #d9e1ec;
  --border-strong: #c8d3e1;
  --text: #122033;
  --text-soft: #2f4258;
  --muted: #6b7d92;
  --primary: #2f6fec;
  --primary-soft: #eef4ff;
  --green: #2f9e67;
  --green-soft: #ecf8f2;
  --red: #c85555;
  --red-soft: #fdf0f0;
  --yellow: #b7791f;
  --yellow-soft: #fff7e8;
  --purple: #7356d8;
  --purple-soft: #f3efff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, #ffffff 0%, #f7f9fc 34%, #eef3f9 100%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea,
input {
  font: inherit;
}

button {
  appearance: none;
}

strong {
  color: var(--text);
}

.app-shell {
  display: grid;
  grid-template-columns: 292px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
  border-right: 1px solid var(--border);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, #4f86f7, #2f6fec);
  box-shadow: 0 10px 18px rgba(47, 111, 236, 0.18);
  position: relative;
}

.brand-icon::after {
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.grouped-nav {
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-label {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-subitems {
  display: grid;
  gap: 6px;
}

.nav-subitem {
  display: block;
  margin-left: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.94rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.16s ease;
}

.nav-subitem:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.nav-subitem.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #d7e5ff;
}

.nav-item {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-soft);
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  transition: 0.16s ease;
}

.nav-item:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #d7e5ff;
  box-shadow: inset 0 0 0 1px rgba(47, 111, 236, 0.04);
}

.side-note {
  padding: 12px 14px 14px;
  border-radius: 16px;
  border: 1px solid #e1c27b;
  background: linear-gradient(180deg, #fff8ea 0%, #fdf2d9 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

.side-note-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.side-note-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a7a2c;
}

.side-note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #d8a23a;
  color: #ffffff;
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.side-note-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: #5b4300;
  line-height: 1.2;
}

.admin-card {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8dbc0, #d3a57b);
  box-shadow: inset 0 -8px 12px rgba(65, 45, 20, 0.12);
}

.admin-name {
  font-weight: 700;
}

.admin-email {
  color: var(--muted);
  font-size: 0.85rem;
}

.main-panel {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.topbar p {
  margin: 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.top-pill,
.panel-tag,
.sales-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.83rem;
}

.top-pill.outline {
  background: transparent;
  color: var(--muted);
}

.summary-grid,
.metrics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.summary-card,
.metric-card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.summary-card {
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 100px;
}

.summary-value {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.summary-title {
  font-weight: 700;
}

.summary-subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.summary-card.green .summary-value {
  background: var(--green-soft);
  color: var(--green);
}

.summary-card.red .summary-value {
  background: var(--red-soft);
  color: var(--red);
}

.summary-card.blue .summary-value {
  background: var(--primary-soft);
  color: var(--primary);
}

.summary-card.purple .summary-value {
  background: var(--purple-soft);
  color: var(--purple);
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.first-row {
  grid-template-columns: 1.08fr 0.92fr;
}

.second-row {
  grid-template-columns: 1.1fr 0.9fr;
}

.details-row {
  grid-template-columns: 1fr;
}

.panel {
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header.wrap {
  flex-wrap: wrap;
  align-items: flex-start;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  margin-top: 6px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.16s ease;
}

.tab.active {
  background: var(--primary-soft);
  border-color: #d7e5ff;
  color: var(--primary);
}

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

.list-item {
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
  transition: 0.16s ease;
}

.list-item:hover,
.list-item.active {
  background: #f4f8ff;
  border-color: #d8e5ff;
}

.explorer-list {
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.hidden {
  display: none !important;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
}

.data-table thead th {
  text-align: left;
  padding: 13px 12px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: #f8fafd;
}

.data-table tbody td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f6;
  color: var(--text-soft);
  vertical-align: top;
}

.data-table tbody tr:hover td {
  background: #fbfcfe;
}

.data-table.compact tbody td,
.data-table.compact thead th {
  padding: 12px 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-running {
  background: var(--green-soft);
  color: var(--green);
  border-color: #cdebd8;
}

.status-warning {
  background: var(--yellow-soft);
  color: var(--yellow);
  border-color: #f2dfb1;
}

.status-failed {
  background: var(--red-soft);
  color: var(--red);
  border-color: #efcccc;
}

.chart-area {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf1f6;
}

.chart-title {
  color: var(--text-soft);
  margin-bottom: 12px;
  font-weight: 700;
}

.bars {
  display: grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 10px;
  min-height: 110px;
}

.bar {
  display: block;
  width: 18px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #6fa5ff, #2f6fec);
  box-shadow: 0 8px 16px rgba(47, 111, 236, 0.12);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin-top: 12px;
  font-size: 0.78rem;
  gap: 12px;
}

.chart-labels.short span {
  flex: 1;
  text-align: center;
}

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 0.16s ease;
}

.primary-btn {
  background: var(--primary);
  color: white;
  border-color: #245ed0;
  box-shadow: 0 12px 20px rgba(47, 111, 236, 0.14);
}

.primary-btn:hover {
  background: #255fdb;
}

.ghost-btn {
  background: var(--surface-soft);
  color: var(--text-soft);
}

.ghost-btn:hover {
  background: #eef3f9;
}

.editor-box {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fbfcfe;
  overflow: hidden;
}

textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  background: transparent;
  color: #20456c;
  border: 0;
  outline: none;
  padding: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.98rem;
  line-height: 1.55;
}

.table-wrapper {
  overflow: auto;
  max-height: 340px;
}

.table-wrapper.small {
  max-height: 260px;
}

.detail-block {
  margin-top: 18px;
}

.detail-title {
  color: var(--text-soft);
  margin-bottom: 10px;
  font-weight: 700;
}

.definition-box {
  margin: 0;
  padding: 18px;
  background: #f8fafd;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.metric-card {
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--primary-soft);
  border: 1px solid #d7e5ff;
}

.metric-title {
  color: var(--muted);
}

.metric-value {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 800;
}

.sales-search-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.sales-search-form {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.sales-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sales-form-row input {
  flex: 1 1 320px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

.sales-form-row input:focus {
  border-color: #b5ccff;
  box-shadow: 0 0 0 4px rgba(47, 111, 236, 0.08);
}

.sales-message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 600;
}

.sales-message.is-success {
  background: var(--green-soft);
  border-color: #cdebd8;
  color: var(--green);
}

.sales-message.is-warning {
  background: var(--yellow-soft);
  border-color: #f2dfb1;
  color: var(--yellow);
}

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

.kv-card,
.info-row,
.similar-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 16px;
}

.kv-card span,
.info-row span {
  display: block;
  color: var(--muted);
  font-size: 0.81rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.kv-card strong,
.info-row strong {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
}

.sales-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
  margin-bottom: 18px;
}

.sales-layout.single-column {
  grid-template-columns: 1fr;
}

.sales-product-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.product-thumb-box {
  width: 140px;
  height: 140px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.thumb-placeholder {
  color: var(--muted);
  font-weight: 700;
}

.product-eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  margin-bottom: 10px;
  font-weight: 800;
}

.product-copy h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.sales-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.product-info-grid {
  display: grid;
  gap: 12px;
}

.spec-box {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fbfcfe;
  padding: 18px;
  max-height: 620px;
  overflow: auto;
}

.spec-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.spec-box td,
.spec-box th {
  border: 1px solid #e4e9f1;
  padding: 10px;
  vertical-align: top;
}

.spec-box tr:nth-child(even) {
  background: #f7f9fc;
}

.spec-box p,
.spec-box div,
.spec-box span,
.spec-box td,
.spec-box th {
  color: var(--text-soft) !important;
}

.empty-state-panel {
  text-align: left;
}

.empty-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.similar-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.similar-card {
  display: grid;
  gap: 6px;
  transition: 0.16s ease;
}

.similar-card:hover {
  border-color: #d8e5ff;
  background: #f4f8ff;
}

.similar-card span,
.similar-card em {
  color: var(--muted);
  font-style: normal;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d6deea;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1280px) {

  .summary-grid,
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .first-row,
  .second-row,
  .sales-search-grid,
  .sales-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .main-panel {
    padding: 18px;
  }

  .summary-grid,
  .metrics-grid,
  .summary-kv-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-labels.short {
    flex-wrap: wrap;
  }

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

  .product-thumb-box {
    width: 100%;
    max-width: 220px;
  }
}


/* vendas refinement v5 */
.sales-main-panel {
  padding-top: 24px;
}

.sales-topbar {
  margin-bottom: 18px;
}

.sales-topbar h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.sales-topbar p {
  font-size: 0.9rem;
}

.sales-grid-row {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.sales-grid-row-top {
  grid-template-columns: minmax(280px, 0.4fr) minmax(420px, 0.6fr);
}

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

.sales-panel-header h2,
.sales-product-panel .panel-header h2,
.sales-spec-panel .panel-header h2 {
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.sales-panel-header .panel-subtitle {
  margin-top: 4px;
  font-size: 0.8rem;
}

.sales-main-panel .panel {
  border-radius: 18px;
  padding: 18px;
}

.sales-main-panel .panel-tag,
.sales-main-panel .top-pill,
.sales-main-panel .sales-pill {
  font-size: 0.75rem;
  padding: 6px 10px;
}

.sales-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sales-meta-inline {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.sales-search-form.compact {
  gap: 8px;
}

.sales-main-panel .field-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}

.sales-form-row.compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.sales-form-row.compact input {
  min-height: 42px;
  max-width: 40ch;
  font-size: 0.88rem;
  border-radius: 12px;
  padding: 0 12px;
}

.sales-main-panel .primary-btn,
.sales-main-panel .ghost-btn {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.84rem;
  border-radius: 12px;
}

.sales-message.compact {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.sales-table-wrapper {
  max-height: 228px;
}

.sales-table-tight thead th,
.sales-table-tight tbody td {
  padding: 10px 10px;
  font-size: 0.8rem;
}

.sales-table-tight thead th {
  font-size: 0.73rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
}

.sales-table-empty {
  color: var(--muted);
  text-align: center;
}

.sales-product-layout {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.product-thumb-box.compact {
  width: 120px;
  height: 120px;
  border-radius: 16px;
}

.product-copy.compact h2 {
  font-size: 1.08rem;
  line-height: 1.35;
}

.product-eyebrow {
  font-size: 0.7rem;
  margin-bottom: 6px;
}

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

.product-info-grid.compact .info-row.compact {
  padding: 12px 13px;
  border-radius: 14px;
}

.product-info-grid.compact .info-row.compact span {
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.product-info-grid.compact .info-row.compact strong {
  font-size: 0.86rem;
  line-height: 1.4;
}

.product-info-grid.compact .info-row-wide {
  grid-column: 1 / -1;
}

.refined-spec-panel .spec-box.compact {
  padding: 16px;
  max-height: 540px;
  font-size: 0.85rem;
}

.refined-spec-panel .spec-box.compact table {
  font-size: 0.82rem;
}

.refined-spec-panel .spec-box.compact td,
.refined-spec-panel .spec-box.compact th {
  padding: 8px 9px;
}

.empty-state-panel.compact .empty-title {
  font-size: 1rem;
  margin-bottom: 6px;
}

.similar-list.compact {
  gap: 10px;
}

.similar-card.compact {
  padding: 12px 14px;
}

.similar-card.compact strong {
  font-size: 0.86rem;
}

.similar-card.compact span,
.similar-card.compact em {
  font-size: 0.8rem;
}


.quote-main-panel .sales-grid-row-top-quote {
  grid-template-columns: minmax(240px, 0.3fr) minmax(560px, 0.7fr);
}

.quote-main-panel .sales-consult-panel {
  min-width: 0;
}

.quote-main-panel .quote-offers-panel {
  min-width: 0;
}

.quote-main-panel .sales-offers-panel .data-table th:nth-child(3),
.quote-main-panel .sales-offers-panel .data-table th:nth-child(4),
.quote-main-panel .sales-offers-panel .data-table th:nth-child(5),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(3),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(4),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(5) {
  white-space: nowrap;
}

.quote-main-panel .sales-offers-panel .data-table th:nth-child(4),
.quote-main-panel .sales-offers-panel .data-table th:nth-child(5),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(4),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(5) {
  min-width: 112px;
}

.quote-main-panel .sales-offers-panel .data-table th:nth-child(6),
.quote-main-panel .sales-offers-panel .data-table td:nth-child(6) {
  min-width: 90px;
}

@media (max-width: 1280px) {
  .sales-grid-row-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sales-product-layout {
    grid-template-columns: 1fr;
  }

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

  .sales-form-row.compact {
    grid-template-columns: 1fr;
  }

  .sales-form-row.compact input {
    max-width: none;
  }
}


.module-placeholder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.module-placeholder-panel {
  min-height: 320px;
}

.module-placeholder-copy {
  color: var(--text-soft);
  display: grid;
  gap: 12px;
  max-width: 760px;
  line-height: 1.65;
}

.quote-main-panel {
  padding-top: 24px;
}

.quote-options-row {
  margin-bottom: 14px;
}

.quote-options-panel {
  padding: 12px 16px !important;
}

.quote-options-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.quote-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.quote-choice input {
  margin: 0;
  inline-size: 14px;
  block-size: 14px;
  accent-color: var(--primary);
}

.quote-choice.is-radio input {
  inline-size: 15px;
  block-size: 15px;
}

.quote-destination-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.quote-destination-select {
  min-width: 84px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 0 28px 0 10px;
  outline: none;
}

.quote-destination-select:focus {
  border-color: rgba(60, 96, 170, 0.35);
  box-shadow: 0 0 0 3px rgba(60, 96, 170, 0.08);
}

@media (max-width: 860px) {
  .quote-options-bar {
    align-items: flex-start;
  }

  .quote-destination-field {
    margin-left: 0;
  }
}

.quote-main-panel .quote-options-panel {
  background: linear-gradient(180deg, #f4fbf4 0%, #ebf6ec 100%);
  border: 1px solid #cfe4d2;
  box-shadow: 0 10px 24px rgba(76, 132, 88, 0.08);
  position: relative;
}

.quote-main-panel .quote-options-panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 4px;
  background: #6eae7c;
}

.quote-main-panel .quote-choice span,
.quote-main-panel .quote-destination-field span {
  color: #294a31;
}

.quote-main-panel .quote-destination-select {
  background: rgba(255, 255, 255, 0.92);
  border-color: #c7d8cb;
}

.quote-main-panel .quote-consult-panel {
  min-width: 0;
}

.quote-main-panel .quote-offers-panel {
  min-width: 0;
}

.quote-main-panel .quote-offers-table th:nth-child(3),
.quote-main-panel .quote-offers-table th:nth-child(4),
.quote-main-panel .quote-offers-table th:nth-child(5),
.quote-main-panel .quote-offers-table th:nth-child(6),
.quote-main-panel .quote-offers-table td:nth-child(3),
.quote-main-panel .quote-offers-table td:nth-child(4),
.quote-main-panel .quote-offers-table td:nth-child(5),
.quote-main-panel .quote-offers-table td:nth-child(6) {
  white-space: nowrap;
}

.sale-price-cell {
  white-space: nowrap;
}

.sale-price-badge,
.cart-sale-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff6d8 0%, #ffe9a8 100%);
  border: 1px solid #dfc15f;
  color: #715300;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.sale-price-badge-empty {
  background: #f2f4f7;
  border-color: #d8dde5;
  color: #7b8494;
}

.offer-qty-input,
.cart-qty-input {
  width: 84px;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  padding: 0 10px;
  color: var(--text);
  outline: none;
}

.offer-qty-input:focus,
.cart-qty-input:focus {
  border-color: rgba(47, 111, 236, 0.35);
  box-shadow: 0 0 0 3px rgba(47, 111, 236, 0.08);
}

.include-cart-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #bcd8bf;
  background: #eff8f1;
  color: #2f6b3c;
  font-weight: 700;
  cursor: pointer;
  transition: 0.16s ease;
}

.include-cart-btn:hover {
  background: #e5f3e8;
  border-color: #a8caad;
}

.quote-cart-panel .panel-header {
  margin-bottom: 14px;
}

.quote-cart-meta {
  align-items: center;
}

.cart-clear-btn {
  min-height: 34px;
}

.quote-cart-table tfoot td {
  padding-top: 14px;
  padding-bottom: 14px;
  border-top: 1px solid var(--border);
}

.quote-cart-total-label {
  text-align: right;
  color: var(--muted);
  font-weight: 700;
}

.quote-cart-total-value {
  font-weight: 800;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.quote-cart-total-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef9f0 0%, #dff3e3 100%);
  border: 1px solid #b9ddc1;
  color: #25633a;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}

.quote-cart-table td:nth-child(5),
.quote-cart-table td:nth-child(6),
.quote-cart-table td:nth-child(7),
.quote-cart-table th:nth-child(5),
.quote-cart-table th:nth-child(6),
.quote-cart-table th:nth-child(7) {
  white-space: nowrap;
}

.quote-cart-table td:nth-child(2) {
  min-width: 260px;
}

.cart-empty-row td {
  text-align: center;
}

@media (max-width: 1280px) {
  .quote-main-panel .sales-grid-row-top-quote {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .quote-main-panel .quote-options-bar {
    gap: 10px 14px;
  }

  .quote-main-panel .quote-destination-field {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

.quote-customer-row {
  margin-bottom: 14px;
}

.quote-customer-panel {
  padding: 22px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
}

.quote-customer-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46, 111, 236, 0.02), rgba(46, 158, 103, 0.02));
  pointer-events: none;
}

.quote-customer-header,
.quote-customer-searchbar,
.quote-customer-grid {
  position: relative;
  z-index: 1;
}

.quote-customer-tag {
  background: #eef8f2;
  border-color: #cfe7d7;
  color: #2c6e46;
}

.quote-customer-searchbar {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 1.1fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.quote-customer-searchfield {
  display: grid;
  gap: 8px;
}

.quote-customer-searchcontrol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.quote-customer-searchcontrol input,
.quote-customer-grid input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  padding: 0 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.quote-customer-searchcontrol input:focus,
.quote-customer-grid input:focus {
  border-color: #b7cdfa;
  box-shadow: 0 0 0 4px rgba(47, 111, 236, 0.08);
  background: #fff;
}

.quote-customer-btn {
  min-width: 156px;
}

.quote-customer-status {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d8e2ef;
  background: #f8fbff;
  color: #637893;
  font-size: 0.9rem;
  font-weight: 600;
}

.quote-customer-status.is-loading {
  background: #eef4ff;
  border-color: #cadcff;
  color: #416aa8;
}

.quote-customer-status.is-success {
  background: #ecf8f2;
  border-color: #cfe7d7;
  color: #2c6e46;
}

.quote-customer-status.is-warning {
  background: #fff7e8;
  border-color: #f1ddad;
  color: #8a6512;
}

.quote-customer-status.is-error {
  background: #fdf0f0;
  border-color: #f2c9c9;
  color: #a24646;
}

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

.quote-field {
  grid-column: span 4;
  display: grid;
  gap: 8px;
}

.quote-field-wide {
  grid-column: span 6;
}

.quote-field label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quote-field input::placeholder {
  color: #9aa8ba;
}

@media (max-width: 1360px) {
  .quote-customer-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .quote-field {
    grid-column: span 4;
  }

  .quote-field-wide {
    grid-column: span 8;
  }
}

@media (max-width: 980px) {
  .quote-customer-searchbar {
    grid-template-columns: 1fr;
  }

  .quote-customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-field,
  .quote-field-wide {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .quote-customer-searchcontrol {
    grid-template-columns: 1fr;
  }

  .quote-customer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Orcamento avulso | Cliente / Destinatario compacto em 2 linhas ===== */
.quote-customer-panel-compact2 {
  padding: 14px 16px !important;
  border-radius: 18px;
}

.quote-customer-panel-compact2 .quote-customer-header {
  margin-bottom: 8px;
  align-items: center;
}

.quote-customer-panel-compact2 .quote-customer-header h2 {
  font-size: 0.98rem;
  line-height: 1.1;
}

.quote-customer-panel-compact2 .quote-customer-tag {
  font-size: 0.68rem;
  padding: 5px 10px;
}

.quote-customer-panel-compact2 .quote-customer-compact {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.quote-customer-panel-compact2 .quote-customer-line {
  display: grid;
  gap: 10px;
  align-items: end;
}

.quote-customer-panel-compact2 .quote-customer-line-top {
  grid-template-columns: minmax(300px, 1.2fr) minmax(180px, 0.7fr) minmax(240px, 0.9fr) 150px;
}

.quote-customer-panel-compact2 .quote-customer-line-bottom {
  grid-template-columns: minmax(320px, 1.3fr) minmax(260px, 1fr) minmax(260px, 1fr) 110px;
}

.quote-customer-panel-compact2 .quote-customer-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.quote-customer-panel-compact2 .quote-customer-cell label,
.quote-customer-panel-compact2 .field-label {
  color: #657e98;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  /* text-transform: uppercase; */
  line-height: 1;
  margin: 0;
}

.quote-customer-panel-compact2 .quote-customer-searchcontrol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quote-customer-panel-compact2 input {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #c6d2e0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1;
  outline: none;
  box-shadow: none;
}

.quote-customer-panel-compact2 input::placeholder {
  color: #93a5ba;
}

.quote-customer-panel-compact2 input:focus {
  border-color: #b7cdfa;
  box-shadow: 0 0 0 3px rgba(47, 111, 236, 0.07);
  background: #fff;
}

.quote-customer-panel-compact2 .quote-customer-btn {
  min-width: 124px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 0.74rem !important;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1360px) {
  .quote-customer-panel-compact2 .quote-customer-line-top {
    grid-template-columns: minmax(260px, 1.15fr) minmax(170px, 0.7fr) minmax(220px, 0.9fr) 140px;
  }

  .quote-customer-panel-compact2 .quote-customer-line-bottom {
    grid-template-columns: minmax(260px, 1.25fr) minmax(220px, 1fr) minmax(220px, 1fr) 104px;
  }
}

@media (max-width: 1280px) {
  .quote-customer-panel-compact2 .quote-customer-line-top,
  .quote-customer-panel-compact2 .quote-customer-line-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .quote-customer-panel-compact2 .quote-customer-line-top,
  .quote-customer-panel-compact2 .quote-customer-line-bottom {
    grid-template-columns: 1fr;
  }

  .quote-customer-panel-compact2 .quote-customer-searchcontrol {
    grid-template-columns: 1fr;
  }

  .quote-customer-panel-compact2 .quote-customer-btn {
    width: 100%;
  }
}

/* ===== Ajuste objetivo do carrinho: exibir pelo menos 10 itens sem rolagem interna ===== */
.quote-cart-panel {
  overflow: visible;
}

.quote-cart-panel .sales-table-wrapper,
.quote-cart-panel .table-wrapper {
  max-height: none;
  overflow-y: visible;
  overflow-x: auto;
}

.quote-cart-table {
  table-layout: auto;
}

.quote-cart-table tfoot td {
  position: static;
}

/* ===== orçamento avulso | cliente / destinatário ===== */
.quote-customer-panel-premium {
  padding: 20px 22px 18px;
}

.quote-customer-topbar {
  margin-bottom: 14px;
}

.quote-customer-cnpj-block {
  max-width: 560px;
}

.quote-customer-searchcontrol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.quote-customer-btn {
  min-width: 148px;
  min-height: 44px;
  padding: 0 16px;
}

.quote-customer-two-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quote-info-box {
  border: 1px solid #d6e0ec;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  padding: 16px 16px 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

.quote-info-box-title {
  margin-bottom: 12px;
  color: #27415f;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

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

.quote-info-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.quote-info-field-full {
  grid-column: 1 / -1;
}

.quote-form-label {
  color: #5d7088;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
}

.quote-form-input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  padding: 0 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.quote-form-input::placeholder {
  color: #9ba9bb;
}

.quote-form-input:focus {
  border-color: #b8cdf5;
  box-shadow: 0 0 0 4px rgba(59, 112, 229, 0.08);
  background: #fff;
}

.quote-customer-status {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #d9e3ee;
  background: #f8fbff;
  color: #647991;
  font-size: 0.84rem;
  font-weight: 600;
}

.quote-customer-status.is-loading {
  background: #eef4ff;
  border-color: #ccddff;
  color: #3f69a4;
}

.quote-customer-status.is-success {
  background: #eef8f1;
  border-color: #cfe3d6;
  color: #2d6c46;
}

.quote-customer-status.is-warning {
  background: #fff8ea;
  border-color: #eeddb4;
  color: #8a6718;
}

.quote-customer-status.is-error {
  background: #fdf1f1;
  border-color: #efcccc;
  color: #a64848;
}

/* ===== orçamento avulso | faixa fiscal ===== */
.quote-options-bar-inline {
  justify-content: flex-start;
}

.quote-options-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
}

.quote-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.81rem;
  font-weight: 600;
  color: #47644c;
  white-space: nowrap;
}

.quote-inline-field span {
  color: #47644c;
}

.quote-destination-field {
  margin-left: 6px;
}

.quote-payment-field {
  min-width: 240px;
}

.quote-payment-select {
  min-width: 170px;
}

@media (max-width: 1120px) {
  .quote-customer-two-boxes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .quote-customer-searchcontrol {
    grid-template-columns: 1fr;
  }

  .quote-info-grid {
    grid-template-columns: 1fr;
  }

  .quote-info-field-full {
    grid-column: auto;
  }

  .quote-inline-field,
  .quote-payment-field {
    width: 100%;
    justify-content: flex-start;
  }

  .quote-destination-select,
  .quote-payment-select {
    width: 100%;
  }
}

.quote-notes-row {
  margin-top: 14px;
}

.quote-notes-panel {
  padding: 20px 22px 18px;
}

.quote-notes-tag {
  background: #eef5ff;
  border-color: #d3e0f7;
  color: #59739a;
}

.quote-notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.quote-note-item {
  border: 1px solid #d9e3ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  padding: 14px 16px;
  min-width: 0;
}

.quote-note-item-full {
  grid-column: 1 / -1;
}

.quote-note-label {
  color: #5d7088;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

.quote-note-value {
  color: #243f61;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .quote-notes-grid {
    grid-template-columns: 1fr;
  }

  .quote-note-item-full {
    grid-column: auto;
  }
}

/* --- observacoes importantes premium --- */
.quote-notes-panel-premium {
  padding: 20px 22px 18px;
}

.quote-notes-layout {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 16px;
}

.quote-notes-block {
  border: 1px solid #d8e2ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  padding: 16px;
}

.quote-notes-block.is-green {
  background: linear-gradient(180deg, #f1fbf3 0%, #e8f7eb 100%);
  border: 1px solid #b9d8bf;
}

.quote-notes-block-title {
  color: #27415f;
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.quote-note-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e7edf4;
}

.quote-note-row:last-child {
  border-bottom: 0;
}

.quote-note-label {
  color: #5e7189;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0;
}

.quote-note-value {
  color: #243f61;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.quote-billing-list {
  display: grid;
  gap: 12px;
}

.quote-billing-card {
  border: 1px solid #d5e1ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px 16px;
}

.quote-billing-card.is-highlight {
  border-color: #b9d8bf;
  background: linear-gradient(180deg, #f1fbf3 0%, #e8f7eb 100%);
}

.quote-billing-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.quote-billing-title {
  color: #1e3b5f;
  font-size: 0.88rem;
  font-weight: 800;
}

.quote-billing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5ff;
  border: 1px solid #d2e1fb;
  color: #58739b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-billing-card.is-highlight .quote-billing-badge {
  background: #dff3e4;
  border-color: #bdddc5;
  color: #2f6a3f;
}

.quote-billing-line {
  color: #334e70;
  font-size: 0.84rem;
  line-height: 1.45;
}

.quote-billing-empty {
  border: 1px dashed #cfdbe8;
  border-radius: 14px;
  background: #fafcff;
  color: #6a7d95;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 14px 16px;
}

@media (max-width: 980px) {
  .quote-notes-layout {
    grid-template-columns: 1fr;
  }

  .quote-note-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
/* =========================================================
   ORCAMENTO EMAIL
   Camada visual isolada e segura
   ========================================================= */

.proposal-email-form {
  display: grid;
  gap: 14px;
}

.proposal-email-form .panel {
  padding: 18px 20px;
}

.proposal-email-form .panel-header {
  margin-bottom: 14px;
}

.proposal-email-form .panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #183153;
}

.proposal-email-form .panel-subtitle {
  margin-top: 4px;
  font-size: 0.86rem;
  color: #6b7f99;
  line-height: 1.35;
}

.proposal-email-grid {
  display: grid;
  gap: 14px 16px;
  margin-bottom: 14px;
}

.proposal-email-grid:last-child {
  margin-bottom: 0;
}

.proposal-email-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.proposal-email-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.proposal-email-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proposal-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proposal-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #5d718b;
  line-height: 1.2;
}

.proposal-field input,
.proposal-field select,
.proposal-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  background: #fff;
  color: #1f3553;
  font-size: 0.92rem;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-sizing: border-box;
}

.proposal-field textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.proposal-field input:focus,
.proposal-field select:focus,
.proposal-field textarea:focus {
  border-color: #9fc2ff;
  box-shadow: 0 0 0 4px rgba(52, 112, 255, 0.10);
  background: #fff;
}

.proposal-field input::placeholder,
.proposal-field textarea::placeholder {
  color: #97a7bb;
}

.proposal-checks {
  justify-content: flex-end;
}

.proposal-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d6dfeb;
  border-radius: 12px;
  background: #f8fbff;
  color: #29486c;
  font-size: 0.88rem;
  font-weight: 600;
}

.proposal-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: unset;
  padding: 0;
  margin: 0;
  accent-color: #3772ff;
}

.proposal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.proposal-actions .primary-btn {
  min-width: 180px;
}

.proposal-result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.proposal-result.success {
  background: #eef8f2;
  border: 1px solid #cae6d3;
  color: #2f6a46;
}

.proposal-result.error {
  background: #fdf1f1;
  border: 1px solid #efcaca;
  color: #9d3e3e;
}

.proposal-loaded-box {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #d5dfec;
  border-radius: 14px;
  background: #f8fbff;
  color: #2a4567;
  font-size: 0.9rem;
}

.proposal-loaded-box strong {
  color: #173455;
}

.proposal-email-form [data-wrapper="cpf"][style*="display: none"],
.proposal-email-form [data-wrapper="cnpj"][style*="display: none"],
.proposal-email-form [data-wrapper="category"][style*="display: none"],
.proposal-email-form [data-wrapper="company_name"][style*="display: none"],
.proposal-email-form [data-wrapper="has_ie"][style*="display: none"],
.proposal-email-form [data-wrapper="ie_number"][style*="display: none"] {
  display: none !important;
}

/* Melhor leitura dos cards dentro do layout atual */
.proposal-email-form .sales-grid-row {
  margin-bottom: 0;
}

/* Responsivo */
@media (max-width: 1180px) {
  .proposal-email-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .proposal-email-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .proposal-email-form .panel {
    padding: 16px;
  }

  .proposal-email-grid-2,
  .proposal-email-grid-3,
  .proposal-email-grid-4 {
    grid-template-columns: 1fr;
  }

  .proposal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .proposal-actions .primary-btn {
    width: 100%;
    min-width: 0;
  }

  .proposal-checks {
    justify-content: flex-start;
  }
}
/* Fullscrape Atualizacao - Ingram V10.19 */
.fullscrape-update-panel .topbar h1 {
  font-size: 1.7rem;
}

.fsu-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fsu-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(480px, 1.1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.fsu-form {
  display: grid;
  gap: 18px;
}

.fsu-form-section,
.fsu-source-box {
  display: grid;
  gap: 10px;
}

.fsu-form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.fsu-form-row.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.fsu-check {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  row-gap: 4px;
  align-items: start;
  cursor: pointer;
}

.fsu-check input {
  margin-top: 2px;
}

.fsu-check span {
  font-weight: 800;
  color: var(--text);
}

.fsu-check em {
  grid-column: 2;
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.fsu-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

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

.fsu-radio-stack label,
.fsu-radio-inline label {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--text-soft);
}

.fsu-radio-stack small {
  color: var(--muted);
  font-weight: 600;
}

.fsu-radio-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.fsu-textarea {
  min-height: 170px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  color: var(--text);
}

.fsu-db-source {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 6px;
}

.fsu-db-source span {
  color: var(--muted);
}

.fsu-field-small {
  flex: 0 1 220px;
  display: grid;
  gap: 8px;
}

.fsu-field-small input {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  padding: 0 14px;
  outline: none;
}

.fsu-actions {
  padding-top: 4px;
}

.fsu-console-panel {
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.fsu-console-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.fsu-log-download {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.fsu-live-status {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, var(--surface-soft) 100%);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fsu-live-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.fsu-live-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.fsu-live-head strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.25;
}

.fsu-live-provider {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid #d7e5ff;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fsu-progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf7;
  border: 1px solid #d8e2ef;
}

.fsu-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fec 0%, #4f86f7 100%);
  transition: width 0.35s ease;
}

.fsu-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.fsu-progress-meta strong {
  color: var(--text-soft);
}

.fsu-live-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fsu-live-metric {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 11px;
}

.fsu-live-metric-wide {
  grid-column: span 2;
}

.fsu-live-metric span,
.fsu-live-activity span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.fsu-live-metric strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fsu-live-activity {
  margin-top: 8px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 10px 11px;
}

.fsu-live-activity strong {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.fsu-console-details {
  margin-top: auto;
}

.fsu-console-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--text-soft);
  font-weight: 800;
  padding: 9px 2px 10px;
}

.fsu-console-details > summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.fsu-console {
  margin: 0;
  min-height: 245px;
  max-height: 340px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #0f172a;
  background: #08111f;
  color: #d9f99d;
  padding: 16px;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.fsu-audit-kv {
  margin-bottom: 18px;
}

.fsu-audit-kv .kv-card strong {
  word-break: break-word;
}

.fsu-audit-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1280px) {
  .fsu-layout,
  .fsu-audit-tables,
  .fsu-form-row.two {
    grid-template-columns: 1fr;
  }

  .fsu-summary-grid,
  .fsu-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fsu-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fsu-summary-grid,
  .fsu-check-grid,
  .fsu-audit-tables,
  .fsu-live-grid {
    grid-template-columns: 1fr;
  }

  .fsu-live-metric-wide {
    grid-column: span 1;
  }

  .fsu-progress-meta,
  .fsu-live-head,
  .fsu-console-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Fullscrape Atualizacao - candidatos e fabricantes */
.fsu-radio-inline.wrap {
  flex-wrap: wrap;
}

.fsu-inline-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.fsu-inline-controls input[type="text"] {
  min-width: min(420px, 100%);
  flex: 1;
}

.fsu-inline-controls input[type="number"] {
  width: 100px;
}

.fsu-candidates-wrapper {
  max-height: 280px;
  overflow: auto;
  margin-top: 10px;
}

.fsu-vendor-actions {
  margin-top: 10px;
}

.fsu-vendor-box {
  margin-top: 10px;
  border: 1px solid var(--border-color, #d7e3f3);
  border-radius: 14px;
  padding: 10px;
  background: rgba(248, 251, 255, 0.72);
}

.fsu-vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.fsu-check.vendor-all,
.fsu-check.vendor-item {
  min-height: 48px;
}

.fsu-check.vendor-item em {
  white-space: normal;
}
/* Gestao Pedidos - modulo comercial */
.gestao-pedidos-main .topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}


.gp-action-feedback {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #bbdfc8;
  border-radius: 14px;
  background: #f2fbf5;
  color: #176232;
  font-size: 0.88rem;
  font-weight: 700;
}

.gp-action-feedback-error {
  border-color: #efcccc;
  background: var(--red-soft);
  color: var(--red);
}

.gp-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.gp-summary-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 13px 14px;
  display: grid;
  gap: 5px;
}

.gp-summary-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.gp-summary-card strong {
  color: var(--text);
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.gp-summary-card em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-filter-panel,
.gp-table-panel,
.gp-detail-panel {
  margin-bottom: 18px;
}

.gp-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(140px, 0.7fr) minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.gp-filter-grid label {
  display: grid;
  gap: 6px;
}

.gp-filter-grid label span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gp-filter-grid input,
.gp-filter-grid select,
.gp-status-select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.86rem;
}

.gp-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gp-table-wrapper {
  max-height: 560px;
}

.gp-orders-table thead th,
.gp-orders-table tbody td {
  white-space: nowrap;
}

.gp-orders-table tbody td:nth-child(5),
.gp-orders-table tbody td:nth-child(6) {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: nowrap;
}

.gp-row-actions .primary-btn,
.gp-row-actions .ghost-btn,
.gp-download-link {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.76rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.gp-muted {
  color: var(--muted);
  font-size: 0.76rem;
}

.gp-error-label {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border-color: #efcccc !important;
}

.gp-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
}

.gp-detail-grid h3 {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.gp-detail-table-wrapper {
  max-height: 360px;
}

.gp-history-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.gp-history-item,
.gp-history-empty {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfcfe;
  padding: 12px;
}

.gp-history-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.gp-history-item strong {
  color: var(--text);
  font-size: 0.86rem;
}

.gp-history-item span,
.gp-history-item em,
.gp-history-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.gp-history-item p {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

@media (max-width: 1280px) {
  
.gp-action-feedback {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #bbdfc8;
  border-radius: 14px;
  background: #f2fbf5;
  color: #176232;
  font-size: 0.88rem;
  font-weight: 700;
}

.gp-action-feedback-error {
  border-color: #efcccc;
  background: var(--red-soft);
  color: var(--red);
}

.gp-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gp-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gp-filter-actions {
    grid-column: 1 / -1;
  }

  .gp-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .gp-summary-grid,
  .gp-filter-grid {
    grid-template-columns: 1fr;
  }
}


/* Gestão Pedidos v6 - dashboard comercial e destaque de pedidos fechados */
.gp-summary-card-closed {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
}

.gp-summary-card-closed strong {
  color: #1d4ed8;
}

.gp-orders-table tbody tr.gp-order-row-closed {
  background: #eff6ff;
  box-shadow: inset 4px 0 0 #3b82f6;
}

.gp-orders-table tbody tr.gp-order-row-closed:hover {
  background: #dbeafe;
}

.gp-orders-table tbody tr.gp-order-row-closed td:first-child strong::after {
  content: "Fechado";
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

/* Gestao Pedidos - revisao de pedidos */
.gp-revision-btn {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}
.gp-revision-btn:hover {
  background: #dbeafe;
  color: #1e40af;
}
.order-revision-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}
.order-revision-banner strong {
  font-size: 13px;
  font-weight: 800;
}
.order-revision-banner span {
  font-size: 12px;
  color: #315b9e;
}

/* Gestao Pedidos - retorno seguro da revisao */
.order-revision-banner-copy {
  display: grid;
  gap: 3px;
  min-width: 220px;
  flex: 1;
}

.order-revision-back-btn {
  margin-left: auto;
  border-color: #bfdbfe;
  background: #ffffff;
  color: #1d4ed8;
  font-weight: 800;
  white-space: nowrap;
}

.order-revision-back-btn:hover {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 720px) {
  .order-revision-back-btn {
    margin-left: 0;
    width: 100%;
  }
}

/* Gestão comercial do pedido - desconto, frete e prazo manual */
.quote-commercial-editor-row {
  align-items: flex-start;
}

.quote-commercial-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.quote-commercial-select,
.quote-commercial-input {
  border: 1px solid rgba(15, 63, 111, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  color: #173f6f;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.quote-commercial-select:focus,
.quote-commercial-input:focus {
  border-color: rgba(35, 95, 165, 0.55);
  box-shadow: 0 0 0 3px rgba(35, 95, 165, 0.10);
}

.quote-commercial-select {
  min-width: 132px;
}

.quote-commercial-input.money {
  max-width: 150px;
  text-align: right;
}

.quote-commercial-input.wide {
  width: min(100%, 420px);
}

.quote-commercial-hint {
  display: block;
  margin-top: 4px;
  color: #6b7c90;
  font-size: 11px;
}

.quote-cart-total-badge.muted {
  background: #eef4fb;
  color: #24456b;
}

.quote-cart-total-badge.discount {
  background: #fff3f3;
  color: #9f2d2d;
}

.quote-cart-subtotal-row .quote-cart-total-label,
.quote-cart-discount-row .quote-cart-total-label,
.quote-cart-freight-row .quote-cart-total-label {
  font-size: 12px;
  color: #5d7188;
}

/* Envio profissional de Pedido Lanworks por e-mail */
.scc-email-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.scc-email-modal.is-open {
  display: flex;
}

.scc-email-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
}

.scc-email-modal-card {
  position: relative;
  width: min(760px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #cbd8ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 20px;
}

.scc-email-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.scc-email-modal-kicker {
  display: inline-block;
  margin-bottom: 4px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.scc-email-modal-header h2 {
  margin: 0;
  color: #0f2747;
  font-size: 22px;
  font-weight: 800;
}

.scc-email-modal-header p {
  margin: 4px 0 0;
  color: #60758f;
  font-size: 13px;
}

.scc-email-modal-close {
  border: 1px solid #d5e0ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #274767;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  width: 40px;
  height: 40px;
}

.scc-email-form {
  display: grid;
  gap: 12px;
}

.scc-email-field {
  display: grid;
  gap: 5px;
}

.scc-email-field span {
  color: #5d7390;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.scc-email-field input,
.scc-email-field textarea {
  width: 100%;
  border: 1px solid #b8c8db;
  border-radius: 12px;
  background: #fff;
  color: #163a5f;
  font-size: 13px;
  padding: 10px 12px;
}

.scc-email-field textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.45;
}

.scc-email-field input:focus,
.scc-email-field textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.scc-email-attachment-note {
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: #f5f9ff;
  color: #325372;
  font-size: 12px;
  padding: 10px 12px;
}

.scc-email-feedback {
  margin: 0 0 12px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
}

.scc-email-feedback.is-error {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}

.scc-email-feedback.is-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.scc-email-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* SCC Auth V22 */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-page {
  width: min(520px, 100%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-card h1,
.auth-admin-panel h2,
.auth-user-card h3 {
  margin: 0;
}

.auth-card h1 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.auth-muted,
.auth-card .auth-muted {
  color: var(--muted);
  line-height: 1.5;
}

.auth-form,
.auth-user-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form label,
.auth-user-form label,
.auth-password-reset-form label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 700;
}

.auth-form input,
.auth-user-form input,
.auth-password-reset-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
  outline: none;
}

.auth-form input:focus,
.auth-user-form input:focus,
.auth-password-reset-form input:focus {
  border-color: #b7cdf8;
  box-shadow: 0 0 0 4px rgba(47, 111, 236, 0.08);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  font-weight: 800;
}

.auth-alert {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 16px 0;
  font-weight: 700;
  line-height: 1.45;
}

.auth-alert-error {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #efcccc;
}

.auth-alert-success {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #cdebd8;
}

.auth-password-hint,
.auth-footnote,
.auth-user-meta {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-footnote {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.auth-footnote code {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px 5px;
}

.sidebar-logout-form {
  margin: 8px 0 0;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 13px;
  border: 1px solid rgba(220, 38, 38, 0.30);
  border-radius: 999px;
  background: rgba(254, 226, 226, 0.82);
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.08);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  color: #b91c1c;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.sidebar-logout::before {
  content: "↪";
  margin-right: 6px;
  font-size: 0.85rem;
}

.sidebar-logout:hover {
  transform: translateY(-1px);
  border-color: rgba(185, 28, 28, 0.55);
  background: #fee2e2;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.14);
}

.sidebar-logout:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.22);
  outline-offset: 2px;
}

.auth-flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-flash-stack .auth-alert {
  margin: 0;
}

.auth-admin-panel {
  margin-bottom: 18px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.auth-form-grid.small {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.auth-check {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  font-weight: 700;
  color: var(--text-soft);
}

.auth-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.auth-check-inline {
  align-self: end;
  min-height: 44px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

.auth-permission-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 4px 0 6px;
}

.auth-permission-matrix.compact {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.auth-permission-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.auth-permission-group h3 {
  margin: 0 0 2px;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

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

.auth-user-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.auth-user-card.is-inactive {
  opacity: 0.74;
  background: #fbfcfe;
}

.auth-user-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.auth-user-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.auth-chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-user-form.compact {
  margin-top: 0;
}

.auth-password-reset-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.auth-empty {
  padding: 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.auth-denied-panel {
  max-width: 720px;
}

@media (max-width: 1180px) {
  .auth-form-grid,
  .auth-form-grid.small,
  .auth-permission-matrix,
  .auth-permission-matrix.compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .auth-form-grid,
  .auth-form-grid.small,
  .auth-permission-matrix,
  .auth-permission-matrix.compact,
  .auth-password-reset-form {
    grid-template-columns: 1fr;
  }
  .auth-user-card-head {
    display: grid;
  }
}

/* V22.3 - Administração de usuários em layout lista + detalhe */
.auth-admin-topbar {
  gap: 16px;
}

.auth-admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-new-user-btn {
  text-decoration: none;
  white-space: nowrap;
}

.auth-users-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.auth-directory-panel,
.auth-detail-panel {
  min-width: 0;
}

.auth-directory-header {
  margin-bottom: 10px;
}

.auth-user-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-user-search label {
  display: grid;
  gap: 4px;
  color: #4f627a;
  font-size: 12px;
  font-weight: 700;
}

.auth-user-search input,
.auth-user-search select {
  width: 100%;
  border: 1px solid #c9d6e6;
  border-radius: 9px;
  padding: 9px 10px;
  color: #0b1f3a;
  background: #fff;
  font-size: 13px;
}

.auth-user-directory-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 280px);
  min-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.auth-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #dbe5f2;
  border-radius: 12px;
  background: #fff;
  color: #0b1f3a;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.auth-user-row:hover,
.auth-user-row.is-selected {
  border-color: #2f6fed;
  background: #f5f8ff;
  box-shadow: 0 8px 18px rgba(30, 89, 205, .10);
}

.auth-user-row.is-inactive {
  opacity: .68;
}

.auth-user-row-main,
.auth-user-row-side {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.auth-user-row-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.auth-user-row-main small,
.auth-user-row-side small {
  color: #6b7c90;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-row-side {
  justify-items: end;
}

.auth-mini-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #ecfdf3;
  color: #12783d;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-mini-chip-admin {
  background: #eef4ff;
  color: #2456c8;
}

.auth-mini-chip-off {
  background: #fff0f0;
  color: #be123c;
}

.auth-detail-header {
  padding-bottom: 12px;
  border-bottom: 1px solid #e6eef8;
  margin-bottom: 14px;
}

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

.auth-account-summary > div {
  border: 1px solid #e1eaf5;
  background: #f8fbff;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.auth-account-summary span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-account-summary strong {
  display: block;
  color: #0b1f3a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.auth-detail-form {
  display: grid;
  gap: 14px;
}

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

.auth-permission-matrix-detail {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
}

.auth-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.auth-password-detail-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6eef8;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
}

.auth-empty.compact {
  padding: 14px;
  font-size: 13px;
}

.auth-detail-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: #64748b;
}

@media (max-width: 1200px) {
  .auth-users-layout {
    grid-template-columns: 1fr;
  }

  .auth-user-directory-list {
    max-height: 360px;
  }

  .auth-account-summary,
  .auth-permission-matrix-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .auth-form-grid-detail,
  .auth-account-summary,
  .auth-permission-matrix-detail,
  .auth-password-detail-form {
    grid-template-columns: 1fr;
  }

  .auth-detail-actions {
    justify-content: stretch;
    flex-direction: column;
  }
}

/* V23.1 - Dashboard Executivo SCC */
.executive-dashboard {
  background:
    radial-gradient(circle at top left, rgba(49, 116, 255, 0.09), transparent 34rem),
    linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%);
}

.premium-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 20px;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.9)),
    radial-gradient(circle at 85% 20%, rgba(37,99,235,0.12), transparent 18rem);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.premium-hero .eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-hero h1 {
  margin: 8px 0 8px;
  color: #071527;
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.premium-hero p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.overall-card {
  min-width: 210px;
  padding: 20px;
  border-radius: 22px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.overall-card span,
.overall-card small {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.overall-card strong {
  display: block;
  margin: 8px 0;
  font-size: 2.05rem;
  letter-spacing: -0.04em;
}

.overall-success { background: linear-gradient(135deg, #ecfdf5, #ffffff); border-color: #bbf7d0; }
.overall-warning { background: linear-gradient(135deg, #fffbeb, #ffffff); border-color: #fde68a; }
.overall-danger { background: linear-gradient(135deg, #fef2f2, #ffffff); border-color: #fecaca; }

.executive-section {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 26px;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.055);
  backdrop-filter: blur(8px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading.compact {
  align-items: flex-end;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: #071527;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  max-width: 640px;
  color: #64748b;
  font-size: 0.88rem;
}

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

.executive-kpi {
  min-height: 128px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.executive-kpi::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
}

.kpi-blue::after { background: rgba(37, 99, 235, 0.12); }
.kpi-purple::after { background: rgba(124, 58, 237, 0.12); }
.kpi-green::after { background: rgba(22, 163, 74, 0.12); }
.kpi-gold::after { background: rgba(217, 119, 6, 0.16); }

.kpi-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-value {
  margin-top: 14px;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.055em;
}

.kpi-hint {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.82rem;
}

.mini-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mini-metrics-row span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.84rem;
}

.executive-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.85fr);
  gap: 20px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.health-success { color: #047857; background: #d1fae5; border: 1px solid #a7f3d0; }
.health-warning { color: #b45309; background: #fef3c7; border: 1px solid #fde68a; }
.health-danger { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }

.score-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 6px 0 16px;
}

.score-title {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 800;
}

.score-value {
  margin-top: 6px;
  color: #0f172a;
  font-size: 4rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.score-value small {
  color: #94a3b8;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.score-subtitle {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.9rem;
}

.score-gauge,
.dist-bar {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.08);
}

.score-gauge-fill,
.dist-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width .35s ease;
}

.score-success .score-gauge-fill,
.dist-success .dist-bar-fill { background: linear-gradient(90deg, #22c55e, #16a34a); }
.score-warning .score-gauge-fill,
.dist-warning .dist-bar-fill { background: linear-gradient(90deg, #f59e0b, #d97706); }
.score-danger .score-gauge-fill,
.dist-danger .dist-bar-fill { background: linear-gradient(90deg, #ef4444, #b91c1c); }

.normalizacao-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.normalizacao-facts div {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.normalizacao-facts span {
  display: block;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

.normalizacao-facts strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 0.92rem;
  word-break: break-word;
}

.text-success { color: #047857 !important; }
.text-warning { color: #b45309 !important; }

.chain-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.84rem;
}

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

.dash-alert,
.empty-alerts {
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #f8fafc;
}

.dash-alert strong,
.dash-alert span,
.empty-alerts strong,
.empty-alerts span {
  display: block;
}

.dash-alert strong,
.empty-alerts strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.dash-alert span,
.empty-alerts span {
  margin-top: 3px;
  color: #64748b;
  font-size: 0.82rem;
}

.alert-danger { border-color: #fecaca; background: #fef2f2; }
.alert-warning { border-color: #fde68a; background: #fffbeb; }
.alert-info { border-color: #bfdbfe; background: #eff6ff; }

.compact-empty { margin-top: 4px; }


/* V23.3 - Dashboard Executivo | Top fabricantes LI sem Chart.js */
.fabricantes-panel {
  overflow: hidden;
}

.fabricantes-heading {
  margin-bottom: 14px;
}

.fabricantes-total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #d7e5ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.fabricantes-content {
  display: grid;
  grid-template-columns: minmax(150px, 0.82fr) minmax(150px, 1fr);
  gap: 16px;
  align-items: center;
}

.fabricantes-donut-wrap {
  min-width: 0;
  display: grid;
  place-items: center;
}

.fabricantes-donut {
  width: min(210px, 100%);
  height: auto;
  display: block;
  overflow: visible;
}

.fabricantes-donut-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 16;
}

.fabricantes-donut-segment {
  fill: none;
  stroke: currentColor;
  stroke-width: 16;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-width 0.18s ease, opacity 0.18s ease;
  cursor: help;
}

.fabricantes-donut-segment:hover {
  stroke-width: 18;
  opacity: 0.92;
}

.fabricantes-donut-total {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.fabricantes-donut-label {
  fill: #64748b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.fabricantes-donut-blue,
.fabricantes-dot-blue { color: #2563eb; background: #2563eb; }
.fabricantes-donut-green,
.fabricantes-dot-green { color: #16a34a; background: #16a34a; }
.fabricantes-donut-gold,
.fabricantes-dot-gold { color: #f59e0b; background: #f59e0b; }
.fabricantes-donut-red,
.fabricantes-dot-red { color: #ef4444; background: #ef4444; }
.fabricantes-donut-purple,
.fabricantes-dot-purple { color: #7c3aed; background: #7c3aed; }
.fabricantes-donut-cyan,
.fabricantes-dot-cyan { color: #06b6d4; background: #06b6d4; }
.fabricantes-donut-slate,
.fabricantes-dot-slate { color: #94a3b8; background: #94a3b8; }
.fabricantes-donut-indigo,
.fabricantes-dot-indigo { color: #4f46e5; background: #4f46e5; }
.fabricantes-donut-emerald,
.fabricantes-dot-emerald { color: #059669; background: #059669; }
.fabricantes-donut-amber,
.fabricantes-dot-amber { color: #d97706; background: #d97706; }
.fabricantes-donut-pink,
.fabricantes-dot-pink { color: #db2777; background: #db2777; }
.fabricantes-donut-teal,
.fabricantes-dot-teal { color: #0f766e; background: #0f766e; }

.fabricantes-legend {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.fabricantes-legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 13px;
  background: #f8fafc;
}

.fabricantes-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.fabricantes-legend strong,
.fabricantes-legend small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fabricantes-legend strong {
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 800;
}

.fabricantes-legend small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 650;
}

.fabricantes-footer {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
  color: #64748b;
  font-size: 0.78rem;
}

.fabricantes-footer small {
  color: #94a3b8;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fabricantes-empty {
  min-height: 190px;
  display: grid;
  align-content: center;
}

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

.distributor-card {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.23);
  background: #ffffff;
}

.dist-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.dist-topline h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.dist-topline span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
}

.dist-topline strong {
  color: #0f172a;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.dist-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.dist-numbers span {
  padding: 8px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.76rem;
  text-align: center;
}

.dist-numbers strong {
  display: block;
  color: #0f172a;
  font-size: 0.98rem;
}

.dist-footnote {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dist-success { box-shadow: inset 0 0 0 1px rgba(34,197,94,0.05); }
.dist-warning { box-shadow: inset 0 0 0 1px rgba(245,158,11,0.08); }
.dist-danger { box-shadow: inset 0 0 0 1px rgba(239,68,68,0.08); }


@media (max-width: 1480px) {
  .fabricantes-content {
    grid-template-columns: 1fr;
  }

  .fabricantes-donut {
    width: min(180px, 100%);
  }
}

@media (max-width: 1320px) {
  .executive-kpi-grid,
  .distributor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .executive-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .premium-hero,
  .section-heading,
  .section-heading.compact,
  .score-main {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .executive-kpi-grid,
  .distributor-grid,
  .normalizacao-facts {
    grid-template-columns: 1fr;
  }
  .overall-card {
    width: 100%;
  }
}

/* V23.2 - Seletor de período da Dashboard Executiva */
.period-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.period-chip {
  appearance: none;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.period-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.period-chip.is-active {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.fsu-radio-card {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fsu-radio-group-inline {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.fsu-radio-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 14px;
  color: #475569;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}

.fsu-radio-inline input[type="radio"] {
  margin: 0;
}

.fsu-radio-disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.fsu-radio-disabled input[type="radio"] {
  cursor: not-allowed;
}

.fsu-mode-mysql-hint {
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.fsu-mode-mysql-hint.is-production {
  color: #15803d;
}

.fsu-mode-mysql-hint.is-test {
  color: #b45309;
}

/* Padroniza Modo e Headless com o visual da Fonte dos SKUs */
.fsu-radio-inline {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

/* Texto interno do radio */
.fsu-radio-inline span {
  font-weight: 700;
  color: inherit;
}

/* Mantém alinhamento fino dos radios */
.fsu-radio-inline input[type="radio"] {
  margin: 0;
}

/* Headless "Sim" desabilitado, mas ainda no mesmo padrão visual */
.fsu-radio-disabled {
  font-weight: 700;
  color: #94a3b8;
  opacity: 1;
  cursor: not-allowed;
}

.fsu-radio-disabled span {
  font-weight: 700;
  color: #94a3b8;
}

/* Mantém a mensagem do modo menor e separada do padrão dos radios */
.fsu-mode-mysql-hint {
  font-size: 11px;
  font-weight: 700;
}

/* =========================================================
   SCC Sidebar Branding - Lanworks logo + versão 2.20.3
   Escopo isolado: substitui o bloco visual do topo da sidebar
   sem alterar navegação, permissões ou cards operacionais.
   ========================================================= */
.sidebar .scc-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 6px 4px;
  margin: -4px 0 -2px;
  text-align: center;
}

.sidebar .scc-sidebar-logo {
  display: block;
  width: 118px;
  max-width: 88%;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 4px;
}

.sidebar .scc-sidebar-subtitle {
  color: #5f6f89;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.15;
  margin-top: 0;
  white-space: nowrap;
}

.sidebar .scc-sidebar-version {
  color: #7c8aa1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-top: 5px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .sidebar .scc-sidebar-brand {
    align-items: flex-start;
    text-align: left;
    padding-left: 0;
  }

  .sidebar .scc-sidebar-logo {
    width: 112px;
    margin-left: 0;
  }
}

/* V23.4 - Dashboard Executivo | Rebalanceamento Grupo 2 + Top fabricantes LI */
@media (min-width: 1321px) {
  .executive-split-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(480px, 0.98fr);
    gap: 20px;
    align-items: stretch;
  }

  .score-panel,
  .fabricantes-panel {
    min-width: 0;
  }

  .score-main {
    grid-template-columns: minmax(145px, 0.42fr) minmax(250px, 0.58fr);
    gap: 18px;
    padding: 4px 0 14px;
  }

  .score-value {
    font-size: 3.65rem;
  }

  .score-subtitle {
    font-size: 0.86rem;
  }

  .score-gauge,
  .dist-bar {
    height: 16px;
  }

  .normalizacao-facts {
    gap: 9px;
  }

  .normalizacao-facts div {
    padding: 11px 12px;
  }

  .chain-note {
    margin-top: 10px;
  }

  .fabricantes-content {
    grid-template-columns: minmax(190px, 0.82fr) minmax(260px, 1fr) !important;
    gap: 18px;
    align-items: center;
  }

  .fabricantes-donut {
    width: min(230px, 100%);
  }

  .fabricantes-legend {
    gap: 7px;
  }

  .fabricantes-legend li {
    min-height: 42px;
    padding: 6px 8px;
  }
}

@media (max-width: 1320px) {
  .fabricantes-content {
    grid-template-columns: minmax(220px, 0.55fr) minmax(280px, 1fr);
    gap: 18px;
  }

  .fabricantes-donut {
    width: min(230px, 100%);
  }
}

@media (max-width: 900px) {
  .fabricantes-content {
    grid-template-columns: 1fr;
  }
}


/* V23.5 - Dashboard Executivo | Top 11 fabricantes, donut maior e legenda compacta em 2 colunas */
@media (min-width: 1321px) {
  .executive-split-grid {
    grid-template-columns: minmax(420px, 0.82fr) minmax(680px, 1.18fr);
    gap: 20px;
    align-items: stretch;
  }

  .score-panel {
    padding: 24px 20px;
  }

  .score-main {
    grid-template-columns: minmax(130px, 0.36fr) minmax(220px, 0.64fr);
    gap: 14px;
    padding: 2px 0 12px;
  }

  .score-value {
    font-size: 3.35rem;
  }

  .score-gauge,
  .dist-bar {
    height: 14px;
  }

  .normalizacao-facts {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .normalizacao-facts div {
    padding: 10px 12px;
  }

  .fabricantes-panel {
    padding: 24px 20px 20px;
  }

  .fabricantes-heading {
    margin-bottom: 10px;
  }

  .fabricantes-content {
    grid-template-columns: minmax(290px, 0.82fr) minmax(390px, 1.18fr) !important;
    gap: 18px;
    align-items: center;
  }

  .fabricantes-donut {
    width: min(300px, 100%);
  }

  .fabricantes-donut-bg,
  .fabricantes-donut-segment {
    stroke-width: 15;
  }

  .fabricantes-donut-segment:hover {
    stroke-width: 17;
  }

  .fabricantes-donut-total {
    font-size: 12.5px;
  }

  .fabricantes-donut-label {
    font-size: 7.5px;
  }

  .fabricantes-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    align-content: center;
  }

  .fabricantes-legend li {
    min-height: 38px;
    padding: 6px 7px;
    border-radius: 11px;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 7px;
  }

  .fabricantes-dot {
    width: 8px;
    height: 8px;
  }

  .fabricantes-legend strong {
    font-size: 0.73rem;
    line-height: 1.08;
  }

  .fabricantes-legend small {
    font-size: 0.64rem;
    line-height: 1.12;
    margin-top: 1px;
  }

  .fabricantes-footer {
    margin-top: 9px;
    padding-top: 8px;
    font-size: 0.72rem;
  }

  .fabricantes-footer small {
    font-size: 0.66rem;
  }
}

@media (min-width: 901px) and (max-width: 1320px) {
  .fabricantes-content {
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: 16px;
  }

  .fabricantes-donut {
    width: min(285px, 100%);
  }

  .fabricantes-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
  }

  .fabricantes-legend li {
    min-height: 38px;
    padding: 6px 7px;
  }

  .fabricantes-legend strong {
    font-size: 0.73rem;
  }

  .fabricantes-legend small {
    font-size: 0.64rem;
  }
}

@media (max-width: 900px) {
  .fabricantes-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fabricantes-legend {
    grid-template-columns: 1fr;
  }
}

/* SCC Modal Global ------------------------------------------------------ */
.scc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(5px);
  animation: sccModalFadeIn 0.14s ease-out;
}
.scc-modal-backdrop.scc-modal-closing {
  animation: sccModalFadeOut 0.12s ease-in forwards;
}
.scc-modal-card {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
  padding: 22px;
  color: #0f172a;
  animation: sccModalSlideIn 0.16s ease-out;
}
.scc-modal-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.scc-modal-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #1d4ed8;
  background: #dbeafe;
}
.scc-modal-warning .scc-modal-icon { color: #92400e; background: #fef3c7; }
.scc-modal-success .scc-modal-icon { color: #047857; background: #d1fae5; }
.scc-modal-danger .scc-modal-icon { color: #b91c1c; background: #fee2e2; }
.scc-modal-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.scc-modal-subtitle,
.scc-modal-message {
  margin: 6px 0 0;
  color: #475569;
  line-height: 1.55;
}
.scc-modal-message {
  margin-top: 10px;
  font-size: 14px;
}
.scc-modal-details {
  margin: 14px 0 0;
  padding: 12px 14px 12px 32px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}
.scc-modal-meta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.scc-modal-meta div {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 14px;
  padding: 9px 10px;
}
.scc-modal-meta span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.scc-modal-meta strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 13px;
  word-break: break-word;
}
.scc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.scc-modal-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.scc-modal-btn:hover { transform: translateY(-1px); }
.scc-modal-btn-secondary {
  color: #334155;
  background: #e2e8f0;
}
.scc-modal-btn-primary {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}
.scc-modal-btn-danger {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22);
}
.scc-modal-btn-ghost {
  color: #2563eb;
  background: #dbeafe;
}
@keyframes sccModalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sccModalFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sccModalSlideIn { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 640px) {
  .scc-modal-backdrop { padding: 14px; align-items: flex-end; }
  .scc-modal-card { border-radius: 20px; padding: 18px; }
  .scc-modal-meta { grid-template-columns: 1fr; }
  .scc-modal-actions { justify-content: stretch; }
  .scc-modal-btn { flex: 1 1 auto; }
}

/* =========================================================
   HOTFIX VENDAS | Consulta SKU + disponibilidade
   Escopo isolado para nao alterar Orcamento, Dashboard ou
   outras telas que reutilizam classes genericas de Vendas.
   Data: 2026-07-16
   ========================================================= */

/* Impede que o conteudo principal force overflow dentro do app-shell. */
.sales-sku-main {
  min-width: 0;
}

/*
 * O formulario recebe uma coluna controlada e a disponibilidade
 * ocupa todo o espaco restante. A regra e mais especifica que o
 * breakpoint generico existente de .sales-grid-row-top.
 */
.sales-sku-main .sales-sku-top-grid {
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  align-items: stretch;
}

.sales-sku-main .sales-consult-panel,
.sales-sku-main .sales-offers-panel-top {
  min-width: 0;
}

/* O campo pode usar toda a largura util do card reduzido. */
.sales-sku-main .sales-consult-panel .sales-form-row.compact input {
  width: 100%;
  min-width: 0;
  max-width: none;
}

/* Garante que cabecalho e metadados nao roubem largura da tabela. */
.sales-sku-main .sales-offers-panel-top .sales-panel-header {
  align-items: flex-start;
}

.sales-sku-main .sales-offers-panel-top .sales-header-meta {
  justify-content: flex-end;
}

/*
 * Em telas largas a tabela usa todo o card. Em larguras menores,
 * a largura minima preserva a leitura e o wrapper fornece scroll X.
 */
.sales-sku-main .sales-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}

.sales-sku-main .sales-availability-table {
  width: 100%;
  min-width: 660px;
  table-layout: fixed;
}

.sales-sku-main .sales-availability-table .sales-col-distributor {
  width: 15%;
}

.sales-sku-main .sales-availability-table .sales-col-warehouse {
  width: 11%;
}

.sales-sku-main .sales-availability-table .sales-col-product {
  width: 34%;
}

.sales-sku-main .sales-availability-table .sales-col-stock {
  width: 10%;
}

.sales-sku-main .sales-availability-table .sales-col-cost {
  width: 13%;
}

.sales-sku-main .sales-availability-table .sales-col-reference {
  width: 17%;
}

.sales-sku-main .sales-availability-table thead th {
  vertical-align: middle;
  white-space: nowrap;
}

.sales-sku-main .sales-availability-table tbody td {
  vertical-align: middle;
}

/* Colunas curtas permanecem em uma linha e nao comprimem Produto. */
.sales-sku-main .sales-availability-table th:nth-child(1),
.sales-sku-main .sales-availability-table td:nth-child(1),
.sales-sku-main .sales-availability-table th:nth-child(2),
.sales-sku-main .sales-availability-table td:nth-child(2),
.sales-sku-main .sales-availability-table th:nth-child(4),
.sales-sku-main .sales-availability-table td:nth-child(4),
.sales-sku-main .sales-availability-table th:nth-child(5),
.sales-sku-main .sales-availability-table td:nth-child(5),
.sales-sku-main .sales-availability-table th:nth-child(6),
.sales-sku-main .sales-availability-table td:nth-child(6) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Estoque e custo ficam alinhados para comparacao rapida. */
.sales-sku-main .sales-availability-table th:nth-child(4),
.sales-sku-main .sales-availability-table td:nth-child(4),
.sales-sku-main .sales-availability-table th:nth-child(5),
.sales-sku-main .sales-availability-table td:nth-child(5) {
  text-align: right;
}

/* Nome do produto: no maximo duas linhas, sem aumentar a coluna. */
.sales-sku-main .sales-product-cell {
  white-space: normal;
  overflow: hidden;
}

.sales-sku-main .sales-product-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.35;
  max-height: 2.7em;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Estado vazio precisa ocupar as seis colunas sem herdar alinhamento numerico. */
.sales-sku-main .sales-availability-table .sales-table-empty {
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/*
 * Mantem os dois cards lado a lado em notebooks usuais, apesar do
 * breakpoint generico de 1280px existente. Abaixo de 1280px empilha.
 */
@media (max-width: 1180px) {
  .sales-sku-main .sales-sku-top-grid {
    grid-template-columns: 1fr;
  }

  .sales-sku-main .sales-consult-panel .sales-form-row.compact input {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .sales-sku-main .sales-offers-panel-top .sales-panel-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sales-sku-main .sales-offers-panel-top .sales-header-meta {
    justify-content: flex-start;
  }

  .sales-sku-main .sales-availability-table {
    min-width: 660px;
  }
}

/* =========================================================
   HOTFIX VENDAS V5 | Selecao pelo nome do produto
   Escopo isolado: .sales-sku-main
   Requer backend de selecao V4 ja aplicado.
   Data: 2026-07-16
   ========================================================= */

.sales-sku-main .sales-availability-table tbody tr.sales-offer-row {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.sales-sku-main .sales-availability-table tbody tr.sales-offer-row:hover td {
  background: #f5f8ff;
}

.sales-sku-main .sales-availability-table tbody tr.sales-offer-row.is-selected td {
  background: #eef4ff;
}

.sales-sku-main .sales-availability-table tbody tr.sales-offer-row.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--primary);
}

/* A referencia volta a ser apenas informativa, sem botao ou acao visual. */
.sales-sku-main .sales-availability-table .sales-reference-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-sku-main .sales-reference-value {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* O proprio nome do produto passa a ser o controle de selecao. */
.sales-sku-main .sales-product-link {
  color: #214f91;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.sales-sku-main .sales-product-link:hover {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.sales-sku-main .sales-product-link:focus-visible {
  border-radius: 5px;
  outline: 3px solid rgba(47, 111, 236, 0.18);
  outline-offset: 3px;
}

.sales-sku-main .sales-product-name-selected {
  color: var(--text);
  cursor: default;
  font-weight: 800;
}

.sales-sku-main #produto-detalhes,
.sales-sku-main #produto-especificacao {
  scroll-margin-top: 18px;
}

.sales-sku-main .sales-selected-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.sales-sku-main .sales-selected-note::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 236, 0.10);
}
/* Vendas SKU | Destaque profissional do part number */
.sales-sku-main .sales-partnumber-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 6px 12px;

  border: 1px solid #e3bd55;
  border-radius: 999px;

  background: linear-gradient(
    180deg,
    #fff8d8 0%,
    #ffe9a6 100%
  );

  color: #765500;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(183, 121, 31, 0.10);

  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

/* =========================================================
   Gestão Pedidos | Ações fixas e dependências visíveis V1
   Mantém Detalhes, Revisar, E-mail, Salvar e PDF na mesma
   posição, inclusive quando E-mail/PDF estão indisponíveis.
   ========================================================= */
.gestao-pedidos-main .gp-orders-table th:last-child,
.gestao-pedidos-main .gp-orders-table td.gp-actions-cell {
  width: 330px;
  min-width: 330px;
}

.gestao-pedidos-main .gp-actions-cell {
  vertical-align: middle;
}

.gestao-pedidos-main .gp-row-actions-block {
  display: grid;
  gap: 4px;
  min-width: 306px;
}

.gestao-pedidos-main .gp-row-actions {
  display: grid;
  grid-template-columns: 62px 58px 54px 54px 42px;
  gap: 6px;
  align-items: center;
  justify-content: start;
  flex-wrap: initial;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 0.70rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn.is-disabled,
.gestao-pedidos-main .gp-row-actions .gp-action-btn:disabled {
  border-color: #d8e0ea;
  background: #f3f5f8;
  color: #8a98aa;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn:disabled:hover {
  border-color: #d8e0ea;
  background: #f3f5f8;
  color: #8a98aa;
  transform: none;
}

.gestao-pedidos-main .gp-action-hint {
  display: block;
  min-height: 13px;
  max-width: 306px;
  overflow: hidden;
  color: #8a6512;
  font-size: 0.61rem;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gestao-pedidos-main .gp-action-hint.is-placeholder {
  visibility: hidden;
}

.gestao-pedidos-main .gp-download-link {
  text-align: center;
}

@media (max-width: 1180px) {
  .gestao-pedidos-main .gp-orders-table th:last-child,
  .gestao-pedidos-main .gp-orders-table td.gp-actions-cell {
    width: 320px;
    min-width: 320px;
  }
}


/* =========================================================
   Gestão Pedidos Executiva V2
   Períodos, KPIs, tabela operacional, comparação e ações.
   Escopo isolado para não impactar outros módulos do SCC.
   ========================================================= */
.gestao-pedidos-main {
  --gp-navy: #0f2747;
  --gp-blue: #2f6fec;
  --gp-blue-dark: #1f57c3;
  --gp-blue-soft: #edf4ff;
  --gp-green: #23875a;
  --gp-green-soft: #edf8f2;
  --gp-amber: #a86d0c;
  --gp-amber-soft: #fff7e5;
  --gp-slate: #687a90;
  --gp-line: #d9e3ef;
  --gp-shadow: 0 14px 34px rgba(15, 39, 71, .075);
}

.gestao-pedidos-main .gestao-pedidos-topbar {
  align-items: flex-end;
  margin-bottom: 14px;
}

.gestao-pedidos-main .gp-page-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gp-blue);
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gestao-pedidos-main .gestao-pedidos-topbar h1 {
  font-size: 1.65rem;
  letter-spacing: -.035em;
}

.gestao-pedidos-main .gp-topbar-actions .ghost-btn,
.gestao-pedidos-main .gp-topbar-actions .primary-btn {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: .76rem;
  font-weight: 750;
}

.gestao-pedidos-main .gp-topbar-actions .is-disabled {
  color: #95a2b2;
  background: #f3f5f8;
  cursor: help;
}

.gestao-pedidos-main .gp-period-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(420px, 1.5fr) minmax(190px, .7fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--gp-line);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(246,249,253,.98));
  box-shadow: var(--gp-shadow);
}

.gestao-pedidos-main .gp-period-copy span,
.gestao-pedidos-main .gp-period-copy strong,
.gestao-pedidos-main .gp-period-copy small,
.gestao-pedidos-main .gp-period-meta span,
.gestao-pedidos-main .gp-period-meta strong {
  display: block;
}

.gestao-pedidos-main .gp-period-copy span,
.gestao-pedidos-main .gp-period-meta span {
  color: #71839a;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.gestao-pedidos-main .gp-period-copy strong {
  margin-top: 3px;
  color: var(--gp-navy);
  font-size: .91rem;
}

.gestao-pedidos-main .gp-period-copy small {
  margin-top: 3px;
  color: #687c94;
  font-size: .68rem;
}

.gestao-pedidos-main .gp-period-meta {
  justify-self: end;
  min-width: 180px;
  padding: 8px 11px;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: right;
}

.gestao-pedidos-main .gp-period-meta strong {
  margin-top: 4px;
  color: var(--gp-navy);
  font-size: .76rem;
}

.gestao-pedidos-main .gp-period-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 4px;
  border: 1px solid #dce5f0;
  border-radius: 13px;
  background: #edf2f7;
}

.gestao-pedidos-main .gp-period-chip {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #5b6f87;
  font-size: .71rem;
  font-weight: 750;
  cursor: pointer;
  transition: .16s ease;
}

.gestao-pedidos-main .gp-period-chip:hover {
  color: var(--gp-navy);
  background: rgba(255,255,255,.72);
}

.gestao-pedidos-main .gp-period-chip.is-active {
  color: #fff;
  border-color: #215bc8;
  background: linear-gradient(135deg, #3477ef, #2461d0);
  box-shadow: 0 7px 15px rgba(47,111,236,.22);
}

.gestao-pedidos-main .gp-summary-grid-executive {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card {
  position: relative;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 92px;
  padding: 14px;
  overflow: hidden;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #f8fafc);
  box-shadow: var(--gp-shadow);
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card::after {
  content: "";
  position: absolute;
  right: -27px;
  top: -31px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(47,111,236,.055);
}

.gestao-pedidos-main .gp-summary-icon {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d4e0f0;
  border-radius: 12px;
  background: #edf4ff;
  color: var(--gp-blue);
  font-size: .72rem;
  font-weight: 900;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card > div:last-child {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card span {
  font-size: .63rem;
  letter-spacing: .045em;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card strong {
  margin: 2px 0;
  font-size: 1.12rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card em {
  font-size: .63rem;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card-highlight {
  border-color: #aecaef;
  background: linear-gradient(145deg, #eef5ff 0%, #ffffff 76%);
  box-shadow: 0 16px 36px rgba(35,94,190,.12);
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card-highlight .gp-summary-icon {
  border-color: #adcaef;
  background: #dceaff;
  color: #1756b8;
}

.gestao-pedidos-main .gp-summary-grid-executive .gp-summary-card-highlight strong {
  color: #1557bd;
  font-size: 1.22rem;
}

.gestao-pedidos-main .gp-summary-card-rate .gp-summary-icon {
  color: var(--gp-green);
  border-color: #c8e4d5;
  background: var(--gp-green-soft);
}

.gestao-pedidos-main .gp-filter-panel,
.gestao-pedidos-main .gp-table-panel {
  border-radius: 18px;
  box-shadow: var(--gp-shadow);
}

.gestao-pedidos-main .gp-period-tag {
  background: #edf4ff;
  border-color: #cbdcf6;
  color: #2e5f9e;
}

.gestao-pedidos-main .gp-filter-grid {
  grid-template-columns: minmax(220px, 1.3fr) minmax(130px, .65fr) minmax(125px, .65fr) minmax(175px, .9fr) minmax(135px, .68fr) minmax(135px, .68fr) auto;
  gap: 10px;
}

.gestao-pedidos-main .gp-filter-grid input,
.gestao-pedidos-main .gp-filter-grid select {
  min-height: 38px;
  border-radius: 10px;
  font-size: .77rem;
}

.gestao-pedidos-main .gp-filter-grid label span {
  font-size: .64rem;
}

.gestao-pedidos-main .gp-filter-actions .primary-btn,
.gestao-pedidos-main .gp-filter-actions .ghost-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: .74rem;
}

.gestao-pedidos-main .gp-table-panel {
  padding: 12px 14px 14px;
}

.gestao-pedidos-main .gp-table-wrapper {
  max-height: 620px;
  padding: 0 2px 2px;
}

.gestao-pedidos-main .gp-orders-table {
  border-collapse: separate;
  border-spacing: 0 7px;
  overflow: visible;
}

.gestao-pedidos-main .gp-orders-table thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.gestao-pedidos-main .gp-orders-table thead th {
  padding: 9px 9px;
  border-top: 1px solid #dce5ef;
  border-bottom: 1px solid #ccd8e5;
  background: #f2f6fa;
  color: #5f748d;
  font-size: .65rem;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.gestao-pedidos-main .gp-orders-table thead th:first-child {
  border-left: 1px solid #dce5ef;
  border-radius: 10px 0 0 10px;
}

.gestao-pedidos-main .gp-orders-table thead th:last-child {
  border-right: 1px solid #dce5ef;
  border-radius: 0 10px 10px 0;
}

.gestao-pedidos-main .gp-orders-table tbody td {
  padding: 11px 9px;
  border-top: 1px solid #e1e8f0;
  border-bottom: 1px solid #e1e8f0;
  background: #fff;
  color: #2c4564;
  font-size: .72rem;
  vertical-align: middle;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.gestao-pedidos-main .gp-orders-table tbody td:first-child {
  border-left: 1px solid #e1e8f0;
  border-radius: 12px 0 0 12px;
  box-shadow: inset 3px 0 0 transparent;
}

.gestao-pedidos-main .gp-orders-table tbody td:last-child {
  border-right: 1px solid #e1e8f0;
  border-radius: 0 12px 12px 0;
}

.gestao-pedidos-main .gp-orders-table tbody tr:hover td {
  border-color: #cedbea;
  background: #f9fbfe;
}

.gestao-pedidos-main .gp-order-number {
  color: #092b52;
  font-size: .75rem;
}

.gestao-pedidos-main .gp-customer-name {
  color: #1f3e63;
  font-weight: 720;
}

.gestao-pedidos-main .gp-order-value {
  color: #102e51;
  font-size: .78rem;
}

.gestao-pedidos-main .gp-origin-badge {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid #dae4ef;
  border-radius: 999px;
  background: #f7f9fc;
  color: #60748b;
  font-size: .62rem;
  font-weight: 750;
}

.gestao-pedidos-main .gp-order-row-closed td {
  border-color: #bcd3f3 !important;
  background: #edf5ff !important;
}

.gestao-pedidos-main .gp-order-row-closed td:first-child {
  box-shadow: inset 4px 0 0 #2f6fec;
}

.gestao-pedidos-main .gp-order-row-closed:hover td {
  background: #e5f0ff !important;
}

.gestao-pedidos-main .gp-order-row-cancelled td {
  border-color: #d9dee5 !important;
  background: #f1f3f5 !important;
  color: #808b98 !important;
}

.gestao-pedidos-main .gp-order-row-cancelled td:first-child {
  box-shadow: inset 4px 0 0 #9aa4b0;
}

.gestao-pedidos-main .gp-order-row-cancelled .gp-order-number,
.gestao-pedidos-main .gp-order-row-cancelled .gp-customer-name,
.gestao-pedidos-main .gp-order-row-cancelled .gp-order-value {
  color: #697481;
}

.gestao-pedidos-main .gp-status-select {
  width: 92px;
  min-height: 32px;
  padding: 0 24px 0 9px;
  border-radius: 9px;
  font-size: .67rem;
}

.gestao-pedidos-main .gp-status-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
}

.gestao-pedidos-main .gp-status-static.is-cancelled {
  border: 1px solid #cdd3db;
  background: #e2e5e9;
  color: #687380;
}

.gestao-pedidos-main .gp-orders-table th:last-child,
.gestao-pedidos-main .gp-orders-table td.gp-actions-cell {
  width: 318px;
  min-width: 318px;
}

.gestao-pedidos-main .gp-row-actions {
  display: grid;
  grid-template-columns: 61px 57px 52px 52px 39px;
  gap: 5px;
  align-items: center;
  justify-content: start;
  min-width: 0;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 29px;
  height: 29px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: .62rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn.is-unavailable {
  border-color: #d5dce5;
  background: #edf0f4;
  color: #9aa5b2;
  box-shadow: none;
  cursor: help;
}

.gestao-pedidos-main .gp-row-actions .gp-action-btn.is-unavailable:hover {
  border-color: #c6ced9;
  background: #e8ebef;
  color: #7d8997;
}

.gestao-pedidos-main .gp-row-actions-cancelled {
  display: flex;
  min-width: 0;
}

.gestao-pedidos-main .gp-reopen-btn {
  min-width: 86px;
  min-height: 31px;
  border: 1px solid #9ebce7;
  border-radius: 9px;
  background: #e8f1ff;
  color: #205db7;
  font-size: .66rem;
  font-weight: 800;
  cursor: pointer;
  transition: .15s ease;
}

.gestao-pedidos-main .gp-reopen-btn:hover {
  border-color: #6594d8;
  background: #dbeaff;
  transform: translateY(-1px);
}

.gestao-pedidos-main .gp-action-hint,
.gestao-pedidos-main .gp-row-actions-block > small {
  display: none !important;
}

.gestao-pedidos-main .gp-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 11000;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 15px;
  border: 1px solid #cbd9ea;
  border-radius: 13px;
  background: #fff;
  color: #264667;
  box-shadow: 0 18px 44px rgba(15,39,71,.20);
  font-size: .78rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.gestao-pedidos-main .gp-toast.is-visible { opacity: 1; transform: translateY(0); }
.gestao-pedidos-main .gp-toast.is-success { border-color: #b7dfc7; background: #f0faf4; color: #236e45; }
.gestao-pedidos-main .gp-toast.is-warning { border-color: #ead39d; background: #fff8e8; color: #855f12; }
.gestao-pedidos-main .gp-toast.is-error { border-color: #efc1c1; background: #fff2f2; color: #a33c3c; }

.gestao-pedidos-main .gp-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gestao-pedidos-main .gp-modal.is-open { display: flex; }
.gestao-pedidos-main .gp-modal-backdrop { position: absolute; inset: 0; background: rgba(11,29,51,.54); backdrop-filter: blur(4px); }
.gestao-pedidos-main .gp-modal-card { position: relative; width: min(960px, 96vw); max-height: 90vh; overflow: auto; padding: 20px; border: 1px solid #ccd9e9; border-radius: 21px; background: #fff; box-shadow: 0 30px 80px rgba(8,28,52,.30); }
.gestao-pedidos-main .gp-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 13px; border-bottom: 1px solid #e3eaf2; }
.gestao-pedidos-main .gp-modal-kicker { color: var(--gp-blue); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.gestao-pedidos-main .gp-modal-header h2 { margin: 4px 0; color: var(--gp-navy); font-size: 1.25rem; }
.gestao-pedidos-main .gp-modal-header p { margin: 0; color: #687b92; font-size: .76rem; }
.gestao-pedidos-main .gp-modal-close { width: 36px; height: 36px; border: 1px solid #d7e1ed; border-radius: 10px; background: #f7f9fc; color: #34506f; font-size: 1.25rem; cursor: pointer; }
.gestao-pedidos-main .gp-comparison-loading { min-height: 160px; display: grid; place-items: center; color: #718298; font-size: .82rem; }
.gestao-pedidos-main .gp-comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 16px 0; }
.gestao-pedidos-main .gp-comparison-metric { position: relative; padding: 13px; border: 1px solid #dee7f1; border-radius: 14px; background: #f9fbfd; }
.gestao-pedidos-main .gp-comparison-metric > span { display: block; color: #6b7e95; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.gestao-pedidos-main .gp-comparison-values { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; }
.gestao-pedidos-main .gp-comparison-values strong { color: var(--gp-navy); font-size: 1.03rem; }
.gestao-pedidos-main .gp-comparison-values small { color: #8090a3; font-size: .7rem; }
.gestao-pedidos-main .gp-comparison-metric em { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 999px; font-size: .65rem; font-style: normal; font-weight: 800; }
.gestao-pedidos-main .gp-comparison-metric em.is-up { background: #eaf8f0; color: #28764d; }
.gestao-pedidos-main .gp-comparison-metric em.is-down { background: #fff0f0; color: #a34242; }
.gestao-pedidos-main .gp-comparison-metric em.is-flat { background: #eef2f6; color: #64768b; }
.gestao-pedidos-main .gp-comparison-charts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.gestao-pedidos-main .gp-comparison-chart { padding: 13px; border: 1px solid #dce6f0; border-radius: 14px; background: #fff; }
.gestao-pedidos-main .gp-comparison-chart header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gestao-pedidos-main .gp-comparison-chart header strong { color: #284662; font-size: .73rem; }
.gestao-pedidos-main .gp-comparison-chart header span { color: #62758c; font-size: .67rem; font-weight: 750; }
.gestao-pedidos-main .gp-comparison-bar-row { display: grid; grid-template-columns: 76px minmax(0,1fr) 95px; gap: 8px; align-items: center; margin-top: 7px; }
.gestao-pedidos-main .gp-comparison-bar-row small { color: #687c93; font-size: .63rem; }
.gestao-pedidos-main .gp-comparison-bar-row > div { height: 8px; overflow: hidden; border-radius: 999px; background: #e8eef5; }
.gestao-pedidos-main .gp-comparison-bar-row i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #397df1, #245ec6); }
.gestao-pedidos-main .gp-comparison-bar-row.is-previous i { background: #9aabc0; }
.gestao-pedidos-main .gp-comparison-bar-row b { color: #2e4968; font-size: .65rem; text-align: right; }

@media (max-width: 1450px) {
  .gestao-pedidos-main .gp-summary-grid-executive { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .gestao-pedidos-main .gp-period-toolbar { grid-template-columns: minmax(180px,.6fr) minmax(400px,1.4fr); }
  .gestao-pedidos-main .gp-period-meta { grid-column: 1 / -1; justify-self: stretch; text-align: left; }
}

@media (max-width: 1180px) {
  .gestao-pedidos-main .gp-period-toolbar { grid-template-columns: 1fr; }
  .gestao-pedidos-main .gp-period-meta { min-width: 0; }
  .gestao-pedidos-main .gp-filter-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .gestao-pedidos-main .gp-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .gestao-pedidos-main .gestao-pedidos-topbar { align-items: flex-start; }
  .gestao-pedidos-main .gp-topbar-actions { width: 100%; }
  .gestao-pedidos-main .gp-summary-grid-executive,
  .gestao-pedidos-main .gp-filter-grid,
  .gestao-pedidos-main .gp-comparison-grid,
  .gestao-pedidos-main .gp-comparison-charts { grid-template-columns: 1fr; }
  .gestao-pedidos-main .gp-period-switcher { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* A linha já possui cor e status; evita badge duplicado no número do pedido. */
.gestao-pedidos-main .gp-orders-table tbody tr.gp-order-row-closed td:first-child strong::after {
  content: none;
  display: none;
}


/* ==========================================================================\n   Fullscrape Atualizacao - Console Operacional V2 (2026-08-10)\n   Contrato visual unico para todos os distribuidores.\n   ========================================================================== */
.fullscrape-update-panel .fsu-console-panel {
  min-height: 0;
  align-self: start;
  border-color: #d9e2ee;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.fullscrape-update-panel .fsu-console-header {
  margin-bottom: 18px;
}

.fsu-console-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fsu-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fsu-state-badge.is-running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.fsu-state-badge.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.fsu-state-badge.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.fsu-state-badge.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.fsu-job-reference {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
}

.fsu-live-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 38px 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  text-align: center;
}

.fsu-live-empty .fsu-empty-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef2f7;
  color: #94a3b8;
  font-size: 0.78rem;
}

.fsu-live-empty strong {
  font-size: 1rem;
  color: #1e293b;
}

.fsu-live-empty span {
  max-width: 470px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.fsu-live-content {
  display: grid;
  gap: 12px;
}

.fullscrape-update-panel .fsu-live-status {
  margin: 0;
  padding: 18px;
  border-radius: 18px;
  border-color: #dce5ef;
  background: #fbfdff;
  box-shadow: none;
}

.fullscrape-update-panel .fsu-live-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.fsu-live-heading-copy {
  min-width: 0;
}

.fullscrape-update-panel .fsu-live-head strong {
  font-size: 1.18rem;
  letter-spacing: -0.015em;
  color: #0f172a;
}

.fsu-live-message {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 0.79rem;
  line-height: 1.45;
}

.fsu-live-provider-block {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.fsu-live-updated {
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
}

.fullscrape-update-panel .fsu-live-provider {
  min-height: 28px;
  padding: 5px 9px;
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.69rem;
}

.fullscrape-update-panel .fsu-progress-track {
  height: 8px;
  border: 0;
  background: #e8eef6;
}

.fullscrape-update-panel .fsu-progress-fill {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.fullscrape-update-panel .fsu-progress-meta {
  margin-top: 7px;
  font-size: 0.73rem;
}

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

.fsu-kpi {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #ffffff;
}

.fsu-kpi span,
.fsu-run-detail span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.fsu-kpi strong {
  display: block;
  color: #0f172a;
  font-size: 1.15rem;
  line-height: 1;
}

.fsu-kpi.is-success strong { color: #15803d; }
.fsu-kpi.is-warning strong { color: #a16207; }
.fsu-kpi.is-danger strong { color: #b91c1c; }

.fsu-run-details {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(105px, 0.65fr) minmax(105px, 0.65fr);
  gap: 8px;
  margin-top: 8px;
}

.fsu-run-detail {
  min-width: 0;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.fsu-run-detail strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
  font-size: 0.82rem;
}

.fsu-flow-card {
  padding: 15px 17px 16px;
  border: 1px solid #dce5ef;
  border-radius: 18px;
  background: #ffffff;
}

.fsu-flow-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fsu-flow-header > div > strong {
  display: block;
  color: #1e293b;
  font-size: 0.88rem;
}

.fsu-flow-header > span {
  max-width: 52%;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.fsu-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fsu-flow::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 7%;
  right: 7%;
  height: 2px;
  background: #e2e8f0;
}

.fsu-flow li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  color: #94a3b8;
  text-align: center;
}

.fsu-flow-dot {
  width: 15px;
  height: 15px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.fsu-flow li strong {
  width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fsu-flow li.is-done { color: #15803d; }
.fsu-flow li.is-done .fsu-flow-dot { background: #22c55e; box-shadow: 0 0 0 1px #22c55e; }
.fsu-flow li.is-current { color: #1d4ed8; }
.fsu-flow li.is-current .fsu-flow-dot { background: #3b82f6; box-shadow: 0 0 0 4px #dbeafe; }
.fsu-flow li.is-failed { color: #b91c1c; }
.fsu-flow li.is-failed .fsu-flow-dot { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }

.fullscrape-update-panel .fsu-console-details {
  margin-top: 12px;
  border-top: 1px solid #edf2f7;
}

.fullscrape-update-panel .fsu-console-details > summary {
  padding: 12px 2px 6px;
  color: #475569;
  font-size: 0.78rem;
}

.fsu-event-list {
  max-height: 270px;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.fsu-event {
  display: grid;
  grid-template-columns: 72px 70px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 12px;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.74rem;
  line-height: 1.4;
}

.fsu-event:last-child { border-bottom: 0; }
.fsu-event-time { color: #94a3b8; font-variant-numeric: tabular-nums; }
.fsu-event-level { font-size: 0.65rem; font-weight: 900; letter-spacing: 0.04em; color: #64748b; }
.fsu-event-message { min-width: 0; color: #334155; overflow-wrap: anywhere; }
.fsu-event.is-success .fsu-event-level { color: #15803d; }
.fsu-event.is-warning .fsu-event-level { color: #a16207; }
.fsu-event.is-error .fsu-event-level { color: #b91c1c; }

.fsu-event-empty {
  padding: 18px;
  color: #94a3b8;
  font-size: 0.76rem;
  text-align: center;
}

/* A antiga aparencia de terminal deixa de ser a face principal da operacao. */
.fullscrape-update-panel .fsu-console {
  min-height: 0;
  max-height: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-family: inherit;
}

@media (max-width: 1280px) {
  .fsu-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fsu-run-details {
    grid-template-columns: 1fr 1fr;
  }

  .fsu-run-detail-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .fsu-live-provider-block {
    justify-items: start;
  }

  .fsu-kpi-strip,
  .fsu-run-details {
    grid-template-columns: 1fr 1fr;
  }

  .fsu-flow {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .fsu-flow::before {
    top: 8px;
    bottom: 8px;
    left: 7px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .fsu-flow li {
    grid-template-columns: 15px 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .fsu-flow li strong {
    font-size: 0.72rem;
  }

  .fsu-flow-header {
    flex-direction: column;
  }

  .fsu-flow-header > span {
    max-width: none;
    text-align: left;
  }

  .fsu-event {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .fsu-event-level {
    display: none;
  }
}

/* ==========================================================================\n   Fullscrape Atualizacao - Console Operacional V3 (2026-08-10)\n   Mais contraste, host/data da execucao e detalhamento real de pendencias.\n   ========================================================================== */
.fullscrape-update-panel .fsu-console-panel {
  border: 1px solid #cfd9e7;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.fullscrape-update-panel .fsu-console-header {
  align-items: center;
  margin-bottom: 14px;
}

.fullscrape-update-panel .fsu-console-title-row h2 {
  font-size: 1.08rem;
}

.fsu-state-badge {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 0.7rem;
}

.fullscrape-update-panel .fsu-live-status {
  border: 1px solid #cbd8ea;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.fullscrape-update-panel .fsu-live-status.is-running {
  border-color: #93b9ff;
  box-shadow: inset 4px 0 0 #2563eb, 0 8px 22px rgba(37, 99, 235, 0.08);
}

.fullscrape-update-panel .fsu-live-status.is-success {
  border-color: #86d7a8;
  box-shadow: inset 4px 0 0 #16a34a, 0 8px 22px rgba(22, 163, 74, 0.07);
}

.fullscrape-update-panel .fsu-live-status.is-danger {
  border-color: #f0a5a5;
  box-shadow: inset 4px 0 0 #dc2626, 0 8px 22px rgba(220, 38, 38, 0.07);
}

.fullscrape-update-panel .fsu-live-status.is-warning {
  border-color: #f4cc74;
  box-shadow: inset 4px 0 0 #d97706, 0 8px 22px rgba(217, 119, 6, 0.07);
}

.fsu-phase-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.fsu-phase-dot {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 5px #f1f5f9;
}

.fsu-live-status.is-running .fsu-phase-dot {
  background: #2563eb;
  box-shadow: 0 0 0 5px #dbeafe;
  animation: fsuPulse 1.35s ease-in-out infinite;
}

.fsu-live-status.is-success .fsu-phase-dot {
  background: #16a34a;
  box-shadow: 0 0 0 5px #dcfce7;
}

.fsu-live-status.is-danger .fsu-phase-dot {
  background: #dc2626;
  box-shadow: 0 0 0 5px #fee2e2;
}

.fsu-live-status.is-warning .fsu-phase-dot {
  background: #d97706;
  box-shadow: 0 0 0 5px #fef3c7;
}

@keyframes fsuPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.72; }
}

.fullscrape-update-panel .fsu-live-head strong {
  font-size: 1.28rem;
  line-height: 1.2;
}

.fsu-live-message {
  max-width: 720px;
  margin-top: 7px;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
}

.fsu-live-updated {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.fsu-progress-block {
  margin-top: 18px;
  padding: 13px 14px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 14px;
  background: #f8fafc;
}

.fsu-progress-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 800;
}

.fsu-progress-caption strong {
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.fullscrape-update-panel .fsu-progress-track {
  height: 14px;
  border: 1px solid #cbd5e1;
  background: #dbe3ee;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.07);
}

.fullscrape-update-panel .fsu-progress-fill {
  min-width: 0;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.22);
}

.fsu-live-status.is-success .fsu-progress-fill {
  background: linear-gradient(90deg, #15803d 0%, #16a34a 100%);
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.18);
}

.fullscrape-update-panel .fsu-progress-meta {
  margin-top: 8px;
  color: #475569;
  font-size: 0.73rem;
}

.fullscrape-update-panel .fsu-progress-meta strong {
  color: #0f172a;
  font-size: 0.78rem;
}

.fsu-execution-meta {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr 0.85fr 1.55fr;
  gap: 8px;
  margin-top: 12px;
}

.fsu-meta-item {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  background: #ffffff;
}

.fsu-meta-item span {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fsu-meta-item strong {
  display: block;
  overflow: hidden;
  color: #172033;
  font-size: 0.77rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fsu-meta-item small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fsu-meta-primary {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.fsu-meta-primary strong {
  color: #1d4ed8;
}

.fsu-meta-job strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.67rem;
}

.fsu-kpi-strip {
  gap: 10px;
  margin-top: 12px;
}

.fsu-kpi {
  min-height: 78px;
  padding: 12px 14px;
  border-color: #dbe4ef;
  background: #ffffff;
}

.fsu-kpi strong {
  font-size: 1.45rem;
  line-height: 1.15;
}

.fsu-kpi small {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 700;
}

.fsu-kpi.is-danger.has-issues {
  border-color: #f1a8a8;
  background: #fff7f7;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.05);
}

.fsu-kpi.is-danger.has-issues small {
  color: #b91c1c;
}

.fsu-run-details {
  margin-top: 10px;
}

.fsu-technical-summary {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
}

.fsu-technical-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.fsu-technical-summary-head strong {
  display: block;
  color: #991b1b;
  font-size: 0.86rem;
}

.fsu-technical-summary-head > span {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
}

.fsu-technical-summary-list {
  display: grid;
  gap: 7px;
}

.fsu-tech-line {
  display: grid;
  grid-template-columns: minmax(110px, 0.75fr) minmax(120px, 0.9fr) minmax(0, 2.35fr);
  gap: 9px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.7rem;
}

.fsu-tech-line strong { color: #7f1d1d; }
.fsu-tech-line span { color: #b91c1c; font-weight: 800; }
.fsu-tech-line p { margin: 0; color: #4b5563; line-height: 1.4; overflow-wrap: anywhere; }
.fsu-tech-wait, .fsu-tech-more { color: #7f1d1d; font-size: 0.7rem; font-weight: 700; line-height: 1.45; }

.fsu-flow-card {
  padding: 16px;
  border-color: #cfdbea;
  background: #f8fafc;
}

.fsu-flow-header {
  margin-bottom: 12px;
}

.fsu-flow-header > div > strong {
  font-size: 0.94rem;
}

.fsu-flow-header > span {
  color: #334155;
  font-size: 0.73rem;
  font-weight: 800;
}

.fsu-flow {
  gap: 8px;
}

.fsu-flow::before {
  display: none;
}

.fsu-flow li {
  min-height: 78px;
  padding: 10px 7px;
  gap: 4px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #ffffff;
  color: #94a3b8;
  transition: 0.18s ease;
}

.fsu-flow-index {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 900;
}

.fsu-flow li strong {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: normal;
  line-height: 1.15;
}

.fsu-flow li small {
  color: inherit;
  font-size: 0.58rem;
  font-weight: 700;
}

.fsu-flow li.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.fsu-flow li.is-done .fsu-flow-index {
  background: #16a34a;
  color: #ffffff;
}

.fsu-flow li.is-current {
  border-color: #7fb0ff;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.10), 0 8px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.fsu-flow li.is-current .fsu-flow-index {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 0 0 4px #dbeafe;
}

.fsu-flow li.is-failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.fsu-flow li.is-failed .fsu-flow-index {
  background: #dc2626;
  color: #ffffff;
}

.fullscrape-update-panel .fsu-console-details {
  margin-top: 10px;
  border-top: 1px solid #e5ebf3;
}

.fullscrape-update-panel .fsu-console-details > summary {
  padding: 12px 3px 7px;
  font-size: 0.8rem;
}

.fsu-event-list {
  max-height: 230px;
}

.fsu-audit-panel {
  border-color: #d6e0ec;
}

.fsu-artifact-line {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
}

.fsu-artifact-line strong { color: #334155; }
.fsu-artifact-line em { font-style: normal; overflow-wrap: anywhere; }

.fsu-audit-issues {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fffafa;
}

.fsu-audit-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.fsu-audit-section-head strong {
  display: block;
  color: #991b1b;
  font-size: 0.92rem;
}

.fsu-audit-section-head span {
  display: block;
  margin-top: 3px;
  color: #7f1d1d;
  font-size: 0.7rem;
}

.fsu-audit-section-head b {
  min-width: 34px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  text-align: center;
  font-size: 0.78rem;
}

.fsu-issues-table td:nth-child(1),
.fsu-issues-table td:nth-child(2) {
  white-space: nowrap;
}

.fsu-issues-table td:nth-child(3) {
  min-width: 260px;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 1500px) {
  .fsu-execution-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fsu-meta-job {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .fsu-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .fsu-flow li.is-current {
    transform: none;
  }
}

@media (max-width: 760px) {
  .fsu-execution-meta,
  .fsu-kpi-strip,
  .fsu-run-details {
    grid-template-columns: 1fr;
  }
  .fsu-meta-job,
  .fsu-run-detail-wide {
    grid-column: auto;
  }
  .fsu-flow {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .fsu-flow li {
    grid-template-columns: 25px 1fr;
    grid-template-rows: auto auto;
    justify-items: start;
    min-height: 0;
    text-align: left;
  }
  .fsu-flow li .fsu-flow-index { grid-row: 1 / span 2; }
  .fsu-flow li strong { font-size: 0.72rem; }
  .fsu-tech-line {
    grid-template-columns: 1fr;
  }
}

/* SCC Agent Security S1A - painel aditivo em Usuarios e Permissoes */
.agent-security-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d9e2f0;
  border-radius: 18px;
  background: #fbfdff;
}
.agent-security-head,
.agent-security-block-head,
.agent-device-card,
.agent-pairing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.agent-security-head { align-items: flex-start; }
.agent-security-head h3 { margin: 2px 0 4px; font-size: 20px; }
.agent-security-head p { margin: 0; color: #63728a; }
.agent-security-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #a56b00;
}
.agent-pair-btn { white-space: nowrap; }
.agent-security-warning,
.agent-pairing-secret {
  margin-top: 14px;
  border-radius: 14px;
  padding: 14px;
}
.agent-security-warning {
  background: #fff7e8;
  border: 1px solid #efc66f;
  color: #6d4a00;
}
.agent-pairing-secret {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  background: #eef6ff;
  border: 1px solid #a9c9f7;
}
.agent-pairing-secret div { display: grid; gap: 3px; }
.agent-pairing-secret span { color: #5e6d83; font-size: 12px; }
.agent-pairing-secret code {
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #cbd9ee;
  font-size: 12px;
}
.agent-security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
  gap: 14px;
  margin-top: 14px;
}
.agent-security-block {
  border: 1px solid #e0e7f1;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.agent-security-block-head { margin-bottom: 10px; }
.agent-security-block-head h4 { margin: 0; font-size: 14px; }
.agent-security-block-head > span {
  font-size: 11px;
  font-weight: 800;
  color: #58708f;
  background: #edf3fa;
  border-radius: 999px;
  padding: 4px 8px;
}
.agent-device-list,
.agent-pairing-list { display: grid; gap: 9px; }
.agent-device-card,
.agent-pairing-row {
  border: 1px solid #e4eaf2;
  border-radius: 12px;
  padding: 11px;
  align-items: flex-start;
}
.agent-device-card.is-revoked { opacity: .7; background: #fafafa; }
.agent-device-main { min-width: 0; display: grid; gap: 3px; }
.agent-device-main > small,
.agent-pairing-row small { color: #77859a; font-size: 11px; overflow-wrap: anywhere; }
.agent-device-meta { display: flex; flex-wrap: wrap; gap: 7px; color: #617089; font-size: 11px; }
.agent-device-meta span:not(:last-child)::after { content: " ·"; }
.agent-device-actions { display: grid; gap: 7px; justify-items: end; }
.agent-capability-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.agent-capability-list em {
  font-style: normal;
  font-size: 10px;
  color: #2f5f9a;
  background: #edf5ff;
  border: 1px solid #cfe2fa;
  border-radius: 999px;
  padding: 2px 6px;
}
.danger-ghost-btn {
  border: 1px solid #e3a5a5;
  background: #fff;
  color: #a72f2f;
  border-radius: 9px;
  padding: 7px 10px;
  font-weight: 700;
  cursor: pointer;
}
.danger-ghost-btn:hover { background: #fff1f1; }
.compact-btn { padding: 6px 8px; font-size: 11px; }
.agent-security-empty { color: #7a8798; font-size: 12px; padding: 8px 2px; }
.agent-security-foot {
  margin-top: 12px;
  color: #68778d;
  font-size: 11px;
  line-height: 1.45;
}
.agent-security-foot code { font-size: 10px; }
@media (max-width: 1180px) {
  .agent-security-grid { grid-template-columns: 1fr; }
  .agent-pairing-secret { grid-template-columns: 1fr; }
}


/* SCC Agent S3 - escopos HML e targeting */
.agent-scope-form {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}
.agent-scope-title {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.agent-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px 10px;
  margin-bottom: 9px;
}
.agent-scope-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.fsu-agent-target-section {
  margin: 12px 0 4px;
}
.fsu-agent-target-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.fsu-agent-target-row select {
  width: 100%;
  min-height: 40px;
}
@media (max-width: 760px) {
  .fsu-agent-target-row { grid-template-columns: 1fr; }
}

/* =========================================================
   SCC_SIDEBAR_MODERNA_V31_290926
   Modernizacao visual isolada da sidebar.
   Nao altera rotas, permissoes, badge dinamica ou operacao.
   ========================================================= */

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: relative;
  background:
    linear-gradient(
      180deg,
      #fbfdff 0%,
      #f8fbff 48%,
      #f5f8fc 100%
    );
  border-right: 1px solid #dce5f0;
  box-shadow:
    8px 0 30px rgba(28, 52, 84, 0.045);
  padding: 18px 16px 16px;
  gap: 17px;
}

.sidebar .scc-sidebar-brand {
  padding: 2px 6px 9px;
  margin: 0;
}

.sidebar .scc-sidebar-logo {
  width: 104px;
  max-width: 82%;
  margin: 0 auto 3px;
}

.sidebar .scc-sidebar-subtitle {
  color: #425675;
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar .scc-sidebar-version {
  color: #8290a5;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  margin-top: 4px;
}

.sidebar-nav {
  gap: 8px;
}

.grouped-nav {
  gap: 11px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 8px 4px;
  color: #72819a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.095em;
  line-height: 1;
  text-transform: uppercase;
}

.nav-group-label::after {
  content: "";
  flex: 1;
  min-width: 16px;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      rgba(150, 165, 187, 0.42),
      rgba(150, 165, 187, 0.08)
    );
}

.nav-subitems {
  display: grid;
  gap: 2px;
}

.nav-item,
.nav-subitem {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  box-sizing: border-box;
  margin-left: 0;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #1f3352;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.nav-item:hover,
.nav-subitem:hover {
  color: #174fbb;
  background: #f0f5fc;
  border-color: #e0e9f5;
  transform: translateX(1px);
}

.nav-item.active,
.nav-subitem.active {
  color: #1559d7;
  background:
    linear-gradient(
      90deg,
      #eaf2ff 0%,
      #f1f6ff 100%
    );
  border-color: #d7e5fb;
  box-shadow:
    0 4px 13px rgba(39, 101, 204, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.nav-item.active::before,
.nav-subitem.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #2563eb;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.03);
}

.nav-icon {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #526b91;
}

.nav-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover .nav-icon,
.nav-subitem:hover .nav-icon,
.nav-item.active .nav-icon,
.nav-subitem.active .nav-icon {
  color: #2563eb;
}

.nav-label {
  display: block;
  min-width: 0;
}

.side-note.side-note-focus {
  position: relative;
  padding: 12px 14px 13px;
  border: 1px solid #efc363;
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      #fffaf0 0%,
      #fff3d9 100%
    );
  box-shadow:
    0 8px 22px rgba(155, 106, 11, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.side-note-focus .side-note-label {
  margin-bottom: 3px;
  color: #9a711e;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.085em;
}

.side-note-focus .side-note-value {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4d3906;
  font-size: 0.98rem;
  font-weight: 800;
}

.side-note-focus .side-note-value::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, 0.11);
}

.side-note-focus .side-note-muted {
  margin-top: 4px;
  font-size: 0.71rem;
  color: #91752e;
}

.sidebar .admin-card {
  border-color: #e1e8f1;
  background: rgba(255, 255, 255, 0.74);
  box-shadow:
    0 5px 18px rgba(31, 53, 81, 0.045);
}

@media (max-width: 900px) {
  .sidebar {
    padding: 16px;
  }

  .sidebar .scc-sidebar-brand {
    align-items: flex-start;
    text-align: left;
    padding-left: 1px;
  }

  .sidebar .scc-sidebar-logo {
    width: 100px;
    margin-left: 0;
  }

  .nav-item,
  .nav-subitem {
    min-height: 39px;
  }
}

/* SCC_SIDEBAR_ADMIN_DIVIDER_290926
   Ajuste visual isolado: divisor do grupo Administracao. */
.sidebar .nav-group-admin > .nav-group-label::after {
  content: "";
  display: block;
  flex: 1 1 auto;
  min-width: 36px;
  height: 1px;
  opacity: 1;
  background:
    linear-gradient(
      90deg,
      rgba(150, 165, 187, 0.42),
      rgba(150, 165, 187, 0.08)
    );
}

/* SCC_SIDEBAR_ADMIN_DIVIDER_FINAL_290926
   Divisor real do grupo Administracao.
   Nao depende de pseudo-elemento. */

.sidebar .nav-group-admin > .nav-group-label-admin::after {
  content: none !important;
  display: none !important;
}

.sidebar .nav-group-admin-divider {
  display: block;
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      rgba(150, 165, 187, 0.42),
      rgba(150, 165, 187, 0.08)
    );
}

